diff --git a/src/Dodo.HttpClient.ResiliencePolicies.Tests/CircuitBreakerPolicyTests.cs b/src/Dodo.HttpClient.ResiliencePolicies.Tests/CircuitBreakerPolicyTests.cs index 31dab63..e9c664a 100644 --- a/src/Dodo.HttpClient.ResiliencePolicies.Tests/CircuitBreakerPolicyTests.cs +++ b/src/Dodo.HttpClient.ResiliencePolicies.Tests/CircuitBreakerPolicyTests.cs @@ -1,13 +1,13 @@ using System; using System.Net; using System.Threading.Tasks; -using Dodo.HttpClient.ResiliencePolicies.CircuitBreakerSettings; -using Dodo.HttpClient.ResiliencePolicies.RetrySettings; -using Dodo.HttpClient.ResiliencePolicies.Tests.DSL; +using Dodo.HttpClientResiliencePolicies.CircuitBreakerSettings; +using Dodo.HttpClientResiliencePolicies.RetrySettings; +using Dodo.HttpClientResiliencePolicies.Tests.DSL; using NUnit.Framework; using Polly.CircuitBreaker; -namespace Dodo.HttpClient.ResiliencePolicies.Tests +namespace Dodo.HttpClientResiliencePolicies.Tests { [TestFixture] public class CircuitBreakerTests diff --git a/src/Dodo.HttpClient.ResiliencePolicies.Tests/DSL/Create.cs b/src/Dodo.HttpClient.ResiliencePolicies.Tests/DSL/Create.cs index 84864f5..6f53d04 100644 --- a/src/Dodo.HttpClient.ResiliencePolicies.Tests/DSL/Create.cs +++ b/src/Dodo.HttpClient.ResiliencePolicies.Tests/DSL/Create.cs @@ -1,4 +1,4 @@ -namespace Dodo.HttpClient.ResiliencePolicies.Tests.DSL +namespace Dodo.HttpClientResiliencePolicies.Tests.DSL { public static class Create { diff --git a/src/Dodo.HttpClient.ResiliencePolicies.Tests/DSL/HttpClientWrapper.cs b/src/Dodo.HttpClient.ResiliencePolicies.Tests/DSL/HttpClientWrapper.cs index b113361..592d9d7 100644 --- a/src/Dodo.HttpClient.ResiliencePolicies.Tests/DSL/HttpClientWrapper.cs +++ b/src/Dodo.HttpClient.ResiliencePolicies.Tests/DSL/HttpClientWrapper.cs @@ -1,9 +1,8 @@ -using Dodo.HttpClient.ResiliencePolicies.Tests.Fakes; +using System.Net.Http; +using Dodo.HttpClientResiliencePolicies.Tests.Fakes; -namespace Dodo.HttpClient.ResiliencePolicies.Tests.DSL +namespace Dodo.HttpClientResiliencePolicies.Tests.DSL { - using HttpClient = System.Net.Http.HttpClient; - public class HttpClientWrapper { private readonly HttpClient _client; diff --git a/src/Dodo.HttpClient.ResiliencePolicies.Tests/DSL/HttpClientWrapperBuilder.cs b/src/Dodo.HttpClient.ResiliencePolicies.Tests/DSL/HttpClientWrapperBuilder.cs index 6d8b612..34965ee 100644 --- a/src/Dodo.HttpClient.ResiliencePolicies.Tests/DSL/HttpClientWrapperBuilder.cs +++ b/src/Dodo.HttpClient.ResiliencePolicies.Tests/DSL/HttpClientWrapperBuilder.cs @@ -2,12 +2,12 @@ using System.Collections.Generic; using System.Net; using System.Net.Http; -using Dodo.HttpClient.ResiliencePolicies.CircuitBreakerSettings; -using Dodo.HttpClient.ResiliencePolicies.RetrySettings; -using Dodo.HttpClient.ResiliencePolicies.Tests.Fakes; +using Dodo.HttpClientResiliencePolicies.CircuitBreakerSettings; +using Dodo.HttpClientResiliencePolicies.RetrySettings; +using Dodo.HttpClientResiliencePolicies.Tests.Fakes; using Microsoft.Extensions.DependencyInjection; -namespace Dodo.HttpClient.ResiliencePolicies.Tests.DSL +namespace Dodo.HttpClientResiliencePolicies.Tests.DSL { public sealed class HttpClientWrapperBuilder { diff --git a/src/Dodo.HttpClient.ResiliencePolicies.Tests/Dodo.HttpClient.ResiliencePolicies.Tests.csproj b/src/Dodo.HttpClient.ResiliencePolicies.Tests/Dodo.HttpClient.ResiliencePolicies.Tests.csproj index dea7a65..46df163 100644 --- a/src/Dodo.HttpClient.ResiliencePolicies.Tests/Dodo.HttpClient.ResiliencePolicies.Tests.csproj +++ b/src/Dodo.HttpClient.ResiliencePolicies.Tests/Dodo.HttpClient.ResiliencePolicies.Tests.csproj @@ -5,6 +5,7 @@ netcoreapp2.1 8.0 false + Dodo.HttpClientResiliencePolicies.Tests diff --git a/src/Dodo.HttpClient.ResiliencePolicies.Tests/Fakes/MockHttpMessageHandler.cs b/src/Dodo.HttpClient.ResiliencePolicies.Tests/Fakes/MockHttpMessageHandler.cs index 9f8ebfc..315ddfe 100644 --- a/src/Dodo.HttpClient.ResiliencePolicies.Tests/Fakes/MockHttpMessageHandler.cs +++ b/src/Dodo.HttpClient.ResiliencePolicies.Tests/Fakes/MockHttpMessageHandler.cs @@ -5,7 +5,7 @@ using System.Threading; using System.Threading.Tasks; -namespace Dodo.HttpClient.ResiliencePolicies.Tests.Fakes +namespace Dodo.HttpClientResiliencePolicies.Tests.Fakes { public class MockHttpMessageHandler : HttpMessageHandler { diff --git a/src/Dodo.HttpClient.ResiliencePolicies.Tests/Fakes/MockJsonClient.cs b/src/Dodo.HttpClient.ResiliencePolicies.Tests/Fakes/MockJsonClient.cs index ba840d1..a0c676d 100644 --- a/src/Dodo.HttpClient.ResiliencePolicies.Tests/Fakes/MockJsonClient.cs +++ b/src/Dodo.HttpClient.ResiliencePolicies.Tests/Fakes/MockJsonClient.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace Dodo.HttpClient.ResiliencePolicies.Tests.Fakes +namespace Dodo.HttpClientResiliencePolicies.Tests.Fakes { public interface IMockJsonClient { } diff --git a/src/Dodo.HttpClient.ResiliencePolicies.Tests/Helper.cs b/src/Dodo.HttpClient.ResiliencePolicies.Tests/Helper.cs index d895950..6d2e34f 100644 --- a/src/Dodo.HttpClient.ResiliencePolicies.Tests/Helper.cs +++ b/src/Dodo.HttpClient.ResiliencePolicies.Tests/Helper.cs @@ -1,9 +1,9 @@ using System.Net.Http; using System.Threading.Tasks; -namespace Dodo.HttpClient.ResiliencePolicies.Tests +namespace Dodo.HttpClientResiliencePolicies.Tests { - using HttpClient = System.Net.Http.HttpClient; + using HttpClient = HttpClient; public static class Helper { diff --git a/src/Dodo.HttpClient.ResiliencePolicies.Tests/HttpClientBuilderExtensionsTests.cs b/src/Dodo.HttpClient.ResiliencePolicies.Tests/HttpClientBuilderExtensionsTests.cs index eaf4d8f..9c5d4e2 100644 --- a/src/Dodo.HttpClient.ResiliencePolicies.Tests/HttpClientBuilderExtensionsTests.cs +++ b/src/Dodo.HttpClient.ResiliencePolicies.Tests/HttpClientBuilderExtensionsTests.cs @@ -1,13 +1,10 @@ -using Dodo.HttpClient.ResiliencePolicies.Tests.Fakes; -using Microsoft.Extensions.DependencyInjection; -using NUnit.Framework; using System; -using System.Collections.Generic; using System.Net.Http; -using System.Text; -using System.Threading.Tasks; +using Dodo.HttpClientResiliencePolicies.Tests.Fakes; +using Microsoft.Extensions.DependencyInjection; +using NUnit.Framework; -namespace Dodo.HttpClient.ResiliencePolicies.Tests +namespace Dodo.HttpClientResiliencePolicies.Tests { [TestFixture] public class HttpClientBuilderExtensionsTests diff --git a/src/Dodo.HttpClient.ResiliencePolicies.Tests/RetryPolicyTests.cs b/src/Dodo.HttpClient.ResiliencePolicies.Tests/RetryPolicyTests.cs index 65d224f..4f58be5 100644 --- a/src/Dodo.HttpClient.ResiliencePolicies.Tests/RetryPolicyTests.cs +++ b/src/Dodo.HttpClient.ResiliencePolicies.Tests/RetryPolicyTests.cs @@ -4,12 +4,12 @@ using System.Net; using System.Net.Http; using System.Threading.Tasks; -using Dodo.HttpClient.ResiliencePolicies.RetrySettings; -using Dodo.HttpClient.ResiliencePolicies.Tests.DSL; +using Dodo.HttpClientResiliencePolicies.RetrySettings; +using Dodo.HttpClientResiliencePolicies.Tests.DSL; using NUnit.Framework; using Polly; -namespace Dodo.HttpClient.ResiliencePolicies.Tests +namespace Dodo.HttpClientResiliencePolicies.Tests { [TestFixture] public class RetryPolicyTests diff --git a/src/Dodo.HttpClient.ResiliencePolicies.Tests/TimeoutPolicyTests.cs b/src/Dodo.HttpClient.ResiliencePolicies.Tests/TimeoutPolicyTests.cs index cfb2d37..12186c8 100644 --- a/src/Dodo.HttpClient.ResiliencePolicies.Tests/TimeoutPolicyTests.cs +++ b/src/Dodo.HttpClient.ResiliencePolicies.Tests/TimeoutPolicyTests.cs @@ -1,12 +1,12 @@ using System; using System.Net; using System.Threading.Tasks; -using Dodo.HttpClient.ResiliencePolicies.RetrySettings; -using Dodo.HttpClient.ResiliencePolicies.Tests.DSL; +using Dodo.HttpClientResiliencePolicies.RetrySettings; +using Dodo.HttpClientResiliencePolicies.Tests.DSL; using NUnit.Framework; using Polly.Timeout; -namespace Dodo.HttpClient.ResiliencePolicies.Tests +namespace Dodo.HttpClientResiliencePolicies.Tests { [TestFixture] public class TimeoutPolicyTests diff --git a/src/Dodo.HttpClient.ResiliencePolicies/CircuitBreakerSettings/CircuitBreakerSettings.cs b/src/Dodo.HttpClient.ResiliencePolicies/CircuitBreakerSettings/CircuitBreakerSettings.cs index e1266b3..8ad034d 100644 --- a/src/Dodo.HttpClient.ResiliencePolicies/CircuitBreakerSettings/CircuitBreakerSettings.cs +++ b/src/Dodo.HttpClient.ResiliencePolicies/CircuitBreakerSettings/CircuitBreakerSettings.cs @@ -2,7 +2,7 @@ using System.Net.Http; using Polly; -namespace Dodo.HttpClient.ResiliencePolicies.CircuitBreakerSettings +namespace Dodo.HttpClientResiliencePolicies.CircuitBreakerSettings { public class CircuitBreakerSettings : ICircuitBreakerSettings { diff --git a/src/Dodo.HttpClient.ResiliencePolicies/CircuitBreakerSettings/ICircuitBreakerSettings.cs b/src/Dodo.HttpClient.ResiliencePolicies/CircuitBreakerSettings/ICircuitBreakerSettings.cs index df14099..1d0364d 100644 --- a/src/Dodo.HttpClient.ResiliencePolicies/CircuitBreakerSettings/ICircuitBreakerSettings.cs +++ b/src/Dodo.HttpClient.ResiliencePolicies/CircuitBreakerSettings/ICircuitBreakerSettings.cs @@ -2,7 +2,7 @@ using System.Net.Http; using Polly; -namespace Dodo.HttpClient.ResiliencePolicies.CircuitBreakerSettings +namespace Dodo.HttpClientResiliencePolicies.CircuitBreakerSettings { public interface ICircuitBreakerSettings { diff --git a/src/Dodo.HttpClient.ResiliencePolicies/Defaults.cs b/src/Dodo.HttpClient.ResiliencePolicies/Defaults.cs index 10413d5..23c2b0d 100644 --- a/src/Dodo.HttpClient.ResiliencePolicies/Defaults.cs +++ b/src/Dodo.HttpClient.ResiliencePolicies/Defaults.cs @@ -1,4 +1,4 @@ -namespace Dodo.HttpClient.ResiliencePolicies +namespace Dodo.HttpClientResiliencePolicies { public static class Defaults { diff --git a/src/Dodo.HttpClient.ResiliencePolicies/Dodo.HttpClient.ResiliencePolicies.csproj b/src/Dodo.HttpClient.ResiliencePolicies/Dodo.HttpClient.ResiliencePolicies.csproj index 8091274..3821a5c 100644 --- a/src/Dodo.HttpClient.ResiliencePolicies/Dodo.HttpClient.ResiliencePolicies.csproj +++ b/src/Dodo.HttpClient.ResiliencePolicies/Dodo.HttpClient.ResiliencePolicies.csproj @@ -3,7 +3,8 @@ netstandard2.0;netcoreapp3.1 netstandard2.0 8.0 - 1.0.3 + 2.0.0 + Dodo.HttpClientResiliencePolicies diff --git a/src/Dodo.HttpClient.ResiliencePolicies/HttpClientBuilderExtensions.cs b/src/Dodo.HttpClient.ResiliencePolicies/HttpClientBuilderExtensions.cs index 269b5a0..9788076 100644 --- a/src/Dodo.HttpClient.ResiliencePolicies/HttpClientBuilderExtensions.cs +++ b/src/Dodo.HttpClient.ResiliencePolicies/HttpClientBuilderExtensions.cs @@ -2,8 +2,8 @@ using System.Net; using System.Net.Http; using System.Net.Http.Headers; -using Dodo.HttpClient.ResiliencePolicies.CircuitBreakerSettings; -using Dodo.HttpClient.ResiliencePolicies.RetrySettings; +using Dodo.HttpClientResiliencePolicies.CircuitBreakerSettings; +using Dodo.HttpClientResiliencePolicies.RetrySettings; using Microsoft.Extensions.DependencyInjection; using Polly; using Polly.CircuitBreaker; @@ -11,7 +11,7 @@ using Polly.Registry; using Polly.Timeout; -namespace Dodo.HttpClient.ResiliencePolicies +namespace Dodo.HttpClientResiliencePolicies { /// /// Extension methods for configuring with Polly retry, timeout, circuit breaker policies. @@ -30,7 +30,7 @@ public static IHttpClientBuilder AddJsonClient defaultClient = (client) => + Action defaultClient = (client) => { client.BaseAddress = baseAddress; client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); diff --git a/src/Dodo.HttpClient.ResiliencePolicies/HttpClientSettings.cs b/src/Dodo.HttpClient.ResiliencePolicies/HttpClientSettings.cs index ee5a4aa..1fbfcc4 100644 --- a/src/Dodo.HttpClient.ResiliencePolicies/HttpClientSettings.cs +++ b/src/Dodo.HttpClient.ResiliencePolicies/HttpClientSettings.cs @@ -1,8 +1,8 @@ using System; -using Dodo.HttpClient.ResiliencePolicies.CircuitBreakerSettings; -using Dodo.HttpClient.ResiliencePolicies.RetrySettings; +using Dodo.HttpClientResiliencePolicies.CircuitBreakerSettings; +using Dodo.HttpClientResiliencePolicies.RetrySettings; -namespace Dodo.HttpClient.ResiliencePolicies +namespace Dodo.HttpClientResiliencePolicies { public class HttpClientSettings { @@ -17,7 +17,7 @@ public HttpClientSettings( TimeSpan timeoutPerTry, int retryCount) : this(httpClientTimeout, timeoutPerTry, new JitterRetrySettings(retryCount), - ResiliencePolicies.CircuitBreakerSettings.CircuitBreakerSettings.Default()) + HttpClientResiliencePolicies.CircuitBreakerSettings.CircuitBreakerSettings.Default()) { } @@ -46,7 +46,7 @@ public HttpClientSettings( public static HttpClientSettings Default() => new HttpClientSettings( JitterRetrySettings.Default(), - ResiliencePolicies.CircuitBreakerSettings.CircuitBreakerSettings.Default() + HttpClientResiliencePolicies.CircuitBreakerSettings.CircuitBreakerSettings.Default() ); } } diff --git a/src/Dodo.HttpClient.ResiliencePolicies/RetrySettings/IRetrySettings.cs b/src/Dodo.HttpClient.ResiliencePolicies/RetrySettings/IRetrySettings.cs index c63f015..22d698c 100644 --- a/src/Dodo.HttpClient.ResiliencePolicies/RetrySettings/IRetrySettings.cs +++ b/src/Dodo.HttpClient.ResiliencePolicies/RetrySettings/IRetrySettings.cs @@ -2,7 +2,7 @@ using System.Net.Http; using Polly; -namespace Dodo.HttpClient.ResiliencePolicies.RetrySettings +namespace Dodo.HttpClientResiliencePolicies.RetrySettings { public interface IRetrySettings { diff --git a/src/Dodo.HttpClient.ResiliencePolicies/RetrySettings/JitterRetrySettings.cs b/src/Dodo.HttpClient.ResiliencePolicies/RetrySettings/JitterRetrySettings.cs index 7b5bd7c..ce1ef7d 100644 --- a/src/Dodo.HttpClient.ResiliencePolicies/RetrySettings/JitterRetrySettings.cs +++ b/src/Dodo.HttpClient.ResiliencePolicies/RetrySettings/JitterRetrySettings.cs @@ -4,7 +4,7 @@ using Polly; using Polly.Contrib.WaitAndRetry; -namespace Dodo.HttpClient.ResiliencePolicies.RetrySettings +namespace Dodo.HttpClientResiliencePolicies.RetrySettings { public class JitterRetrySettings : IRetrySettings { diff --git a/src/Dodo.HttpClient.ResiliencePolicies/RetrySettings/SimpleRetrySettings.cs b/src/Dodo.HttpClient.ResiliencePolicies/RetrySettings/SimpleRetrySettings.cs index e9da168..59c4364 100644 --- a/src/Dodo.HttpClient.ResiliencePolicies/RetrySettings/SimpleRetrySettings.cs +++ b/src/Dodo.HttpClient.ResiliencePolicies/RetrySettings/SimpleRetrySettings.cs @@ -2,7 +2,7 @@ using System.Net.Http; using Polly; -namespace Dodo.HttpClient.ResiliencePolicies.RetrySettings +namespace Dodo.HttpClientResiliencePolicies.RetrySettings { public class SimpleRetrySettings : IRetrySettings {