diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 5741c4eef7f..4c5ff314cf9 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -4,5 +4,44 @@ ..\Polly.snk true latest + enable + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Polly.Benchmarks/Bulkhead.cs b/src/Polly.Benchmarks/Bulkhead.cs index 8c294dfcc45..cef260280a9 100644 --- a/src/Polly.Benchmarks/Bulkhead.cs +++ b/src/Polly.Benchmarks/Bulkhead.cs @@ -1,8 +1,4 @@ -using System.Threading; -using System.Threading.Tasks; -using BenchmarkDotNet.Attributes; - -namespace Polly.Benchmarks; +namespace Polly.Benchmarks; [Config(typeof(PollyConfig))] public class Bulkhead diff --git a/src/Polly.Benchmarks/Cache.cs b/src/Polly.Benchmarks/Cache.cs index 9254d884171..c4e03ff4681 100644 --- a/src/Polly.Benchmarks/Cache.cs +++ b/src/Polly.Benchmarks/Cache.cs @@ -1,9 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using BenchmarkDotNet.Attributes; -using Microsoft.Extensions.Caching.Memory; -using Polly.Caching; +using Microsoft.Extensions.Caching.Memory; namespace Polly.Benchmarks; diff --git a/src/Polly.Benchmarks/CircuitBreaker.cs b/src/Polly.Benchmarks/CircuitBreaker.cs index 5d2e5156579..30d2bbfb20e 100644 --- a/src/Polly.Benchmarks/CircuitBreaker.cs +++ b/src/Polly.Benchmarks/CircuitBreaker.cs @@ -1,9 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using BenchmarkDotNet.Attributes; - -namespace Polly.Benchmarks; +namespace Polly.Benchmarks; [Config(typeof(PollyConfig))] public class CircuitBreaker diff --git a/src/Polly.Benchmarks/Fallback.cs b/src/Polly.Benchmarks/Fallback.cs index 0745804f1c3..cd362be00dd 100644 --- a/src/Polly.Benchmarks/Fallback.cs +++ b/src/Polly.Benchmarks/Fallback.cs @@ -1,8 +1,4 @@ -using System; -using System.Threading.Tasks; -using BenchmarkDotNet.Attributes; - -namespace Polly.Benchmarks; +namespace Polly.Benchmarks; [Config(typeof(PollyConfig))] public class Fallback diff --git a/src/Polly.Benchmarks/NoOp.cs b/src/Polly.Benchmarks/NoOp.cs index fff1e5579d4..2ccf6ca564d 100644 --- a/src/Polly.Benchmarks/NoOp.cs +++ b/src/Polly.Benchmarks/NoOp.cs @@ -1,8 +1,4 @@ -using System.Threading; -using System.Threading.Tasks; -using BenchmarkDotNet.Attributes; - -namespace Polly.Benchmarks; +namespace Polly.Benchmarks; [Config(typeof(PollyConfig))] public class NoOp diff --git a/src/Polly.Benchmarks/PolicyWrap.cs b/src/Polly.Benchmarks/PolicyWrap.cs index 43615d15f75..92faf31c5d2 100644 --- a/src/Polly.Benchmarks/PolicyWrap.cs +++ b/src/Polly.Benchmarks/PolicyWrap.cs @@ -1,9 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using BenchmarkDotNet.Attributes; - -namespace Polly.Benchmarks; +namespace Polly.Benchmarks; [Config(typeof(PollyConfig))] public class PolicyWrap diff --git a/src/Polly.Benchmarks/PollyConfig.cs b/src/Polly.Benchmarks/PollyConfig.cs index 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 1fd45abca70..33f1d0b963d 100644 --- a/src/Polly.Benchmarks/Program.cs +++ b/src/Polly.Benchmarks/Program.cs @@ -1,4 +1 @@ -using System.Reflection; -using BenchmarkDotNet.Running; - -BenchmarkRunner.Run(Assembly.GetCallingAssembly(), args: args); +BenchmarkRunner.Run(Assembly.GetCallingAssembly(), args: args); diff --git a/src/Polly.Benchmarks/RateLimit.cs b/src/Polly.Benchmarks/RateLimit.cs index 85978b8794a..19be6bdcefb 100644 --- a/src/Polly.Benchmarks/RateLimit.cs +++ b/src/Polly.Benchmarks/RateLimit.cs @@ -1,8 +1,4 @@ -using System; -using System.Threading.Tasks; -using BenchmarkDotNet.Attributes; - -namespace Polly.Benchmarks; +namespace Polly.Benchmarks; [Config(typeof(PollyConfig))] public class RateLimit diff --git a/src/Polly.Benchmarks/Retry.cs b/src/Polly.Benchmarks/Retry.cs index 44aa388b467..a0360467bea 100644 --- a/src/Polly.Benchmarks/Retry.cs +++ b/src/Polly.Benchmarks/Retry.cs @@ -1,9 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using BenchmarkDotNet.Attributes; - -namespace Polly.Benchmarks; +namespace Polly.Benchmarks; [Config(typeof(PollyConfig))] public class Retry diff --git a/src/Polly.Benchmarks/Timeout.cs b/src/Polly.Benchmarks/Timeout.cs index d368291d0b4..81f73f74b8f 100644 --- a/src/Polly.Benchmarks/Timeout.cs +++ b/src/Polly.Benchmarks/Timeout.cs @@ -1,9 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using BenchmarkDotNet.Attributes; - -namespace Polly.Benchmarks; +namespace Polly.Benchmarks; [Config(typeof(PollyConfig))] public class Timeout diff --git a/src/Polly.Benchmarks/Workloads.cs b/src/Polly.Benchmarks/Workloads.cs index 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..aff108e6ada 100644 --- a/src/Polly.Specs/Bulkhead/BulkheadAsyncSpecs.cs +++ b/src/Polly.Specs/Bulkhead/BulkheadAsyncSpecs.cs @@ -1,14 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using Polly.Bulkhead; -using Polly.Specs.Helpers.Bulkhead; -using FluentAssertions; -using Polly.Utilities; -using Xunit; -using Xunit.Abstractions; - -namespace Polly.Specs.Bulkhead; +namespace Polly.Specs.Bulkhead; [Collection(Helpers.Constants.ParallelThreadDependentTestCollection)] public class BulkheadAsyncSpecs : BulkheadSpecsBase diff --git a/src/Polly.Specs/Bulkhead/BulkheadScenarios.cs b/src/Polly.Specs/Bulkhead/BulkheadScenarios.cs index 69d3e930b90..d84471128ca 100644 --- a/src/Polly.Specs/Bulkhead/BulkheadScenarios.cs +++ b/src/Polly.Specs/Bulkhead/BulkheadScenarios.cs @@ -1,7 +1,4 @@ -using System.Collections; -using System.Collections.Generic; - -namespace Polly.Specs.Bulkhead; +namespace Polly.Specs.Bulkhead; /// /// A set of test scenarios used in all BulkheadPolicy tests. diff --git a/src/Polly.Specs/Bulkhead/BulkheadSpecs.cs b/src/Polly.Specs/Bulkhead/BulkheadSpecs.cs index b48090cb086..61c9d6ea8a9 100644 --- a/src/Polly.Specs/Bulkhead/BulkheadSpecs.cs +++ b/src/Polly.Specs/Bulkhead/BulkheadSpecs.cs @@ -1,12 +1,4 @@ -using System; -using System.Threading.Tasks; -using Polly.Bulkhead; -using Polly.Specs.Helpers.Bulkhead; -using FluentAssertions; -using Xunit; -using Xunit.Abstractions; - -namespace Polly.Specs.Bulkhead; +namespace Polly.Specs.Bulkhead; [Collection(Helpers.Constants.ParallelThreadDependentTestCollection)] public class BulkheadSpecs : BulkheadSpecsBase diff --git a/src/Polly.Specs/Bulkhead/BulkheadSpecsBase.cs b/src/Polly.Specs/Bulkhead/BulkheadSpecsBase.cs index fcb224aa783..7a230656ee2 100644 --- a/src/Polly.Specs/Bulkhead/BulkheadSpecsBase.cs +++ b/src/Polly.Specs/Bulkhead/BulkheadSpecsBase.cs @@ -1,15 +1,4 @@ -using System; -using System.Diagnostics; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.Bulkhead; -using Polly.Specs.Helpers.Bulkhead; -using Xunit; -using Xunit.Abstractions; - -namespace Polly.Specs.Bulkhead; +namespace Polly.Specs.Bulkhead; [Collection(Helpers.Constants.ParallelThreadDependentTestCollection)] public abstract class BulkheadSpecsBase : IDisposable diff --git a/src/Polly.Specs/Bulkhead/BulkheadTResultAsyncSpecs.cs b/src/Polly.Specs/Bulkhead/BulkheadTResultAsyncSpecs.cs index 0b22ddf2ec3..a00b62f2a32 100644 --- a/src/Polly.Specs/Bulkhead/BulkheadTResultAsyncSpecs.cs +++ b/src/Polly.Specs/Bulkhead/BulkheadTResultAsyncSpecs.cs @@ -1,15 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using Polly.Bulkhead; -using Polly.Specs.Helpers; -using Polly.Specs.Helpers.Bulkhead; -using FluentAssertions; -using Polly.Utilities; -using Xunit; -using Xunit.Abstractions; - -namespace Polly.Specs.Bulkhead; +namespace Polly.Specs.Bulkhead; [Collection(Constants.ParallelThreadDependentTestCollection)] public class BulkheadTResultAsyncSpecs : BulkheadSpecsBase diff --git a/src/Polly.Specs/Bulkhead/BulkheadTResultSpecs.cs b/src/Polly.Specs/Bulkhead/BulkheadTResultSpecs.cs index 513be999ceb..e2fd4f3db3b 100644 --- a/src/Polly.Specs/Bulkhead/BulkheadTResultSpecs.cs +++ b/src/Polly.Specs/Bulkhead/BulkheadTResultSpecs.cs @@ -1,15 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using Polly.Bulkhead; -using Polly.Specs.Helpers; -using Polly.Specs.Helpers.Bulkhead; - -using FluentAssertions; -using Xunit; -using Xunit.Abstractions; - -namespace Polly.Specs.Bulkhead; +namespace Polly.Specs.Bulkhead; [Collection(Constants.ParallelThreadDependentTestCollection)] public class BulkheadTResultSpecs : BulkheadSpecsBase diff --git a/src/Polly.Specs/Bulkhead/IBulkheadPolicySpecs.cs b/src/Polly.Specs/Bulkhead/IBulkheadPolicySpecs.cs index 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 ebd4c427fda..74e834e8a8a 100644 --- a/src/Polly.Specs/Caching/AbsoluteTtlSpecs.cs +++ b/src/Polly.Specs/Caching/AbsoluteTtlSpecs.cs @@ -1,11 +1,4 @@ -using System; -using FluentAssertions; -using Polly.Caching; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.Caching; +namespace Polly.Specs.Caching; [Collection(Constants.SystemClockDependentTestCollection)] public class AbsoluteTtlSpecs : IDisposable diff --git a/src/Polly.Specs/Caching/CacheAsyncSpecs.cs b/src/Polly.Specs/Caching/CacheAsyncSpecs.cs index ad313c59e4b..19543f17d00 100644 --- a/src/Polly.Specs/Caching/CacheAsyncSpecs.cs +++ b/src/Polly.Specs/Caching/CacheAsyncSpecs.cs @@ -1,14 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.Caching; -using Polly.Specs.Helpers; -using Polly.Specs.Helpers.Caching; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.Caching; +namespace Polly.Specs.Caching; [Collection(Constants.SystemClockDependentTestCollection)] public class CacheAsyncSpecs : IDisposable diff --git a/src/Polly.Specs/Caching/CacheSpecs.cs b/src/Polly.Specs/Caching/CacheSpecs.cs index 7a9d3ab926a..a71a081c20b 100644 --- a/src/Polly.Specs/Caching/CacheSpecs.cs +++ b/src/Polly.Specs/Caching/CacheSpecs.cs @@ -1,14 +1,4 @@ -using System; -using System.Threading; -using FluentAssertions; -using Polly.Caching; -using Polly.Specs.Helpers; -using Polly.Specs.Helpers.Caching; -using Polly.Utilities; -using Polly.Wrap; -using Xunit; - -namespace Polly.Specs.Caching; +namespace Polly.Specs.Caching; [Collection(Constants.SystemClockDependentTestCollection)] public class CacheSpecs : IDisposable diff --git a/src/Polly.Specs/Caching/CacheTResultAsyncSpecs.cs b/src/Polly.Specs/Caching/CacheTResultAsyncSpecs.cs index 8eb59528e8d..ca18c6f6a4c 100644 --- a/src/Polly.Specs/Caching/CacheTResultAsyncSpecs.cs +++ b/src/Polly.Specs/Caching/CacheTResultAsyncSpecs.cs @@ -1,14 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.Caching; -using Polly.Specs.Helpers; -using Polly.Specs.Helpers.Caching; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.Caching; +namespace Polly.Specs.Caching; [Collection(Constants.SystemClockDependentTestCollection)] public class CacheTResultAsyncSpecs : IDisposable diff --git a/src/Polly.Specs/Caching/CacheTResultSpecs.cs b/src/Polly.Specs/Caching/CacheTResultSpecs.cs index 38885bce1cc..5e58a64d1b5 100644 --- a/src/Polly.Specs/Caching/CacheTResultSpecs.cs +++ b/src/Polly.Specs/Caching/CacheTResultSpecs.cs @@ -1,14 +1,4 @@ -using System; -using System.Threading; -using FluentAssertions; -using Polly.Caching; -using Polly.Specs.Helpers; -using Polly.Specs.Helpers.Caching; -using Polly.Utilities; -using Polly.Wrap; -using Xunit; - -namespace Polly.Specs.Caching; +namespace Polly.Specs.Caching; [Collection(Constants.SystemClockDependentTestCollection)] public class CacheTResultSpecs : IDisposable diff --git a/src/Polly.Specs/Caching/ContextualTtlSpecs.cs b/src/Polly.Specs/Caching/ContextualTtlSpecs.cs index a0318b99931..0ddb4cb8e3c 100644 --- a/src/Polly.Specs/Caching/ContextualTtlSpecs.cs +++ b/src/Polly.Specs/Caching/ContextualTtlSpecs.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using FluentAssertions; -using Polly.Caching; -using Xunit; - -namespace Polly.Specs.Caching; +namespace Polly.Specs.Caching; public class ContextualTtlSpecs { diff --git a/src/Polly.Specs/Caching/DefaultCacheKeyStrategySpecs.cs b/src/Polly.Specs/Caching/DefaultCacheKeyStrategySpecs.cs index 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 b8f87b6016e..dcff63a2f23 100644 --- a/src/Polly.Specs/Caching/GenericCacheProviderAsyncSpecs.cs +++ b/src/Polly.Specs/Caching/GenericCacheProviderAsyncSpecs.cs @@ -1,14 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.Caching; -using Polly.Specs.Helpers; -using Polly.Specs.Helpers.Caching; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.Caching; +namespace Polly.Specs.Caching; [Collection(Constants.SystemClockDependentTestCollection)] public class GenericCacheProviderAsyncSpecs : IDisposable diff --git a/src/Polly.Specs/Caching/GenericCacheProviderSpecs.cs b/src/Polly.Specs/Caching/GenericCacheProviderSpecs.cs index a5a583a468f..114e57623e6 100644 --- a/src/Polly.Specs/Caching/GenericCacheProviderSpecs.cs +++ b/src/Polly.Specs/Caching/GenericCacheProviderSpecs.cs @@ -1,12 +1,4 @@ -using System; -using FluentAssertions; -using Polly.Caching; -using Polly.Specs.Helpers; -using Polly.Specs.Helpers.Caching; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.Caching; +namespace Polly.Specs.Caching; [Collection(Constants.SystemClockDependentTestCollection)] public class GenericCacheProviderSpecs : IDisposable diff --git a/src/Polly.Specs/Caching/RelativeTtlSpecs.cs b/src/Polly.Specs/Caching/RelativeTtlSpecs.cs index 815834df3a4..0f607debc1f 100644 --- a/src/Polly.Specs/Caching/RelativeTtlSpecs.cs +++ b/src/Polly.Specs/Caching/RelativeTtlSpecs.cs @@ -1,10 +1,4 @@ -using System; -using FluentAssertions; -using Polly.Caching; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.Caching; +namespace Polly.Specs.Caching; public class RelativeTtlSpecs { diff --git a/src/Polly.Specs/Caching/ResultTtlSpecs.cs b/src/Polly.Specs/Caching/ResultTtlSpecs.cs index 589a8474686..513d032cb35 100644 --- a/src/Polly.Specs/Caching/ResultTtlSpecs.cs +++ b/src/Polly.Specs/Caching/ResultTtlSpecs.cs @@ -1,9 +1,4 @@ -using System; -using FluentAssertions; -using Polly.Caching; -using Xunit; - -namespace Polly.Specs.Caching; +namespace Polly.Specs.Caching; public class ResultTtlSpecs { diff --git a/src/Polly.Specs/Caching/SerializingCacheProviderAsyncSpecs.cs b/src/Polly.Specs/Caching/SerializingCacheProviderAsyncSpecs.cs index 77ab6e33177..c3b7d8e0d49 100644 --- a/src/Polly.Specs/Caching/SerializingCacheProviderAsyncSpecs.cs +++ b/src/Polly.Specs/Caching/SerializingCacheProviderAsyncSpecs.cs @@ -1,13 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.Caching; -using Polly.Specs.Helpers; -using Polly.Specs.Helpers.Caching; -using Xunit; - -namespace Polly.Specs.Caching; +namespace Polly.Specs.Caching; public class AsyncSerializingCacheProviderSpecs { diff --git a/src/Polly.Specs/Caching/SerializingCacheProviderSpecs.cs b/src/Polly.Specs/Caching/SerializingCacheProviderSpecs.cs index 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 5539b9361f4..5b86d5cccef 100644 --- a/src/Polly.Specs/Caching/SlidingTtlSpecs.cs +++ b/src/Polly.Specs/Caching/SlidingTtlSpecs.cs @@ -1,9 +1,4 @@ -using System; -using FluentAssertions; -using Polly.Caching; -using Xunit; - -namespace Polly.Specs.Caching; +namespace Polly.Specs.Caching; public class SlidingTtlSpecs { diff --git a/src/Polly.Specs/CircuitBreaker/AdvancedCircuitBreakerAsyncSpecs.cs b/src/Polly.Specs/CircuitBreaker/AdvancedCircuitBreakerAsyncSpecs.cs index 4696d8b7897..60e4ab22876 100644 --- a/src/Polly.Specs/CircuitBreaker/AdvancedCircuitBreakerAsyncSpecs.cs +++ b/src/Polly.Specs/CircuitBreaker/AdvancedCircuitBreakerAsyncSpecs.cs @@ -1,15 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using FluentAssertions.Extensions; -using Polly.CircuitBreaker; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - -using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; namespace Polly.Specs.CircuitBreaker; diff --git a/src/Polly.Specs/CircuitBreaker/AdvancedCircuitBreakerSpecs.cs b/src/Polly.Specs/CircuitBreaker/AdvancedCircuitBreakerSpecs.cs index 926af3c491e..8420e7fd529 100644 --- a/src/Polly.Specs/CircuitBreaker/AdvancedCircuitBreakerSpecs.cs +++ b/src/Polly.Specs/CircuitBreaker/AdvancedCircuitBreakerSpecs.cs @@ -1,15 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using FluentAssertions.Extensions; -using Polly.CircuitBreaker; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - -using Scenario = Polly.Specs.Helpers.PolicyExtensions.ExceptionAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyExtensions.ExceptionAndOrCancellationScenario; namespace Polly.Specs.CircuitBreaker; diff --git a/src/Polly.Specs/CircuitBreaker/CircuitBreakerAsyncSpecs.cs b/src/Polly.Specs/CircuitBreaker/CircuitBreakerAsyncSpecs.cs index 172415a20dc..e8e30dc034b 100644 --- a/src/Polly.Specs/CircuitBreaker/CircuitBreakerAsyncSpecs.cs +++ b/src/Polly.Specs/CircuitBreaker/CircuitBreakerAsyncSpecs.cs @@ -1,15 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using FluentAssertions.Extensions; -using Polly.CircuitBreaker; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - -using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; namespace Polly.Specs.CircuitBreaker; diff --git a/src/Polly.Specs/CircuitBreaker/CircuitBreakerSpecs.cs b/src/Polly.Specs/CircuitBreaker/CircuitBreakerSpecs.cs index 28e34d73823..2f27bea5daa 100644 --- a/src/Polly.Specs/CircuitBreaker/CircuitBreakerSpecs.cs +++ b/src/Polly.Specs/CircuitBreaker/CircuitBreakerSpecs.cs @@ -1,15 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using FluentAssertions.Extensions; -using Polly.CircuitBreaker; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.CircuitBreaker; +namespace Polly.Specs.CircuitBreaker; [Collection(Constants.SystemClockDependentTestCollection)] public class CircuitBreakerSpecs : IDisposable diff --git a/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultAsyncSpecs.cs b/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultAsyncSpecs.cs index 9fc112e6822..13a9656e754 100644 --- a/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultAsyncSpecs.cs +++ b/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultAsyncSpecs.cs @@ -1,15 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using FluentAssertions.Extensions; -using Polly.CircuitBreaker; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - -using Scenario = Polly.Specs.Helpers.PolicyTResultExtensionsAsync.ResultAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyTResultExtensionsAsync.ResultAndOrCancellationScenario; namespace Polly.Specs.CircuitBreaker; diff --git a/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultMixedResultExceptionSpecs.cs b/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultMixedResultExceptionSpecs.cs index c4c34634fad..071dab2b0c3 100644 --- a/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultMixedResultExceptionSpecs.cs +++ b/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultMixedResultExceptionSpecs.cs @@ -1,12 +1,4 @@ -using System; -using FluentAssertions; -using FluentAssertions.Extensions; -using Polly.CircuitBreaker; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.CircuitBreaker; +namespace Polly.Specs.CircuitBreaker; [Collection(Constants.SystemClockDependentTestCollection)] public class CircuitBreakerTResultMixedResultExceptionSpecs : IDisposable diff --git a/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultSpecs.cs b/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultSpecs.cs index d69f04bc955..e2b6a60ef2f 100644 --- a/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultSpecs.cs +++ b/src/Polly.Specs/CircuitBreaker/CircuitBreakerTResultSpecs.cs @@ -1,15 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using FluentAssertions.Extensions; -using Polly.CircuitBreaker; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - -using Scenario = Polly.Specs.Helpers.PolicyTResultExtensions.ResultAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyTResultExtensions.ResultAndOrCancellationScenario; namespace Polly.Specs.CircuitBreaker; diff --git a/src/Polly.Specs/CircuitBreaker/ICircuitBreakerPolicySpecs.cs b/src/Polly.Specs/CircuitBreaker/ICircuitBreakerPolicySpecs.cs index 18c7e1ec950..ce4e3a31882 100644 --- a/src/Polly.Specs/CircuitBreaker/ICircuitBreakerPolicySpecs.cs +++ b/src/Polly.Specs/CircuitBreaker/ICircuitBreakerPolicySpecs.cs @@ -1,9 +1,4 @@ -using System; -using FluentAssertions; -using Polly.CircuitBreaker; -using Xunit; - -namespace Polly.Specs.CircuitBreaker; +namespace Polly.Specs.CircuitBreaker; public class ICircuitBreakerPolicySpecs { diff --git a/src/Polly.Specs/CircuitBreaker/ICircuitBreakerPolicyTResultSpecs.cs b/src/Polly.Specs/CircuitBreaker/ICircuitBreakerPolicyTResultSpecs.cs index a71f36ed730..1c124ed82f0 100644 --- a/src/Polly.Specs/CircuitBreaker/ICircuitBreakerPolicyTResultSpecs.cs +++ b/src/Polly.Specs/CircuitBreaker/ICircuitBreakerPolicyTResultSpecs.cs @@ -1,10 +1,4 @@ -using System; -using FluentAssertions; -using Polly.CircuitBreaker; -using Polly.Specs.Helpers; -using Xunit; - -namespace Polly.Specs.CircuitBreaker; +namespace Polly.Specs.CircuitBreaker; public class ICircuitBreakerTResultPolicySpecs { diff --git a/src/Polly.Specs/ContextSpecs.cs b/src/Polly.Specs/ContextSpecs.cs index dcdcf1ab036..f4709e8fc2b 100644 --- a/src/Polly.Specs/ContextSpecs.cs +++ b/src/Polly.Specs/ContextSpecs.cs @@ -1,9 +1,4 @@ -using System; -using FluentAssertions; -using Polly.Specs.Helpers; -using Xunit; - -namespace Polly.Specs; +namespace Polly.Specs; public class ContextSpecs { diff --git a/src/Polly.Specs/Custom/CustomAsyncSpecs.cs b/src/Polly.Specs/Custom/CustomAsyncSpecs.cs index a639a1ac40d..e98c27c47ec 100644 --- a/src/Polly.Specs/Custom/CustomAsyncSpecs.cs +++ b/src/Polly.Specs/Custom/CustomAsyncSpecs.cs @@ -1,11 +1,4 @@ -using System; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.Specs.Helpers.Custom.AddBehaviourIfHandle; -using Polly.Specs.Helpers.Custom.PreExecute; -using Xunit; - -namespace Polly.Specs.Custom; +namespace Polly.Specs.Custom; public class CustomAsyncSpecs { diff --git a/src/Polly.Specs/Custom/CustomSpecs.cs b/src/Polly.Specs/Custom/CustomSpecs.cs index 56a391429cc..baad67f580f 100644 --- a/src/Polly.Specs/Custom/CustomSpecs.cs +++ b/src/Polly.Specs/Custom/CustomSpecs.cs @@ -1,10 +1,4 @@ -using System; -using FluentAssertions; -using Polly.Specs.Helpers.Custom.AddBehaviourIfHandle; -using Polly.Specs.Helpers.Custom.PreExecute; -using Xunit; - -namespace Polly.Specs.Custom; +namespace Polly.Specs.Custom; public class CustomSpecs { diff --git a/src/Polly.Specs/Custom/CustomTResultAsyncSpecs.cs b/src/Polly.Specs/Custom/CustomTResultAsyncSpecs.cs index 32c9809bdf4..7eb82ea3573 100644 --- a/src/Polly.Specs/Custom/CustomTResultAsyncSpecs.cs +++ b/src/Polly.Specs/Custom/CustomTResultAsyncSpecs.cs @@ -1,12 +1,4 @@ -using System; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.Specs.Helpers; -using Polly.Specs.Helpers.Custom.AddBehaviourIfHandle; -using Polly.Specs.Helpers.Custom.PreExecute; -using Xunit; - -namespace Polly.Specs.Custom; +namespace Polly.Specs.Custom; public class CustomTResultAsyncSpecs { diff --git a/src/Polly.Specs/Custom/CustomTResultSpecs.cs b/src/Polly.Specs/Custom/CustomTResultSpecs.cs index fc737f56e1a..0d06120d6a9 100644 --- a/src/Polly.Specs/Custom/CustomTResultSpecs.cs +++ b/src/Polly.Specs/Custom/CustomTResultSpecs.cs @@ -1,11 +1,4 @@ -using System; -using FluentAssertions; -using Polly.Specs.Helpers; -using Polly.Specs.Helpers.Custom.AddBehaviourIfHandle; -using Polly.Specs.Helpers.Custom.PreExecute; -using Xunit; - -namespace Polly.Specs.Custom; +namespace Polly.Specs.Custom; public class CustomTResultSpecs { diff --git a/src/Polly.Specs/Fallback/FallbackAsyncSpecs.cs b/src/Polly.Specs/Fallback/FallbackAsyncSpecs.cs index 0b88fd50ba1..609460dc581 100644 --- a/src/Polly.Specs/Fallback/FallbackAsyncSpecs.cs +++ b/src/Polly.Specs/Fallback/FallbackAsyncSpecs.cs @@ -1,13 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - -using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; namespace Polly.Specs.Fallback; diff --git a/src/Polly.Specs/Fallback/FallbackSpecs.cs b/src/Polly.Specs/Fallback/FallbackSpecs.cs index b6415e6aa09..7ecb56e4ed4 100644 --- a/src/Polly.Specs/Fallback/FallbackSpecs.cs +++ b/src/Polly.Specs/Fallback/FallbackSpecs.cs @@ -1,12 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using FluentAssertions; -using Polly.Fallback; -using Polly.Specs.Helpers; -using Xunit; - -using Scenario = Polly.Specs.Helpers.PolicyExtensions.ExceptionAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyExtensions.ExceptionAndOrCancellationScenario; namespace Polly.Specs.Fallback; diff --git a/src/Polly.Specs/Fallback/FallbackTResultAsyncSpecs.cs b/src/Polly.Specs/Fallback/FallbackTResultAsyncSpecs.cs index 71fddbd8c3c..0550c008e49 100644 --- a/src/Polly.Specs/Fallback/FallbackTResultAsyncSpecs.cs +++ b/src/Polly.Specs/Fallback/FallbackTResultAsyncSpecs.cs @@ -1,13 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - -using Scenario = Polly.Specs.Helpers.PolicyTResultExtensionsAsync.ResultAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyTResultExtensionsAsync.ResultAndOrCancellationScenario; namespace Polly.Specs.Fallback; diff --git a/src/Polly.Specs/Fallback/FallbackTResultSpecs.cs b/src/Polly.Specs/Fallback/FallbackTResultSpecs.cs index 177ce2eceb6..389ed0ebf62 100644 --- a/src/Polly.Specs/Fallback/FallbackTResultSpecs.cs +++ b/src/Polly.Specs/Fallback/FallbackTResultSpecs.cs @@ -1,12 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using FluentAssertions; -using Polly.Fallback; -using Polly.Specs.Helpers; -using Xunit; - -using Scenario = Polly.Specs.Helpers.PolicyTResultExtensions.ResultAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyTResultExtensions.ResultAndOrCancellationScenario; namespace Polly.Specs.Fallback; diff --git a/src/Polly.Specs/Helpers/Bulkhead/AnnotatedOutputHelper.cs b/src/Polly.Specs/Helpers/Bulkhead/AnnotatedOutputHelper.cs index e71f35972c9..8489e04cf92 100644 --- a/src/Polly.Specs/Helpers/Bulkhead/AnnotatedOutputHelper.cs +++ b/src/Polly.Specs/Helpers/Bulkhead/AnnotatedOutputHelper.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Concurrent; -using System.Linq; -using System.Threading; -using Xunit.Abstractions; - -namespace Polly.Specs.Helpers.Bulkhead; +namespace Polly.Specs.Helpers.Bulkhead; public class AnnotatedOutputHelper : ITestOutputHelper { diff --git a/src/Polly.Specs/Helpers/Bulkhead/AssertionFailure.cs b/src/Polly.Specs/Helpers/Bulkhead/AssertionFailure.cs index 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/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 fe851d1d2a6..c08fa77d05d 100644 --- a/src/Polly.Specs/Helpers/Bulkhead/TraceableAction.cs +++ b/src/Polly.Specs/Helpers/Bulkhead/TraceableAction.cs @@ -1,10 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using Polly.Bulkhead; -using Xunit.Abstractions; - -namespace Polly.Specs.Helpers.Bulkhead; +namespace Polly.Specs.Helpers.Bulkhead; /// /// A traceable action that can be executed on a , to support specs. diff --git a/src/Polly.Specs/Helpers/Caching/StubCacheKeyStrategy.cs b/src/Polly.Specs/Helpers/Caching/StubCacheKeyStrategy.cs index 4203a3c46c6..4270f826b16 100644 --- a/src/Polly.Specs/Helpers/Caching/StubCacheKeyStrategy.cs +++ b/src/Polly.Specs/Helpers/Caching/StubCacheKeyStrategy.cs @@ -1,7 +1,4 @@ -using System; -using Polly.Caching; - -namespace Polly.Specs.Helpers.Caching; +namespace Polly.Specs.Helpers.Caching; /// /// A configurable stub ICacheKeyStrategy, to support tests.. diff --git a/src/Polly.Specs/Helpers/Caching/StubCacheProvider.cs b/src/Polly.Specs/Helpers/Caching/StubCacheProvider.cs index c798b47e8b7..7863121131f 100644 --- a/src/Polly.Specs/Helpers/Caching/StubCacheProvider.cs +++ b/src/Polly.Specs/Helpers/Caching/StubCacheProvider.cs @@ -1,11 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using Polly.Caching; -using Polly.Utilities; - -namespace Polly.Specs.Helpers.Caching; +namespace Polly.Specs.Helpers.Caching; /// /// An intentionally naive stub cache implementation. Its purpose is to be the simplest thing possible to support tests of the CachePolicy and CacheEngine, not a production-usable implementation. diff --git a/src/Polly.Specs/Helpers/Caching/StubErroringCacheProvider.cs b/src/Polly.Specs/Helpers/Caching/StubErroringCacheProvider.cs index 6e855d0a347..dbc41e8d63b 100644 --- a/src/Polly.Specs/Helpers/Caching/StubErroringCacheProvider.cs +++ b/src/Polly.Specs/Helpers/Caching/StubErroringCacheProvider.cs @@ -1,10 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using Polly.Caching; -using Polly.Utilities; - -namespace Polly.Specs.Helpers.Caching; +namespace Polly.Specs.Helpers.Caching; internal class StubErroringCacheProvider : ISyncCacheProvider, IAsyncCacheProvider { diff --git a/src/Polly.Specs/Helpers/Caching/StubSerializer.cs b/src/Polly.Specs/Helpers/Caching/StubSerializer.cs index ad81ebab152..66142315bc6 100644 --- a/src/Polly.Specs/Helpers/Caching/StubSerializer.cs +++ b/src/Polly.Specs/Helpers/Caching/StubSerializer.cs @@ -1,7 +1,4 @@ -using System; -using Polly.Caching; - -namespace Polly.Specs.Helpers.Caching; +namespace Polly.Specs.Helpers.Caching; /// /// A configurable stub serializer implementation to support tests around serializing cache providers. diff --git a/src/Polly.Specs/Helpers/ContextualPolicyExtensions.cs b/src/Polly.Specs/Helpers/ContextualPolicyExtensions.cs index 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..91ef52516a7 100644 --- a/src/Polly.Specs/Helpers/ContextualPolicyExtensionsAsync.cs +++ b/src/Polly.Specs/Helpers/ContextualPolicyExtensionsAsync.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using Polly.Utilities; - -namespace Polly.Specs.Helpers; +namespace Polly.Specs.Helpers; public static class ContextualPolicyExtensionsAsync { diff --git a/src/Polly.Specs/Helpers/ContextualPolicyTResultExtensions.cs b/src/Polly.Specs/Helpers/ContextualPolicyTResultExtensions.cs index 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..69bc89a1c3f 100644 --- a/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AddBehaviourIfHandleEngine.cs +++ b/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AddBehaviourIfHandleEngine.cs @@ -1,8 +1,4 @@ -using System; -using System.Threading; -using Polly.Utilities; - -namespace Polly.Specs.Helpers.Custom.AddBehaviourIfHandle; +namespace Polly.Specs.Helpers.Custom.AddBehaviourIfHandle; internal static class AddBehaviourIfHandleEngine { diff --git a/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AddBehaviourIfHandlePolicy.cs b/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AddBehaviourIfHandlePolicy.cs index 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..f60dca78e35 100644 --- a/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AsyncAddBehaviourIfHandleEngine.cs +++ b/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AsyncAddBehaviourIfHandleEngine.cs @@ -1,9 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using Polly.Utilities; - -namespace Polly.Specs.Helpers.Custom.AddBehaviourIfHandle; +namespace Polly.Specs.Helpers.Custom.AddBehaviourIfHandle; internal static class AsyncAddBehaviourIfHandleEngine { diff --git a/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AsyncAddBehaviourIfHandlePolicy.cs b/src/Polly.Specs/Helpers/Custom/AddBehaviourIfHandle/AsyncAddBehaviourIfHandlePolicy.cs index 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..3f5f33f27a1 100644 --- a/src/Polly.Specs/Helpers/ObjectExtensions.cs +++ b/src/Polly.Specs/Helpers/ObjectExtensions.cs @@ -1,8 +1,4 @@ -using System.Collections.Generic; -using System.Reflection; -using System.Linq; - -namespace Polly.Specs.Helpers; +namespace Polly.Specs.Helpers; public static class ObjectExtensions { diff --git a/src/Polly.Specs/Helpers/PolicyExtensions.cs b/src/Polly.Specs/Helpers/PolicyExtensions.cs index 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..49d31e6ecc1 100644 --- a/src/Polly.Specs/Helpers/PolicyExtensionsAsync.cs +++ b/src/Polly.Specs/Helpers/PolicyExtensionsAsync.cs @@ -1,9 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using Polly.Utilities; - -namespace Polly.Specs.Helpers; +namespace Polly.Specs.Helpers; public static class PolicyExtensionsAsync { diff --git a/src/Polly.Specs/Helpers/PolicyTResultExtensions.cs b/src/Polly.Specs/Helpers/PolicyTResultExtensions.cs index 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..b01d5ee3c41 100644 --- a/src/Polly.Specs/Helpers/RateLimit/IRateLimiterExtensions.cs +++ b/src/Polly.Specs/Helpers/RateLimit/IRateLimiterExtensions.cs @@ -1,8 +1,4 @@ -using System; -using FluentAssertions; -using Polly.RateLimit; - -namespace Polly.Specs.Helpers.RateLimit; +namespace Polly.Specs.Helpers.RateLimit; internal static class IRateLimiterExtensions { diff --git a/src/Polly.Specs/Helpers/RateLimit/ResultClassWithRetryAfter.cs b/src/Polly.Specs/Helpers/RateLimit/ResultClassWithRetryAfter.cs index 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..443db1dfd08 100644 --- a/src/Polly.Specs/IAsyncPolicyExtensionsSpecs.cs +++ b/src/Polly.Specs/IAsyncPolicyExtensionsSpecs.cs @@ -1,11 +1,4 @@ -using System; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.CircuitBreaker; -using Polly.Specs.Helpers; -using Xunit; - -namespace Polly.Specs; +namespace Polly.Specs; public class IAsyncPolicyExtensionsSpecs { diff --git a/src/Polly.Specs/ISyncPolicyExtensionsSpecs.cs b/src/Polly.Specs/ISyncPolicyExtensionsSpecs.cs index 5103728b4d4..2759117c2fd 100644 --- a/src/Polly.Specs/ISyncPolicyExtensionsSpecs.cs +++ b/src/Polly.Specs/ISyncPolicyExtensionsSpecs.cs @@ -1,10 +1,4 @@ -using System; -using FluentAssertions; -using Polly.CircuitBreaker; -using Polly.Specs.Helpers; -using Xunit; - -namespace Polly.Specs; +namespace Polly.Specs; public class ISyncPolicyExtensionsSpecs { diff --git a/src/Polly.Specs/NoOp/NoOpAsyncSpecs.cs b/src/Polly.Specs/NoOp/NoOpAsyncSpecs.cs index 71b1dfef5c0..035e605283a 100644 --- a/src/Polly.Specs/NoOp/NoOpAsyncSpecs.cs +++ b/src/Polly.Specs/NoOp/NoOpAsyncSpecs.cs @@ -1,10 +1,4 @@ -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.NoOp; +namespace Polly.Specs.NoOp; public class NoOpAsyncSpecs { diff --git a/src/Polly.Specs/NoOp/NoOpSpecs.cs b/src/Polly.Specs/NoOp/NoOpSpecs.cs index 7c16ee57b93..954ca62f481 100644 --- a/src/Polly.Specs/NoOp/NoOpSpecs.cs +++ b/src/Polly.Specs/NoOp/NoOpSpecs.cs @@ -1,9 +1,4 @@ -using System.Threading; -using FluentAssertions; -using Polly.NoOp; -using Xunit; - -namespace Polly.Specs.NoOp; +namespace Polly.Specs.NoOp; public class NoOpSpecs { diff --git a/src/Polly.Specs/NoOp/NoOpTResultAsyncSpecs.cs b/src/Polly.Specs/NoOp/NoOpTResultAsyncSpecs.cs index 0cfb27d1896..006bab7bb43 100644 --- a/src/Polly.Specs/NoOp/NoOpTResultAsyncSpecs.cs +++ b/src/Polly.Specs/NoOp/NoOpTResultAsyncSpecs.cs @@ -1,11 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.NoOp; -using Xunit; - -namespace Polly.Specs.NoOp; +namespace Polly.Specs.NoOp; public class NoOpTResultAsyncSpecs { diff --git a/src/Polly.Specs/NoOp/NoOpTResultSpecs.cs b/src/Polly.Specs/NoOp/NoOpTResultSpecs.cs index 9c940f9552b..bf3c61f5687 100644 --- a/src/Polly.Specs/NoOp/NoOpTResultSpecs.cs +++ b/src/Polly.Specs/NoOp/NoOpTResultSpecs.cs @@ -1,9 +1,4 @@ -using System.Threading; -using FluentAssertions; -using Polly.NoOp; -using Xunit; - -namespace Polly.Specs.NoOp; +namespace Polly.Specs.NoOp; public class NoOpTResultSpecs { diff --git a/src/Polly.Specs/PolicyAsyncSpecs.cs b/src/Polly.Specs/PolicyAsyncSpecs.cs index 90012655c4d..1dcba939d70 100644 --- a/src/Polly.Specs/PolicyAsyncSpecs.cs +++ b/src/Polly.Specs/PolicyAsyncSpecs.cs @@ -1,11 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs; +namespace Polly.Specs; public class PolicyAsyncSpecs { diff --git a/src/Polly.Specs/PolicyContextAndKeyAsyncSpecs.cs b/src/Polly.Specs/PolicyContextAndKeyAsyncSpecs.cs index 5e57f58a9c2..52501f4b54f 100644 --- a/src/Polly.Specs/PolicyContextAndKeyAsyncSpecs.cs +++ b/src/Polly.Specs/PolicyContextAndKeyAsyncSpecs.cs @@ -1,11 +1,4 @@ -using System; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs; +namespace Polly.Specs; public class PolicyKeyAsyncSpecs { diff --git a/src/Polly.Specs/PolicyContextAndKeySpecs.cs b/src/Polly.Specs/PolicyContextAndKeySpecs.cs index 7186064ef1a..c8d9917fb04 100644 --- a/src/Polly.Specs/PolicyContextAndKeySpecs.cs +++ b/src/Polly.Specs/PolicyContextAndKeySpecs.cs @@ -1,9 +1,4 @@ -using System; -using FluentAssertions; -using Polly.Specs.Helpers; -using Xunit; - -namespace Polly.Specs; +namespace Polly.Specs; public class PolicyKeySpecs { diff --git a/src/Polly.Specs/PolicySpecs.cs b/src/Polly.Specs/PolicySpecs.cs index b857e3d255e..f9f21210624 100644 --- a/src/Polly.Specs/PolicySpecs.cs +++ b/src/Polly.Specs/PolicySpecs.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using FluentAssertions; -using Xunit; - -namespace Polly.Specs; +namespace Polly.Specs; public class PolicySpecs { diff --git a/src/Polly.Specs/PolicyTResultAsyncSpecs.cs b/src/Polly.Specs/PolicyTResultAsyncSpecs.cs index 5174286c266..376fa5fe77c 100644 --- a/src/Polly.Specs/PolicyTResultAsyncSpecs.cs +++ b/src/Polly.Specs/PolicyTResultAsyncSpecs.cs @@ -1,11 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.Specs.Helpers; -using Xunit; - -namespace Polly.Specs; +namespace Polly.Specs; public class PolicyTResultAsyncSpecs { diff --git a/src/Polly.Specs/PolicyTResultSpecs.cs b/src/Polly.Specs/PolicyTResultSpecs.cs index 16dca05a7ec..5235164e9e4 100644 --- a/src/Polly.Specs/PolicyTResultSpecs.cs +++ b/src/Polly.Specs/PolicyTResultSpecs.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using FluentAssertions; -using Polly.Specs.Helpers; -using Xunit; - -namespace Polly.Specs; +namespace Polly.Specs; public class PolicyTResultSpecs { diff --git a/src/Polly.Specs/Polly.Specs.csproj b/src/Polly.Specs/Polly.Specs.csproj index 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 ce421ebe107..fe1820b6ec9 100644 --- a/src/Polly.Specs/RateLimit/AsyncRateLimitPolicySpecs.cs +++ b/src/Polly.Specs/RateLimit/AsyncRateLimitPolicySpecs.cs @@ -1,12 +1,4 @@ -using System; -using System.Threading.Tasks; -using Polly.RateLimit; -using Polly.Specs.Helpers; -using Polly.Specs.Helpers.RateLimit; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.RateLimit; +namespace Polly.Specs.RateLimit; [Collection(Polly.Specs.Helpers.Constants.SystemClockDependentTestCollection)] public class AsyncRateLimitPolicySpecs : RateLimitPolicySpecsBase, IDisposable diff --git a/src/Polly.Specs/RateLimit/AsyncRateLimitPolicyTResultSpecs.cs b/src/Polly.Specs/RateLimit/AsyncRateLimitPolicyTResultSpecs.cs index fc12dab463b..e84f9245161 100644 --- a/src/Polly.Specs/RateLimit/AsyncRateLimitPolicyTResultSpecs.cs +++ b/src/Polly.Specs/RateLimit/AsyncRateLimitPolicyTResultSpecs.cs @@ -1,12 +1,4 @@ -using System; -using System.Threading.Tasks; -using Polly.RateLimit; -using Polly.Specs.Helpers; -using Polly.Specs.Helpers.RateLimit; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.RateLimit; +namespace Polly.Specs.RateLimit; [Collection(Polly.Specs.Helpers.Constants.SystemClockDependentTestCollection)] public class AsyncRateLimitPolicyTResultSpecs : RateLimitPolicyTResultSpecsBase, IDisposable diff --git a/src/Polly.Specs/RateLimit/LockFreeTokenBucketRateLimiterTests.cs b/src/Polly.Specs/RateLimit/LockFreeTokenBucketRateLimiterTests.cs index 8f6f122fd8c..c4ff849cea1 100644 --- a/src/Polly.Specs/RateLimit/LockFreeTokenBucketRateLimiterTests.cs +++ b/src/Polly.Specs/RateLimit/LockFreeTokenBucketRateLimiterTests.cs @@ -1,7 +1,4 @@ -using System; -using Polly.RateLimit; - -namespace Polly.Specs.RateLimit; +namespace Polly.Specs.RateLimit; public class LockFreeTokenBucketRateLimiterTests : TokenBucketRateLimiterTestsBase { diff --git a/src/Polly.Specs/RateLimit/RateLimitPolicySpecs.cs b/src/Polly.Specs/RateLimit/RateLimitPolicySpecs.cs index 7994baaec7f..e27cc15b146 100644 --- a/src/Polly.Specs/RateLimit/RateLimitPolicySpecs.cs +++ b/src/Polly.Specs/RateLimit/RateLimitPolicySpecs.cs @@ -1,11 +1,4 @@ -using System; -using Polly.RateLimit; -using Polly.Specs.Helpers; -using Polly.Specs.Helpers.RateLimit; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.RateLimit; +namespace Polly.Specs.RateLimit; [Collection(Polly.Specs.Helpers.Constants.SystemClockDependentTestCollection)] public class RateLimitPolicySpecs : RateLimitPolicySpecsBase, IDisposable diff --git a/src/Polly.Specs/RateLimit/RateLimitPolicySpecsBase.cs b/src/Polly.Specs/RateLimit/RateLimitPolicySpecsBase.cs index 6bc1dbd14a1..5957ea3cc21 100644 --- a/src/Polly.Specs/RateLimit/RateLimitPolicySpecsBase.cs +++ b/src/Polly.Specs/RateLimit/RateLimitPolicySpecsBase.cs @@ -1,12 +1,4 @@ -using System; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.RateLimit; -using Xunit; - -namespace Polly.Specs.RateLimit; +namespace Polly.Specs.RateLimit; public abstract class RateLimitPolicySpecsBase : RateLimitSpecsBase { diff --git a/src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecs.cs b/src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecs.cs index 320e13e65f6..649ba5ea430 100644 --- a/src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecs.cs +++ b/src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecs.cs @@ -1,11 +1,4 @@ -using System; -using Polly.RateLimit; -using Polly.Specs.Helpers; -using Polly.Specs.Helpers.RateLimit; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.RateLimit; +namespace Polly.Specs.RateLimit; [Collection(Polly.Specs.Helpers.Constants.SystemClockDependentTestCollection)] public class RateLimitPolicyTResultSpecs : RateLimitPolicyTResultSpecsBase, IDisposable diff --git a/src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecsBase.cs b/src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecsBase.cs index 529705c3178..f2b92d94f3d 100644 --- a/src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecsBase.cs +++ b/src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecsBase.cs @@ -1,11 +1,4 @@ -using System; -using FluentAssertions; -using Polly.RateLimit; -using Polly.Specs.Helpers; -using Polly.Specs.Helpers.RateLimit; -using Xunit; - -namespace Polly.Specs.RateLimit; +namespace Polly.Specs.RateLimit; public abstract class RateLimitPolicyTResultSpecsBase : RateLimitPolicySpecsBase { diff --git a/src/Polly.Specs/RateLimit/RateLimitSpecsBase.cs b/src/Polly.Specs/RateLimit/RateLimitSpecsBase.cs index 32753153f45..c3a93dd7645 100644 --- a/src/Polly.Specs/RateLimit/RateLimitSpecsBase.cs +++ b/src/Polly.Specs/RateLimit/RateLimitSpecsBase.cs @@ -1,11 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; -using FluentAssertions.Execution; -using Polly.Utilities; -using Xunit.Sdk; - -namespace Polly.Specs.RateLimit; +namespace Polly.Specs.RateLimit; public abstract class RateLimitSpecsBase { diff --git a/src/Polly.Specs/RateLimit/TokenBucketRateLimiterTestsBase.cs b/src/Polly.Specs/RateLimit/TokenBucketRateLimiterTestsBase.cs index 1e30031e516..9370dbc30f9 100644 --- a/src/Polly.Specs/RateLimit/TokenBucketRateLimiterTestsBase.cs +++ b/src/Polly.Specs/RateLimit/TokenBucketRateLimiterTestsBase.cs @@ -1,14 +1,4 @@ -using System; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.RateLimit; -using Polly.Specs.Helpers.RateLimit; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.RateLimit; +namespace Polly.Specs.RateLimit; [Collection(Polly.Specs.Helpers.Constants.SystemClockDependentTestCollection)] public abstract class TokenBucketRateLimiterTestsBase : RateLimitSpecsBase, IDisposable diff --git a/src/Polly.Specs/Registry/ConcurrentPolicyRegistrySpecs.cs b/src/Polly.Specs/Registry/ConcurrentPolicyRegistrySpecs.cs index d0c86ea6720..65c67e60f37 100644 --- a/src/Polly.Specs/Registry/ConcurrentPolicyRegistrySpecs.cs +++ b/src/Polly.Specs/Registry/ConcurrentPolicyRegistrySpecs.cs @@ -1,11 +1,4 @@ -using System; -using FluentAssertions; -using Polly.NoOp; -using Polly.Registry; -using Polly.Specs.Helpers; -using Xunit; - -namespace Polly.Specs.Registry; +namespace Polly.Specs.Registry; public class ConcurrentPolicyRegistrySpecs { diff --git a/src/Polly.Specs/Registry/PolicyRegistrySpecs.cs b/src/Polly.Specs/Registry/PolicyRegistrySpecs.cs index 4604dd463a0..4ce6a09ba7f 100644 --- a/src/Polly.Specs/Registry/PolicyRegistrySpecs.cs +++ b/src/Polly.Specs/Registry/PolicyRegistrySpecs.cs @@ -1,14 +1,4 @@ -using System; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Reflection; -using Xunit; -using FluentAssertions; -using Polly.Registry; -using Polly.Specs.Helpers; -using Moq; - -namespace Polly.Specs.Registry; +namespace Polly.Specs.Registry; public class PolicyRegistrySpecs { diff --git a/src/Polly.Specs/Registry/ReadOnlyPolicyRegistrySpecs.cs b/src/Polly.Specs/Registry/ReadOnlyPolicyRegistrySpecs.cs index b5cef604235..6504c7d122f 100644 --- a/src/Polly.Specs/Registry/ReadOnlyPolicyRegistrySpecs.cs +++ b/src/Polly.Specs/Registry/ReadOnlyPolicyRegistrySpecs.cs @@ -1,12 +1,4 @@ -using System; -using System.Collections.Generic; -using FluentAssertions; -using Moq; -using Polly.Registry; -using Polly.Specs.Helpers; -using Xunit; - -namespace Polly.Specs.Registry; +namespace Polly.Specs.Registry; public class ReadOnlyPolicyRegistrySpecs { diff --git a/src/Polly.Specs/Retry/RetryAsyncSpecs.cs b/src/Polly.Specs/Retry/RetryAsyncSpecs.cs index 2ce22b4d7dc..b2cc963921a 100644 --- a/src/Polly.Specs/Retry/RetryAsyncSpecs.cs +++ b/src/Polly.Specs/Retry/RetryAsyncSpecs.cs @@ -1,15 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.Retry; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - -using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; namespace Polly.Specs.Retry; diff --git a/src/Polly.Specs/Retry/RetryForeverAsyncSpecs.cs b/src/Polly.Specs/Retry/RetryForeverAsyncSpecs.cs index 870371def6f..c50dc528b29 100644 --- a/src/Polly.Specs/Retry/RetryForeverAsyncSpecs.cs +++ b/src/Polly.Specs/Retry/RetryForeverAsyncSpecs.cs @@ -1,15 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.Retry; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - -using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; namespace Polly.Specs.Retry; diff --git a/src/Polly.Specs/Retry/RetryForeverSpecs.cs b/src/Polly.Specs/Retry/RetryForeverSpecs.cs index b58dd0aa454..57a3ef5b2cc 100644 --- a/src/Polly.Specs/Retry/RetryForeverSpecs.cs +++ b/src/Polly.Specs/Retry/RetryForeverSpecs.cs @@ -1,12 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.Specs.Helpers; -using Xunit; - -namespace Polly.Specs.Retry; +namespace Polly.Specs.Retry; public class RetryForeverSpecs { diff --git a/src/Polly.Specs/Retry/RetrySpecs.cs b/src/Polly.Specs/Retry/RetrySpecs.cs index b913719d623..a1023de86af 100644 --- a/src/Polly.Specs/Retry/RetrySpecs.cs +++ b/src/Polly.Specs/Retry/RetrySpecs.cs @@ -1,12 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using FluentAssertions; -using Polly.Specs.Helpers; -using Xunit; - -namespace Polly.Specs.Retry; +namespace Polly.Specs.Retry; public class RetrySpecs { diff --git a/src/Polly.Specs/Retry/RetryTResultMixedResultExceptionSpecs.cs b/src/Polly.Specs/Retry/RetryTResultMixedResultExceptionSpecs.cs index 4ecd5afba40..ed748aa5c23 100644 --- a/src/Polly.Specs/Retry/RetryTResultMixedResultExceptionSpecs.cs +++ b/src/Polly.Specs/Retry/RetryTResultMixedResultExceptionSpecs.cs @@ -1,9 +1,4 @@ -using System; -using FluentAssertions; -using Polly.Specs.Helpers; -using Xunit; - -namespace Polly.Specs.Retry; +namespace Polly.Specs.Retry; public class RetryTResultMixedResultExceptionSpecs { diff --git a/src/Polly.Specs/Retry/RetryTResultSpecs.cs b/src/Polly.Specs/Retry/RetryTResultSpecs.cs index 9b9070eeed4..82966b10ee3 100644 --- a/src/Polly.Specs/Retry/RetryTResultSpecs.cs +++ b/src/Polly.Specs/Retry/RetryTResultSpecs.cs @@ -1,13 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using FluentAssertions; -using Polly.Retry; -using Polly.Specs.Helpers; -using Xunit; - -using Scenario = Polly.Specs.Helpers.PolicyTResultExtensions.ResultAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyTResultExtensions.ResultAndOrCancellationScenario; namespace Polly.Specs.Retry; diff --git a/src/Polly.Specs/Retry/RetryTResultSpecsAsync.cs b/src/Polly.Specs/Retry/RetryTResultSpecsAsync.cs index a586cedb08c..9711ccd83df 100644 --- a/src/Polly.Specs/Retry/RetryTResultSpecsAsync.cs +++ b/src/Polly.Specs/Retry/RetryTResultSpecsAsync.cs @@ -1,14 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - -using Scenario = Polly.Specs.Helpers.PolicyTResultExtensionsAsync.ResultAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyTResultExtensionsAsync.ResultAndOrCancellationScenario; namespace Polly.Specs.Retry; diff --git a/src/Polly.Specs/Retry/WaitAndRetryAsyncSpecs.cs b/src/Polly.Specs/Retry/WaitAndRetryAsyncSpecs.cs index 2384aff262c..2d696f88089 100644 --- a/src/Polly.Specs/Retry/WaitAndRetryAsyncSpecs.cs +++ b/src/Polly.Specs/Retry/WaitAndRetryAsyncSpecs.cs @@ -1,17 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using FluentAssertions.Extensions; -using Polly.Retry; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - -using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; namespace Polly.Specs.Retry; diff --git a/src/Polly.Specs/Retry/WaitAndRetryForeverAsyncSpecs.cs b/src/Polly.Specs/Retry/WaitAndRetryForeverAsyncSpecs.cs index cd07144c7a6..616e2078104 100644 --- a/src/Polly.Specs/Retry/WaitAndRetryForeverAsyncSpecs.cs +++ b/src/Polly.Specs/Retry/WaitAndRetryForeverAsyncSpecs.cs @@ -1,16 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using FluentAssertions.Extensions; -using Polly.Retry; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - -using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; +using Scenario = Polly.Specs.Helpers.PolicyExtensionsAsync.ExceptionAndOrCancellationScenario; namespace Polly.Specs.Retry; diff --git a/src/Polly.Specs/Retry/WaitAndRetryForeverSpecs.cs b/src/Polly.Specs/Retry/WaitAndRetryForeverSpecs.cs index e00de83eca8..3d172b0a634 100644 --- a/src/Polly.Specs/Retry/WaitAndRetryForeverSpecs.cs +++ b/src/Polly.Specs/Retry/WaitAndRetryForeverSpecs.cs @@ -1,13 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using FluentAssertions; -using FluentAssertions.Extensions; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.Retry; +namespace Polly.Specs.Retry; [Collection(Constants.SystemClockDependentTestCollection)] public class WaitAndRetryForeverSpecs : IDisposable diff --git a/src/Polly.Specs/Retry/WaitAndRetryForeverTResultAsyncSpecs.cs b/src/Polly.Specs/Retry/WaitAndRetryForeverTResultAsyncSpecs.cs index dd3c459a6c0..759f1ff1b9b 100644 --- a/src/Polly.Specs/Retry/WaitAndRetryForeverTResultAsyncSpecs.cs +++ b/src/Polly.Specs/Retry/WaitAndRetryForeverTResultAsyncSpecs.cs @@ -1,13 +1,4 @@ -using System; -using System.Threading.Tasks; -using System.Collections.Generic; -using FluentAssertions; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; -using FluentAssertions.Extensions; - -namespace Polly.Specs.Retry; +namespace Polly.Specs.Retry; [Collection(Constants.SystemClockDependentTestCollection)] public class WaitAndRetryForeverTResultAsyncSpecs : IDisposable diff --git a/src/Polly.Specs/Retry/WaitAndRetryForeverTResultSpecs.cs b/src/Polly.Specs/Retry/WaitAndRetryForeverTResultSpecs.cs index cd2229e7aff..b05cd60ce9e 100644 --- a/src/Polly.Specs/Retry/WaitAndRetryForeverTResultSpecs.cs +++ b/src/Polly.Specs/Retry/WaitAndRetryForeverTResultSpecs.cs @@ -1,12 +1,4 @@ -using System; -using System.Collections.Generic; -using FluentAssertions; -using FluentAssertions.Extensions; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.Retry; +namespace Polly.Specs.Retry; [Collection(Constants.SystemClockDependentTestCollection)] public class WaitAndRetryForeverTResultSpecs : IDisposable diff --git a/src/Polly.Specs/Retry/WaitAndRetrySpecs.cs b/src/Polly.Specs/Retry/WaitAndRetrySpecs.cs index 0af4827eb1f..a80c0c6212f 100644 --- a/src/Polly.Specs/Retry/WaitAndRetrySpecs.cs +++ b/src/Polly.Specs/Retry/WaitAndRetrySpecs.cs @@ -1,16 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using FluentAssertions; -using FluentAssertions.Extensions; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.Retry; +namespace Polly.Specs.Retry; [Collection(Constants.SystemClockDependentTestCollection)] public class WaitAndRetrySpecs : IDisposable diff --git a/src/Polly.Specs/Retry/WaitAndRetryTResultAsyncSpecs.cs b/src/Polly.Specs/Retry/WaitAndRetryTResultAsyncSpecs.cs index b9003f0c2ef..4efc5c3e558 100644 --- a/src/Polly.Specs/Retry/WaitAndRetryTResultAsyncSpecs.cs +++ b/src/Polly.Specs/Retry/WaitAndRetryTResultAsyncSpecs.cs @@ -1,13 +1,4 @@ -using System; -using System.Threading.Tasks; -using System.Collections.Generic; -using FluentAssertions; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; -using FluentAssertions.Extensions; - -namespace Polly.Specs.Retry; +namespace Polly.Specs.Retry; [Collection(Constants.SystemClockDependentTestCollection)] public class WaitAndRetryTResultAsyncSpecs : IDisposable diff --git a/src/Polly.Specs/Retry/WaitAndRetryTResultSpecs.cs b/src/Polly.Specs/Retry/WaitAndRetryTResultSpecs.cs index f9eaa6c6201..ab8cdb172d5 100644 --- a/src/Polly.Specs/Retry/WaitAndRetryTResultSpecs.cs +++ b/src/Polly.Specs/Retry/WaitAndRetryTResultSpecs.cs @@ -1,12 +1,4 @@ -using System; -using System.Collections.Generic; -using FluentAssertions; -using FluentAssertions.Extensions; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.Retry; +namespace Polly.Specs.Retry; [Collection(Constants.SystemClockDependentTestCollection)] public class WaitAndRetryTResultSpecs : IDisposable diff --git a/src/Polly.Specs/Timeout/TimeoutAsyncSpecs.cs b/src/Polly.Specs/Timeout/TimeoutAsyncSpecs.cs index d643a82d74a..a92fea4741c 100644 --- a/src/Polly.Specs/Timeout/TimeoutAsyncSpecs.cs +++ b/src/Polly.Specs/Timeout/TimeoutAsyncSpecs.cs @@ -1,14 +1,4 @@ -using FluentAssertions; -using Polly.Specs.Helpers; -using Polly.Timeout; -using Polly.Utilities; -using System; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; -using Xunit; - -namespace Polly.Specs.Timeout; +namespace Polly.Specs.Timeout; [Collection(Constants.SystemClockDependentTestCollection)] public class TimeoutAsyncSpecs : TimeoutSpecsBase diff --git a/src/Polly.Specs/Timeout/TimeoutSpecs.cs b/src/Polly.Specs/Timeout/TimeoutSpecs.cs index 339f15a35c2..eceb969165f 100644 --- a/src/Polly.Specs/Timeout/TimeoutSpecs.cs +++ b/src/Polly.Specs/Timeout/TimeoutSpecs.cs @@ -1,14 +1,4 @@ -using FluentAssertions; -using System; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; -using Polly.Specs.Helpers; -using Polly.Timeout; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.Timeout; +namespace Polly.Specs.Timeout; [Collection(Constants.SystemClockDependentTestCollection)] public class TimeoutSpecs : TimeoutSpecsBase diff --git a/src/Polly.Specs/Timeout/TimeoutSpecsBase.cs b/src/Polly.Specs/Timeout/TimeoutSpecsBase.cs index a82f67732d2..486da5f3c7d 100644 --- a/src/Polly.Specs/Timeout/TimeoutSpecsBase.cs +++ b/src/Polly.Specs/Timeout/TimeoutSpecsBase.cs @@ -1,8 +1,4 @@ -using System; -using System.Runtime.CompilerServices; -using Polly.Utilities; -using System.Threading; -using System.Threading.Tasks; +using System.Runtime.CompilerServices; namespace Polly.Specs.Timeout; diff --git a/src/Polly.Specs/Timeout/TimeoutTResultAsyncSpecs.cs b/src/Polly.Specs/Timeout/TimeoutTResultAsyncSpecs.cs index 6a5c5beade0..84e9266ac09 100644 --- a/src/Polly.Specs/Timeout/TimeoutTResultAsyncSpecs.cs +++ b/src/Polly.Specs/Timeout/TimeoutTResultAsyncSpecs.cs @@ -1,14 +1,4 @@ -using FluentAssertions; -using System; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; -using Polly.Specs.Helpers; -using Polly.Timeout; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.Timeout; +namespace Polly.Specs.Timeout; [Collection(Constants.SystemClockDependentTestCollection)] public class TimeoutTResultAsyncSpecs : TimeoutSpecsBase diff --git a/src/Polly.Specs/Timeout/TimeoutTResultSpecs.cs b/src/Polly.Specs/Timeout/TimeoutTResultSpecs.cs index 92f56bb8dbd..ec1d482037f 100644 --- a/src/Polly.Specs/Timeout/TimeoutTResultSpecs.cs +++ b/src/Polly.Specs/Timeout/TimeoutTResultSpecs.cs @@ -1,14 +1,4 @@ -using FluentAssertions; -using System; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; -using Polly.Specs.Helpers; -using Polly.Timeout; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.Timeout; +namespace Polly.Specs.Timeout; [Collection(Constants.SystemClockDependentTestCollection)] public class TimeoutTResultSpecs : TimeoutSpecsBase diff --git a/src/Polly.Specs/Wrap/IPolicyWrapExtensionSpecs.cs b/src/Polly.Specs/Wrap/IPolicyWrapExtensionSpecs.cs index 7c0c019ff05..c9d8d72f92b 100644 --- a/src/Polly.Specs/Wrap/IPolicyWrapExtensionSpecs.cs +++ b/src/Polly.Specs/Wrap/IPolicyWrapExtensionSpecs.cs @@ -1,14 +1,4 @@ -using System; -using System.Collections.Generic; -using Xunit; -using Polly.Wrap; -using System.Linq; -using FluentAssertions; -using Polly.CircuitBreaker; -using Polly.NoOp; -using Polly.Retry; - -namespace Polly.Specs.Wrap; +namespace Polly.Specs.Wrap; public class IPolicyWrapExtensionSpecs { diff --git a/src/Polly.Specs/Wrap/PolicyWrapContextAndKeySpecs.cs b/src/Polly.Specs/Wrap/PolicyWrapContextAndKeySpecs.cs index f09afed1197..40800dba19c 100644 --- a/src/Polly.Specs/Wrap/PolicyWrapContextAndKeySpecs.cs +++ b/src/Polly.Specs/Wrap/PolicyWrapContextAndKeySpecs.cs @@ -1,9 +1,4 @@ -using System; -using FluentAssertions; -using Polly.Specs.Helpers; -using Xunit; - -namespace Polly.Specs.Wrap; +namespace Polly.Specs.Wrap; [Collection(Constants.SystemClockDependentTestCollection)] public class PolicyWrapContextAndKeySpecs diff --git a/src/Polly.Specs/Wrap/PolicyWrapContextAndKeySpecsAsync.cs b/src/Polly.Specs/Wrap/PolicyWrapContextAndKeySpecsAsync.cs index cc98ebfcd9a..fecd09d1579 100644 --- a/src/Polly.Specs/Wrap/PolicyWrapContextAndKeySpecsAsync.cs +++ b/src/Polly.Specs/Wrap/PolicyWrapContextAndKeySpecsAsync.cs @@ -1,11 +1,4 @@ -using System; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.Specs.Helpers; -using Polly.Utilities; -using Xunit; - -namespace Polly.Specs.Wrap; +namespace Polly.Specs.Wrap; [Collection(Constants.SystemClockDependentTestCollection)] public class PolicyWrapContextAndKeySpecsAsync diff --git a/src/Polly.Specs/Wrap/PolicyWrapSpecs.cs b/src/Polly.Specs/Wrap/PolicyWrapSpecs.cs index d32444a5612..b4be095ea3f 100644 --- a/src/Polly.Specs/Wrap/PolicyWrapSpecs.cs +++ b/src/Polly.Specs/Wrap/PolicyWrapSpecs.cs @@ -1,12 +1,4 @@ -using System; -using FluentAssertions; -using Polly.CircuitBreaker; -using Polly.Retry; -using Polly.Specs.Helpers; -using Polly.Wrap; -using Xunit; - -namespace Polly.Specs.Wrap; +namespace Polly.Specs.Wrap; [Collection(Constants.SystemClockDependentTestCollection)] public class PolicyWrapSpecs diff --git a/src/Polly.Specs/Wrap/PolicyWrapSpecsAsync.cs b/src/Polly.Specs/Wrap/PolicyWrapSpecsAsync.cs index 4148abd7afc..b73c55a75ea 100644 --- a/src/Polly.Specs/Wrap/PolicyWrapSpecsAsync.cs +++ b/src/Polly.Specs/Wrap/PolicyWrapSpecsAsync.cs @@ -1,12 +1,4 @@ -using System; -using System.Threading.Tasks; -using FluentAssertions; -using Polly.CircuitBreaker; -using Polly.Specs.Helpers; -using Polly.Wrap; -using Xunit; - -namespace Polly.Specs.Wrap; +namespace Polly.Specs.Wrap; [Collection(Constants.SystemClockDependentTestCollection)] public class PolicyWrapSpecsAsync diff --git a/src/Polly/AsyncPolicy.ExecuteOverloads.cs b/src/Polly/AsyncPolicy.ExecuteOverloads.cs index fcdc9770e1d..425b1df5d3e 100644 --- a/src/Polly/AsyncPolicy.ExecuteOverloads.cs +++ b/src/Polly/AsyncPolicy.ExecuteOverloads.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; - -namespace Polly; +namespace Polly; public abstract partial class AsyncPolicy : PolicyBase, IAsyncPolicy { diff --git a/src/Polly/AsyncPolicy.GenericImplementation.cs b/src/Polly/AsyncPolicy.GenericImplementation.cs index 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..fb8b271f325 100644 --- a/src/Polly/AsyncPolicy.NonGenericImplementation.cs +++ b/src/Polly/AsyncPolicy.NonGenericImplementation.cs @@ -1,9 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using Polly.Utilities; - -namespace Polly; +namespace Polly; public abstract partial class AsyncPolicy { diff --git a/src/Polly/AsyncPolicy.TResult.ExecuteOverloads.cs b/src/Polly/AsyncPolicy.TResult.ExecuteOverloads.cs index 0722506d4a2..63b4b1687e9 100644 --- a/src/Polly/AsyncPolicy.TResult.ExecuteOverloads.cs +++ b/src/Polly/AsyncPolicy.TResult.ExecuteOverloads.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; - -namespace Polly; +namespace Polly; public abstract partial class AsyncPolicy : IAsyncPolicy { diff --git a/src/Polly/Bulkhead/AsyncBulkheadEngine.cs b/src/Polly/Bulkhead/AsyncBulkheadEngine.cs index 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..694cf252c4c 100644 --- a/src/Polly/Bulkhead/AsyncBulkheadPolicy.cs +++ b/src/Polly/Bulkhead/AsyncBulkheadPolicy.cs @@ -1,9 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; - -namespace Polly.Bulkhead; +namespace Polly.Bulkhead; /// /// A bulkhead-isolation policy which can be applied to delegates. diff --git a/src/Polly/Bulkhead/AsyncBulkheadSyntax.cs b/src/Polly/Bulkhead/AsyncBulkheadSyntax.cs index 7ce93513047..83814aea4bb 100644 --- a/src/Polly/Bulkhead/AsyncBulkheadSyntax.cs +++ b/src/Polly/Bulkhead/AsyncBulkheadSyntax.cs @@ -1,8 +1,3 @@ -using Polly.Bulkhead; -using Polly.Utilities; -using System; -using System.Threading.Tasks; - namespace Polly; public partial class Policy diff --git a/src/Polly/Bulkhead/AsyncBulkheadTResultSyntax.cs b/src/Polly/Bulkhead/AsyncBulkheadTResultSyntax.cs index f082cef5695..a4641b15ba8 100644 --- a/src/Polly/Bulkhead/AsyncBulkheadTResultSyntax.cs +++ b/src/Polly/Bulkhead/AsyncBulkheadTResultSyntax.cs @@ -1,9 +1,4 @@ -using Polly.Bulkhead; -using Polly.Utilities; -using System; -using System.Threading.Tasks; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/Bulkhead/BulkheadEngine.cs b/src/Polly/Bulkhead/BulkheadEngine.cs index 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..1b8e0c3b761 100644 --- a/src/Polly/Bulkhead/BulkheadPolicy.cs +++ b/src/Polly/Bulkhead/BulkheadPolicy.cs @@ -1,8 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; - -namespace Polly.Bulkhead; +namespace Polly.Bulkhead; /// /// A bulkhead-isolation policy which can be applied to delegates. diff --git a/src/Polly/Bulkhead/BulkheadRejectedException.cs b/src/Polly/Bulkhead/BulkheadRejectedException.cs index 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..986516f5855 100644 --- a/src/Polly/Bulkhead/BulkheadSyntax.cs +++ b/src/Polly/Bulkhead/BulkheadSyntax.cs @@ -1,7 +1,4 @@ -using Polly.Bulkhead; -using System; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/Bulkhead/BulkheadTResultSyntax.cs b/src/Polly/Bulkhead/BulkheadTResultSyntax.cs index 32e1ee8d044..1e68102e206 100644 --- a/src/Polly/Bulkhead/BulkheadTResultSyntax.cs +++ b/src/Polly/Bulkhead/BulkheadTResultSyntax.cs @@ -1,7 +1,4 @@ -using Polly.Bulkhead; -using System; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/Bulkhead/IBulkheadPolicy.cs b/src/Polly/Bulkhead/IBulkheadPolicy.cs index 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..a4bcc5fdaee 100644 --- a/src/Polly/Caching/AsyncCachePolicy.cs +++ b/src/Polly/Caching/AsyncCachePolicy.cs @@ -1,9 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; - -namespace Polly.Caching; +namespace Polly.Caching; /// /// A cache policy that can be applied to the results of delegate executions. diff --git a/src/Polly/Caching/AsyncCacheSyntax.cs b/src/Polly/Caching/AsyncCacheSyntax.cs index 577b6451206..d3c6ce6032b 100644 --- a/src/Polly/Caching/AsyncCacheSyntax.cs +++ b/src/Polly/Caching/AsyncCacheSyntax.cs @@ -1,7 +1,4 @@ -using Polly.Caching; -using System; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/Caching/AsyncCacheTResultSyntax.cs b/src/Polly/Caching/AsyncCacheTResultSyntax.cs index 3604a9a7dc5..6faad6d8c7c 100644 --- a/src/Polly/Caching/AsyncCacheTResultSyntax.cs +++ b/src/Polly/Caching/AsyncCacheTResultSyntax.cs @@ -1,7 +1,4 @@ -using Polly.Caching; -using System; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/Caching/AsyncGenericCacheProvider.cs b/src/Polly/Caching/AsyncGenericCacheProvider.cs index 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..b014424f2e7 100644 --- a/src/Polly/Caching/CachePolicy.cs +++ b/src/Polly/Caching/CachePolicy.cs @@ -1,8 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; - -namespace Polly.Caching; +namespace Polly.Caching; /// /// A cache policy that can be applied to the results of delegate executions. diff --git a/src/Polly/Caching/CacheSyntax.cs b/src/Polly/Caching/CacheSyntax.cs index 6331e6113b3..8ab89c07118 100644 --- a/src/Polly/Caching/CacheSyntax.cs +++ b/src/Polly/Caching/CacheSyntax.cs @@ -1,7 +1,4 @@ -using Polly.Caching; -using System; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/Caching/CacheTResultSyntax.cs b/src/Polly/Caching/CacheTResultSyntax.cs index d80e4a03d5b..dbddd3b39d7 100644 --- a/src/Polly/Caching/CacheTResultSyntax.cs +++ b/src/Polly/Caching/CacheTResultSyntax.cs @@ -1,7 +1,4 @@ -using Polly.Caching; -using System; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/Caching/ContextualTtl.cs b/src/Polly/Caching/ContextualTtl.cs index 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..302a552df9d 100644 --- a/src/Polly/Caching/NonSlidingTtl.cs +++ b/src/Polly/Caching/NonSlidingTtl.cs @@ -1,7 +1,4 @@ -using System; -using Polly.Utilities; - -namespace Polly.Caching; +namespace Polly.Caching; /// /// Represents an expiring at an absolute time, not with sliding expiration. diff --git a/src/Polly/Caching/RelativeTtl.cs b/src/Polly/Caching/RelativeTtl.cs index 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..8890835d417 100644 --- a/src/Polly/CircuitBreaker/AdvancedCircuitBreakerSyntax.cs +++ b/src/Polly/CircuitBreaker/AdvancedCircuitBreakerSyntax.cs @@ -1,7 +1,3 @@ -using System; -using Polly.CircuitBreaker; -using Polly.Utilities; - namespace Polly; /// diff --git a/src/Polly/CircuitBreaker/AdvancedCircuitBreakerTResultSyntax.cs b/src/Polly/CircuitBreaker/AdvancedCircuitBreakerTResultSyntax.cs index ccb172930fe..c0ec003fc3e 100644 --- a/src/Polly/CircuitBreaker/AdvancedCircuitBreakerTResultSyntax.cs +++ b/src/Polly/CircuitBreaker/AdvancedCircuitBreakerTResultSyntax.cs @@ -1,8 +1,4 @@ -using System; -using Polly.CircuitBreaker; -using Polly.Utilities; - -namespace Polly; +namespace Polly; /// /// Fluent API for defining a Circuit Breaker . diff --git a/src/Polly/CircuitBreaker/AdvancedCircuitController.cs b/src/Polly/CircuitBreaker/AdvancedCircuitController.cs index 778f5e0a461..9a79dda5be5 100644 --- a/src/Polly/CircuitBreaker/AdvancedCircuitController.cs +++ b/src/Polly/CircuitBreaker/AdvancedCircuitController.cs @@ -1,7 +1,4 @@ -using System; -using Polly.Utilities; - -namespace Polly.CircuitBreaker; +namespace Polly.CircuitBreaker; internal class AdvancedCircuitController : CircuitStateController { diff --git a/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerSyntax.cs b/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerSyntax.cs index ffc88a12343..eb057bcce9f 100644 --- a/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerSyntax.cs +++ b/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerSyntax.cs @@ -1,8 +1,4 @@ -using System; -using Polly.CircuitBreaker; -using Polly.Utilities; - -namespace Polly; +namespace Polly; /// /// Fluent API for defining a Circuit Breaker . diff --git a/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerTResultSyntax.cs b/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerTResultSyntax.cs index e688d341c53..0dd3cfbc0c8 100644 --- a/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerTResultSyntax.cs +++ b/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerTResultSyntax.cs @@ -1,7 +1,3 @@ -using System; -using Polly.CircuitBreaker; -using Polly.Utilities; - namespace Polly; /// diff --git a/src/Polly/CircuitBreaker/AsyncCircuitBreakerEngine.cs b/src/Polly/CircuitBreaker/AsyncCircuitBreakerEngine.cs index cfc8290b681..d0c2e479d81 100644 --- a/src/Polly/CircuitBreaker/AsyncCircuitBreakerEngine.cs +++ b/src/Polly/CircuitBreaker/AsyncCircuitBreakerEngine.cs @@ -1,9 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using Polly.Utilities; - -namespace Polly.CircuitBreaker; +namespace Polly.CircuitBreaker; internal class AsyncCircuitBreakerEngine { diff --git a/src/Polly/CircuitBreaker/AsyncCircuitBreakerPolicy.cs b/src/Polly/CircuitBreaker/AsyncCircuitBreakerPolicy.cs index ac958850da9..a1781ceeb84 100644 --- a/src/Polly/CircuitBreaker/AsyncCircuitBreakerPolicy.cs +++ b/src/Polly/CircuitBreaker/AsyncCircuitBreakerPolicy.cs @@ -1,10 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; -using Polly.Utilities; - -namespace Polly.CircuitBreaker; +namespace Polly.CircuitBreaker; /// /// A circuit-breaker policy that can be applied to async delegates. diff --git a/src/Polly/CircuitBreaker/AsyncCircuitBreakerSyntax.cs b/src/Polly/CircuitBreaker/AsyncCircuitBreakerSyntax.cs index cd2f10d222f..3948781d035 100644 --- a/src/Polly/CircuitBreaker/AsyncCircuitBreakerSyntax.cs +++ b/src/Polly/CircuitBreaker/AsyncCircuitBreakerSyntax.cs @@ -1,8 +1,4 @@ -using System; -using Polly.CircuitBreaker; -using Polly.Utilities; - -namespace Polly; +namespace Polly; /// /// Fluent API for defining a Circuit Breaker . diff --git a/src/Polly/CircuitBreaker/AsyncCircuitBreakerTResultSyntax.cs b/src/Polly/CircuitBreaker/AsyncCircuitBreakerTResultSyntax.cs index a02f185c2b4..556eb1ee2ea 100644 --- a/src/Polly/CircuitBreaker/AsyncCircuitBreakerTResultSyntax.cs +++ b/src/Polly/CircuitBreaker/AsyncCircuitBreakerTResultSyntax.cs @@ -1,7 +1,4 @@ -using System; -using Polly.CircuitBreaker; - -namespace Polly; +namespace Polly; /// /// Fluent API for defining a Circuit Breaker . diff --git a/src/Polly/CircuitBreaker/BrokenCircuitException.cs b/src/Polly/CircuitBreaker/BrokenCircuitException.cs index 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..4cabe098c4c 100644 --- a/src/Polly/CircuitBreaker/CircuitBreakerPolicy.cs +++ b/src/Polly/CircuitBreaker/CircuitBreakerPolicy.cs @@ -1,9 +1,4 @@ -using System; -using System.Diagnostics; -using Polly.Utilities; -using System.Threading; - -namespace Polly.CircuitBreaker; +namespace Polly.CircuitBreaker; /// /// A circuit-breaker policy that can be applied to delegates. diff --git a/src/Polly/CircuitBreaker/CircuitBreakerSyntax.cs b/src/Polly/CircuitBreaker/CircuitBreakerSyntax.cs index c1819b6c2eb..1c601901f27 100644 --- a/src/Polly/CircuitBreaker/CircuitBreakerSyntax.cs +++ b/src/Polly/CircuitBreaker/CircuitBreakerSyntax.cs @@ -1,7 +1,3 @@ -using System; -using Polly.CircuitBreaker; -using Polly.Utilities; - namespace Polly; /// diff --git a/src/Polly/CircuitBreaker/CircuitBreakerTResultSyntax.cs b/src/Polly/CircuitBreaker/CircuitBreakerTResultSyntax.cs index 300a1b486b5..4a2bd24f669 100644 --- a/src/Polly/CircuitBreaker/CircuitBreakerTResultSyntax.cs +++ b/src/Polly/CircuitBreaker/CircuitBreakerTResultSyntax.cs @@ -1,7 +1,4 @@ -using System; -using Polly.CircuitBreaker; - -namespace Polly; +namespace Polly; /// /// Fluent API for defining a Circuit Breaker . diff --git a/src/Polly/CircuitBreaker/CircuitStateController.cs b/src/Polly/CircuitBreaker/CircuitStateController.cs index f7073c08b7f..7f8345dbff4 100644 --- a/src/Polly/CircuitBreaker/CircuitStateController.cs +++ b/src/Polly/CircuitBreaker/CircuitStateController.cs @@ -1,8 +1,4 @@ -using System; -using System.Threading; -using Polly.Utilities; - -namespace Polly.CircuitBreaker; +namespace Polly.CircuitBreaker; internal abstract class CircuitStateController : ICircuitController { diff --git a/src/Polly/CircuitBreaker/ConsecutiveCountCircuitController.cs b/src/Polly/CircuitBreaker/ConsecutiveCountCircuitController.cs index 562288d21d3..9da663a9ecb 100644 --- a/src/Polly/CircuitBreaker/ConsecutiveCountCircuitController.cs +++ b/src/Polly/CircuitBreaker/ConsecutiveCountCircuitController.cs @@ -1,7 +1,4 @@ -using System; -using Polly.Utilities; - -namespace Polly.CircuitBreaker; +namespace Polly.CircuitBreaker; internal class ConsecutiveCountCircuitController : CircuitStateController { diff --git a/src/Polly/CircuitBreaker/ICircuitBreakerPolicy.cs b/src/Polly/CircuitBreaker/ICircuitBreakerPolicy.cs index 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/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 1e41e113fe3..12f993ad32e 100644 --- a/src/Polly/CircuitBreaker/RollingHealthMetrics.cs +++ b/src/Polly/CircuitBreaker/RollingHealthMetrics.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using Polly.Utilities; - -namespace Polly.CircuitBreaker; +namespace Polly.CircuitBreaker; internal class RollingHealthMetrics : IHealthMetrics { diff --git a/src/Polly/CircuitBreaker/SingleHealthMetrics.cs b/src/Polly/CircuitBreaker/SingleHealthMetrics.cs index 67be8f3be90..58826db98e0 100644 --- a/src/Polly/CircuitBreaker/SingleHealthMetrics.cs +++ b/src/Polly/CircuitBreaker/SingleHealthMetrics.cs @@ -1,7 +1,4 @@ -using System; -using Polly.Utilities; - -namespace Polly.CircuitBreaker; +namespace Polly.CircuitBreaker; internal class SingleHealthMetrics : IHealthMetrics { diff --git a/src/Polly/Context.Dictionary.cs b/src/Polly/Context.Dictionary.cs index 6dd027fb02e..88c0d792c07 100644 --- a/src/Polly/Context.Dictionary.cs +++ b/src/Polly/Context.Dictionary.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections; -using System.Collections.Generic; - -namespace Polly; +namespace Polly; /// /// Context that carries with a single execution through a Policy. Commonly-used properties are directly on the class. Backed by a dictionary of string key / object value pairs, to which user-defined values may be added. diff --git a/src/Polly/Context.cs b/src/Polly/Context.cs index d814dc77b99..794d4bb464a 100644 --- a/src/Polly/Context.cs +++ b/src/Polly/Context.cs @@ -1,7 +1,4 @@ -using System; -using Polly.Wrap; - -namespace Polly; +namespace Polly; /// /// Context that carries with a single execution through a Policy. Commonly-used properties are directly on the class. Backed by a dictionary of string key / object value pairs, to which user-defined values may be added. diff --git a/src/Polly/DelegateResult.cs b/src/Polly/DelegateResult.cs index 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..96b3c6a179a 100644 --- a/src/Polly/Fallback/AsyncFallbackPolicy.cs +++ b/src/Polly/Fallback/AsyncFallbackPolicy.cs @@ -1,10 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; -using Polly.Utilities; - -namespace Polly.Fallback; +namespace Polly.Fallback; /// /// A fallback policy that can be applied to asynchronous delegates. diff --git a/src/Polly/Fallback/AsyncFallbackSyntax.cs b/src/Polly/Fallback/AsyncFallbackSyntax.cs index 04749012a11..c7f95f7737b 100644 --- a/src/Polly/Fallback/AsyncFallbackSyntax.cs +++ b/src/Polly/Fallback/AsyncFallbackSyntax.cs @@ -1,10 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using Polly.Fallback; -using Polly.Utilities; - -namespace Polly; +namespace Polly; /// /// Fluent API for defining a Fallback . diff --git a/src/Polly/Fallback/FallbackEngine.cs b/src/Polly/Fallback/FallbackEngine.cs index 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..542b768f5e2 100644 --- a/src/Polly/Fallback/FallbackPolicy.cs +++ b/src/Polly/Fallback/FallbackPolicy.cs @@ -1,9 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; -using Polly.Utilities; - -namespace Polly.Fallback; +namespace Polly.Fallback; /// /// A fallback policy that can be applied to delegates. diff --git a/src/Polly/Fallback/FallbackSyntax.cs b/src/Polly/Fallback/FallbackSyntax.cs index 0120ba74ff2..d77f1dda6ec 100644 --- a/src/Polly/Fallback/FallbackSyntax.cs +++ b/src/Polly/Fallback/FallbackSyntax.cs @@ -1,8 +1,4 @@ -using System; -using System.Threading; -using Polly.Fallback; - -namespace Polly; +namespace Polly; /// /// Fluent API for defining a Fallback policy. diff --git a/src/Polly/IAsyncPolicy.TResult.cs b/src/Polly/IAsyncPolicy.TResult.cs index 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..ea01819ad6c 100644 --- a/src/Polly/NoOp/AsyncNoOpPolicy.cs +++ b/src/Polly/NoOp/AsyncNoOpPolicy.cs @@ -1,9 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; - -namespace Polly.NoOp; +namespace Polly.NoOp; /// /// A noop policy that can be applied to asynchronous delegates. diff --git a/src/Polly/NoOp/AsyncNoOpSyntax.cs b/src/Polly/NoOp/AsyncNoOpSyntax.cs index 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/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..64c641ca4e2 100644 --- a/src/Polly/NoOp/NoOpPolicy.cs +++ b/src/Polly/NoOp/NoOpPolicy.cs @@ -1,8 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; - -namespace Polly.NoOp; +namespace Polly.NoOp; /// /// A no op policy that can be applied to delegates. diff --git a/src/Polly/NoOp/NoOpSyntax.cs b/src/Polly/NoOp/NoOpSyntax.cs index 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 67ad7fce170..e846fdff015 100644 --- a/src/Polly/Policy.ExecuteOverloads.cs +++ b/src/Polly/Policy.ExecuteOverloads.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Threading; - -namespace Polly; +namespace Polly; public abstract partial class Policy : ISyncPolicy { diff --git a/src/Polly/Policy.HandleSyntax.cs b/src/Polly/Policy.HandleSyntax.cs index 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..be070060bb9 100644 --- a/src/Polly/Policy.SyncNonGenericImplementation.cs +++ b/src/Polly/Policy.SyncNonGenericImplementation.cs @@ -1,9 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; -using Polly.Utilities; - -namespace Polly; +namespace Polly; public abstract partial class Policy { diff --git a/src/Polly/Policy.TResult.ExecuteOverloads.cs b/src/Polly/Policy.TResult.ExecuteOverloads.cs index 52a33e195fa..45bde2c843b 100644 --- a/src/Polly/Policy.TResult.ExecuteOverloads.cs +++ b/src/Polly/Policy.TResult.ExecuteOverloads.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Threading; - - -namespace Polly; +namespace Polly; public abstract partial class Policy : ISyncPolicy { diff --git a/src/Polly/PolicyBase.ContextAndKeys.cs b/src/Polly/PolicyBase.ContextAndKeys.cs index 511bbfa37c7..8ffd96e3cfb 100644 --- a/src/Polly/PolicyBase.ContextAndKeys.cs +++ b/src/Polly/PolicyBase.ContextAndKeys.cs @@ -1,7 +1,4 @@ -using System; -using Polly.Utilities; - -namespace Polly; +namespace Polly; public abstract partial class PolicyBase { diff --git a/src/Polly/PolicyBase.cs b/src/Polly/PolicyBase.cs index 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..9c977da2c2f 100644 --- a/src/Polly/RateLimit/AsyncRateLimitPolicy.cs +++ b/src/Polly/RateLimit/AsyncRateLimitPolicy.cs @@ -1,9 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; - -namespace Polly.RateLimit; +namespace Polly.RateLimit; /// /// A rate-limit policy that can be applied to asynchronous delegates. diff --git a/src/Polly/RateLimit/AsyncRateLimitSyntax.cs b/src/Polly/RateLimit/AsyncRateLimitSyntax.cs index db0d6813898..d090c962985 100644 --- a/src/Polly/RateLimit/AsyncRateLimitSyntax.cs +++ b/src/Polly/RateLimit/AsyncRateLimitSyntax.cs @@ -1,7 +1,4 @@ -using System; -using Polly.RateLimit; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/RateLimit/AsyncRateLimitTResultSyntax.cs b/src/Polly/RateLimit/AsyncRateLimitTResultSyntax.cs index 4844f885013..56a21fb52b1 100644 --- a/src/Polly/RateLimit/AsyncRateLimitTResultSyntax.cs +++ b/src/Polly/RateLimit/AsyncRateLimitTResultSyntax.cs @@ -1,7 +1,4 @@ -using System; -using Polly.RateLimit; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/RateLimit/IRateLimiter.cs b/src/Polly/RateLimit/IRateLimiter.cs index 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..b67a3f2aba1 100644 --- a/src/Polly/RateLimit/LockFreeTokenBucketRateLimiter.cs +++ b/src/Polly/RateLimit/LockFreeTokenBucketRateLimiter.cs @@ -1,8 +1,4 @@ -using System; -using System.Threading; -using Polly.Utilities; - -namespace Polly.RateLimit; +namespace Polly.RateLimit; /// /// A lock-free token-bucket rate-limiter for a Polly . diff --git a/src/Polly/RateLimit/RateLimitEngine.cs b/src/Polly/RateLimit/RateLimitEngine.cs index 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..68716d1b59a 100644 --- a/src/Polly/RateLimit/RateLimitPolicy.cs +++ b/src/Polly/RateLimit/RateLimitPolicy.cs @@ -1,8 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; - -namespace Polly.RateLimit; +namespace Polly.RateLimit; /// /// A rate-limit policy that can be applied to synchronous delegates. diff --git a/src/Polly/RateLimit/RateLimitRejectedException.cs b/src/Polly/RateLimit/RateLimitRejectedException.cs index 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..fd6e8141cc5 100644 --- a/src/Polly/RateLimit/RateLimitSyntax.cs +++ b/src/Polly/RateLimit/RateLimitSyntax.cs @@ -1,7 +1,4 @@ -using System; -using Polly.RateLimit; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/RateLimit/RateLimitTResultSyntax.cs b/src/Polly/RateLimit/RateLimitTResultSyntax.cs index b6f09c6113b..2fb31ba8d98 100644 --- a/src/Polly/RateLimit/RateLimitTResultSyntax.cs +++ b/src/Polly/RateLimit/RateLimitTResultSyntax.cs @@ -1,7 +1,4 @@ -using System; -using Polly.RateLimit; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/RateLimit/RateLimiterFactory.cs b/src/Polly/RateLimit/RateLimiterFactory.cs index 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..7d9d42f5205 100644 --- a/src/Polly/Registry/PolicyRegistry.cs +++ b/src/Polly/Registry/PolicyRegistry.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.Concurrent; - -namespace Polly.Registry; +namespace Polly.Registry; /// /// diff --git a/src/Polly/ResultPredicates.cs b/src/Polly/ResultPredicates.cs index 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..8eb287e6e6f 100644 --- a/src/Polly/Retry/AsyncRetryEngine.cs +++ b/src/Polly/Retry/AsyncRetryEngine.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using Polly.Utilities; - -namespace Polly.Retry; +namespace Polly.Retry; internal static class AsyncRetryEngine { diff --git a/src/Polly/Retry/AsyncRetryPolicy.cs b/src/Polly/Retry/AsyncRetryPolicy.cs index 13dc5431db5..f09e771dbac 100644 --- a/src/Polly/Retry/AsyncRetryPolicy.cs +++ b/src/Polly/Retry/AsyncRetryPolicy.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; - -namespace Polly.Retry; +namespace Polly.Retry; /// /// A retry policy that can be applied to asynchronous delegates. diff --git a/src/Polly/Retry/AsyncRetrySyntax.cs b/src/Polly/Retry/AsyncRetrySyntax.cs index b494e888578..970b9bd5361 100644 --- a/src/Polly/Retry/AsyncRetrySyntax.cs +++ b/src/Polly/Retry/AsyncRetrySyntax.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Polly.Retry; - -namespace Polly; +namespace Polly; /// /// Fluent API for defining a . diff --git a/src/Polly/Retry/AsyncRetryTResultSyntax.cs b/src/Polly/Retry/AsyncRetryTResultSyntax.cs index a50abd1714c..fac92e94456 100644 --- a/src/Polly/Retry/AsyncRetryTResultSyntax.cs +++ b/src/Polly/Retry/AsyncRetryTResultSyntax.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Polly.Retry; - -namespace Polly; +namespace Polly; /// /// Fluent API for defining an . diff --git a/src/Polly/Retry/RetryEngine.cs b/src/Polly/Retry/RetryEngine.cs index db9b90237cd..1773d0890dd 100644 --- a/src/Polly/Retry/RetryEngine.cs +++ b/src/Polly/Retry/RetryEngine.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using Polly.Utilities; - -namespace Polly.Retry; +namespace Polly.Retry; internal static class RetryEngine { diff --git a/src/Polly/Retry/RetryPolicy.cs b/src/Polly/Retry/RetryPolicy.cs index 3efe0d1f99a..8f043d18f65 100644 --- a/src/Polly/Retry/RetryPolicy.cs +++ b/src/Polly/Retry/RetryPolicy.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Threading; - -namespace Polly.Retry; +namespace Polly.Retry; /// /// A retry policy that can be applied to synchronous delegates. diff --git a/src/Polly/Retry/RetrySyntax.cs b/src/Polly/Retry/RetrySyntax.cs index a440a4e9d39..09f5800e71e 100644 --- a/src/Polly/Retry/RetrySyntax.cs +++ b/src/Polly/Retry/RetrySyntax.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Polly.Retry; - -namespace Polly; +namespace Polly; /// /// Fluent API for defining a Retry . diff --git a/src/Polly/Retry/RetryTResultSyntax.cs b/src/Polly/Retry/RetryTResultSyntax.cs index 0183dbd6bbd..a98ebb88c4d 100644 --- a/src/Polly/Retry/RetryTResultSyntax.cs +++ b/src/Polly/Retry/RetryTResultSyntax.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using Polly.Retry; -using System.Linq; - -namespace Polly; +namespace Polly; /// /// Fluent API for defining a Retry . diff --git a/src/Polly/Timeout/AsyncTimeoutEngine.cs b/src/Polly/Timeout/AsyncTimeoutEngine.cs index 8cb7568a87d..da85c341d2c 100644 --- a/src/Polly/Timeout/AsyncTimeoutEngine.cs +++ b/src/Polly/Timeout/AsyncTimeoutEngine.cs @@ -1,9 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using Polly.Utilities; - -namespace Polly.Timeout; +namespace Polly.Timeout; internal static class AsyncTimeoutEngine { diff --git a/src/Polly/Timeout/AsyncTimeoutPolicy.cs b/src/Polly/Timeout/AsyncTimeoutPolicy.cs index b298195d79b..fff9141eaee 100644 --- a/src/Polly/Timeout/AsyncTimeoutPolicy.cs +++ b/src/Polly/Timeout/AsyncTimeoutPolicy.cs @@ -1,9 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; - -namespace Polly.Timeout; +namespace Polly.Timeout; /// /// A timeout policy which can be applied to async delegates. diff --git a/src/Polly/Timeout/AsyncTimeoutSyntax.cs b/src/Polly/Timeout/AsyncTimeoutSyntax.cs index be177da0e65..0be1002e3bb 100644 --- a/src/Polly/Timeout/AsyncTimeoutSyntax.cs +++ b/src/Polly/Timeout/AsyncTimeoutSyntax.cs @@ -1,9 +1,4 @@ -using System; -using System.Threading.Tasks; -using Polly.Timeout; -using Polly.Utilities; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/Timeout/AsyncTimeoutTResultSyntax.cs b/src/Polly/Timeout/AsyncTimeoutTResultSyntax.cs index 7b46b803ff9..3f4a5a5c69e 100644 --- a/src/Polly/Timeout/AsyncTimeoutTResultSyntax.cs +++ b/src/Polly/Timeout/AsyncTimeoutTResultSyntax.cs @@ -1,8 +1,4 @@ -using System; -using System.Threading.Tasks; -using Polly.Timeout; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/Timeout/TimeoutEngine.cs b/src/Polly/Timeout/TimeoutEngine.cs index 002cddc1096..77c19585ff6 100644 --- a/src/Polly/Timeout/TimeoutEngine.cs +++ b/src/Polly/Timeout/TimeoutEngine.cs @@ -1,8 +1,4 @@ -using System; -using System.Runtime.ExceptionServices; -using System.Threading; -using System.Threading.Tasks; -using Polly.Utilities; +using System.Runtime.ExceptionServices; namespace Polly.Timeout; diff --git a/src/Polly/Timeout/TimeoutPolicy.cs b/src/Polly/Timeout/TimeoutPolicy.cs index a6b0621078c..52b82c33034 100644 --- a/src/Polly/Timeout/TimeoutPolicy.cs +++ b/src/Polly/Timeout/TimeoutPolicy.cs @@ -1,9 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; - -namespace Polly.Timeout; +namespace Polly.Timeout; /// /// A timeout policy which can be applied to delegates. diff --git a/src/Polly/Timeout/TimeoutRejectedException.cs b/src/Polly/Timeout/TimeoutRejectedException.cs index 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..0e04e5a0a25 100644 --- a/src/Polly/Timeout/TimeoutSyntax.cs +++ b/src/Polly/Timeout/TimeoutSyntax.cs @@ -1,8 +1,4 @@ -using Polly.Timeout; -using System; -using System.Threading.Tasks; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/Timeout/TimeoutTResultSyntax.cs b/src/Polly/Timeout/TimeoutTResultSyntax.cs index 4c1724d6d02..11f8854bc1e 100644 --- a/src/Polly/Timeout/TimeoutTResultSyntax.cs +++ b/src/Polly/Timeout/TimeoutTResultSyntax.cs @@ -1,8 +1,4 @@ -using System; -using Polly.Timeout; -using System.Threading.Tasks; - -namespace Polly; +namespace Polly; public partial class Policy { diff --git a/src/Polly/Timeout/TimeoutValidator.cs b/src/Polly/Timeout/TimeoutValidator.cs index 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..02765aad3af 100644 --- a/src/Polly/Wrap/AsyncPolicyWrap.cs +++ b/src/Polly/Wrap/AsyncPolicyWrap.cs @@ -1,9 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; - -namespace Polly.Wrap; +namespace Polly.Wrap; /// /// A policy that allows two (and by recursion more) async Polly policies to wrap executions of async delegates. diff --git a/src/Polly/Wrap/AsyncPolicyWrapEngine.cs b/src/Polly/Wrap/AsyncPolicyWrapEngine.cs index 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..331656823df 100644 --- a/src/Polly/Wrap/AsyncPolicyWrapSyntax.cs +++ b/src/Polly/Wrap/AsyncPolicyWrapSyntax.cs @@ -1,8 +1,4 @@ -using System; -using System.Linq; -using Polly.Wrap; - -namespace Polly; +namespace Polly; public partial class AsyncPolicy { diff --git a/src/Polly/Wrap/IPolicyWrapExtension.cs b/src/Polly/Wrap/IPolicyWrapExtension.cs index 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..48e13629aa9 100644 --- a/src/Polly/Wrap/PolicyWrap.cs +++ b/src/Polly/Wrap/PolicyWrap.cs @@ -1,8 +1,4 @@ -using System; -using System.Diagnostics; -using System.Threading; - -namespace Polly.Wrap; +namespace Polly.Wrap; /// /// A policy that allows two (and by recursion more) Polly policies to wrap executions of delegates. diff --git a/src/Polly/Wrap/PolicyWrapEngine.cs b/src/Polly/Wrap/PolicyWrapEngine.cs index 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..7dd1163dde1 100644 --- a/src/Polly/Wrap/PolicyWrapSyntax.cs +++ b/src/Polly/Wrap/PolicyWrapSyntax.cs @@ -1,8 +1,4 @@ -using System; -using System.Linq; -using Polly.Wrap; - -namespace Polly; +namespace Polly; public partial class Policy {