diff --git a/src/Polly.Core/Utils/LegacySupport.cs b/src/Polly.Core/LegacySupport.cs similarity index 98% rename from src/Polly.Core/Utils/LegacySupport.cs rename to src/Polly.Core/LegacySupport.cs index 76e2226cffe..966d92a5215 100644 --- a/src/Polly.Core/Utils/LegacySupport.cs +++ b/src/Polly.Core/LegacySupport.cs @@ -1,6 +1,6 @@ using System.ComponentModel; -namespace Polly.Utils; +namespace Polly; /// /// Legacy support for older versions of Polly. diff --git a/src/Polly.Core/PublicAPI.Unshipped.txt b/src/Polly.Core/PublicAPI.Unshipped.txt index 69b8176bc73..742f6604a2c 100644 --- a/src/Polly.Core/PublicAPI.Unshipped.txt +++ b/src/Polly.Core/PublicAPI.Unshipped.txt @@ -146,6 +146,7 @@ Polly.Hedging.OnHedgingArguments.ExecutionTime.get -> System.TimeSpan Polly.Hedging.OnHedgingArguments.HasOutcome.get -> bool Polly.Hedging.OnHedgingArguments.OnHedgingArguments(int attemptNumber, bool hasOutcome, System.TimeSpan executionTime) -> void Polly.HedgingCompositeStrategyBuilderExtensions +Polly.LegacySupport Polly.NullResilienceStrategy Polly.NullResilienceStrategy Polly.Outcome @@ -384,7 +385,6 @@ Polly.Timeout.TimeoutStrategyOptions.TimeoutGenerator.get -> System.Func void Polly.Timeout.TimeoutStrategyOptions.TimeoutStrategyOptions() -> void Polly.TimeoutCompositeStrategyBuilderExtensions -Polly.Utils.LegacySupport static Polly.CircuitBreakerCompositeStrategyBuilderExtensions.AddCircuitBreaker(this Polly.CompositeStrategyBuilder! builder, Polly.CircuitBreaker.CircuitBreakerStrategyOptions! options) -> Polly.CompositeStrategyBuilder! static Polly.CircuitBreakerCompositeStrategyBuilderExtensions.AddCircuitBreaker(this Polly.CompositeStrategyBuilder! builder, Polly.CircuitBreaker.CircuitBreakerStrategyOptions! options) -> Polly.CompositeStrategyBuilder! static Polly.CompositeStrategyBuilderExtensions.AddStrategy(this Polly.CompositeStrategyBuilder! builder, System.Func!>! factory, Polly.ResilienceStrategyOptions! options) -> Polly.CompositeStrategyBuilder! @@ -394,6 +394,7 @@ static Polly.CompositeStrategyBuilderExtensions.AddStrategy(this Polly. static Polly.CompositeStrategyBuilderExtensions.AddStrategy(this Polly.CompositeStrategyBuilder! builder, System.Func!>! factory, Polly.ResilienceStrategyOptions! options) -> Polly.CompositeStrategyBuilder! static Polly.FallbackCompositeStrategyBuilderExtensions.AddFallback(this Polly.CompositeStrategyBuilder! builder, Polly.Fallback.FallbackStrategyOptions! options) -> Polly.CompositeStrategyBuilder! static Polly.HedgingCompositeStrategyBuilderExtensions.AddHedging(this Polly.CompositeStrategyBuilder! builder, Polly.Hedging.HedgingStrategyOptions! options) -> Polly.CompositeStrategyBuilder! +static Polly.LegacySupport.SetProperties(this Polly.ResilienceProperties! resilienceProperties, System.Collections.Generic.IDictionary! properties, out System.Collections.Generic.IDictionary! oldProperties) -> void static Polly.Outcome.FromException(System.Exception! exception) -> Polly.Outcome static Polly.Outcome.FromExceptionAsTask(System.Exception! exception) -> System.Threading.Tasks.ValueTask> static Polly.Outcome.FromResult(TResult? value) -> Polly.Outcome @@ -411,7 +412,6 @@ static Polly.RetryCompositeStrategyBuilderExtensions.AddRetry(this Polly.Composi static Polly.RetryCompositeStrategyBuilderExtensions.AddRetry(this Polly.CompositeStrategyBuilder! builder, Polly.Retry.RetryStrategyOptions! options) -> Polly.CompositeStrategyBuilder! static Polly.TimeoutCompositeStrategyBuilderExtensions.AddTimeout(this TBuilder! builder, Polly.Timeout.TimeoutStrategyOptions! options) -> TBuilder! static Polly.TimeoutCompositeStrategyBuilderExtensions.AddTimeout(this TBuilder! builder, System.TimeSpan timeout) -> TBuilder! -static Polly.Utils.LegacySupport.SetProperties(this Polly.ResilienceProperties! resilienceProperties, System.Collections.Generic.IDictionary! properties, out System.Collections.Generic.IDictionary! oldProperties) -> void static readonly Polly.NullResilienceStrategy.Instance -> Polly.NullResilienceStrategy! static readonly Polly.NullResilienceStrategy.Instance -> Polly.NullResilienceStrategy! virtual Polly.Registry.ResilienceStrategyProvider.GetStrategy(TKey key) -> Polly.ResilienceStrategy! diff --git a/src/Polly/Utilities/Wrappers/ResilienceContextFactory.cs b/src/Polly/Utilities/Wrappers/ResilienceContextFactory.cs index 9b6bf5854ca..f2b46a81309 100644 --- a/src/Polly/Utilities/Wrappers/ResilienceContextFactory.cs +++ b/src/Polly/Utilities/Wrappers/ResilienceContextFactory.cs @@ -1,5 +1,3 @@ -using Polly.Utils; - namespace Polly.Utilities.Wrappers; internal static class ResilienceContextFactory diff --git a/test/Polly.Core.Tests/Utils/LegacySupportTests.cs b/test/Polly.Core.Tests/Utils/LegacySupportTests.cs index b3d6f04c85a..2995f58e12d 100644 --- a/test/Polly.Core.Tests/Utils/LegacySupportTests.cs +++ b/test/Polly.Core.Tests/Utils/LegacySupportTests.cs @@ -1,5 +1,3 @@ -using Polly.Utils; - namespace Polly.Core.Tests.Utils; public class LegacySupportTests