Skip to content

Commit

Permalink
add ConfiguraAwait(false) false to async methods
Browse files Browse the repository at this point in the history
  • Loading branch information
bugthesystem committed Jul 20, 2015
1 parent ddadf1b commit becacb8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Httwrap/Httwrap.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>Httwrap</id>
<version>1.0.8</version>
<version>1.0.9</version>
<title>Httwrap</title>
<authors>Ziya SARIKAYA</authors>
<owners>ziyasal</owners>
Expand Down
9 changes: 5 additions & 4 deletions Httwrap/HttwrapClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ public sealed class HttwrapClient : IHttwrapClient, IDisposable

private readonly IQueryStringBuilder _queryStringBuilder;

public HttwrapClient(IHttwrapConfiguration configuration) : this(configuration, new QueryStringBuilder())
public HttwrapClient(IHttwrapConfiguration configuration)
: this(configuration, new QueryStringBuilder())
{
}

Expand Down Expand Up @@ -93,7 +94,7 @@ public async Task<IHttwrapResponse> DeleteAsync(string path, Action<HttpStatusCo
RequestInnerAsync(null, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None, method,
path, body);

var content = await response.Content.ReadAsStringAsync();
var content = await response.Content.ReadAsStringAsync().ConfigureAwait(false);

HandleIfErrorResponse(response.StatusCode, content, errorHandler);

Expand All @@ -108,7 +109,7 @@ public async Task<IHttwrapResponse> DeleteAsync(string path, Action<HttpStatusCo
RequestInnerAsync(null, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None, method,
path, body);

var content = await response.Content.ReadAsStringAsync();
var content = await response.Content.ReadAsStringAsync().ConfigureAwait(false);

HandleIfErrorResponse(response.StatusCode, content, errorHandler);

Expand All @@ -131,7 +132,7 @@ public async Task<IHttwrapResponse> DeleteAsync(string path, Action<HttpStatusCo
}

var request = PrepareRequest(method, body, path);
return await client.SendAsync(request, completionOption, cancellationToken);
return await client.SendAsync(request, completionOption, cancellationToken).ConfigureAwait(false);
}
catch (Exception ex)
{
Expand Down
4 changes: 2 additions & 2 deletions Httwrap/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("1.0.8")]
[assembly: AssemblyFileVersion("1.0.8")]
[assembly: AssemblyVersion("1.0.9")]
[assembly: AssemblyFileVersion("1.0.9")]
[assembly: InternalsVisibleTo("Httwrap.Tests")]

0 comments on commit becacb8

Please sign in to comment.