Skip to content

Commit 048b570

Browse files
committed
chore: Update Docker Engine API to 27.3.1
1 parent fbe504f commit 048b570

31 files changed

+313
-331
lines changed

src/Docker.DotNet.X509/CertificateCredentials.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public override HttpMessageHandler GetHandler(HttpMessageHandler innerHandler)
2525
_certificate
2626
};
2727

28-
handler.ServerCertificateValidationCallback = this.ServerCertificateValidationCallback;
28+
handler.ServerCertificateValidationCallback = ServerCertificateValidationCallback;
2929

3030
if (handler.ServerCertificateValidationCallback == null)
3131
{

src/Docker.DotNet.X509/RSAUtil.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public static X509Certificate2 GetCertFromPFXSecure(string pfxFilePath, SecureSt
2424
public static X509Certificate2 GetCertFromPEMFiles(string certFilePath, string keyFilePath)
2525
{
2626
var cert = new X509Certificate2(certFilePath);
27-
cert.PrivateKey = RSAUtil.ReadFromPemFile(keyFilePath);
27+
cert.PrivateKey = ReadFromPemFile(keyFilePath);
2828
return cert;
2929
}
3030

src/Docker.DotNet/BinaryRequestContent.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ public BinaryRequestContent(Stream stream, string mimeType)
2222
throw new ArgumentNullException(nameof(mimeType));
2323
}
2424

25-
this._stream = stream;
26-
this._mimeType = mimeType;
25+
_stream = stream;
26+
_mimeType = mimeType;
2727
}
2828

2929
public HttpContent GetContent()
3030
{
31-
var data = new StreamContent(this._stream);
32-
data.Headers.ContentType = new MediaTypeHeaderValue(this._mimeType);
31+
var data = new StreamContent(_stream);
32+
data.Headers.ContentType = new MediaTypeHeaderValue(_mimeType);
3333
return data;
3434
}
3535
}

src/Docker.DotNet/DockerApiException.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ public class DockerApiException : Exception
1313
public DockerApiException(HttpStatusCode statusCode, string responseBody)
1414
: base($"Docker API responded with status code={statusCode}, response={responseBody}")
1515
{
16-
this.StatusCode = statusCode;
17-
this.ResponseBody = responseBody;
16+
StatusCode = statusCode;
17+
ResponseBody = responseBody;
1818
}
1919
}
2020
}

src/Docker.DotNet/DockerApiResponse.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ internal class DockerApiResponse
1010

1111
public DockerApiResponse(HttpStatusCode statusCode, string body)
1212
{
13-
this.StatusCode = statusCode;
14-
this.Body = body;
13+
StatusCode = statusCode;
14+
Body = body;
1515
}
1616
}
1717
}

src/Docker.DotNet/Endpoints/ConfigsOperations.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ internal class ConfigOperations : IConfigOperations
1313

1414
internal ConfigOperations(DockerClient client)
1515
{
16-
this._client = client;
16+
_client = client;
1717
}
1818

1919
async Task<IList<SwarmConfig>> IConfigOperations.ListConfigsAsync(CancellationToken cancellationToken)
2020
{
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);
2323
}
2424

2525
async Task<SwarmCreateConfigResponse> IConfigOperations.CreateConfigAsync(SwarmCreateConfigParameters body, CancellationToken cancellationToken)
@@ -29,9 +29,9 @@ async Task<SwarmCreateConfigResponse> IConfigOperations.CreateConfigAsync(SwarmC
2929
throw new ArgumentNullException(nameof(body));
3030
}
3131

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);
3535
}
3636

3737
async Task<SwarmConfig> IConfigOperations.InspectConfigAsync(string id, CancellationToken cancellationToken)
@@ -41,8 +41,8 @@ async Task<SwarmConfig> IConfigOperations.InspectConfigAsync(string id, Cancella
4141
throw new ArgumentNullException(nameof(id));
4242
}
4343

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);
4646
}
4747

4848
Task IConfigOperations.RemoveConfigAsync(string id, CancellationToken cancellationToken)
@@ -52,7 +52,7 @@ Task IConfigOperations.RemoveConfigAsync(string id, CancellationToken cancellati
5252
throw new ArgumentNullException(nameof(id));
5353
}
5454

55-
return this._client.MakeRequestAsync(this._client.NoErrorHandlers, HttpMethod.Delete, $"configs/{id}", cancellationToken);
55+
return _client.MakeRequestAsync(_client.NoErrorHandlers, HttpMethod.Delete, $"configs/{id}", cancellationToken);
5656
}
5757
}
5858
}

0 commit comments

Comments
 (0)