From 73cab2f11cd5af670e010aeddfb4ca1203109201 Mon Sep 17 00:00:00 2001 From: Simon Cropp Date: Sun, 8 Jan 2023 20:45:26 +1100 Subject: [PATCH 1/4] . --- src/Directory.Build.props | 1 + src/Polly.Benchmarks/Bulkhead.cs | 4 +--- src/Polly.Benchmarks/Cache.cs | 5 +---- src/Polly.Benchmarks/CircuitBreaker.cs | 5 +---- src/Polly.Benchmarks/Fallback.cs | 4 +--- src/Polly.Benchmarks/NoOp.cs | 4 +--- src/Polly.Benchmarks/PolicyWrap.cs | 5 +---- src/Polly.Benchmarks/RateLimit.cs | 4 +--- src/Polly.Benchmarks/Retry.cs | 5 +---- src/Polly.Benchmarks/Timeout.cs | 5 +---- src/Polly.Benchmarks/Workloads.cs | 6 +----- src/Polly.Specs/Bulkhead/BulkheadAsyncSpecs.cs | 5 +---- src/Polly.Specs/Bulkhead/BulkheadScenarios.cs | 1 - src/Polly.Specs/Bulkhead/BulkheadSpecs.cs | 4 +--- src/Polly.Specs/Bulkhead/BulkheadSpecsBase.cs | 6 +----- src/Polly.Specs/Bulkhead/BulkheadTResultAsyncSpecs.cs | 5 +---- src/Polly.Specs/Bulkhead/BulkheadTResultSpecs.cs | 5 +---- src/Polly.Specs/Caching/AbsoluteTtlSpecs.cs | 3 +-- src/Polly.Specs/Caching/CacheAsyncSpecs.cs | 5 +---- src/Polly.Specs/Caching/CacheSpecs.cs | 4 +--- src/Polly.Specs/Caching/CacheTResultAsyncSpecs.cs | 5 +---- src/Polly.Specs/Caching/CacheTResultSpecs.cs | 4 +--- src/Polly.Specs/Caching/ContextualTtlSpecs.cs | 4 +--- src/Polly.Specs/Caching/GenericCacheProviderAsyncSpecs.cs | 5 +---- src/Polly.Specs/Caching/GenericCacheProviderSpecs.cs | 3 +-- src/Polly.Specs/Caching/RelativeTtlSpecs.cs | 3 +-- src/Polly.Specs/Caching/ResultTtlSpecs.cs | 3 +-- .../Caching/SerializingCacheProviderAsyncSpecs.cs | 5 +---- src/Polly.Specs/Caching/SlidingTtlSpecs.cs | 3 +-- .../CircuitBreaker/AdvancedCircuitBreakerAsyncSpecs.cs | 6 +----- .../CircuitBreaker/AdvancedCircuitBreakerSpecs.cs | 6 +----- .../CircuitBreaker/CircuitBreakerAsyncSpecs.cs | 6 +----- src/Polly.Specs/CircuitBreaker/CircuitBreakerSpecs.cs | 6 +----- .../CircuitBreaker/CircuitBreakerTResultAsyncSpecs.cs | 6 +----- .../CircuitBreakerTResultMixedResultExceptionSpecs.cs | 3 +-- .../CircuitBreaker/CircuitBreakerTResultSpecs.cs | 6 +----- .../CircuitBreaker/ICircuitBreakerPolicySpecs.cs | 3 +-- .../CircuitBreaker/ICircuitBreakerPolicyTResultSpecs.cs | 3 +-- src/Polly.Specs/ContextSpecs.cs | 3 +-- src/Polly.Specs/Custom/CustomAsyncSpecs.cs | 4 +--- src/Polly.Specs/Custom/CustomSpecs.cs | 3 +-- src/Polly.Specs/Custom/CustomTResultAsyncSpecs.cs | 4 +--- src/Polly.Specs/Custom/CustomTResultSpecs.cs | 3 +-- src/Polly.Specs/Fallback/FallbackAsyncSpecs.cs | 6 +----- src/Polly.Specs/Fallback/FallbackSpecs.cs | 5 +---- src/Polly.Specs/Fallback/FallbackTResultAsyncSpecs.cs | 6 +----- src/Polly.Specs/Fallback/FallbackTResultSpecs.cs | 5 +---- src/Polly.Specs/Helpers/Bulkhead/AnnotatedOutputHelper.cs | 5 +---- src/Polly.Specs/Helpers/Bulkhead/AssertionFailure.cs | 4 +--- src/Polly.Specs/Helpers/Bulkhead/TraceableAction.cs | 5 +---- src/Polly.Specs/Helpers/Caching/StubCacheKeyStrategy.cs | 3 +-- src/Polly.Specs/Helpers/Caching/StubCacheProvider.cs | 6 +----- .../Helpers/Caching/StubErroringCacheProvider.cs | 5 +---- src/Polly.Specs/Helpers/Caching/StubSerializer.cs | 3 +-- src/Polly.Specs/Helpers/ContextualPolicyExtensions.cs | 5 +---- .../Helpers/ContextualPolicyExtensionsAsync.cs | 6 +----- .../Helpers/ContextualPolicyTResultExtensions.cs | 6 +----- .../Helpers/ContextualPolicyTResultExtensionsAsync.cs | 8 +------- .../AddBehaviourIfHandle/AddBehaviourIfHandleEngine.cs | 4 +--- .../AddBehaviourIfHandle/AddBehaviourIfHandlePolicy.cs | 5 +---- .../AddBehaviourIfHandle/AddBehaviourIfHandleSyntax.cs | 4 +--- .../AsyncAddBehaviourIfHandleEngine.cs | 5 +---- .../AsyncAddBehaviourIfHandlePolicy.cs | 5 +---- .../AsyncAddBehaviourIfHandleSyntax.cs | 5 +---- .../Helpers/Custom/PreExecute/AsyncPreExecuteEngine.cs | 6 +----- .../Helpers/Custom/PreExecute/AsyncPreExecutePolicy.cs | 6 +----- .../Helpers/Custom/PreExecute/PreExecuteEngine.cs | 5 +---- .../Helpers/Custom/PreExecute/PreExecutePolicy.cs | 5 +---- src/Polly.Specs/Helpers/ObjectExtensions.cs | 4 +--- src/Polly.Specs/Helpers/PolicyExtensions.cs | 5 +---- src/Polly.Specs/Helpers/PolicyExtensionsAsync.cs | 5 +---- src/Polly.Specs/Helpers/PolicyTResultExtensions.cs | 6 +----- src/Polly.Specs/Helpers/PolicyTResultExtensionsAsync.cs | 8 +------- .../Helpers/RateLimit/IRateLimiterExtensions.cs | 3 +-- .../Helpers/RateLimit/ResultClassWithRetryAfter.cs | 4 +--- src/Polly.Specs/IAsyncPolicyExtensionsSpecs.cs | 4 +--- src/Polly.Specs/ISyncPolicyExtensionsSpecs.cs | 3 +-- src/Polly.Specs/NoOp/NoOpAsyncSpecs.cs | 4 +--- src/Polly.Specs/NoOp/NoOpSpecs.cs | 3 +-- src/Polly.Specs/NoOp/NoOpTResultAsyncSpecs.cs | 5 +---- src/Polly.Specs/NoOp/NoOpTResultSpecs.cs | 3 +-- src/Polly.Specs/PolicyAsyncSpecs.cs | 5 +---- src/Polly.Specs/PolicyContextAndKeyAsyncSpecs.cs | 4 +--- src/Polly.Specs/PolicyContextAndKeySpecs.cs | 3 +-- src/Polly.Specs/PolicySpecs.cs | 4 +--- src/Polly.Specs/PolicyTResultAsyncSpecs.cs | 5 +---- src/Polly.Specs/PolicyTResultSpecs.cs | 4 +--- src/Polly.Specs/RateLimit/AsyncRateLimitPolicySpecs.cs | 4 +--- .../RateLimit/AsyncRateLimitPolicyTResultSpecs.cs | 4 +--- .../RateLimit/LockFreeTokenBucketRateLimiterTests.cs | 3 +-- src/Polly.Specs/RateLimit/RateLimitPolicySpecs.cs | 3 +-- src/Polly.Specs/RateLimit/RateLimitPolicySpecsBase.cs | 6 +----- src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecs.cs | 3 +-- .../RateLimit/RateLimitPolicyTResultSpecsBase.cs | 3 +-- src/Polly.Specs/RateLimit/RateLimitSpecsBase.cs | 4 +--- .../RateLimit/TokenBucketRateLimiterTestsBase.cs | 6 +----- src/Polly.Specs/Registry/ConcurrentPolicyRegistrySpecs.cs | 3 +-- src/Polly.Specs/Registry/PolicyRegistrySpecs.cs | 4 +--- src/Polly.Specs/Registry/ReadOnlyPolicyRegistrySpecs.cs | 4 +--- src/Polly.Specs/Retry/RetryAsyncSpecs.cs | 7 +------ src/Polly.Specs/Retry/RetryForeverAsyncSpecs.cs | 7 +------ src/Polly.Specs/Retry/RetryForeverSpecs.cs | 6 +----- src/Polly.Specs/Retry/RetrySpecs.cs | 6 +----- .../Retry/RetryTResultMixedResultExceptionSpecs.cs | 3 +-- src/Polly.Specs/Retry/RetryTResultSpecs.cs | 6 +----- src/Polly.Specs/Retry/RetryTResultSpecsAsync.cs | 7 +------ src/Polly.Specs/Retry/WaitAndRetryAsyncSpecs.cs | 7 +------ src/Polly.Specs/Retry/WaitAndRetryForeverAsyncSpecs.cs | 7 +------ src/Polly.Specs/Retry/WaitAndRetryForeverSpecs.cs | 5 +---- .../Retry/WaitAndRetryForeverTResultAsyncSpecs.cs | 5 +---- src/Polly.Specs/Retry/WaitAndRetryForeverTResultSpecs.cs | 4 +--- src/Polly.Specs/Retry/WaitAndRetrySpecs.cs | 7 +------ src/Polly.Specs/Retry/WaitAndRetryTResultAsyncSpecs.cs | 5 +---- src/Polly.Specs/Retry/WaitAndRetryTResultSpecs.cs | 4 +--- src/Polly.Specs/Timeout/TimeoutAsyncSpecs.cs | 3 --- src/Polly.Specs/Timeout/TimeoutSpecs.cs | 3 --- src/Polly.Specs/Timeout/TimeoutSpecsBase.cs | 5 +---- src/Polly.Specs/Timeout/TimeoutTResultAsyncSpecs.cs | 3 --- src/Polly.Specs/Timeout/TimeoutTResultSpecs.cs | 3 --- src/Polly.Specs/Wrap/IPolicyWrapExtensionSpecs.cs | 5 +---- src/Polly.Specs/Wrap/PolicyWrapContextAndKeySpecs.cs | 3 +-- src/Polly.Specs/Wrap/PolicyWrapContextAndKeySpecsAsync.cs | 4 +--- src/Polly.Specs/Wrap/PolicyWrapSpecs.cs | 3 +-- src/Polly.Specs/Wrap/PolicyWrapSpecsAsync.cs | 4 +--- src/Polly/AsyncPolicy.ExecuteOverloads.cs | 6 +----- src/Polly/AsyncPolicy.GenericImplementation.cs | 6 +----- src/Polly/AsyncPolicy.NonGenericImplementation.cs | 5 +---- src/Polly/AsyncPolicy.TResult.ExecuteOverloads.cs | 6 +----- src/Polly/Bulkhead/AsyncBulkheadEngine.cs | 6 +----- src/Polly/Bulkhead/AsyncBulkheadPolicy.cs | 5 +---- src/Polly/Bulkhead/AsyncBulkheadSyntax.cs | 2 -- src/Polly/Bulkhead/AsyncBulkheadTResultSyntax.cs | 2 -- src/Polly/Bulkhead/BulkheadEngine.cs | 5 +---- src/Polly/Bulkhead/BulkheadPolicy.cs | 4 +--- src/Polly/Bulkhead/BulkheadRejectedException.cs | 3 +-- src/Polly/Bulkhead/BulkheadSemaphoreFactory.cs | 4 +--- src/Polly/Bulkhead/BulkheadSyntax.cs | 1 - src/Polly/Bulkhead/BulkheadTResultSyntax.cs | 1 - src/Polly/Bulkhead/IBulkheadPolicy.cs | 4 +--- src/Polly/Caching/AbsoluteTtl.cs | 4 +--- src/Polly/Caching/AsyncCacheEngine.cs | 6 +----- src/Polly/Caching/AsyncCachePolicy.cs | 5 +---- src/Polly/Caching/AsyncCacheSyntax.cs | 1 - src/Polly/Caching/AsyncCacheTResultSyntax.cs | 1 - src/Polly/Caching/AsyncGenericCacheProvider.cs | 6 +----- src/Polly/Caching/AsyncSerializingCacheProvider.cs | 6 +----- src/Polly/Caching/CacheEngine.cs | 5 +---- src/Polly/Caching/CachePolicy.cs | 4 +--- src/Polly/Caching/CacheSyntax.cs | 1 - src/Polly/Caching/CacheTResultSyntax.cs | 1 - 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 | 3 +-- 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 +--- src/Polly/CircuitBreaker/AdvancedCircuitBreakerSyntax.cs | 1 - .../CircuitBreaker/AdvancedCircuitBreakerTResultSyntax.cs | 3 +-- src/Polly/CircuitBreaker/AdvancedCircuitController.cs | 3 +-- .../CircuitBreaker/AsyncAdvancedCircuitBreakerSyntax.cs | 3 +-- .../AsyncAdvancedCircuitBreakerTResultSyntax.cs | 1 - src/Polly/CircuitBreaker/AsyncCircuitBreakerEngine.cs | 5 +---- src/Polly/CircuitBreaker/AsyncCircuitBreakerPolicy.cs | 5 +---- src/Polly/CircuitBreaker/AsyncCircuitBreakerSyntax.cs | 3 +-- .../CircuitBreaker/AsyncCircuitBreakerTResultSyntax.cs | 3 +-- src/Polly/CircuitBreaker/BrokenCircuitException.cs | 4 +--- src/Polly/CircuitBreaker/CircuitBreakerEngine.cs | 4 +--- src/Polly/CircuitBreaker/CircuitBreakerPolicy.cs | 4 +--- src/Polly/CircuitBreaker/CircuitBreakerSyntax.cs | 1 - src/Polly/CircuitBreaker/CircuitBreakerTResultSyntax.cs | 3 +-- src/Polly/CircuitBreaker/CircuitStateController.cs | 4 +--- .../CircuitBreaker/ConsecutiveCountCircuitController.cs | 3 +-- src/Polly/CircuitBreaker/ICircuitBreakerPolicy.cs | 4 +--- src/Polly/CircuitBreaker/ICircuitController.cs | 4 +--- src/Polly/CircuitBreaker/RollingHealthMetrics.cs | 4 +--- src/Polly/CircuitBreaker/SingleHealthMetrics.cs | 3 +-- src/Polly/Context.Dictionary.cs | 4 +--- src/Polly/Context.cs | 3 +-- 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 | 5 +---- src/Polly/Fallback/AsyncFallbackSyntax.cs | 5 +---- src/Polly/Fallback/FallbackEngine.cs | 5 +---- src/Polly/Fallback/FallbackPolicy.cs | 4 +--- src/Polly/Fallback/FallbackSyntax.cs | 4 +--- 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 | 5 +---- src/Polly/NoOp/NoOpEngine.cs | 5 +---- src/Polly/NoOp/NoOpEngineAsync.cs | 6 +----- src/Polly/NoOp/NoOpPolicy.cs | 4 +--- src/Polly/Policy.ExecuteOverloads.cs | 5 +---- src/Polly/Policy.HandleSyntax.cs | 4 +--- src/Polly/Policy.SyncGenericImplementation.cs | 5 +---- src/Polly/Policy.SyncNonGenericImplementation.cs | 4 +--- src/Polly/Policy.TResult.ExecuteOverloads.cs | 5 +---- src/Polly/PolicyBase.ContextAndKeys.cs | 3 +-- 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 | 5 +---- src/Polly/RateLimit/AsyncRateLimitSyntax.cs | 3 +-- src/Polly/RateLimit/AsyncRateLimitTResultSyntax.cs | 3 +-- src/Polly/RateLimit/IRateLimiter.cs | 4 +--- src/Polly/RateLimit/LockFreeTokenBucketRateLimiter.cs | 4 +--- src/Polly/RateLimit/RateLimitEngine.cs | 5 +---- src/Polly/RateLimit/RateLimitPolicy.cs | 4 +--- src/Polly/RateLimit/RateLimitRejectedException.cs | 3 +-- src/Polly/RateLimit/RateLimitSyntax.cs | 3 +-- src/Polly/RateLimit/RateLimitTResultSyntax.cs | 3 +-- src/Polly/RateLimit/RateLimiterFactory.cs | 4 +--- src/Polly/Registry/IConcurrentPolicyRegistry.cs | 4 +--- src/Polly/Registry/IPolicyRegistry.cs | 5 +---- src/Polly/Registry/IReadOnlyPolicyRegistry.cs | 5 +---- src/Polly/Registry/PolicyRegistry.cs | 4 +--- src/Polly/ResultPredicates.cs | 5 +---- src/Polly/Retry/AsyncRetryEngine.cs | 6 +----- src/Polly/Retry/AsyncRetryPolicy.cs | 6 +----- src/Polly/Retry/AsyncRetrySyntax.cs | 6 +----- src/Polly/Retry/AsyncRetryTResultSyntax.cs | 6 +----- src/Polly/Retry/RetryEngine.cs | 5 +---- src/Polly/Retry/RetryPolicy.cs | 5 +---- src/Polly/Retry/RetrySyntax.cs | 5 +---- src/Polly/Retry/RetryTResultSyntax.cs | 5 +---- src/Polly/Timeout/AsyncTimeoutEngine.cs | 5 +---- src/Polly/Timeout/AsyncTimeoutPolicy.cs | 5 +---- src/Polly/Timeout/AsyncTimeoutSyntax.cs | 4 +--- src/Polly/Timeout/AsyncTimeoutTResultSyntax.cs | 4 +--- src/Polly/Timeout/TimeoutEngine.cs | 5 +---- src/Polly/Timeout/TimeoutPolicy.cs | 5 +---- src/Polly/Timeout/TimeoutRejectedException.cs | 3 +-- src/Polly/Timeout/TimeoutStrategy.cs | 4 +--- src/Polly/Timeout/TimeoutSyntax.cs | 2 -- src/Polly/Timeout/TimeoutTResultSyntax.cs | 4 +--- 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 | 5 +---- src/Polly/Wrap/AsyncPolicyWrapEngine.cs | 6 +----- src/Polly/Wrap/AsyncPolicyWrapSyntax.cs | 4 +--- src/Polly/Wrap/IPolicyWrapExtension.cs | 6 +----- src/Polly/Wrap/PolicyWrap.cs | 4 +--- src/Polly/Wrap/PolicyWrapEngine.cs | 5 +---- src/Polly/Wrap/PolicyWrapSyntax.cs | 4 +--- 259 files changed, 242 insertions(+), 882 deletions(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 5741c4eef7f..ff9c4cf463a 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -4,5 +4,6 @@ ..\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 8c294dfcc45..f5d6b677db9 100644 --- a/src/Polly.Benchmarks/Bulkhead.cs +++ b/src/Polly.Benchmarks/Bulkhead.cs @@ -1,6 +1,4 @@ -using System.Threading; -using System.Threading.Tasks; -using BenchmarkDotNet.Attributes; +using BenchmarkDotNet.Attributes; namespace Polly.Benchmarks; diff --git a/src/Polly.Benchmarks/Cache.cs b/src/Polly.Benchmarks/Cache.cs index 9254d884171..4ff8472ec41 100644 --- a/src/Polly.Benchmarks/Cache.cs +++ b/src/Polly.Benchmarks/Cache.cs @@ -1,7 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using BenchmarkDotNet.Attributes; +using BenchmarkDotNet.Attributes; using Microsoft.Extensions.Caching.Memory; using Polly.Caching; diff --git a/src/Polly.Benchmarks/CircuitBreaker.cs b/src/Polly.Benchmarks/CircuitBreaker.cs index 5d2e5156579..c0a88459aae 100644 --- a/src/Polly.Benchmarks/CircuitBreaker.cs +++ b/src/Polly.Benchmarks/CircuitBreaker.cs @@ -1,7 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using BenchmarkDotNet.Attributes; +using BenchmarkDotNet.Attributes; namespace Polly.Benchmarks; diff --git a/src/Polly.Benchmarks/Fallback.cs b/src/Polly.Benchmarks/Fallback.cs index 0745804f1c3..eb97af3bb9e 100644 --- a/src/Polly.Benchmarks/Fallback.cs +++ b/src/Polly.Benchmarks/Fallback.cs @@ -1,6 +1,4 @@ -using System; -using System.Threading.Tasks; -using BenchmarkDotNet.Attributes; +using BenchmarkDotNet.Attributes; namespace Polly.Benchmarks; diff --git a/src/Polly.Benchmarks/NoOp.cs b/src/Polly.Benchmarks/NoOp.cs index fff1e5579d4..8e7d87df7b3 100644 --- a/src/Polly.Benchmarks/NoOp.cs +++ b/src/Polly.Benchmarks/NoOp.cs @@ -1,6 +1,4 @@ -using System.Threading; -using System.Threading.Tasks; -using BenchmarkDotNet.Attributes; +using BenchmarkDotNet.Attributes; namespace Polly.Benchmarks; diff --git a/src/Polly.Benchmarks/PolicyWrap.cs b/src/Polly.Benchmarks/PolicyWrap.cs index 43615d15f75..f0087e32f98 100644 --- a/src/Polly.Benchmarks/PolicyWrap.cs +++ b/src/Polly.Benchmarks/PolicyWrap.cs @@ -1,7 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using BenchmarkDotNet.Attributes; +using BenchmarkDotNet.Attributes; namespace Polly.Benchmarks; diff --git a/src/Polly.Benchmarks/RateLimit.cs b/src/Polly.Benchmarks/RateLimit.cs index 85978b8794a..ac9bec65330 100644 --- a/src/Polly.Benchmarks/RateLimit.cs +++ b/src/Polly.Benchmarks/RateLimit.cs @@ -1,6 +1,4 @@ -using System; -using System.Threading.Tasks; -using BenchmarkDotNet.Attributes; +using BenchmarkDotNet.Attributes; namespace Polly.Benchmarks; diff --git a/src/Polly.Benchmarks/Retry.cs b/src/Polly.Benchmarks/Retry.cs index 44aa388b467..7efe2b24e4e 100644 --- a/src/Polly.Benchmarks/Retry.cs +++ b/src/Polly.Benchmarks/Retry.cs @@ -1,7 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using BenchmarkDotNet.Attributes; +using BenchmarkDotNet.Attributes; namespace Polly.Benchmarks; diff --git a/src/Polly.Benchmarks/Timeout.cs b/src/Polly.Benchmarks/Timeout.cs index d368291d0b4..cf53de60852 100644 --- a/src/Polly.Benchmarks/Timeout.cs +++ b/src/Polly.Benchmarks/Timeout.cs @@ -1,7 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using BenchmarkDotNet.Attributes; +using BenchmarkDotNet.Attributes; namespace Polly.Benchmarks; diff --git a/src/Polly.Benchmarks/Workloads.cs b/src/Polly.Benchmarks/Workloads.cs index b1868c70e5a..bee708a316f 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 655d7de4b2e..17140d0d24d 100644 --- a/src/Polly.Specs/Bulkhead/BulkheadAsyncSpecs.cs +++ b/src/Polly.Specs/Bulkhead/BulkheadAsyncSpecs.cs @@ -1,7 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using Polly.Bulkhead; +using Polly.Bulkhead; using Polly.Specs.Helpers.Bulkhead; using FluentAssertions; using Polly.Utilities; diff --git a/src/Polly.Specs/Bulkhead/BulkheadScenarios.cs b/src/Polly.Specs/Bulkhead/BulkheadScenarios.cs index 69d3e930b90..32b78da8e62 100644 --- a/src/Polly.Specs/Bulkhead/BulkheadScenarios.cs +++ b/src/Polly.Specs/Bulkhead/BulkheadScenarios.cs @@ -1,5 +1,4 @@ using System.Collections; -using System.Collections.Generic; namespace Polly.Specs.Bulkhead; diff --git a/src/Polly.Specs/Bulkhead/BulkheadSpecs.cs b/src/Polly.Specs/Bulkhead/BulkheadSpecs.cs index b48090cb086..b76e0e79e74 100644 --- a/src/Polly.Specs/Bulkhead/BulkheadSpecs.cs +++ b/src/Polly.Specs/Bulkhead/BulkheadSpecs.cs @@ -1,6 +1,4 @@ -using System; -using System.Threading.Tasks; -using Polly.Bulkhead; +using Polly.Bulkhead; using Polly.Specs.Helpers.Bulkhead; using FluentAssertions; using Xunit; diff --git a/src/Polly.Specs/Bulkhead/BulkheadSpecsBase.cs b/src/Polly.Specs/Bulkhead/BulkheadSpecsBase.cs index fcb224aa783..5a8170bf050 100644 --- a/src/Polly.Specs/Bulkhead/BulkheadSpecsBase.cs +++ b/src/Polly.Specs/Bulkhead/BulkheadSpecsBase.cs @@ -1,8 +1,4 @@ -using System; -using System.Diagnostics; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; +using System.Diagnostics; using FluentAssertions; using Polly.Bulkhead; using Polly.Specs.Helpers.Bulkhead; diff --git a/src/Polly.Specs/Bulkhead/BulkheadTResultAsyncSpecs.cs b/src/Polly.Specs/Bulkhead/BulkheadTResultAsyncSpecs.cs index 0b22ddf2ec3..bf8c28a235e 100644 --- a/src/Polly.Specs/Bulkhead/BulkheadTResultAsyncSpecs.cs +++ b/src/Polly.Specs/Bulkhead/BulkheadTResultAsyncSpecs.cs @@ -1,7 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using Polly.Bulkhead; +using Polly.Bulkhead; using Polly.Specs.Helpers; using Polly.Specs.Helpers.Bulkhead; using FluentAssertions; diff --git a/src/Polly.Specs/Bulkhead/BulkheadTResultSpecs.cs b/src/Polly.Specs/Bulkhead/BulkheadTResultSpecs.cs index 513be999ceb..7f5b05b4607 100644 --- a/src/Polly.Specs/Bulkhead/BulkheadTResultSpecs.cs +++ b/src/Polly.Specs/Bulkhead/BulkheadTResultSpecs.cs @@ -1,7 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using Polly.Bulkhead; +using Polly.Bulkhead; using Polly.Specs.Helpers; using Polly.Specs.Helpers.Bulkhead; diff --git a/src/Polly.Specs/Caching/AbsoluteTtlSpecs.cs b/src/Polly.Specs/Caching/AbsoluteTtlSpecs.cs index ebd4c427fda..07bc57b234b 100644 --- a/src/Polly.Specs/Caching/AbsoluteTtlSpecs.cs +++ b/src/Polly.Specs/Caching/AbsoluteTtlSpecs.cs @@ -1,5 +1,4 @@ -using System; -using FluentAssertions; +using FluentAssertions; using Polly.Caching; using Polly.Specs.Helpers; using Polly.Utilities; diff --git a/src/Polly.Specs/Caching/CacheAsyncSpecs.cs b/src/Polly.Specs/Caching/CacheAsyncSpecs.cs index ad313c59e4b..d70d4d2fc33 100644 --- a/src/Polly.Specs/Caching/CacheAsyncSpecs.cs +++ b/src/Polly.Specs/Caching/CacheAsyncSpecs.cs @@ -1,7 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; +using FluentAssertions; using Polly.Caching; using Polly.Specs.Helpers; using Polly.Specs.Helpers.Caching; diff --git a/src/Polly.Specs/Caching/CacheSpecs.cs b/src/Polly.Specs/Caching/CacheSpecs.cs index 7a9d3ab926a..5975bc38437 100644 --- a/src/Polly.Specs/Caching/CacheSpecs.cs +++ b/src/Polly.Specs/Caching/CacheSpecs.cs @@ -1,6 +1,4 @@ -using System; -using System.Threading; -using FluentAssertions; +using FluentAssertions; using Polly.Caching; using Polly.Specs.Helpers; using Polly.Specs.Helpers.Caching; diff --git a/src/Polly.Specs/Caching/CacheTResultAsyncSpecs.cs b/src/Polly.Specs/Caching/CacheTResultAsyncSpecs.cs index 8eb59528e8d..f2ec806c4d7 100644 --- a/src/Polly.Specs/Caching/CacheTResultAsyncSpecs.cs +++ b/src/Polly.Specs/Caching/CacheTResultAsyncSpecs.cs @@ -1,7 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; +using FluentAssertions; using Polly.Caching; using Polly.Specs.Helpers; using Polly.Specs.Helpers.Caching; diff --git a/src/Polly.Specs/Caching/CacheTResultSpecs.cs b/src/Polly.Specs/Caching/CacheTResultSpecs.cs index 38885bce1cc..85ad4ba3017 100644 --- a/src/Polly.Specs/Caching/CacheTResultSpecs.cs +++ b/src/Polly.Specs/Caching/CacheTResultSpecs.cs @@ -1,6 +1,4 @@ -using System; -using System.Threading; -using FluentAssertions; +using FluentAssertions; using Polly.Caching; using Polly.Specs.Helpers; using Polly.Specs.Helpers.Caching; diff --git a/src/Polly.Specs/Caching/ContextualTtlSpecs.cs b/src/Polly.Specs/Caching/ContextualTtlSpecs.cs index a0318b99931..8f6de9657e2 100644 --- a/src/Polly.Specs/Caching/ContextualTtlSpecs.cs +++ b/src/Polly.Specs/Caching/ContextualTtlSpecs.cs @@ -1,6 +1,4 @@ -using System; -using System.Collections.Generic; -using FluentAssertions; +using FluentAssertions; using Polly.Caching; using Xunit; diff --git a/src/Polly.Specs/Caching/GenericCacheProviderAsyncSpecs.cs b/src/Polly.Specs/Caching/GenericCacheProviderAsyncSpecs.cs index b8f87b6016e..7c0dc8aaad3 100644 --- a/src/Polly.Specs/Caching/GenericCacheProviderAsyncSpecs.cs +++ b/src/Polly.Specs/Caching/GenericCacheProviderAsyncSpecs.cs @@ -1,7 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; +using FluentAssertions; using Polly.Caching; using Polly.Specs.Helpers; using Polly.Specs.Helpers.Caching; diff --git a/src/Polly.Specs/Caching/GenericCacheProviderSpecs.cs b/src/Polly.Specs/Caching/GenericCacheProviderSpecs.cs index a5a583a468f..62f4f55c584 100644 --- a/src/Polly.Specs/Caching/GenericCacheProviderSpecs.cs +++ b/src/Polly.Specs/Caching/GenericCacheProviderSpecs.cs @@ -1,5 +1,4 @@ -using System; -using FluentAssertions; +using FluentAssertions; using Polly.Caching; using Polly.Specs.Helpers; using Polly.Specs.Helpers.Caching; diff --git a/src/Polly.Specs/Caching/RelativeTtlSpecs.cs b/src/Polly.Specs/Caching/RelativeTtlSpecs.cs index 815834df3a4..68995ad3ce9 100644 --- a/src/Polly.Specs/Caching/RelativeTtlSpecs.cs +++ b/src/Polly.Specs/Caching/RelativeTtlSpecs.cs @@ -1,5 +1,4 @@ -using System; -using FluentAssertions; +using FluentAssertions; using Polly.Caching; using Polly.Utilities; using Xunit; diff --git a/src/Polly.Specs/Caching/ResultTtlSpecs.cs b/src/Polly.Specs/Caching/ResultTtlSpecs.cs index 589a8474686..c29f5b88c8e 100644 --- a/src/Polly.Specs/Caching/ResultTtlSpecs.cs +++ b/src/Polly.Specs/Caching/ResultTtlSpecs.cs @@ -1,5 +1,4 @@ -using System; -using FluentAssertions; +using FluentAssertions; using Polly.Caching; using Xunit; diff --git a/src/Polly.Specs/Caching/SerializingCacheProviderAsyncSpecs.cs b/src/Polly.Specs/Caching/SerializingCacheProviderAsyncSpecs.cs index 77ab6e33177..7a76729dcb1 100644 --- a/src/Polly.Specs/Caching/SerializingCacheProviderAsyncSpecs.cs +++ b/src/Polly.Specs/Caching/SerializingCacheProviderAsyncSpecs.cs @@ -1,7 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; +using FluentAssertions; using Polly.Caching; using Polly.Specs.Helpers; using Polly.Specs.Helpers.Caching; diff --git a/src/Polly.Specs/Caching/SlidingTtlSpecs.cs b/src/Polly.Specs/Caching/SlidingTtlSpecs.cs index 5539b9361f4..61bea95c7ca 100644 --- a/src/Polly.Specs/Caching/SlidingTtlSpecs.cs +++ b/src/Polly.Specs/Caching/SlidingTtlSpecs.cs @@ -1,5 +1,4 @@ -using System; -using FluentAssertions; +using FluentAssertions; using Polly.Caching; using Xunit; diff --git a/src/Polly.Specs/CircuitBreaker/AdvancedCircuitBreakerAsyncSpecs.cs b/src/Polly.Specs/CircuitBreaker/AdvancedCircuitBreakerAsyncSpecs.cs index 4696d8b7897..953b3ab7882 100644 --- a/src/Polly.Specs/CircuitBreaker/AdvancedCircuitBreakerAsyncSpecs.cs +++ b/src/Polly.Specs/CircuitBreaker/AdvancedCircuitBreakerAsyncSpecs.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; +using FluentAssertions; using FluentAssertions.Extensions; using Polly.CircuitBreaker; using Polly.Specs.Helpers; diff --git a/src/Polly.Specs/CircuitBreaker/AdvancedCircuitBreakerSpecs.cs b/src/Polly.Specs/CircuitBreaker/AdvancedCircuitBreakerSpecs.cs index 926af3c491e..62670d27276 100644 --- a/src/Polly.Specs/CircuitBreaker/AdvancedCircuitBreakerSpecs.cs +++ b/src/Polly.Specs/CircuitBreaker/AdvancedCircuitBreakerSpecs.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; +using FluentAssertions; using FluentAssertions.Extensions; using Polly.CircuitBreaker; using Polly.Specs.Helpers; diff --git a/src/Polly.Specs/CircuitBreaker/CircuitBreakerAsyncSpecs.cs b/src/Polly.Specs/CircuitBreaker/CircuitBreakerAsyncSpecs.cs index 172415a20dc..674b661abce 100644 --- a/src/Polly.Specs/CircuitBreaker/CircuitBreakerAsyncSpecs.cs +++ b/src/Polly.Specs/CircuitBreaker/CircuitBreakerAsyncSpecs.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; +using FluentAssertions; using FluentAssertions.Extensions; using Polly.CircuitBreaker; using Polly.Specs.Helpers; diff --git a/src/Polly.Specs/CircuitBreaker/CircuitBreakerSpecs.cs b/src/Polly.Specs/CircuitBreaker/CircuitBreakerSpecs.cs index 28e34d73823..aae71c02cfb 100644 --- a/src/Polly.Specs/CircuitBreaker/CircuitBreakerSpecs.cs +++ b/src/Polly.Specs/CircuitBreaker/CircuitBreakerSpecs.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; +using FluentAssertions; using FluentAssertions.Extensions; using Polly.CircuitBreaker; using Polly.Specs.Helpers; diff --git a/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultAsyncSpecs.cs b/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultAsyncSpecs.cs index 9fc112e6822..549de5f5f4c 100644 --- a/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultAsyncSpecs.cs +++ b/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultAsyncSpecs.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; +using FluentAssertions; using FluentAssertions.Extensions; using Polly.CircuitBreaker; using Polly.Specs.Helpers; diff --git a/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultMixedResultExceptionSpecs.cs b/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultMixedResultExceptionSpecs.cs index c4c34634fad..2c57599d78a 100644 --- a/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultMixedResultExceptionSpecs.cs +++ b/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultMixedResultExceptionSpecs.cs @@ -1,5 +1,4 @@ -using System; -using FluentAssertions; +using FluentAssertions; using FluentAssertions.Extensions; using Polly.CircuitBreaker; using Polly.Specs.Helpers; diff --git a/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultSpecs.cs b/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultSpecs.cs index d69f04bc955..08ce0677c72 100644 --- a/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultSpecs.cs +++ b/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultSpecs.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; +using FluentAssertions; using FluentAssertions.Extensions; using Polly.CircuitBreaker; using Polly.Specs.Helpers; diff --git a/src/Polly.Specs/CircuitBreaker/ICircuitBreakerPolicySpecs.cs b/src/Polly.Specs/CircuitBreaker/ICircuitBreakerPolicySpecs.cs index 18c7e1ec950..74e26c9e0d3 100644 --- a/src/Polly.Specs/CircuitBreaker/ICircuitBreakerPolicySpecs.cs +++ b/src/Polly.Specs/CircuitBreaker/ICircuitBreakerPolicySpecs.cs @@ -1,5 +1,4 @@ -using System; -using FluentAssertions; +using FluentAssertions; using Polly.CircuitBreaker; using Xunit; diff --git a/src/Polly.Specs/CircuitBreaker/ICircuitBreakerPolicyTResultSpecs.cs b/src/Polly.Specs/CircuitBreaker/ICircuitBreakerPolicyTResultSpecs.cs index a71f36ed730..966b94a905f 100644 --- a/src/Polly.Specs/CircuitBreaker/ICircuitBreakerPolicyTResultSpecs.cs +++ b/src/Polly.Specs/CircuitBreaker/ICircuitBreakerPolicyTResultSpecs.cs @@ -1,5 +1,4 @@ -using System; -using FluentAssertions; +using FluentAssertions; using Polly.CircuitBreaker; using Polly.Specs.Helpers; using Xunit; diff --git a/src/Polly.Specs/ContextSpecs.cs b/src/Polly.Specs/ContextSpecs.cs index dcdcf1ab036..08ffe3d189c 100644 --- a/src/Polly.Specs/ContextSpecs.cs +++ b/src/Polly.Specs/ContextSpecs.cs @@ -1,5 +1,4 @@ -using System; -using FluentAssertions; +using FluentAssertions; using Polly.Specs.Helpers; using Xunit; diff --git a/src/Polly.Specs/Custom/CustomAsyncSpecs.cs b/src/Polly.Specs/Custom/CustomAsyncSpecs.cs index a639a1ac40d..348250b4c42 100644 --- a/src/Polly.Specs/Custom/CustomAsyncSpecs.cs +++ b/src/Polly.Specs/Custom/CustomAsyncSpecs.cs @@ -1,6 +1,4 @@ -using System; -using System.Threading.Tasks; -using FluentAssertions; +using FluentAssertions; using Polly.Specs.Helpers.Custom.AddBehaviourIfHandle; using Polly.Specs.Helpers.Custom.PreExecute; using Xunit; diff --git a/src/Polly.Specs/Custom/CustomSpecs.cs b/src/Polly.Specs/Custom/CustomSpecs.cs index 56a391429cc..78e0f724c92 100644 --- a/src/Polly.Specs/Custom/CustomSpecs.cs +++ b/src/Polly.Specs/Custom/CustomSpecs.cs @@ -1,5 +1,4 @@ -using System; -using FluentAssertions; +using FluentAssertions; using Polly.Specs.Helpers.Custom.AddBehaviourIfHandle; using Polly.Specs.Helpers.Custom.PreExecute; using Xunit; diff --git a/src/Polly.Specs/Custom/CustomTResultAsyncSpecs.cs b/src/Polly.Specs/Custom/CustomTResultAsyncSpecs.cs index 32c9809bdf4..462e87e117b 100644 --- a/src/Polly.Specs/Custom/CustomTResultAsyncSpecs.cs +++ b/src/Polly.Specs/Custom/CustomTResultAsyncSpecs.cs @@ -1,6 +1,4 @@ -using System; -using System.Threading.Tasks; -using FluentAssertions; +using FluentAssertions; using Polly.Specs.Helpers; using Polly.Specs.Helpers.Custom.AddBehaviourIfHandle; using Polly.Specs.Helpers.Custom.PreExecute; diff --git a/src/Polly.Specs/Custom/CustomTResultSpecs.cs b/src/Polly.Specs/Custom/CustomTResultSpecs.cs index fc737f56e1a..90d792be5f5 100644 --- a/src/Polly.Specs/Custom/CustomTResultSpecs.cs +++ b/src/Polly.Specs/Custom/CustomTResultSpecs.cs @@ -1,5 +1,4 @@ -using System; -using FluentAssertions; +using FluentAssertions; using Polly.Specs.Helpers; using Polly.Specs.Helpers.Custom.AddBehaviourIfHandle; using Polly.Specs.Helpers.Custom.PreExecute; diff --git a/src/Polly.Specs/Fallback/FallbackAsyncSpecs.cs b/src/Polly.Specs/Fallback/FallbackAsyncSpecs.cs index 0b88fd50ba1..111e840e908 100644 --- a/src/Polly.Specs/Fallback/FallbackAsyncSpecs.cs +++ b/src/Polly.Specs/Fallback/FallbackAsyncSpecs.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; +using FluentAssertions; using Polly.Specs.Helpers; using Polly.Utilities; using Xunit; diff --git a/src/Polly.Specs/Fallback/FallbackSpecs.cs b/src/Polly.Specs/Fallback/FallbackSpecs.cs index b6415e6aa09..04a78bf8a68 100644 --- a/src/Polly.Specs/Fallback/FallbackSpecs.cs +++ b/src/Polly.Specs/Fallback/FallbackSpecs.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using FluentAssertions; +using FluentAssertions; using Polly.Fallback; using Polly.Specs.Helpers; using Xunit; diff --git a/src/Polly.Specs/Fallback/FallbackTResultAsyncSpecs.cs b/src/Polly.Specs/Fallback/FallbackTResultAsyncSpecs.cs index 71fddbd8c3c..445c9bbce67 100644 --- a/src/Polly.Specs/Fallback/FallbackTResultAsyncSpecs.cs +++ b/src/Polly.Specs/Fallback/FallbackTResultAsyncSpecs.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; +using FluentAssertions; using Polly.Specs.Helpers; using Polly.Utilities; using Xunit; diff --git a/src/Polly.Specs/Fallback/FallbackTResultSpecs.cs b/src/Polly.Specs/Fallback/FallbackTResultSpecs.cs index 177ce2eceb6..59ff0c63130 100644 --- a/src/Polly.Specs/Fallback/FallbackTResultSpecs.cs +++ b/src/Polly.Specs/Fallback/FallbackTResultSpecs.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using FluentAssertions; +using FluentAssertions; using Polly.Fallback; using Polly.Specs.Helpers; using Xunit; diff --git a/src/Polly.Specs/Helpers/Bulkhead/AnnotatedOutputHelper.cs b/src/Polly.Specs/Helpers/Bulkhead/AnnotatedOutputHelper.cs index e71f35972c9..e20936f5b0f 100644 --- a/src/Polly.Specs/Helpers/Bulkhead/AnnotatedOutputHelper.cs +++ b/src/Polly.Specs/Helpers/Bulkhead/AnnotatedOutputHelper.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Concurrent; -using System.Linq; -using System.Threading; +using System.Collections.Concurrent; using Xunit.Abstractions; namespace Polly.Specs.Helpers.Bulkhead; diff --git a/src/Polly.Specs/Helpers/Bulkhead/AssertionFailure.cs b/src/Polly.Specs/Helpers/Bulkhead/AssertionFailure.cs index be90eee9198..28d6db9f6a1 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/TraceableAction.cs b/src/Polly.Specs/Helpers/Bulkhead/TraceableAction.cs index fe851d1d2a6..ff8d6c935ea 100644 --- a/src/Polly.Specs/Helpers/Bulkhead/TraceableAction.cs +++ b/src/Polly.Specs/Helpers/Bulkhead/TraceableAction.cs @@ -1,7 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using Polly.Bulkhead; +using Polly.Bulkhead; using Xunit.Abstractions; namespace Polly.Specs.Helpers.Bulkhead; diff --git a/src/Polly.Specs/Helpers/Caching/StubCacheKeyStrategy.cs b/src/Polly.Specs/Helpers/Caching/StubCacheKeyStrategy.cs index 4203a3c46c6..6e0ef204eec 100644 --- a/src/Polly.Specs/Helpers/Caching/StubCacheKeyStrategy.cs +++ b/src/Polly.Specs/Helpers/Caching/StubCacheKeyStrategy.cs @@ -1,5 +1,4 @@ -using System; -using Polly.Caching; +using Polly.Caching; namespace Polly.Specs.Helpers.Caching; diff --git a/src/Polly.Specs/Helpers/Caching/StubCacheProvider.cs b/src/Polly.Specs/Helpers/Caching/StubCacheProvider.cs index c798b47e8b7..91424d6da9b 100644 --- a/src/Polly.Specs/Helpers/Caching/StubCacheProvider.cs +++ b/src/Polly.Specs/Helpers/Caching/StubCacheProvider.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using Polly.Caching; +using Polly.Caching; using Polly.Utilities; namespace Polly.Specs.Helpers.Caching; diff --git a/src/Polly.Specs/Helpers/Caching/StubErroringCacheProvider.cs b/src/Polly.Specs/Helpers/Caching/StubErroringCacheProvider.cs index 6e855d0a347..a278eb2f2e8 100644 --- a/src/Polly.Specs/Helpers/Caching/StubErroringCacheProvider.cs +++ b/src/Polly.Specs/Helpers/Caching/StubErroringCacheProvider.cs @@ -1,7 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using Polly.Caching; +using Polly.Caching; using Polly.Utilities; namespace Polly.Specs.Helpers.Caching; diff --git a/src/Polly.Specs/Helpers/Caching/StubSerializer.cs b/src/Polly.Specs/Helpers/Caching/StubSerializer.cs index ad81ebab152..a06cf779b1f 100644 --- a/src/Polly.Specs/Helpers/Caching/StubSerializer.cs +++ b/src/Polly.Specs/Helpers/Caching/StubSerializer.cs @@ -1,5 +1,4 @@ -using System; -using Polly.Caching; +using Polly.Caching; namespace Polly.Specs.Helpers.Caching; diff --git a/src/Polly.Specs/Helpers/ContextualPolicyExtensions.cs b/src/Polly.Specs/Helpers/ContextualPolicyExtensions.cs index 74ab5bfa6c1..99b7b1fec41 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 24addf5a923..e50a1f211a8 100644 --- a/src/Polly.Specs/Helpers/ContextualPolicyExtensionsAsync.cs +++ b/src/Polly.Specs/Helpers/ContextualPolicyExtensionsAsync.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using Polly.Utilities; +using Polly.Utilities; namespace Polly.Specs.Helpers; diff --git a/src/Polly.Specs/Helpers/ContextualPolicyTResultExtensions.cs b/src/Polly.Specs/Helpers/ContextualPolicyTResultExtensions.cs index 5af5fb11bfc..2edb70fbca2 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 666b607f44e..32f5a704247 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 751e9cf0c44..83affb7a472 100644 --- a/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AddBehaviourIfHandleEngine.cs +++ b/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AddBehaviourIfHandleEngine.cs @@ -1,6 +1,4 @@ -using System; -using System.Threading; -using Polly.Utilities; +using Polly.Utilities; namespace Polly.Specs.Helpers.Custom.AddBehaviourIfHandle; diff --git a/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AddBehaviourIfHandlePolicy.cs b/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AddBehaviourIfHandlePolicy.cs index d617d3dfca1..a00ce2492e2 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 926de95f811..719f9b7942b 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 d830651f8dd..f18293e6b28 100644 --- a/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AsyncAddBehaviourIfHandleEngine.cs +++ b/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AsyncAddBehaviourIfHandleEngine.cs @@ -1,7 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using Polly.Utilities; +using Polly.Utilities; namespace Polly.Specs.Helpers.Custom.AddBehaviourIfHandle; diff --git a/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AsyncAddBehaviourIfHandlePolicy.cs b/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AsyncAddBehaviourIfHandlePolicy.cs index badfe1f0f32..fc4387ab81b 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 4911ac63dbf..3a73b7f4391 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 9a585f9f9c9..1e42084cdad 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 81b599c1a0a..4264cffa612 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 08627e6c0b2..68acce3900a 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 e27504eb96e..966e34889f9 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 ece54253318..0c5b35f99bb 100644 --- a/src/Polly.Specs/Helpers/ObjectExtensions.cs +++ b/src/Polly.Specs/Helpers/ObjectExtensions.cs @@ -1,6 +1,4 @@ -using System.Collections.Generic; -using System.Reflection; -using System.Linq; +using System.Reflection; namespace Polly.Specs.Helpers; diff --git a/src/Polly.Specs/Helpers/PolicyExtensions.cs b/src/Polly.Specs/Helpers/PolicyExtensions.cs index 4629837f612..89e49a3197f 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 b92a76be313..eb54e625cc4 100644 --- a/src/Polly.Specs/Helpers/PolicyExtensionsAsync.cs +++ b/src/Polly.Specs/Helpers/PolicyExtensionsAsync.cs @@ -1,7 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using Polly.Utilities; +using Polly.Utilities; namespace Polly.Specs.Helpers; diff --git a/src/Polly.Specs/Helpers/PolicyTResultExtensions.cs b/src/Polly.Specs/Helpers/PolicyTResultExtensions.cs index 39acc351e7c..fd1976606e2 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 614c502db99..906cbc51b65 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 ec2fbf32d05..922d1cb18ab 100644 --- a/src/Polly.Specs/Helpers/RateLimit/IRateLimiterExtensions.cs +++ b/src/Polly.Specs/Helpers/RateLimit/IRateLimiterExtensions.cs @@ -1,5 +1,4 @@ -using System; -using FluentAssertions; +using FluentAssertions; using Polly.RateLimit; namespace Polly.Specs.Helpers.RateLimit; diff --git a/src/Polly.Specs/Helpers/RateLimit/ResultClassWithRetryAfter.cs b/src/Polly.Specs/Helpers/RateLimit/ResultClassWithRetryAfter.cs index 96797f86d15..a015358f233 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 35288378492..7a9678f8c0d 100644 --- a/src/Polly.Specs/IAsyncPolicyExtensionsSpecs.cs +++ b/src/Polly.Specs/IAsyncPolicyExtensionsSpecs.cs @@ -1,6 +1,4 @@ -using System; -using System.Threading.Tasks; -using FluentAssertions; +using FluentAssertions; using Polly.CircuitBreaker; using Polly.Specs.Helpers; using Xunit; diff --git a/src/Polly.Specs/ISyncPolicyExtensionsSpecs.cs b/src/Polly.Specs/ISyncPolicyExtensionsSpecs.cs index 5103728b4d4..314dc728db1 100644 --- a/src/Polly.Specs/ISyncPolicyExtensionsSpecs.cs +++ b/src/Polly.Specs/ISyncPolicyExtensionsSpecs.cs @@ -1,5 +1,4 @@ -using System; -using FluentAssertions; +using FluentAssertions; using Polly.CircuitBreaker; using Polly.Specs.Helpers; using Xunit; diff --git a/src/Polly.Specs/NoOp/NoOpAsyncSpecs.cs b/src/Polly.Specs/NoOp/NoOpAsyncSpecs.cs index 71b1dfef5c0..cd19246ccd5 100644 --- a/src/Polly.Specs/NoOp/NoOpAsyncSpecs.cs +++ b/src/Polly.Specs/NoOp/NoOpAsyncSpecs.cs @@ -1,6 +1,4 @@ -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; +using FluentAssertions; using Polly.Utilities; using Xunit; diff --git a/src/Polly.Specs/NoOp/NoOpSpecs.cs b/src/Polly.Specs/NoOp/NoOpSpecs.cs index 7c16ee57b93..37de67bfd86 100644 --- a/src/Polly.Specs/NoOp/NoOpSpecs.cs +++ b/src/Polly.Specs/NoOp/NoOpSpecs.cs @@ -1,5 +1,4 @@ -using System.Threading; -using FluentAssertions; +using FluentAssertions; using Polly.NoOp; using Xunit; diff --git a/src/Polly.Specs/NoOp/NoOpTResultAsyncSpecs.cs b/src/Polly.Specs/NoOp/NoOpTResultAsyncSpecs.cs index 0cfb27d1896..5bc1e9cd2e4 100644 --- a/src/Polly.Specs/NoOp/NoOpTResultAsyncSpecs.cs +++ b/src/Polly.Specs/NoOp/NoOpTResultAsyncSpecs.cs @@ -1,7 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; +using FluentAssertions; using Polly.NoOp; using Xunit; diff --git a/src/Polly.Specs/NoOp/NoOpTResultSpecs.cs b/src/Polly.Specs/NoOp/NoOpTResultSpecs.cs index 9c940f9552b..32ff01dcd18 100644 --- a/src/Polly.Specs/NoOp/NoOpTResultSpecs.cs +++ b/src/Polly.Specs/NoOp/NoOpTResultSpecs.cs @@ -1,5 +1,4 @@ -using System.Threading; -using FluentAssertions; +using FluentAssertions; using Polly.NoOp; using Xunit; diff --git a/src/Polly.Specs/PolicyAsyncSpecs.cs b/src/Polly.Specs/PolicyAsyncSpecs.cs index 90012655c4d..34031e7e92f 100644 --- a/src/Polly.Specs/PolicyAsyncSpecs.cs +++ b/src/Polly.Specs/PolicyAsyncSpecs.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using FluentAssertions; +using FluentAssertions; using Polly.Utilities; using Xunit; diff --git a/src/Polly.Specs/PolicyContextAndKeyAsyncSpecs.cs b/src/Polly.Specs/PolicyContextAndKeyAsyncSpecs.cs index 5e57f58a9c2..8aea3318c5c 100644 --- a/src/Polly.Specs/PolicyContextAndKeyAsyncSpecs.cs +++ b/src/Polly.Specs/PolicyContextAndKeyAsyncSpecs.cs @@ -1,6 +1,4 @@ -using System; -using System.Threading.Tasks; -using FluentAssertions; +using FluentAssertions; using Polly.Specs.Helpers; using Polly.Utilities; using Xunit; diff --git a/src/Polly.Specs/PolicyContextAndKeySpecs.cs b/src/Polly.Specs/PolicyContextAndKeySpecs.cs index 7186064ef1a..dcf3bdae214 100644 --- a/src/Polly.Specs/PolicyContextAndKeySpecs.cs +++ b/src/Polly.Specs/PolicyContextAndKeySpecs.cs @@ -1,5 +1,4 @@ -using System; -using FluentAssertions; +using FluentAssertions; using Polly.Specs.Helpers; using Xunit; diff --git a/src/Polly.Specs/PolicySpecs.cs b/src/Polly.Specs/PolicySpecs.cs index b857e3d255e..85cf29deb7d 100644 --- a/src/Polly.Specs/PolicySpecs.cs +++ b/src/Polly.Specs/PolicySpecs.cs @@ -1,6 +1,4 @@ -using System; -using System.Collections.Generic; -using FluentAssertions; +using FluentAssertions; using Xunit; namespace Polly.Specs; diff --git a/src/Polly.Specs/PolicyTResultAsyncSpecs.cs b/src/Polly.Specs/PolicyTResultAsyncSpecs.cs index 5174286c266..62b5d1c4d38 100644 --- a/src/Polly.Specs/PolicyTResultAsyncSpecs.cs +++ b/src/Polly.Specs/PolicyTResultAsyncSpecs.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using FluentAssertions; +using FluentAssertions; using Polly.Specs.Helpers; using Xunit; diff --git a/src/Polly.Specs/PolicyTResultSpecs.cs b/src/Polly.Specs/PolicyTResultSpecs.cs index 16dca05a7ec..faeab39f37d 100644 --- a/src/Polly.Specs/PolicyTResultSpecs.cs +++ b/src/Polly.Specs/PolicyTResultSpecs.cs @@ -1,6 +1,4 @@ -using System; -using System.Collections.Generic; -using FluentAssertions; +using FluentAssertions; using Polly.Specs.Helpers; using Xunit; diff --git a/src/Polly.Specs/RateLimit/AsyncRateLimitPolicySpecs.cs b/src/Polly.Specs/RateLimit/AsyncRateLimitPolicySpecs.cs index ce421ebe107..e1f0323091d 100644 --- a/src/Polly.Specs/RateLimit/AsyncRateLimitPolicySpecs.cs +++ b/src/Polly.Specs/RateLimit/AsyncRateLimitPolicySpecs.cs @@ -1,6 +1,4 @@ -using System; -using System.Threading.Tasks; -using Polly.RateLimit; +using Polly.RateLimit; using Polly.Specs.Helpers; using Polly.Specs.Helpers.RateLimit; using Polly.Utilities; diff --git a/src/Polly.Specs/RateLimit/AsyncRateLimitPolicyTResultSpecs.cs b/src/Polly.Specs/RateLimit/AsyncRateLimitPolicyTResultSpecs.cs index fc12dab463b..67bb61be955 100644 --- a/src/Polly.Specs/RateLimit/AsyncRateLimitPolicyTResultSpecs.cs +++ b/src/Polly.Specs/RateLimit/AsyncRateLimitPolicyTResultSpecs.cs @@ -1,6 +1,4 @@ -using System; -using System.Threading.Tasks; -using Polly.RateLimit; +using Polly.RateLimit; using Polly.Specs.Helpers; using Polly.Specs.Helpers.RateLimit; using Polly.Utilities; diff --git a/src/Polly.Specs/RateLimit/LockFreeTokenBucketRateLimiterTests.cs b/src/Polly.Specs/RateLimit/LockFreeTokenBucketRateLimiterTests.cs index 8f6f122fd8c..0fb28d3cf65 100644 --- a/src/Polly.Specs/RateLimit/LockFreeTokenBucketRateLimiterTests.cs +++ b/src/Polly.Specs/RateLimit/LockFreeTokenBucketRateLimiterTests.cs @@ -1,5 +1,4 @@ -using System; -using Polly.RateLimit; +using Polly.RateLimit; namespace Polly.Specs.RateLimit; diff --git a/src/Polly.Specs/RateLimit/RateLimitPolicySpecs.cs b/src/Polly.Specs/RateLimit/RateLimitPolicySpecs.cs index 7994baaec7f..932860b731a 100644 --- a/src/Polly.Specs/RateLimit/RateLimitPolicySpecs.cs +++ b/src/Polly.Specs/RateLimit/RateLimitPolicySpecs.cs @@ -1,5 +1,4 @@ -using System; -using Polly.RateLimit; +using Polly.RateLimit; using Polly.Specs.Helpers; using Polly.Specs.Helpers.RateLimit; using Polly.Utilities; diff --git a/src/Polly.Specs/RateLimit/RateLimitPolicySpecsBase.cs b/src/Polly.Specs/RateLimit/RateLimitPolicySpecsBase.cs index 6bc1dbd14a1..6cbd3bbc9c5 100644 --- a/src/Polly.Specs/RateLimit/RateLimitPolicySpecsBase.cs +++ b/src/Polly.Specs/RateLimit/RateLimitPolicySpecsBase.cs @@ -1,8 +1,4 @@ -using System; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; +using FluentAssertions; using Polly.RateLimit; using Xunit; diff --git a/src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecs.cs b/src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecs.cs index 320e13e65f6..d322ed43f41 100644 --- a/src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecs.cs +++ b/src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecs.cs @@ -1,5 +1,4 @@ -using System; -using Polly.RateLimit; +using Polly.RateLimit; using Polly.Specs.Helpers; using Polly.Specs.Helpers.RateLimit; using Polly.Utilities; diff --git a/src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecsBase.cs b/src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecsBase.cs index 529705c3178..6ab21ffb839 100644 --- a/src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecsBase.cs +++ b/src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecsBase.cs @@ -1,5 +1,4 @@ -using System; -using FluentAssertions; +using FluentAssertions; using Polly.RateLimit; using Polly.Specs.Helpers; using Polly.Specs.Helpers.RateLimit; diff --git a/src/Polly.Specs/RateLimit/RateLimitSpecsBase.cs b/src/Polly.Specs/RateLimit/RateLimitSpecsBase.cs index 32753153f45..9db719f27c3 100644 --- a/src/Polly.Specs/RateLimit/RateLimitSpecsBase.cs +++ b/src/Polly.Specs/RateLimit/RateLimitSpecsBase.cs @@ -1,6 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; +using System.Diagnostics; using FluentAssertions.Execution; using Polly.Utilities; using Xunit.Sdk; diff --git a/src/Polly.Specs/RateLimit/TokenBucketRateLimiterTestsBase.cs b/src/Polly.Specs/RateLimit/TokenBucketRateLimiterTestsBase.cs index 1e30031e516..c8d7a50309f 100644 --- a/src/Polly.Specs/RateLimit/TokenBucketRateLimiterTestsBase.cs +++ b/src/Polly.Specs/RateLimit/TokenBucketRateLimiterTestsBase.cs @@ -1,8 +1,4 @@ -using System; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; +using FluentAssertions; using Polly.RateLimit; using Polly.Specs.Helpers.RateLimit; using Polly.Utilities; diff --git a/src/Polly.Specs/Registry/ConcurrentPolicyRegistrySpecs.cs b/src/Polly.Specs/Registry/ConcurrentPolicyRegistrySpecs.cs index d0c86ea6720..c8b08b5e5cb 100644 --- a/src/Polly.Specs/Registry/ConcurrentPolicyRegistrySpecs.cs +++ b/src/Polly.Specs/Registry/ConcurrentPolicyRegistrySpecs.cs @@ -1,5 +1,4 @@ -using System; -using FluentAssertions; +using FluentAssertions; using Polly.NoOp; using Polly.Registry; using Polly.Specs.Helpers; diff --git a/src/Polly.Specs/Registry/PolicyRegistrySpecs.cs b/src/Polly.Specs/Registry/PolicyRegistrySpecs.cs index 4604dd463a0..13675d9198c 100644 --- a/src/Polly.Specs/Registry/PolicyRegistrySpecs.cs +++ b/src/Polly.Specs/Registry/PolicyRegistrySpecs.cs @@ -1,6 +1,4 @@ -using System; -using System.Collections.Concurrent; -using System.Collections.Generic; +using System.Collections.Concurrent; using System.Reflection; using Xunit; using FluentAssertions; diff --git a/src/Polly.Specs/Registry/ReadOnlyPolicyRegistrySpecs.cs b/src/Polly.Specs/Registry/ReadOnlyPolicyRegistrySpecs.cs index b5cef604235..79be418f367 100644 --- a/src/Polly.Specs/Registry/ReadOnlyPolicyRegistrySpecs.cs +++ b/src/Polly.Specs/Registry/ReadOnlyPolicyRegistrySpecs.cs @@ -1,6 +1,4 @@ -using System; -using System.Collections.Generic; -using FluentAssertions; +using FluentAssertions; using Moq; using Polly.Registry; using Polly.Specs.Helpers; diff --git a/src/Polly.Specs/Retry/RetryAsyncSpecs.cs b/src/Polly.Specs/Retry/RetryAsyncSpecs.cs index 2ce22b4d7dc..44441052c3d 100644 --- a/src/Polly.Specs/Retry/RetryAsyncSpecs.cs +++ b/src/Polly.Specs/Retry/RetryAsyncSpecs.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; +using FluentAssertions; using Polly.Retry; using Polly.Specs.Helpers; using Polly.Utilities; diff --git a/src/Polly.Specs/Retry/RetryForeverAsyncSpecs.cs b/src/Polly.Specs/Retry/RetryForeverAsyncSpecs.cs index 870371def6f..6180d0f3352 100644 --- a/src/Polly.Specs/Retry/RetryForeverAsyncSpecs.cs +++ b/src/Polly.Specs/Retry/RetryForeverAsyncSpecs.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; +using FluentAssertions; using Polly.Retry; using Polly.Specs.Helpers; using Polly.Utilities; diff --git a/src/Polly.Specs/Retry/RetryForeverSpecs.cs b/src/Polly.Specs/Retry/RetryForeverSpecs.cs index b58dd0aa454..db25328809c 100644 --- a/src/Polly.Specs/Retry/RetryForeverSpecs.cs +++ b/src/Polly.Specs/Retry/RetryForeverSpecs.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using FluentAssertions; +using FluentAssertions; using Polly.Specs.Helpers; using Xunit; diff --git a/src/Polly.Specs/Retry/RetrySpecs.cs b/src/Polly.Specs/Retry/RetrySpecs.cs index b913719d623..ae7f9658b42 100644 --- a/src/Polly.Specs/Retry/RetrySpecs.cs +++ b/src/Polly.Specs/Retry/RetrySpecs.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using FluentAssertions; +using FluentAssertions; using Polly.Specs.Helpers; using Xunit; diff --git a/src/Polly.Specs/Retry/RetryTResultMixedResultExceptionSpecs.cs b/src/Polly.Specs/Retry/RetryTResultMixedResultExceptionSpecs.cs index 4ecd5afba40..aeebd1b2f08 100644 --- a/src/Polly.Specs/Retry/RetryTResultMixedResultExceptionSpecs.cs +++ b/src/Polly.Specs/Retry/RetryTResultMixedResultExceptionSpecs.cs @@ -1,5 +1,4 @@ -using System; -using FluentAssertions; +using FluentAssertions; using Polly.Specs.Helpers; using Xunit; diff --git a/src/Polly.Specs/Retry/RetryTResultSpecs.cs b/src/Polly.Specs/Retry/RetryTResultSpecs.cs index 9b9070eeed4..01793c1019b 100644 --- a/src/Polly.Specs/Retry/RetryTResultSpecs.cs +++ b/src/Polly.Specs/Retry/RetryTResultSpecs.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using FluentAssertions; +using FluentAssertions; using Polly.Retry; using Polly.Specs.Helpers; using Xunit; diff --git a/src/Polly.Specs/Retry/RetryTResultSpecsAsync.cs b/src/Polly.Specs/Retry/RetryTResultSpecsAsync.cs index a586cedb08c..f8f3a51de99 100644 --- a/src/Polly.Specs/Retry/RetryTResultSpecsAsync.cs +++ b/src/Polly.Specs/Retry/RetryTResultSpecsAsync.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; +using FluentAssertions; using Polly.Specs.Helpers; using Polly.Utilities; using Xunit; diff --git a/src/Polly.Specs/Retry/WaitAndRetryAsyncSpecs.cs b/src/Polly.Specs/Retry/WaitAndRetryAsyncSpecs.cs index 2384aff262c..4491a7f00e7 100644 --- a/src/Polly.Specs/Retry/WaitAndRetryAsyncSpecs.cs +++ b/src/Polly.Specs/Retry/WaitAndRetryAsyncSpecs.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; +using System.Diagnostics; using FluentAssertions; using FluentAssertions.Extensions; using Polly.Retry; diff --git a/src/Polly.Specs/Retry/WaitAndRetryForeverAsyncSpecs.cs b/src/Polly.Specs/Retry/WaitAndRetryForeverAsyncSpecs.cs index cd07144c7a6..21dc05c868a 100644 --- a/src/Polly.Specs/Retry/WaitAndRetryForeverAsyncSpecs.cs +++ b/src/Polly.Specs/Retry/WaitAndRetryForeverAsyncSpecs.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; +using FluentAssertions; using FluentAssertions.Extensions; using Polly.Retry; using Polly.Specs.Helpers; diff --git a/src/Polly.Specs/Retry/WaitAndRetryForeverSpecs.cs b/src/Polly.Specs/Retry/WaitAndRetryForeverSpecs.cs index e00de83eca8..75dfb98b5d0 100644 --- a/src/Polly.Specs/Retry/WaitAndRetryForeverSpecs.cs +++ b/src/Polly.Specs/Retry/WaitAndRetryForeverSpecs.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using FluentAssertions; +using FluentAssertions; using FluentAssertions.Extensions; using Polly.Specs.Helpers; using Polly.Utilities; diff --git a/src/Polly.Specs/Retry/WaitAndRetryForeverTResultAsyncSpecs.cs b/src/Polly.Specs/Retry/WaitAndRetryForeverTResultAsyncSpecs.cs index dd3c459a6c0..a6a207aa670 100644 --- a/src/Polly.Specs/Retry/WaitAndRetryForeverTResultAsyncSpecs.cs +++ b/src/Polly.Specs/Retry/WaitAndRetryForeverTResultAsyncSpecs.cs @@ -1,7 +1,4 @@ -using System; -using System.Threading.Tasks; -using System.Collections.Generic; -using FluentAssertions; +using FluentAssertions; using Polly.Specs.Helpers; using Polly.Utilities; using Xunit; diff --git a/src/Polly.Specs/Retry/WaitAndRetryForeverTResultSpecs.cs b/src/Polly.Specs/Retry/WaitAndRetryForeverTResultSpecs.cs index cd2229e7aff..faca3b3cbb0 100644 --- a/src/Polly.Specs/Retry/WaitAndRetryForeverTResultSpecs.cs +++ b/src/Polly.Specs/Retry/WaitAndRetryForeverTResultSpecs.cs @@ -1,6 +1,4 @@ -using System; -using System.Collections.Generic; -using FluentAssertions; +using FluentAssertions; using FluentAssertions.Extensions; using Polly.Specs.Helpers; using Polly.Utilities; diff --git a/src/Polly.Specs/Retry/WaitAndRetrySpecs.cs b/src/Polly.Specs/Retry/WaitAndRetrySpecs.cs index 0af4827eb1f..1a9a0b69ad9 100644 --- a/src/Polly.Specs/Retry/WaitAndRetrySpecs.cs +++ b/src/Polly.Specs/Retry/WaitAndRetrySpecs.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; +using System.Diagnostics; using FluentAssertions; using FluentAssertions.Extensions; using Polly.Specs.Helpers; diff --git a/src/Polly.Specs/Retry/WaitAndRetryTResultAsyncSpecs.cs b/src/Polly.Specs/Retry/WaitAndRetryTResultAsyncSpecs.cs index b9003f0c2ef..d1df1da7781 100644 --- a/src/Polly.Specs/Retry/WaitAndRetryTResultAsyncSpecs.cs +++ b/src/Polly.Specs/Retry/WaitAndRetryTResultAsyncSpecs.cs @@ -1,7 +1,4 @@ -using System; -using System.Threading.Tasks; -using System.Collections.Generic; -using FluentAssertions; +using FluentAssertions; using Polly.Specs.Helpers; using Polly.Utilities; using Xunit; diff --git a/src/Polly.Specs/Retry/WaitAndRetryTResultSpecs.cs b/src/Polly.Specs/Retry/WaitAndRetryTResultSpecs.cs index f9eaa6c6201..798aec258ec 100644 --- a/src/Polly.Specs/Retry/WaitAndRetryTResultSpecs.cs +++ b/src/Polly.Specs/Retry/WaitAndRetryTResultSpecs.cs @@ -1,6 +1,4 @@ -using System; -using System.Collections.Generic; -using FluentAssertions; +using FluentAssertions; using FluentAssertions.Extensions; using Polly.Specs.Helpers; using Polly.Utilities; diff --git a/src/Polly.Specs/Timeout/TimeoutAsyncSpecs.cs b/src/Polly.Specs/Timeout/TimeoutAsyncSpecs.cs index d643a82d74a..eb0845a5373 100644 --- a/src/Polly.Specs/Timeout/TimeoutAsyncSpecs.cs +++ b/src/Polly.Specs/Timeout/TimeoutAsyncSpecs.cs @@ -2,10 +2,7 @@ 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; diff --git a/src/Polly.Specs/Timeout/TimeoutSpecs.cs b/src/Polly.Specs/Timeout/TimeoutSpecs.cs index 339f15a35c2..c6c8dda62ae 100644 --- a/src/Polly.Specs/Timeout/TimeoutSpecs.cs +++ b/src/Polly.Specs/Timeout/TimeoutSpecs.cs @@ -1,8 +1,5 @@ using FluentAssertions; -using System; using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; using Polly.Specs.Helpers; using Polly.Timeout; using Polly.Utilities; diff --git a/src/Polly.Specs/Timeout/TimeoutSpecsBase.cs b/src/Polly.Specs/Timeout/TimeoutSpecsBase.cs index a82f67732d2..62d50e25b6d 100644 --- a/src/Polly.Specs/Timeout/TimeoutSpecsBase.cs +++ b/src/Polly.Specs/Timeout/TimeoutSpecsBase.cs @@ -1,8 +1,5 @@ -using System; -using System.Runtime.CompilerServices; +using System.Runtime.CompilerServices; using Polly.Utilities; -using System.Threading; -using System.Threading.Tasks; namespace Polly.Specs.Timeout; diff --git a/src/Polly.Specs/Timeout/TimeoutTResultAsyncSpecs.cs b/src/Polly.Specs/Timeout/TimeoutTResultAsyncSpecs.cs index 6a5c5beade0..1d1dbdcfa03 100644 --- a/src/Polly.Specs/Timeout/TimeoutTResultAsyncSpecs.cs +++ b/src/Polly.Specs/Timeout/TimeoutTResultAsyncSpecs.cs @@ -1,8 +1,5 @@ using FluentAssertions; -using System; using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; using Polly.Specs.Helpers; using Polly.Timeout; using Polly.Utilities; diff --git a/src/Polly.Specs/Timeout/TimeoutTResultSpecs.cs b/src/Polly.Specs/Timeout/TimeoutTResultSpecs.cs index 92f56bb8dbd..095f97baabb 100644 --- a/src/Polly.Specs/Timeout/TimeoutTResultSpecs.cs +++ b/src/Polly.Specs/Timeout/TimeoutTResultSpecs.cs @@ -1,8 +1,5 @@ using FluentAssertions; -using System; using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; using Polly.Specs.Helpers; using Polly.Timeout; using Polly.Utilities; diff --git a/src/Polly.Specs/Wrap/IPolicyWrapExtensionSpecs.cs b/src/Polly.Specs/Wrap/IPolicyWrapExtensionSpecs.cs index 7c0c019ff05..68dee9fd38e 100644 --- a/src/Polly.Specs/Wrap/IPolicyWrapExtensionSpecs.cs +++ b/src/Polly.Specs/Wrap/IPolicyWrapExtensionSpecs.cs @@ -1,8 +1,5 @@ -using System; -using System.Collections.Generic; -using Xunit; +using Xunit; using Polly.Wrap; -using System.Linq; using FluentAssertions; using Polly.CircuitBreaker; using Polly.NoOp; diff --git a/src/Polly.Specs/Wrap/PolicyWrapContextAndKeySpecs.cs b/src/Polly.Specs/Wrap/PolicyWrapContextAndKeySpecs.cs index f09afed1197..ffb72bc47fc 100644 --- a/src/Polly.Specs/Wrap/PolicyWrapContextAndKeySpecs.cs +++ b/src/Polly.Specs/Wrap/PolicyWrapContextAndKeySpecs.cs @@ -1,5 +1,4 @@ -using System; -using FluentAssertions; +using FluentAssertions; using Polly.Specs.Helpers; using Xunit; diff --git a/src/Polly.Specs/Wrap/PolicyWrapContextAndKeySpecsAsync.cs b/src/Polly.Specs/Wrap/PolicyWrapContextAndKeySpecsAsync.cs index cc98ebfcd9a..7d7a56b48da 100644 --- a/src/Polly.Specs/Wrap/PolicyWrapContextAndKeySpecsAsync.cs +++ b/src/Polly.Specs/Wrap/PolicyWrapContextAndKeySpecsAsync.cs @@ -1,6 +1,4 @@ -using System; -using System.Threading.Tasks; -using FluentAssertions; +using FluentAssertions; using Polly.Specs.Helpers; using Polly.Utilities; using Xunit; diff --git a/src/Polly.Specs/Wrap/PolicyWrapSpecs.cs b/src/Polly.Specs/Wrap/PolicyWrapSpecs.cs index d32444a5612..38aa8fd1209 100644 --- a/src/Polly.Specs/Wrap/PolicyWrapSpecs.cs +++ b/src/Polly.Specs/Wrap/PolicyWrapSpecs.cs @@ -1,5 +1,4 @@ -using System; -using FluentAssertions; +using FluentAssertions; using Polly.CircuitBreaker; using Polly.Retry; using Polly.Specs.Helpers; diff --git a/src/Polly.Specs/Wrap/PolicyWrapSpecsAsync.cs b/src/Polly.Specs/Wrap/PolicyWrapSpecsAsync.cs index 4148abd7afc..a7f39155441 100644 --- a/src/Polly.Specs/Wrap/PolicyWrapSpecsAsync.cs +++ b/src/Polly.Specs/Wrap/PolicyWrapSpecsAsync.cs @@ -1,6 +1,4 @@ -using System; -using System.Threading.Tasks; -using FluentAssertions; +using FluentAssertions; using Polly.CircuitBreaker; using Polly.Specs.Helpers; using Polly.Wrap; diff --git a/src/Polly/AsyncPolicy.ExecuteOverloads.cs b/src/Polly/AsyncPolicy.ExecuteOverloads.cs index fcdc9770e1d..4dc587c3c20 100644 --- a/src/Polly/AsyncPolicy.ExecuteOverloads.cs +++ b/src/Polly/AsyncPolicy.ExecuteOverloads.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; +using System.Diagnostics; namespace Polly; diff --git a/src/Polly/AsyncPolicy.GenericImplementation.cs b/src/Polly/AsyncPolicy.GenericImplementation.cs index 314d1636a3d..090c09b479d 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 c26a44ce591..29a08485cda 100644 --- a/src/Polly/AsyncPolicy.NonGenericImplementation.cs +++ b/src/Polly/AsyncPolicy.NonGenericImplementation.cs @@ -1,7 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using Polly.Utilities; +using Polly.Utilities; namespace Polly; diff --git a/src/Polly/AsyncPolicy.TResult.ExecuteOverloads.cs b/src/Polly/AsyncPolicy.TResult.ExecuteOverloads.cs index 0722506d4a2..19cc3217b6e 100644 --- a/src/Polly/AsyncPolicy.TResult.ExecuteOverloads.cs +++ b/src/Polly/AsyncPolicy.TResult.ExecuteOverloads.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; +using System.Diagnostics; namespace Polly; diff --git a/src/Polly/Bulkhead/AsyncBulkheadEngine.cs b/src/Polly/Bulkhead/AsyncBulkheadEngine.cs index 792e5fd3b75..05b12035b62 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 39b7ec8126d..694b77009ea 100644 --- a/src/Polly/Bulkhead/AsyncBulkheadPolicy.cs +++ b/src/Polly/Bulkhead/AsyncBulkheadPolicy.cs @@ -1,7 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; +using System.Diagnostics; namespace Polly.Bulkhead; diff --git a/src/Polly/Bulkhead/AsyncBulkheadSyntax.cs b/src/Polly/Bulkhead/AsyncBulkheadSyntax.cs index 7ce93513047..55af4040226 100644 --- a/src/Polly/Bulkhead/AsyncBulkheadSyntax.cs +++ b/src/Polly/Bulkhead/AsyncBulkheadSyntax.cs @@ -1,7 +1,5 @@ using Polly.Bulkhead; using Polly.Utilities; -using System; -using System.Threading.Tasks; namespace Polly; diff --git a/src/Polly/Bulkhead/AsyncBulkheadTResultSyntax.cs b/src/Polly/Bulkhead/AsyncBulkheadTResultSyntax.cs index f082cef5695..27c8c04c5d5 100644 --- a/src/Polly/Bulkhead/AsyncBulkheadTResultSyntax.cs +++ b/src/Polly/Bulkhead/AsyncBulkheadTResultSyntax.cs @@ -1,7 +1,5 @@ using Polly.Bulkhead; using Polly.Utilities; -using System; -using System.Threading.Tasks; namespace Polly; diff --git a/src/Polly/Bulkhead/BulkheadEngine.cs b/src/Polly/Bulkhead/BulkheadEngine.cs index 6a9827fdd72..9df5e4a99ef 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 faa93a6dfa0..cd46e79b89c 100644 --- a/src/Polly/Bulkhead/BulkheadPolicy.cs +++ b/src/Polly/Bulkhead/BulkheadPolicy.cs @@ -1,6 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; +using System.Diagnostics; namespace Polly.Bulkhead; diff --git a/src/Polly/Bulkhead/BulkheadRejectedException.cs b/src/Polly/Bulkhead/BulkheadRejectedException.cs index bc41a539580..21286cc7861 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 a217948f843..eab9755273f 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 66cdd32ac8e..18ed8c62e8d 100644 --- a/src/Polly/Bulkhead/BulkheadSyntax.cs +++ b/src/Polly/Bulkhead/BulkheadSyntax.cs @@ -1,5 +1,4 @@ using Polly.Bulkhead; -using System; namespace Polly; diff --git a/src/Polly/Bulkhead/BulkheadTResultSyntax.cs b/src/Polly/Bulkhead/BulkheadTResultSyntax.cs index 32e1ee8d044..fa082bf8664 100644 --- a/src/Polly/Bulkhead/BulkheadTResultSyntax.cs +++ b/src/Polly/Bulkhead/BulkheadTResultSyntax.cs @@ -1,5 +1,4 @@ using Polly.Bulkhead; -using System; namespace Polly; diff --git a/src/Polly/Bulkhead/IBulkheadPolicy.cs b/src/Polly/Bulkhead/IBulkheadPolicy.cs index 5bcd0ba7225..b0ea4345a1f 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 e70c412c110..a5b1b14f6ff 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 21fa07ac4e2..90fd4d64fa2 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 101de13524d..30bba2209d1 100644 --- a/src/Polly/Caching/AsyncCachePolicy.cs +++ b/src/Polly/Caching/AsyncCachePolicy.cs @@ -1,7 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; +using System.Diagnostics; namespace Polly.Caching; diff --git a/src/Polly/Caching/AsyncCacheSyntax.cs b/src/Polly/Caching/AsyncCacheSyntax.cs index 577b6451206..ff21c7ed8db 100644 --- a/src/Polly/Caching/AsyncCacheSyntax.cs +++ b/src/Polly/Caching/AsyncCacheSyntax.cs @@ -1,5 +1,4 @@ using Polly.Caching; -using System; namespace Polly; diff --git a/src/Polly/Caching/AsyncCacheTResultSyntax.cs b/src/Polly/Caching/AsyncCacheTResultSyntax.cs index 3604a9a7dc5..5151c4d7974 100644 --- a/src/Polly/Caching/AsyncCacheTResultSyntax.cs +++ b/src/Polly/Caching/AsyncCacheTResultSyntax.cs @@ -1,5 +1,4 @@ using Polly.Caching; -using System; namespace Polly; diff --git a/src/Polly/Caching/AsyncGenericCacheProvider.cs b/src/Polly/Caching/AsyncGenericCacheProvider.cs index c4432d5c662..307087ff99a 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 1cd3f34f94b..8beb1ca56c7 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 cc1c1be654d..a8806dcb49d 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 7ba908b549d..47c206277b4 100644 --- a/src/Polly/Caching/CachePolicy.cs +++ b/src/Polly/Caching/CachePolicy.cs @@ -1,6 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; +using System.Diagnostics; namespace Polly.Caching; diff --git a/src/Polly/Caching/CacheSyntax.cs b/src/Polly/Caching/CacheSyntax.cs index 6331e6113b3..6abf1ccd603 100644 --- a/src/Polly/Caching/CacheSyntax.cs +++ b/src/Polly/Caching/CacheSyntax.cs @@ -1,5 +1,4 @@ using Polly.Caching; -using System; namespace Polly; diff --git a/src/Polly/Caching/CacheTResultSyntax.cs b/src/Polly/Caching/CacheTResultSyntax.cs index d80e4a03d5b..5dabeef0e3c 100644 --- a/src/Polly/Caching/CacheTResultSyntax.cs +++ b/src/Polly/Caching/CacheTResultSyntax.cs @@ -1,5 +1,4 @@ using Polly.Caching; -using System; namespace Polly; diff --git a/src/Polly/Caching/ContextualTtl.cs b/src/Polly/Caching/ContextualTtl.cs index 1a4c2ee88ed..a16dcdc20a6 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 c4f1498668e..763928b9e27 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 d0929a207e3..69324097d33 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 be1c9df86d9..fd3de957ee9 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 85778163307..4179a550e7e 100644 --- a/src/Polly/Caching/NonSlidingTtl.cs +++ b/src/Polly/Caching/NonSlidingTtl.cs @@ -1,5 +1,4 @@ -using System; -using Polly.Utilities; +using Polly.Utilities; namespace Polly.Caching; diff --git a/src/Polly/Caching/RelativeTtl.cs b/src/Polly/Caching/RelativeTtl.cs index f5d118303da..1368c583cba 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 c17c06ba869..a340626e6af 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 a233e23d179..7a8800cd40a 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 678538500fd..b9586bff389 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 49c393ce826..a65d35d64ce 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 9e4cd686179..b0a9369c31a 100644 --- a/src/Polly/CircuitBreaker/AdvancedCircuitBreakerSyntax.cs +++ b/src/Polly/CircuitBreaker/AdvancedCircuitBreakerSyntax.cs @@ -1,4 +1,3 @@ -using System; using Polly.CircuitBreaker; using Polly.Utilities; diff --git a/src/Polly/CircuitBreaker/AdvancedCircuitBreakerTResultSyntax.cs b/src/Polly/CircuitBreaker/AdvancedCircuitBreakerTResultSyntax.cs index ccb172930fe..a818a197b3e 100644 --- a/src/Polly/CircuitBreaker/AdvancedCircuitBreakerTResultSyntax.cs +++ b/src/Polly/CircuitBreaker/AdvancedCircuitBreakerTResultSyntax.cs @@ -1,5 +1,4 @@ -using System; -using Polly.CircuitBreaker; +using Polly.CircuitBreaker; using Polly.Utilities; namespace Polly; diff --git a/src/Polly/CircuitBreaker/AdvancedCircuitController.cs b/src/Polly/CircuitBreaker/AdvancedCircuitController.cs index 778f5e0a461..e0fa4dd86d6 100644 --- a/src/Polly/CircuitBreaker/AdvancedCircuitController.cs +++ b/src/Polly/CircuitBreaker/AdvancedCircuitController.cs @@ -1,5 +1,4 @@ -using System; -using Polly.Utilities; +using Polly.Utilities; namespace Polly.CircuitBreaker; diff --git a/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerSyntax.cs b/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerSyntax.cs index ffc88a12343..891ba84a3e6 100644 --- a/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerSyntax.cs +++ b/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerSyntax.cs @@ -1,5 +1,4 @@ -using System; -using Polly.CircuitBreaker; +using Polly.CircuitBreaker; using Polly.Utilities; namespace Polly; diff --git a/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerTResultSyntax.cs b/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerTResultSyntax.cs index e688d341c53..dc509695ab6 100644 --- a/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerTResultSyntax.cs +++ b/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerTResultSyntax.cs @@ -1,4 +1,3 @@ -using System; using Polly.CircuitBreaker; using Polly.Utilities; diff --git a/src/Polly/CircuitBreaker/AsyncCircuitBreakerEngine.cs b/src/Polly/CircuitBreaker/AsyncCircuitBreakerEngine.cs index cfc8290b681..56d2336b394 100644 --- a/src/Polly/CircuitBreaker/AsyncCircuitBreakerEngine.cs +++ b/src/Polly/CircuitBreaker/AsyncCircuitBreakerEngine.cs @@ -1,7 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using Polly.Utilities; +using Polly.Utilities; namespace Polly.CircuitBreaker; diff --git a/src/Polly/CircuitBreaker/AsyncCircuitBreakerPolicy.cs b/src/Polly/CircuitBreaker/AsyncCircuitBreakerPolicy.cs index ac958850da9..4a9bd444b75 100644 --- a/src/Polly/CircuitBreaker/AsyncCircuitBreakerPolicy.cs +++ b/src/Polly/CircuitBreaker/AsyncCircuitBreakerPolicy.cs @@ -1,7 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; +using System.Diagnostics; using Polly.Utilities; namespace Polly.CircuitBreaker; diff --git a/src/Polly/CircuitBreaker/AsyncCircuitBreakerSyntax.cs b/src/Polly/CircuitBreaker/AsyncCircuitBreakerSyntax.cs index cd2f10d222f..fe48c61ee00 100644 --- a/src/Polly/CircuitBreaker/AsyncCircuitBreakerSyntax.cs +++ b/src/Polly/CircuitBreaker/AsyncCircuitBreakerSyntax.cs @@ -1,5 +1,4 @@ -using System; -using Polly.CircuitBreaker; +using Polly.CircuitBreaker; using Polly.Utilities; namespace Polly; diff --git a/src/Polly/CircuitBreaker/AsyncCircuitBreakerTResultSyntax.cs b/src/Polly/CircuitBreaker/AsyncCircuitBreakerTResultSyntax.cs index a02f185c2b4..7affd1655b1 100644 --- a/src/Polly/CircuitBreaker/AsyncCircuitBreakerTResultSyntax.cs +++ b/src/Polly/CircuitBreaker/AsyncCircuitBreakerTResultSyntax.cs @@ -1,5 +1,4 @@ -using System; -using Polly.CircuitBreaker; +using Polly.CircuitBreaker; namespace Polly; diff --git a/src/Polly/CircuitBreaker/BrokenCircuitException.cs b/src/Polly/CircuitBreaker/BrokenCircuitException.cs index cf379641d9c..ff6a0d0d29d 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 773615b520b..87fe9b4d903 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 0dee7c425b1..e09afde46f1 100644 --- a/src/Polly/CircuitBreaker/CircuitBreakerPolicy.cs +++ b/src/Polly/CircuitBreaker/CircuitBreakerPolicy.cs @@ -1,7 +1,5 @@ -using System; -using System.Diagnostics; +using System.Diagnostics; using Polly.Utilities; -using System.Threading; namespace Polly.CircuitBreaker; diff --git a/src/Polly/CircuitBreaker/CircuitBreakerSyntax.cs b/src/Polly/CircuitBreaker/CircuitBreakerSyntax.cs index c1819b6c2eb..fdae00d7bb8 100644 --- a/src/Polly/CircuitBreaker/CircuitBreakerSyntax.cs +++ b/src/Polly/CircuitBreaker/CircuitBreakerSyntax.cs @@ -1,4 +1,3 @@ -using System; using Polly.CircuitBreaker; using Polly.Utilities; diff --git a/src/Polly/CircuitBreaker/CircuitBreakerTResultSyntax.cs b/src/Polly/CircuitBreaker/CircuitBreakerTResultSyntax.cs index 300a1b486b5..71aeb280a7b 100644 --- a/src/Polly/CircuitBreaker/CircuitBreakerTResultSyntax.cs +++ b/src/Polly/CircuitBreaker/CircuitBreakerTResultSyntax.cs @@ -1,5 +1,4 @@ -using System; -using Polly.CircuitBreaker; +using Polly.CircuitBreaker; namespace Polly; diff --git a/src/Polly/CircuitBreaker/CircuitStateController.cs b/src/Polly/CircuitBreaker/CircuitStateController.cs index f7073c08b7f..a2761e399f4 100644 --- a/src/Polly/CircuitBreaker/CircuitStateController.cs +++ b/src/Polly/CircuitBreaker/CircuitStateController.cs @@ -1,6 +1,4 @@ -using System; -using System.Threading; -using Polly.Utilities; +using Polly.Utilities; namespace Polly.CircuitBreaker; diff --git a/src/Polly/CircuitBreaker/ConsecutiveCountCircuitController.cs b/src/Polly/CircuitBreaker/ConsecutiveCountCircuitController.cs index 562288d21d3..489da426dbb 100644 --- a/src/Polly/CircuitBreaker/ConsecutiveCountCircuitController.cs +++ b/src/Polly/CircuitBreaker/ConsecutiveCountCircuitController.cs @@ -1,5 +1,4 @@ -using System; -using Polly.Utilities; +using Polly.Utilities; namespace Polly.CircuitBreaker; diff --git a/src/Polly/CircuitBreaker/ICircuitBreakerPolicy.cs b/src/Polly/CircuitBreaker/ICircuitBreakerPolicy.cs index 73adf6de2e6..2c0f882ac9b 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 ffa28137c23..a6f28a65507 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/RollingHealthMetrics.cs b/src/Polly/CircuitBreaker/RollingHealthMetrics.cs index 1e41e113fe3..4aa6d31bf17 100644 --- a/src/Polly/CircuitBreaker/RollingHealthMetrics.cs +++ b/src/Polly/CircuitBreaker/RollingHealthMetrics.cs @@ -1,6 +1,4 @@ -using System; -using System.Collections.Generic; -using Polly.Utilities; +using Polly.Utilities; namespace Polly.CircuitBreaker; diff --git a/src/Polly/CircuitBreaker/SingleHealthMetrics.cs b/src/Polly/CircuitBreaker/SingleHealthMetrics.cs index 67be8f3be90..631eb779ac0 100644 --- a/src/Polly/CircuitBreaker/SingleHealthMetrics.cs +++ b/src/Polly/CircuitBreaker/SingleHealthMetrics.cs @@ -1,5 +1,4 @@ -using System; -using Polly.Utilities; +using Polly.Utilities; namespace Polly.CircuitBreaker; diff --git a/src/Polly/Context.Dictionary.cs b/src/Polly/Context.Dictionary.cs index 6dd027fb02e..0cad1a896b0 100644 --- a/src/Polly/Context.Dictionary.cs +++ b/src/Polly/Context.Dictionary.cs @@ -1,6 +1,4 @@ -using System; -using System.Collections; -using System.Collections.Generic; +using System.Collections; namespace Polly; diff --git a/src/Polly/Context.cs b/src/Polly/Context.cs index d814dc77b99..317716de2d7 100644 --- a/src/Polly/Context.cs +++ b/src/Polly/Context.cs @@ -1,5 +1,4 @@ -using System; -using Polly.Wrap; +using Polly.Wrap; namespace Polly; diff --git a/src/Polly/DelegateResult.cs b/src/Polly/DelegateResult.cs index ecde18d9bc4..ad2abbcacbd 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 da5c263db43..52c5f11c034 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 964c6a9e810..dcc2aceb03b 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 dec2b0af7ed..3e6903758b9 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 29f27e85f08..15e2d480cc7 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 00c8bd06a35..0a43e0b2d94 100644 --- a/src/Polly/Fallback/AsyncFallbackPolicy.cs +++ b/src/Polly/Fallback/AsyncFallbackPolicy.cs @@ -1,7 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; +using System.Diagnostics; using Polly.Utilities; namespace Polly.Fallback; diff --git a/src/Polly/Fallback/AsyncFallbackSyntax.cs b/src/Polly/Fallback/AsyncFallbackSyntax.cs index 04749012a11..4af5c926cb7 100644 --- a/src/Polly/Fallback/AsyncFallbackSyntax.cs +++ b/src/Polly/Fallback/AsyncFallbackSyntax.cs @@ -1,7 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using Polly.Fallback; +using Polly.Fallback; using Polly.Utilities; namespace Polly; diff --git a/src/Polly/Fallback/FallbackEngine.cs b/src/Polly/Fallback/FallbackEngine.cs index 2e7f4f4762c..cb6223486b1 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 c0035d46152..77ad120b635 100644 --- a/src/Polly/Fallback/FallbackPolicy.cs +++ b/src/Polly/Fallback/FallbackPolicy.cs @@ -1,6 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; +using System.Diagnostics; using Polly.Utilities; namespace Polly.Fallback; diff --git a/src/Polly/Fallback/FallbackSyntax.cs b/src/Polly/Fallback/FallbackSyntax.cs index 0120ba74ff2..bb85413d920 100644 --- a/src/Polly/Fallback/FallbackSyntax.cs +++ b/src/Polly/Fallback/FallbackSyntax.cs @@ -1,6 +1,4 @@ -using System; -using System.Threading; -using Polly.Fallback; +using Polly.Fallback; namespace Polly; diff --git a/src/Polly/IAsyncPolicy.TResult.cs b/src/Polly/IAsyncPolicy.TResult.cs index 9b3b120e4f8..647bb56c5c1 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 c93424cea73..b9cd202e654 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 121a4dbc0a8..d75e4e40ed7 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 14dee2b9da2..c2d8e195e7f 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 21041ffedfb..1d30de68b21 100644 --- a/src/Polly/NoOp/AsyncNoOpPolicy.cs +++ b/src/Polly/NoOp/AsyncNoOpPolicy.cs @@ -1,7 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; +using System.Diagnostics; namespace Polly.NoOp; diff --git a/src/Polly/NoOp/NoOpEngine.cs b/src/Polly/NoOp/NoOpEngine.cs index 403a8c70a76..4efcc47cae0 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 6da9f2c4810..8276b5f055e 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 5bfe9fb57e3..64321360fc6 100644 --- a/src/Polly/NoOp/NoOpPolicy.cs +++ b/src/Polly/NoOp/NoOpPolicy.cs @@ -1,6 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; +using System.Diagnostics; namespace Polly.NoOp; diff --git a/src/Polly/Policy.ExecuteOverloads.cs b/src/Polly/Policy.ExecuteOverloads.cs index 67ad7fce170..87cd5e0d965 100644 --- a/src/Polly/Policy.ExecuteOverloads.cs +++ b/src/Polly/Policy.ExecuteOverloads.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Threading; +using System.Diagnostics; namespace Polly; diff --git a/src/Polly/Policy.HandleSyntax.cs b/src/Polly/Policy.HandleSyntax.cs index a7879bd5b8f..8f78983abd3 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 70b5ca642de..51121e6d287 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 2e315370840..31bc479695a 100644 --- a/src/Polly/Policy.SyncNonGenericImplementation.cs +++ b/src/Polly/Policy.SyncNonGenericImplementation.cs @@ -1,6 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; +using System.Diagnostics; using Polly.Utilities; namespace Polly; diff --git a/src/Polly/Policy.TResult.ExecuteOverloads.cs b/src/Polly/Policy.TResult.ExecuteOverloads.cs index 52a33e195fa..8e3e4312222 100644 --- a/src/Polly/Policy.TResult.ExecuteOverloads.cs +++ b/src/Polly/Policy.TResult.ExecuteOverloads.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Threading; +using System.Diagnostics; namespace Polly; diff --git a/src/Polly/PolicyBase.ContextAndKeys.cs b/src/Polly/PolicyBase.ContextAndKeys.cs index 511bbfa37c7..d8e7e81b670 100644 --- a/src/Polly/PolicyBase.ContextAndKeys.cs +++ b/src/Polly/PolicyBase.ContextAndKeys.cs @@ -1,5 +1,4 @@ -using System; -using Polly.Utilities; +using Polly.Utilities; namespace Polly; diff --git a/src/Polly/PolicyBase.cs b/src/Polly/PolicyBase.cs index 68ac86dc44a..6e919b5b0b2 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 31f5347a665..eeb6e58813c 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 69174532ad1..c6e26ee1725 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 9af147e8c61..bab5961efa3 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 3a178d88f58..a1001d6b8d0 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 fabb362c3ee..4e6b552906b 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 be7590aac2b..fa574f52ef6 100644 --- a/src/Polly/RateLimit/AsyncRateLimitPolicy.cs +++ b/src/Polly/RateLimit/AsyncRateLimitPolicy.cs @@ -1,7 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; +using System.Diagnostics; namespace Polly.RateLimit; diff --git a/src/Polly/RateLimit/AsyncRateLimitSyntax.cs b/src/Polly/RateLimit/AsyncRateLimitSyntax.cs index db0d6813898..03ac9219d0e 100644 --- a/src/Polly/RateLimit/AsyncRateLimitSyntax.cs +++ b/src/Polly/RateLimit/AsyncRateLimitSyntax.cs @@ -1,5 +1,4 @@ -using System; -using Polly.RateLimit; +using Polly.RateLimit; namespace Polly; diff --git a/src/Polly/RateLimit/AsyncRateLimitTResultSyntax.cs b/src/Polly/RateLimit/AsyncRateLimitTResultSyntax.cs index 4844f885013..db4418c9738 100644 --- a/src/Polly/RateLimit/AsyncRateLimitTResultSyntax.cs +++ b/src/Polly/RateLimit/AsyncRateLimitTResultSyntax.cs @@ -1,5 +1,4 @@ -using System; -using Polly.RateLimit; +using Polly.RateLimit; namespace Polly; diff --git a/src/Polly/RateLimit/IRateLimiter.cs b/src/Polly/RateLimit/IRateLimiter.cs index 74919b97ae9..d873e967ef5 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 421dc64800b..6306f69efff 100644 --- a/src/Polly/RateLimit/LockFreeTokenBucketRateLimiter.cs +++ b/src/Polly/RateLimit/LockFreeTokenBucketRateLimiter.cs @@ -1,6 +1,4 @@ -using System; -using System.Threading; -using Polly.Utilities; +using Polly.Utilities; namespace Polly.RateLimit; diff --git a/src/Polly/RateLimit/RateLimitEngine.cs b/src/Polly/RateLimit/RateLimitEngine.cs index 80dd425362d..6c85502592e 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 f1a09defc62..e2f45bf5875 100644 --- a/src/Polly/RateLimit/RateLimitPolicy.cs +++ b/src/Polly/RateLimit/RateLimitPolicy.cs @@ -1,6 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; +using System.Diagnostics; namespace Polly.RateLimit; diff --git a/src/Polly/RateLimit/RateLimitRejectedException.cs b/src/Polly/RateLimit/RateLimitRejectedException.cs index f2043e569e1..4f768ddafbf 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 5f509c9eb6d..dceb8ee3b1d 100644 --- a/src/Polly/RateLimit/RateLimitSyntax.cs +++ b/src/Polly/RateLimit/RateLimitSyntax.cs @@ -1,5 +1,4 @@ -using System; -using Polly.RateLimit; +using Polly.RateLimit; namespace Polly; diff --git a/src/Polly/RateLimit/RateLimitTResultSyntax.cs b/src/Polly/RateLimit/RateLimitTResultSyntax.cs index b6f09c6113b..8f9315b6c8b 100644 --- a/src/Polly/RateLimit/RateLimitTResultSyntax.cs +++ b/src/Polly/RateLimit/RateLimitTResultSyntax.cs @@ -1,5 +1,4 @@ -using System; -using Polly.RateLimit; +using Polly.RateLimit; namespace Polly; diff --git a/src/Polly/RateLimit/RateLimiterFactory.cs b/src/Polly/RateLimit/RateLimiterFactory.cs index 70bf40f2ec9..d00033684dc 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 8b5a2a3dc8d..9ed179e31f1 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 0cce3451a0b..5ba13b4d559 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 c938c637c60..56f68fadd9e 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 0da0fd538a1..5b3e04c8a48 100644 --- a/src/Polly/Registry/PolicyRegistry.cs +++ b/src/Polly/Registry/PolicyRegistry.cs @@ -1,6 +1,4 @@ -using System; -using System.Collections; -using System.Collections.Generic; +using System.Collections; using System.Collections.Concurrent; namespace Polly.Registry; diff --git a/src/Polly/ResultPredicates.cs b/src/Polly/ResultPredicates.cs index 293ccfbb358..52abd86980b 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 dc8997e5732..44fe6b001cb 100644 --- a/src/Polly/Retry/AsyncRetryEngine.cs +++ b/src/Polly/Retry/AsyncRetryEngine.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using Polly.Utilities; +using Polly.Utilities; namespace Polly.Retry; diff --git a/src/Polly/Retry/AsyncRetryPolicy.cs b/src/Polly/Retry/AsyncRetryPolicy.cs index 13dc5431db5..bb3b56b1760 100644 --- a/src/Polly/Retry/AsyncRetryPolicy.cs +++ b/src/Polly/Retry/AsyncRetryPolicy.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; +using System.Diagnostics; namespace Polly.Retry; diff --git a/src/Polly/Retry/AsyncRetrySyntax.cs b/src/Polly/Retry/AsyncRetrySyntax.cs index b494e888578..08972a6249f 100644 --- a/src/Polly/Retry/AsyncRetrySyntax.cs +++ b/src/Polly/Retry/AsyncRetrySyntax.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Polly.Retry; +using Polly.Retry; namespace Polly; diff --git a/src/Polly/Retry/AsyncRetryTResultSyntax.cs b/src/Polly/Retry/AsyncRetryTResultSyntax.cs index a50abd1714c..783014e06a2 100644 --- a/src/Polly/Retry/AsyncRetryTResultSyntax.cs +++ b/src/Polly/Retry/AsyncRetryTResultSyntax.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Polly.Retry; +using Polly.Retry; namespace Polly; diff --git a/src/Polly/Retry/RetryEngine.cs b/src/Polly/Retry/RetryEngine.cs index db9b90237cd..f4ef917b3c6 100644 --- a/src/Polly/Retry/RetryEngine.cs +++ b/src/Polly/Retry/RetryEngine.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using Polly.Utilities; +using Polly.Utilities; namespace Polly.Retry; diff --git a/src/Polly/Retry/RetryPolicy.cs b/src/Polly/Retry/RetryPolicy.cs index 3efe0d1f99a..f8bdc41345b 100644 --- a/src/Polly/Retry/RetryPolicy.cs +++ b/src/Polly/Retry/RetryPolicy.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Threading; +using System.Diagnostics; namespace Polly.Retry; diff --git a/src/Polly/Retry/RetrySyntax.cs b/src/Polly/Retry/RetrySyntax.cs index a440a4e9d39..a016dae9d3c 100644 --- a/src/Polly/Retry/RetrySyntax.cs +++ b/src/Polly/Retry/RetrySyntax.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Polly.Retry; +using Polly.Retry; namespace Polly; diff --git a/src/Polly/Retry/RetryTResultSyntax.cs b/src/Polly/Retry/RetryTResultSyntax.cs index 0183dbd6bbd..ddc6a765643 100644 --- a/src/Polly/Retry/RetryTResultSyntax.cs +++ b/src/Polly/Retry/RetryTResultSyntax.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; -using Polly.Retry; -using System.Linq; +using Polly.Retry; namespace Polly; diff --git a/src/Polly/Timeout/AsyncTimeoutEngine.cs b/src/Polly/Timeout/AsyncTimeoutEngine.cs index 8cb7568a87d..b63b5d3a395 100644 --- a/src/Polly/Timeout/AsyncTimeoutEngine.cs +++ b/src/Polly/Timeout/AsyncTimeoutEngine.cs @@ -1,7 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using Polly.Utilities; +using Polly.Utilities; namespace Polly.Timeout; diff --git a/src/Polly/Timeout/AsyncTimeoutPolicy.cs b/src/Polly/Timeout/AsyncTimeoutPolicy.cs index b298195d79b..fff422fd92b 100644 --- a/src/Polly/Timeout/AsyncTimeoutPolicy.cs +++ b/src/Polly/Timeout/AsyncTimeoutPolicy.cs @@ -1,7 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; +using System.Diagnostics; namespace Polly.Timeout; diff --git a/src/Polly/Timeout/AsyncTimeoutSyntax.cs b/src/Polly/Timeout/AsyncTimeoutSyntax.cs index be177da0e65..f9dff28534d 100644 --- a/src/Polly/Timeout/AsyncTimeoutSyntax.cs +++ b/src/Polly/Timeout/AsyncTimeoutSyntax.cs @@ -1,6 +1,4 @@ -using System; -using System.Threading.Tasks; -using Polly.Timeout; +using Polly.Timeout; using Polly.Utilities; namespace Polly; diff --git a/src/Polly/Timeout/AsyncTimeoutTResultSyntax.cs b/src/Polly/Timeout/AsyncTimeoutTResultSyntax.cs index 7b46b803ff9..e2acfd8b925 100644 --- a/src/Polly/Timeout/AsyncTimeoutTResultSyntax.cs +++ b/src/Polly/Timeout/AsyncTimeoutTResultSyntax.cs @@ -1,6 +1,4 @@ -using System; -using System.Threading.Tasks; -using Polly.Timeout; +using Polly.Timeout; namespace Polly; diff --git a/src/Polly/Timeout/TimeoutEngine.cs b/src/Polly/Timeout/TimeoutEngine.cs index 002cddc1096..0cf16b441a3 100644 --- a/src/Polly/Timeout/TimeoutEngine.cs +++ b/src/Polly/Timeout/TimeoutEngine.cs @@ -1,7 +1,4 @@ -using System; -using System.Runtime.ExceptionServices; -using System.Threading; -using System.Threading.Tasks; +using System.Runtime.ExceptionServices; using Polly.Utilities; namespace Polly.Timeout; diff --git a/src/Polly/Timeout/TimeoutPolicy.cs b/src/Polly/Timeout/TimeoutPolicy.cs index a6b0621078c..ee3139b9022 100644 --- a/src/Polly/Timeout/TimeoutPolicy.cs +++ b/src/Polly/Timeout/TimeoutPolicy.cs @@ -1,7 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; +using System.Diagnostics; namespace Polly.Timeout; diff --git a/src/Polly/Timeout/TimeoutRejectedException.cs b/src/Polly/Timeout/TimeoutRejectedException.cs index 6d899728263..17707fcac04 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 cb16a1fc859..ae183b88a21 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 e66e157b6f4..94c22b02b4a 100644 --- a/src/Polly/Timeout/TimeoutSyntax.cs +++ b/src/Polly/Timeout/TimeoutSyntax.cs @@ -1,6 +1,4 @@ using Polly.Timeout; -using System; -using System.Threading.Tasks; namespace Polly; diff --git a/src/Polly/Timeout/TimeoutTResultSyntax.cs b/src/Polly/Timeout/TimeoutTResultSyntax.cs index 4c1724d6d02..9567acfd1ad 100644 --- a/src/Polly/Timeout/TimeoutTResultSyntax.cs +++ b/src/Polly/Timeout/TimeoutTResultSyntax.cs @@ -1,6 +1,4 @@ -using System; -using Polly.Timeout; -using System.Threading.Tasks; +using Polly.Timeout; namespace Polly; diff --git a/src/Polly/Timeout/TimeoutValidator.cs b/src/Polly/Timeout/TimeoutValidator.cs index 0d6692b9595..f47b06963d2 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 d60cddd49d3..7472b387921 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 d4c19bd3c7e..fcdcfa19fcf 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 d2ea47c77c6..f378c6b50e9 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 82cb36491d9..44bf57db4f9 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 02a2c8fc387..35581f22441 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 90effaebef1..cef0d708349 100644 --- a/src/Polly/Wrap/AsyncPolicyWrap.cs +++ b/src/Polly/Wrap/AsyncPolicyWrap.cs @@ -1,7 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; +using System.Diagnostics; namespace Polly.Wrap; diff --git a/src/Polly/Wrap/AsyncPolicyWrapEngine.cs b/src/Polly/Wrap/AsyncPolicyWrapEngine.cs index 0a196ae0380..cbeaead579b 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 fc013078b70..bfa66061b05 100644 --- a/src/Polly/Wrap/AsyncPolicyWrapSyntax.cs +++ b/src/Polly/Wrap/AsyncPolicyWrapSyntax.cs @@ -1,6 +1,4 @@ -using System; -using System.Linq; -using Polly.Wrap; +using Polly.Wrap; namespace Polly; diff --git a/src/Polly/Wrap/IPolicyWrapExtension.cs b/src/Polly/Wrap/IPolicyWrapExtension.cs index 3348254894f..f02aae7706d 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 1cbbf3bf64d..f381c5a95fa 100644 --- a/src/Polly/Wrap/PolicyWrap.cs +++ b/src/Polly/Wrap/PolicyWrap.cs @@ -1,6 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; +using System.Diagnostics; namespace Polly.Wrap; diff --git a/src/Polly/Wrap/PolicyWrapEngine.cs b/src/Polly/Wrap/PolicyWrapEngine.cs index 508882d272c..1a52e3dc515 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 0a057f6d82b..05352c60305 100644 --- a/src/Polly/Wrap/PolicyWrapSyntax.cs +++ b/src/Polly/Wrap/PolicyWrapSyntax.cs @@ -1,6 +1,4 @@ -using System; -using System.Linq; -using Polly.Wrap; +using Polly.Wrap; namespace Polly; From 9ef5a573df92ec103fa388f20b66517c24419d28 Mon Sep 17 00:00:00 2001 From: Simon Cropp Date: Sun, 8 Jan 2023 20:52:27 +1100 Subject: [PATCH 2/4] . --- .../Bulkhead/BulkheadAsyncSpecs.cs | 9 +------- src/Polly.Specs/Bulkhead/BulkheadScenarios.cs | 4 +--- src/Polly.Specs/Bulkhead/BulkheadSpecs.cs | 8 +------ src/Polly.Specs/Bulkhead/BulkheadSpecsBase.cs | 9 +------- .../Bulkhead/BulkheadTResultAsyncSpecs.cs | 10 +-------- .../Bulkhead/BulkheadTResultSpecs.cs | 10 +-------- .../Bulkhead/IBulkheadPolicySpecs.cs | 6 +----- src/Polly.Specs/Caching/AbsoluteTtlSpecs.cs | 8 +------ src/Polly.Specs/Caching/CacheAsyncSpecs.cs | 9 +------- src/Polly.Specs/Caching/CacheSpecs.cs | 10 +-------- .../Caching/CacheTResultAsyncSpecs.cs | 9 +------- src/Polly.Specs/Caching/CacheTResultSpecs.cs | 10 +-------- src/Polly.Specs/Caching/ContextualTtlSpecs.cs | 6 +----- .../Caching/DefaultCacheKeyStrategySpecs.cs | 6 +----- .../Caching/GenericCacheProviderAsyncSpecs.cs | 9 +------- .../Caching/GenericCacheProviderSpecs.cs | 9 +------- src/Polly.Specs/Caching/RelativeTtlSpecs.cs | 7 +------ src/Polly.Specs/Caching/ResultTtlSpecs.cs | 6 +----- .../SerializingCacheProviderAsyncSpecs.cs | 8 +------ .../Caching/SerializingCacheProviderSpecs.cs | 9 +------- src/Polly.Specs/Caching/SlidingTtlSpecs.cs | 6 +----- .../AdvancedCircuitBreakerAsyncSpecs.cs | 9 +------- .../AdvancedCircuitBreakerSpecs.cs | 9 +------- .../CircuitBreakerAsyncSpecs.cs | 9 +------- .../CircuitBreaker/CircuitBreakerSpecs.cs | 9 +------- .../CircuitBreakerTResultAsyncSpecs.cs | 9 +------- ...BreakerTResultMixedResultExceptionSpecs.cs | 9 +------- .../CircuitBreakerTResultSpecs.cs | 9 +------- .../ICircuitBreakerPolicySpecs.cs | 6 +----- .../ICircuitBreakerPolicyTResultSpecs.cs | 7 +------ src/Polly.Specs/ContextSpecs.cs | 6 +----- src/Polly.Specs/Custom/CustomAsyncSpecs.cs | 4 +--- src/Polly.Specs/Custom/CustomSpecs.cs | 4 +--- .../Custom/CustomTResultAsyncSpecs.cs | 5 +---- src/Polly.Specs/Custom/CustomTResultSpecs.cs | 5 +---- .../Fallback/FallbackAsyncSpecs.cs | 7 +------ src/Polly.Specs/Fallback/FallbackSpecs.cs | 7 +------ .../Fallback/FallbackTResultAsyncSpecs.cs | 7 +------ .../Fallback/FallbackTResultSpecs.cs | 7 +------ src/Polly.Specs/GlobalUsings.cs | 21 +++++++++++++++++++ .../Helpers/Bulkhead/AnnotatedOutputHelper.cs | 1 - .../Helpers/Bulkhead/SilentOutputHelper.cs | 4 +--- .../Helpers/Bulkhead/TraceableAction.cs | 5 +---- .../Helpers/Caching/StubCacheKeyStrategy.cs | 4 +--- .../Helpers/Caching/StubCacheProvider.cs | 5 +---- .../Caching/StubErroringCacheProvider.cs | 5 +---- .../Helpers/Caching/StubSerializer.cs | 4 +--- .../ContextualPolicyExtensionsAsync.cs | 4 +--- .../AddBehaviourIfHandleEngine.cs | 4 +--- .../AsyncAddBehaviourIfHandleEngine.cs | 4 +--- .../Helpers/PolicyExtensionsAsync.cs | 4 +--- .../RateLimit/IRateLimiterExtensions.cs | 3 +-- .../IAsyncPolicyExtensionsSpecs.cs | 7 +------ src/Polly.Specs/ISyncPolicyExtensionsSpecs.cs | 7 +------ src/Polly.Specs/NoOp/NoOpAsyncSpecs.cs | 6 +----- src/Polly.Specs/NoOp/NoOpSpecs.cs | 6 +----- src/Polly.Specs/NoOp/NoOpTResultAsyncSpecs.cs | 6 +----- src/Polly.Specs/NoOp/NoOpTResultSpecs.cs | 6 +----- src/Polly.Specs/PolicyAsyncSpecs.cs | 6 +----- .../PolicyContextAndKeyAsyncSpecs.cs | 7 +------ src/Polly.Specs/PolicyContextAndKeySpecs.cs | 6 +----- src/Polly.Specs/PolicySpecs.cs | 5 +---- src/Polly.Specs/PolicyTResultAsyncSpecs.cs | 6 +----- src/Polly.Specs/PolicyTResultSpecs.cs | 6 +----- src/Polly.Specs/Polly.Specs.csproj | 4 +--- .../RateLimit/AsyncRateLimitPolicySpecs.cs | 3 --- .../AsyncRateLimitPolicyTResultSpecs.cs | 3 --- .../RateLimit/RateLimitPolicySpecs.cs | 3 --- .../RateLimit/RateLimitPolicySpecsBase.cs | 4 +--- .../RateLimit/RateLimitPolicyTResultSpecs.cs | 3 --- .../RateLimitPolicyTResultSpecsBase.cs | 5 +---- .../RateLimit/RateLimitSpecsBase.cs | 7 +------ .../TokenBucketRateLimiterTestsBase.cs | 5 +---- .../Registry/ConcurrentPolicyRegistrySpecs.cs | 8 +------ .../Registry/PolicyRegistrySpecs.cs | 4 ---- .../Registry/ReadOnlyPolicyRegistrySpecs.cs | 6 +----- src/Polly.Specs/Retry/RetryAsyncSpecs.cs | 7 +------ .../Retry/RetryForeverAsyncSpecs.cs | 7 +------ src/Polly.Specs/Retry/RetryForeverSpecs.cs | 6 +----- src/Polly.Specs/Retry/RetrySpecs.cs | 6 +----- .../RetryTResultMixedResultExceptionSpecs.cs | 6 +----- src/Polly.Specs/Retry/RetryTResultSpecs.cs | 6 +----- .../Retry/RetryTResultSpecsAsync.cs | 7 +------ .../Retry/WaitAndRetryAsyncSpecs.cs | 9 +------- .../Retry/WaitAndRetryForeverAsyncSpecs.cs | 8 +------ .../Retry/WaitAndRetryForeverSpecs.cs | 8 +------ .../WaitAndRetryForeverTResultAsyncSpecs.cs | 8 +------ .../Retry/WaitAndRetryForeverTResultSpecs.cs | 8 +------ src/Polly.Specs/Retry/WaitAndRetrySpecs.cs | 9 +------- .../Retry/WaitAndRetryTResultAsyncSpecs.cs | 8 +------ .../Retry/WaitAndRetryTResultSpecs.cs | 8 +------ src/Polly.Specs/Timeout/TimeoutAsyncSpecs.cs | 7 +------ src/Polly.Specs/Timeout/TimeoutSpecs.cs | 7 +------ src/Polly.Specs/Timeout/TimeoutSpecsBase.cs | 1 - .../Timeout/TimeoutTResultAsyncSpecs.cs | 7 +------ .../Timeout/TimeoutTResultSpecs.cs | 7 +------ .../Wrap/IPolicyWrapExtensionSpecs.cs | 7 +------ .../Wrap/PolicyWrapContextAndKeySpecs.cs | 6 +----- .../Wrap/PolicyWrapContextAndKeySpecsAsync.cs | 7 +------ src/Polly.Specs/Wrap/PolicyWrapSpecs.cs | 7 +------ src/Polly.Specs/Wrap/PolicyWrapSpecsAsync.cs | 8 +------ src/Polly/AsyncPolicy.ExecuteOverloads.cs | 4 +--- .../AsyncPolicy.NonGenericImplementation.cs | 4 +--- .../AsyncPolicy.TResult.ExecuteOverloads.cs | 4 +--- src/Polly/Bulkhead/AsyncBulkheadPolicy.cs | 4 +--- src/Polly/Bulkhead/AsyncBulkheadSyntax.cs | 3 --- .../Bulkhead/AsyncBulkheadTResultSyntax.cs | 5 +---- src/Polly/Bulkhead/BulkheadPolicy.cs | 4 +--- src/Polly/Bulkhead/BulkheadSyntax.cs | 4 +--- src/Polly/Bulkhead/BulkheadTResultSyntax.cs | 4 +--- src/Polly/Caching/AsyncCachePolicy.cs | 4 +--- src/Polly/Caching/AsyncCacheSyntax.cs | 4 +--- src/Polly/Caching/AsyncCacheTResultSyntax.cs | 4 +--- src/Polly/Caching/CachePolicy.cs | 4 +--- src/Polly/Caching/CacheSyntax.cs | 4 +--- src/Polly/Caching/CacheTResultSyntax.cs | 4 +--- src/Polly/Caching/NonSlidingTtl.cs | 4 +--- .../AdvancedCircuitBreakerSyntax.cs | 3 --- .../AdvancedCircuitBreakerTResultSyntax.cs | 5 +---- .../AdvancedCircuitController.cs | 4 +--- .../AsyncAdvancedCircuitBreakerSyntax.cs | 5 +---- ...syncAdvancedCircuitBreakerTResultSyntax.cs | 3 --- .../AsyncCircuitBreakerEngine.cs | 4 +--- .../AsyncCircuitBreakerPolicy.cs | 5 +---- .../AsyncCircuitBreakerSyntax.cs | 5 +---- .../AsyncCircuitBreakerTResultSyntax.cs | 4 +--- .../CircuitBreaker/CircuitBreakerPolicy.cs | 5 +---- .../CircuitBreaker/CircuitBreakerSyntax.cs | 3 --- .../CircuitBreakerTResultSyntax.cs | 4 +--- .../CircuitBreaker/CircuitStateController.cs | 4 +--- .../ConsecutiveCountCircuitController.cs | 4 +--- .../IsolatedCircuitException.cs | 1 - .../CircuitBreaker/RollingHealthMetrics.cs | 4 +--- .../CircuitBreaker/SingleHealthMetrics.cs | 4 +--- src/Polly/Context.Dictionary.cs | 4 +--- src/Polly/Context.cs | 4 +--- src/Polly/Fallback/AsyncFallbackPolicy.cs | 5 +---- src/Polly/Fallback/AsyncFallbackSyntax.cs | 5 +---- src/Polly/Fallback/FallbackPolicy.cs | 5 +---- src/Polly/Fallback/FallbackSyntax.cs | 4 +--- src/Polly/GlobalUsings.cs | 14 +++++++++++++ src/Polly/NoOp/AsyncNoOpPolicy.cs | 4 +--- src/Polly/NoOp/AsyncNoOpSyntax.cs | 4 +--- src/Polly/NoOp/AsyncNoOpTResultSyntax.cs | 4 +--- src/Polly/NoOp/NoOpPolicy.cs | 4 +--- src/Polly/NoOp/NoOpSyntax.cs | 4 +--- src/Polly/NoOp/NoOpTResultSyntax.cs | 4 +--- src/Polly/Policy.ExecuteOverloads.cs | 4 +--- .../Policy.SyncNonGenericImplementation.cs | 5 +---- src/Polly/Policy.TResult.ExecuteOverloads.cs | 5 +---- src/Polly/PolicyBase.ContextAndKeys.cs | 4 +--- src/Polly/RateLimit/AsyncRateLimitPolicy.cs | 4 +--- src/Polly/RateLimit/AsyncRateLimitSyntax.cs | 4 +--- .../RateLimit/AsyncRateLimitTResultSyntax.cs | 4 +--- .../LockFreeTokenBucketRateLimiter.cs | 4 +--- src/Polly/RateLimit/RateLimitPolicy.cs | 4 +--- src/Polly/RateLimit/RateLimitSyntax.cs | 4 +--- src/Polly/RateLimit/RateLimitTResultSyntax.cs | 4 +--- src/Polly/Registry/PolicyRegistry.cs | 3 +-- src/Polly/Retry/AsyncRetryEngine.cs | 4 +--- src/Polly/Retry/AsyncRetryPolicy.cs | 4 +--- src/Polly/Retry/AsyncRetrySyntax.cs | 4 +--- src/Polly/Retry/AsyncRetryTResultSyntax.cs | 4 +--- src/Polly/Retry/RetryEngine.cs | 4 +--- src/Polly/Retry/RetryPolicy.cs | 4 +--- src/Polly/Retry/RetrySyntax.cs | 4 +--- src/Polly/Retry/RetryTResultSyntax.cs | 4 +--- src/Polly/Timeout/AsyncTimeoutEngine.cs | 4 +--- src/Polly/Timeout/AsyncTimeoutPolicy.cs | 4 +--- src/Polly/Timeout/AsyncTimeoutSyntax.cs | 5 +---- .../Timeout/AsyncTimeoutTResultSyntax.cs | 4 +--- src/Polly/Timeout/TimeoutEngine.cs | 1 - src/Polly/Timeout/TimeoutPolicy.cs | 4 +--- src/Polly/Timeout/TimeoutSyntax.cs | 4 +--- src/Polly/Timeout/TimeoutTResultSyntax.cs | 4 +--- src/Polly/Wrap/AsyncPolicyWrap.cs | 4 +--- src/Polly/Wrap/AsyncPolicyWrapSyntax.cs | 4 +--- src/Polly/Wrap/PolicyWrap.cs | 4 +--- src/Polly/Wrap/PolicyWrapSyntax.cs | 4 +--- 179 files changed, 199 insertions(+), 792 deletions(-) create mode 100644 src/Polly.Specs/GlobalUsings.cs create mode 100644 src/Polly/GlobalUsings.cs diff --git a/src/Polly.Specs/Bulkhead/BulkheadAsyncSpecs.cs b/src/Polly.Specs/Bulkhead/BulkheadAsyncSpecs.cs index 17140d0d24d..aff108e6ada 100644 --- a/src/Polly.Specs/Bulkhead/BulkheadAsyncSpecs.cs +++ b/src/Polly.Specs/Bulkhead/BulkheadAsyncSpecs.cs @@ -1,11 +1,4 @@ -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 32b78da8e62..d84471128ca 100644 --- a/src/Polly.Specs/Bulkhead/BulkheadScenarios.cs +++ b/src/Polly.Specs/Bulkhead/BulkheadScenarios.cs @@ -1,6 +1,4 @@ -using System.Collections; - -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 b76e0e79e74..61c9d6ea8a9 100644 --- a/src/Polly.Specs/Bulkhead/BulkheadSpecs.cs +++ b/src/Polly.Specs/Bulkhead/BulkheadSpecs.cs @@ -1,10 +1,4 @@ -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 5a8170bf050..7a230656ee2 100644 --- a/src/Polly.Specs/Bulkhead/BulkheadSpecsBase.cs +++ b/src/Polly.Specs/Bulkhead/BulkheadSpecsBase.cs @@ -1,11 +1,4 @@ -using System.Diagnostics; -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 bf8c28a235e..a00b62f2a32 100644 --- a/src/Polly.Specs/Bulkhead/BulkheadTResultAsyncSpecs.cs +++ b/src/Polly.Specs/Bulkhead/BulkheadTResultAsyncSpecs.cs @@ -1,12 +1,4 @@ -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 7f5b05b4607..e2fd4f3db3b 100644 --- a/src/Polly.Specs/Bulkhead/BulkheadTResultSpecs.cs +++ b/src/Polly.Specs/Bulkhead/BulkheadTResultSpecs.cs @@ -1,12 +1,4 @@ -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 4b6d5b1904a..56f4c5fbba0 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 07bc57b234b..74e834e8a8a 100644 --- a/src/Polly.Specs/Caching/AbsoluteTtlSpecs.cs +++ b/src/Polly.Specs/Caching/AbsoluteTtlSpecs.cs @@ -1,10 +1,4 @@ -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 d70d4d2fc33..19543f17d00 100644 --- a/src/Polly.Specs/Caching/CacheAsyncSpecs.cs +++ b/src/Polly.Specs/Caching/CacheAsyncSpecs.cs @@ -1,11 +1,4 @@ -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 5975bc38437..a71a081c20b 100644 --- a/src/Polly.Specs/Caching/CacheSpecs.cs +++ b/src/Polly.Specs/Caching/CacheSpecs.cs @@ -1,12 +1,4 @@ -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 f2ec806c4d7..ca18c6f6a4c 100644 --- a/src/Polly.Specs/Caching/CacheTResultAsyncSpecs.cs +++ b/src/Polly.Specs/Caching/CacheTResultAsyncSpecs.cs @@ -1,11 +1,4 @@ -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 85ad4ba3017..5e58a64d1b5 100644 --- a/src/Polly.Specs/Caching/CacheTResultSpecs.cs +++ b/src/Polly.Specs/Caching/CacheTResultSpecs.cs @@ -1,12 +1,4 @@ -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 8f6de9657e2..0ddb4cb8e3c 100644 --- a/src/Polly.Specs/Caching/ContextualTtlSpecs.cs +++ b/src/Polly.Specs/Caching/ContextualTtlSpecs.cs @@ -1,8 +1,4 @@ -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 53b746e66db..c81162040d4 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 7c0dc8aaad3..dcff63a2f23 100644 --- a/src/Polly.Specs/Caching/GenericCacheProviderAsyncSpecs.cs +++ b/src/Polly.Specs/Caching/GenericCacheProviderAsyncSpecs.cs @@ -1,11 +1,4 @@ -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 62f4f55c584..114e57623e6 100644 --- a/src/Polly.Specs/Caching/GenericCacheProviderSpecs.cs +++ b/src/Polly.Specs/Caching/GenericCacheProviderSpecs.cs @@ -1,11 +1,4 @@ -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 68995ad3ce9..0f607debc1f 100644 --- a/src/Polly.Specs/Caching/RelativeTtlSpecs.cs +++ b/src/Polly.Specs/Caching/RelativeTtlSpecs.cs @@ -1,9 +1,4 @@ -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 c29f5b88c8e..513d032cb35 100644 --- a/src/Polly.Specs/Caching/ResultTtlSpecs.cs +++ b/src/Polly.Specs/Caching/ResultTtlSpecs.cs @@ -1,8 +1,4 @@ -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 7a76729dcb1..c3b7d8e0d49 100644 --- a/src/Polly.Specs/Caching/SerializingCacheProviderAsyncSpecs.cs +++ b/src/Polly.Specs/Caching/SerializingCacheProviderAsyncSpecs.cs @@ -1,10 +1,4 @@ -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 86198843ad9..5004d77946d 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 61bea95c7ca..5b86d5cccef 100644 --- a/src/Polly.Specs/Caching/SlidingTtlSpecs.cs +++ b/src/Polly.Specs/Caching/SlidingTtlSpecs.cs @@ -1,8 +1,4 @@ -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 953b3ab7882..60e4ab22876 100644 --- a/src/Polly.Specs/CircuitBreaker/AdvancedCircuitBreakerAsyncSpecs.cs +++ b/src/Polly.Specs/CircuitBreaker/AdvancedCircuitBreakerAsyncSpecs.cs @@ -1,11 +1,4 @@ -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 62670d27276..8420e7fd529 100644 --- a/src/Polly.Specs/CircuitBreaker/AdvancedCircuitBreakerSpecs.cs +++ b/src/Polly.Specs/CircuitBreaker/AdvancedCircuitBreakerSpecs.cs @@ -1,11 +1,4 @@ -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 674b661abce..e8e30dc034b 100644 --- a/src/Polly.Specs/CircuitBreaker/CircuitBreakerAsyncSpecs.cs +++ b/src/Polly.Specs/CircuitBreaker/CircuitBreakerAsyncSpecs.cs @@ -1,11 +1,4 @@ -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 aae71c02cfb..2f27bea5daa 100644 --- a/src/Polly.Specs/CircuitBreaker/CircuitBreakerSpecs.cs +++ b/src/Polly.Specs/CircuitBreaker/CircuitBreakerSpecs.cs @@ -1,11 +1,4 @@ -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 549de5f5f4c..13a9656e754 100644 --- a/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultAsyncSpecs.cs +++ b/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultAsyncSpecs.cs @@ -1,11 +1,4 @@ -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 2c57599d78a..071dab2b0c3 100644 --- a/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultMixedResultExceptionSpecs.cs +++ b/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultMixedResultExceptionSpecs.cs @@ -1,11 +1,4 @@ -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 08ce0677c72..e2b6a60ef2f 100644 --- a/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultSpecs.cs +++ b/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultSpecs.cs @@ -1,11 +1,4 @@ -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 74e26c9e0d3..ce4e3a31882 100644 --- a/src/Polly.Specs/CircuitBreaker/ICircuitBreakerPolicySpecs.cs +++ b/src/Polly.Specs/CircuitBreaker/ICircuitBreakerPolicySpecs.cs @@ -1,8 +1,4 @@ -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 966b94a905f..1c124ed82f0 100644 --- a/src/Polly.Specs/CircuitBreaker/ICircuitBreakerPolicyTResultSpecs.cs +++ b/src/Polly.Specs/CircuitBreaker/ICircuitBreakerPolicyTResultSpecs.cs @@ -1,9 +1,4 @@ -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 08ffe3d189c..f4709e8fc2b 100644 --- a/src/Polly.Specs/ContextSpecs.cs +++ b/src/Polly.Specs/ContextSpecs.cs @@ -1,8 +1,4 @@ -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 348250b4c42..9a26fabc92a 100644 --- a/src/Polly.Specs/Custom/CustomAsyncSpecs.cs +++ b/src/Polly.Specs/Custom/CustomAsyncSpecs.cs @@ -1,7 +1,5 @@ -using FluentAssertions; -using Polly.Specs.Helpers.Custom.AddBehaviourIfHandle; +using Polly.Specs.Helpers.Custom.AddBehaviourIfHandle; using Polly.Specs.Helpers.Custom.PreExecute; -using Xunit; namespace Polly.Specs.Custom; diff --git a/src/Polly.Specs/Custom/CustomSpecs.cs b/src/Polly.Specs/Custom/CustomSpecs.cs index 78e0f724c92..be7fedac3e8 100644 --- a/src/Polly.Specs/Custom/CustomSpecs.cs +++ b/src/Polly.Specs/Custom/CustomSpecs.cs @@ -1,7 +1,5 @@ -using FluentAssertions; -using Polly.Specs.Helpers.Custom.AddBehaviourIfHandle; +using Polly.Specs.Helpers.Custom.AddBehaviourIfHandle; using Polly.Specs.Helpers.Custom.PreExecute; -using Xunit; namespace Polly.Specs.Custom; diff --git a/src/Polly.Specs/Custom/CustomTResultAsyncSpecs.cs b/src/Polly.Specs/Custom/CustomTResultAsyncSpecs.cs index 462e87e117b..f2b35babe40 100644 --- a/src/Polly.Specs/Custom/CustomTResultAsyncSpecs.cs +++ b/src/Polly.Specs/Custom/CustomTResultAsyncSpecs.cs @@ -1,8 +1,5 @@ -using FluentAssertions; -using Polly.Specs.Helpers; -using Polly.Specs.Helpers.Custom.AddBehaviourIfHandle; +using Polly.Specs.Helpers.Custom.AddBehaviourIfHandle; using Polly.Specs.Helpers.Custom.PreExecute; -using Xunit; namespace Polly.Specs.Custom; diff --git a/src/Polly.Specs/Custom/CustomTResultSpecs.cs b/src/Polly.Specs/Custom/CustomTResultSpecs.cs index 90d792be5f5..db33892ba3c 100644 --- a/src/Polly.Specs/Custom/CustomTResultSpecs.cs +++ b/src/Polly.Specs/Custom/CustomTResultSpecs.cs @@ -1,8 +1,5 @@ -using FluentAssertions; -using Polly.Specs.Helpers; -using Polly.Specs.Helpers.Custom.AddBehaviourIfHandle; +using Polly.Specs.Helpers.Custom.AddBehaviourIfHandle; using Polly.Specs.Helpers.Custom.PreExecute; -using Xunit; namespace Polly.Specs.Custom; diff --git a/src/Polly.Specs/Fallback/FallbackAsyncSpecs.cs b/src/Polly.Specs/Fallback/FallbackAsyncSpecs.cs index 111e840e908..609460dc581 100644 --- a/src/Polly.Specs/Fallback/FallbackAsyncSpecs.cs +++ b/src/Polly.Specs/Fallback/FallbackAsyncSpecs.cs @@ -1,9 +1,4 @@ -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 04a78bf8a68..7ecb56e4ed4 100644 --- a/src/Polly.Specs/Fallback/FallbackSpecs.cs +++ b/src/Polly.Specs/Fallback/FallbackSpecs.cs @@ -1,9 +1,4 @@ -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 445c9bbce67..0550c008e49 100644 --- a/src/Polly.Specs/Fallback/FallbackTResultAsyncSpecs.cs +++ b/src/Polly.Specs/Fallback/FallbackTResultAsyncSpecs.cs @@ -1,9 +1,4 @@ -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 59ff0c63130..389ed0ebf62 100644 --- a/src/Polly.Specs/Fallback/FallbackTResultSpecs.cs +++ b/src/Polly.Specs/Fallback/FallbackTResultSpecs.cs @@ -1,9 +1,4 @@ -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/GlobalUsings.cs b/src/Polly.Specs/GlobalUsings.cs new file mode 100644 index 00000000000..ecf40555526 --- /dev/null +++ b/src/Polly.Specs/GlobalUsings.cs @@ -0,0 +1,21 @@ +// Global using directives + +global using System.Collections; +global using System.Diagnostics; +global using FluentAssertions; +global using FluentAssertions.Execution; +global using FluentAssertions.Extensions; +global using Polly.Bulkhead; +global using Polly.Caching; +global using Polly.CircuitBreaker; +global using Polly.Fallback; +global using Polly.NoOp; +global using Polly.Registry; +global using Polly.Specs.Helpers; +global using Polly.Specs.Helpers.Bulkhead; +global using Polly.Specs.Helpers.Caching; +global using Polly.Utilities; +global using Polly.Wrap; +global using Xunit; +global using Xunit.Abstractions; +global using Xunit.Sdk; \ No newline at end of file diff --git a/src/Polly.Specs/Helpers/Bulkhead/AnnotatedOutputHelper.cs b/src/Polly.Specs/Helpers/Bulkhead/AnnotatedOutputHelper.cs index e20936f5b0f..833748fe285 100644 --- a/src/Polly.Specs/Helpers/Bulkhead/AnnotatedOutputHelper.cs +++ b/src/Polly.Specs/Helpers/Bulkhead/AnnotatedOutputHelper.cs @@ -1,5 +1,4 @@ using System.Collections.Concurrent; -using Xunit.Abstractions; namespace Polly.Specs.Helpers.Bulkhead; diff --git a/src/Polly.Specs/Helpers/Bulkhead/SilentOutputHelper.cs b/src/Polly.Specs/Helpers/Bulkhead/SilentOutputHelper.cs index 5417f0d1f72..2aa50df2883 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 ff8d6c935ea..c08fa77d05d 100644 --- a/src/Polly.Specs/Helpers/Bulkhead/TraceableAction.cs +++ b/src/Polly.Specs/Helpers/Bulkhead/TraceableAction.cs @@ -1,7 +1,4 @@ -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 6e0ef204eec..4270f826b16 100644 --- a/src/Polly.Specs/Helpers/Caching/StubCacheKeyStrategy.cs +++ b/src/Polly.Specs/Helpers/Caching/StubCacheKeyStrategy.cs @@ -1,6 +1,4 @@ -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 91424d6da9b..7863121131f 100644 --- a/src/Polly.Specs/Helpers/Caching/StubCacheProvider.cs +++ b/src/Polly.Specs/Helpers/Caching/StubCacheProvider.cs @@ -1,7 +1,4 @@ -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 a278eb2f2e8..dbc41e8d63b 100644 --- a/src/Polly.Specs/Helpers/Caching/StubErroringCacheProvider.cs +++ b/src/Polly.Specs/Helpers/Caching/StubErroringCacheProvider.cs @@ -1,7 +1,4 @@ -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 a06cf779b1f..66142315bc6 100644 --- a/src/Polly.Specs/Helpers/Caching/StubSerializer.cs +++ b/src/Polly.Specs/Helpers/Caching/StubSerializer.cs @@ -1,6 +1,4 @@ -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/ContextualPolicyExtensionsAsync.cs b/src/Polly.Specs/Helpers/ContextualPolicyExtensionsAsync.cs index e50a1f211a8..91ef52516a7 100644 --- a/src/Polly.Specs/Helpers/ContextualPolicyExtensionsAsync.cs +++ b/src/Polly.Specs/Helpers/ContextualPolicyExtensionsAsync.cs @@ -1,6 +1,4 @@ -using Polly.Utilities; - -namespace Polly.Specs.Helpers; +namespace Polly.Specs.Helpers; public static class ContextualPolicyExtensionsAsync { diff --git a/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AddBehaviourIfHandleEngine.cs b/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AddBehaviourIfHandleEngine.cs index 83affb7a472..69bc89a1c3f 100644 --- a/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AddBehaviourIfHandleEngine.cs +++ b/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AddBehaviourIfHandleEngine.cs @@ -1,6 +1,4 @@ -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/AsyncAddBehaviourIfHandleEngine.cs b/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AsyncAddBehaviourIfHandleEngine.cs index f18293e6b28..f60dca78e35 100644 --- a/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AsyncAddBehaviourIfHandleEngine.cs +++ b/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AsyncAddBehaviourIfHandleEngine.cs @@ -1,6 +1,4 @@ -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/PolicyExtensionsAsync.cs b/src/Polly.Specs/Helpers/PolicyExtensionsAsync.cs index eb54e625cc4..49d31e6ecc1 100644 --- a/src/Polly.Specs/Helpers/PolicyExtensionsAsync.cs +++ b/src/Polly.Specs/Helpers/PolicyExtensionsAsync.cs @@ -1,6 +1,4 @@ -using Polly.Utilities; - -namespace Polly.Specs.Helpers; +namespace Polly.Specs.Helpers; public static class PolicyExtensionsAsync { diff --git a/src/Polly.Specs/Helpers/RateLimit/IRateLimiterExtensions.cs b/src/Polly.Specs/Helpers/RateLimit/IRateLimiterExtensions.cs index 922d1cb18ab..9f4a78e84d4 100644 --- a/src/Polly.Specs/Helpers/RateLimit/IRateLimiterExtensions.cs +++ b/src/Polly.Specs/Helpers/RateLimit/IRateLimiterExtensions.cs @@ -1,5 +1,4 @@ -using FluentAssertions; -using Polly.RateLimit; +using Polly.RateLimit; namespace Polly.Specs.Helpers.RateLimit; diff --git a/src/Polly.Specs/IAsyncPolicyExtensionsSpecs.cs b/src/Polly.Specs/IAsyncPolicyExtensionsSpecs.cs index 7a9678f8c0d..443db1dfd08 100644 --- a/src/Polly.Specs/IAsyncPolicyExtensionsSpecs.cs +++ b/src/Polly.Specs/IAsyncPolicyExtensionsSpecs.cs @@ -1,9 +1,4 @@ -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 314dc728db1..2759117c2fd 100644 --- a/src/Polly.Specs/ISyncPolicyExtensionsSpecs.cs +++ b/src/Polly.Specs/ISyncPolicyExtensionsSpecs.cs @@ -1,9 +1,4 @@ -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 cd19246ccd5..035e605283a 100644 --- a/src/Polly.Specs/NoOp/NoOpAsyncSpecs.cs +++ b/src/Polly.Specs/NoOp/NoOpAsyncSpecs.cs @@ -1,8 +1,4 @@ -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 37de67bfd86..954ca62f481 100644 --- a/src/Polly.Specs/NoOp/NoOpSpecs.cs +++ b/src/Polly.Specs/NoOp/NoOpSpecs.cs @@ -1,8 +1,4 @@ -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 5bc1e9cd2e4..006bab7bb43 100644 --- a/src/Polly.Specs/NoOp/NoOpTResultAsyncSpecs.cs +++ b/src/Polly.Specs/NoOp/NoOpTResultAsyncSpecs.cs @@ -1,8 +1,4 @@ -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 32ff01dcd18..bf3c61f5687 100644 --- a/src/Polly.Specs/NoOp/NoOpTResultSpecs.cs +++ b/src/Polly.Specs/NoOp/NoOpTResultSpecs.cs @@ -1,8 +1,4 @@ -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 34031e7e92f..1dcba939d70 100644 --- a/src/Polly.Specs/PolicyAsyncSpecs.cs +++ b/src/Polly.Specs/PolicyAsyncSpecs.cs @@ -1,8 +1,4 @@ -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 8aea3318c5c..52501f4b54f 100644 --- a/src/Polly.Specs/PolicyContextAndKeyAsyncSpecs.cs +++ b/src/Polly.Specs/PolicyContextAndKeyAsyncSpecs.cs @@ -1,9 +1,4 @@ -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 dcf3bdae214..c8d9917fb04 100644 --- a/src/Polly.Specs/PolicyContextAndKeySpecs.cs +++ b/src/Polly.Specs/PolicyContextAndKeySpecs.cs @@ -1,8 +1,4 @@ -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 85cf29deb7d..f9f21210624 100644 --- a/src/Polly.Specs/PolicySpecs.cs +++ b/src/Polly.Specs/PolicySpecs.cs @@ -1,7 +1,4 @@ -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 62b5d1c4d38..376fa5fe77c 100644 --- a/src/Polly.Specs/PolicyTResultAsyncSpecs.cs +++ b/src/Polly.Specs/PolicyTResultAsyncSpecs.cs @@ -1,8 +1,4 @@ -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 faeab39f37d..5235164e9e4 100644 --- a/src/Polly.Specs/PolicyTResultSpecs.cs +++ b/src/Polly.Specs/PolicyTResultSpecs.cs @@ -1,8 +1,4 @@ -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 3b3dcb80453..480ffbdfecd 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 e1f0323091d..37e63bdfb64 100644 --- a/src/Polly.Specs/RateLimit/AsyncRateLimitPolicySpecs.cs +++ b/src/Polly.Specs/RateLimit/AsyncRateLimitPolicySpecs.cs @@ -1,8 +1,5 @@ using Polly.RateLimit; -using Polly.Specs.Helpers; using Polly.Specs.Helpers.RateLimit; -using Polly.Utilities; -using Xunit; namespace Polly.Specs.RateLimit; diff --git a/src/Polly.Specs/RateLimit/AsyncRateLimitPolicyTResultSpecs.cs b/src/Polly.Specs/RateLimit/AsyncRateLimitPolicyTResultSpecs.cs index 67bb61be955..c25a5360b8a 100644 --- a/src/Polly.Specs/RateLimit/AsyncRateLimitPolicyTResultSpecs.cs +++ b/src/Polly.Specs/RateLimit/AsyncRateLimitPolicyTResultSpecs.cs @@ -1,8 +1,5 @@ using Polly.RateLimit; -using Polly.Specs.Helpers; using Polly.Specs.Helpers.RateLimit; -using Polly.Utilities; -using Xunit; namespace Polly.Specs.RateLimit; diff --git a/src/Polly.Specs/RateLimit/RateLimitPolicySpecs.cs b/src/Polly.Specs/RateLimit/RateLimitPolicySpecs.cs index 932860b731a..26f37c294e2 100644 --- a/src/Polly.Specs/RateLimit/RateLimitPolicySpecs.cs +++ b/src/Polly.Specs/RateLimit/RateLimitPolicySpecs.cs @@ -1,8 +1,5 @@ using Polly.RateLimit; -using Polly.Specs.Helpers; using Polly.Specs.Helpers.RateLimit; -using Polly.Utilities; -using Xunit; namespace Polly.Specs.RateLimit; diff --git a/src/Polly.Specs/RateLimit/RateLimitPolicySpecsBase.cs b/src/Polly.Specs/RateLimit/RateLimitPolicySpecsBase.cs index 6cbd3bbc9c5..10befdca918 100644 --- a/src/Polly.Specs/RateLimit/RateLimitPolicySpecsBase.cs +++ b/src/Polly.Specs/RateLimit/RateLimitPolicySpecsBase.cs @@ -1,6 +1,4 @@ -using FluentAssertions; -using Polly.RateLimit; -using Xunit; +using Polly.RateLimit; namespace Polly.Specs.RateLimit; diff --git a/src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecs.cs b/src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecs.cs index d322ed43f41..5f44a60cb20 100644 --- a/src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecs.cs +++ b/src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecs.cs @@ -1,8 +1,5 @@ using Polly.RateLimit; -using Polly.Specs.Helpers; using Polly.Specs.Helpers.RateLimit; -using Polly.Utilities; -using Xunit; namespace Polly.Specs.RateLimit; diff --git a/src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecsBase.cs b/src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecsBase.cs index 6ab21ffb839..e8c5da93168 100644 --- a/src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecsBase.cs +++ b/src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecsBase.cs @@ -1,8 +1,5 @@ -using FluentAssertions; -using Polly.RateLimit; -using Polly.Specs.Helpers; +using Polly.RateLimit; using Polly.Specs.Helpers.RateLimit; -using Xunit; namespace Polly.Specs.RateLimit; diff --git a/src/Polly.Specs/RateLimit/RateLimitSpecsBase.cs b/src/Polly.Specs/RateLimit/RateLimitSpecsBase.cs index 9db719f27c3..c3a93dd7645 100644 --- a/src/Polly.Specs/RateLimit/RateLimitSpecsBase.cs +++ b/src/Polly.Specs/RateLimit/RateLimitSpecsBase.cs @@ -1,9 +1,4 @@ -using System.Diagnostics; -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 c8d7a50309f..3849b3458c6 100644 --- a/src/Polly.Specs/RateLimit/TokenBucketRateLimiterTestsBase.cs +++ b/src/Polly.Specs/RateLimit/TokenBucketRateLimiterTestsBase.cs @@ -1,8 +1,5 @@ -using FluentAssertions; -using Polly.RateLimit; +using Polly.RateLimit; using Polly.Specs.Helpers.RateLimit; -using Polly.Utilities; -using Xunit; namespace Polly.Specs.RateLimit; diff --git a/src/Polly.Specs/Registry/ConcurrentPolicyRegistrySpecs.cs b/src/Polly.Specs/Registry/ConcurrentPolicyRegistrySpecs.cs index c8b08b5e5cb..65c67e60f37 100644 --- a/src/Polly.Specs/Registry/ConcurrentPolicyRegistrySpecs.cs +++ b/src/Polly.Specs/Registry/ConcurrentPolicyRegistrySpecs.cs @@ -1,10 +1,4 @@ -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 13675d9198c..2d1eb7c591a 100644 --- a/src/Polly.Specs/Registry/PolicyRegistrySpecs.cs +++ b/src/Polly.Specs/Registry/PolicyRegistrySpecs.cs @@ -1,9 +1,5 @@ using System.Collections.Concurrent; using System.Reflection; -using Xunit; -using FluentAssertions; -using Polly.Registry; -using Polly.Specs.Helpers; using Moq; namespace Polly.Specs.Registry; diff --git a/src/Polly.Specs/Registry/ReadOnlyPolicyRegistrySpecs.cs b/src/Polly.Specs/Registry/ReadOnlyPolicyRegistrySpecs.cs index 79be418f367..6860055808c 100644 --- a/src/Polly.Specs/Registry/ReadOnlyPolicyRegistrySpecs.cs +++ b/src/Polly.Specs/Registry/ReadOnlyPolicyRegistrySpecs.cs @@ -1,8 +1,4 @@ -using FluentAssertions; -using Moq; -using Polly.Registry; -using Polly.Specs.Helpers; -using Xunit; +using Moq; namespace Polly.Specs.Registry; diff --git a/src/Polly.Specs/Retry/RetryAsyncSpecs.cs b/src/Polly.Specs/Retry/RetryAsyncSpecs.cs index 44441052c3d..077b7c5a2bb 100644 --- a/src/Polly.Specs/Retry/RetryAsyncSpecs.cs +++ b/src/Polly.Specs/Retry/RetryAsyncSpecs.cs @@ -1,9 +1,4 @@ -using FluentAssertions; -using Polly.Retry; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - +using Polly.Retry; 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 6180d0f3352..63ef3714e13 100644 --- a/src/Polly.Specs/Retry/RetryForeverAsyncSpecs.cs +++ b/src/Polly.Specs/Retry/RetryForeverAsyncSpecs.cs @@ -1,9 +1,4 @@ -using FluentAssertions; -using Polly.Retry; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - +using Polly.Retry; 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 db25328809c..57a3ef5b2cc 100644 --- a/src/Polly.Specs/Retry/RetryForeverSpecs.cs +++ b/src/Polly.Specs/Retry/RetryForeverSpecs.cs @@ -1,8 +1,4 @@ -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 ae7f9658b42..a1023de86af 100644 --- a/src/Polly.Specs/Retry/RetrySpecs.cs +++ b/src/Polly.Specs/Retry/RetrySpecs.cs @@ -1,8 +1,4 @@ -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 aeebd1b2f08..ed748aa5c23 100644 --- a/src/Polly.Specs/Retry/RetryTResultMixedResultExceptionSpecs.cs +++ b/src/Polly.Specs/Retry/RetryTResultMixedResultExceptionSpecs.cs @@ -1,8 +1,4 @@ -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 01793c1019b..35898542698 100644 --- a/src/Polly.Specs/Retry/RetryTResultSpecs.cs +++ b/src/Polly.Specs/Retry/RetryTResultSpecs.cs @@ -1,8 +1,4 @@ -using FluentAssertions; -using Polly.Retry; -using Polly.Specs.Helpers; -using Xunit; - +using Polly.Retry; 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 f8f3a51de99..9711ccd83df 100644 --- a/src/Polly.Specs/Retry/RetryTResultSpecsAsync.cs +++ b/src/Polly.Specs/Retry/RetryTResultSpecsAsync.cs @@ -1,9 +1,4 @@ -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 4491a7f00e7..32924d7d884 100644 --- a/src/Polly.Specs/Retry/WaitAndRetryAsyncSpecs.cs +++ b/src/Polly.Specs/Retry/WaitAndRetryAsyncSpecs.cs @@ -1,11 +1,4 @@ -using System.Diagnostics; -using FluentAssertions; -using FluentAssertions.Extensions; -using Polly.Retry; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - +using Polly.Retry; 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 21dc05c868a..56ee5db32f6 100644 --- a/src/Polly.Specs/Retry/WaitAndRetryForeverAsyncSpecs.cs +++ b/src/Polly.Specs/Retry/WaitAndRetryForeverAsyncSpecs.cs @@ -1,10 +1,4 @@ -using FluentAssertions; -using FluentAssertions.Extensions; -using Polly.Retry; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - +using Polly.Retry; 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 75dfb98b5d0..3d172b0a634 100644 --- a/src/Polly.Specs/Retry/WaitAndRetryForeverSpecs.cs +++ b/src/Polly.Specs/Retry/WaitAndRetryForeverSpecs.cs @@ -1,10 +1,4 @@ -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 a6a207aa670..759f1ff1b9b 100644 --- a/src/Polly.Specs/Retry/WaitAndRetryForeverTResultAsyncSpecs.cs +++ b/src/Polly.Specs/Retry/WaitAndRetryForeverTResultAsyncSpecs.cs @@ -1,10 +1,4 @@ -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 faca3b3cbb0..b05cd60ce9e 100644 --- a/src/Polly.Specs/Retry/WaitAndRetryForeverTResultSpecs.cs +++ b/src/Polly.Specs/Retry/WaitAndRetryForeverTResultSpecs.cs @@ -1,10 +1,4 @@ -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 1a9a0b69ad9..a80c0c6212f 100644 --- a/src/Polly.Specs/Retry/WaitAndRetrySpecs.cs +++ b/src/Polly.Specs/Retry/WaitAndRetrySpecs.cs @@ -1,11 +1,4 @@ -using System.Diagnostics; -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 d1df1da7781..4efc5c3e558 100644 --- a/src/Polly.Specs/Retry/WaitAndRetryTResultAsyncSpecs.cs +++ b/src/Polly.Specs/Retry/WaitAndRetryTResultAsyncSpecs.cs @@ -1,10 +1,4 @@ -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 798aec258ec..ab8cdb172d5 100644 --- a/src/Polly.Specs/Retry/WaitAndRetryTResultSpecs.cs +++ b/src/Polly.Specs/Retry/WaitAndRetryTResultSpecs.cs @@ -1,10 +1,4 @@ -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 eb0845a5373..f8f02be28e5 100644 --- a/src/Polly.Specs/Timeout/TimeoutAsyncSpecs.cs +++ b/src/Polly.Specs/Timeout/TimeoutAsyncSpecs.cs @@ -1,9 +1,4 @@ -using FluentAssertions; -using Polly.Specs.Helpers; -using Polly.Timeout; -using Polly.Utilities; -using System.Diagnostics; -using Xunit; +using Polly.Timeout; namespace Polly.Specs.Timeout; diff --git a/src/Polly.Specs/Timeout/TimeoutSpecs.cs b/src/Polly.Specs/Timeout/TimeoutSpecs.cs index c6c8dda62ae..f8c2770168c 100644 --- a/src/Polly.Specs/Timeout/TimeoutSpecs.cs +++ b/src/Polly.Specs/Timeout/TimeoutSpecs.cs @@ -1,9 +1,4 @@ -using FluentAssertions; -using System.Diagnostics; -using Polly.Specs.Helpers; -using Polly.Timeout; -using Polly.Utilities; -using Xunit; +using Polly.Timeout; namespace Polly.Specs.Timeout; diff --git a/src/Polly.Specs/Timeout/TimeoutSpecsBase.cs b/src/Polly.Specs/Timeout/TimeoutSpecsBase.cs index 62d50e25b6d..486da5f3c7d 100644 --- a/src/Polly.Specs/Timeout/TimeoutSpecsBase.cs +++ b/src/Polly.Specs/Timeout/TimeoutSpecsBase.cs @@ -1,5 +1,4 @@ using System.Runtime.CompilerServices; -using Polly.Utilities; namespace Polly.Specs.Timeout; diff --git a/src/Polly.Specs/Timeout/TimeoutTResultAsyncSpecs.cs b/src/Polly.Specs/Timeout/TimeoutTResultAsyncSpecs.cs index 1d1dbdcfa03..1eb00f8ea1d 100644 --- a/src/Polly.Specs/Timeout/TimeoutTResultAsyncSpecs.cs +++ b/src/Polly.Specs/Timeout/TimeoutTResultAsyncSpecs.cs @@ -1,9 +1,4 @@ -using FluentAssertions; -using System.Diagnostics; -using Polly.Specs.Helpers; -using Polly.Timeout; -using Polly.Utilities; -using Xunit; +using Polly.Timeout; namespace Polly.Specs.Timeout; diff --git a/src/Polly.Specs/Timeout/TimeoutTResultSpecs.cs b/src/Polly.Specs/Timeout/TimeoutTResultSpecs.cs index 095f97baabb..6fcc3e726c2 100644 --- a/src/Polly.Specs/Timeout/TimeoutTResultSpecs.cs +++ b/src/Polly.Specs/Timeout/TimeoutTResultSpecs.cs @@ -1,9 +1,4 @@ -using FluentAssertions; -using System.Diagnostics; -using Polly.Specs.Helpers; -using Polly.Timeout; -using Polly.Utilities; -using Xunit; +using Polly.Timeout; namespace Polly.Specs.Timeout; diff --git a/src/Polly.Specs/Wrap/IPolicyWrapExtensionSpecs.cs b/src/Polly.Specs/Wrap/IPolicyWrapExtensionSpecs.cs index 68dee9fd38e..83dbf07f8d4 100644 --- a/src/Polly.Specs/Wrap/IPolicyWrapExtensionSpecs.cs +++ b/src/Polly.Specs/Wrap/IPolicyWrapExtensionSpecs.cs @@ -1,9 +1,4 @@ -using Xunit; -using Polly.Wrap; -using FluentAssertions; -using Polly.CircuitBreaker; -using Polly.NoOp; -using Polly.Retry; +using Polly.Retry; namespace Polly.Specs.Wrap; diff --git a/src/Polly.Specs/Wrap/PolicyWrapContextAndKeySpecs.cs b/src/Polly.Specs/Wrap/PolicyWrapContextAndKeySpecs.cs index ffb72bc47fc..40800dba19c 100644 --- a/src/Polly.Specs/Wrap/PolicyWrapContextAndKeySpecs.cs +++ b/src/Polly.Specs/Wrap/PolicyWrapContextAndKeySpecs.cs @@ -1,8 +1,4 @@ -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 7d7a56b48da..fecd09d1579 100644 --- a/src/Polly.Specs/Wrap/PolicyWrapContextAndKeySpecsAsync.cs +++ b/src/Polly.Specs/Wrap/PolicyWrapContextAndKeySpecsAsync.cs @@ -1,9 +1,4 @@ -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 38aa8fd1209..ea5f5b991d6 100644 --- a/src/Polly.Specs/Wrap/PolicyWrapSpecs.cs +++ b/src/Polly.Specs/Wrap/PolicyWrapSpecs.cs @@ -1,9 +1,4 @@ -using FluentAssertions; -using Polly.CircuitBreaker; -using Polly.Retry; -using Polly.Specs.Helpers; -using Polly.Wrap; -using Xunit; +using Polly.Retry; namespace Polly.Specs.Wrap; diff --git a/src/Polly.Specs/Wrap/PolicyWrapSpecsAsync.cs b/src/Polly.Specs/Wrap/PolicyWrapSpecsAsync.cs index a7f39155441..b73c55a75ea 100644 --- a/src/Polly.Specs/Wrap/PolicyWrapSpecsAsync.cs +++ b/src/Polly.Specs/Wrap/PolicyWrapSpecsAsync.cs @@ -1,10 +1,4 @@ -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 4dc587c3c20..425b1df5d3e 100644 --- a/src/Polly/AsyncPolicy.ExecuteOverloads.cs +++ b/src/Polly/AsyncPolicy.ExecuteOverloads.cs @@ -1,6 +1,4 @@ -using System.Diagnostics; - -namespace Polly; +namespace Polly; public abstract partial class AsyncPolicy : PolicyBase, IAsyncPolicy { diff --git a/src/Polly/AsyncPolicy.NonGenericImplementation.cs b/src/Polly/AsyncPolicy.NonGenericImplementation.cs index 29a08485cda..fb8b271f325 100644 --- a/src/Polly/AsyncPolicy.NonGenericImplementation.cs +++ b/src/Polly/AsyncPolicy.NonGenericImplementation.cs @@ -1,6 +1,4 @@ -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 19cc3217b6e..63b4b1687e9 100644 --- a/src/Polly/AsyncPolicy.TResult.ExecuteOverloads.cs +++ b/src/Polly/AsyncPolicy.TResult.ExecuteOverloads.cs @@ -1,6 +1,4 @@ -using System.Diagnostics; - -namespace Polly; +namespace Polly; public abstract partial class AsyncPolicy : IAsyncPolicy { diff --git a/src/Polly/Bulkhead/AsyncBulkheadPolicy.cs b/src/Polly/Bulkhead/AsyncBulkheadPolicy.cs index 694b77009ea..694cf252c4c 100644 --- a/src/Polly/Bulkhead/AsyncBulkheadPolicy.cs +++ b/src/Polly/Bulkhead/AsyncBulkheadPolicy.cs @@ -1,6 +1,4 @@ -using System.Diagnostics; - -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 55af4040226..83814aea4bb 100644 --- a/src/Polly/Bulkhead/AsyncBulkheadSyntax.cs +++ b/src/Polly/Bulkhead/AsyncBulkheadSyntax.cs @@ -1,6 +1,3 @@ -using Polly.Bulkhead; -using Polly.Utilities; - namespace Polly; public partial class Policy diff --git a/src/Polly/Bulkhead/AsyncBulkheadTResultSyntax.cs b/src/Polly/Bulkhead/AsyncBulkheadTResultSyntax.cs index 27c8c04c5d5..a4641b15ba8 100644 --- a/src/Polly/Bulkhead/AsyncBulkheadTResultSyntax.cs +++ b/src/Polly/Bulkhead/AsyncBulkheadTResultSyntax.cs @@ -1,7 +1,4 @@ -using Polly.Bulkhead; -using Polly.Utilities; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/Bulkhead/BulkheadPolicy.cs b/src/Polly/Bulkhead/BulkheadPolicy.cs index cd46e79b89c..1b8e0c3b761 100644 --- a/src/Polly/Bulkhead/BulkheadPolicy.cs +++ b/src/Polly/Bulkhead/BulkheadPolicy.cs @@ -1,6 +1,4 @@ -using System.Diagnostics; - -namespace Polly.Bulkhead; +namespace Polly.Bulkhead; /// /// A bulkhead-isolation policy which can be applied to delegates. diff --git a/src/Polly/Bulkhead/BulkheadSyntax.cs b/src/Polly/Bulkhead/BulkheadSyntax.cs index 18ed8c62e8d..986516f5855 100644 --- a/src/Polly/Bulkhead/BulkheadSyntax.cs +++ b/src/Polly/Bulkhead/BulkheadSyntax.cs @@ -1,6 +1,4 @@ -using Polly.Bulkhead; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/Bulkhead/BulkheadTResultSyntax.cs b/src/Polly/Bulkhead/BulkheadTResultSyntax.cs index fa082bf8664..1e68102e206 100644 --- a/src/Polly/Bulkhead/BulkheadTResultSyntax.cs +++ b/src/Polly/Bulkhead/BulkheadTResultSyntax.cs @@ -1,6 +1,4 @@ -using Polly.Bulkhead; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/Caching/AsyncCachePolicy.cs b/src/Polly/Caching/AsyncCachePolicy.cs index 30bba2209d1..a4bcc5fdaee 100644 --- a/src/Polly/Caching/AsyncCachePolicy.cs +++ b/src/Polly/Caching/AsyncCachePolicy.cs @@ -1,6 +1,4 @@ -using System.Diagnostics; - -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 ff21c7ed8db..d3c6ce6032b 100644 --- a/src/Polly/Caching/AsyncCacheSyntax.cs +++ b/src/Polly/Caching/AsyncCacheSyntax.cs @@ -1,6 +1,4 @@ -using Polly.Caching; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/Caching/AsyncCacheTResultSyntax.cs b/src/Polly/Caching/AsyncCacheTResultSyntax.cs index 5151c4d7974..6faad6d8c7c 100644 --- a/src/Polly/Caching/AsyncCacheTResultSyntax.cs +++ b/src/Polly/Caching/AsyncCacheTResultSyntax.cs @@ -1,6 +1,4 @@ -using Polly.Caching; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/Caching/CachePolicy.cs b/src/Polly/Caching/CachePolicy.cs index 47c206277b4..b014424f2e7 100644 --- a/src/Polly/Caching/CachePolicy.cs +++ b/src/Polly/Caching/CachePolicy.cs @@ -1,6 +1,4 @@ -using System.Diagnostics; - -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 6abf1ccd603..8ab89c07118 100644 --- a/src/Polly/Caching/CacheSyntax.cs +++ b/src/Polly/Caching/CacheSyntax.cs @@ -1,6 +1,4 @@ -using Polly.Caching; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/Caching/CacheTResultSyntax.cs b/src/Polly/Caching/CacheTResultSyntax.cs index 5dabeef0e3c..dbddd3b39d7 100644 --- a/src/Polly/Caching/CacheTResultSyntax.cs +++ b/src/Polly/Caching/CacheTResultSyntax.cs @@ -1,6 +1,4 @@ -using Polly.Caching; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/Caching/NonSlidingTtl.cs b/src/Polly/Caching/NonSlidingTtl.cs index 4179a550e7e..302a552df9d 100644 --- a/src/Polly/Caching/NonSlidingTtl.cs +++ b/src/Polly/Caching/NonSlidingTtl.cs @@ -1,6 +1,4 @@ -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/CircuitBreaker/AdvancedCircuitBreakerSyntax.cs b/src/Polly/CircuitBreaker/AdvancedCircuitBreakerSyntax.cs index b0a9369c31a..8890835d417 100644 --- a/src/Polly/CircuitBreaker/AdvancedCircuitBreakerSyntax.cs +++ b/src/Polly/CircuitBreaker/AdvancedCircuitBreakerSyntax.cs @@ -1,6 +1,3 @@ -using Polly.CircuitBreaker; -using Polly.Utilities; - namespace Polly; /// diff --git a/src/Polly/CircuitBreaker/AdvancedCircuitBreakerTResultSyntax.cs b/src/Polly/CircuitBreaker/AdvancedCircuitBreakerTResultSyntax.cs index a818a197b3e..c0ec003fc3e 100644 --- a/src/Polly/CircuitBreaker/AdvancedCircuitBreakerTResultSyntax.cs +++ b/src/Polly/CircuitBreaker/AdvancedCircuitBreakerTResultSyntax.cs @@ -1,7 +1,4 @@ -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 e0fa4dd86d6..9a79dda5be5 100644 --- a/src/Polly/CircuitBreaker/AdvancedCircuitController.cs +++ b/src/Polly/CircuitBreaker/AdvancedCircuitController.cs @@ -1,6 +1,4 @@ -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 891ba84a3e6..eb057bcce9f 100644 --- a/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerSyntax.cs +++ b/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerSyntax.cs @@ -1,7 +1,4 @@ -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 dc509695ab6..0dd3cfbc0c8 100644 --- a/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerTResultSyntax.cs +++ b/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerTResultSyntax.cs @@ -1,6 +1,3 @@ -using Polly.CircuitBreaker; -using Polly.Utilities; - namespace Polly; /// diff --git a/src/Polly/CircuitBreaker/AsyncCircuitBreakerEngine.cs b/src/Polly/CircuitBreaker/AsyncCircuitBreakerEngine.cs index 56d2336b394..d0c2e479d81 100644 --- a/src/Polly/CircuitBreaker/AsyncCircuitBreakerEngine.cs +++ b/src/Polly/CircuitBreaker/AsyncCircuitBreakerEngine.cs @@ -1,6 +1,4 @@ -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 4a9bd444b75..a1781ceeb84 100644 --- a/src/Polly/CircuitBreaker/AsyncCircuitBreakerPolicy.cs +++ b/src/Polly/CircuitBreaker/AsyncCircuitBreakerPolicy.cs @@ -1,7 +1,4 @@ -using System.Diagnostics; -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 fe48c61ee00..3948781d035 100644 --- a/src/Polly/CircuitBreaker/AsyncCircuitBreakerSyntax.cs +++ b/src/Polly/CircuitBreaker/AsyncCircuitBreakerSyntax.cs @@ -1,7 +1,4 @@ -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 7affd1655b1..556eb1ee2ea 100644 --- a/src/Polly/CircuitBreaker/AsyncCircuitBreakerTResultSyntax.cs +++ b/src/Polly/CircuitBreaker/AsyncCircuitBreakerTResultSyntax.cs @@ -1,6 +1,4 @@ -using Polly.CircuitBreaker; - -namespace Polly; +namespace Polly; /// /// Fluent API for defining a Circuit Breaker . diff --git a/src/Polly/CircuitBreaker/CircuitBreakerPolicy.cs b/src/Polly/CircuitBreaker/CircuitBreakerPolicy.cs index e09afde46f1..4cabe098c4c 100644 --- a/src/Polly/CircuitBreaker/CircuitBreakerPolicy.cs +++ b/src/Polly/CircuitBreaker/CircuitBreakerPolicy.cs @@ -1,7 +1,4 @@ -using System.Diagnostics; -using Polly.Utilities; - -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 fdae00d7bb8..1c601901f27 100644 --- a/src/Polly/CircuitBreaker/CircuitBreakerSyntax.cs +++ b/src/Polly/CircuitBreaker/CircuitBreakerSyntax.cs @@ -1,6 +1,3 @@ -using Polly.CircuitBreaker; -using Polly.Utilities; - namespace Polly; /// diff --git a/src/Polly/CircuitBreaker/CircuitBreakerTResultSyntax.cs b/src/Polly/CircuitBreaker/CircuitBreakerTResultSyntax.cs index 71aeb280a7b..4a2bd24f669 100644 --- a/src/Polly/CircuitBreaker/CircuitBreakerTResultSyntax.cs +++ b/src/Polly/CircuitBreaker/CircuitBreakerTResultSyntax.cs @@ -1,6 +1,4 @@ -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 a2761e399f4..7f8345dbff4 100644 --- a/src/Polly/CircuitBreaker/CircuitStateController.cs +++ b/src/Polly/CircuitBreaker/CircuitStateController.cs @@ -1,6 +1,4 @@ -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 489da426dbb..9da663a9ecb 100644 --- a/src/Polly/CircuitBreaker/ConsecutiveCountCircuitController.cs +++ b/src/Polly/CircuitBreaker/ConsecutiveCountCircuitController.cs @@ -1,6 +1,4 @@ -using Polly.Utilities; - -namespace Polly.CircuitBreaker; +namespace Polly.CircuitBreaker; internal class ConsecutiveCountCircuitController : CircuitStateController { diff --git a/src/Polly/CircuitBreaker/IsolatedCircuitException.cs b/src/Polly/CircuitBreaker/IsolatedCircuitException.cs index ee8e9f7d79f..124bcf63b5f 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 4aa6d31bf17..12f993ad32e 100644 --- a/src/Polly/CircuitBreaker/RollingHealthMetrics.cs +++ b/src/Polly/CircuitBreaker/RollingHealthMetrics.cs @@ -1,6 +1,4 @@ -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 631eb779ac0..58826db98e0 100644 --- a/src/Polly/CircuitBreaker/SingleHealthMetrics.cs +++ b/src/Polly/CircuitBreaker/SingleHealthMetrics.cs @@ -1,6 +1,4 @@ -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 0cad1a896b0..88c0d792c07 100644 --- a/src/Polly/Context.Dictionary.cs +++ b/src/Polly/Context.Dictionary.cs @@ -1,6 +1,4 @@ -using System.Collections; - -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 317716de2d7..794d4bb464a 100644 --- a/src/Polly/Context.cs +++ b/src/Polly/Context.cs @@ -1,6 +1,4 @@ -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/Fallback/AsyncFallbackPolicy.cs b/src/Polly/Fallback/AsyncFallbackPolicy.cs index 0a43e0b2d94..96b3c6a179a 100644 --- a/src/Polly/Fallback/AsyncFallbackPolicy.cs +++ b/src/Polly/Fallback/AsyncFallbackPolicy.cs @@ -1,7 +1,4 @@ -using System.Diagnostics; -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 4af5c926cb7..c7f95f7737b 100644 --- a/src/Polly/Fallback/AsyncFallbackSyntax.cs +++ b/src/Polly/Fallback/AsyncFallbackSyntax.cs @@ -1,7 +1,4 @@ -using Polly.Fallback; -using Polly.Utilities; - -namespace Polly; +namespace Polly; /// /// Fluent API for defining a Fallback . diff --git a/src/Polly/Fallback/FallbackPolicy.cs b/src/Polly/Fallback/FallbackPolicy.cs index 77ad120b635..542b768f5e2 100644 --- a/src/Polly/Fallback/FallbackPolicy.cs +++ b/src/Polly/Fallback/FallbackPolicy.cs @@ -1,7 +1,4 @@ -using System.Diagnostics; -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 bb85413d920..d77f1dda6ec 100644 --- a/src/Polly/Fallback/FallbackSyntax.cs +++ b/src/Polly/Fallback/FallbackSyntax.cs @@ -1,6 +1,4 @@ -using Polly.Fallback; - -namespace Polly; +namespace Polly; /// /// Fluent API for defining a Fallback policy. diff --git a/src/Polly/GlobalUsings.cs b/src/Polly/GlobalUsings.cs new file mode 100644 index 00000000000..2ab8e91612a --- /dev/null +++ b/src/Polly/GlobalUsings.cs @@ -0,0 +1,14 @@ +// Global using directives + +global using System.Collections; +global using System.Diagnostics; +global using Polly.Bulkhead; +global using Polly.Caching; +global using Polly.CircuitBreaker; +global using Polly.Fallback; +global using Polly.NoOp; +global using Polly.RateLimit; +global using Polly.Retry; +global using Polly.Timeout; +global using Polly.Utilities; +global using Polly.Wrap; \ No newline at end of file diff --git a/src/Polly/NoOp/AsyncNoOpPolicy.cs b/src/Polly/NoOp/AsyncNoOpPolicy.cs index 1d30de68b21..ea01819ad6c 100644 --- a/src/Polly/NoOp/AsyncNoOpPolicy.cs +++ b/src/Polly/NoOp/AsyncNoOpPolicy.cs @@ -1,6 +1,4 @@ -using System.Diagnostics; - -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 d18a9b091c7..51c2b35fedb 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 bfa65dbea5c..53bf687e281 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/NoOpPolicy.cs b/src/Polly/NoOp/NoOpPolicy.cs index 64321360fc6..64c641ca4e2 100644 --- a/src/Polly/NoOp/NoOpPolicy.cs +++ b/src/Polly/NoOp/NoOpPolicy.cs @@ -1,6 +1,4 @@ -using System.Diagnostics; - -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 149320a0a75..2ecf9a3d985 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 f5d768a7fef..933f1837412 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 87cd5e0d965..e846fdff015 100644 --- a/src/Polly/Policy.ExecuteOverloads.cs +++ b/src/Polly/Policy.ExecuteOverloads.cs @@ -1,6 +1,4 @@ -using System.Diagnostics; - -namespace Polly; +namespace Polly; public abstract partial class Policy : ISyncPolicy { diff --git a/src/Polly/Policy.SyncNonGenericImplementation.cs b/src/Polly/Policy.SyncNonGenericImplementation.cs index 31bc479695a..be070060bb9 100644 --- a/src/Polly/Policy.SyncNonGenericImplementation.cs +++ b/src/Polly/Policy.SyncNonGenericImplementation.cs @@ -1,7 +1,4 @@ -using System.Diagnostics; -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 8e3e4312222..45bde2c843b 100644 --- a/src/Polly/Policy.TResult.ExecuteOverloads.cs +++ b/src/Polly/Policy.TResult.ExecuteOverloads.cs @@ -1,7 +1,4 @@ -using System.Diagnostics; - - -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 d8e7e81b670..8ffd96e3cfb 100644 --- a/src/Polly/PolicyBase.ContextAndKeys.cs +++ b/src/Polly/PolicyBase.ContextAndKeys.cs @@ -1,6 +1,4 @@ -using Polly.Utilities; - -namespace Polly; +namespace Polly; public abstract partial class PolicyBase { diff --git a/src/Polly/RateLimit/AsyncRateLimitPolicy.cs b/src/Polly/RateLimit/AsyncRateLimitPolicy.cs index fa574f52ef6..9c977da2c2f 100644 --- a/src/Polly/RateLimit/AsyncRateLimitPolicy.cs +++ b/src/Polly/RateLimit/AsyncRateLimitPolicy.cs @@ -1,6 +1,4 @@ -using System.Diagnostics; - -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 03ac9219d0e..d090c962985 100644 --- a/src/Polly/RateLimit/AsyncRateLimitSyntax.cs +++ b/src/Polly/RateLimit/AsyncRateLimitSyntax.cs @@ -1,6 +1,4 @@ -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 db4418c9738..56a21fb52b1 100644 --- a/src/Polly/RateLimit/AsyncRateLimitTResultSyntax.cs +++ b/src/Polly/RateLimit/AsyncRateLimitTResultSyntax.cs @@ -1,6 +1,4 @@ -using Polly.RateLimit; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/RateLimit/LockFreeTokenBucketRateLimiter.cs b/src/Polly/RateLimit/LockFreeTokenBucketRateLimiter.cs index 6306f69efff..b67a3f2aba1 100644 --- a/src/Polly/RateLimit/LockFreeTokenBucketRateLimiter.cs +++ b/src/Polly/RateLimit/LockFreeTokenBucketRateLimiter.cs @@ -1,6 +1,4 @@ -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/RateLimitPolicy.cs b/src/Polly/RateLimit/RateLimitPolicy.cs index e2f45bf5875..68716d1b59a 100644 --- a/src/Polly/RateLimit/RateLimitPolicy.cs +++ b/src/Polly/RateLimit/RateLimitPolicy.cs @@ -1,6 +1,4 @@ -using System.Diagnostics; - -namespace Polly.RateLimit; +namespace Polly.RateLimit; /// /// A rate-limit policy that can be applied to synchronous delegates. diff --git a/src/Polly/RateLimit/RateLimitSyntax.cs b/src/Polly/RateLimit/RateLimitSyntax.cs index dceb8ee3b1d..fd6e8141cc5 100644 --- a/src/Polly/RateLimit/RateLimitSyntax.cs +++ b/src/Polly/RateLimit/RateLimitSyntax.cs @@ -1,6 +1,4 @@ -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 8f9315b6c8b..2fb31ba8d98 100644 --- a/src/Polly/RateLimit/RateLimitTResultSyntax.cs +++ b/src/Polly/RateLimit/RateLimitTResultSyntax.cs @@ -1,6 +1,4 @@ -using Polly.RateLimit; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/Registry/PolicyRegistry.cs b/src/Polly/Registry/PolicyRegistry.cs index 5b3e04c8a48..6c43ae5cb6a 100644 --- a/src/Polly/Registry/PolicyRegistry.cs +++ b/src/Polly/Registry/PolicyRegistry.cs @@ -1,5 +1,4 @@ -using System.Collections; -using System.Collections.Concurrent; +using System.Collections.Concurrent; namespace Polly.Registry; diff --git a/src/Polly/Retry/AsyncRetryEngine.cs b/src/Polly/Retry/AsyncRetryEngine.cs index 44fe6b001cb..8eb287e6e6f 100644 --- a/src/Polly/Retry/AsyncRetryEngine.cs +++ b/src/Polly/Retry/AsyncRetryEngine.cs @@ -1,6 +1,4 @@ -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 bb3b56b1760..f09e771dbac 100644 --- a/src/Polly/Retry/AsyncRetryPolicy.cs +++ b/src/Polly/Retry/AsyncRetryPolicy.cs @@ -1,6 +1,4 @@ -using System.Diagnostics; - -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 08972a6249f..970b9bd5361 100644 --- a/src/Polly/Retry/AsyncRetrySyntax.cs +++ b/src/Polly/Retry/AsyncRetrySyntax.cs @@ -1,6 +1,4 @@ -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 783014e06a2..fac92e94456 100644 --- a/src/Polly/Retry/AsyncRetryTResultSyntax.cs +++ b/src/Polly/Retry/AsyncRetryTResultSyntax.cs @@ -1,6 +1,4 @@ -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 f4ef917b3c6..1773d0890dd 100644 --- a/src/Polly/Retry/RetryEngine.cs +++ b/src/Polly/Retry/RetryEngine.cs @@ -1,6 +1,4 @@ -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 f8bdc41345b..8f043d18f65 100644 --- a/src/Polly/Retry/RetryPolicy.cs +++ b/src/Polly/Retry/RetryPolicy.cs @@ -1,6 +1,4 @@ -using System.Diagnostics; - -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 a016dae9d3c..09f5800e71e 100644 --- a/src/Polly/Retry/RetrySyntax.cs +++ b/src/Polly/Retry/RetrySyntax.cs @@ -1,6 +1,4 @@ -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 ddc6a765643..a98ebb88c4d 100644 --- a/src/Polly/Retry/RetryTResultSyntax.cs +++ b/src/Polly/Retry/RetryTResultSyntax.cs @@ -1,6 +1,4 @@ -using Polly.Retry; - -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 b63b5d3a395..da85c341d2c 100644 --- a/src/Polly/Timeout/AsyncTimeoutEngine.cs +++ b/src/Polly/Timeout/AsyncTimeoutEngine.cs @@ -1,6 +1,4 @@ -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 fff422fd92b..fff9141eaee 100644 --- a/src/Polly/Timeout/AsyncTimeoutPolicy.cs +++ b/src/Polly/Timeout/AsyncTimeoutPolicy.cs @@ -1,6 +1,4 @@ -using System.Diagnostics; - -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 f9dff28534d..0be1002e3bb 100644 --- a/src/Polly/Timeout/AsyncTimeoutSyntax.cs +++ b/src/Polly/Timeout/AsyncTimeoutSyntax.cs @@ -1,7 +1,4 @@ -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 e2acfd8b925..3f4a5a5c69e 100644 --- a/src/Polly/Timeout/AsyncTimeoutTResultSyntax.cs +++ b/src/Polly/Timeout/AsyncTimeoutTResultSyntax.cs @@ -1,6 +1,4 @@ -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 0cf16b441a3..77c19585ff6 100644 --- a/src/Polly/Timeout/TimeoutEngine.cs +++ b/src/Polly/Timeout/TimeoutEngine.cs @@ -1,5 +1,4 @@ using System.Runtime.ExceptionServices; -using Polly.Utilities; namespace Polly.Timeout; diff --git a/src/Polly/Timeout/TimeoutPolicy.cs b/src/Polly/Timeout/TimeoutPolicy.cs index ee3139b9022..52b82c33034 100644 --- a/src/Polly/Timeout/TimeoutPolicy.cs +++ b/src/Polly/Timeout/TimeoutPolicy.cs @@ -1,6 +1,4 @@ -using System.Diagnostics; - -namespace Polly.Timeout; +namespace Polly.Timeout; /// /// A timeout policy which can be applied to delegates. diff --git a/src/Polly/Timeout/TimeoutSyntax.cs b/src/Polly/Timeout/TimeoutSyntax.cs index 94c22b02b4a..0e04e5a0a25 100644 --- a/src/Polly/Timeout/TimeoutSyntax.cs +++ b/src/Polly/Timeout/TimeoutSyntax.cs @@ -1,6 +1,4 @@ -using Polly.Timeout; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/Timeout/TimeoutTResultSyntax.cs b/src/Polly/Timeout/TimeoutTResultSyntax.cs index 9567acfd1ad..11f8854bc1e 100644 --- a/src/Polly/Timeout/TimeoutTResultSyntax.cs +++ b/src/Polly/Timeout/TimeoutTResultSyntax.cs @@ -1,6 +1,4 @@ -using Polly.Timeout; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/Wrap/AsyncPolicyWrap.cs b/src/Polly/Wrap/AsyncPolicyWrap.cs index cef0d708349..02765aad3af 100644 --- a/src/Polly/Wrap/AsyncPolicyWrap.cs +++ b/src/Polly/Wrap/AsyncPolicyWrap.cs @@ -1,6 +1,4 @@ -using System.Diagnostics; - -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/AsyncPolicyWrapSyntax.cs b/src/Polly/Wrap/AsyncPolicyWrapSyntax.cs index bfa66061b05..331656823df 100644 --- a/src/Polly/Wrap/AsyncPolicyWrapSyntax.cs +++ b/src/Polly/Wrap/AsyncPolicyWrapSyntax.cs @@ -1,6 +1,4 @@ -using Polly.Wrap; - -namespace Polly; +namespace Polly; public partial class AsyncPolicy { diff --git a/src/Polly/Wrap/PolicyWrap.cs b/src/Polly/Wrap/PolicyWrap.cs index f381c5a95fa..48e13629aa9 100644 --- a/src/Polly/Wrap/PolicyWrap.cs +++ b/src/Polly/Wrap/PolicyWrap.cs @@ -1,6 +1,4 @@ -using System.Diagnostics; - -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/PolicyWrapSyntax.cs b/src/Polly/Wrap/PolicyWrapSyntax.cs index 05352c60305..7dd1163dde1 100644 --- a/src/Polly/Wrap/PolicyWrapSyntax.cs +++ b/src/Polly/Wrap/PolicyWrapSyntax.cs @@ -1,6 +1,4 @@ -using Polly.Wrap; - -namespace Polly; +namespace Polly; public partial class Policy { From 2b9a93736006a6463bae121b53399cd38379cb09 Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 9 Jan 2023 09:32:10 +1100 Subject: [PATCH 3/4] . --- src/Directory.Build.props | 36 +++++++++++++++++++ src/Polly.Benchmarks/Cache.cs | 4 +-- src/Polly.Benchmarks/Program.cs | 1 - src/Polly.Specs/GlobalUsings.cs | 21 ----------- src/Polly.Specs/Helpers/ObjectExtensions.cs | 4 +-- .../RateLimit/IRateLimiterExtensions.cs | 4 +-- .../RateLimit/RateLimitPolicySpecs.cs | 3 +- .../RateLimitPolicyTResultSpecsBase.cs | 3 +- .../TokenBucketRateLimiterTestsBase.cs | 3 +- .../Registry/PolicyRegistrySpecs.cs | 1 - src/Polly.Specs/Timeout/TimeoutSpecs.cs | 4 +-- .../Timeout/TimeoutTResultAsyncSpecs.cs | 4 +-- .../Timeout/TimeoutTResultSpecs.cs | 4 +-- .../Wrap/IPolicyWrapExtensionSpecs.cs | 4 +-- src/Polly.Specs/Wrap/PolicyWrapSpecs.cs | 4 +-- src/Polly/GlobalUsings.cs | 14 -------- 16 files changed, 47 insertions(+), 67 deletions(-) delete mode 100644 src/Polly.Specs/GlobalUsings.cs delete mode 100644 src/Polly/GlobalUsings.cs diff --git a/src/Directory.Build.props b/src/Directory.Build.props index ff9c4cf463a..a8f099fbcba 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -6,4 +6,40 @@ latest enable + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Polly.Benchmarks/Cache.cs b/src/Polly.Benchmarks/Cache.cs index 4ff8472ec41..c4e03ff4681 100644 --- a/src/Polly.Benchmarks/Cache.cs +++ b/src/Polly.Benchmarks/Cache.cs @@ -1,6 +1,4 @@ -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/Program.cs b/src/Polly.Benchmarks/Program.cs index 1fd45abca70..9e94b772541 100644 --- a/src/Polly.Benchmarks/Program.cs +++ b/src/Polly.Benchmarks/Program.cs @@ -1,4 +1,3 @@ using System.Reflection; -using BenchmarkDotNet.Running; BenchmarkRunner.Run(Assembly.GetCallingAssembly(), args: args); diff --git a/src/Polly.Specs/GlobalUsings.cs b/src/Polly.Specs/GlobalUsings.cs deleted file mode 100644 index ecf40555526..00000000000 --- a/src/Polly.Specs/GlobalUsings.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Global using directives - -global using System.Collections; -global using System.Diagnostics; -global using FluentAssertions; -global using FluentAssertions.Execution; -global using FluentAssertions.Extensions; -global using Polly.Bulkhead; -global using Polly.Caching; -global using Polly.CircuitBreaker; -global using Polly.Fallback; -global using Polly.NoOp; -global using Polly.Registry; -global using Polly.Specs.Helpers; -global using Polly.Specs.Helpers.Bulkhead; -global using Polly.Specs.Helpers.Caching; -global using Polly.Utilities; -global using Polly.Wrap; -global using Xunit; -global using Xunit.Abstractions; -global using Xunit.Sdk; \ No newline at end of file diff --git a/src/Polly.Specs/Helpers/ObjectExtensions.cs b/src/Polly.Specs/Helpers/ObjectExtensions.cs index 0c5b35f99bb..3f5f33f27a1 100644 --- a/src/Polly.Specs/Helpers/ObjectExtensions.cs +++ b/src/Polly.Specs/Helpers/ObjectExtensions.cs @@ -1,6 +1,4 @@ -using System.Reflection; - -namespace Polly.Specs.Helpers; +namespace Polly.Specs.Helpers; public static class ObjectExtensions { diff --git a/src/Polly.Specs/Helpers/RateLimit/IRateLimiterExtensions.cs b/src/Polly.Specs/Helpers/RateLimit/IRateLimiterExtensions.cs index 9f4a78e84d4..b01d5ee3c41 100644 --- a/src/Polly.Specs/Helpers/RateLimit/IRateLimiterExtensions.cs +++ b/src/Polly.Specs/Helpers/RateLimit/IRateLimiterExtensions.cs @@ -1,6 +1,4 @@ -using Polly.RateLimit; - -namespace Polly.Specs.Helpers.RateLimit; +namespace Polly.Specs.Helpers.RateLimit; internal static class IRateLimiterExtensions { diff --git a/src/Polly.Specs/RateLimit/RateLimitPolicySpecs.cs b/src/Polly.Specs/RateLimit/RateLimitPolicySpecs.cs index 26f37c294e2..6bd002decf3 100644 --- a/src/Polly.Specs/RateLimit/RateLimitPolicySpecs.cs +++ b/src/Polly.Specs/RateLimit/RateLimitPolicySpecs.cs @@ -1,5 +1,4 @@ -using Polly.RateLimit; -using Polly.Specs.Helpers.RateLimit; +using Polly.Specs.Helpers.RateLimit; namespace Polly.Specs.RateLimit; diff --git a/src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecsBase.cs b/src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecsBase.cs index e8c5da93168..30115ae13e0 100644 --- a/src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecsBase.cs +++ b/src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecsBase.cs @@ -1,5 +1,4 @@ -using Polly.RateLimit; -using Polly.Specs.Helpers.RateLimit; +using Polly.Specs.Helpers.RateLimit; namespace Polly.Specs.RateLimit; diff --git a/src/Polly.Specs/RateLimit/TokenBucketRateLimiterTestsBase.cs b/src/Polly.Specs/RateLimit/TokenBucketRateLimiterTestsBase.cs index 3849b3458c6..dc1b0d0ae33 100644 --- a/src/Polly.Specs/RateLimit/TokenBucketRateLimiterTestsBase.cs +++ b/src/Polly.Specs/RateLimit/TokenBucketRateLimiterTestsBase.cs @@ -1,5 +1,4 @@ -using Polly.RateLimit; -using Polly.Specs.Helpers.RateLimit; +using Polly.Specs.Helpers.RateLimit; namespace Polly.Specs.RateLimit; diff --git a/src/Polly.Specs/Registry/PolicyRegistrySpecs.cs b/src/Polly.Specs/Registry/PolicyRegistrySpecs.cs index 2d1eb7c591a..9db7c5e6f8b 100644 --- a/src/Polly.Specs/Registry/PolicyRegistrySpecs.cs +++ b/src/Polly.Specs/Registry/PolicyRegistrySpecs.cs @@ -1,5 +1,4 @@ using System.Collections.Concurrent; -using System.Reflection; using Moq; namespace Polly.Specs.Registry; diff --git a/src/Polly.Specs/Timeout/TimeoutSpecs.cs b/src/Polly.Specs/Timeout/TimeoutSpecs.cs index f8c2770168c..eceb969165f 100644 --- a/src/Polly.Specs/Timeout/TimeoutSpecs.cs +++ b/src/Polly.Specs/Timeout/TimeoutSpecs.cs @@ -1,6 +1,4 @@ -using Polly.Timeout; - -namespace Polly.Specs.Timeout; +namespace Polly.Specs.Timeout; [Collection(Constants.SystemClockDependentTestCollection)] public class TimeoutSpecs : TimeoutSpecsBase diff --git a/src/Polly.Specs/Timeout/TimeoutTResultAsyncSpecs.cs b/src/Polly.Specs/Timeout/TimeoutTResultAsyncSpecs.cs index 1eb00f8ea1d..84e9266ac09 100644 --- a/src/Polly.Specs/Timeout/TimeoutTResultAsyncSpecs.cs +++ b/src/Polly.Specs/Timeout/TimeoutTResultAsyncSpecs.cs @@ -1,6 +1,4 @@ -using Polly.Timeout; - -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 6fcc3e726c2..ec1d482037f 100644 --- a/src/Polly.Specs/Timeout/TimeoutTResultSpecs.cs +++ b/src/Polly.Specs/Timeout/TimeoutTResultSpecs.cs @@ -1,6 +1,4 @@ -using Polly.Timeout; - -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 83dbf07f8d4..c9d8d72f92b 100644 --- a/src/Polly.Specs/Wrap/IPolicyWrapExtensionSpecs.cs +++ b/src/Polly.Specs/Wrap/IPolicyWrapExtensionSpecs.cs @@ -1,6 +1,4 @@ -using Polly.Retry; - -namespace Polly.Specs.Wrap; +namespace Polly.Specs.Wrap; public class IPolicyWrapExtensionSpecs { diff --git a/src/Polly.Specs/Wrap/PolicyWrapSpecs.cs b/src/Polly.Specs/Wrap/PolicyWrapSpecs.cs index ea5f5b991d6..b4be095ea3f 100644 --- a/src/Polly.Specs/Wrap/PolicyWrapSpecs.cs +++ b/src/Polly.Specs/Wrap/PolicyWrapSpecs.cs @@ -1,6 +1,4 @@ -using Polly.Retry; - -namespace Polly.Specs.Wrap; +namespace Polly.Specs.Wrap; [Collection(Constants.SystemClockDependentTestCollection)] public class PolicyWrapSpecs diff --git a/src/Polly/GlobalUsings.cs b/src/Polly/GlobalUsings.cs deleted file mode 100644 index 2ab8e91612a..00000000000 --- a/src/Polly/GlobalUsings.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Global using directives - -global using System.Collections; -global using System.Diagnostics; -global using Polly.Bulkhead; -global using Polly.Caching; -global using Polly.CircuitBreaker; -global using Polly.Fallback; -global using Polly.NoOp; -global using Polly.RateLimit; -global using Polly.Retry; -global using Polly.Timeout; -global using Polly.Utilities; -global using Polly.Wrap; \ No newline at end of file From 1698d1b165ebab66b117e85057d5407c1c24e862 Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 9 Jan 2023 09:36:17 +1100 Subject: [PATCH 4/4] . --- src/Directory.Build.props | 2 ++ src/Polly.Benchmarks/Bulkhead.cs | 4 +--- src/Polly.Benchmarks/CircuitBreaker.cs | 4 +--- src/Polly.Benchmarks/Fallback.cs | 4 +--- src/Polly.Benchmarks/NoOp.cs | 4 +--- src/Polly.Benchmarks/PolicyWrap.cs | 4 +--- src/Polly.Benchmarks/PollyConfig.cs | 5 +---- src/Polly.Benchmarks/Program.cs | 4 +--- src/Polly.Benchmarks/RateLimit.cs | 4 +--- src/Polly.Benchmarks/Retry.cs | 4 +--- src/Polly.Benchmarks/Timeout.cs | 4 +--- src/Polly.Specs/Custom/CustomAsyncSpecs.cs | 5 +---- src/Polly.Specs/Custom/CustomSpecs.cs | 5 +---- src/Polly.Specs/Custom/CustomTResultAsyncSpecs.cs | 5 +---- src/Polly.Specs/Custom/CustomTResultSpecs.cs | 5 +---- src/Polly.Specs/Helpers/Bulkhead/AnnotatedOutputHelper.cs | 4 +--- src/Polly.Specs/RateLimit/AsyncRateLimitPolicySpecs.cs | 5 +---- .../RateLimit/AsyncRateLimitPolicyTResultSpecs.cs | 5 +---- .../RateLimit/LockFreeTokenBucketRateLimiterTests.cs | 4 +--- src/Polly.Specs/RateLimit/RateLimitPolicySpecs.cs | 4 +--- src/Polly.Specs/RateLimit/RateLimitPolicySpecsBase.cs | 4 +--- src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecs.cs | 5 +---- src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecsBase.cs | 4 +--- src/Polly.Specs/RateLimit/TokenBucketRateLimiterTestsBase.cs | 4 +--- src/Polly.Specs/Registry/PolicyRegistrySpecs.cs | 5 +---- src/Polly.Specs/Registry/ReadOnlyPolicyRegistrySpecs.cs | 4 +--- src/Polly.Specs/Retry/RetryAsyncSpecs.cs | 3 +-- src/Polly.Specs/Retry/RetryForeverAsyncSpecs.cs | 3 +-- src/Polly.Specs/Retry/RetryTResultSpecs.cs | 3 +-- src/Polly.Specs/Retry/WaitAndRetryAsyncSpecs.cs | 3 +-- src/Polly.Specs/Retry/WaitAndRetryForeverAsyncSpecs.cs | 3 +-- src/Polly.Specs/Timeout/TimeoutAsyncSpecs.cs | 4 +--- src/Polly/Registry/PolicyRegistry.cs | 4 +--- 33 files changed, 34 insertions(+), 100 deletions(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index a8f099fbcba..4c5ff314cf9 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -8,6 +8,7 @@ + @@ -40,6 +41,7 @@ + \ No newline at end of file diff --git a/src/Polly.Benchmarks/Bulkhead.cs b/src/Polly.Benchmarks/Bulkhead.cs index f5d6b677db9..cef260280a9 100644 --- a/src/Polly.Benchmarks/Bulkhead.cs +++ b/src/Polly.Benchmarks/Bulkhead.cs @@ -1,6 +1,4 @@ -using BenchmarkDotNet.Attributes; - -namespace Polly.Benchmarks; +namespace Polly.Benchmarks; [Config(typeof(PollyConfig))] public class Bulkhead diff --git a/src/Polly.Benchmarks/CircuitBreaker.cs b/src/Polly.Benchmarks/CircuitBreaker.cs index c0a88459aae..30d2bbfb20e 100644 --- a/src/Polly.Benchmarks/CircuitBreaker.cs +++ b/src/Polly.Benchmarks/CircuitBreaker.cs @@ -1,6 +1,4 @@ -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 eb97af3bb9e..cd362be00dd 100644 --- a/src/Polly.Benchmarks/Fallback.cs +++ b/src/Polly.Benchmarks/Fallback.cs @@ -1,6 +1,4 @@ -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 8e7d87df7b3..2ccf6ca564d 100644 --- a/src/Polly.Benchmarks/NoOp.cs +++ b/src/Polly.Benchmarks/NoOp.cs @@ -1,6 +1,4 @@ -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 f0087e32f98..92faf31c5d2 100644 --- a/src/Polly.Benchmarks/PolicyWrap.cs +++ b/src/Polly.Benchmarks/PolicyWrap.cs @@ -1,6 +1,4 @@ -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 03218e70c24..2fd15a77acf 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 9e94b772541..33f1d0b963d 100644 --- a/src/Polly.Benchmarks/Program.cs +++ b/src/Polly.Benchmarks/Program.cs @@ -1,3 +1 @@ -using System.Reflection; - -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 ac9bec65330..19be6bdcefb 100644 --- a/src/Polly.Benchmarks/RateLimit.cs +++ b/src/Polly.Benchmarks/RateLimit.cs @@ -1,6 +1,4 @@ -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 7efe2b24e4e..a0360467bea 100644 --- a/src/Polly.Benchmarks/Retry.cs +++ b/src/Polly.Benchmarks/Retry.cs @@ -1,6 +1,4 @@ -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 cf53de60852..81f73f74b8f 100644 --- a/src/Polly.Benchmarks/Timeout.cs +++ b/src/Polly.Benchmarks/Timeout.cs @@ -1,6 +1,4 @@ -using BenchmarkDotNet.Attributes; - -namespace Polly.Benchmarks; +namespace Polly.Benchmarks; [Config(typeof(PollyConfig))] public class Timeout diff --git a/src/Polly.Specs/Custom/CustomAsyncSpecs.cs b/src/Polly.Specs/Custom/CustomAsyncSpecs.cs index 9a26fabc92a..e98c27c47ec 100644 --- a/src/Polly.Specs/Custom/CustomAsyncSpecs.cs +++ b/src/Polly.Specs/Custom/CustomAsyncSpecs.cs @@ -1,7 +1,4 @@ -using Polly.Specs.Helpers.Custom.AddBehaviourIfHandle; -using Polly.Specs.Helpers.Custom.PreExecute; - -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 be7fedac3e8..baad67f580f 100644 --- a/src/Polly.Specs/Custom/CustomSpecs.cs +++ b/src/Polly.Specs/Custom/CustomSpecs.cs @@ -1,7 +1,4 @@ -using Polly.Specs.Helpers.Custom.AddBehaviourIfHandle; -using Polly.Specs.Helpers.Custom.PreExecute; - -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 f2b35babe40..7eb82ea3573 100644 --- a/src/Polly.Specs/Custom/CustomTResultAsyncSpecs.cs +++ b/src/Polly.Specs/Custom/CustomTResultAsyncSpecs.cs @@ -1,7 +1,4 @@ -using Polly.Specs.Helpers.Custom.AddBehaviourIfHandle; -using Polly.Specs.Helpers.Custom.PreExecute; - -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 db33892ba3c..0d06120d6a9 100644 --- a/src/Polly.Specs/Custom/CustomTResultSpecs.cs +++ b/src/Polly.Specs/Custom/CustomTResultSpecs.cs @@ -1,7 +1,4 @@ -using Polly.Specs.Helpers.Custom.AddBehaviourIfHandle; -using Polly.Specs.Helpers.Custom.PreExecute; - -namespace Polly.Specs.Custom; +namespace Polly.Specs.Custom; public class CustomTResultSpecs { diff --git a/src/Polly.Specs/Helpers/Bulkhead/AnnotatedOutputHelper.cs b/src/Polly.Specs/Helpers/Bulkhead/AnnotatedOutputHelper.cs index 833748fe285..8489e04cf92 100644 --- a/src/Polly.Specs/Helpers/Bulkhead/AnnotatedOutputHelper.cs +++ b/src/Polly.Specs/Helpers/Bulkhead/AnnotatedOutputHelper.cs @@ -1,6 +1,4 @@ -using System.Collections.Concurrent; - -namespace Polly.Specs.Helpers.Bulkhead; +namespace Polly.Specs.Helpers.Bulkhead; public class AnnotatedOutputHelper : ITestOutputHelper { diff --git a/src/Polly.Specs/RateLimit/AsyncRateLimitPolicySpecs.cs b/src/Polly.Specs/RateLimit/AsyncRateLimitPolicySpecs.cs index 37e63bdfb64..fe1820b6ec9 100644 --- a/src/Polly.Specs/RateLimit/AsyncRateLimitPolicySpecs.cs +++ b/src/Polly.Specs/RateLimit/AsyncRateLimitPolicySpecs.cs @@ -1,7 +1,4 @@ -using Polly.RateLimit; -using Polly.Specs.Helpers.RateLimit; - -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 c25a5360b8a..e84f9245161 100644 --- a/src/Polly.Specs/RateLimit/AsyncRateLimitPolicyTResultSpecs.cs +++ b/src/Polly.Specs/RateLimit/AsyncRateLimitPolicyTResultSpecs.cs @@ -1,7 +1,4 @@ -using Polly.RateLimit; -using Polly.Specs.Helpers.RateLimit; - -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 0fb28d3cf65..c4ff849cea1 100644 --- a/src/Polly.Specs/RateLimit/LockFreeTokenBucketRateLimiterTests.cs +++ b/src/Polly.Specs/RateLimit/LockFreeTokenBucketRateLimiterTests.cs @@ -1,6 +1,4 @@ -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 6bd002decf3..e27cc15b146 100644 --- a/src/Polly.Specs/RateLimit/RateLimitPolicySpecs.cs +++ b/src/Polly.Specs/RateLimit/RateLimitPolicySpecs.cs @@ -1,6 +1,4 @@ -using Polly.Specs.Helpers.RateLimit; - -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 10befdca918..5957ea3cc21 100644 --- a/src/Polly.Specs/RateLimit/RateLimitPolicySpecsBase.cs +++ b/src/Polly.Specs/RateLimit/RateLimitPolicySpecsBase.cs @@ -1,6 +1,4 @@ -using Polly.RateLimit; - -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 5f44a60cb20..649ba5ea430 100644 --- a/src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecs.cs +++ b/src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecs.cs @@ -1,7 +1,4 @@ -using Polly.RateLimit; -using Polly.Specs.Helpers.RateLimit; - -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 30115ae13e0..f2b92d94f3d 100644 --- a/src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecsBase.cs +++ b/src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecsBase.cs @@ -1,6 +1,4 @@ -using Polly.Specs.Helpers.RateLimit; - -namespace Polly.Specs.RateLimit; +namespace Polly.Specs.RateLimit; public abstract class RateLimitPolicyTResultSpecsBase : RateLimitPolicySpecsBase { diff --git a/src/Polly.Specs/RateLimit/TokenBucketRateLimiterTestsBase.cs b/src/Polly.Specs/RateLimit/TokenBucketRateLimiterTestsBase.cs index dc1b0d0ae33..9370dbc30f9 100644 --- a/src/Polly.Specs/RateLimit/TokenBucketRateLimiterTestsBase.cs +++ b/src/Polly.Specs/RateLimit/TokenBucketRateLimiterTestsBase.cs @@ -1,6 +1,4 @@ -using Polly.Specs.Helpers.RateLimit; - -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/PolicyRegistrySpecs.cs b/src/Polly.Specs/Registry/PolicyRegistrySpecs.cs index 9db7c5e6f8b..4ce6a09ba7f 100644 --- a/src/Polly.Specs/Registry/PolicyRegistrySpecs.cs +++ b/src/Polly.Specs/Registry/PolicyRegistrySpecs.cs @@ -1,7 +1,4 @@ -using System.Collections.Concurrent; -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 6860055808c..6504c7d122f 100644 --- a/src/Polly.Specs/Registry/ReadOnlyPolicyRegistrySpecs.cs +++ b/src/Polly.Specs/Registry/ReadOnlyPolicyRegistrySpecs.cs @@ -1,6 +1,4 @@ -using Moq; - -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 077b7c5a2bb..b2cc963921a 100644 --- a/src/Polly.Specs/Retry/RetryAsyncSpecs.cs +++ b/src/Polly.Specs/Retry/RetryAsyncSpecs.cs @@ -1,5 +1,4 @@ -using Polly.Retry; -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 63ef3714e13..c50dc528b29 100644 --- a/src/Polly.Specs/Retry/RetryForeverAsyncSpecs.cs +++ b/src/Polly.Specs/Retry/RetryForeverAsyncSpecs.cs @@ -1,5 +1,4 @@ -using Polly.Retry; -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/RetryTResultSpecs.cs b/src/Polly.Specs/Retry/RetryTResultSpecs.cs index 35898542698..82966b10ee3 100644 --- a/src/Polly.Specs/Retry/RetryTResultSpecs.cs +++ b/src/Polly.Specs/Retry/RetryTResultSpecs.cs @@ -1,5 +1,4 @@ -using Polly.Retry; -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/WaitAndRetryAsyncSpecs.cs b/src/Polly.Specs/Retry/WaitAndRetryAsyncSpecs.cs index 32924d7d884..2d696f88089 100644 --- a/src/Polly.Specs/Retry/WaitAndRetryAsyncSpecs.cs +++ b/src/Polly.Specs/Retry/WaitAndRetryAsyncSpecs.cs @@ -1,5 +1,4 @@ -using Polly.Retry; -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 56ee5db32f6..616e2078104 100644 --- a/src/Polly.Specs/Retry/WaitAndRetryForeverAsyncSpecs.cs +++ b/src/Polly.Specs/Retry/WaitAndRetryForeverAsyncSpecs.cs @@ -1,5 +1,4 @@ -using Polly.Retry; -using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; namespace Polly.Specs.Retry; diff --git a/src/Polly.Specs/Timeout/TimeoutAsyncSpecs.cs b/src/Polly.Specs/Timeout/TimeoutAsyncSpecs.cs index f8f02be28e5..a92fea4741c 100644 --- a/src/Polly.Specs/Timeout/TimeoutAsyncSpecs.cs +++ b/src/Polly.Specs/Timeout/TimeoutAsyncSpecs.cs @@ -1,6 +1,4 @@ -using Polly.Timeout; - -namespace Polly.Specs.Timeout; +namespace Polly.Specs.Timeout; [Collection(Constants.SystemClockDependentTestCollection)] public class TimeoutAsyncSpecs : TimeoutSpecsBase diff --git a/src/Polly/Registry/PolicyRegistry.cs b/src/Polly/Registry/PolicyRegistry.cs index 6c43ae5cb6a..7d9d42f5205 100644 --- a/src/Polly/Registry/PolicyRegistry.cs +++ b/src/Polly/Registry/PolicyRegistry.cs @@ -1,6 +1,4 @@ -using System.Collections.Concurrent; - -namespace Polly.Registry; +namespace Polly.Registry; /// ///