From 396438aafd89b4a35fa2c394a46017484b64fd44 Mon Sep 17 00:00:00 2001 From: ZLoo Date: Thu, 18 Jul 2024 01:28:07 +0300 Subject: [PATCH 1/2] fix S3246 warning --- src/Polly/Caching/ITtlStrategy.cs | 2 +- src/Polly/CircuitBreaker/ICircuitBreakerPolicy.cs | 2 +- src/Polly/Polly.csproj | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Polly/Caching/ITtlStrategy.cs b/src/Polly/Caching/ITtlStrategy.cs index 6aeaa60ee97..0db573e7816 100644 --- a/src/Polly/Caching/ITtlStrategy.cs +++ b/src/Polly/Caching/ITtlStrategy.cs @@ -12,7 +12,7 @@ public interface ITtlStrategy : ITtlStrategy /// Defines a strategy for providing time-to-live durations for cacheable results. /// /// The type of the result. -public interface ITtlStrategy +public interface ITtlStrategy { /// /// Gets a TTL for a cacheable item, given the current execution context. diff --git a/src/Polly/CircuitBreaker/ICircuitBreakerPolicy.cs b/src/Polly/CircuitBreaker/ICircuitBreakerPolicy.cs index 9cf4b8bd839..5a955b495d1 100644 --- a/src/Polly/CircuitBreaker/ICircuitBreakerPolicy.cs +++ b/src/Polly/CircuitBreaker/ICircuitBreakerPolicy.cs @@ -31,7 +31,7 @@ public interface ICircuitBreakerPolicy : IsPolicy /// Defines properties and methods common to all circuit-breaker policies generic-typed for executions returning results of type . /// /// The type of the result. -public interface ICircuitBreakerPolicy : ICircuitBreakerPolicy +public interface ICircuitBreakerPolicy : ICircuitBreakerPolicy { /// /// Gets the last result returned from a user delegate which the circuit-breaker handled. diff --git a/src/Polly/Polly.csproj b/src/Polly/Polly.csproj index 177c9f8b3a0..258bbe0439a 100644 --- a/src/Polly/Polly.csproj +++ b/src/Polly/Polly.csproj @@ -8,7 +8,7 @@ 70 true $(NoWarn);CA1010;CA1031;CA1051;CA1062;CA1063;CA1064;CA1710;CA1716;CA1724;CA1805;CA1815;CA1816;CA2211 - $(NoWarn);S2223;S3215;S3246;S3971;S4039;S4457 + $(NoWarn);S2223;S3215;S3971;S4039;S4457 $(NoWarn);RS0037; From f25e7621c15206bc27afc5b9c4193c12d9827544 Mon Sep 17 00:00:00 2001 From: ZLoo Date: Thu, 18 Jul 2024 10:15:15 +0300 Subject: [PATCH 2/2] PR by feedback --- src/Polly/Caching/ITtlStrategy.cs | 4 +++- src/Polly/CircuitBreaker/ICircuitBreakerPolicy.cs | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Polly/Caching/ITtlStrategy.cs b/src/Polly/Caching/ITtlStrategy.cs index 0db573e7816..e48f1c8da55 100644 --- a/src/Polly/Caching/ITtlStrategy.cs +++ b/src/Polly/Caching/ITtlStrategy.cs @@ -12,7 +12,9 @@ public interface ITtlStrategy : ITtlStrategy /// Defines a strategy for providing time-to-live durations for cacheable results. /// /// The type of the result. -public interface ITtlStrategy +#pragma warning disable S3246 +public interface ITtlStrategy +#pragma warning restore S3246 { /// /// Gets a TTL for a cacheable item, given the current execution context. diff --git a/src/Polly/CircuitBreaker/ICircuitBreakerPolicy.cs b/src/Polly/CircuitBreaker/ICircuitBreakerPolicy.cs index 5a955b495d1..7970f99ef49 100644 --- a/src/Polly/CircuitBreaker/ICircuitBreakerPolicy.cs +++ b/src/Polly/CircuitBreaker/ICircuitBreakerPolicy.cs @@ -31,7 +31,9 @@ public interface ICircuitBreakerPolicy : IsPolicy /// Defines properties and methods common to all circuit-breaker policies generic-typed for executions returning results of type . /// /// The type of the result. -public interface ICircuitBreakerPolicy : ICircuitBreakerPolicy +#pragma warning disable S3246 +public interface ICircuitBreakerPolicy : ICircuitBreakerPolicy +#pragma warning restore S3246 { /// /// Gets the last result returned from a user delegate which the circuit-breaker handled.