mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-23 15:45:28 +00:00
💄 trim some long lines
This commit is contained in:
@@ -39,7 +39,8 @@ namespace Octokit
|
||||
|
||||
try
|
||||
{
|
||||
var response = await Connection.GetAsync<object>(ApiUrls.CheckAssignee(owner, name, assignee), null, null).ConfigureAwait(false);
|
||||
var response = await Connection.GetAsync<object>(ApiUrls.CheckAssignee(owner, name, assignee), null, null)
|
||||
.ConfigureAwait(false);
|
||||
if (response.StatusCode != HttpStatusCode.NotFound && response.StatusCode != HttpStatusCode.NoContent)
|
||||
{
|
||||
throw new ApiException("Invalid Status Code returned. Expected a 204 or a 404", response.StatusCode);
|
||||
|
||||
@@ -37,7 +37,8 @@ namespace Octokit
|
||||
public async Task<IReadOnlyDictionary<string, Uri>> GetEmojis()
|
||||
{
|
||||
var endpoint = new Uri("emojis", UriKind.Relative);
|
||||
var response = await _connection.GetAsync<Dictionary<string, string>>(endpoint, null, null).ConfigureAwait(false);
|
||||
var response = await _connection.GetAsync<Dictionary<string, string>>(endpoint, null, null)
|
||||
.ConfigureAwait(false);
|
||||
return new ReadOnlyDictionary<string, Uri>(
|
||||
response.BodyAsObject.ToDictionary(kvp => kvp.Key, kvp => new Uri(kvp.Value)));
|
||||
}
|
||||
@@ -51,7 +52,8 @@ namespace Octokit
|
||||
public async Task<string> RenderRawMarkdown(string markdown)
|
||||
{
|
||||
var endpoint = new Uri("markdown/raw", UriKind.Relative);
|
||||
var response = await _connection.PostAsync<string>(endpoint, markdown, "text/html", "text/plain").ConfigureAwait(false);
|
||||
var response = await _connection.PostAsync<string>(endpoint, markdown, "text/html", "text/plain")
|
||||
.ConfigureAwait(false);
|
||||
return response.Body;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,8 @@ 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)
|
||||
{
|
||||
|
||||
@@ -109,7 +109,8 @@ namespace Octokit
|
||||
{
|
||||
Ensure.ArgumentNotNull(uri, "uri");
|
||||
|
||||
return _pagination.GetAllPages(async () => await GetPage<T>(uri, parameters, accepts).ConfigureAwait(false));
|
||||
return _pagination.GetAllPages(async () => await GetPage<T>(uri, parameters, accepts)
|
||||
.ConfigureAwait(false));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -33,7 +33,8 @@ namespace Octokit.Internal
|
||||
using (var requestMessage = BuildRequestMessage(request))
|
||||
{
|
||||
// Make the request
|
||||
var responseMessage = await http.SendAsync(requestMessage, HttpCompletionOption.ResponseContentRead).ConfigureAwait(false);
|
||||
var responseMessage = await http.SendAsync(requestMessage, HttpCompletionOption.ResponseContentRead)
|
||||
.ConfigureAwait(false);
|
||||
return await BuildResponse<T>(responseMessage).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user