💄 trim some long lines

This commit is contained in:
Brendan Forster
2013-10-31 12:22:43 +11:00
parent 43e82e124f
commit 70bb3bdbfc
5 changed files with 12 additions and 6 deletions

View File

@@ -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);

View File

@@ -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;
}
}

View File

@@ -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)
{

View File

@@ -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>

View File

@@ -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);
}
}