diff --git a/src/Polly.Core/ResilienceStrategy.cs b/src/Polly.Core/ResilienceStrategy.cs index 4157a871acf..7aa1635271d 100644 --- a/src/Polly.Core/ResilienceStrategy.cs +++ b/src/Polly.Core/ResilienceStrategy.cs @@ -24,14 +24,15 @@ public abstract partial class ResilienceStrategy /// The context associated with the callback. /// The state associated with the callback. /// - /// An instance of pending for asynchronous executions or completed task for synchronous exexutions. + /// An instance of pending for asynchronous executions or completed task for synchronous executions. /// /// /// This method is called for both synchronous and asynchronous execution flows. /// - /// You can use to dermine wheether the is synchronous or asynchronous one. + /// You can use to determine whether 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 /// is the same for both execution flows. + /// See for more details. /// /// /// The provided callback never throws an exception. Instead, the exception is captured and converted to an . diff --git a/src/Polly.Core/ResilienceStrategyT.Async.cs b/src/Polly.Core/ResilienceStrategyT.Async.cs index 270e145ddab..3388b82f4c4 100644 --- a/src/Polly.Core/ResilienceStrategyT.Async.cs +++ b/src/Polly.Core/ResilienceStrategyT.Async.cs @@ -79,6 +79,7 @@ public ValueTask ExecuteAsync( public ValueTask ExecuteAsync( Func> callback, CancellationToken cancellationToken = default) + where TResult : T { Guard.NotNull(callback);