From 03a77c1139e2f672805599005b7e646bd86e15d6 Mon Sep 17 00:00:00 2001 From: Simon Cropp Date: Mon, 9 Jan 2023 22:00:51 +1100 Subject: [PATCH] Move to implicit usings (#1006) --- src/Directory.Build.props | 39 +++++++++++++++++++ src/Polly.Benchmarks/Bulkhead.cs | 6 +-- src/Polly.Benchmarks/Cache.cs | 7 +--- src/Polly.Benchmarks/CircuitBreaker.cs | 7 +--- src/Polly.Benchmarks/Fallback.cs | 6 +-- src/Polly.Benchmarks/NoOp.cs | 6 +-- src/Polly.Benchmarks/PolicyWrap.cs | 7 +--- src/Polly.Benchmarks/PollyConfig.cs | 5 +-- src/Polly.Benchmarks/Program.cs | 5 +-- src/Polly.Benchmarks/RateLimit.cs | 6 +-- src/Polly.Benchmarks/Retry.cs | 7 +--- src/Polly.Benchmarks/Timeout.cs | 7 +--- src/Polly.Benchmarks/Workloads.cs | 6 +-- .../Bulkhead/BulkheadAsyncSpecs.cs | 12 +----- src/Polly.Specs/Bulkhead/BulkheadScenarios.cs | 5 +-- src/Polly.Specs/Bulkhead/BulkheadSpecs.cs | 10 +---- src/Polly.Specs/Bulkhead/BulkheadSpecsBase.cs | 13 +------ .../Bulkhead/BulkheadTResultAsyncSpecs.cs | 13 +------ .../Bulkhead/BulkheadTResultSpecs.cs | 13 +------ .../Bulkhead/IBulkheadPolicySpecs.cs | 6 +-- src/Polly.Specs/Caching/AbsoluteTtlSpecs.cs | 9 +---- src/Polly.Specs/Caching/CacheAsyncSpecs.cs | 12 +----- src/Polly.Specs/Caching/CacheSpecs.cs | 12 +----- .../Caching/CacheTResultAsyncSpecs.cs | 12 +----- src/Polly.Specs/Caching/CacheTResultSpecs.cs | 12 +----- src/Polly.Specs/Caching/ContextualTtlSpecs.cs | 8 +--- .../Caching/DefaultCacheKeyStrategySpecs.cs | 6 +-- .../Caching/GenericCacheProviderAsyncSpecs.cs | 12 +----- .../Caching/GenericCacheProviderSpecs.cs | 10 +---- src/Polly.Specs/Caching/RelativeTtlSpecs.cs | 8 +--- src/Polly.Specs/Caching/ResultTtlSpecs.cs | 7 +--- .../SerializingCacheProviderAsyncSpecs.cs | 11 +----- .../Caching/SerializingCacheProviderSpecs.cs | 9 +---- src/Polly.Specs/Caching/SlidingTtlSpecs.cs | 7 +--- .../AdvancedCircuitBreakerAsyncSpecs.cs | 13 +------ .../AdvancedCircuitBreakerSpecs.cs | 13 +------ .../CircuitBreakerAsyncSpecs.cs | 13 +------ .../CircuitBreaker/CircuitBreakerSpecs.cs | 13 +------ .../CircuitBreakerTResultAsyncSpecs.cs | 13 +------ ...BreakerTResultMixedResultExceptionSpecs.cs | 10 +---- .../CircuitBreakerTResultSpecs.cs | 13 +------ .../ICircuitBreakerPolicySpecs.cs | 7 +--- .../ICircuitBreakerPolicyTResultSpecs.cs | 8 +--- src/Polly.Specs/ContextSpecs.cs | 7 +--- src/Polly.Specs/Custom/CustomAsyncSpecs.cs | 9 +---- src/Polly.Specs/Custom/CustomSpecs.cs | 8 +--- .../Custom/CustomTResultAsyncSpecs.cs | 10 +---- src/Polly.Specs/Custom/CustomTResultSpecs.cs | 9 +---- .../Fallback/FallbackAsyncSpecs.cs | 11 +----- src/Polly.Specs/Fallback/FallbackSpecs.cs | 10 +---- .../Fallback/FallbackTResultAsyncSpecs.cs | 11 +----- .../Fallback/FallbackTResultSpecs.cs | 10 +---- .../Helpers/Bulkhead/AnnotatedOutputHelper.cs | 8 +--- .../Helpers/Bulkhead/AssertionFailure.cs | 4 +- .../Helpers/Bulkhead/SilentOutputHelper.cs | 4 +- .../Helpers/Bulkhead/TraceableAction.cs | 8 +--- .../Helpers/Caching/StubCacheKeyStrategy.cs | 5 +-- .../Helpers/Caching/StubCacheProvider.cs | 9 +---- .../Caching/StubErroringCacheProvider.cs | 8 +--- .../Helpers/Caching/StubSerializer.cs | 5 +-- .../Helpers/ContextualPolicyExtensions.cs | 5 +-- .../ContextualPolicyExtensionsAsync.cs | 8 +--- .../ContextualPolicyTResultExtensions.cs | 6 +-- .../ContextualPolicyTResultExtensionsAsync.cs | 8 +--- .../AddBehaviourIfHandleEngine.cs | 6 +-- .../AddBehaviourIfHandlePolicy.cs | 5 +-- .../AddBehaviourIfHandleSyntax.cs | 4 +- .../AsyncAddBehaviourIfHandleEngine.cs | 7 +--- .../AsyncAddBehaviourIfHandlePolicy.cs | 5 +-- .../AsyncAddBehaviourIfHandleSyntax.cs | 5 +-- .../PreExecute/AsyncPreExecuteEngine.cs | 6 +-- .../PreExecute/AsyncPreExecutePolicy.cs | 6 +-- .../Custom/PreExecute/PreExecuteEngine.cs | 5 +-- .../Custom/PreExecute/PreExecutePolicy.cs | 5 +-- src/Polly.Specs/Helpers/ObjectExtensions.cs | 6 +-- src/Polly.Specs/Helpers/PolicyExtensions.cs | 5 +-- .../Helpers/PolicyExtensionsAsync.cs | 7 +--- .../Helpers/PolicyTResultExtensions.cs | 6 +-- .../Helpers/PolicyTResultExtensionsAsync.cs | 8 +--- .../RateLimit/IRateLimiterExtensions.cs | 6 +-- .../RateLimit/ResultClassWithRetryAfter.cs | 4 +- .../IAsyncPolicyExtensionsSpecs.cs | 9 +---- src/Polly.Specs/ISyncPolicyExtensionsSpecs.cs | 8 +--- src/Polly.Specs/NoOp/NoOpAsyncSpecs.cs | 8 +--- src/Polly.Specs/NoOp/NoOpSpecs.cs | 7 +--- src/Polly.Specs/NoOp/NoOpTResultAsyncSpecs.cs | 9 +---- src/Polly.Specs/NoOp/NoOpTResultSpecs.cs | 7 +--- src/Polly.Specs/PolicyAsyncSpecs.cs | 9 +---- .../PolicyContextAndKeyAsyncSpecs.cs | 9 +---- src/Polly.Specs/PolicyContextAndKeySpecs.cs | 7 +--- src/Polly.Specs/PolicySpecs.cs | 7 +--- src/Polly.Specs/PolicyTResultAsyncSpecs.cs | 9 +---- src/Polly.Specs/PolicyTResultSpecs.cs | 8 +--- src/Polly.Specs/Polly.Specs.csproj | 4 +- .../RateLimit/AsyncRateLimitPolicySpecs.cs | 10 +---- .../AsyncRateLimitPolicyTResultSpecs.cs | 10 +---- .../LockFreeTokenBucketRateLimiterTests.cs | 5 +-- .../RateLimit/RateLimitPolicySpecs.cs | 9 +---- .../RateLimit/RateLimitPolicySpecsBase.cs | 10 +---- .../RateLimit/RateLimitPolicyTResultSpecs.cs | 9 +---- .../RateLimitPolicyTResultSpecsBase.cs | 9 +---- .../RateLimit/RateLimitSpecsBase.cs | 9 +---- .../TokenBucketRateLimiterTestsBase.cs | 12 +----- .../Registry/ConcurrentPolicyRegistrySpecs.cs | 9 +---- .../Registry/PolicyRegistrySpecs.cs | 12 +----- .../Registry/ReadOnlyPolicyRegistrySpecs.cs | 10 +---- src/Polly.Specs/Retry/RetryAsyncSpecs.cs | 13 +------ .../Retry/RetryForeverAsyncSpecs.cs | 13 +------ src/Polly.Specs/Retry/RetryForeverSpecs.cs | 10 +---- src/Polly.Specs/Retry/RetrySpecs.cs | 10 +---- .../RetryTResultMixedResultExceptionSpecs.cs | 7 +--- src/Polly.Specs/Retry/RetryTResultSpecs.cs | 11 +----- .../Retry/RetryTResultSpecsAsync.cs | 12 +----- .../Retry/WaitAndRetryAsyncSpecs.cs | 15 +------ .../Retry/WaitAndRetryForeverAsyncSpecs.cs | 14 +------ .../Retry/WaitAndRetryForeverSpecs.cs | 11 +----- .../WaitAndRetryForeverTResultAsyncSpecs.cs | 11 +----- .../Retry/WaitAndRetryForeverTResultSpecs.cs | 10 +---- src/Polly.Specs/Retry/WaitAndRetrySpecs.cs | 14 +------ .../Retry/WaitAndRetryTResultAsyncSpecs.cs | 11 +----- .../Retry/WaitAndRetryTResultSpecs.cs | 10 +---- src/Polly.Specs/Timeout/TimeoutAsyncSpecs.cs | 12 +----- src/Polly.Specs/Timeout/TimeoutSpecs.cs | 12 +----- src/Polly.Specs/Timeout/TimeoutSpecsBase.cs | 6 +-- .../Timeout/TimeoutTResultAsyncSpecs.cs | 12 +----- .../Timeout/TimeoutTResultSpecs.cs | 12 +----- .../Wrap/IPolicyWrapExtensionSpecs.cs | 12 +----- .../Wrap/PolicyWrapContextAndKeySpecs.cs | 7 +--- .../Wrap/PolicyWrapContextAndKeySpecsAsync.cs | 9 +---- src/Polly.Specs/Wrap/PolicyWrapSpecs.cs | 10 +---- src/Polly.Specs/Wrap/PolicyWrapSpecsAsync.cs | 10 +---- src/Polly/AsyncPolicy.ExecuteOverloads.cs | 8 +--- .../AsyncPolicy.GenericImplementation.cs | 6 +-- .../AsyncPolicy.NonGenericImplementation.cs | 7 +--- .../AsyncPolicy.TResult.ExecuteOverloads.cs | 8 +--- src/Polly/Bulkhead/AsyncBulkheadEngine.cs | 6 +-- src/Polly/Bulkhead/AsyncBulkheadPolicy.cs | 7 +--- src/Polly/Bulkhead/AsyncBulkheadSyntax.cs | 5 --- .../Bulkhead/AsyncBulkheadTResultSyntax.cs | 7 +--- src/Polly/Bulkhead/BulkheadEngine.cs | 5 +-- src/Polly/Bulkhead/BulkheadPolicy.cs | 6 +-- .../Bulkhead/BulkheadRejectedException.cs | 3 +- .../Bulkhead/BulkheadSemaphoreFactory.cs | 4 +- src/Polly/Bulkhead/BulkheadSyntax.cs | 5 +-- src/Polly/Bulkhead/BulkheadTResultSyntax.cs | 5 +-- src/Polly/Bulkhead/IBulkheadPolicy.cs | 4 +- src/Polly/Caching/AbsoluteTtl.cs | 4 +- src/Polly/Caching/AsyncCacheEngine.cs | 6 +-- src/Polly/Caching/AsyncCachePolicy.cs | 7 +--- src/Polly/Caching/AsyncCacheSyntax.cs | 5 +-- src/Polly/Caching/AsyncCacheTResultSyntax.cs | 5 +-- .../Caching/AsyncGenericCacheProvider.cs | 6 +-- .../Caching/AsyncSerializingCacheProvider.cs | 6 +-- src/Polly/Caching/CacheEngine.cs | 5 +-- src/Polly/Caching/CachePolicy.cs | 6 +-- src/Polly/Caching/CacheSyntax.cs | 5 +-- src/Polly/Caching/CacheTResultSyntax.cs | 5 +-- src/Polly/Caching/ContextualTtl.cs | 4 +- src/Polly/Caching/GenericCacheProvider.cs | 4 +- src/Polly/Caching/GenericTtlStrategy.cs | 4 +- src/Polly/Caching/IAsyncCacheProvider.cs | 5 +-- src/Polly/Caching/NonSlidingTtl.cs | 5 +-- src/Polly/Caching/RelativeTtl.cs | 4 +- src/Polly/Caching/ResultTtl.cs | 4 +- src/Polly/Caching/SerializingCacheProvider.cs | 4 +- src/Polly/Caching/SlidingTtl.cs | 4 +- src/Polly/Caching/Ttl.cs | 4 +- .../AdvancedCircuitBreakerSyntax.cs | 4 -- .../AdvancedCircuitBreakerTResultSyntax.cs | 6 +-- .../AdvancedCircuitController.cs | 5 +-- .../AsyncAdvancedCircuitBreakerSyntax.cs | 6 +-- ...syncAdvancedCircuitBreakerTResultSyntax.cs | 4 -- .../AsyncCircuitBreakerEngine.cs | 7 +--- .../AsyncCircuitBreakerPolicy.cs | 8 +--- .../AsyncCircuitBreakerSyntax.cs | 6 +-- .../AsyncCircuitBreakerTResultSyntax.cs | 5 +-- .../CircuitBreaker/BrokenCircuitException.cs | 4 +- .../CircuitBreaker/CircuitBreakerEngine.cs | 4 +- .../CircuitBreaker/CircuitBreakerPolicy.cs | 7 +--- .../CircuitBreaker/CircuitBreakerSyntax.cs | 4 -- .../CircuitBreakerTResultSyntax.cs | 5 +-- .../CircuitBreaker/CircuitStateController.cs | 6 +-- .../ConsecutiveCountCircuitController.cs | 5 +-- .../CircuitBreaker/ICircuitBreakerPolicy.cs | 4 +- .../CircuitBreaker/ICircuitController.cs | 4 +- .../IsolatedCircuitException.cs | 1 - .../CircuitBreaker/RollingHealthMetrics.cs | 6 +-- .../CircuitBreaker/SingleHealthMetrics.cs | 5 +-- src/Polly/Context.Dictionary.cs | 6 +-- src/Polly/Context.cs | 5 +-- src/Polly/DelegateResult.cs | 4 +- src/Polly/ExceptionPredicate.cs | 4 +- src/Polly/ExceptionPredicates.cs | 6 +-- src/Polly/ExecutionRejectedException.cs | 3 +- src/Polly/Fallback/AsyncFallbackEngine.cs | 6 +-- src/Polly/Fallback/AsyncFallbackPolicy.cs | 8 +--- src/Polly/Fallback/AsyncFallbackSyntax.cs | 8 +--- src/Polly/Fallback/FallbackEngine.cs | 5 +-- src/Polly/Fallback/FallbackPolicy.cs | 7 +--- src/Polly/Fallback/FallbackSyntax.cs | 6 +-- src/Polly/IAsyncPolicy.TResult.cs | 7 +--- src/Polly/IAsyncPolicy.cs | 7 +--- src/Polly/ISyncPolicy.TResult.cs | 6 +-- src/Polly/ISyncPolicy.cs | 6 +-- src/Polly/NoOp/AsyncNoOpPolicy.cs | 7 +--- src/Polly/NoOp/AsyncNoOpSyntax.cs | 4 +- src/Polly/NoOp/AsyncNoOpTResultSyntax.cs | 4 +- src/Polly/NoOp/NoOpEngine.cs | 5 +-- src/Polly/NoOp/NoOpEngineAsync.cs | 6 +-- src/Polly/NoOp/NoOpPolicy.cs | 6 +-- src/Polly/NoOp/NoOpSyntax.cs | 4 +- src/Polly/NoOp/NoOpTResultSyntax.cs | 4 +- src/Polly/Policy.ExecuteOverloads.cs | 7 +--- src/Polly/Policy.HandleSyntax.cs | 4 +- src/Polly/Policy.SyncGenericImplementation.cs | 5 +-- .../Policy.SyncNonGenericImplementation.cs | 7 +--- src/Polly/Policy.TResult.ExecuteOverloads.cs | 8 +--- src/Polly/PolicyBase.ContextAndKeys.cs | 5 +-- src/Polly/PolicyBase.cs | 5 +-- src/Polly/PolicyBuilder.OrSyntax.cs | 4 +- src/Polly/PolicyBuilder.cs | 3 +- src/Polly/PolicyResult.cs | 4 +- src/Polly/Polly.csproj | 1 + src/Polly/RateLimit/AsyncRateLimitEngine.cs | 6 +-- src/Polly/RateLimit/AsyncRateLimitPolicy.cs | 7 +--- src/Polly/RateLimit/AsyncRateLimitSyntax.cs | 5 +-- .../RateLimit/AsyncRateLimitTResultSyntax.cs | 5 +-- src/Polly/RateLimit/IRateLimiter.cs | 4 +- .../LockFreeTokenBucketRateLimiter.cs | 6 +-- src/Polly/RateLimit/RateLimitEngine.cs | 5 +-- src/Polly/RateLimit/RateLimitPolicy.cs | 6 +-- .../RateLimit/RateLimitRejectedException.cs | 3 +- src/Polly/RateLimit/RateLimitSyntax.cs | 5 +-- src/Polly/RateLimit/RateLimitTResultSyntax.cs | 5 +-- src/Polly/RateLimit/RateLimiterFactory.cs | 4 +- .../Registry/IConcurrentPolicyRegistry.cs | 4 +- src/Polly/Registry/IPolicyRegistry.cs | 5 +-- src/Polly/Registry/IReadOnlyPolicyRegistry.cs | 5 +-- src/Polly/Registry/PolicyRegistry.cs | 7 +--- src/Polly/ResultPredicates.cs | 5 +-- src/Polly/Retry/AsyncRetryEngine.cs | 8 +--- src/Polly/Retry/AsyncRetryPolicy.cs | 8 +--- src/Polly/Retry/AsyncRetrySyntax.cs | 8 +--- src/Polly/Retry/AsyncRetryTResultSyntax.cs | 8 +--- src/Polly/Retry/RetryEngine.cs | 7 +--- src/Polly/Retry/RetryPolicy.cs | 7 +--- src/Polly/Retry/RetrySyntax.cs | 7 +--- src/Polly/Retry/RetryTResultSyntax.cs | 7 +--- src/Polly/Timeout/AsyncTimeoutEngine.cs | 7 +--- src/Polly/Timeout/AsyncTimeoutPolicy.cs | 7 +--- src/Polly/Timeout/AsyncTimeoutSyntax.cs | 7 +--- .../Timeout/AsyncTimeoutTResultSyntax.cs | 6 +-- src/Polly/Timeout/TimeoutEngine.cs | 6 +-- src/Polly/Timeout/TimeoutPolicy.cs | 7 +--- src/Polly/Timeout/TimeoutRejectedException.cs | 3 +- src/Polly/Timeout/TimeoutStrategy.cs | 4 +- src/Polly/Timeout/TimeoutSyntax.cs | 6 +-- src/Polly/Timeout/TimeoutTResultSyntax.cs | 6 +-- src/Polly/Timeout/TimeoutValidator.cs | 4 +- src/Polly/Utilities/ExceptionExtensions.cs | 3 +- src/Polly/Utilities/KeyHelper.cs | 4 +- src/Polly/Utilities/SystemClock.cs | 6 +-- src/Polly/Utilities/TaskHelper.cs | 4 +- src/Polly/Utilities/TimedLock.cs | 5 +-- src/Polly/Wrap/AsyncPolicyWrap.cs | 7 +--- src/Polly/Wrap/AsyncPolicyWrapEngine.cs | 6 +-- src/Polly/Wrap/AsyncPolicyWrapSyntax.cs | 6 +-- src/Polly/Wrap/IPolicyWrapExtension.cs | 6 +-- src/Polly/Wrap/PolicyWrap.cs | 6 +-- src/Polly/Wrap/PolicyWrapEngine.cs | 5 +-- src/Polly/Wrap/PolicyWrapSyntax.cs | 6 +-- 271 files changed, 304 insertions(+), 1623 deletions(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 5741c4eef7..4c5ff314cf 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -4,5 +4,44 @@ ..\Polly.snk true latest + enable + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Polly.Benchmarks/Bulkhead.cs b/src/Polly.Benchmarks/Bulkhead.cs index 4225e79c8e..05575af870 100644 --- a/src/Polly.Benchmarks/Bulkhead.cs +++ b/src/Polly.Benchmarks/Bulkhead.cs @@ -1,8 +1,4 @@ -using System.Threading; -using System.Threading.Tasks; -using BenchmarkDotNet.Attributes; - -namespace Polly.Benchmarks; +namespace Polly.Benchmarks; [Config(typeof(PollyConfig))] public class Bulkhead diff --git a/src/Polly.Benchmarks/Cache.cs b/src/Polly.Benchmarks/Cache.cs index d03c0b106d..83531d4df2 100644 --- a/src/Polly.Benchmarks/Cache.cs +++ b/src/Polly.Benchmarks/Cache.cs @@ -1,9 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using BenchmarkDotNet.Attributes; -using Microsoft.Extensions.Caching.Memory; -using Polly.Caching; +using Microsoft.Extensions.Caching.Memory; namespace Polly.Benchmarks; diff --git a/src/Polly.Benchmarks/CircuitBreaker.cs b/src/Polly.Benchmarks/CircuitBreaker.cs index f5df19f4f4..06c7588744 100644 --- a/src/Polly.Benchmarks/CircuitBreaker.cs +++ b/src/Polly.Benchmarks/CircuitBreaker.cs @@ -1,9 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using BenchmarkDotNet.Attributes; - -namespace Polly.Benchmarks; +namespace Polly.Benchmarks; [Config(typeof(PollyConfig))] public class CircuitBreaker diff --git a/src/Polly.Benchmarks/Fallback.cs b/src/Polly.Benchmarks/Fallback.cs index 0745804f1c..cd362be00d 100644 --- a/src/Polly.Benchmarks/Fallback.cs +++ b/src/Polly.Benchmarks/Fallback.cs @@ -1,8 +1,4 @@ -using System; -using System.Threading.Tasks; -using BenchmarkDotNet.Attributes; - -namespace Polly.Benchmarks; +namespace Polly.Benchmarks; [Config(typeof(PollyConfig))] public class Fallback diff --git a/src/Polly.Benchmarks/NoOp.cs b/src/Polly.Benchmarks/NoOp.cs index ffa53e8512..969ba96657 100644 --- a/src/Polly.Benchmarks/NoOp.cs +++ b/src/Polly.Benchmarks/NoOp.cs @@ -1,8 +1,4 @@ -using System.Threading; -using System.Threading.Tasks; -using BenchmarkDotNet.Attributes; - -namespace Polly.Benchmarks; +namespace Polly.Benchmarks; [Config(typeof(PollyConfig))] public class NoOp diff --git a/src/Polly.Benchmarks/PolicyWrap.cs b/src/Polly.Benchmarks/PolicyWrap.cs index 91deaa132e..10cf6c91e9 100644 --- a/src/Polly.Benchmarks/PolicyWrap.cs +++ b/src/Polly.Benchmarks/PolicyWrap.cs @@ -1,9 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using BenchmarkDotNet.Attributes; - -namespace Polly.Benchmarks; +namespace Polly.Benchmarks; [Config(typeof(PollyConfig))] public class PolicyWrap diff --git a/src/Polly.Benchmarks/PollyConfig.cs b/src/Polly.Benchmarks/PollyConfig.cs index 03218e70c2..2fd15a77ac 100644 --- a/src/Polly.Benchmarks/PollyConfig.cs +++ b/src/Polly.Benchmarks/PollyConfig.cs @@ -1,7 +1,4 @@ -using BenchmarkDotNet.Configs; -using BenchmarkDotNet.Jobs; - -namespace Polly.Benchmarks; +namespace Polly.Benchmarks; internal class PollyConfig : ManualConfig { diff --git a/src/Polly.Benchmarks/Program.cs b/src/Polly.Benchmarks/Program.cs index 1fd45abca7..33f1d0b963 100644 --- a/src/Polly.Benchmarks/Program.cs +++ b/src/Polly.Benchmarks/Program.cs @@ -1,4 +1 @@ -using System.Reflection; -using BenchmarkDotNet.Running; - -BenchmarkRunner.Run(Assembly.GetCallingAssembly(), args: args); +BenchmarkRunner.Run(Assembly.GetCallingAssembly(), args: args); diff --git a/src/Polly.Benchmarks/RateLimit.cs b/src/Polly.Benchmarks/RateLimit.cs index 85978b8794..19be6bdcef 100644 --- a/src/Polly.Benchmarks/RateLimit.cs +++ b/src/Polly.Benchmarks/RateLimit.cs @@ -1,8 +1,4 @@ -using System; -using System.Threading.Tasks; -using BenchmarkDotNet.Attributes; - -namespace Polly.Benchmarks; +namespace Polly.Benchmarks; [Config(typeof(PollyConfig))] public class RateLimit diff --git a/src/Polly.Benchmarks/Retry.cs b/src/Polly.Benchmarks/Retry.cs index a611072a90..f05dbbe39a 100644 --- a/src/Polly.Benchmarks/Retry.cs +++ b/src/Polly.Benchmarks/Retry.cs @@ -1,9 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using BenchmarkDotNet.Attributes; - -namespace Polly.Benchmarks; +namespace Polly.Benchmarks; [Config(typeof(PollyConfig))] public class Retry diff --git a/src/Polly.Benchmarks/Timeout.cs b/src/Polly.Benchmarks/Timeout.cs index 83f8e3d5ee..6b69b18d21 100644 --- a/src/Polly.Benchmarks/Timeout.cs +++ b/src/Polly.Benchmarks/Timeout.cs @@ -1,9 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using BenchmarkDotNet.Attributes; - -namespace Polly.Benchmarks; +namespace Polly.Benchmarks; [Config(typeof(PollyConfig))] public class Timeout diff --git a/src/Polly.Benchmarks/Workloads.cs b/src/Polly.Benchmarks/Workloads.cs index b1868c70e5..bee708a316 100644 --- a/src/Polly.Benchmarks/Workloads.cs +++ b/src/Polly.Benchmarks/Workloads.cs @@ -1,8 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; - -namespace Polly.Benchmarks; +namespace Polly.Benchmarks; internal static class Workloads { diff --git a/src/Polly.Specs/Bulkhead/BulkheadAsyncSpecs.cs b/src/Polly.Specs/Bulkhead/BulkheadAsyncSpecs.cs index 655d7de4b2..aff108e6ad 100644 --- a/src/Polly.Specs/Bulkhead/BulkheadAsyncSpecs.cs +++ b/src/Polly.Specs/Bulkhead/BulkheadAsyncSpecs.cs @@ -1,14 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using Polly.Bulkhead; -using Polly.Specs.Helpers.Bulkhead; -using FluentAssertions; -using Polly.Utilities; -using Xunit; -using Xunit.Abstractions; - -namespace Polly.Specs.Bulkhead; +namespace Polly.Specs.Bulkhead; [Collection(Helpers.Constants.ParallelThreadDependentTestCollection)] public class BulkheadAsyncSpecs : BulkheadSpecsBase diff --git a/src/Polly.Specs/Bulkhead/BulkheadScenarios.cs b/src/Polly.Specs/Bulkhead/BulkheadScenarios.cs index 69d3e930b9..d84471128c 100644 --- a/src/Polly.Specs/Bulkhead/BulkheadScenarios.cs +++ b/src/Polly.Specs/Bulkhead/BulkheadScenarios.cs @@ -1,7 +1,4 @@ -using System.Collections; -using System.Collections.Generic; - -namespace Polly.Specs.Bulkhead; +namespace Polly.Specs.Bulkhead; /// /// A set of test scenarios used in all BulkheadPolicy tests. diff --git a/src/Polly.Specs/Bulkhead/BulkheadSpecs.cs b/src/Polly.Specs/Bulkhead/BulkheadSpecs.cs index b48090cb08..61c9d6ea8a 100644 --- a/src/Polly.Specs/Bulkhead/BulkheadSpecs.cs +++ b/src/Polly.Specs/Bulkhead/BulkheadSpecs.cs @@ -1,12 +1,4 @@ -using System; -using System.Threading.Tasks; -using Polly.Bulkhead; -using Polly.Specs.Helpers.Bulkhead; -using FluentAssertions; -using Xunit; -using Xunit.Abstractions; - -namespace Polly.Specs.Bulkhead; +namespace Polly.Specs.Bulkhead; [Collection(Helpers.Constants.ParallelThreadDependentTestCollection)] public class BulkheadSpecs : BulkheadSpecsBase diff --git a/src/Polly.Specs/Bulkhead/BulkheadSpecsBase.cs b/src/Polly.Specs/Bulkhead/BulkheadSpecsBase.cs index fcb224aa78..7a230656ee 100644 --- a/src/Polly.Specs/Bulkhead/BulkheadSpecsBase.cs +++ b/src/Polly.Specs/Bulkhead/BulkheadSpecsBase.cs @@ -1,15 +1,4 @@ -using System; -using System.Diagnostics; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.Bulkhead; -using Polly.Specs.Helpers.Bulkhead; -using Xunit; -using Xunit.Abstractions; - -namespace Polly.Specs.Bulkhead; +namespace Polly.Specs.Bulkhead; [Collection(Helpers.Constants.ParallelThreadDependentTestCollection)] public abstract class BulkheadSpecsBase : IDisposable diff --git a/src/Polly.Specs/Bulkhead/BulkheadTResultAsyncSpecs.cs b/src/Polly.Specs/Bulkhead/BulkheadTResultAsyncSpecs.cs index 0b22ddf2ec..a00b62f2a3 100644 --- a/src/Polly.Specs/Bulkhead/BulkheadTResultAsyncSpecs.cs +++ b/src/Polly.Specs/Bulkhead/BulkheadTResultAsyncSpecs.cs @@ -1,15 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using Polly.Bulkhead; -using Polly.Specs.Helpers; -using Polly.Specs.Helpers.Bulkhead; -using FluentAssertions; -using Polly.Utilities; -using Xunit; -using Xunit.Abstractions; - -namespace Polly.Specs.Bulkhead; +namespace Polly.Specs.Bulkhead; [Collection(Constants.ParallelThreadDependentTestCollection)] public class BulkheadTResultAsyncSpecs : BulkheadSpecsBase diff --git a/src/Polly.Specs/Bulkhead/BulkheadTResultSpecs.cs b/src/Polly.Specs/Bulkhead/BulkheadTResultSpecs.cs index 513be999ce..e2fd4f3db3 100644 --- a/src/Polly.Specs/Bulkhead/BulkheadTResultSpecs.cs +++ b/src/Polly.Specs/Bulkhead/BulkheadTResultSpecs.cs @@ -1,15 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using Polly.Bulkhead; -using Polly.Specs.Helpers; -using Polly.Specs.Helpers.Bulkhead; - -using FluentAssertions; -using Xunit; -using Xunit.Abstractions; - -namespace Polly.Specs.Bulkhead; +namespace Polly.Specs.Bulkhead; [Collection(Constants.ParallelThreadDependentTestCollection)] public class BulkheadTResultSpecs : BulkheadSpecsBase diff --git a/src/Polly.Specs/Bulkhead/IBulkheadPolicySpecs.cs b/src/Polly.Specs/Bulkhead/IBulkheadPolicySpecs.cs index 4b6d5b1904..56f4c5fbba 100644 --- a/src/Polly.Specs/Bulkhead/IBulkheadPolicySpecs.cs +++ b/src/Polly.Specs/Bulkhead/IBulkheadPolicySpecs.cs @@ -1,8 +1,4 @@ -using FluentAssertions; -using Polly.Bulkhead; -using Xunit; - -namespace Polly.Specs.Bulkhead; +namespace Polly.Specs.Bulkhead; public class IBulkheadPolicySpecs { diff --git a/src/Polly.Specs/Caching/AbsoluteTtlSpecs.cs b/src/Polly.Specs/Caching/AbsoluteTtlSpecs.cs index ebd4c427fd..74e834e8a8 100644 --- a/src/Polly.Specs/Caching/AbsoluteTtlSpecs.cs +++ b/src/Polly.Specs/Caching/AbsoluteTtlSpecs.cs @@ -1,11 +1,4 @@ -using System; -using FluentAssertions; -using Polly.Caching; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.Caching; +namespace Polly.Specs.Caching; [Collection(Constants.SystemClockDependentTestCollection)] public class AbsoluteTtlSpecs : IDisposable diff --git a/src/Polly.Specs/Caching/CacheAsyncSpecs.cs b/src/Polly.Specs/Caching/CacheAsyncSpecs.cs index ad313c59e4..19543f17d0 100644 --- a/src/Polly.Specs/Caching/CacheAsyncSpecs.cs +++ b/src/Polly.Specs/Caching/CacheAsyncSpecs.cs @@ -1,14 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.Caching; -using Polly.Specs.Helpers; -using Polly.Specs.Helpers.Caching; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.Caching; +namespace Polly.Specs.Caching; [Collection(Constants.SystemClockDependentTestCollection)] public class CacheAsyncSpecs : IDisposable diff --git a/src/Polly.Specs/Caching/CacheSpecs.cs b/src/Polly.Specs/Caching/CacheSpecs.cs index 7a9d3ab926..a71a081c20 100644 --- a/src/Polly.Specs/Caching/CacheSpecs.cs +++ b/src/Polly.Specs/Caching/CacheSpecs.cs @@ -1,14 +1,4 @@ -using System; -using System.Threading; -using FluentAssertions; -using Polly.Caching; -using Polly.Specs.Helpers; -using Polly.Specs.Helpers.Caching; -using Polly.Utilities; -using Polly.Wrap; -using Xunit; - -namespace Polly.Specs.Caching; +namespace Polly.Specs.Caching; [Collection(Constants.SystemClockDependentTestCollection)] public class CacheSpecs : IDisposable diff --git a/src/Polly.Specs/Caching/CacheTResultAsyncSpecs.cs b/src/Polly.Specs/Caching/CacheTResultAsyncSpecs.cs index 8eb59528e8..ca18c6f6a4 100644 --- a/src/Polly.Specs/Caching/CacheTResultAsyncSpecs.cs +++ b/src/Polly.Specs/Caching/CacheTResultAsyncSpecs.cs @@ -1,14 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.Caching; -using Polly.Specs.Helpers; -using Polly.Specs.Helpers.Caching; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.Caching; +namespace Polly.Specs.Caching; [Collection(Constants.SystemClockDependentTestCollection)] public class CacheTResultAsyncSpecs : IDisposable diff --git a/src/Polly.Specs/Caching/CacheTResultSpecs.cs b/src/Polly.Specs/Caching/CacheTResultSpecs.cs index 38885bce1c..5e58a64d1b 100644 --- a/src/Polly.Specs/Caching/CacheTResultSpecs.cs +++ b/src/Polly.Specs/Caching/CacheTResultSpecs.cs @@ -1,14 +1,4 @@ -using System; -using System.Threading; -using FluentAssertions; -using Polly.Caching; -using Polly.Specs.Helpers; -using Polly.Specs.Helpers.Caching; -using Polly.Utilities; -using Polly.Wrap; -using Xunit; - -namespace Polly.Specs.Caching; +namespace Polly.Specs.Caching; [Collection(Constants.SystemClockDependentTestCollection)] public class CacheTResultSpecs : IDisposable diff --git a/src/Polly.Specs/Caching/ContextualTtlSpecs.cs b/src/Polly.Specs/Caching/ContextualTtlSpecs.cs index a0318b9993..0ddb4cb8e3 100644 --- a/src/Polly.Specs/Caching/ContextualTtlSpecs.cs +++ b/src/Polly.Specs/Caching/ContextualTtlSpecs.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using FluentAssertions; -using Polly.Caching; -using Xunit; - -namespace Polly.Specs.Caching; +namespace Polly.Specs.Caching; public class ContextualTtlSpecs { diff --git a/src/Polly.Specs/Caching/DefaultCacheKeyStrategySpecs.cs b/src/Polly.Specs/Caching/DefaultCacheKeyStrategySpecs.cs index 53b746e66d..c81162040d 100644 --- a/src/Polly.Specs/Caching/DefaultCacheKeyStrategySpecs.cs +++ b/src/Polly.Specs/Caching/DefaultCacheKeyStrategySpecs.cs @@ -1,8 +1,4 @@ -using FluentAssertions; -using Polly.Caching; -using Xunit; - -namespace Polly.Specs.Caching; +namespace Polly.Specs.Caching; public class DefaultCacheKeyStrategySpecs { diff --git a/src/Polly.Specs/Caching/GenericCacheProviderAsyncSpecs.cs b/src/Polly.Specs/Caching/GenericCacheProviderAsyncSpecs.cs index b8f87b6016..dcff63a2f2 100644 --- a/src/Polly.Specs/Caching/GenericCacheProviderAsyncSpecs.cs +++ b/src/Polly.Specs/Caching/GenericCacheProviderAsyncSpecs.cs @@ -1,14 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.Caching; -using Polly.Specs.Helpers; -using Polly.Specs.Helpers.Caching; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.Caching; +namespace Polly.Specs.Caching; [Collection(Constants.SystemClockDependentTestCollection)] public class GenericCacheProviderAsyncSpecs : IDisposable diff --git a/src/Polly.Specs/Caching/GenericCacheProviderSpecs.cs b/src/Polly.Specs/Caching/GenericCacheProviderSpecs.cs index a5a583a468..114e57623e 100644 --- a/src/Polly.Specs/Caching/GenericCacheProviderSpecs.cs +++ b/src/Polly.Specs/Caching/GenericCacheProviderSpecs.cs @@ -1,12 +1,4 @@ -using System; -using FluentAssertions; -using Polly.Caching; -using Polly.Specs.Helpers; -using Polly.Specs.Helpers.Caching; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.Caching; +namespace Polly.Specs.Caching; [Collection(Constants.SystemClockDependentTestCollection)] public class GenericCacheProviderSpecs : IDisposable diff --git a/src/Polly.Specs/Caching/RelativeTtlSpecs.cs b/src/Polly.Specs/Caching/RelativeTtlSpecs.cs index 815834df3a..0f607debc1 100644 --- a/src/Polly.Specs/Caching/RelativeTtlSpecs.cs +++ b/src/Polly.Specs/Caching/RelativeTtlSpecs.cs @@ -1,10 +1,4 @@ -using System; -using FluentAssertions; -using Polly.Caching; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.Caching; +namespace Polly.Specs.Caching; public class RelativeTtlSpecs { diff --git a/src/Polly.Specs/Caching/ResultTtlSpecs.cs b/src/Polly.Specs/Caching/ResultTtlSpecs.cs index 589a847468..513d032cb3 100644 --- a/src/Polly.Specs/Caching/ResultTtlSpecs.cs +++ b/src/Polly.Specs/Caching/ResultTtlSpecs.cs @@ -1,9 +1,4 @@ -using System; -using FluentAssertions; -using Polly.Caching; -using Xunit; - -namespace Polly.Specs.Caching; +namespace Polly.Specs.Caching; public class ResultTtlSpecs { diff --git a/src/Polly.Specs/Caching/SerializingCacheProviderAsyncSpecs.cs b/src/Polly.Specs/Caching/SerializingCacheProviderAsyncSpecs.cs index 77ab6e3317..c3b7d8e0d4 100644 --- a/src/Polly.Specs/Caching/SerializingCacheProviderAsyncSpecs.cs +++ b/src/Polly.Specs/Caching/SerializingCacheProviderAsyncSpecs.cs @@ -1,13 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.Caching; -using Polly.Specs.Helpers; -using Polly.Specs.Helpers.Caching; -using Xunit; - -namespace Polly.Specs.Caching; +namespace Polly.Specs.Caching; public class AsyncSerializingCacheProviderSpecs { diff --git a/src/Polly.Specs/Caching/SerializingCacheProviderSpecs.cs b/src/Polly.Specs/Caching/SerializingCacheProviderSpecs.cs index 86198843ad..5004d77946 100644 --- a/src/Polly.Specs/Caching/SerializingCacheProviderSpecs.cs +++ b/src/Polly.Specs/Caching/SerializingCacheProviderSpecs.cs @@ -1,11 +1,4 @@ -using System; -using FluentAssertions; -using Polly.Caching; -using Polly.Specs.Helpers; -using Polly.Specs.Helpers.Caching; -using Xunit; - -namespace Polly.Specs.Caching; +namespace Polly.Specs.Caching; public class SerializingCacheProviderSpecs { diff --git a/src/Polly.Specs/Caching/SlidingTtlSpecs.cs b/src/Polly.Specs/Caching/SlidingTtlSpecs.cs index 5539b9361f..5b86d5ccce 100644 --- a/src/Polly.Specs/Caching/SlidingTtlSpecs.cs +++ b/src/Polly.Specs/Caching/SlidingTtlSpecs.cs @@ -1,9 +1,4 @@ -using System; -using FluentAssertions; -using Polly.Caching; -using Xunit; - -namespace Polly.Specs.Caching; +namespace Polly.Specs.Caching; public class SlidingTtlSpecs { diff --git a/src/Polly.Specs/CircuitBreaker/AdvancedCircuitBreakerAsyncSpecs.cs b/src/Polly.Specs/CircuitBreaker/AdvancedCircuitBreakerAsyncSpecs.cs index 4696d8b789..60e4ab2287 100644 --- a/src/Polly.Specs/CircuitBreaker/AdvancedCircuitBreakerAsyncSpecs.cs +++ b/src/Polly.Specs/CircuitBreaker/AdvancedCircuitBreakerAsyncSpecs.cs @@ -1,15 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using FluentAssertions.Extensions; -using Polly.CircuitBreaker; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - -using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; namespace Polly.Specs.CircuitBreaker; diff --git a/src/Polly.Specs/CircuitBreaker/AdvancedCircuitBreakerSpecs.cs b/src/Polly.Specs/CircuitBreaker/AdvancedCircuitBreakerSpecs.cs index 926af3c491..8420e7fd52 100644 --- a/src/Polly.Specs/CircuitBreaker/AdvancedCircuitBreakerSpecs.cs +++ b/src/Polly.Specs/CircuitBreaker/AdvancedCircuitBreakerSpecs.cs @@ -1,15 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using FluentAssertions.Extensions; -using Polly.CircuitBreaker; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - -using Scenario = Polly.Specs.Helpers.PolicyExtensions.ExceptionAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyExtensions.ExceptionAndOrCancellationScenario; namespace Polly.Specs.CircuitBreaker; diff --git a/src/Polly.Specs/CircuitBreaker/CircuitBreakerAsyncSpecs.cs b/src/Polly.Specs/CircuitBreaker/CircuitBreakerAsyncSpecs.cs index 172415a20d..e8e30dc034 100644 --- a/src/Polly.Specs/CircuitBreaker/CircuitBreakerAsyncSpecs.cs +++ b/src/Polly.Specs/CircuitBreaker/CircuitBreakerAsyncSpecs.cs @@ -1,15 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using FluentAssertions.Extensions; -using Polly.CircuitBreaker; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - -using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; namespace Polly.Specs.CircuitBreaker; diff --git a/src/Polly.Specs/CircuitBreaker/CircuitBreakerSpecs.cs b/src/Polly.Specs/CircuitBreaker/CircuitBreakerSpecs.cs index 28e34d7382..2f27bea5da 100644 --- a/src/Polly.Specs/CircuitBreaker/CircuitBreakerSpecs.cs +++ b/src/Polly.Specs/CircuitBreaker/CircuitBreakerSpecs.cs @@ -1,15 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using FluentAssertions.Extensions; -using Polly.CircuitBreaker; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.CircuitBreaker; +namespace Polly.Specs.CircuitBreaker; [Collection(Constants.SystemClockDependentTestCollection)] public class CircuitBreakerSpecs : IDisposable diff --git a/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultAsyncSpecs.cs b/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultAsyncSpecs.cs index 9fc112e682..13a9656e75 100644 --- a/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultAsyncSpecs.cs +++ b/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultAsyncSpecs.cs @@ -1,15 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using FluentAssertions.Extensions; -using Polly.CircuitBreaker; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - -using Scenario = Polly.Specs.Helpers.PolicyTResultExtensionsAsync.ResultAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyTResultExtensionsAsync.ResultAndOrCancellationScenario; namespace Polly.Specs.CircuitBreaker; diff --git a/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultMixedResultExceptionSpecs.cs b/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultMixedResultExceptionSpecs.cs index c4c34634fa..071dab2b0c 100644 --- a/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultMixedResultExceptionSpecs.cs +++ b/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultMixedResultExceptionSpecs.cs @@ -1,12 +1,4 @@ -using System; -using FluentAssertions; -using FluentAssertions.Extensions; -using Polly.CircuitBreaker; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.CircuitBreaker; +namespace Polly.Specs.CircuitBreaker; [Collection(Constants.SystemClockDependentTestCollection)] public class CircuitBreakerTResultMixedResultExceptionSpecs : IDisposable diff --git a/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultSpecs.cs b/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultSpecs.cs index d69f04bc95..e2b6a60ef2 100644 --- a/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultSpecs.cs +++ b/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultSpecs.cs @@ -1,15 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using FluentAssertions.Extensions; -using Polly.CircuitBreaker; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - -using Scenario = Polly.Specs.Helpers.PolicyTResultExtensions.ResultAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyTResultExtensions.ResultAndOrCancellationScenario; namespace Polly.Specs.CircuitBreaker; diff --git a/src/Polly.Specs/CircuitBreaker/ICircuitBreakerPolicySpecs.cs b/src/Polly.Specs/CircuitBreaker/ICircuitBreakerPolicySpecs.cs index 18c7e1ec95..ce4e3a3188 100644 --- a/src/Polly.Specs/CircuitBreaker/ICircuitBreakerPolicySpecs.cs +++ b/src/Polly.Specs/CircuitBreaker/ICircuitBreakerPolicySpecs.cs @@ -1,9 +1,4 @@ -using System; -using FluentAssertions; -using Polly.CircuitBreaker; -using Xunit; - -namespace Polly.Specs.CircuitBreaker; +namespace Polly.Specs.CircuitBreaker; public class ICircuitBreakerPolicySpecs { diff --git a/src/Polly.Specs/CircuitBreaker/ICircuitBreakerPolicyTResultSpecs.cs b/src/Polly.Specs/CircuitBreaker/ICircuitBreakerPolicyTResultSpecs.cs index a71f36ed73..1c124ed82f 100644 --- a/src/Polly.Specs/CircuitBreaker/ICircuitBreakerPolicyTResultSpecs.cs +++ b/src/Polly.Specs/CircuitBreaker/ICircuitBreakerPolicyTResultSpecs.cs @@ -1,10 +1,4 @@ -using System; -using FluentAssertions; -using Polly.CircuitBreaker; -using Polly.Specs.Helpers; -using Xunit; - -namespace Polly.Specs.CircuitBreaker; +namespace Polly.Specs.CircuitBreaker; public class ICircuitBreakerTResultPolicySpecs { diff --git a/src/Polly.Specs/ContextSpecs.cs b/src/Polly.Specs/ContextSpecs.cs index dcdcf1ab03..f4709e8fc2 100644 --- a/src/Polly.Specs/ContextSpecs.cs +++ b/src/Polly.Specs/ContextSpecs.cs @@ -1,9 +1,4 @@ -using System; -using FluentAssertions; -using Polly.Specs.Helpers; -using Xunit; - -namespace Polly.Specs; +namespace Polly.Specs; public class ContextSpecs { diff --git a/src/Polly.Specs/Custom/CustomAsyncSpecs.cs b/src/Polly.Specs/Custom/CustomAsyncSpecs.cs index a639a1ac40..e98c27c47e 100644 --- a/src/Polly.Specs/Custom/CustomAsyncSpecs.cs +++ b/src/Polly.Specs/Custom/CustomAsyncSpecs.cs @@ -1,11 +1,4 @@ -using System; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.Specs.Helpers.Custom.AddBehaviourIfHandle; -using Polly.Specs.Helpers.Custom.PreExecute; -using Xunit; - -namespace Polly.Specs.Custom; +namespace Polly.Specs.Custom; public class CustomAsyncSpecs { diff --git a/src/Polly.Specs/Custom/CustomSpecs.cs b/src/Polly.Specs/Custom/CustomSpecs.cs index 56a391429c..baad67f580 100644 --- a/src/Polly.Specs/Custom/CustomSpecs.cs +++ b/src/Polly.Specs/Custom/CustomSpecs.cs @@ -1,10 +1,4 @@ -using System; -using FluentAssertions; -using Polly.Specs.Helpers.Custom.AddBehaviourIfHandle; -using Polly.Specs.Helpers.Custom.PreExecute; -using Xunit; - -namespace Polly.Specs.Custom; +namespace Polly.Specs.Custom; public class CustomSpecs { diff --git a/src/Polly.Specs/Custom/CustomTResultAsyncSpecs.cs b/src/Polly.Specs/Custom/CustomTResultAsyncSpecs.cs index 32c9809bdf..7eb82ea357 100644 --- a/src/Polly.Specs/Custom/CustomTResultAsyncSpecs.cs +++ b/src/Polly.Specs/Custom/CustomTResultAsyncSpecs.cs @@ -1,12 +1,4 @@ -using System; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.Specs.Helpers; -using Polly.Specs.Helpers.Custom.AddBehaviourIfHandle; -using Polly.Specs.Helpers.Custom.PreExecute; -using Xunit; - -namespace Polly.Specs.Custom; +namespace Polly.Specs.Custom; public class CustomTResultAsyncSpecs { diff --git a/src/Polly.Specs/Custom/CustomTResultSpecs.cs b/src/Polly.Specs/Custom/CustomTResultSpecs.cs index fc737f56e1..0d06120d6a 100644 --- a/src/Polly.Specs/Custom/CustomTResultSpecs.cs +++ b/src/Polly.Specs/Custom/CustomTResultSpecs.cs @@ -1,11 +1,4 @@ -using System; -using FluentAssertions; -using Polly.Specs.Helpers; -using Polly.Specs.Helpers.Custom.AddBehaviourIfHandle; -using Polly.Specs.Helpers.Custom.PreExecute; -using Xunit; - -namespace Polly.Specs.Custom; +namespace Polly.Specs.Custom; public class CustomTResultSpecs { diff --git a/src/Polly.Specs/Fallback/FallbackAsyncSpecs.cs b/src/Polly.Specs/Fallback/FallbackAsyncSpecs.cs index 0b88fd50ba..609460dc58 100644 --- a/src/Polly.Specs/Fallback/FallbackAsyncSpecs.cs +++ b/src/Polly.Specs/Fallback/FallbackAsyncSpecs.cs @@ -1,13 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - -using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; namespace Polly.Specs.Fallback; diff --git a/src/Polly.Specs/Fallback/FallbackSpecs.cs b/src/Polly.Specs/Fallback/FallbackSpecs.cs index b6415e6aa0..7ecb56e4ed 100644 --- a/src/Polly.Specs/Fallback/FallbackSpecs.cs +++ b/src/Polly.Specs/Fallback/FallbackSpecs.cs @@ -1,12 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using FluentAssertions; -using Polly.Fallback; -using Polly.Specs.Helpers; -using Xunit; - -using Scenario = Polly.Specs.Helpers.PolicyExtensions.ExceptionAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyExtensions.ExceptionAndOrCancellationScenario; namespace Polly.Specs.Fallback; diff --git a/src/Polly.Specs/Fallback/FallbackTResultAsyncSpecs.cs b/src/Polly.Specs/Fallback/FallbackTResultAsyncSpecs.cs index 71fddbd8c3..0550c008e4 100644 --- a/src/Polly.Specs/Fallback/FallbackTResultAsyncSpecs.cs +++ b/src/Polly.Specs/Fallback/FallbackTResultAsyncSpecs.cs @@ -1,13 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - -using Scenario = Polly.Specs.Helpers.PolicyTResultExtensionsAsync.ResultAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyTResultExtensionsAsync.ResultAndOrCancellationScenario; namespace Polly.Specs.Fallback; diff --git a/src/Polly.Specs/Fallback/FallbackTResultSpecs.cs b/src/Polly.Specs/Fallback/FallbackTResultSpecs.cs index 177ce2eceb..389ed0ebf6 100644 --- a/src/Polly.Specs/Fallback/FallbackTResultSpecs.cs +++ b/src/Polly.Specs/Fallback/FallbackTResultSpecs.cs @@ -1,12 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using FluentAssertions; -using Polly.Fallback; -using Polly.Specs.Helpers; -using Xunit; - -using Scenario = Polly.Specs.Helpers.PolicyTResultExtensions.ResultAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyTResultExtensions.ResultAndOrCancellationScenario; namespace Polly.Specs.Fallback; diff --git a/src/Polly.Specs/Helpers/Bulkhead/AnnotatedOutputHelper.cs b/src/Polly.Specs/Helpers/Bulkhead/AnnotatedOutputHelper.cs index e71f35972c..8489e04cf9 100644 --- a/src/Polly.Specs/Helpers/Bulkhead/AnnotatedOutputHelper.cs +++ b/src/Polly.Specs/Helpers/Bulkhead/AnnotatedOutputHelper.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Concurrent; -using System.Linq; -using System.Threading; -using Xunit.Abstractions; - -namespace Polly.Specs.Helpers.Bulkhead; +namespace Polly.Specs.Helpers.Bulkhead; public class AnnotatedOutputHelper : ITestOutputHelper { diff --git a/src/Polly.Specs/Helpers/Bulkhead/AssertionFailure.cs b/src/Polly.Specs/Helpers/Bulkhead/AssertionFailure.cs index be90eee919..28d6db9f6a 100644 --- a/src/Polly.Specs/Helpers/Bulkhead/AssertionFailure.cs +++ b/src/Polly.Specs/Helpers/Bulkhead/AssertionFailure.cs @@ -1,6 +1,4 @@ -using System; - -namespace Polly.Specs.Helpers.Bulkhead; +namespace Polly.Specs.Helpers.Bulkhead; public class AssertionFailure { diff --git a/src/Polly.Specs/Helpers/Bulkhead/SilentOutputHelper.cs b/src/Polly.Specs/Helpers/Bulkhead/SilentOutputHelper.cs index 5417f0d1f7..2aa50df288 100644 --- a/src/Polly.Specs/Helpers/Bulkhead/SilentOutputHelper.cs +++ b/src/Polly.Specs/Helpers/Bulkhead/SilentOutputHelper.cs @@ -1,6 +1,4 @@ -using Xunit.Abstractions; - -namespace Polly.Specs.Helpers.Bulkhead; +namespace Polly.Specs.Helpers.Bulkhead; public class SilentOutputHelper : ITestOutputHelper { diff --git a/src/Polly.Specs/Helpers/Bulkhead/TraceableAction.cs b/src/Polly.Specs/Helpers/Bulkhead/TraceableAction.cs index fe851d1d2a..c08fa77d05 100644 --- a/src/Polly.Specs/Helpers/Bulkhead/TraceableAction.cs +++ b/src/Polly.Specs/Helpers/Bulkhead/TraceableAction.cs @@ -1,10 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using Polly.Bulkhead; -using Xunit.Abstractions; - -namespace Polly.Specs.Helpers.Bulkhead; +namespace Polly.Specs.Helpers.Bulkhead; /// /// A traceable action that can be executed on a , to support specs. diff --git a/src/Polly.Specs/Helpers/Caching/StubCacheKeyStrategy.cs b/src/Polly.Specs/Helpers/Caching/StubCacheKeyStrategy.cs index 4203a3c46c..4270f826b1 100644 --- a/src/Polly.Specs/Helpers/Caching/StubCacheKeyStrategy.cs +++ b/src/Polly.Specs/Helpers/Caching/StubCacheKeyStrategy.cs @@ -1,7 +1,4 @@ -using System; -using Polly.Caching; - -namespace Polly.Specs.Helpers.Caching; +namespace Polly.Specs.Helpers.Caching; /// /// A configurable stub ICacheKeyStrategy, to support tests.. diff --git a/src/Polly.Specs/Helpers/Caching/StubCacheProvider.cs b/src/Polly.Specs/Helpers/Caching/StubCacheProvider.cs index c798b47e8b..7863121131 100644 --- a/src/Polly.Specs/Helpers/Caching/StubCacheProvider.cs +++ b/src/Polly.Specs/Helpers/Caching/StubCacheProvider.cs @@ -1,11 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using Polly.Caching; -using Polly.Utilities; - -namespace Polly.Specs.Helpers.Caching; +namespace Polly.Specs.Helpers.Caching; /// /// An intentionally naive stub cache implementation. Its purpose is to be the simplest thing possible to support tests of the CachePolicy and CacheEngine, not a production-usable implementation. diff --git a/src/Polly.Specs/Helpers/Caching/StubErroringCacheProvider.cs b/src/Polly.Specs/Helpers/Caching/StubErroringCacheProvider.cs index 6e855d0a34..dbc41e8d63 100644 --- a/src/Polly.Specs/Helpers/Caching/StubErroringCacheProvider.cs +++ b/src/Polly.Specs/Helpers/Caching/StubErroringCacheProvider.cs @@ -1,10 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using Polly.Caching; -using Polly.Utilities; - -namespace Polly.Specs.Helpers.Caching; +namespace Polly.Specs.Helpers.Caching; internal class StubErroringCacheProvider : ISyncCacheProvider, IAsyncCacheProvider { diff --git a/src/Polly.Specs/Helpers/Caching/StubSerializer.cs b/src/Polly.Specs/Helpers/Caching/StubSerializer.cs index ad81ebab15..66142315bc 100644 --- a/src/Polly.Specs/Helpers/Caching/StubSerializer.cs +++ b/src/Polly.Specs/Helpers/Caching/StubSerializer.cs @@ -1,7 +1,4 @@ -using System; -using Polly.Caching; - -namespace Polly.Specs.Helpers.Caching; +namespace Polly.Specs.Helpers.Caching; /// /// A configurable stub serializer implementation to support tests around serializing cache providers. diff --git a/src/Polly.Specs/Helpers/ContextualPolicyExtensions.cs b/src/Polly.Specs/Helpers/ContextualPolicyExtensions.cs index 74ab5bfa6c..99b7b1fec4 100644 --- a/src/Polly.Specs/Helpers/ContextualPolicyExtensions.cs +++ b/src/Polly.Specs/Helpers/ContextualPolicyExtensions.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; - -namespace Polly.Specs.Helpers; +namespace Polly.Specs.Helpers; public static class ContextualPolicyExtensions { diff --git a/src/Polly.Specs/Helpers/ContextualPolicyExtensionsAsync.cs b/src/Polly.Specs/Helpers/ContextualPolicyExtensionsAsync.cs index 24addf5a92..91ef52516a 100644 --- a/src/Polly.Specs/Helpers/ContextualPolicyExtensionsAsync.cs +++ b/src/Polly.Specs/Helpers/ContextualPolicyExtensionsAsync.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using Polly.Utilities; - -namespace Polly.Specs.Helpers; +namespace Polly.Specs.Helpers; public static class ContextualPolicyExtensionsAsync { diff --git a/src/Polly.Specs/Helpers/ContextualPolicyTResultExtensions.cs b/src/Polly.Specs/Helpers/ContextualPolicyTResultExtensions.cs index 5af5fb11bf..2edb70fbca 100644 --- a/src/Polly.Specs/Helpers/ContextualPolicyTResultExtensions.cs +++ b/src/Polly.Specs/Helpers/ContextualPolicyTResultExtensions.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; - -namespace Polly.Specs.Helpers; +namespace Polly.Specs.Helpers; public static class ContextualPolicyTResultExtensions { diff --git a/src/Polly.Specs/Helpers/ContextualPolicyTResultExtensionsAsync.cs b/src/Polly.Specs/Helpers/ContextualPolicyTResultExtensionsAsync.cs index 666b607f44..32f5a70424 100644 --- a/src/Polly.Specs/Helpers/ContextualPolicyTResultExtensionsAsync.cs +++ b/src/Polly.Specs/Helpers/ContextualPolicyTResultExtensionsAsync.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; - -namespace Polly.Specs.Helpers; +namespace Polly.Specs.Helpers; public static class ContextualPolicyTResultExtensionsAsync { diff --git a/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AddBehaviourIfHandleEngine.cs b/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AddBehaviourIfHandleEngine.cs index 751e9cf0c4..69bc89a1c3 100644 --- a/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AddBehaviourIfHandleEngine.cs +++ b/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AddBehaviourIfHandleEngine.cs @@ -1,8 +1,4 @@ -using System; -using System.Threading; -using Polly.Utilities; - -namespace Polly.Specs.Helpers.Custom.AddBehaviourIfHandle; +namespace Polly.Specs.Helpers.Custom.AddBehaviourIfHandle; internal static class AddBehaviourIfHandleEngine { diff --git a/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AddBehaviourIfHandlePolicy.cs b/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AddBehaviourIfHandlePolicy.cs index d617d3dfca..a00ce2492e 100644 --- a/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AddBehaviourIfHandlePolicy.cs +++ b/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AddBehaviourIfHandlePolicy.cs @@ -1,7 +1,4 @@ -using System; -using System.Threading; - -namespace Polly.Specs.Helpers.Custom.AddBehaviourIfHandle; +namespace Polly.Specs.Helpers.Custom.AddBehaviourIfHandle; internal class AddBehaviourIfHandlePolicy : Policy { diff --git a/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AddBehaviourIfHandleSyntax.cs b/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AddBehaviourIfHandleSyntax.cs index 926de95f81..719f9b7942 100644 --- a/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AddBehaviourIfHandleSyntax.cs +++ b/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AddBehaviourIfHandleSyntax.cs @@ -1,6 +1,4 @@ -using System; - -namespace Polly.Specs.Helpers.Custom.AddBehaviourIfHandle; +namespace Polly.Specs.Helpers.Custom.AddBehaviourIfHandle; internal static class AddBehaviourIfHandleSyntax { diff --git a/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AsyncAddBehaviourIfHandleEngine.cs b/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AsyncAddBehaviourIfHandleEngine.cs index d830651f8d..f60dca78e3 100644 --- a/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AsyncAddBehaviourIfHandleEngine.cs +++ b/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AsyncAddBehaviourIfHandleEngine.cs @@ -1,9 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using Polly.Utilities; - -namespace Polly.Specs.Helpers.Custom.AddBehaviourIfHandle; +namespace Polly.Specs.Helpers.Custom.AddBehaviourIfHandle; internal static class AsyncAddBehaviourIfHandleEngine { diff --git a/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AsyncAddBehaviourIfHandlePolicy.cs b/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AsyncAddBehaviourIfHandlePolicy.cs index badfe1f0f3..fc4387ab81 100644 --- a/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AsyncAddBehaviourIfHandlePolicy.cs +++ b/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AsyncAddBehaviourIfHandlePolicy.cs @@ -1,7 +1,4 @@ -using System; -using System.Threading.Tasks; - -namespace Polly.Specs.Helpers.Custom.AddBehaviourIfHandle; +namespace Polly.Specs.Helpers.Custom.AddBehaviourIfHandle; internal class AsyncAddBehaviourIfHandlePolicy : AsyncPolicy { diff --git a/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AsyncAddBehaviourIfHandleSyntax.cs b/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AsyncAddBehaviourIfHandleSyntax.cs index 4911ac63db..3a73b7f439 100644 --- a/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AsyncAddBehaviourIfHandleSyntax.cs +++ b/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AsyncAddBehaviourIfHandleSyntax.cs @@ -1,7 +1,4 @@ -using System; -using System.Threading.Tasks; - -namespace Polly.Specs.Helpers.Custom.AddBehaviourIfHandle; +namespace Polly.Specs.Helpers.Custom.AddBehaviourIfHandle; internal static class AsyncAddBehaviourIfHandleSyntax { diff --git a/src/Polly.Specs/Helpers/Custom/PreExecute/AsyncPreExecuteEngine.cs b/src/Polly.Specs/Helpers/Custom/PreExecute/AsyncPreExecuteEngine.cs index 9a585f9f9c..1e42084cda 100644 --- a/src/Polly.Specs/Helpers/Custom/PreExecute/AsyncPreExecuteEngine.cs +++ b/src/Polly.Specs/Helpers/Custom/PreExecute/AsyncPreExecuteEngine.cs @@ -1,8 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; - -namespace Polly.Specs.Helpers.Custom.PreExecute; +namespace Polly.Specs.Helpers.Custom.PreExecute; internal static class AsyncPreExecuteEngine { diff --git a/src/Polly.Specs/Helpers/Custom/PreExecute/AsyncPreExecutePolicy.cs b/src/Polly.Specs/Helpers/Custom/PreExecute/AsyncPreExecutePolicy.cs index 81b599c1a0..4264cffa61 100644 --- a/src/Polly.Specs/Helpers/Custom/PreExecute/AsyncPreExecutePolicy.cs +++ b/src/Polly.Specs/Helpers/Custom/PreExecute/AsyncPreExecutePolicy.cs @@ -1,8 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; - -namespace Polly.Specs.Helpers.Custom.PreExecute; +namespace Polly.Specs.Helpers.Custom.PreExecute; internal class AsyncPreExecutePolicy : AsyncPolicy { diff --git a/src/Polly.Specs/Helpers/Custom/PreExecute/PreExecuteEngine.cs b/src/Polly.Specs/Helpers/Custom/PreExecute/PreExecuteEngine.cs index 08627e6c0b..68acce3900 100644 --- a/src/Polly.Specs/Helpers/Custom/PreExecute/PreExecuteEngine.cs +++ b/src/Polly.Specs/Helpers/Custom/PreExecute/PreExecuteEngine.cs @@ -1,7 +1,4 @@ -using System; -using System.Threading; - -namespace Polly.Specs.Helpers.Custom.PreExecute; +namespace Polly.Specs.Helpers.Custom.PreExecute; internal static class PreExecuteEngine { diff --git a/src/Polly.Specs/Helpers/Custom/PreExecute/PreExecutePolicy.cs b/src/Polly.Specs/Helpers/Custom/PreExecute/PreExecutePolicy.cs index e27504eb96..966e34889f 100644 --- a/src/Polly.Specs/Helpers/Custom/PreExecute/PreExecutePolicy.cs +++ b/src/Polly.Specs/Helpers/Custom/PreExecute/PreExecutePolicy.cs @@ -1,7 +1,4 @@ -using System; -using System.Threading; - -namespace Polly.Specs.Helpers.Custom.PreExecute; +namespace Polly.Specs.Helpers.Custom.PreExecute; internal class PreExecutePolicy : Policy { diff --git a/src/Polly.Specs/Helpers/ObjectExtensions.cs b/src/Polly.Specs/Helpers/ObjectExtensions.cs index ece5425331..3f5f33f27a 100644 --- a/src/Polly.Specs/Helpers/ObjectExtensions.cs +++ b/src/Polly.Specs/Helpers/ObjectExtensions.cs @@ -1,8 +1,4 @@ -using System.Collections.Generic; -using System.Reflection; -using System.Linq; - -namespace Polly.Specs.Helpers; +namespace Polly.Specs.Helpers; public static class ObjectExtensions { diff --git a/src/Polly.Specs/Helpers/PolicyExtensions.cs b/src/Polly.Specs/Helpers/PolicyExtensions.cs index 4629837f61..89e49a3197 100644 --- a/src/Polly.Specs/Helpers/PolicyExtensions.cs +++ b/src/Polly.Specs/Helpers/PolicyExtensions.cs @@ -1,7 +1,4 @@ -using System; -using System.Threading; - -namespace Polly.Specs.Helpers; +namespace Polly.Specs.Helpers; public static class PolicyExtensions { diff --git a/src/Polly.Specs/Helpers/PolicyExtensionsAsync.cs b/src/Polly.Specs/Helpers/PolicyExtensionsAsync.cs index b92a76be31..49d31e6ecc 100644 --- a/src/Polly.Specs/Helpers/PolicyExtensionsAsync.cs +++ b/src/Polly.Specs/Helpers/PolicyExtensionsAsync.cs @@ -1,9 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using Polly.Utilities; - -namespace Polly.Specs.Helpers; +namespace Polly.Specs.Helpers; public static class PolicyExtensionsAsync { diff --git a/src/Polly.Specs/Helpers/PolicyTResultExtensions.cs b/src/Polly.Specs/Helpers/PolicyTResultExtensions.cs index 39acc351e7..fd1976606e 100644 --- a/src/Polly.Specs/Helpers/PolicyTResultExtensions.cs +++ b/src/Polly.Specs/Helpers/PolicyTResultExtensions.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using Scenario = Polly.Specs.Helpers.PolicyTResultExtensions.ResultAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyTResultExtensions.ResultAndOrCancellationScenario; namespace Polly.Specs.Helpers; diff --git a/src/Polly.Specs/Helpers/PolicyTResultExtensionsAsync.cs b/src/Polly.Specs/Helpers/PolicyTResultExtensionsAsync.cs index 614c502db9..906cbc51b6 100644 --- a/src/Polly.Specs/Helpers/PolicyTResultExtensionsAsync.cs +++ b/src/Polly.Specs/Helpers/PolicyTResultExtensionsAsync.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; - -using Scenario = Polly.Specs.Helpers.PolicyTResultExtensionsAsync.ResultAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyTResultExtensionsAsync.ResultAndOrCancellationScenario; namespace Polly.Specs.Helpers; diff --git a/src/Polly.Specs/Helpers/RateLimit/IRateLimiterExtensions.cs b/src/Polly.Specs/Helpers/RateLimit/IRateLimiterExtensions.cs index ec2fbf32d0..b01d5ee3c4 100644 --- a/src/Polly.Specs/Helpers/RateLimit/IRateLimiterExtensions.cs +++ b/src/Polly.Specs/Helpers/RateLimit/IRateLimiterExtensions.cs @@ -1,8 +1,4 @@ -using System; -using FluentAssertions; -using Polly.RateLimit; - -namespace Polly.Specs.Helpers.RateLimit; +namespace Polly.Specs.Helpers.RateLimit; internal static class IRateLimiterExtensions { diff --git a/src/Polly.Specs/Helpers/RateLimit/ResultClassWithRetryAfter.cs b/src/Polly.Specs/Helpers/RateLimit/ResultClassWithRetryAfter.cs index 96797f86d1..a015358f23 100644 --- a/src/Polly.Specs/Helpers/RateLimit/ResultClassWithRetryAfter.cs +++ b/src/Polly.Specs/Helpers/RateLimit/ResultClassWithRetryAfter.cs @@ -1,6 +1,4 @@ -using System; - -namespace Polly.Specs.Helpers.RateLimit; +namespace Polly.Specs.Helpers.RateLimit; internal class ResultClassWithRetryAfter : ResultClass { diff --git a/src/Polly.Specs/IAsyncPolicyExtensionsSpecs.cs b/src/Polly.Specs/IAsyncPolicyExtensionsSpecs.cs index 3528837849..443db1dfd0 100644 --- a/src/Polly.Specs/IAsyncPolicyExtensionsSpecs.cs +++ b/src/Polly.Specs/IAsyncPolicyExtensionsSpecs.cs @@ -1,11 +1,4 @@ -using System; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.CircuitBreaker; -using Polly.Specs.Helpers; -using Xunit; - -namespace Polly.Specs; +namespace Polly.Specs; public class IAsyncPolicyExtensionsSpecs { diff --git a/src/Polly.Specs/ISyncPolicyExtensionsSpecs.cs b/src/Polly.Specs/ISyncPolicyExtensionsSpecs.cs index 5103728b4d..2759117c2f 100644 --- a/src/Polly.Specs/ISyncPolicyExtensionsSpecs.cs +++ b/src/Polly.Specs/ISyncPolicyExtensionsSpecs.cs @@ -1,10 +1,4 @@ -using System; -using FluentAssertions; -using Polly.CircuitBreaker; -using Polly.Specs.Helpers; -using Xunit; - -namespace Polly.Specs; +namespace Polly.Specs; public class ISyncPolicyExtensionsSpecs { diff --git a/src/Polly.Specs/NoOp/NoOpAsyncSpecs.cs b/src/Polly.Specs/NoOp/NoOpAsyncSpecs.cs index 71b1dfef5c..035e605283 100644 --- a/src/Polly.Specs/NoOp/NoOpAsyncSpecs.cs +++ b/src/Polly.Specs/NoOp/NoOpAsyncSpecs.cs @@ -1,10 +1,4 @@ -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.NoOp; +namespace Polly.Specs.NoOp; public class NoOpAsyncSpecs { diff --git a/src/Polly.Specs/NoOp/NoOpSpecs.cs b/src/Polly.Specs/NoOp/NoOpSpecs.cs index 7c16ee57b9..954ca62f48 100644 --- a/src/Polly.Specs/NoOp/NoOpSpecs.cs +++ b/src/Polly.Specs/NoOp/NoOpSpecs.cs @@ -1,9 +1,4 @@ -using System.Threading; -using FluentAssertions; -using Polly.NoOp; -using Xunit; - -namespace Polly.Specs.NoOp; +namespace Polly.Specs.NoOp; public class NoOpSpecs { diff --git a/src/Polly.Specs/NoOp/NoOpTResultAsyncSpecs.cs b/src/Polly.Specs/NoOp/NoOpTResultAsyncSpecs.cs index 0cfb27d189..006bab7bb4 100644 --- a/src/Polly.Specs/NoOp/NoOpTResultAsyncSpecs.cs +++ b/src/Polly.Specs/NoOp/NoOpTResultAsyncSpecs.cs @@ -1,11 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.NoOp; -using Xunit; - -namespace Polly.Specs.NoOp; +namespace Polly.Specs.NoOp; public class NoOpTResultAsyncSpecs { diff --git a/src/Polly.Specs/NoOp/NoOpTResultSpecs.cs b/src/Polly.Specs/NoOp/NoOpTResultSpecs.cs index 9c940f9552..bf3c61f568 100644 --- a/src/Polly.Specs/NoOp/NoOpTResultSpecs.cs +++ b/src/Polly.Specs/NoOp/NoOpTResultSpecs.cs @@ -1,9 +1,4 @@ -using System.Threading; -using FluentAssertions; -using Polly.NoOp; -using Xunit; - -namespace Polly.Specs.NoOp; +namespace Polly.Specs.NoOp; public class NoOpTResultSpecs { diff --git a/src/Polly.Specs/PolicyAsyncSpecs.cs b/src/Polly.Specs/PolicyAsyncSpecs.cs index 90012655c4..1dcba939d7 100644 --- a/src/Polly.Specs/PolicyAsyncSpecs.cs +++ b/src/Polly.Specs/PolicyAsyncSpecs.cs @@ -1,11 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs; +namespace Polly.Specs; public class PolicyAsyncSpecs { diff --git a/src/Polly.Specs/PolicyContextAndKeyAsyncSpecs.cs b/src/Polly.Specs/PolicyContextAndKeyAsyncSpecs.cs index 5e57f58a9c..52501f4b54 100644 --- a/src/Polly.Specs/PolicyContextAndKeyAsyncSpecs.cs +++ b/src/Polly.Specs/PolicyContextAndKeyAsyncSpecs.cs @@ -1,11 +1,4 @@ -using System; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs; +namespace Polly.Specs; public class PolicyKeyAsyncSpecs { diff --git a/src/Polly.Specs/PolicyContextAndKeySpecs.cs b/src/Polly.Specs/PolicyContextAndKeySpecs.cs index 7186064ef1..c8d9917fb0 100644 --- a/src/Polly.Specs/PolicyContextAndKeySpecs.cs +++ b/src/Polly.Specs/PolicyContextAndKeySpecs.cs @@ -1,9 +1,4 @@ -using System; -using FluentAssertions; -using Polly.Specs.Helpers; -using Xunit; - -namespace Polly.Specs; +namespace Polly.Specs; public class PolicyKeySpecs { diff --git a/src/Polly.Specs/PolicySpecs.cs b/src/Polly.Specs/PolicySpecs.cs index b857e3d255..f9f2121062 100644 --- a/src/Polly.Specs/PolicySpecs.cs +++ b/src/Polly.Specs/PolicySpecs.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using FluentAssertions; -using Xunit; - -namespace Polly.Specs; +namespace Polly.Specs; public class PolicySpecs { diff --git a/src/Polly.Specs/PolicyTResultAsyncSpecs.cs b/src/Polly.Specs/PolicyTResultAsyncSpecs.cs index 5174286c26..376fa5fe77 100644 --- a/src/Polly.Specs/PolicyTResultAsyncSpecs.cs +++ b/src/Polly.Specs/PolicyTResultAsyncSpecs.cs @@ -1,11 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.Specs.Helpers; -using Xunit; - -namespace Polly.Specs; +namespace Polly.Specs; public class PolicyTResultAsyncSpecs { diff --git a/src/Polly.Specs/PolicyTResultSpecs.cs b/src/Polly.Specs/PolicyTResultSpecs.cs index 16dca05a7e..5235164e9e 100644 --- a/src/Polly.Specs/PolicyTResultSpecs.cs +++ b/src/Polly.Specs/PolicyTResultSpecs.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using FluentAssertions; -using Polly.Specs.Helpers; -using Xunit; - -namespace Polly.Specs; +namespace Polly.Specs; public class PolicyTResultSpecs { diff --git a/src/Polly.Specs/Polly.Specs.csproj b/src/Polly.Specs/Polly.Specs.csproj index 3b3dcb8045..480ffbdfec 100644 --- a/src/Polly.Specs/Polly.Specs.csproj +++ b/src/Polly.Specs/Polly.Specs.csproj @@ -31,9 +31,7 @@ - + diff --git a/src/Polly.Specs/RateLimit/AsyncRateLimitPolicySpecs.cs b/src/Polly.Specs/RateLimit/AsyncRateLimitPolicySpecs.cs index ce421ebe10..fe1820b6ec 100644 --- a/src/Polly.Specs/RateLimit/AsyncRateLimitPolicySpecs.cs +++ b/src/Polly.Specs/RateLimit/AsyncRateLimitPolicySpecs.cs @@ -1,12 +1,4 @@ -using System; -using System.Threading.Tasks; -using Polly.RateLimit; -using Polly.Specs.Helpers; -using Polly.Specs.Helpers.RateLimit; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.RateLimit; +namespace Polly.Specs.RateLimit; [Collection(Polly.Specs.Helpers.Constants.SystemClockDependentTestCollection)] public class AsyncRateLimitPolicySpecs : RateLimitPolicySpecsBase, IDisposable diff --git a/src/Polly.Specs/RateLimit/AsyncRateLimitPolicyTResultSpecs.cs b/src/Polly.Specs/RateLimit/AsyncRateLimitPolicyTResultSpecs.cs index fc12dab463..e84f924516 100644 --- a/src/Polly.Specs/RateLimit/AsyncRateLimitPolicyTResultSpecs.cs +++ b/src/Polly.Specs/RateLimit/AsyncRateLimitPolicyTResultSpecs.cs @@ -1,12 +1,4 @@ -using System; -using System.Threading.Tasks; -using Polly.RateLimit; -using Polly.Specs.Helpers; -using Polly.Specs.Helpers.RateLimit; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.RateLimit; +namespace Polly.Specs.RateLimit; [Collection(Polly.Specs.Helpers.Constants.SystemClockDependentTestCollection)] public class AsyncRateLimitPolicyTResultSpecs : RateLimitPolicyTResultSpecsBase, IDisposable diff --git a/src/Polly.Specs/RateLimit/LockFreeTokenBucketRateLimiterTests.cs b/src/Polly.Specs/RateLimit/LockFreeTokenBucketRateLimiterTests.cs index 8f6f122fd8..c4ff849cea 100644 --- a/src/Polly.Specs/RateLimit/LockFreeTokenBucketRateLimiterTests.cs +++ b/src/Polly.Specs/RateLimit/LockFreeTokenBucketRateLimiterTests.cs @@ -1,7 +1,4 @@ -using System; -using Polly.RateLimit; - -namespace Polly.Specs.RateLimit; +namespace Polly.Specs.RateLimit; public class LockFreeTokenBucketRateLimiterTests : TokenBucketRateLimiterTestsBase { diff --git a/src/Polly.Specs/RateLimit/RateLimitPolicySpecs.cs b/src/Polly.Specs/RateLimit/RateLimitPolicySpecs.cs index 7994baaec7..e27cc15b14 100644 --- a/src/Polly.Specs/RateLimit/RateLimitPolicySpecs.cs +++ b/src/Polly.Specs/RateLimit/RateLimitPolicySpecs.cs @@ -1,11 +1,4 @@ -using System; -using Polly.RateLimit; -using Polly.Specs.Helpers; -using Polly.Specs.Helpers.RateLimit; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.RateLimit; +namespace Polly.Specs.RateLimit; [Collection(Polly.Specs.Helpers.Constants.SystemClockDependentTestCollection)] public class RateLimitPolicySpecs : RateLimitPolicySpecsBase, IDisposable diff --git a/src/Polly.Specs/RateLimit/RateLimitPolicySpecsBase.cs b/src/Polly.Specs/RateLimit/RateLimitPolicySpecsBase.cs index 6bc1dbd14a..5957ea3cc2 100644 --- a/src/Polly.Specs/RateLimit/RateLimitPolicySpecsBase.cs +++ b/src/Polly.Specs/RateLimit/RateLimitPolicySpecsBase.cs @@ -1,12 +1,4 @@ -using System; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.RateLimit; -using Xunit; - -namespace Polly.Specs.RateLimit; +namespace Polly.Specs.RateLimit; public abstract class RateLimitPolicySpecsBase : RateLimitSpecsBase { diff --git a/src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecs.cs b/src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecs.cs index 320e13e65f..649ba5ea43 100644 --- a/src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecs.cs +++ b/src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecs.cs @@ -1,11 +1,4 @@ -using System; -using Polly.RateLimit; -using Polly.Specs.Helpers; -using Polly.Specs.Helpers.RateLimit; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.RateLimit; +namespace Polly.Specs.RateLimit; [Collection(Polly.Specs.Helpers.Constants.SystemClockDependentTestCollection)] public class RateLimitPolicyTResultSpecs : RateLimitPolicyTResultSpecsBase, IDisposable diff --git a/src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecsBase.cs b/src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecsBase.cs index 529705c317..f2b92d94f3 100644 --- a/src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecsBase.cs +++ b/src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecsBase.cs @@ -1,11 +1,4 @@ -using System; -using FluentAssertions; -using Polly.RateLimit; -using Polly.Specs.Helpers; -using Polly.Specs.Helpers.RateLimit; -using Xunit; - -namespace Polly.Specs.RateLimit; +namespace Polly.Specs.RateLimit; public abstract class RateLimitPolicyTResultSpecsBase : RateLimitPolicySpecsBase { diff --git a/src/Polly.Specs/RateLimit/RateLimitSpecsBase.cs b/src/Polly.Specs/RateLimit/RateLimitSpecsBase.cs index 32753153f4..c3a93dd764 100644 --- a/src/Polly.Specs/RateLimit/RateLimitSpecsBase.cs +++ b/src/Polly.Specs/RateLimit/RateLimitSpecsBase.cs @@ -1,11 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; -using FluentAssertions.Execution; -using Polly.Utilities; -using Xunit.Sdk; - -namespace Polly.Specs.RateLimit; +namespace Polly.Specs.RateLimit; public abstract class RateLimitSpecsBase { diff --git a/src/Polly.Specs/RateLimit/TokenBucketRateLimiterTestsBase.cs b/src/Polly.Specs/RateLimit/TokenBucketRateLimiterTestsBase.cs index 1e30031e51..9370dbc30f 100644 --- a/src/Polly.Specs/RateLimit/TokenBucketRateLimiterTestsBase.cs +++ b/src/Polly.Specs/RateLimit/TokenBucketRateLimiterTestsBase.cs @@ -1,14 +1,4 @@ -using System; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.RateLimit; -using Polly.Specs.Helpers.RateLimit; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.RateLimit; +namespace Polly.Specs.RateLimit; [Collection(Polly.Specs.Helpers.Constants.SystemClockDependentTestCollection)] public abstract class TokenBucketRateLimiterTestsBase : RateLimitSpecsBase, IDisposable diff --git a/src/Polly.Specs/Registry/ConcurrentPolicyRegistrySpecs.cs b/src/Polly.Specs/Registry/ConcurrentPolicyRegistrySpecs.cs index d0c86ea672..65c67e60f3 100644 --- a/src/Polly.Specs/Registry/ConcurrentPolicyRegistrySpecs.cs +++ b/src/Polly.Specs/Registry/ConcurrentPolicyRegistrySpecs.cs @@ -1,11 +1,4 @@ -using System; -using FluentAssertions; -using Polly.NoOp; -using Polly.Registry; -using Polly.Specs.Helpers; -using Xunit; - -namespace Polly.Specs.Registry; +namespace Polly.Specs.Registry; public class ConcurrentPolicyRegistrySpecs { diff --git a/src/Polly.Specs/Registry/PolicyRegistrySpecs.cs b/src/Polly.Specs/Registry/PolicyRegistrySpecs.cs index 4604dd463a..4ce6a09ba7 100644 --- a/src/Polly.Specs/Registry/PolicyRegistrySpecs.cs +++ b/src/Polly.Specs/Registry/PolicyRegistrySpecs.cs @@ -1,14 +1,4 @@ -using System; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Reflection; -using Xunit; -using FluentAssertions; -using Polly.Registry; -using Polly.Specs.Helpers; -using Moq; - -namespace Polly.Specs.Registry; +namespace Polly.Specs.Registry; public class PolicyRegistrySpecs { diff --git a/src/Polly.Specs/Registry/ReadOnlyPolicyRegistrySpecs.cs b/src/Polly.Specs/Registry/ReadOnlyPolicyRegistrySpecs.cs index b5cef60423..6504c7d122 100644 --- a/src/Polly.Specs/Registry/ReadOnlyPolicyRegistrySpecs.cs +++ b/src/Polly.Specs/Registry/ReadOnlyPolicyRegistrySpecs.cs @@ -1,12 +1,4 @@ -using System; -using System.Collections.Generic; -using FluentAssertions; -using Moq; -using Polly.Registry; -using Polly.Specs.Helpers; -using Xunit; - -namespace Polly.Specs.Registry; +namespace Polly.Specs.Registry; public class ReadOnlyPolicyRegistrySpecs { diff --git a/src/Polly.Specs/Retry/RetryAsyncSpecs.cs b/src/Polly.Specs/Retry/RetryAsyncSpecs.cs index 2ce22b4d7d..b2cc963921 100644 --- a/src/Polly.Specs/Retry/RetryAsyncSpecs.cs +++ b/src/Polly.Specs/Retry/RetryAsyncSpecs.cs @@ -1,15 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.Retry; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - -using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; namespace Polly.Specs.Retry; diff --git a/src/Polly.Specs/Retry/RetryForeverAsyncSpecs.cs b/src/Polly.Specs/Retry/RetryForeverAsyncSpecs.cs index 870371def6..c50dc528b2 100644 --- a/src/Polly.Specs/Retry/RetryForeverAsyncSpecs.cs +++ b/src/Polly.Specs/Retry/RetryForeverAsyncSpecs.cs @@ -1,15 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.Retry; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - -using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; namespace Polly.Specs.Retry; diff --git a/src/Polly.Specs/Retry/RetryForeverSpecs.cs b/src/Polly.Specs/Retry/RetryForeverSpecs.cs index b58dd0aa45..57a3ef5b2c 100644 --- a/src/Polly.Specs/Retry/RetryForeverSpecs.cs +++ b/src/Polly.Specs/Retry/RetryForeverSpecs.cs @@ -1,12 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.Specs.Helpers; -using Xunit; - -namespace Polly.Specs.Retry; +namespace Polly.Specs.Retry; public class RetryForeverSpecs { diff --git a/src/Polly.Specs/Retry/RetrySpecs.cs b/src/Polly.Specs/Retry/RetrySpecs.cs index b913719d62..a1023de86a 100644 --- a/src/Polly.Specs/Retry/RetrySpecs.cs +++ b/src/Polly.Specs/Retry/RetrySpecs.cs @@ -1,12 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using FluentAssertions; -using Polly.Specs.Helpers; -using Xunit; - -namespace Polly.Specs.Retry; +namespace Polly.Specs.Retry; public class RetrySpecs { diff --git a/src/Polly.Specs/Retry/RetryTResultMixedResultExceptionSpecs.cs b/src/Polly.Specs/Retry/RetryTResultMixedResultExceptionSpecs.cs index 4ecd5afba4..ed748aa5c2 100644 --- a/src/Polly.Specs/Retry/RetryTResultMixedResultExceptionSpecs.cs +++ b/src/Polly.Specs/Retry/RetryTResultMixedResultExceptionSpecs.cs @@ -1,9 +1,4 @@ -using System; -using FluentAssertions; -using Polly.Specs.Helpers; -using Xunit; - -namespace Polly.Specs.Retry; +namespace Polly.Specs.Retry; public class RetryTResultMixedResultExceptionSpecs { diff --git a/src/Polly.Specs/Retry/RetryTResultSpecs.cs b/src/Polly.Specs/Retry/RetryTResultSpecs.cs index 9b9070eeed..82966b10ee 100644 --- a/src/Polly.Specs/Retry/RetryTResultSpecs.cs +++ b/src/Polly.Specs/Retry/RetryTResultSpecs.cs @@ -1,13 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using FluentAssertions; -using Polly.Retry; -using Polly.Specs.Helpers; -using Xunit; - -using Scenario = Polly.Specs.Helpers.PolicyTResultExtensions.ResultAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyTResultExtensions.ResultAndOrCancellationScenario; namespace Polly.Specs.Retry; diff --git a/src/Polly.Specs/Retry/RetryTResultSpecsAsync.cs b/src/Polly.Specs/Retry/RetryTResultSpecsAsync.cs index a586cedb08..9711ccd83d 100644 --- a/src/Polly.Specs/Retry/RetryTResultSpecsAsync.cs +++ b/src/Polly.Specs/Retry/RetryTResultSpecsAsync.cs @@ -1,14 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - -using Scenario = Polly.Specs.Helpers.PolicyTResultExtensionsAsync.ResultAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyTResultExtensionsAsync.ResultAndOrCancellationScenario; namespace Polly.Specs.Retry; diff --git a/src/Polly.Specs/Retry/WaitAndRetryAsyncSpecs.cs b/src/Polly.Specs/Retry/WaitAndRetryAsyncSpecs.cs index 2384aff262..2d696f8808 100644 --- a/src/Polly.Specs/Retry/WaitAndRetryAsyncSpecs.cs +++ b/src/Polly.Specs/Retry/WaitAndRetryAsyncSpecs.cs @@ -1,17 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using FluentAssertions.Extensions; -using Polly.Retry; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - -using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; namespace Polly.Specs.Retry; diff --git a/src/Polly.Specs/Retry/WaitAndRetryForeverAsyncSpecs.cs b/src/Polly.Specs/Retry/WaitAndRetryForeverAsyncSpecs.cs index cd07144c7a..616e207810 100644 --- a/src/Polly.Specs/Retry/WaitAndRetryForeverAsyncSpecs.cs +++ b/src/Polly.Specs/Retry/WaitAndRetryForeverAsyncSpecs.cs @@ -1,16 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using FluentAssertions.Extensions; -using Polly.Retry; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - -using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; namespace Polly.Specs.Retry; diff --git a/src/Polly.Specs/Retry/WaitAndRetryForeverSpecs.cs b/src/Polly.Specs/Retry/WaitAndRetryForeverSpecs.cs index e00de83eca..3d172b0a63 100644 --- a/src/Polly.Specs/Retry/WaitAndRetryForeverSpecs.cs +++ b/src/Polly.Specs/Retry/WaitAndRetryForeverSpecs.cs @@ -1,13 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using FluentAssertions; -using FluentAssertions.Extensions; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.Retry; +namespace Polly.Specs.Retry; [Collection(Constants.SystemClockDependentTestCollection)] public class WaitAndRetryForeverSpecs : IDisposable diff --git a/src/Polly.Specs/Retry/WaitAndRetryForeverTResultAsyncSpecs.cs b/src/Polly.Specs/Retry/WaitAndRetryForeverTResultAsyncSpecs.cs index dd3c459a6c..759f1ff1b9 100644 --- a/src/Polly.Specs/Retry/WaitAndRetryForeverTResultAsyncSpecs.cs +++ b/src/Polly.Specs/Retry/WaitAndRetryForeverTResultAsyncSpecs.cs @@ -1,13 +1,4 @@ -using System; -using System.Threading.Tasks; -using System.Collections.Generic; -using FluentAssertions; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; -using FluentAssertions.Extensions; - -namespace Polly.Specs.Retry; +namespace Polly.Specs.Retry; [Collection(Constants.SystemClockDependentTestCollection)] public class WaitAndRetryForeverTResultAsyncSpecs : IDisposable diff --git a/src/Polly.Specs/Retry/WaitAndRetryForeverTResultSpecs.cs b/src/Polly.Specs/Retry/WaitAndRetryForeverTResultSpecs.cs index cd2229e7af..b05cd60ce9 100644 --- a/src/Polly.Specs/Retry/WaitAndRetryForeverTResultSpecs.cs +++ b/src/Polly.Specs/Retry/WaitAndRetryForeverTResultSpecs.cs @@ -1,12 +1,4 @@ -using System; -using System.Collections.Generic; -using FluentAssertions; -using FluentAssertions.Extensions; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.Retry; +namespace Polly.Specs.Retry; [Collection(Constants.SystemClockDependentTestCollection)] public class WaitAndRetryForeverTResultSpecs : IDisposable diff --git a/src/Polly.Specs/Retry/WaitAndRetrySpecs.cs b/src/Polly.Specs/Retry/WaitAndRetrySpecs.cs index 0af4827eb1..a80c0c6212 100644 --- a/src/Polly.Specs/Retry/WaitAndRetrySpecs.cs +++ b/src/Polly.Specs/Retry/WaitAndRetrySpecs.cs @@ -1,16 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using FluentAssertions.Extensions; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.Retry; +namespace Polly.Specs.Retry; [Collection(Constants.SystemClockDependentTestCollection)] public class WaitAndRetrySpecs : IDisposable diff --git a/src/Polly.Specs/Retry/WaitAndRetryTResultAsyncSpecs.cs b/src/Polly.Specs/Retry/WaitAndRetryTResultAsyncSpecs.cs index b9003f0c2e..4efc5c3e55 100644 --- a/src/Polly.Specs/Retry/WaitAndRetryTResultAsyncSpecs.cs +++ b/src/Polly.Specs/Retry/WaitAndRetryTResultAsyncSpecs.cs @@ -1,13 +1,4 @@ -using System; -using System.Threading.Tasks; -using System.Collections.Generic; -using FluentAssertions; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; -using FluentAssertions.Extensions; - -namespace Polly.Specs.Retry; +namespace Polly.Specs.Retry; [Collection(Constants.SystemClockDependentTestCollection)] public class WaitAndRetryTResultAsyncSpecs : IDisposable diff --git a/src/Polly.Specs/Retry/WaitAndRetryTResultSpecs.cs b/src/Polly.Specs/Retry/WaitAndRetryTResultSpecs.cs index f9eaa6c620..ab8cdb172d 100644 --- a/src/Polly.Specs/Retry/WaitAndRetryTResultSpecs.cs +++ b/src/Polly.Specs/Retry/WaitAndRetryTResultSpecs.cs @@ -1,12 +1,4 @@ -using System; -using System.Collections.Generic; -using FluentAssertions; -using FluentAssertions.Extensions; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.Retry; +namespace Polly.Specs.Retry; [Collection(Constants.SystemClockDependentTestCollection)] public class WaitAndRetryTResultSpecs : IDisposable diff --git a/src/Polly.Specs/Timeout/TimeoutAsyncSpecs.cs b/src/Polly.Specs/Timeout/TimeoutAsyncSpecs.cs index d643a82d74..a92fea4741 100644 --- a/src/Polly.Specs/Timeout/TimeoutAsyncSpecs.cs +++ b/src/Polly.Specs/Timeout/TimeoutAsyncSpecs.cs @@ -1,14 +1,4 @@ -using FluentAssertions; -using Polly.Specs.Helpers; -using Polly.Timeout; -using Polly.Utilities; -using System; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; -using Xunit; - -namespace Polly.Specs.Timeout; +namespace Polly.Specs.Timeout; [Collection(Constants.SystemClockDependentTestCollection)] public class TimeoutAsyncSpecs : TimeoutSpecsBase diff --git a/src/Polly.Specs/Timeout/TimeoutSpecs.cs b/src/Polly.Specs/Timeout/TimeoutSpecs.cs index 339f15a35c..eceb969165 100644 --- a/src/Polly.Specs/Timeout/TimeoutSpecs.cs +++ b/src/Polly.Specs/Timeout/TimeoutSpecs.cs @@ -1,14 +1,4 @@ -using FluentAssertions; -using System; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; -using Polly.Specs.Helpers; -using Polly.Timeout; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.Timeout; +namespace Polly.Specs.Timeout; [Collection(Constants.SystemClockDependentTestCollection)] public class TimeoutSpecs : TimeoutSpecsBase diff --git a/src/Polly.Specs/Timeout/TimeoutSpecsBase.cs b/src/Polly.Specs/Timeout/TimeoutSpecsBase.cs index a82f67732d..486da5f3c7 100644 --- a/src/Polly.Specs/Timeout/TimeoutSpecsBase.cs +++ b/src/Polly.Specs/Timeout/TimeoutSpecsBase.cs @@ -1,8 +1,4 @@ -using System; -using System.Runtime.CompilerServices; -using Polly.Utilities; -using System.Threading; -using System.Threading.Tasks; +using System.Runtime.CompilerServices; namespace Polly.Specs.Timeout; diff --git a/src/Polly.Specs/Timeout/TimeoutTResultAsyncSpecs.cs b/src/Polly.Specs/Timeout/TimeoutTResultAsyncSpecs.cs index 6a5c5beade..84e9266ac0 100644 --- a/src/Polly.Specs/Timeout/TimeoutTResultAsyncSpecs.cs +++ b/src/Polly.Specs/Timeout/TimeoutTResultAsyncSpecs.cs @@ -1,14 +1,4 @@ -using FluentAssertions; -using System; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; -using Polly.Specs.Helpers; -using Polly.Timeout; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.Timeout; +namespace Polly.Specs.Timeout; [Collection(Constants.SystemClockDependentTestCollection)] public class TimeoutTResultAsyncSpecs : TimeoutSpecsBase diff --git a/src/Polly.Specs/Timeout/TimeoutTResultSpecs.cs b/src/Polly.Specs/Timeout/TimeoutTResultSpecs.cs index 92f56bb8db..ec1d482037 100644 --- a/src/Polly.Specs/Timeout/TimeoutTResultSpecs.cs +++ b/src/Polly.Specs/Timeout/TimeoutTResultSpecs.cs @@ -1,14 +1,4 @@ -using FluentAssertions; -using System; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; -using Polly.Specs.Helpers; -using Polly.Timeout; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.Timeout; +namespace Polly.Specs.Timeout; [Collection(Constants.SystemClockDependentTestCollection)] public class TimeoutTResultSpecs : TimeoutSpecsBase diff --git a/src/Polly.Specs/Wrap/IPolicyWrapExtensionSpecs.cs b/src/Polly.Specs/Wrap/IPolicyWrapExtensionSpecs.cs index 7c0c019ff0..c9d8d72f92 100644 --- a/src/Polly.Specs/Wrap/IPolicyWrapExtensionSpecs.cs +++ b/src/Polly.Specs/Wrap/IPolicyWrapExtensionSpecs.cs @@ -1,14 +1,4 @@ -using System; -using System.Collections.Generic; -using Xunit; -using Polly.Wrap; -using System.Linq; -using FluentAssertions; -using Polly.CircuitBreaker; -using Polly.NoOp; -using Polly.Retry; - -namespace Polly.Specs.Wrap; +namespace Polly.Specs.Wrap; public class IPolicyWrapExtensionSpecs { diff --git a/src/Polly.Specs/Wrap/PolicyWrapContextAndKeySpecs.cs b/src/Polly.Specs/Wrap/PolicyWrapContextAndKeySpecs.cs index f09afed119..40800dba19 100644 --- a/src/Polly.Specs/Wrap/PolicyWrapContextAndKeySpecs.cs +++ b/src/Polly.Specs/Wrap/PolicyWrapContextAndKeySpecs.cs @@ -1,9 +1,4 @@ -using System; -using FluentAssertions; -using Polly.Specs.Helpers; -using Xunit; - -namespace Polly.Specs.Wrap; +namespace Polly.Specs.Wrap; [Collection(Constants.SystemClockDependentTestCollection)] public class PolicyWrapContextAndKeySpecs diff --git a/src/Polly.Specs/Wrap/PolicyWrapContextAndKeySpecsAsync.cs b/src/Polly.Specs/Wrap/PolicyWrapContextAndKeySpecsAsync.cs index cc98ebfcd9..fecd09d157 100644 --- a/src/Polly.Specs/Wrap/PolicyWrapContextAndKeySpecsAsync.cs +++ b/src/Polly.Specs/Wrap/PolicyWrapContextAndKeySpecsAsync.cs @@ -1,11 +1,4 @@ -using System; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.Wrap; +namespace Polly.Specs.Wrap; [Collection(Constants.SystemClockDependentTestCollection)] public class PolicyWrapContextAndKeySpecsAsync diff --git a/src/Polly.Specs/Wrap/PolicyWrapSpecs.cs b/src/Polly.Specs/Wrap/PolicyWrapSpecs.cs index d32444a561..b4be095ea3 100644 --- a/src/Polly.Specs/Wrap/PolicyWrapSpecs.cs +++ b/src/Polly.Specs/Wrap/PolicyWrapSpecs.cs @@ -1,12 +1,4 @@ -using System; -using FluentAssertions; -using Polly.CircuitBreaker; -using Polly.Retry; -using Polly.Specs.Helpers; -using Polly.Wrap; -using Xunit; - -namespace Polly.Specs.Wrap; +namespace Polly.Specs.Wrap; [Collection(Constants.SystemClockDependentTestCollection)] public class PolicyWrapSpecs diff --git a/src/Polly.Specs/Wrap/PolicyWrapSpecsAsync.cs b/src/Polly.Specs/Wrap/PolicyWrapSpecsAsync.cs index 4148abd7af..b73c55a75e 100644 --- a/src/Polly.Specs/Wrap/PolicyWrapSpecsAsync.cs +++ b/src/Polly.Specs/Wrap/PolicyWrapSpecsAsync.cs @@ -1,12 +1,4 @@ -using System; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.CircuitBreaker; -using Polly.Specs.Helpers; -using Polly.Wrap; -using Xunit; - -namespace Polly.Specs.Wrap; +namespace Polly.Specs.Wrap; [Collection(Constants.SystemClockDependentTestCollection)] public class PolicyWrapSpecsAsync diff --git a/src/Polly/AsyncPolicy.ExecuteOverloads.cs b/src/Polly/AsyncPolicy.ExecuteOverloads.cs index fcdc9770e1..425b1df5d3 100644 --- a/src/Polly/AsyncPolicy.ExecuteOverloads.cs +++ b/src/Polly/AsyncPolicy.ExecuteOverloads.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; - -namespace Polly; +namespace Polly; public abstract partial class AsyncPolicy : PolicyBase, IAsyncPolicy { diff --git a/src/Polly/AsyncPolicy.GenericImplementation.cs b/src/Polly/AsyncPolicy.GenericImplementation.cs index 314d1636a3..090c09b479 100644 --- a/src/Polly/AsyncPolicy.GenericImplementation.cs +++ b/src/Polly/AsyncPolicy.GenericImplementation.cs @@ -1,8 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; - -namespace Polly; +namespace Polly; public abstract partial class AsyncPolicy { diff --git a/src/Polly/AsyncPolicy.NonGenericImplementation.cs b/src/Polly/AsyncPolicy.NonGenericImplementation.cs index c26a44ce59..fb8b271f32 100644 --- a/src/Polly/AsyncPolicy.NonGenericImplementation.cs +++ b/src/Polly/AsyncPolicy.NonGenericImplementation.cs @@ -1,9 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using Polly.Utilities; - -namespace Polly; +namespace Polly; public abstract partial class AsyncPolicy { diff --git a/src/Polly/AsyncPolicy.TResult.ExecuteOverloads.cs b/src/Polly/AsyncPolicy.TResult.ExecuteOverloads.cs index 0722506d4a..63b4b1687e 100644 --- a/src/Polly/AsyncPolicy.TResult.ExecuteOverloads.cs +++ b/src/Polly/AsyncPolicy.TResult.ExecuteOverloads.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; - -namespace Polly; +namespace Polly; public abstract partial class AsyncPolicy : IAsyncPolicy { diff --git a/src/Polly/Bulkhead/AsyncBulkheadEngine.cs b/src/Polly/Bulkhead/AsyncBulkheadEngine.cs index 792e5fd3b7..05b12035b6 100644 --- a/src/Polly/Bulkhead/AsyncBulkheadEngine.cs +++ b/src/Polly/Bulkhead/AsyncBulkheadEngine.cs @@ -1,8 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; - -namespace Polly.Bulkhead; +namespace Polly.Bulkhead; internal static class AsyncBulkheadEngine { diff --git a/src/Polly/Bulkhead/AsyncBulkheadPolicy.cs b/src/Polly/Bulkhead/AsyncBulkheadPolicy.cs index 39b7ec8126..694cf252c4 100644 --- a/src/Polly/Bulkhead/AsyncBulkheadPolicy.cs +++ b/src/Polly/Bulkhead/AsyncBulkheadPolicy.cs @@ -1,9 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; - -namespace Polly.Bulkhead; +namespace Polly.Bulkhead; /// /// A bulkhead-isolation policy which can be applied to delegates. diff --git a/src/Polly/Bulkhead/AsyncBulkheadSyntax.cs b/src/Polly/Bulkhead/AsyncBulkheadSyntax.cs index 7ce9351304..83814aea4b 100644 --- a/src/Polly/Bulkhead/AsyncBulkheadSyntax.cs +++ b/src/Polly/Bulkhead/AsyncBulkheadSyntax.cs @@ -1,8 +1,3 @@ -using Polly.Bulkhead; -using Polly.Utilities; -using System; -using System.Threading.Tasks; - namespace Polly; public partial class Policy diff --git a/src/Polly/Bulkhead/AsyncBulkheadTResultSyntax.cs b/src/Polly/Bulkhead/AsyncBulkheadTResultSyntax.cs index f082cef569..a4641b15ba 100644 --- a/src/Polly/Bulkhead/AsyncBulkheadTResultSyntax.cs +++ b/src/Polly/Bulkhead/AsyncBulkheadTResultSyntax.cs @@ -1,9 +1,4 @@ -using Polly.Bulkhead; -using Polly.Utilities; -using System; -using System.Threading.Tasks; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/Bulkhead/BulkheadEngine.cs b/src/Polly/Bulkhead/BulkheadEngine.cs index 6a9827fdd7..9df5e4a99e 100644 --- a/src/Polly/Bulkhead/BulkheadEngine.cs +++ b/src/Polly/Bulkhead/BulkheadEngine.cs @@ -1,7 +1,4 @@ -using System; -using System.Threading; - -namespace Polly.Bulkhead; +namespace Polly.Bulkhead; internal static class BulkheadEngine { diff --git a/src/Polly/Bulkhead/BulkheadPolicy.cs b/src/Polly/Bulkhead/BulkheadPolicy.cs index faa93a6dfa..1b8e0c3b76 100644 --- a/src/Polly/Bulkhead/BulkheadPolicy.cs +++ b/src/Polly/Bulkhead/BulkheadPolicy.cs @@ -1,8 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; - -namespace Polly.Bulkhead; +namespace Polly.Bulkhead; /// /// A bulkhead-isolation policy which can be applied to delegates. diff --git a/src/Polly/Bulkhead/BulkheadRejectedException.cs b/src/Polly/Bulkhead/BulkheadRejectedException.cs index bc41a53958..21286cc786 100644 --- a/src/Polly/Bulkhead/BulkheadRejectedException.cs +++ b/src/Polly/Bulkhead/BulkheadRejectedException.cs @@ -1,5 +1,4 @@ -using System; -#if NETSTANDARD2_0 +#if NETSTANDARD2_0 using System.Runtime.Serialization; #endif diff --git a/src/Polly/Bulkhead/BulkheadSemaphoreFactory.cs b/src/Polly/Bulkhead/BulkheadSemaphoreFactory.cs index a217948f84..eab9755273 100644 --- a/src/Polly/Bulkhead/BulkheadSemaphoreFactory.cs +++ b/src/Polly/Bulkhead/BulkheadSemaphoreFactory.cs @@ -1,6 +1,4 @@ -using System.Threading; - -namespace Polly.Bulkhead; +namespace Polly.Bulkhead; internal static class BulkheadSemaphoreFactory { diff --git a/src/Polly/Bulkhead/BulkheadSyntax.cs b/src/Polly/Bulkhead/BulkheadSyntax.cs index 66cdd32ac8..986516f585 100644 --- a/src/Polly/Bulkhead/BulkheadSyntax.cs +++ b/src/Polly/Bulkhead/BulkheadSyntax.cs @@ -1,7 +1,4 @@ -using Polly.Bulkhead; -using System; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/Bulkhead/BulkheadTResultSyntax.cs b/src/Polly/Bulkhead/BulkheadTResultSyntax.cs index 32e1ee8d04..1e68102e20 100644 --- a/src/Polly/Bulkhead/BulkheadTResultSyntax.cs +++ b/src/Polly/Bulkhead/BulkheadTResultSyntax.cs @@ -1,7 +1,4 @@ -using Polly.Bulkhead; -using System; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/Bulkhead/IBulkheadPolicy.cs b/src/Polly/Bulkhead/IBulkheadPolicy.cs index 5bcd0ba722..b0ea4345a1 100644 --- a/src/Polly/Bulkhead/IBulkheadPolicy.cs +++ b/src/Polly/Bulkhead/IBulkheadPolicy.cs @@ -1,6 +1,4 @@ -using System; - -namespace Polly.Bulkhead; +namespace Polly.Bulkhead; /// /// Defines properties and methods common to all bulkhead policies. diff --git a/src/Polly/Caching/AbsoluteTtl.cs b/src/Polly/Caching/AbsoluteTtl.cs index e70c412c11..a5b1b14f6f 100644 --- a/src/Polly/Caching/AbsoluteTtl.cs +++ b/src/Polly/Caching/AbsoluteTtl.cs @@ -1,6 +1,4 @@ -using System; - -namespace Polly.Caching; +namespace Polly.Caching; /// /// Defines a ttl strategy which will cache items until the specified point-in-time. diff --git a/src/Polly/Caching/AsyncCacheEngine.cs b/src/Polly/Caching/AsyncCacheEngine.cs index 21fa07ac4e..90fd4d64fa 100644 --- a/src/Polly/Caching/AsyncCacheEngine.cs +++ b/src/Polly/Caching/AsyncCacheEngine.cs @@ -1,8 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; - -namespace Polly.Caching; +namespace Polly.Caching; internal static class AsyncCacheEngine { diff --git a/src/Polly/Caching/AsyncCachePolicy.cs b/src/Polly/Caching/AsyncCachePolicy.cs index 101de13524..a4bcc5fdae 100644 --- a/src/Polly/Caching/AsyncCachePolicy.cs +++ b/src/Polly/Caching/AsyncCachePolicy.cs @@ -1,9 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; - -namespace Polly.Caching; +namespace Polly.Caching; /// /// A cache policy that can be applied to the results of delegate executions. diff --git a/src/Polly/Caching/AsyncCacheSyntax.cs b/src/Polly/Caching/AsyncCacheSyntax.cs index 577b645120..d3c6ce6032 100644 --- a/src/Polly/Caching/AsyncCacheSyntax.cs +++ b/src/Polly/Caching/AsyncCacheSyntax.cs @@ -1,7 +1,4 @@ -using Polly.Caching; -using System; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/Caching/AsyncCacheTResultSyntax.cs b/src/Polly/Caching/AsyncCacheTResultSyntax.cs index 3604a9a7dc..6faad6d8c7 100644 --- a/src/Polly/Caching/AsyncCacheTResultSyntax.cs +++ b/src/Polly/Caching/AsyncCacheTResultSyntax.cs @@ -1,7 +1,4 @@ -using Polly.Caching; -using System; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/Caching/AsyncGenericCacheProvider.cs b/src/Polly/Caching/AsyncGenericCacheProvider.cs index c4432d5c66..307087ff99 100644 --- a/src/Polly/Caching/AsyncGenericCacheProvider.cs +++ b/src/Polly/Caching/AsyncGenericCacheProvider.cs @@ -1,8 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; - -namespace Polly.Caching; +namespace Polly.Caching; /// /// Provides a strongly-typed wrapper over a non-generic CacheProviderAsync. diff --git a/src/Polly/Caching/AsyncSerializingCacheProvider.cs b/src/Polly/Caching/AsyncSerializingCacheProvider.cs index 1cd3f34f94..8beb1ca56c 100644 --- a/src/Polly/Caching/AsyncSerializingCacheProvider.cs +++ b/src/Polly/Caching/AsyncSerializingCacheProvider.cs @@ -1,8 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; - -namespace Polly.Caching; +namespace Polly.Caching; /// /// Defines an which serializes objects of any type in and out of an underlying cache which caches as type . For use with asynchronous . diff --git a/src/Polly/Caching/CacheEngine.cs b/src/Polly/Caching/CacheEngine.cs index cc1c1be654..a8806dcb49 100644 --- a/src/Polly/Caching/CacheEngine.cs +++ b/src/Polly/Caching/CacheEngine.cs @@ -1,7 +1,4 @@ -using System; -using System.Threading; - -namespace Polly.Caching; +namespace Polly.Caching; internal static class CacheEngine { diff --git a/src/Polly/Caching/CachePolicy.cs b/src/Polly/Caching/CachePolicy.cs index 7ba908b549..b014424f2e 100644 --- a/src/Polly/Caching/CachePolicy.cs +++ b/src/Polly/Caching/CachePolicy.cs @@ -1,8 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; - -namespace Polly.Caching; +namespace Polly.Caching; /// /// A cache policy that can be applied to the results of delegate executions. diff --git a/src/Polly/Caching/CacheSyntax.cs b/src/Polly/Caching/CacheSyntax.cs index 6331e6113b..8ab89c0711 100644 --- a/src/Polly/Caching/CacheSyntax.cs +++ b/src/Polly/Caching/CacheSyntax.cs @@ -1,7 +1,4 @@ -using Polly.Caching; -using System; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/Caching/CacheTResultSyntax.cs b/src/Polly/Caching/CacheTResultSyntax.cs index d80e4a03d5..dbddd3b39d 100644 --- a/src/Polly/Caching/CacheTResultSyntax.cs +++ b/src/Polly/Caching/CacheTResultSyntax.cs @@ -1,7 +1,4 @@ -using Polly.Caching; -using System; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/Caching/ContextualTtl.cs b/src/Polly/Caching/ContextualTtl.cs index 1a4c2ee88e..a16dcdc20a 100644 --- a/src/Polly/Caching/ContextualTtl.cs +++ b/src/Polly/Caching/ContextualTtl.cs @@ -1,6 +1,4 @@ -using System; - -namespace Polly.Caching; +namespace Polly.Caching; /// /// Defines a ttl strategy which will cache items for a TimeSpan which may be influenced by data in the execution context. diff --git a/src/Polly/Caching/GenericCacheProvider.cs b/src/Polly/Caching/GenericCacheProvider.cs index c4f1498668..763928b9e2 100644 --- a/src/Polly/Caching/GenericCacheProvider.cs +++ b/src/Polly/Caching/GenericCacheProvider.cs @@ -1,6 +1,4 @@ -using System; - -namespace Polly.Caching; +namespace Polly.Caching; /// /// Provides a strongly-typed wrapper over a non-generic CacheProvider. diff --git a/src/Polly/Caching/GenericTtlStrategy.cs b/src/Polly/Caching/GenericTtlStrategy.cs index d0929a207e..69324097d3 100644 --- a/src/Polly/Caching/GenericTtlStrategy.cs +++ b/src/Polly/Caching/GenericTtlStrategy.cs @@ -1,6 +1,4 @@ -using System; - -namespace Polly.Caching; +namespace Polly.Caching; /// /// Represents a strongly-typed wrapper of a non-generic strategy. diff --git a/src/Polly/Caching/IAsyncCacheProvider.cs b/src/Polly/Caching/IAsyncCacheProvider.cs index be1c9df86d..fd3de957ee 100644 --- a/src/Polly/Caching/IAsyncCacheProvider.cs +++ b/src/Polly/Caching/IAsyncCacheProvider.cs @@ -1,7 +1,4 @@ -using System.Threading; -using System.Threading.Tasks; - -namespace Polly.Caching; +namespace Polly.Caching; /// /// Defines methods for classes providing asynchronous cache functionality for Polly s. diff --git a/src/Polly/Caching/NonSlidingTtl.cs b/src/Polly/Caching/NonSlidingTtl.cs index 8577816330..302a552df9 100644 --- a/src/Polly/Caching/NonSlidingTtl.cs +++ b/src/Polly/Caching/NonSlidingTtl.cs @@ -1,7 +1,4 @@ -using System; -using Polly.Utilities; - -namespace Polly.Caching; +namespace Polly.Caching; /// /// Represents an expiring at an absolute time, not with sliding expiration. diff --git a/src/Polly/Caching/RelativeTtl.cs b/src/Polly/Caching/RelativeTtl.cs index f5d118303d..1368c583cb 100644 --- a/src/Polly/Caching/RelativeTtl.cs +++ b/src/Polly/Caching/RelativeTtl.cs @@ -1,6 +1,4 @@ -using System; - -namespace Polly.Caching; +namespace Polly.Caching; /// /// Defines a ttl strategy which will cache items for the specified time. diff --git a/src/Polly/Caching/ResultTtl.cs b/src/Polly/Caching/ResultTtl.cs index c17c06ba86..a340626e6a 100644 --- a/src/Polly/Caching/ResultTtl.cs +++ b/src/Polly/Caching/ResultTtl.cs @@ -1,6 +1,4 @@ -using System; - -namespace Polly.Caching; +namespace Polly.Caching; /// /// Defines a ttl strategy which can calculate a duration to cache items dynamically based on the execution context and result of the execution. diff --git a/src/Polly/Caching/SerializingCacheProvider.cs b/src/Polly/Caching/SerializingCacheProvider.cs index a233e23d17..7a8800cd40 100644 --- a/src/Polly/Caching/SerializingCacheProvider.cs +++ b/src/Polly/Caching/SerializingCacheProvider.cs @@ -1,6 +1,4 @@ -using System; - -namespace Polly.Caching; +namespace Polly.Caching; /// /// Defines an which serializes objects of any type in and out of an underlying cache which caches as type . For use with synchronous . diff --git a/src/Polly/Caching/SlidingTtl.cs b/src/Polly/Caching/SlidingTtl.cs index 678538500f..b9586bff38 100644 --- a/src/Polly/Caching/SlidingTtl.cs +++ b/src/Polly/Caching/SlidingTtl.cs @@ -1,6 +1,4 @@ -using System; - -namespace Polly.Caching; +namespace Polly.Caching; /// /// Defines a ttl strategy which will cache items with a sliding ttl. diff --git a/src/Polly/Caching/Ttl.cs b/src/Polly/Caching/Ttl.cs index 49c393ce82..a65d35d64c 100644 --- a/src/Polly/Caching/Ttl.cs +++ b/src/Polly/Caching/Ttl.cs @@ -1,6 +1,4 @@ -using System; - -namespace Polly.Caching; +namespace Polly.Caching; /// /// Represents a time-to-live for a given cache item. diff --git a/src/Polly/CircuitBreaker/AdvancedCircuitBreakerSyntax.cs b/src/Polly/CircuitBreaker/AdvancedCircuitBreakerSyntax.cs index 9e4cd68617..8890835d41 100644 --- a/src/Polly/CircuitBreaker/AdvancedCircuitBreakerSyntax.cs +++ b/src/Polly/CircuitBreaker/AdvancedCircuitBreakerSyntax.cs @@ -1,7 +1,3 @@ -using System; -using Polly.CircuitBreaker; -using Polly.Utilities; - namespace Polly; /// diff --git a/src/Polly/CircuitBreaker/AdvancedCircuitBreakerTResultSyntax.cs b/src/Polly/CircuitBreaker/AdvancedCircuitBreakerTResultSyntax.cs index ccb172930f..c0ec003fc3 100644 --- a/src/Polly/CircuitBreaker/AdvancedCircuitBreakerTResultSyntax.cs +++ b/src/Polly/CircuitBreaker/AdvancedCircuitBreakerTResultSyntax.cs @@ -1,8 +1,4 @@ -using System; -using Polly.CircuitBreaker; -using Polly.Utilities; - -namespace Polly; +namespace Polly; /// /// Fluent API for defining a Circuit Breaker . diff --git a/src/Polly/CircuitBreaker/AdvancedCircuitController.cs b/src/Polly/CircuitBreaker/AdvancedCircuitController.cs index 778f5e0a46..9a79dda5be 100644 --- a/src/Polly/CircuitBreaker/AdvancedCircuitController.cs +++ b/src/Polly/CircuitBreaker/AdvancedCircuitController.cs @@ -1,7 +1,4 @@ -using System; -using Polly.Utilities; - -namespace Polly.CircuitBreaker; +namespace Polly.CircuitBreaker; internal class AdvancedCircuitController : CircuitStateController { diff --git a/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerSyntax.cs b/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerSyntax.cs index ffc88a1234..eb057bcce9 100644 --- a/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerSyntax.cs +++ b/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerSyntax.cs @@ -1,8 +1,4 @@ -using System; -using Polly.CircuitBreaker; -using Polly.Utilities; - -namespace Polly; +namespace Polly; /// /// Fluent API for defining a Circuit Breaker . diff --git a/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerTResultSyntax.cs b/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerTResultSyntax.cs index e688d341c5..0dd3cfbc0c 100644 --- a/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerTResultSyntax.cs +++ b/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerTResultSyntax.cs @@ -1,7 +1,3 @@ -using System; -using Polly.CircuitBreaker; -using Polly.Utilities; - namespace Polly; /// diff --git a/src/Polly/CircuitBreaker/AsyncCircuitBreakerEngine.cs b/src/Polly/CircuitBreaker/AsyncCircuitBreakerEngine.cs index cfc8290b68..d0c2e479d8 100644 --- a/src/Polly/CircuitBreaker/AsyncCircuitBreakerEngine.cs +++ b/src/Polly/CircuitBreaker/AsyncCircuitBreakerEngine.cs @@ -1,9 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using Polly.Utilities; - -namespace Polly.CircuitBreaker; +namespace Polly.CircuitBreaker; internal class AsyncCircuitBreakerEngine { diff --git a/src/Polly/CircuitBreaker/AsyncCircuitBreakerPolicy.cs b/src/Polly/CircuitBreaker/AsyncCircuitBreakerPolicy.cs index ac958850da..a1781ceeb8 100644 --- a/src/Polly/CircuitBreaker/AsyncCircuitBreakerPolicy.cs +++ b/src/Polly/CircuitBreaker/AsyncCircuitBreakerPolicy.cs @@ -1,10 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; -using Polly.Utilities; - -namespace Polly.CircuitBreaker; +namespace Polly.CircuitBreaker; /// /// A circuit-breaker policy that can be applied to async delegates. diff --git a/src/Polly/CircuitBreaker/AsyncCircuitBreakerSyntax.cs b/src/Polly/CircuitBreaker/AsyncCircuitBreakerSyntax.cs index cd2f10d222..3948781d03 100644 --- a/src/Polly/CircuitBreaker/AsyncCircuitBreakerSyntax.cs +++ b/src/Polly/CircuitBreaker/AsyncCircuitBreakerSyntax.cs @@ -1,8 +1,4 @@ -using System; -using Polly.CircuitBreaker; -using Polly.Utilities; - -namespace Polly; +namespace Polly; /// /// Fluent API for defining a Circuit Breaker . diff --git a/src/Polly/CircuitBreaker/AsyncCircuitBreakerTResultSyntax.cs b/src/Polly/CircuitBreaker/AsyncCircuitBreakerTResultSyntax.cs index a02f185c2b..556eb1ee2e 100644 --- a/src/Polly/CircuitBreaker/AsyncCircuitBreakerTResultSyntax.cs +++ b/src/Polly/CircuitBreaker/AsyncCircuitBreakerTResultSyntax.cs @@ -1,7 +1,4 @@ -using System; -using Polly.CircuitBreaker; - -namespace Polly; +namespace Polly; /// /// Fluent API for defining a Circuit Breaker . diff --git a/src/Polly/CircuitBreaker/BrokenCircuitException.cs b/src/Polly/CircuitBreaker/BrokenCircuitException.cs index cf379641d9..ff6a0d0d29 100644 --- a/src/Polly/CircuitBreaker/BrokenCircuitException.cs +++ b/src/Polly/CircuitBreaker/BrokenCircuitException.cs @@ -1,6 +1,4 @@ -using System; - -#if NETSTANDARD2_0 +#if NETSTANDARD2_0 using System.Runtime.Serialization; #endif diff --git a/src/Polly/CircuitBreaker/CircuitBreakerEngine.cs b/src/Polly/CircuitBreaker/CircuitBreakerEngine.cs index 773615b520..87fe9b4d90 100644 --- a/src/Polly/CircuitBreaker/CircuitBreakerEngine.cs +++ b/src/Polly/CircuitBreaker/CircuitBreakerEngine.cs @@ -1,6 +1,4 @@ -using System; -using System.Runtime.ExceptionServices; -using System.Threading; +using System.Runtime.ExceptionServices; namespace Polly.CircuitBreaker; diff --git a/src/Polly/CircuitBreaker/CircuitBreakerPolicy.cs b/src/Polly/CircuitBreaker/CircuitBreakerPolicy.cs index 0dee7c425b..4cabe098c4 100644 --- a/src/Polly/CircuitBreaker/CircuitBreakerPolicy.cs +++ b/src/Polly/CircuitBreaker/CircuitBreakerPolicy.cs @@ -1,9 +1,4 @@ -using System; -using System.Diagnostics; -using Polly.Utilities; -using System.Threading; - -namespace Polly.CircuitBreaker; +namespace Polly.CircuitBreaker; /// /// A circuit-breaker policy that can be applied to delegates. diff --git a/src/Polly/CircuitBreaker/CircuitBreakerSyntax.cs b/src/Polly/CircuitBreaker/CircuitBreakerSyntax.cs index c1819b6c2e..1c601901f2 100644 --- a/src/Polly/CircuitBreaker/CircuitBreakerSyntax.cs +++ b/src/Polly/CircuitBreaker/CircuitBreakerSyntax.cs @@ -1,7 +1,3 @@ -using System; -using Polly.CircuitBreaker; -using Polly.Utilities; - namespace Polly; /// diff --git a/src/Polly/CircuitBreaker/CircuitBreakerTResultSyntax.cs b/src/Polly/CircuitBreaker/CircuitBreakerTResultSyntax.cs index 300a1b486b..4a2bd24f66 100644 --- a/src/Polly/CircuitBreaker/CircuitBreakerTResultSyntax.cs +++ b/src/Polly/CircuitBreaker/CircuitBreakerTResultSyntax.cs @@ -1,7 +1,4 @@ -using System; -using Polly.CircuitBreaker; - -namespace Polly; +namespace Polly; /// /// Fluent API for defining a Circuit Breaker . diff --git a/src/Polly/CircuitBreaker/CircuitStateController.cs b/src/Polly/CircuitBreaker/CircuitStateController.cs index f7073c08b7..7f8345dbff 100644 --- a/src/Polly/CircuitBreaker/CircuitStateController.cs +++ b/src/Polly/CircuitBreaker/CircuitStateController.cs @@ -1,8 +1,4 @@ -using System; -using System.Threading; -using Polly.Utilities; - -namespace Polly.CircuitBreaker; +namespace Polly.CircuitBreaker; internal abstract class CircuitStateController : ICircuitController { diff --git a/src/Polly/CircuitBreaker/ConsecutiveCountCircuitController.cs b/src/Polly/CircuitBreaker/ConsecutiveCountCircuitController.cs index 562288d21d..9da663a9ec 100644 --- a/src/Polly/CircuitBreaker/ConsecutiveCountCircuitController.cs +++ b/src/Polly/CircuitBreaker/ConsecutiveCountCircuitController.cs @@ -1,7 +1,4 @@ -using System; -using Polly.Utilities; - -namespace Polly.CircuitBreaker; +namespace Polly.CircuitBreaker; internal class ConsecutiveCountCircuitController : CircuitStateController { diff --git a/src/Polly/CircuitBreaker/ICircuitBreakerPolicy.cs b/src/Polly/CircuitBreaker/ICircuitBreakerPolicy.cs index 73adf6de2e..2c0f882ac9 100644 --- a/src/Polly/CircuitBreaker/ICircuitBreakerPolicy.cs +++ b/src/Polly/CircuitBreaker/ICircuitBreakerPolicy.cs @@ -1,6 +1,4 @@ -using System; - -namespace Polly.CircuitBreaker; +namespace Polly.CircuitBreaker; /// /// Defines properties and methods common to all circuit-breaker policies. diff --git a/src/Polly/CircuitBreaker/ICircuitController.cs b/src/Polly/CircuitBreaker/ICircuitController.cs index ffa28137c2..a6f28a6550 100644 --- a/src/Polly/CircuitBreaker/ICircuitController.cs +++ b/src/Polly/CircuitBreaker/ICircuitController.cs @@ -1,6 +1,4 @@ -using System; - -namespace Polly.CircuitBreaker; +namespace Polly.CircuitBreaker; internal interface ICircuitController { diff --git a/src/Polly/CircuitBreaker/IsolatedCircuitException.cs b/src/Polly/CircuitBreaker/IsolatedCircuitException.cs index ee8e9f7d79..124bcf63b5 100644 --- a/src/Polly/CircuitBreaker/IsolatedCircuitException.cs +++ b/src/Polly/CircuitBreaker/IsolatedCircuitException.cs @@ -1,5 +1,4 @@ #if NETSTANDARD2_0 -using System; using System.Runtime.Serialization; #endif diff --git a/src/Polly/CircuitBreaker/RollingHealthMetrics.cs b/src/Polly/CircuitBreaker/RollingHealthMetrics.cs index 1e41e113fe..12f993ad32 100644 --- a/src/Polly/CircuitBreaker/RollingHealthMetrics.cs +++ b/src/Polly/CircuitBreaker/RollingHealthMetrics.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using Polly.Utilities; - -namespace Polly.CircuitBreaker; +namespace Polly.CircuitBreaker; internal class RollingHealthMetrics : IHealthMetrics { diff --git a/src/Polly/CircuitBreaker/SingleHealthMetrics.cs b/src/Polly/CircuitBreaker/SingleHealthMetrics.cs index 67be8f3be9..58826db98e 100644 --- a/src/Polly/CircuitBreaker/SingleHealthMetrics.cs +++ b/src/Polly/CircuitBreaker/SingleHealthMetrics.cs @@ -1,7 +1,4 @@ -using System; -using Polly.Utilities; - -namespace Polly.CircuitBreaker; +namespace Polly.CircuitBreaker; internal class SingleHealthMetrics : IHealthMetrics { diff --git a/src/Polly/Context.Dictionary.cs b/src/Polly/Context.Dictionary.cs index 6dd027fb02..88c0d792c0 100644 --- a/src/Polly/Context.Dictionary.cs +++ b/src/Polly/Context.Dictionary.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections; -using System.Collections.Generic; - -namespace Polly; +namespace Polly; /// /// Context that carries with a single execution through a Policy. Commonly-used properties are directly on the class. Backed by a dictionary of string key / object value pairs, to which user-defined values may be added. diff --git a/src/Polly/Context.cs b/src/Polly/Context.cs index d814dc77b9..794d4bb464 100644 --- a/src/Polly/Context.cs +++ b/src/Polly/Context.cs @@ -1,7 +1,4 @@ -using System; -using Polly.Wrap; - -namespace Polly; +namespace Polly; /// /// Context that carries with a single execution through a Policy. Commonly-used properties are directly on the class. Backed by a dictionary of string key / object value pairs, to which user-defined values may be added. diff --git a/src/Polly/DelegateResult.cs b/src/Polly/DelegateResult.cs index ecde18d9bc..ad2abbcacb 100644 --- a/src/Polly/DelegateResult.cs +++ b/src/Polly/DelegateResult.cs @@ -1,6 +1,4 @@ -using System; - -namespace Polly; +namespace Polly; /// /// The captured outcome of executing an individual Func<TResult> diff --git a/src/Polly/ExceptionPredicate.cs b/src/Polly/ExceptionPredicate.cs index da5c263db4..52c5f11c03 100644 --- a/src/Polly/ExceptionPredicate.cs +++ b/src/Polly/ExceptionPredicate.cs @@ -1,6 +1,4 @@ -using System; - -namespace Polly; +namespace Polly; /// /// A predicate that can be run against a passed . diff --git a/src/Polly/ExceptionPredicates.cs b/src/Polly/ExceptionPredicates.cs index 964c6a9e81..dcc2aceb03 100644 --- a/src/Polly/ExceptionPredicates.cs +++ b/src/Polly/ExceptionPredicates.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; - -namespace Polly; +namespace Polly; /// /// A collection of predicates used to define whether a policy handles a given . diff --git a/src/Polly/ExecutionRejectedException.cs b/src/Polly/ExecutionRejectedException.cs index dec2b0af7e..3e6903758b 100644 --- a/src/Polly/ExecutionRejectedException.cs +++ b/src/Polly/ExecutionRejectedException.cs @@ -1,5 +1,4 @@ -using System; -#if NETSTANDARD2_0 +#if NETSTANDARD2_0 using System.Runtime.Serialization; #endif diff --git a/src/Polly/Fallback/AsyncFallbackEngine.cs b/src/Polly/Fallback/AsyncFallbackEngine.cs index 29f27e85f0..15e2d480cc 100644 --- a/src/Polly/Fallback/AsyncFallbackEngine.cs +++ b/src/Polly/Fallback/AsyncFallbackEngine.cs @@ -1,8 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; - -namespace Polly.Fallback; +namespace Polly.Fallback; internal class AsyncFallbackEngine { diff --git a/src/Polly/Fallback/AsyncFallbackPolicy.cs b/src/Polly/Fallback/AsyncFallbackPolicy.cs index 00c8bd06a3..96b3c6a179 100644 --- a/src/Polly/Fallback/AsyncFallbackPolicy.cs +++ b/src/Polly/Fallback/AsyncFallbackPolicy.cs @@ -1,10 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; -using Polly.Utilities; - -namespace Polly.Fallback; +namespace Polly.Fallback; /// /// A fallback policy that can be applied to asynchronous delegates. diff --git a/src/Polly/Fallback/AsyncFallbackSyntax.cs b/src/Polly/Fallback/AsyncFallbackSyntax.cs index 04749012a1..c7f95f7737 100644 --- a/src/Polly/Fallback/AsyncFallbackSyntax.cs +++ b/src/Polly/Fallback/AsyncFallbackSyntax.cs @@ -1,10 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using Polly.Fallback; -using Polly.Utilities; - -namespace Polly; +namespace Polly; /// /// Fluent API for defining a Fallback . diff --git a/src/Polly/Fallback/FallbackEngine.cs b/src/Polly/Fallback/FallbackEngine.cs index 2e7f4f4762..cb6223486b 100644 --- a/src/Polly/Fallback/FallbackEngine.cs +++ b/src/Polly/Fallback/FallbackEngine.cs @@ -1,7 +1,4 @@ -using System; -using System.Threading; - -namespace Polly.Fallback; +namespace Polly.Fallback; internal static class FallbackEngine { diff --git a/src/Polly/Fallback/FallbackPolicy.cs b/src/Polly/Fallback/FallbackPolicy.cs index c0035d4615..542b768f5e 100644 --- a/src/Polly/Fallback/FallbackPolicy.cs +++ b/src/Polly/Fallback/FallbackPolicy.cs @@ -1,9 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; -using Polly.Utilities; - -namespace Polly.Fallback; +namespace Polly.Fallback; /// /// A fallback policy that can be applied to delegates. diff --git a/src/Polly/Fallback/FallbackSyntax.cs b/src/Polly/Fallback/FallbackSyntax.cs index 0120ba74ff..d77f1dda6e 100644 --- a/src/Polly/Fallback/FallbackSyntax.cs +++ b/src/Polly/Fallback/FallbackSyntax.cs @@ -1,8 +1,4 @@ -using System; -using System.Threading; -using Polly.Fallback; - -namespace Polly; +namespace Polly; /// /// Fluent API for defining a Fallback policy. diff --git a/src/Polly/IAsyncPolicy.TResult.cs b/src/Polly/IAsyncPolicy.TResult.cs index 9b3b120e4f..647bb56c5c 100644 --- a/src/Polly/IAsyncPolicy.TResult.cs +++ b/src/Polly/IAsyncPolicy.TResult.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; - -namespace Polly; +namespace Polly; /// /// An interface defining all executions available on an asynchronous policy generic-typed for executions returning results of type . diff --git a/src/Polly/IAsyncPolicy.cs b/src/Polly/IAsyncPolicy.cs index c93424cea7..b9cd202e65 100644 --- a/src/Polly/IAsyncPolicy.cs +++ b/src/Polly/IAsyncPolicy.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; - -namespace Polly; +namespace Polly; /// /// An interface defining all executions available on a non-generic, asynchronous policy diff --git a/src/Polly/ISyncPolicy.TResult.cs b/src/Polly/ISyncPolicy.TResult.cs index 121a4dbc0a..d75e4e40ed 100644 --- a/src/Polly/ISyncPolicy.TResult.cs +++ b/src/Polly/ISyncPolicy.TResult.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; - -namespace Polly; +namespace Polly; /// /// An interface defining all executions available on a synchronous policy generic-typed for executions returning results of type . diff --git a/src/Polly/ISyncPolicy.cs b/src/Polly/ISyncPolicy.cs index 14dee2b9da..c2d8e195e7 100644 --- a/src/Polly/ISyncPolicy.cs +++ b/src/Polly/ISyncPolicy.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; - -namespace Polly; +namespace Polly; /// /// An interface defining all executions available on a non-generic, synchronous policy diff --git a/src/Polly/NoOp/AsyncNoOpPolicy.cs b/src/Polly/NoOp/AsyncNoOpPolicy.cs index 21041ffedf..ea01819ad6 100644 --- a/src/Polly/NoOp/AsyncNoOpPolicy.cs +++ b/src/Polly/NoOp/AsyncNoOpPolicy.cs @@ -1,9 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; - -namespace Polly.NoOp; +namespace Polly.NoOp; /// /// A noop policy that can be applied to asynchronous delegates. diff --git a/src/Polly/NoOp/AsyncNoOpSyntax.cs b/src/Polly/NoOp/AsyncNoOpSyntax.cs index d18a9b091c..51c2b35fed 100644 --- a/src/Polly/NoOp/AsyncNoOpSyntax.cs +++ b/src/Polly/NoOp/AsyncNoOpSyntax.cs @@ -1,6 +1,4 @@ -using Polly.NoOp; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/NoOp/AsyncNoOpTResultSyntax.cs b/src/Polly/NoOp/AsyncNoOpTResultSyntax.cs index bfa65dbea5..53bf687e28 100644 --- a/src/Polly/NoOp/AsyncNoOpTResultSyntax.cs +++ b/src/Polly/NoOp/AsyncNoOpTResultSyntax.cs @@ -1,6 +1,4 @@ -using Polly.NoOp; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/NoOp/NoOpEngine.cs b/src/Polly/NoOp/NoOpEngine.cs index 403a8c70a7..4efcc47cae 100644 --- a/src/Polly/NoOp/NoOpEngine.cs +++ b/src/Polly/NoOp/NoOpEngine.cs @@ -1,7 +1,4 @@ -using System; -using System.Threading; - -namespace Polly.NoOp; +namespace Polly.NoOp; internal static partial class NoOpEngine { diff --git a/src/Polly/NoOp/NoOpEngineAsync.cs b/src/Polly/NoOp/NoOpEngineAsync.cs index 6da9f2c481..8276b5f055 100644 --- a/src/Polly/NoOp/NoOpEngineAsync.cs +++ b/src/Polly/NoOp/NoOpEngineAsync.cs @@ -1,8 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; - -namespace Polly.NoOp; +namespace Polly.NoOp; internal static partial class NoOpEngine { diff --git a/src/Polly/NoOp/NoOpPolicy.cs b/src/Polly/NoOp/NoOpPolicy.cs index 5bfe9fb57e..64c641ca4e 100644 --- a/src/Polly/NoOp/NoOpPolicy.cs +++ b/src/Polly/NoOp/NoOpPolicy.cs @@ -1,8 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; - -namespace Polly.NoOp; +namespace Polly.NoOp; /// /// A no op policy that can be applied to delegates. diff --git a/src/Polly/NoOp/NoOpSyntax.cs b/src/Polly/NoOp/NoOpSyntax.cs index 149320a0a7..2ecf9a3d98 100644 --- a/src/Polly/NoOp/NoOpSyntax.cs +++ b/src/Polly/NoOp/NoOpSyntax.cs @@ -1,6 +1,4 @@ -using Polly.NoOp; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/NoOp/NoOpTResultSyntax.cs b/src/Polly/NoOp/NoOpTResultSyntax.cs index f5d768a7fe..933f183741 100644 --- a/src/Polly/NoOp/NoOpTResultSyntax.cs +++ b/src/Polly/NoOp/NoOpTResultSyntax.cs @@ -1,6 +1,4 @@ -using Polly.NoOp; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/Policy.ExecuteOverloads.cs b/src/Polly/Policy.ExecuteOverloads.cs index 67ad7fce17..e846fdff01 100644 --- a/src/Polly/Policy.ExecuteOverloads.cs +++ b/src/Polly/Policy.ExecuteOverloads.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Threading; - -namespace Polly; +namespace Polly; public abstract partial class Policy : ISyncPolicy { diff --git a/src/Polly/Policy.HandleSyntax.cs b/src/Polly/Policy.HandleSyntax.cs index a7879bd5b8..8f78983abd 100644 --- a/src/Polly/Policy.HandleSyntax.cs +++ b/src/Polly/Policy.HandleSyntax.cs @@ -1,6 +1,4 @@ -using System; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/Policy.SyncGenericImplementation.cs b/src/Polly/Policy.SyncGenericImplementation.cs index 70b5ca642d..51121e6d28 100644 --- a/src/Polly/Policy.SyncGenericImplementation.cs +++ b/src/Polly/Policy.SyncGenericImplementation.cs @@ -1,7 +1,4 @@ -using System; -using System.Threading; - -namespace Polly; +namespace Polly; public abstract partial class Policy { diff --git a/src/Polly/Policy.SyncNonGenericImplementation.cs b/src/Polly/Policy.SyncNonGenericImplementation.cs index 2e31537084..be070060bb 100644 --- a/src/Polly/Policy.SyncNonGenericImplementation.cs +++ b/src/Polly/Policy.SyncNonGenericImplementation.cs @@ -1,9 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; -using Polly.Utilities; - -namespace Polly; +namespace Polly; public abstract partial class Policy { diff --git a/src/Polly/Policy.TResult.ExecuteOverloads.cs b/src/Polly/Policy.TResult.ExecuteOverloads.cs index 52a33e195f..45bde2c843 100644 --- a/src/Polly/Policy.TResult.ExecuteOverloads.cs +++ b/src/Polly/Policy.TResult.ExecuteOverloads.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Threading; - - -namespace Polly; +namespace Polly; public abstract partial class Policy : ISyncPolicy { diff --git a/src/Polly/PolicyBase.ContextAndKeys.cs b/src/Polly/PolicyBase.ContextAndKeys.cs index 511bbfa37c..8ffd96e3cf 100644 --- a/src/Polly/PolicyBase.ContextAndKeys.cs +++ b/src/Polly/PolicyBase.ContextAndKeys.cs @@ -1,7 +1,4 @@ -using System; -using Polly.Utilities; - -namespace Polly; +namespace Polly; public abstract partial class PolicyBase { diff --git a/src/Polly/PolicyBase.cs b/src/Polly/PolicyBase.cs index 68ac86dc44..6e919b5b0b 100644 --- a/src/Polly/PolicyBase.cs +++ b/src/Polly/PolicyBase.cs @@ -1,7 +1,4 @@ -using System; -using System.Threading; - -namespace Polly; +namespace Polly; /// /// Implements elements common to both non-generic and generic policies, and sync and async policies. diff --git a/src/Polly/PolicyBuilder.OrSyntax.cs b/src/Polly/PolicyBuilder.OrSyntax.cs index 31f5347a66..eeb6e58813 100644 --- a/src/Polly/PolicyBuilder.OrSyntax.cs +++ b/src/Polly/PolicyBuilder.OrSyntax.cs @@ -1,6 +1,4 @@ -using System; - -namespace Polly; +namespace Polly; public partial class PolicyBuilder { diff --git a/src/Polly/PolicyBuilder.cs b/src/Polly/PolicyBuilder.cs index 69174532ad..c6e26ee172 100644 --- a/src/Polly/PolicyBuilder.cs +++ b/src/Polly/PolicyBuilder.cs @@ -1,5 +1,4 @@ -using System; -using System.ComponentModel; +using System.ComponentModel; namespace Polly; diff --git a/src/Polly/PolicyResult.cs b/src/Polly/PolicyResult.cs index 9af147e8c6..bab5961efa 100644 --- a/src/Polly/PolicyResult.cs +++ b/src/Polly/PolicyResult.cs @@ -1,6 +1,4 @@ -using System; - -namespace Polly; +namespace Polly; /// /// The captured result of executing a policy diff --git a/src/Polly/Polly.csproj b/src/Polly/Polly.csproj index 3a178d88f5..a1001d6b8d 100644 --- a/src/Polly/Polly.csproj +++ b/src/Polly/Polly.csproj @@ -33,6 +33,7 @@ + <_Parameter1>Polly.Specs, PublicKey=0024000004800000940000000602000000240000525341310004000001000100150819e3494f97263a3abdd18e5e0c47b04e6c0ede44a6c51d50b545d403ceeb7cbb32d18dbbbcdd1d88a87d7b73206b126be134b0609c36aa3cb31dd2e47e393293102809b8d77f192f3188618a42e651c14ebf05f8f5b76aa91b431642b23497ed82b65d63791cdaa31d4282a2d6cbabc3fe0745b6b6690c417cabf6a1349c diff --git a/src/Polly/RateLimit/AsyncRateLimitEngine.cs b/src/Polly/RateLimit/AsyncRateLimitEngine.cs index fabb362c3e..4e6b552906 100644 --- a/src/Polly/RateLimit/AsyncRateLimitEngine.cs +++ b/src/Polly/RateLimit/AsyncRateLimitEngine.cs @@ -1,8 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; - -namespace Polly.RateLimit; +namespace Polly.RateLimit; internal static class AsyncRateLimitEngine { diff --git a/src/Polly/RateLimit/AsyncRateLimitPolicy.cs b/src/Polly/RateLimit/AsyncRateLimitPolicy.cs index be7590aac2..9c977da2c2 100644 --- a/src/Polly/RateLimit/AsyncRateLimitPolicy.cs +++ b/src/Polly/RateLimit/AsyncRateLimitPolicy.cs @@ -1,9 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; - -namespace Polly.RateLimit; +namespace Polly.RateLimit; /// /// A rate-limit policy that can be applied to asynchronous delegates. diff --git a/src/Polly/RateLimit/AsyncRateLimitSyntax.cs b/src/Polly/RateLimit/AsyncRateLimitSyntax.cs index db0d681389..d090c96298 100644 --- a/src/Polly/RateLimit/AsyncRateLimitSyntax.cs +++ b/src/Polly/RateLimit/AsyncRateLimitSyntax.cs @@ -1,7 +1,4 @@ -using System; -using Polly.RateLimit; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/RateLimit/AsyncRateLimitTResultSyntax.cs b/src/Polly/RateLimit/AsyncRateLimitTResultSyntax.cs index 4844f88501..56a21fb52b 100644 --- a/src/Polly/RateLimit/AsyncRateLimitTResultSyntax.cs +++ b/src/Polly/RateLimit/AsyncRateLimitTResultSyntax.cs @@ -1,7 +1,4 @@ -using System; -using Polly.RateLimit; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/RateLimit/IRateLimiter.cs b/src/Polly/RateLimit/IRateLimiter.cs index 74919b97ae..d873e967ef 100644 --- a/src/Polly/RateLimit/IRateLimiter.cs +++ b/src/Polly/RateLimit/IRateLimiter.cs @@ -1,6 +1,4 @@ -using System; - -namespace Polly.RateLimit; +namespace Polly.RateLimit; /// /// Defines methods to be provided by a rate-limiter used in a Polly diff --git a/src/Polly/RateLimit/LockFreeTokenBucketRateLimiter.cs b/src/Polly/RateLimit/LockFreeTokenBucketRateLimiter.cs index 421dc64800..b67a3f2aba 100644 --- a/src/Polly/RateLimit/LockFreeTokenBucketRateLimiter.cs +++ b/src/Polly/RateLimit/LockFreeTokenBucketRateLimiter.cs @@ -1,8 +1,4 @@ -using System; -using System.Threading; -using Polly.Utilities; - -namespace Polly.RateLimit; +namespace Polly.RateLimit; /// /// A lock-free token-bucket rate-limiter for a Polly . diff --git a/src/Polly/RateLimit/RateLimitEngine.cs b/src/Polly/RateLimit/RateLimitEngine.cs index 80dd425362..6c85502592 100644 --- a/src/Polly/RateLimit/RateLimitEngine.cs +++ b/src/Polly/RateLimit/RateLimitEngine.cs @@ -1,7 +1,4 @@ -using System; -using System.Threading; - -namespace Polly.RateLimit; +namespace Polly.RateLimit; internal static class RateLimitEngine { diff --git a/src/Polly/RateLimit/RateLimitPolicy.cs b/src/Polly/RateLimit/RateLimitPolicy.cs index f1a09defc6..68716d1b59 100644 --- a/src/Polly/RateLimit/RateLimitPolicy.cs +++ b/src/Polly/RateLimit/RateLimitPolicy.cs @@ -1,8 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; - -namespace Polly.RateLimit; +namespace Polly.RateLimit; /// /// A rate-limit policy that can be applied to synchronous delegates. diff --git a/src/Polly/RateLimit/RateLimitRejectedException.cs b/src/Polly/RateLimit/RateLimitRejectedException.cs index f2043e569e..4f768ddafb 100644 --- a/src/Polly/RateLimit/RateLimitRejectedException.cs +++ b/src/Polly/RateLimit/RateLimitRejectedException.cs @@ -1,5 +1,4 @@ -using System; -#if NETSTANDARD2_0 +#if NETSTANDARD2_0 using System.Runtime.Serialization; #endif diff --git a/src/Polly/RateLimit/RateLimitSyntax.cs b/src/Polly/RateLimit/RateLimitSyntax.cs index 5f509c9eb6..fd6e8141cc 100644 --- a/src/Polly/RateLimit/RateLimitSyntax.cs +++ b/src/Polly/RateLimit/RateLimitSyntax.cs @@ -1,7 +1,4 @@ -using System; -using Polly.RateLimit; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/RateLimit/RateLimitTResultSyntax.cs b/src/Polly/RateLimit/RateLimitTResultSyntax.cs index b6f09c6113..2fb31ba8d9 100644 --- a/src/Polly/RateLimit/RateLimitTResultSyntax.cs +++ b/src/Polly/RateLimit/RateLimitTResultSyntax.cs @@ -1,7 +1,4 @@ -using System; -using Polly.RateLimit; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/RateLimit/RateLimiterFactory.cs b/src/Polly/RateLimit/RateLimiterFactory.cs index 70bf40f2ec..d00033684d 100644 --- a/src/Polly/RateLimit/RateLimiterFactory.cs +++ b/src/Polly/RateLimit/RateLimiterFactory.cs @@ -1,6 +1,4 @@ -using System; - -namespace Polly.RateLimit; +namespace Polly.RateLimit; internal static class RateLimiterFactory { diff --git a/src/Polly/Registry/IConcurrentPolicyRegistry.cs b/src/Polly/Registry/IConcurrentPolicyRegistry.cs index 8b5a2a3dc8..9ed179e31f 100644 --- a/src/Polly/Registry/IConcurrentPolicyRegistry.cs +++ b/src/Polly/Registry/IConcurrentPolicyRegistry.cs @@ -1,6 +1,4 @@ -using System; - -namespace Polly.Registry; +namespace Polly.Registry; /// /// Represents a collection of policies keyed by which can be updated and consumed in a thread-safe manner. diff --git a/src/Polly/Registry/IPolicyRegistry.cs b/src/Polly/Registry/IPolicyRegistry.cs index 0cce3451a0..5ba13b4d55 100644 --- a/src/Polly/Registry/IPolicyRegistry.cs +++ b/src/Polly/Registry/IPolicyRegistry.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; - -namespace Polly.Registry; +namespace Polly.Registry; /// /// Represents a collection of policies keyed by . diff --git a/src/Polly/Registry/IReadOnlyPolicyRegistry.cs b/src/Polly/Registry/IReadOnlyPolicyRegistry.cs index c938c637c6..56f68fadd9 100644 --- a/src/Polly/Registry/IReadOnlyPolicyRegistry.cs +++ b/src/Polly/Registry/IReadOnlyPolicyRegistry.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; - -namespace Polly.Registry; +namespace Polly.Registry; /// /// Represents a read-only collection of policies keyed by . diff --git a/src/Polly/Registry/PolicyRegistry.cs b/src/Polly/Registry/PolicyRegistry.cs index 0da0fd538a..7d9d42f520 100644 --- a/src/Polly/Registry/PolicyRegistry.cs +++ b/src/Polly/Registry/PolicyRegistry.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.Concurrent; - -namespace Polly.Registry; +namespace Polly.Registry; /// /// diff --git a/src/Polly/ResultPredicates.cs b/src/Polly/ResultPredicates.cs index 293ccfbb35..52abd86980 100644 --- a/src/Polly/ResultPredicates.cs +++ b/src/Polly/ResultPredicates.cs @@ -1,7 +1,4 @@ -using System.Collections.Generic; -using System.Linq; - -namespace Polly; +namespace Polly; /// /// A collection of predicates used to define whether a policy handles a given value. diff --git a/src/Polly/Retry/AsyncRetryEngine.cs b/src/Polly/Retry/AsyncRetryEngine.cs index dc8997e573..8eb287e6e6 100644 --- a/src/Polly/Retry/AsyncRetryEngine.cs +++ b/src/Polly/Retry/AsyncRetryEngine.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using Polly.Utilities; - -namespace Polly.Retry; +namespace Polly.Retry; internal static class AsyncRetryEngine { diff --git a/src/Polly/Retry/AsyncRetryPolicy.cs b/src/Polly/Retry/AsyncRetryPolicy.cs index 13dc5431db..f09e771dba 100644 --- a/src/Polly/Retry/AsyncRetryPolicy.cs +++ b/src/Polly/Retry/AsyncRetryPolicy.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; - -namespace Polly.Retry; +namespace Polly.Retry; /// /// A retry policy that can be applied to asynchronous delegates. diff --git a/src/Polly/Retry/AsyncRetrySyntax.cs b/src/Polly/Retry/AsyncRetrySyntax.cs index b494e88857..970b9bd536 100644 --- a/src/Polly/Retry/AsyncRetrySyntax.cs +++ b/src/Polly/Retry/AsyncRetrySyntax.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Polly.Retry; - -namespace Polly; +namespace Polly; /// /// Fluent API for defining a . diff --git a/src/Polly/Retry/AsyncRetryTResultSyntax.cs b/src/Polly/Retry/AsyncRetryTResultSyntax.cs index a50abd1714..fac92e9445 100644 --- a/src/Polly/Retry/AsyncRetryTResultSyntax.cs +++ b/src/Polly/Retry/AsyncRetryTResultSyntax.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Polly.Retry; - -namespace Polly; +namespace Polly; /// /// Fluent API for defining an . diff --git a/src/Polly/Retry/RetryEngine.cs b/src/Polly/Retry/RetryEngine.cs index db9b90237c..1773d0890d 100644 --- a/src/Polly/Retry/RetryEngine.cs +++ b/src/Polly/Retry/RetryEngine.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using Polly.Utilities; - -namespace Polly.Retry; +namespace Polly.Retry; internal static class RetryEngine { diff --git a/src/Polly/Retry/RetryPolicy.cs b/src/Polly/Retry/RetryPolicy.cs index 3efe0d1f99..8f043d18f6 100644 --- a/src/Polly/Retry/RetryPolicy.cs +++ b/src/Polly/Retry/RetryPolicy.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Threading; - -namespace Polly.Retry; +namespace Polly.Retry; /// /// A retry policy that can be applied to synchronous delegates. diff --git a/src/Polly/Retry/RetrySyntax.cs b/src/Polly/Retry/RetrySyntax.cs index a440a4e9d3..09f5800e71 100644 --- a/src/Polly/Retry/RetrySyntax.cs +++ b/src/Polly/Retry/RetrySyntax.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Polly.Retry; - -namespace Polly; +namespace Polly; /// /// Fluent API for defining a Retry . diff --git a/src/Polly/Retry/RetryTResultSyntax.cs b/src/Polly/Retry/RetryTResultSyntax.cs index 0183dbd6bb..a98ebb88c4 100644 --- a/src/Polly/Retry/RetryTResultSyntax.cs +++ b/src/Polly/Retry/RetryTResultSyntax.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using Polly.Retry; -using System.Linq; - -namespace Polly; +namespace Polly; /// /// Fluent API for defining a Retry . diff --git a/src/Polly/Timeout/AsyncTimeoutEngine.cs b/src/Polly/Timeout/AsyncTimeoutEngine.cs index 8cb7568a87..da85c341d2 100644 --- a/src/Polly/Timeout/AsyncTimeoutEngine.cs +++ b/src/Polly/Timeout/AsyncTimeoutEngine.cs @@ -1,9 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using Polly.Utilities; - -namespace Polly.Timeout; +namespace Polly.Timeout; internal static class AsyncTimeoutEngine { diff --git a/src/Polly/Timeout/AsyncTimeoutPolicy.cs b/src/Polly/Timeout/AsyncTimeoutPolicy.cs index b298195d79..fff9141eae 100644 --- a/src/Polly/Timeout/AsyncTimeoutPolicy.cs +++ b/src/Polly/Timeout/AsyncTimeoutPolicy.cs @@ -1,9 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; - -namespace Polly.Timeout; +namespace Polly.Timeout; /// /// A timeout policy which can be applied to async delegates. diff --git a/src/Polly/Timeout/AsyncTimeoutSyntax.cs b/src/Polly/Timeout/AsyncTimeoutSyntax.cs index be177da0e6..0be1002e3b 100644 --- a/src/Polly/Timeout/AsyncTimeoutSyntax.cs +++ b/src/Polly/Timeout/AsyncTimeoutSyntax.cs @@ -1,9 +1,4 @@ -using System; -using System.Threading.Tasks; -using Polly.Timeout; -using Polly.Utilities; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/Timeout/AsyncTimeoutTResultSyntax.cs b/src/Polly/Timeout/AsyncTimeoutTResultSyntax.cs index 7b46b803ff..3f4a5a5c69 100644 --- a/src/Polly/Timeout/AsyncTimeoutTResultSyntax.cs +++ b/src/Polly/Timeout/AsyncTimeoutTResultSyntax.cs @@ -1,8 +1,4 @@ -using System; -using System.Threading.Tasks; -using Polly.Timeout; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/Timeout/TimeoutEngine.cs b/src/Polly/Timeout/TimeoutEngine.cs index 002cddc109..77c19585ff 100644 --- a/src/Polly/Timeout/TimeoutEngine.cs +++ b/src/Polly/Timeout/TimeoutEngine.cs @@ -1,8 +1,4 @@ -using System; -using System.Runtime.ExceptionServices; -using System.Threading; -using System.Threading.Tasks; -using Polly.Utilities; +using System.Runtime.ExceptionServices; namespace Polly.Timeout; diff --git a/src/Polly/Timeout/TimeoutPolicy.cs b/src/Polly/Timeout/TimeoutPolicy.cs index a6b0621078..52b82c3303 100644 --- a/src/Polly/Timeout/TimeoutPolicy.cs +++ b/src/Polly/Timeout/TimeoutPolicy.cs @@ -1,9 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; - -namespace Polly.Timeout; +namespace Polly.Timeout; /// /// A timeout policy which can be applied to delegates. diff --git a/src/Polly/Timeout/TimeoutRejectedException.cs b/src/Polly/Timeout/TimeoutRejectedException.cs index 6d89972826..17707fcac0 100644 --- a/src/Polly/Timeout/TimeoutRejectedException.cs +++ b/src/Polly/Timeout/TimeoutRejectedException.cs @@ -1,5 +1,4 @@ -using System; -#if NETSTANDARD2_0 +#if NETSTANDARD2_0 using System.Runtime.Serialization; #endif diff --git a/src/Polly/Timeout/TimeoutStrategy.cs b/src/Polly/Timeout/TimeoutStrategy.cs index cb16a1fc85..ae183b88a2 100644 --- a/src/Polly/Timeout/TimeoutStrategy.cs +++ b/src/Polly/Timeout/TimeoutStrategy.cs @@ -1,6 +1,4 @@ -using System.Threading; - -namespace Polly.Timeout; +namespace Polly.Timeout; /// /// Defines strategies used by s to enforce timeouts. diff --git a/src/Polly/Timeout/TimeoutSyntax.cs b/src/Polly/Timeout/TimeoutSyntax.cs index e66e157b6f..0e04e5a0a2 100644 --- a/src/Polly/Timeout/TimeoutSyntax.cs +++ b/src/Polly/Timeout/TimeoutSyntax.cs @@ -1,8 +1,4 @@ -using Polly.Timeout; -using System; -using System.Threading.Tasks; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/Timeout/TimeoutTResultSyntax.cs b/src/Polly/Timeout/TimeoutTResultSyntax.cs index 4c1724d6d0..11f8854bc1 100644 --- a/src/Polly/Timeout/TimeoutTResultSyntax.cs +++ b/src/Polly/Timeout/TimeoutTResultSyntax.cs @@ -1,8 +1,4 @@ -using System; -using Polly.Timeout; -using System.Threading.Tasks; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/Timeout/TimeoutValidator.cs b/src/Polly/Timeout/TimeoutValidator.cs index 0d6692b959..f47b06963d 100644 --- a/src/Polly/Timeout/TimeoutValidator.cs +++ b/src/Polly/Timeout/TimeoutValidator.cs @@ -1,6 +1,4 @@ -using System; - -namespace Polly.Timeout; +namespace Polly.Timeout; internal static class TimeoutValidator { diff --git a/src/Polly/Utilities/ExceptionExtensions.cs b/src/Polly/Utilities/ExceptionExtensions.cs index d60cddd49d..7472b38792 100644 --- a/src/Polly/Utilities/ExceptionExtensions.cs +++ b/src/Polly/Utilities/ExceptionExtensions.cs @@ -1,5 +1,4 @@ -using System; -using System.Runtime.ExceptionServices; +using System.Runtime.ExceptionServices; namespace Polly.Utilities; diff --git a/src/Polly/Utilities/KeyHelper.cs b/src/Polly/Utilities/KeyHelper.cs index d4c19bd3c7..fcdcfa19fc 100644 --- a/src/Polly/Utilities/KeyHelper.cs +++ b/src/Polly/Utilities/KeyHelper.cs @@ -1,6 +1,4 @@ -using System; - -namespace Polly.Utilities; +namespace Polly.Utilities; internal static class KeyHelper { diff --git a/src/Polly/Utilities/SystemClock.cs b/src/Polly/Utilities/SystemClock.cs index d2ea47c77c..f378c6b50e 100644 --- a/src/Polly/Utilities/SystemClock.cs +++ b/src/Polly/Utilities/SystemClock.cs @@ -1,8 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; - -namespace Polly.Utilities; +namespace Polly.Utilities; /// /// Time related delegates used to support different compilation targets and to improve testability of the code. diff --git a/src/Polly/Utilities/TaskHelper.cs b/src/Polly/Utilities/TaskHelper.cs index 82cb36491d..44bf57db4f 100644 --- a/src/Polly/Utilities/TaskHelper.cs +++ b/src/Polly/Utilities/TaskHelper.cs @@ -1,6 +1,4 @@ -using System.Threading.Tasks; - -namespace Polly.Utilities; +namespace Polly.Utilities; /// /// Task helpers. diff --git a/src/Polly/Utilities/TimedLock.cs b/src/Polly/Utilities/TimedLock.cs index 02a2c8fc38..35581f2244 100644 --- a/src/Polly/Utilities/TimedLock.cs +++ b/src/Polly/Utilities/TimedLock.cs @@ -1,7 +1,4 @@ -using System; -using System.Threading; - -namespace Polly.Utilities; +namespace Polly.Utilities; // Adapted from the link below, with slight modifications. diff --git a/src/Polly/Wrap/AsyncPolicyWrap.cs b/src/Polly/Wrap/AsyncPolicyWrap.cs index 90effaebef..02765aad3a 100644 --- a/src/Polly/Wrap/AsyncPolicyWrap.cs +++ b/src/Polly/Wrap/AsyncPolicyWrap.cs @@ -1,9 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; - -namespace Polly.Wrap; +namespace Polly.Wrap; /// /// A policy that allows two (and by recursion more) async Polly policies to wrap executions of async delegates. diff --git a/src/Polly/Wrap/AsyncPolicyWrapEngine.cs b/src/Polly/Wrap/AsyncPolicyWrapEngine.cs index 0a196ae038..cbeaead579 100644 --- a/src/Polly/Wrap/AsyncPolicyWrapEngine.cs +++ b/src/Polly/Wrap/AsyncPolicyWrapEngine.cs @@ -1,8 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; - -namespace Polly.Wrap; +namespace Polly.Wrap; internal static class AsyncPolicyWrapEngine { diff --git a/src/Polly/Wrap/AsyncPolicyWrapSyntax.cs b/src/Polly/Wrap/AsyncPolicyWrapSyntax.cs index fc013078b7..331656823d 100644 --- a/src/Polly/Wrap/AsyncPolicyWrapSyntax.cs +++ b/src/Polly/Wrap/AsyncPolicyWrapSyntax.cs @@ -1,8 +1,4 @@ -using System; -using System.Linq; -using Polly.Wrap; - -namespace Polly; +namespace Polly; public partial class AsyncPolicy { diff --git a/src/Polly/Wrap/IPolicyWrapExtension.cs b/src/Polly/Wrap/IPolicyWrapExtension.cs index 3348254894..f02aae7706 100644 --- a/src/Polly/Wrap/IPolicyWrapExtension.cs +++ b/src/Polly/Wrap/IPolicyWrapExtension.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; - -namespace Polly.Wrap; +namespace Polly.Wrap; /// /// Extension methods for IPolicyWrap. diff --git a/src/Polly/Wrap/PolicyWrap.cs b/src/Polly/Wrap/PolicyWrap.cs index 1cbbf3bf64..48e13629aa 100644 --- a/src/Polly/Wrap/PolicyWrap.cs +++ b/src/Polly/Wrap/PolicyWrap.cs @@ -1,8 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; - -namespace Polly.Wrap; +namespace Polly.Wrap; /// /// A policy that allows two (and by recursion more) Polly policies to wrap executions of delegates. diff --git a/src/Polly/Wrap/PolicyWrapEngine.cs b/src/Polly/Wrap/PolicyWrapEngine.cs index 508882d272..1a52e3dc51 100644 --- a/src/Polly/Wrap/PolicyWrapEngine.cs +++ b/src/Polly/Wrap/PolicyWrapEngine.cs @@ -1,7 +1,4 @@ -using System; -using System.Threading; - -namespace Polly.Wrap; +namespace Polly.Wrap; internal static class PolicyWrapEngine { diff --git a/src/Polly/Wrap/PolicyWrapSyntax.cs b/src/Polly/Wrap/PolicyWrapSyntax.cs index 0a057f6d82..7dd1163dde 100644 --- a/src/Polly/Wrap/PolicyWrapSyntax.cs +++ b/src/Polly/Wrap/PolicyWrapSyntax.cs @@ -1,8 +1,4 @@ -using System; -using System.Linq; -using Polly.Wrap; - -namespace Polly; +namespace Polly; public partial class Policy {