File tree Expand file tree Collapse file tree 5 files changed +10
-12
lines changed
CSharp-OpenBMCLAPI/Modules Expand file tree Collapse file tree 5 files changed +10
-12
lines changed Original file line number Diff line number Diff line change 33 /// <summary>
44 /// 负责存储 Cluster 的 secret 和 id
55 /// </summary>
6- public struct ClusterInfo ( string id , string secret )
6+ public readonly struct ClusterInfo ( string id , string secret )
77 {
88 public readonly string clusterId = id ;
99 public readonly string clusterSecret = secret ;
Original file line number Diff line number Diff line change 22
33namespace CSharpOpenBMCLAPI . Modules
44{
5- public struct Configuration
5+ public readonly struct Configuration
66 {
77 [ JsonProperty ( "sync" ) ]
8- public Sync Sync { get ; set ; }
8+ public Sync Sync { get ; init ; }
99 }
1010
11- public struct Sync
11+ public readonly struct Sync
1212 {
1313 [ JsonProperty ( "source" ) ]
14- public string Source { get ; set ; }
14+ public string Source { get ; init ; }
1515
1616 [ JsonProperty ( "concurrency" ) ]
17- public int Concurrency { get ; set ; }
17+ public int Concurrency { get ; init ; }
1818 }
1919}
Original file line number Diff line number Diff line change 22{
33 internal class HttpRequest
44 {
5-
65 public static HttpClient client ;
76
8-
97 static HttpRequest ( )
108 {
119 client = new HttpClient ( )
Original file line number Diff line number Diff line change @@ -10,4 +10,4 @@ public class PublicData(ClusterInfo info)
1010
1111 internal int maxThreadCount ;
1212 }
13- }
13+ }
Original file line number Diff line number Diff line change 33 /// <summary>
44 /// Token 结构,承载 <seealso cref="Token.token"/> 和 <seealso cref="Token.ttl"/>
55 /// </summary>
6- public struct Token
6+ public readonly struct Token
77 {
8- public string token ;
9- public int ttl ;
8+ public readonly string token ;
9+ public readonly int ttl ;
1010 }
1111}
You can’t perform that action at this time.
0 commit comments