mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-05 11:40:42 +00:00
moved ConfigureAwait onto same line as await
This commit is contained in:
@@ -66,8 +66,7 @@ namespace Octokit
|
||||
|
||||
try
|
||||
{
|
||||
var response = await Connection.Get<object>(ApiUrls.CheckAssignee(owner, name, assignee), null, null)
|
||||
.ConfigureAwait(false);
|
||||
var response = await Connection.Get<object>(ApiUrls.CheckAssignee(owner, name, assignee), null, null).ConfigureAwait(false);
|
||||
return response.HttpResponse.IsTrue();
|
||||
}
|
||||
catch (NotFoundException)
|
||||
|
||||
@@ -244,8 +244,7 @@ namespace Octokit
|
||||
|
||||
try
|
||||
{
|
||||
var response = await Connection.Get<object>(ApiUrls.CheckMemberPublic(org, user), null, null)
|
||||
.ConfigureAwait(false);
|
||||
var response = await Connection.Get<object>(ApiUrls.CheckMemberPublic(org, user), null, null).ConfigureAwait(false);
|
||||
return response.HttpResponse.IsTrue();
|
||||
}
|
||||
catch (NotFoundException)
|
||||
@@ -293,8 +292,7 @@ namespace Octokit
|
||||
try
|
||||
{
|
||||
var requestData = new { };
|
||||
var response = await Connection.Put<object>(ApiUrls.OrganizationMembership(org, user), requestData)
|
||||
.ConfigureAwait(false);
|
||||
var response = await Connection.Put<object>(ApiUrls.OrganizationMembership(org, user), requestData).ConfigureAwait(false);
|
||||
if (response.HttpResponse.StatusCode != HttpStatusCode.NoContent)
|
||||
{
|
||||
throw new ApiException("Invalid Status Code returned. Expected a 204", response.HttpResponse.StatusCode);
|
||||
|
||||
@@ -57,8 +57,7 @@ namespace Octokit
|
||||
|
||||
try
|
||||
{
|
||||
var response = await Connection.Get<object>(endpoint, null, null)
|
||||
.ConfigureAwait(false);
|
||||
var response = await Connection.Get<object>(endpoint, null, null).ConfigureAwait(false);
|
||||
return response.HttpResponse.IsTrue();
|
||||
}
|
||||
catch (NotFoundException)
|
||||
|
||||
@@ -189,9 +189,7 @@ namespace Octokit
|
||||
|
||||
try
|
||||
{
|
||||
var response = await Connection.Get<object>(ApiUrls.Starred(owner, name), null, null)
|
||||
.ConfigureAwait(false);
|
||||
|
||||
var response = await Connection.Get<object>(ApiUrls.Starred(owner, name), null, null).ConfigureAwait(false);
|
||||
return response.HttpResponse.StatusCode == HttpStatusCode.NoContent;
|
||||
}
|
||||
catch (NotFoundException)
|
||||
@@ -213,9 +211,7 @@ namespace Octokit
|
||||
|
||||
try
|
||||
{
|
||||
var response = await Connection.Put<object>(ApiUrls.Starred(owner, name), null, null)
|
||||
.ConfigureAwait(false);
|
||||
|
||||
var response = await Connection.Put<object>(ApiUrls.Starred(owner, name), null, null).ConfigureAwait(false);
|
||||
return response.HttpResponse.StatusCode == HttpStatusCode.NoContent;
|
||||
}
|
||||
catch (NotFoundException)
|
||||
@@ -237,9 +233,7 @@ namespace Octokit
|
||||
|
||||
try
|
||||
{
|
||||
var statusCode = await Connection.Delete(ApiUrls.Starred(owner, name))
|
||||
.ConfigureAwait(false);
|
||||
|
||||
var statusCode = await Connection.Delete(ApiUrls.Starred(owner, name)).ConfigureAwait(false);
|
||||
return statusCode == HttpStatusCode.NoContent;
|
||||
}
|
||||
catch (NotFoundException)
|
||||
|
||||
@@ -41,8 +41,7 @@ namespace Octokit
|
||||
TwoFactorRequiredException twoFactorException = null;
|
||||
try
|
||||
{
|
||||
return await authorizationsClient.GetOrCreateApplicationAuthentication(clientId, clientSecret, newAuthorization)
|
||||
.ConfigureAwait(false);
|
||||
return await authorizationsClient.GetOrCreateApplicationAuthentication(clientId, clientSecret, newAuthorization).ConfigureAwait(false);
|
||||
}
|
||||
catch (TwoFactorRequiredException exception)
|
||||
{
|
||||
|
||||
@@ -181,8 +181,7 @@ namespace Octokit
|
||||
|
||||
parameters = Pagination.Setup(parameters, options);
|
||||
|
||||
return _pagination.GetAllPages(async () => await GetPage<T>(uri, parameters, accepts, options)
|
||||
.ConfigureAwait(false), uri);
|
||||
return _pagination.GetAllPages(async () => await GetPage<T>(uri, parameters, accepts, options).ConfigureAwait(false), uri);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -258,11 +257,7 @@ namespace Octokit
|
||||
Ensure.ArgumentNotNull(uri, "uri");
|
||||
Ensure.ArgumentNotNull(data, "data");
|
||||
|
||||
var response = await Connection.Post<T>(
|
||||
uri,
|
||||
data,
|
||||
accepts,
|
||||
contentType).ConfigureAwait(false);
|
||||
var response = await Connection.Post<T>(uri, data, accepts, contentType).ConfigureAwait(false);
|
||||
return response.Body;
|
||||
}
|
||||
|
||||
@@ -283,12 +278,7 @@ namespace Octokit
|
||||
Ensure.ArgumentNotNull(data, "data");
|
||||
Ensure.ArgumentNotNull(twoFactorAuthenticationCode, "twoFactorAuthenticationCode");
|
||||
|
||||
var response = await Connection.Post<T>(
|
||||
uri,
|
||||
data,
|
||||
accepts,
|
||||
contentType,
|
||||
twoFactorAuthenticationCode).ConfigureAwait(false);
|
||||
var response = await Connection.Post<T>(uri, data, accepts, contentType, twoFactorAuthenticationCode).ConfigureAwait(false);
|
||||
return response.Body;
|
||||
}
|
||||
|
||||
@@ -298,12 +288,7 @@ namespace Octokit
|
||||
Ensure.ArgumentNotNull(uri, "uri");
|
||||
Ensure.ArgumentNotNull(data, "data");
|
||||
|
||||
var response = await Connection.Post<T>(
|
||||
uri,
|
||||
data,
|
||||
accepts,
|
||||
contentType,
|
||||
timeout).ConfigureAwait(false);
|
||||
var response = await Connection.Post<T>(uri, data, accepts, contentType, timeout).ConfigureAwait(false);
|
||||
return response.Body;
|
||||
}
|
||||
|
||||
|
||||
@@ -451,14 +451,7 @@ namespace Octokit
|
||||
{
|
||||
Ensure.ArgumentNotNull(uri, "uri");
|
||||
|
||||
var response = await SendData<object>(
|
||||
uri,
|
||||
HttpMethod.Delete,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
CancellationToken.None,
|
||||
twoFactorAuthenticationCode).ConfigureAwait(false);
|
||||
var response = await SendData<object>(uri, HttpMethod.Delete, null, null, null, CancellationToken.None, twoFactorAuthenticationCode).ConfigureAwait(false);
|
||||
return response.HttpResponse.StatusCode;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user