Skip to content

Commit

Permalink
Move to implicit usings (#1006)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp authored Jan 9, 2023
1 parent a91c100 commit 03a77c1
Show file tree
Hide file tree
Showing 271 changed files with 304 additions and 1,623 deletions.
39 changes: 39 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,44 @@
<AssemblyOriginatorKeyFile>..\Polly.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<Using Include="System.Collections" />
<Using Include="System.Collections.Concurrent" />
<Using Include="System.Diagnostics" />
<Using Include="System.Reflection" />
<Using Include="Polly.Bulkhead" />
<Using Include="Polly.Caching" />
<Using Include="Polly.CircuitBreaker" />
<Using Include="Polly.Fallback" />
<Using Include="Polly.NoOp" />
<Using Include="Polly.RateLimit" />
<Using Include="Polly.Registry" />
<Using Include="Polly.Retry" />
<Using Include="Polly.Timeout" />
<Using Include="Polly.Utilities" />
<Using Include="Polly.Wrap" />
</ItemGroup>
<ItemGroup Condition="'$(ProjectName)' == 'Polly.Specs'">
<Using Include="FluentAssertions" />
<Using Include="FluentAssertions.Execution" />
<Using Include="FluentAssertions.Extensions" />
<Using Include="Moq" />
<Using Include="Polly.Specs.Helpers" />
<Using Include="Polly.Specs.Helpers.Bulkhead" />
<Using Include="Polly.Specs.Helpers.Caching" />
<Using Include="Polly.Specs.Helpers.Custom.AddBehaviourIfHandle" />
<Using Include="Polly.Specs.Helpers.Custom.PreExecute" />
<Using Include="Polly.Specs.Helpers.RateLimit" />
<Using Include="Xunit" />
<Using Include="Xunit.Abstractions" />
<Using Include="Xunit.Sdk" />
</ItemGroup>
<ItemGroup Condition="'$(ProjectName)' == 'Polly.Benchmarks'">
<Using Include="BenchmarkDotNet.Attributes" />
<Using Include="BenchmarkDotNet.Configs" />
<Using Include="BenchmarkDotNet.Jobs" />
<Using Include="BenchmarkDotNet.Running" />
</ItemGroup>
</Project>
6 changes: 1 addition & 5 deletions src/Polly.Benchmarks/Bulkhead.cs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 1 addition & 6 deletions src/Polly.Benchmarks/Cache.cs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
7 changes: 1 addition & 6 deletions src/Polly.Benchmarks/CircuitBreaker.cs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 1 addition & 5 deletions src/Polly.Benchmarks/Fallback.cs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 1 addition & 5 deletions src/Polly.Benchmarks/NoOp.cs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 1 addition & 6 deletions src/Polly.Benchmarks/PolicyWrap.cs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 1 addition & 4 deletions src/Polly.Benchmarks/PollyConfig.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Jobs;

namespace Polly.Benchmarks;
namespace Polly.Benchmarks;

internal class PollyConfig : ManualConfig
{
Expand Down
5 changes: 1 addition & 4 deletions src/Polly.Benchmarks/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
using System.Reflection;
using BenchmarkDotNet.Running;

BenchmarkRunner.Run(Assembly.GetCallingAssembly(), args: args);
BenchmarkRunner.Run(Assembly.GetCallingAssembly(), args: args);
6 changes: 1 addition & 5 deletions src/Polly.Benchmarks/RateLimit.cs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 1 addition & 6 deletions src/Polly.Benchmarks/Retry.cs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 1 addition & 6 deletions src/Polly.Benchmarks/Timeout.cs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 1 addition & 5 deletions src/Polly.Benchmarks/Workloads.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Threading;
using System.Threading.Tasks;

namespace Polly.Benchmarks;
namespace Polly.Benchmarks;

internal static class Workloads
{
Expand Down
12 changes: 1 addition & 11 deletions src/Polly.Specs/Bulkhead/BulkheadAsyncSpecs.cs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 1 addition & 4 deletions src/Polly.Specs/Bulkhead/BulkheadScenarios.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System.Collections;
using System.Collections.Generic;

namespace Polly.Specs.Bulkhead;
namespace Polly.Specs.Bulkhead;

/// <summary>
/// A set of test scenarios used in all BulkheadPolicy tests.
Expand Down
10 changes: 1 addition & 9 deletions src/Polly.Specs/Bulkhead/BulkheadSpecs.cs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
13 changes: 1 addition & 12 deletions src/Polly.Specs/Bulkhead/BulkheadSpecsBase.cs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
13 changes: 1 addition & 12 deletions src/Polly.Specs/Bulkhead/BulkheadTResultAsyncSpecs.cs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
13 changes: 1 addition & 12 deletions src/Polly.Specs/Bulkhead/BulkheadTResultSpecs.cs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 1 addition & 5 deletions src/Polly.Specs/Bulkhead/IBulkheadPolicySpecs.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using FluentAssertions;
using Polly.Bulkhead;
using Xunit;

namespace Polly.Specs.Bulkhead;
namespace Polly.Specs.Bulkhead;

public class IBulkheadPolicySpecs
{
Expand Down
9 changes: 1 addition & 8 deletions src/Polly.Specs/Caching/AbsoluteTtlSpecs.cs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
12 changes: 1 addition & 11 deletions src/Polly.Specs/Caching/CacheAsyncSpecs.cs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
12 changes: 1 addition & 11 deletions src/Polly.Specs/Caching/CacheSpecs.cs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
12 changes: 1 addition & 11 deletions src/Polly.Specs/Caching/CacheTResultAsyncSpecs.cs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
12 changes: 1 addition & 11 deletions src/Polly.Specs/Caching/CacheTResultSpecs.cs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 1 addition & 7 deletions src/Polly.Specs/Caching/ContextualTtlSpecs.cs
Original file line number Diff line number Diff line change
@@ -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
{
Expand Down
6 changes: 1 addition & 5 deletions src/Polly.Specs/Caching/DefaultCacheKeyStrategySpecs.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using FluentAssertions;
using Polly.Caching;
using Xunit;

namespace Polly.Specs.Caching;
namespace Polly.Specs.Caching;

public class DefaultCacheKeyStrategySpecs
{
Expand Down
12 changes: 1 addition & 11 deletions src/Polly.Specs/Caching/GenericCacheProviderAsyncSpecs.cs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 1 addition & 9 deletions src/Polly.Specs/Caching/GenericCacheProviderSpecs.cs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Loading

0 comments on commit 03a77c1

Please sign in to comment.