From 7260ed2929e5894552ca8ad78e4c5b5906c1ac0d Mon Sep 17 00:00:00 2001 From: Martin Tomka Date: Mon, 24 Jul 2023 07:58:40 +0200 Subject: [PATCH 1/3] Rename ExecuteCoreAsync to ExecuteCore --- .../TelemetryBenchmark.cs | 2 +- .../Utils/EmptyResilienceStrategy.cs | 2 +- .../Utils/Helper.CircuitBreaker.cs | 2 +- src/Polly.Core/NullResilienceStrategy.cs | 2 +- src/Polly.Core/PublicAPI.Unshipped.txt | 2 +- src/Polly.Core/README.md | 4 ++-- .../ResilienceStrategy.Async.ValueTask.cs | 8 ++++---- .../ResilienceStrategy.Async.ValueTaskT.cs | 10 +++++----- src/Polly.Core/ResilienceStrategy.cs | 20 +++++++++++-------- .../Timeout/TimeoutResilienceStrategy.cs | 2 +- .../Utils/OutcomeResilienceStrategy.cs | 2 +- .../Utils/ReloadableResilienceStrategy.cs | 4 ++-- .../Utils/ResilienceStrategyPipeline.cs | 10 +++++----- .../Utils/TimeProviderExtensions.cs | 2 +- .../Telemetry/TelemetryResilienceStrategy.cs | 2 +- .../RateLimiterResilienceStrategy.cs | 2 +- .../ResilienceStrategyBuilderTests.cs | 4 ++-- .../Utils/ResilienceStrategyPipelineTests.cs | 4 ++-- .../PollyServiceCollectionExtensionTests.cs | 2 +- ...s.OnCircuitBreakWithServiceProvider_796.cs | 2 +- .../ReloadableResilienceStrategyTests.cs | 2 +- .../Polly.TestUtils/TestResilienceStrategy.cs | 2 +- .../ResilienceStrategyExtensionsTests.cs | 2 +- 23 files changed, 49 insertions(+), 45 deletions(-) diff --git a/bench/Polly.Core.Benchmarks/TelemetryBenchmark.cs b/bench/Polly.Core.Benchmarks/TelemetryBenchmark.cs index 244886c2e2c..cdd7ff0555f 100644 --- a/bench/Polly.Core.Benchmarks/TelemetryBenchmark.cs +++ b/bench/Polly.Core.Benchmarks/TelemetryBenchmark.cs @@ -73,7 +73,7 @@ private class TelemetryEventStrategy : ResilienceStrategy public TelemetryEventStrategy(ResilienceStrategyTelemetry telemetry) => _telemetry = telemetry; - protected override ValueTask> ExecuteCoreAsync( + protected override ValueTask> ExecuteCore( Func>> callback, ResilienceContext context, TState state) diff --git a/bench/Polly.Core.Benchmarks/Utils/EmptyResilienceStrategy.cs b/bench/Polly.Core.Benchmarks/Utils/EmptyResilienceStrategy.cs index 165ffd26bc8..69c4c9df0ad 100644 --- a/bench/Polly.Core.Benchmarks/Utils/EmptyResilienceStrategy.cs +++ b/bench/Polly.Core.Benchmarks/Utils/EmptyResilienceStrategy.cs @@ -2,7 +2,7 @@ namespace Polly.Core.Benchmarks.Utils; internal class EmptyResilienceStrategy : ResilienceStrategy { - protected override ValueTask> ExecuteCoreAsync( + protected override ValueTask> ExecuteCore( Func>> callback, ResilienceContext context, TState state) diff --git a/bench/Polly.Core.Benchmarks/Utils/Helper.CircuitBreaker.cs b/bench/Polly.Core.Benchmarks/Utils/Helper.CircuitBreaker.cs index 362f842e966..27edadbfdaa 100644 --- a/bench/Polly.Core.Benchmarks/Utils/Helper.CircuitBreaker.cs +++ b/bench/Polly.Core.Benchmarks/Utils/Helper.CircuitBreaker.cs @@ -66,7 +66,7 @@ public static object CreateCircuitBreaker(PollyVersion technology) private class OutcomeHandlingStrategy : ResilienceStrategy { - protected override async ValueTask> ExecuteCoreAsync( + protected override async ValueTask> ExecuteCore( Func>> callback, ResilienceContext context, TState state) diff --git a/src/Polly.Core/NullResilienceStrategy.cs b/src/Polly.Core/NullResilienceStrategy.cs index 0eeb6c9d5b6..66513428cd8 100644 --- a/src/Polly.Core/NullResilienceStrategy.cs +++ b/src/Polly.Core/NullResilienceStrategy.cs @@ -15,7 +15,7 @@ private NullResilienceStrategy() } /// - protected internal override ValueTask> ExecuteCoreAsync( + protected internal override ValueTask> ExecuteCore( Func>> callback, ResilienceContext context, TState state) diff --git a/src/Polly.Core/PublicAPI.Unshipped.txt b/src/Polly.Core/PublicAPI.Unshipped.txt index 60c134d212d..87c39641991 100644 --- a/src/Polly.Core/PublicAPI.Unshipped.txt +++ b/src/Polly.Core/PublicAPI.Unshipped.txt @@ -3,7 +3,7 @@ abstract Polly.Registry.ResilienceStrategyProvider.TryGetStrategy(TKey key abstract Polly.Registry.ResilienceStrategyProvider.TryGetStrategy(TKey key, out Polly.ResilienceStrategy? strategy) -> bool abstract Polly.ResilienceContextPool.Get(string? operationKey, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> Polly.ResilienceContext! abstract Polly.ResilienceContextPool.Return(Polly.ResilienceContext! context) -> void -abstract Polly.ResilienceStrategy.ExecuteCoreAsync(System.Func>>! callback, Polly.ResilienceContext! context, TState state) -> System.Threading.Tasks.ValueTask> +abstract Polly.ResilienceStrategy.ExecuteCore(System.Func>>! callback, Polly.ResilienceContext! context, TState state) -> System.Threading.Tasks.ValueTask> override Polly.Outcome.ToString() -> string! override Polly.Registry.ResilienceStrategyRegistry.TryGetStrategy(TKey key, out Polly.ResilienceStrategy? strategy) -> bool override Polly.Registry.ResilienceStrategyRegistry.TryGetStrategy(TKey key, out Polly.ResilienceStrategy? strategy) -> bool diff --git a/src/Polly.Core/README.md b/src/Polly.Core/README.md index 7aef68f3a3a..f5e8b0e9e6e 100644 --- a/src/Polly.Core/README.md +++ b/src/Polly.Core/README.md @@ -73,7 +73,7 @@ public void Execute(Action execute) try { - strategy.ExecuteCoreAsync(static (context, state) => + strategy.ExecuteAsync(static (context, state) => { state(); return new ValueTask>(new(VoidResult.Instance)); @@ -108,7 +108,7 @@ internal class DelayStrategy : ResilienceStrategy _timeProvider = timeProvider; } - protected override async ValueTask ExecuteCoreAsync( + protected override async ValueTask ExecuteCore( Func>> callback, ResilienceContext context, TState state) diff --git a/src/Polly.Core/ResilienceStrategy.Async.ValueTask.cs b/src/Polly.Core/ResilienceStrategy.Async.ValueTask.cs index d09f731de0f..e3d089ced95 100644 --- a/src/Polly.Core/ResilienceStrategy.Async.ValueTask.cs +++ b/src/Polly.Core/ResilienceStrategy.Async.ValueTask.cs @@ -24,7 +24,7 @@ public async ValueTask ExecuteAsync( InitializeAsyncContext(context); - var outcome = await ExecuteCoreAsync( + var outcome = await ExecuteCore( static async (context, state) => { try @@ -59,7 +59,7 @@ public async ValueTask ExecuteAsync( InitializeAsyncContext(context); - var outcome = await ExecuteCoreAsync( + var outcome = await ExecuteCore( static async (context, state) => { try @@ -98,7 +98,7 @@ public async ValueTask ExecuteAsync( try { - var outcome = await ExecuteCoreAsync( + var outcome = await ExecuteCore( static async (context, state) => { try @@ -139,7 +139,7 @@ public async ValueTask ExecuteAsync( try { - var outcome = await ExecuteCoreAsync( + var outcome = await ExecuteCore( static async (context, state) => { try diff --git a/src/Polly.Core/ResilienceStrategy.Async.ValueTaskT.cs b/src/Polly.Core/ResilienceStrategy.Async.ValueTaskT.cs index cc07f7392ac..1c18fa954d4 100644 --- a/src/Polly.Core/ResilienceStrategy.Async.ValueTaskT.cs +++ b/src/Polly.Core/ResilienceStrategy.Async.ValueTaskT.cs @@ -29,7 +29,7 @@ public ValueTask> ExecuteOutcomeAsync( InitializeAsyncContext(context); - return ExecuteCoreAsync(callback, context, state); + return ExecuteCore(callback, context, state); } /// @@ -52,7 +52,7 @@ public async ValueTask ExecuteAsync( InitializeAsyncContext(context); - var outcome = await ExecuteCoreAsync( + var outcome = await ExecuteCore( static async (context, state) => { try @@ -87,7 +87,7 @@ public async ValueTask ExecuteAsync( InitializeAsyncContext(context); - var outcome = await ExecuteCoreAsync( + var outcome = await ExecuteCore( static async (context, state) => { try @@ -126,7 +126,7 @@ public async ValueTask ExecuteAsync( try { - var outcome = await ExecuteCoreAsync( + var outcome = await ExecuteCore( static async (context, state) => { try @@ -167,7 +167,7 @@ public async ValueTask ExecuteAsync( try { - var outcome = await ExecuteCoreAsync( + var outcome = await ExecuteCore( static async (context, state) => { try diff --git a/src/Polly.Core/ResilienceStrategy.cs b/src/Polly.Core/ResilienceStrategy.cs index dda9e1fe016..81b033b7563 100644 --- a/src/Polly.Core/ResilienceStrategy.cs +++ b/src/Polly.Core/ResilienceStrategy.cs @@ -16,25 +16,29 @@ public abstract partial class ResilienceStrategy internal ResilienceStrategyOptions? Options { get; set; } /// - /// Executes the specified callback. + /// An implementation of resilience strategy that executes the specified . /// /// The type of result returned by the callback. /// The type of state associated with the callback. /// The user-provided callback. /// The context associated with the callback. /// The state associated with the callback. - /// An instance of that represents an asynchronous callback. + /// + /// An instance of pending for asynchronous executions or completed task for synchronous exexutions. + /// /// - /// This method is called by various methods exposed on . These methods make sure that - /// is properly initialized with details about the execution mode. + /// This method is called for both synchronous and asynchronous execution flows. /// - /// The provided callback never throws an exception. Instead, the exception is captured and converted to an . + /// You can use to dermine wheether the is synchronous or asynchronous one. + /// This is usefull when the custom strategy behaves differently in each execution flow. In general, for most strategies, the implementation + /// is the same for both execution flows. /// /// - /// Do not throw exceptions from your strategy implementation. Instead, return an exception instance as . + /// The provided callback never throws an exception. Instead, the exception is captured and converted to an . + /// Similarly, do not throw exceptions from your strategy implementation. Instead, return an exception instance as . /// /// - protected internal abstract ValueTask> ExecuteCoreAsync( + protected internal abstract ValueTask> ExecuteCore( Func>> callback, ResilienceContext context, TState state); @@ -44,7 +48,7 @@ private Outcome ExecuteCoreSync( ResilienceContext context, TState state) { - return ExecuteCoreAsync( + return ExecuteCore( static (context, state) => { var result = state.callback(context, state.state); diff --git a/src/Polly.Core/Timeout/TimeoutResilienceStrategy.cs b/src/Polly.Core/Timeout/TimeoutResilienceStrategy.cs index cfcf4e67327..c2ee7136fcb 100644 --- a/src/Polly.Core/Timeout/TimeoutResilienceStrategy.cs +++ b/src/Polly.Core/Timeout/TimeoutResilienceStrategy.cs @@ -22,7 +22,7 @@ public TimeoutResilienceStrategy(TimeoutStrategyOptions options, TimeProvider ti public Func? OnTimeout { get; } - protected internal override async ValueTask> ExecuteCoreAsync( + protected internal override async ValueTask> ExecuteCore( Func>> callback, ResilienceContext context, TState state) diff --git a/src/Polly.Core/Utils/OutcomeResilienceStrategy.cs b/src/Polly.Core/Utils/OutcomeResilienceStrategy.cs index 2112930bc47..0cbb86a1589 100644 --- a/src/Polly.Core/Utils/OutcomeResilienceStrategy.cs +++ b/src/Polly.Core/Utils/OutcomeResilienceStrategy.cs @@ -22,7 +22,7 @@ protected OutcomeResilienceStrategy(bool isGeneric) _isGeneric = isGeneric; } - protected internal sealed override ValueTask> ExecuteCoreAsync( + protected internal sealed override ValueTask> ExecuteCore( Func>> callback, ResilienceContext context, TState state) diff --git a/src/Polly.Core/Utils/ReloadableResilienceStrategy.cs b/src/Polly.Core/Utils/ReloadableResilienceStrategy.cs index db277fd5230..dc33a17766a 100644 --- a/src/Polly.Core/Utils/ReloadableResilienceStrategy.cs +++ b/src/Polly.Core/Utils/ReloadableResilienceStrategy.cs @@ -30,12 +30,12 @@ public ReloadableResilienceStrategy( public ResilienceStrategy Strategy { get; private set; } - protected internal override ValueTask> ExecuteCoreAsync( + protected internal override ValueTask> ExecuteCore( Func>> callback, ResilienceContext context, TState state) { - return Strategy.ExecuteCoreAsync(callback, context, state); + return Strategy.ExecuteCore(callback, context, state); } private void RegisterOnReload(CancellationToken previousToken) diff --git a/src/Polly.Core/Utils/ResilienceStrategyPipeline.cs b/src/Polly.Core/Utils/ResilienceStrategyPipeline.cs index 695dc9e6629..a1be3c81592 100644 --- a/src/Polly.Core/Utils/ResilienceStrategyPipeline.cs +++ b/src/Polly.Core/Utils/ResilienceStrategyPipeline.cs @@ -57,7 +57,7 @@ private ResilienceStrategyPipeline(ResilienceStrategy pipeline, IReadOnlyList Strategies { get; } - protected internal override ValueTask> ExecuteCoreAsync( + protected internal override ValueTask> ExecuteCore( Func>> callback, ResilienceContext context, TState state) { @@ -66,7 +66,7 @@ protected internal override ValueTask> ExecuteCoreAsync(new OperationCanceledException(context.CancellationToken).TrySetStackTrace()); } - return _pipeline.ExecuteCoreAsync(callback, context, state); + return _pipeline.ExecuteCore(callback, context, state); } /// @@ -80,12 +80,12 @@ private sealed class DelegatingResilienceStrategy : ResilienceStrategy public ResilienceStrategy? Next { get; set; } - protected internal override ValueTask> ExecuteCoreAsync( + protected internal override ValueTask> ExecuteCore( Func>> callback, ResilienceContext context, TState state) { - return _strategy.ExecuteCoreAsync( + return _strategy.ExecuteCore( static (context, state) => { if (context.CancellationToken.IsCancellationRequested) @@ -93,7 +93,7 @@ protected internal override ValueTask> ExecuteCoreAsync(new OperationCanceledException(context.CancellationToken).TrySetStackTrace()); } - return state.Next!.ExecuteCoreAsync(state.callback, context, state.state); + return state.Next!.ExecuteCore(state.callback, context, state.state); }, context, (Next, callback, state)); diff --git a/src/Polly.Core/Utils/TimeProviderExtensions.cs b/src/Polly.Core/Utils/TimeProviderExtensions.cs index 3f6e4c4eb55..d61a02c3edf 100644 --- a/src/Polly.Core/Utils/TimeProviderExtensions.cs +++ b/src/Polly.Core/Utils/TimeProviderExtensions.cs @@ -29,7 +29,7 @@ public static Task DelayAsync(this TimeProvider timeProvider, TimeSpan delay, Re // For synchronous scenarios we want to return a completed task. We avoid // the use of Thread.Sleep() here because it is not cancellable and to // simplify the code. Sync-over-async is not a concern here because it - // only applies in the case of a reilience event and not on the hot path. + // only applies in the case of a resilience event and not on the hot path. timeProvider.Delay(delay, context.CancellationToken).GetAwaiter().GetResult(); #pragma warning restore CA1849 diff --git a/src/Polly.Extensions/Telemetry/TelemetryResilienceStrategy.cs b/src/Polly.Extensions/Telemetry/TelemetryResilienceStrategy.cs index f871ca680c3..3cac7fc2bb8 100644 --- a/src/Polly.Extensions/Telemetry/TelemetryResilienceStrategy.cs +++ b/src/Polly.Extensions/Telemetry/TelemetryResilienceStrategy.cs @@ -45,7 +45,7 @@ public TelemetryResilienceStrategy( public Histogram ExecutionDuration { get; } - protected override async ValueTask> ExecuteCoreAsync( + protected override async ValueTask> ExecuteCore( Func>> callback, ResilienceContext context, TState state) diff --git a/src/Polly.RateLimiting/RateLimiterResilienceStrategy.cs b/src/Polly.RateLimiting/RateLimiterResilienceStrategy.cs index 2cbc0ba2a78..0508d2c9160 100644 --- a/src/Polly.RateLimiting/RateLimiterResilienceStrategy.cs +++ b/src/Polly.RateLimiting/RateLimiterResilienceStrategy.cs @@ -22,7 +22,7 @@ public RateLimiterResilienceStrategy( public Func? OnLeaseRejected { get; } - protected override async ValueTask> ExecuteCoreAsync( + protected override async ValueTask> ExecuteCore( Func>> callback, ResilienceContext context, TState state) diff --git a/test/Polly.Core.Tests/ResilienceStrategyBuilderTests.cs b/test/Polly.Core.Tests/ResilienceStrategyBuilderTests.cs index 636f7a011b6..dbb38338dfb 100644 --- a/test/Polly.Core.Tests/ResilienceStrategyBuilderTests.cs +++ b/test/Polly.Core.Tests/ResilienceStrategyBuilderTests.cs @@ -409,7 +409,7 @@ private class Strategy : ResilienceStrategy public Action? After { get; set; } - protected internal override async ValueTask> ExecuteCoreAsync( + protected internal override async ValueTask> ExecuteCore( Func>> callback, ResilienceContext context, TState state) @@ -432,7 +432,7 @@ private class ExecuteCallbackTwiceStrategy : ResilienceStrategy public Action? After { get; set; } - protected internal override async ValueTask> ExecuteCoreAsync( + protected internal override async ValueTask> ExecuteCore( Func>> callback, ResilienceContext context, TState state) diff --git a/test/Polly.Core.Tests/Utils/ResilienceStrategyPipelineTests.cs b/test/Polly.Core.Tests/Utils/ResilienceStrategyPipelineTests.cs index a6d504b5821..01ccadf21d1 100644 --- a/test/Polly.Core.Tests/Utils/ResilienceStrategyPipelineTests.cs +++ b/test/Polly.Core.Tests/Utils/ResilienceStrategyPipelineTests.cs @@ -48,7 +48,7 @@ public async Task CreatePipeline_EnsureExceptionsNotWrapped() var pipeline = ResilienceStrategyPipeline.CreatePipeline(strategies); await pipeline - .Invoking(p => p.ExecuteCoreAsync((_, _) => Outcome.FromResultAsTask(10), ResilienceContextPool.Shared.Get(), "state").AsTask()) + .Invoking(p => p.ExecuteCore((_, _) => Outcome.FromResultAsTask(10), ResilienceContextPool.Shared.Get(), "state").AsTask()) .Should() .ThrowAsync(); } @@ -113,7 +113,7 @@ public async Task CreatePipeline_CancelledLater_EnsureNoExecution() private class Strategy : ResilienceStrategy { - protected internal override async ValueTask> ExecuteCoreAsync( + protected internal override async ValueTask> ExecuteCore( Func>> callback, ResilienceContext context, TState state) diff --git a/test/Polly.Extensions.Tests/DependencyInjection/PollyServiceCollectionExtensionTests.cs b/test/Polly.Extensions.Tests/DependencyInjection/PollyServiceCollectionExtensionTests.cs index 454bbeb0b1c..8166eac0d1c 100644 --- a/test/Polly.Extensions.Tests/DependencyInjection/PollyServiceCollectionExtensionTests.cs +++ b/test/Polly.Extensions.Tests/DependencyInjection/PollyServiceCollectionExtensionTests.cs @@ -307,7 +307,7 @@ private ResilienceStrategyProvider CreateProvider() private class TestStrategy : ResilienceStrategy { - protected override ValueTask> ExecuteCoreAsync( + protected override ValueTask> ExecuteCore( Func>> callback, ResilienceContext context, TState state) => new(Outcome.FromException(new NotSupportedException())); diff --git a/test/Polly.Extensions.Tests/Issues/IssuesTests.OnCircuitBreakWithServiceProvider_796.cs b/test/Polly.Extensions.Tests/Issues/IssuesTests.OnCircuitBreakWithServiceProvider_796.cs index e28042fa50e..57cc47d92a1 100644 --- a/test/Polly.Extensions.Tests/Issues/IssuesTests.OnCircuitBreakWithServiceProvider_796.cs +++ b/test/Polly.Extensions.Tests/Issues/IssuesTests.OnCircuitBreakWithServiceProvider_796.cs @@ -60,7 +60,7 @@ private class ServiceProviderStrategy : ResilienceStrategy public ServiceProviderStrategy(IServiceProvider serviceProvider) => _serviceProvider = serviceProvider; - protected override ValueTask> ExecuteCoreAsync( + protected override ValueTask> ExecuteCore( Func>> callback, ResilienceContext context, TState state) diff --git a/test/Polly.Extensions.Tests/ReloadableResilienceStrategyTests.cs b/test/Polly.Extensions.Tests/ReloadableResilienceStrategyTests.cs index 56ebd93afe5..f1f456336d1 100644 --- a/test/Polly.Extensions.Tests/ReloadableResilienceStrategyTests.cs +++ b/test/Polly.Extensions.Tests/ReloadableResilienceStrategyTests.cs @@ -60,7 +60,7 @@ public class ReloadableStrategy : ResilienceStrategy public string Tag { get; } - protected override ValueTask> ExecuteCoreAsync( + protected override ValueTask> ExecuteCore( Func>> callback, ResilienceContext context, TState state) diff --git a/test/Polly.TestUtils/TestResilienceStrategy.cs b/test/Polly.TestUtils/TestResilienceStrategy.cs index 211a46dfdcb..56629a3d7a9 100644 --- a/test/Polly.TestUtils/TestResilienceStrategy.cs +++ b/test/Polly.TestUtils/TestResilienceStrategy.cs @@ -8,7 +8,7 @@ public class TestResilienceStrategy : ResilienceStrategy public Func? OnExecute { get; set; } - protected internal override async ValueTask> ExecuteCoreAsync( + protected internal override async ValueTask> ExecuteCore( Func>> callback, ResilienceContext context, TState state) diff --git a/test/Polly.Testing.Tests/ResilienceStrategyExtensionsTests.cs b/test/Polly.Testing.Tests/ResilienceStrategyExtensionsTests.cs index f4ba0477b70..c2729e90f02 100644 --- a/test/Polly.Testing.Tests/ResilienceStrategyExtensionsTests.cs +++ b/test/Polly.Testing.Tests/ResilienceStrategyExtensionsTests.cs @@ -96,7 +96,7 @@ public void GetInnerStrategies_Reloadable_Ok() private sealed class CustomStrategy : ResilienceStrategy { - protected override ValueTask> ExecuteCoreAsync(Func>> callback, ResilienceContext context, TState state) + protected override ValueTask> ExecuteCore(Func>> callback, ResilienceContext context, TState state) => throw new NotSupportedException(); } } From caf0b183edd3fffc1292e7b03d6aa5222d883f7d Mon Sep 17 00:00:00 2001 From: Martin Tomka Date: Mon, 24 Jul 2023 08:10:30 +0200 Subject: [PATCH 2/3] PR comments --- src/Polly.Core/ResilienceStrategy.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Polly.Core/ResilienceStrategy.cs b/src/Polly.Core/ResilienceStrategy.cs index 81b033b7563..7ce23cd0660 100644 --- a/src/Polly.Core/ResilienceStrategy.cs +++ b/src/Polly.Core/ResilienceStrategy.cs @@ -30,7 +30,7 @@ public abstract partial class ResilienceStrategy /// This method is called for both synchronous and asynchronous execution flows. /// /// You can use to dermine wheether the is synchronous or asynchronous one. - /// This is usefull when the custom strategy behaves differently in each execution flow. In general, for most strategies, the implementation + /// This is useful when the custom strategy behaves differently in each execution flow. In general, for most strategies, the implementation /// is the same for both execution flows. /// /// From 6585540c679c822caa7ffd5795fb9767c1c57892 Mon Sep 17 00:00:00 2001 From: Martin Tomka Date: Mon, 24 Jul 2023 08:14:48 +0200 Subject: [PATCH 3/3] use strong for highlitght --- src/Polly.Core/ResilienceStrategy.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Polly.Core/ResilienceStrategy.cs b/src/Polly.Core/ResilienceStrategy.cs index 7ce23cd0660..4157a871acf 100644 --- a/src/Polly.Core/ResilienceStrategy.cs +++ b/src/Polly.Core/ResilienceStrategy.cs @@ -27,7 +27,7 @@ public abstract partial class ResilienceStrategy /// An instance of pending for asynchronous executions or completed task for synchronous exexutions. /// /// - /// This method is called for both synchronous and asynchronous execution flows. + /// This method is called for both synchronous and asynchronous execution flows. /// /// You can use to dermine wheether the is synchronous or asynchronous one. /// This is useful when the custom strategy behaves differently in each execution flow. In general, for most strategies, the implementation