@@ -13,13 +13,13 @@ internal class ConfigOperations : IConfigOperations
13
13
14
14
internal ConfigOperations ( DockerClient client )
15
15
{
16
- this . _client = client ;
16
+ _client = client ;
17
17
}
18
18
19
19
async Task < IList < SwarmConfig > > IConfigOperations . ListConfigsAsync ( CancellationToken cancellationToken )
20
20
{
21
- var response = await this . _client . MakeRequestAsync ( this . _client . NoErrorHandlers , HttpMethod . Get , "configs" , cancellationToken ) . ConfigureAwait ( false ) ;
22
- return this . _client . JsonSerializer . DeserializeObject < IList < SwarmConfig > > ( response . Body ) ;
21
+ var response = await _client . MakeRequestAsync ( _client . NoErrorHandlers , HttpMethod . Get , "configs" , cancellationToken ) . ConfigureAwait ( false ) ;
22
+ return _client . JsonSerializer . DeserializeObject < IList < SwarmConfig > > ( response . Body ) ;
23
23
}
24
24
25
25
async Task < SwarmCreateConfigResponse > IConfigOperations . CreateConfigAsync ( SwarmCreateConfigParameters body , CancellationToken cancellationToken )
@@ -29,9 +29,9 @@ async Task<SwarmCreateConfigResponse> IConfigOperations.CreateConfigAsync(SwarmC
29
29
throw new ArgumentNullException ( nameof ( body ) ) ;
30
30
}
31
31
32
- var data = new JsonRequestContent < SwarmConfigSpec > ( body . Config , this . _client . JsonSerializer ) ;
33
- var response = await this . _client . MakeRequestAsync ( this . _client . NoErrorHandlers , HttpMethod . Post , "configs/create" , null , data , cancellationToken ) . ConfigureAwait ( false ) ;
34
- return this . _client . JsonSerializer . DeserializeObject < SwarmCreateConfigResponse > ( response . Body ) ;
32
+ var data = new JsonRequestContent < SwarmConfigSpec > ( body . Config , _client . JsonSerializer ) ;
33
+ var response = await _client . MakeRequestAsync ( _client . NoErrorHandlers , HttpMethod . Post , "configs/create" , null , data , cancellationToken ) . ConfigureAwait ( false ) ;
34
+ return _client . JsonSerializer . DeserializeObject < SwarmCreateConfigResponse > ( response . Body ) ;
35
35
}
36
36
37
37
async Task < SwarmConfig > IConfigOperations . InspectConfigAsync ( string id , CancellationToken cancellationToken )
@@ -41,8 +41,8 @@ async Task<SwarmConfig> IConfigOperations.InspectConfigAsync(string id, Cancella
41
41
throw new ArgumentNullException ( nameof ( id ) ) ;
42
42
}
43
43
44
- var response = await this . _client . MakeRequestAsync ( this . _client . NoErrorHandlers , HttpMethod . Get , $ "configs/{ id } ", cancellationToken ) . ConfigureAwait ( false ) ;
45
- return this . _client . JsonSerializer . DeserializeObject < SwarmConfig > ( response . Body ) ;
44
+ var response = await _client . MakeRequestAsync ( _client . NoErrorHandlers , HttpMethod . Get , $ "configs/{ id } ", cancellationToken ) . ConfigureAwait ( false ) ;
45
+ return _client . JsonSerializer . DeserializeObject < SwarmConfig > ( response . Body ) ;
46
46
}
47
47
48
48
Task IConfigOperations . RemoveConfigAsync ( string id , CancellationToken cancellationToken )
@@ -52,7 +52,7 @@ Task IConfigOperations.RemoveConfigAsync(string id, CancellationToken cancellati
52
52
throw new ArgumentNullException ( nameof ( id ) ) ;
53
53
}
54
54
55
- return this . _client . MakeRequestAsync ( this . _client . NoErrorHandlers , HttpMethod . Delete , $ "configs/{ id } ", cancellationToken ) ;
55
+ return _client . MakeRequestAsync ( _client . NoErrorHandlers , HttpMethod . Delete , $ "configs/{ id } ", cancellationToken ) ;
56
56
}
57
57
}
58
58
}
0 commit comments