mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-09 04:56:29 +00:00
drop unnecessary awaits and specify ConfigureAwait otherwise for other core clients
This commit is contained in:
@@ -95,7 +95,7 @@ namespace Octokit
|
||||
|
||||
var endpoint = ApiUrls.UserAdministrationAuthorization(login);
|
||||
|
||||
var response = ((HttpStatusCode)await Connection.Delete(endpoint));
|
||||
var response = await Connection.Delete(endpoint).ConfigureAwait(false);
|
||||
if (response != HttpStatusCode.NoContent)
|
||||
{
|
||||
throw new ApiException("Invalid Status Code returned. Expected a 204", response);
|
||||
@@ -196,7 +196,7 @@ namespace Octokit
|
||||
Ensure.ArgumentNotNullOrEmptyString(login, "login");
|
||||
var endpoint = ApiUrls.UserAdministration(login);
|
||||
|
||||
var response = ((HttpStatusCode)await Connection.Delete(endpoint));
|
||||
var response = await Connection.Delete(endpoint).ConfigureAwait(false);
|
||||
if (response != HttpStatusCode.NoContent)
|
||||
{
|
||||
throw new ApiException("Invalid Status Code returned. Expected a 204", response);
|
||||
@@ -219,7 +219,7 @@ namespace Octokit
|
||||
Ensure.ArgumentNotNull(keyId, "keyId");
|
||||
var endpoint = ApiUrls.UserAdministrationPublicKeys(keyId);
|
||||
|
||||
var response = ((HttpStatusCode)await Connection.Delete(endpoint));
|
||||
var response = await Connection.Delete(endpoint).ConfigureAwait(false);
|
||||
if (response != HttpStatusCode.NoContent)
|
||||
{
|
||||
throw new ApiException("Invalid Status Code returned. Expected a 204", response);
|
||||
|
||||
Reference in New Issue
Block a user