Skip to content

Commit e4ffcd4

Browse files
authored
Warning Suppression CA1062 (#2216)
1 parent 8776447 commit e4ffcd4

26 files changed

+26
-1
lines changed

src/Polly/Bulkhead/AsyncBulkheadPolicy.cs

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ namespace Polly.Bulkhead;
44
/// <summary>
55
/// A bulkhead-isolation policy which can be applied to delegates.
66
/// </summary>
7+
#pragma warning disable CA1062 // Validate arguments of public methods
78
public class AsyncBulkheadPolicy : AsyncPolicy, IBulkheadPolicy
89
{
910
private readonly SemaphoreSlim _maxParallelizationSemaphore;

src/Polly/Bulkhead/BulkheadPolicy.cs

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ namespace Polly.Bulkhead;
44
/// <summary>
55
/// A bulkhead-isolation policy which can be applied to delegates.
66
/// </summary>
7+
#pragma warning disable CA1062 // Validate arguments of public methods
78
public class BulkheadPolicy : Policy, IBulkheadPolicy
89
{
910
private readonly SemaphoreSlim _maxParallelizationSemaphore;

src/Polly/Caching/AsyncCachePolicy.cs

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ namespace Polly.Caching;
44
/// <summary>
55
/// A cache policy that can be applied to the results of delegate executions.
66
/// </summary>
7+
#pragma warning disable CA1062 // Validate arguments of public methods
78
public class AsyncCachePolicy : AsyncPolicy
89
{
910
private readonly IAsyncCacheProvider _asyncCacheProvider;

src/Polly/Caching/AsyncCacheSyntax.cs

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#nullable enable
22
namespace Polly;
33

4+
#pragma warning disable CA1062 // Validate arguments of public methods
45
public partial class Policy
56
{
67
/// <summary>

src/Polly/Caching/AsyncCacheTResultSyntax.cs

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#nullable enable
22
namespace Polly;
33

4+
#pragma warning disable CA1062 // Validate arguments of public methods
45
public partial class Policy
56
{
67
/// <summary>

src/Polly/Caching/CachePolicy.cs

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ namespace Polly.Caching;
44
/// <summary>
55
/// A cache policy that can be applied to the results of delegate executions.
66
/// </summary>
7+
#pragma warning disable CA1062 // Validate arguments of public methods
78
public class CachePolicy : Policy, ICachePolicy
89
{
910
private readonly ISyncCacheProvider _syncCacheProvider;

src/Polly/Caching/CacheSyntax.cs

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#nullable enable
22
namespace Polly;
33

4+
#pragma warning disable CA1062 // Validate arguments of public methods
45
public partial class Policy
56
{
67
/// <summary>

src/Polly/Caching/CacheTResultSyntax.cs

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#nullable enable
22
namespace Polly;
33

4+
#pragma warning disable CA1062 // Validate arguments of public methods
45
public partial class Policy
56
{
67
/// <summary>

src/Polly/Caching/ContextualTtl.cs

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ namespace Polly.Caching;
44
/// <summary>
55
/// Defines a ttl strategy which will cache items for a TimeSpan which may be influenced by data in the execution context.
66
/// </summary>
7+
#pragma warning disable CA1062 // Validate arguments of public methods
78
public class ContextualTtl : ITtlStrategy
89
{
910
/// <summary>

src/Polly/Caching/DefaultCacheKeyStrategy.cs

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ namespace Polly.Caching;
44
/// <summary>
55
/// The default cache key strategy for <see cref="CachePolicy"/>. Returns the property <see cref="Context.OperationKey"/>.
66
/// </summary>
7+
#pragma warning disable CA1062 // Validate arguments of public methods
78
public class DefaultCacheKeyStrategy : ICacheKeyStrategy
89
{
910
/// <summary>

src/Polly/CircuitBreaker/AsyncCircuitBreakerPolicy.cs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
/// <summary>
44
/// A circuit-breaker policy that can be applied to async delegates.
55
/// </summary>
6+
#pragma warning disable CA1062 // Validate arguments of public methods
67
public class AsyncCircuitBreakerPolicy : AsyncPolicy, ICircuitBreakerPolicy
78
{
89
internal readonly ICircuitController<EmptyStruct> BreakerController;

src/Polly/CircuitBreaker/CircuitBreakerPolicy.cs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
/// <summary>
44
/// A circuit-breaker policy that can be applied to delegates.
55
/// </summary>
6+
#pragma warning disable CA1062 // Validate arguments of public methods
67
public class CircuitBreakerPolicy : Policy, ICircuitBreakerPolicy
78
{
89
internal readonly ICircuitController<EmptyStruct> BreakerController;

src/Polly/Fallback/AsyncFallbackPolicy.cs

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ namespace Polly.Fallback;
44
/// <summary>
55
/// A fallback policy that can be applied to asynchronous delegates.
66
/// </summary>
7+
#pragma warning disable CA1062 // Validate arguments of public methods
78
public class AsyncFallbackPolicy : AsyncPolicy, IFallbackPolicy
89
{
910
private readonly Func<Exception, Context, Task> _onFallbackAsync;

src/Polly/Fallback/FallbackPolicy.cs

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ namespace Polly.Fallback;
44
/// <summary>
55
/// A fallback policy that can be applied to delegates.
66
/// </summary>
7+
#pragma warning disable CA1062 // Validate arguments of public methods
78
public class FallbackPolicy : Policy, IFallbackPolicy
89
{
910
private readonly Action<Exception, Context> _onFallback;

src/Polly/NoOp/AsyncNoOpPolicy.cs

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ namespace Polly.NoOp;
44
/// <summary>
55
/// A noop policy that can be applied to asynchronous delegates.
66
/// </summary>
7+
#pragma warning disable CA1062 // Validate arguments of public methods
78
public class AsyncNoOpPolicy : AsyncPolicy, INoOpPolicy
89
{
910
internal AsyncNoOpPolicy()

src/Polly/NoOp/NoOpPolicy.cs

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ namespace Polly.NoOp;
44
/// <summary>
55
/// A no op policy that can be applied to delegates.
66
/// </summary>
7+
#pragma warning disable CA1062 // Validate arguments of public methods
78
public class NoOpPolicy : Policy, INoOpPolicy
89
{
910
internal NoOpPolicy()

src/Polly/Polly.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<ProjectType>Library</ProjectType>
88
<MutationScore>70</MutationScore>
99
<IncludePollyUsings>true</IncludePollyUsings>
10-
<NoWarn>$(NoWarn);CA1010;CA1031;CA1051;CA1062;CA1063;CA1064;CA1724;CA1805;CA1816;CA2211</NoWarn>
10+
<NoWarn>$(NoWarn);CA1010;CA1031;CA1051;CA1063;CA1064;CA1724;CA1805;CA1816;CA2211</NoWarn>
1111
<NoWarn>$(NoWarn);S2223;S3215;S4039</NoWarn>
1212
<!--Public API Analyzers: We do not need to fix these as it would break compatibility with released Polly versions-->
1313
<NoWarn>$(NoWarn);RS0037;</NoWarn>

src/Polly/RateLimit/AsyncRateLimitPolicy.cs

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ namespace Polly.RateLimit;
44
/// <summary>
55
/// A rate-limit policy that can be applied to asynchronous delegates.
66
/// </summary>
7+
#pragma warning disable CA1062 // Validate arguments of public methods
78
public class AsyncRateLimitPolicy : AsyncPolicy, IRateLimitPolicy
89
{
910
private readonly IRateLimiter _rateLimiter;

src/Polly/RateLimit/RateLimitPolicy.cs

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ namespace Polly.RateLimit;
44
/// <summary>
55
/// A rate-limit policy that can be applied to synchronous delegates.
66
/// </summary>
7+
#pragma warning disable CA1062 // Validate arguments of public methods
78
public class RateLimitPolicy : Policy, IRateLimitPolicy
89
{
910
private readonly IRateLimiter _rateLimiter;

src/Polly/Retry/AsyncRetryPolicy.cs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
/// <summary>
44
/// A retry policy that can be applied to asynchronous delegates.
55
/// </summary>
6+
#pragma warning disable CA1062 // Validate arguments of public methods
67
public class AsyncRetryPolicy : AsyncPolicy, IRetryPolicy
78
{
89
private readonly Func<Exception, TimeSpan, int, Context, Task> _onRetryAsync;

src/Polly/Retry/RetryPolicy.cs

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ namespace Polly.Retry;
44
/// <summary>
55
/// A retry policy that can be applied to synchronous delegates.
66
/// </summary>
7+
#pragma warning disable CA1062 // Validate arguments of public methods
78
public class RetryPolicy : Policy, IRetryPolicy
89
{
910
private readonly Action<Exception, TimeSpan, int, Context> _onRetry;

src/Polly/Timeout/AsyncTimeoutPolicy.cs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
/// <summary>
44
/// A timeout policy which can be applied to async delegates.
55
/// </summary>
6+
#pragma warning disable CA1062 // Validate arguments of public methods
67
public class AsyncTimeoutPolicy : AsyncPolicy, ITimeoutPolicy
78
{
89
private readonly Func<Context, TimeSpan> _timeoutProvider;

src/Polly/Timeout/TimeoutPolicy.cs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
/// <summary>
44
/// A timeout policy which can be applied to delegates.
55
/// </summary>
6+
#pragma warning disable CA1062 // Validate arguments of public methods
67
public class TimeoutPolicy : Policy, ITimeoutPolicy
78
{
89
private readonly TimeoutStrategy _timeoutStrategy;

src/Polly/Wrap/IAsyncPolicyPolicyWrapExtensions.cs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
/// <summary>
44
/// Defines extensions for configuring <see cref="PolicyWrap"/> instances on an <see cref="IAsyncPolicy"/> or <see cref="IAsyncPolicy{TResult}"/>.
55
/// </summary>
6+
#pragma warning disable CA1062 // Validate arguments of public methods
67
public static class IAsyncPolicyPolicyWrapExtensions
78
{
89
/// <summary>

src/Polly/Wrap/IPolicyWrapExtension.cs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
/// <summary>
44
/// Extension methods for IPolicyWrap.
55
/// </summary>
6+
#pragma warning disable CA1062 // Validate arguments of public methods
67
public static class IPolicyWrapExtension
78
{
89
/// <summary>

src/Polly/Wrap/ISyncPolicyPolicyWrapExtensions.cs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
/// <summary>
44
/// Defines extensions for configuring <see cref="PolicyWrap"/> instances on an <see cref="ISyncPolicy"/> or <see cref="ISyncPolicy{TResult}"/>.
55
/// </summary>
6+
#pragma warning disable CA1062 // Validate arguments of public methods
67
public static class ISyncPolicyPolicyWrapExtensions
78
{
89
/// <summary>

0 commit comments

Comments
 (0)