renaming things is hard

This commit is contained in:
Brendan Forster
2015-05-31 20:34:29 +09:30
parent be57a70c71
commit d7d7efd2c7
5 changed files with 8 additions and 8 deletions
@@ -14,7 +14,7 @@ public class HttpClientAdapterTests
[IntegrationTest]
public async Task CanDownloadImage()
{
var httpClient = new HttpClientAdapter(HttpMessageHandlerFactory.GetHandler);
var httpClient = new HttpClientAdapter(HttpMessageHandlerFactory.CreateDefault);
var request = new Request
{
BaseAddress = new Uri("https://github.global.ssl.fastly.net/", UriKind.Absolute),
@@ -36,7 +36,7 @@ public class HttpClientAdapterTests
[IntegrationTest]
public async Task CanCancelARequest()
{
var httpClient = new HttpClientAdapter(HttpMessageHandlerFactory.GetHandler);
var httpClient = new HttpClientAdapter(HttpMessageHandlerFactory.CreateDefault);
var request = new Request
{
BaseAddress = new Uri("https://github.global.ssl.fastly.net/", UriKind.Absolute),
+1 -1
View File
@@ -179,7 +179,7 @@ namespace Octokit.Tests.Http
sealed class HttpClientAdapterTester : HttpClientAdapter
{
public HttpClientAdapterTester()
: base (HttpMessageHandlerFactory.GetHandler)
: base(HttpMessageHandlerFactory.CreateDefault)
{
}
+1 -1
View File
@@ -92,7 +92,7 @@ namespace Octokit
/// <param name="credentialStore">Provides credentials to the client when making requests</param>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")]
public Connection(ProductHeaderValue productInformation, Uri baseAddress, ICredentialStore credentialStore)
: this(productInformation, baseAddress, credentialStore, new HttpClientAdapter(HttpMessageHandlerFactory.GetHandler), new SimpleJsonSerializer())
: this(productInformation, baseAddress, credentialStore, new HttpClientAdapter(HttpMessageHandlerFactory.CreateDefault), new SimpleJsonSerializer())
{
}
+3 -3
View File
@@ -7,13 +7,13 @@ namespace Octokit.Internal
public static class HttpMessageHandlerFactory
{
[SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")]
public static HttpClientHandler GetHandler()
public static HttpMessageHandler CreateDefault()
{
return GetHandler(null);
return CreateDefault(null);
}
[SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")]
public static HttpClientHandler GetHandler(IWebProxy proxy)
public static HttpMessageHandler CreateDefault(IWebProxy proxy)
{
var handler = new HttpClientHandler
{
+1 -1
View File
@@ -38,7 +38,7 @@ var proxy = new WebProxy();
// this is the core connection
var connection = new Connection(new ProductHeaderValue("my-cool-app"),
new HttpClientAdapter(() => HttpMessageHandlerFactory.GetHandler(proxy)));
new HttpClientAdapter(() => HttpMessageHandlerFactory.CreateDefault(proxy)));
// and pass this connection to your client
var client = new GitHubClient(connection);