diff --git a/src/Polly.Core/ResiliencePipelineBuilderExtensions.cs b/src/Polly.Core/ResiliencePipelineBuilderExtensions.cs index 14f2adfa92c..7b450ccabb9 100644 --- a/src/Polly.Core/ResiliencePipelineBuilderExtensions.cs +++ b/src/Polly.Core/ResiliencePipelineBuilderExtensions.cs @@ -16,7 +16,7 @@ public static class ResiliencePipelineBuilderExtensions /// The builder instance. /// The pipeline instance. /// The same builder instance. - /// Thrown when is null. + /// Thrown when is . /// Thrown when this builder was already used to create a pipeline. The builder cannot be modified after it has been used. [UnconditionalSuppressMessage( "Trimming", @@ -39,7 +39,7 @@ public static TBuilder AddPipeline(this TBuilder builder, ResiliencePi /// The builder instance. /// The pipeline instance. /// The same builder instance. - /// Thrown when is null. + /// Thrown when is . /// Thrown when this builder was already used to create a strategy. The builder cannot be modified after it has been used. [UnconditionalSuppressMessage( "Trimming", diff --git a/src/Polly/AsyncPolicy.ExecuteOverloads.cs b/src/Polly/AsyncPolicy.ExecuteOverloads.cs index 2040b08e4b7..2bb15cd021a 100644 --- a/src/Polly/AsyncPolicy.ExecuteOverloads.cs +++ b/src/Polly/AsyncPolicy.ExecuteOverloads.cs @@ -77,7 +77,7 @@ public Task ExecuteAsync(Func action, CancellationToken /// Arbitrary data that is passed to the exception policy. /// A cancellation token which can be used to cancel the action. When a retry policy in use, also cancels any further retries. /// Whether to continue on a captured synchronization context. - /// contextData + /// Thrown when is . [DebuggerStepThrough] public Task ExecuteAsync(Func action, IDictionary contextData, CancellationToken cancellationToken, bool continueOnCapturedContext) => ExecuteAsync(action, new Context(contextData), cancellationToken, continueOnCapturedContext); @@ -115,7 +115,7 @@ public async Task ExecuteAsync(Func action, Co /// /// The type of the result. /// The action to perform. - /// The value returned by the action + /// The value returned by the action. [DebuggerStepThrough] public Task ExecuteAsync(Func> action) => ExecuteAsync((_, _) => action(), [], DefaultCancellationToken, DefaultContinueOnCapturedContext); @@ -125,7 +125,7 @@ public Task ExecuteAsync(Func> action) => /// /// The action to perform. /// Arbitrary data that is passed to the exception policy. - /// The value returned by the action + /// The value returned by the action. [DebuggerStepThrough] public Task ExecuteAsync(Func> action, IDictionary contextData) => ExecuteAsync((ctx, _) => action(ctx), new Context(contextData), DefaultCancellationToken, DefaultContinueOnCapturedContext); @@ -136,7 +136,7 @@ public Task ExecuteAsync(Func> action, /// The type of the result. /// The action to perform. /// Context data that is passed to the exception policy. - /// The value returned by the action + /// The value returned by the action. [DebuggerStepThrough] public Task ExecuteAsync(Func> action, Context context) => ExecuteAsync((ctx, _) => action(ctx), context, DefaultCancellationToken, DefaultContinueOnCapturedContext); @@ -147,7 +147,7 @@ public Task ExecuteAsync(Func> action, /// The type of the result. /// The action to perform. /// A cancellation token which can be used to cancel the action. When a retry policy is in use, also cancels any further retries. - /// The value returned by the action + /// The value returned by the action. [DebuggerStepThrough] public Task ExecuteAsync(Func> action, CancellationToken cancellationToken) => ExecuteAsync((_, ct) => action(ct), [], cancellationToken, DefaultContinueOnCapturedContext); @@ -158,7 +158,7 @@ public Task ExecuteAsync(Func /// The action to perform. /// Arbitrary data that is passed to the exception policy. /// A cancellation token which can be used to cancel the action. When a retry policy in use, also cancels any further retries. - /// The value returned by the action + /// The value returned by the action. [DebuggerStepThrough] public Task ExecuteAsync(Func> action, IDictionary contextData, CancellationToken cancellationToken) => ExecuteAsync(action, new Context(contextData), cancellationToken, DefaultContinueOnCapturedContext); @@ -170,7 +170,7 @@ public Task ExecuteAsync(FuncThe action to perform. /// Context data that is passed to the exception policy. /// A cancellation token which can be used to cancel the action. When a retry policy is in use, also cancels any further retries. - /// The value returned by the action + /// The value returned by the action. [DebuggerStepThrough] public Task ExecuteAsync(Func> action, Context context, CancellationToken cancellationToken) => ExecuteAsync(action, context, cancellationToken, DefaultContinueOnCapturedContext); @@ -182,7 +182,7 @@ public Task ExecuteAsync(FuncThe action to perform. /// Whether to continue on a captured synchronization context. /// A cancellation token which can be used to cancel the action. When a retry policy is in use, also cancels any further retries. - /// The value returned by the action + /// The value returned by the action. /// Please use asynchronous-defined policies when calling asynchronous ExecuteAsync (and similar) methods. [DebuggerStepThrough] public Task ExecuteAsync(Func> action, CancellationToken cancellationToken, bool continueOnCapturedContext) => @@ -195,8 +195,8 @@ public Task ExecuteAsync(Func /// Arbitrary data that is passed to the exception policy. /// A cancellation token which can be used to cancel the action. When a retry policy in use, also cancels any further retries. /// Whether to continue on a captured synchronization context. - /// The value returned by the action - /// contextData + /// The value returned by the action. + /// Thrown when is . [DebuggerStepThrough] public Task ExecuteAsync(Func> action, IDictionary contextData, CancellationToken cancellationToken, bool continueOnCapturedContext) => ExecuteAsync(action, new Context(contextData), cancellationToken, continueOnCapturedContext); @@ -209,7 +209,7 @@ public Task ExecuteAsync(FuncContext data that is passed to the exception policy. /// Whether to continue on a captured synchronization context. /// A cancellation token which can be used to cancel the action. When a retry policy is in use, also cancels any further retries. - /// The value returned by the action + /// The value returned by the action. /// Please use asynchronous-defined policies when calling asynchronous ExecuteAsync (and similar) methods. [DebuggerStepThrough] public async Task ExecuteAsync(Func> action, Context context, CancellationToken cancellationToken, bool continueOnCapturedContext) @@ -239,7 +239,7 @@ public async Task ExecuteAsync(Func /// The action to perform. - /// The captured result + /// The captured result. [DebuggerStepThrough] public Task ExecuteAndCaptureAsync(Func action) => ExecuteAndCaptureAsync((_, _) => action(), [], DefaultCancellationToken, DefaultContinueOnCapturedContext); @@ -249,8 +249,8 @@ public Task ExecuteAndCaptureAsync(Func action) => /// /// The action to perform. /// Arbitrary data that is passed to the exception policy. - /// contextData - /// The captured result + /// The captured result. + /// Thrown when is . [DebuggerStepThrough] public Task ExecuteAndCaptureAsync(Func action, IDictionary contextData) => ExecuteAndCaptureAsync((ctx, _) => action(ctx), new Context(contextData), DefaultCancellationToken, DefaultContinueOnCapturedContext); @@ -260,7 +260,7 @@ public Task ExecuteAndCaptureAsync(Func action, IDi /// /// The action to perform. /// Context data that is passed to the exception policy. - /// The captured result + /// The captured result. [DebuggerStepThrough] public Task ExecuteAndCaptureAsync(Func action, Context context) => ExecuteAndCaptureAsync((ctx, _) => action(ctx), context, DefaultCancellationToken, DefaultContinueOnCapturedContext); @@ -280,8 +280,8 @@ public Task ExecuteAndCaptureAsync(Func a /// The action to perform. /// Arbitrary data that is passed to the exception policy. /// A cancellation token which can be used to cancel the action. When a retry policy in use, also cancels any further retries. - /// contextData - /// The captured result + /// The captured result. + /// Thrown when is . [DebuggerStepThrough] public Task ExecuteAndCaptureAsync(Func action, IDictionary contextData, CancellationToken cancellationToken) => ExecuteAndCaptureAsync(action, new Context(contextData), cancellationToken, DefaultContinueOnCapturedContext); @@ -314,8 +314,8 @@ public Task ExecuteAndCaptureAsync(Func a /// Arbitrary data that is passed to the exception policy. /// A cancellation token which can be used to cancel the action. When a retry policy in use, also cancels any further retries. /// Whether to continue on a captured synchronization context. - /// contextData - /// The captured result + /// The captured result. + /// Thrown when is . [DebuggerStepThrough] public Task ExecuteAndCaptureAsync(Func action, IDictionary contextData, CancellationToken cancellationToken, bool continueOnCapturedContext) => ExecuteAndCaptureAsync(action, new Context(contextData), cancellationToken, continueOnCapturedContext); @@ -352,7 +352,7 @@ public async Task ExecuteAndCaptureAsync(Func /// The type of the result. /// The action to perform. - /// The captured result + /// The captured result. [DebuggerStepThrough] public Task> ExecuteAndCaptureAsync(Func> action) => ExecuteAndCaptureAsync((_, _) => action(), [], DefaultCancellationToken, DefaultContinueOnCapturedContext); @@ -363,8 +363,8 @@ public Task> ExecuteAndCaptureAsync(FuncThe type of the result. /// The action to perform. /// Arbitrary data that is passed to the exception policy. - /// contextData - /// The captured result + /// The captured result. + /// Thrown when is . [DebuggerStepThrough] public Task> ExecuteAndCaptureAsync(Func> action, IDictionary contextData) => ExecuteAndCaptureAsync((ctx, _) => action(ctx), new Context(contextData), DefaultCancellationToken, DefaultContinueOnCapturedContext); @@ -375,7 +375,7 @@ public Task> ExecuteAndCaptureAsync(FuncThe type of the result. /// The action to perform. /// Context data that is passed to the exception policy. - /// The captured result + /// The captured result. [DebuggerStepThrough] public Task> ExecuteAndCaptureAsync(Func> action, Context context) => ExecuteAndCaptureAsync((ctx, _) => action(ctx), context, DefaultCancellationToken, DefaultContinueOnCapturedContext); @@ -386,7 +386,7 @@ public Task> ExecuteAndCaptureAsync(FuncThe type of the result. /// The action to perform. /// A cancellation token which can be used to cancel the action. When a retry policy in use, also cancels any further retries. - /// The captured result + /// The captured result. [DebuggerStepThrough] public Task> ExecuteAndCaptureAsync(Func> action, CancellationToken cancellationToken) => ExecuteAndCaptureAsync((_, ct) => action(ct), [], cancellationToken, DefaultContinueOnCapturedContext); @@ -398,8 +398,8 @@ public Task> ExecuteAndCaptureAsync(FuncThe action to perform. /// Arbitrary data that is passed to the exception policy. /// A cancellation token which can be used to cancel the action. When a retry policy in use, also cancels any further retries. - /// contextData - /// The captured result + /// The captured result. + /// Thrown when is . [DebuggerStepThrough] public Task> ExecuteAndCaptureAsync(Func> action, IDictionary contextData, CancellationToken cancellationToken) => ExecuteAndCaptureAsync(action, new Context(contextData), cancellationToken, DefaultContinueOnCapturedContext); @@ -409,9 +409,9 @@ public Task> ExecuteAndCaptureAsync(Func /// The type of the result. /// The action to perform. - /// A cancellation token which can be used to cancel the action. When a retry policy in use, also cancels any further retries. + /// Context data that is passed to the exception policy. /// A cancellation token which can be used to cancel the action. When a retry policy in use, also cancels any further retries. - /// The captured result + /// The captured result. [DebuggerStepThrough] public Task> ExecuteAndCaptureAsync(Func> action, Context context, CancellationToken cancellationToken) => ExecuteAndCaptureAsync(action, context, cancellationToken, DefaultContinueOnCapturedContext); @@ -423,7 +423,7 @@ public Task> ExecuteAndCaptureAsync(FuncThe action to perform. /// A cancellation token which can be used to cancel the action. When a retry policy in use, also cancels any further retries. /// Whether to continue on a captured synchronization context. - /// The captured result + /// The captured result. /// Please use asynchronous-defined policies when calling asynchronous ExecuteAsync (and similar) methods. [DebuggerStepThrough] public Task> ExecuteAndCaptureAsync(Func> action, CancellationToken cancellationToken, bool continueOnCapturedContext) => @@ -437,8 +437,8 @@ public Task> ExecuteAndCaptureAsync(FuncArbitrary data that is passed to the exception policy. /// Whether to continue on a captured synchronization context. /// A cancellation token which can be used to cancel the action. When a retry policy in use, also cancels any further retries. - /// The captured result - /// contextData + /// The captured result. + /// Thrown when is . [DebuggerStepThrough] public Task> ExecuteAndCaptureAsync(Func> action, IDictionary contextData, CancellationToken cancellationToken, bool continueOnCapturedContext) => ExecuteAndCaptureAsync(action, new Context(contextData), cancellationToken, continueOnCapturedContext); @@ -451,7 +451,7 @@ public Task> ExecuteAndCaptureAsync(FuncContext data that is passed to the exception policy. /// A cancellation token which can be used to cancel the action. When a retry policy in use, also cancels any further retries. /// Whether to continue on a captured synchronization context. - /// The captured result + /// The captured result. /// Please use asynchronous-defined policies when calling asynchronous ExecuteAsync (and similar) methods. [DebuggerStepThrough] public async Task> ExecuteAndCaptureAsync(Func> action, Context context, CancellationToken cancellationToken, bool continueOnCapturedContext) diff --git a/src/Polly/AsyncPolicy.TResult.ExecuteOverloads.cs b/src/Polly/AsyncPolicy.TResult.ExecuteOverloads.cs index fedc85c45a4..8941c58fa76 100644 --- a/src/Polly/AsyncPolicy.TResult.ExecuteOverloads.cs +++ b/src/Polly/AsyncPolicy.TResult.ExecuteOverloads.cs @@ -8,7 +8,7 @@ public abstract partial class AsyncPolicy : IAsyncPolicy /// Executes the specified asynchronous action within the policy and returns the result. /// /// The action to perform. - /// The value returned by the action + /// The value returned by the action. [DebuggerStepThrough] public Task ExecuteAsync(Func> action) => ExecuteAsync((_, _) => action(), [], CancellationToken.None, DefaultContinueOnCapturedContext); @@ -18,7 +18,7 @@ public Task ExecuteAsync(Func> action) => /// /// The action to perform. /// Arbitrary data that is passed to the exception policy. - /// The value returned by the action + /// The value returned by the action. [DebuggerStepThrough] public Task ExecuteAsync(Func> action, IDictionary contextData) => ExecuteAsync((ctx, _) => action(ctx), new Context(contextData), CancellationToken.None, DefaultContinueOnCapturedContext); @@ -28,7 +28,7 @@ public Task ExecuteAsync(Func> action, IDictiona /// /// The action to perform. /// Context data that is passed to the exception policy. - /// The value returned by the action + /// The value returned by the action. [DebuggerStepThrough] public Task ExecuteAsync(Func> action, Context context) => ExecuteAsync((ctx, _) => action(ctx), context, CancellationToken.None, DefaultContinueOnCapturedContext); @@ -38,7 +38,7 @@ public Task ExecuteAsync(Func> action, Context c /// /// The action to perform. /// A cancellation token which can be used to cancel the action. When a retry policy is in use, also cancels any further retries. - /// The value returned by the action + /// The value returned by the action. [DebuggerStepThrough] public Task ExecuteAsync(Func> action, CancellationToken cancellationToken) => ExecuteAsync((_, ct) => action(ct), [], cancellationToken, DefaultContinueOnCapturedContext); @@ -49,7 +49,7 @@ public Task ExecuteAsync(Func> action, /// The action to perform. /// Whether to continue on a captured synchronization context. /// A cancellation token which can be used to cancel the action. When a retry policy is in use, also cancels any further retries. - /// The value returned by the action + /// The value returned by the action. /// Please use asynchronous-defined policies when calling asynchronous ExecuteAsync (and similar) methods. [DebuggerStepThrough] public Task ExecuteAsync(Func> action, CancellationToken cancellationToken, bool continueOnCapturedContext) => @@ -61,7 +61,7 @@ public Task ExecuteAsync(Func> action, /// The action to perform. /// Arbitrary data that is passed to the exception policy. /// A cancellation token which can be used to cancel the action. When a retry policy in use, also cancels any further retries. - /// The value returned by the action + /// The value returned by the action. [DebuggerStepThrough] public Task ExecuteAsync(Func> action, IDictionary contextData, CancellationToken cancellationToken) => ExecuteAsync(action, new Context(contextData), cancellationToken, DefaultContinueOnCapturedContext); @@ -72,7 +72,7 @@ public Task ExecuteAsync(Func /// The action to perform. /// Context data that is passed to the exception policy. /// A cancellation token which can be used to cancel the action. When a retry policy is in use, also cancels any further retries. - /// The value returned by the action + /// The value returned by the action. [DebuggerStepThrough] public Task ExecuteAsync(Func> action, Context context, CancellationToken cancellationToken) => ExecuteAsync(action, context, cancellationToken, DefaultContinueOnCapturedContext); @@ -84,8 +84,8 @@ public Task ExecuteAsync(Func /// Arbitrary data that is passed to the exception policy. /// A cancellation token which can be used to cancel the action. When a retry policy in use, also cancels any further retries. /// Whether to continue on a captured synchronization context. - /// The value returned by the action - /// contextData + /// The value returned by the action. + /// Thrown when is . [DebuggerStepThrough] public Task ExecuteAsync(Func> action, IDictionary contextData, CancellationToken cancellationToken, bool continueOnCapturedContext) => ExecuteAsync(action, new Context(contextData), cancellationToken, continueOnCapturedContext); @@ -97,7 +97,7 @@ public Task ExecuteAsync(Func /// Context data that is passed to the exception policy. /// Whether to continue on a captured synchronization context. /// A cancellation token which can be used to cancel the action. When a retry policy is in use, also cancels any further retries. - /// The value returned by the action + /// The value returned by the action. /// Please use asynchronous-defined policies when calling asynchronous ExecuteAsync (and similar) methods. [DebuggerStepThrough] public async Task ExecuteAsync(Func> action, Context context, CancellationToken cancellationToken, bool continueOnCapturedContext) @@ -125,7 +125,7 @@ public async Task ExecuteAsync(Func /// The action to perform. - /// The captured result + /// The captured result. [DebuggerStepThrough] public Task> ExecuteAndCaptureAsync(Func> action) => ExecuteAndCaptureAsync((_, _) => action(), [], CancellationToken.None, DefaultContinueOnCapturedContext); @@ -135,8 +135,8 @@ public Task> ExecuteAndCaptureAsync(Func> ac /// /// The action to perform. /// Arbitrary data that is passed to the exception policy. - /// contextData - /// The captured result + /// The captured result. + /// Thrown when is . [DebuggerStepThrough] public Task> ExecuteAndCaptureAsync(Func> action, IDictionary contextData) => ExecuteAndCaptureAsync((ctx, _) => action(ctx), new Context(contextData), CancellationToken.None, DefaultContinueOnCapturedContext); @@ -146,7 +146,7 @@ public Task> ExecuteAndCaptureAsync(Func /// The action to perform. /// Context data that is passed to the exception policy. - /// The captured result + /// The captured result. [DebuggerStepThrough] public Task> ExecuteAndCaptureAsync(Func> action, Context context) => ExecuteAndCaptureAsync((ctx, _) => action(ctx), context, CancellationToken.None, DefaultContinueOnCapturedContext); @@ -156,7 +156,7 @@ public Task> ExecuteAndCaptureAsync(Func /// The action to perform. /// A cancellation token which can be used to cancel the action. When a retry policy in use, also cancels any further retries. - /// The captured result + /// The captured result. [DebuggerStepThrough] public Task> ExecuteAndCaptureAsync(Func> action, CancellationToken cancellationToken) => ExecuteAndCaptureAsync((_, ct) => action(ct), [], cancellationToken, DefaultContinueOnCapturedContext); @@ -167,7 +167,7 @@ public Task> ExecuteAndCaptureAsync(FuncThe action to perform. /// Whether to continue on a captured synchronization context. /// A cancellation token which can be used to cancel the action. When a retry policy in use, also cancels any further retries. - /// The captured result + /// The captured result. /// Please use asynchronous-defined policies when calling asynchronous ExecuteAsync (and similar) methods. [DebuggerStepThrough] public Task> ExecuteAndCaptureAsync(Func> action, CancellationToken cancellationToken, bool continueOnCapturedContext) => @@ -179,8 +179,8 @@ public Task> ExecuteAndCaptureAsync(FuncThe action to perform. /// Arbitrary data that is passed to the exception policy. /// A cancellation token which can be used to cancel the action. When a retry policy in use, also cancels any further retries. - /// contextData - /// The captured result + /// The captured result. + /// Thrown when is . [DebuggerStepThrough] public Task> ExecuteAndCaptureAsync(Func> action, IDictionary contextData, CancellationToken cancellationToken) => ExecuteAndCaptureAsync(action, new Context(contextData), cancellationToken, DefaultContinueOnCapturedContext); @@ -191,7 +191,7 @@ public Task> ExecuteAndCaptureAsync(FuncThe action to perform. /// Context data that is passed to the exception policy. /// A cancellation token which can be used to cancel the action. When a retry policy in use, also cancels any further retries. - /// The captured result + /// The captured result. [DebuggerStepThrough] public Task> ExecuteAndCaptureAsync(Func> action, Context context, CancellationToken cancellationToken) => ExecuteAndCaptureAsync(action, context, cancellationToken, DefaultContinueOnCapturedContext); @@ -203,8 +203,8 @@ public Task> ExecuteAndCaptureAsync(FuncArbitrary data that is passed to the exception policy. /// Whether to continue on a captured synchronization context. /// A cancellation token which can be used to cancel the action. When a retry policy in use, also cancels any further retries. - /// The captured result - /// contextData + /// The captured result. + /// Thrown when is . [DebuggerStepThrough] public Task> ExecuteAndCaptureAsync(Func> action, IDictionary contextData, CancellationToken cancellationToken, bool continueOnCapturedContext) => ExecuteAndCaptureAsync(action, new Context(contextData), cancellationToken, continueOnCapturedContext); @@ -216,7 +216,7 @@ public Task> ExecuteAndCaptureAsync(FuncContext data that is passed to the exception policy. /// Whether to continue on a captured synchronization context. /// A cancellation token which can be used to cancel the action. When a retry policy in use, also cancels any further retries. - /// The captured result + /// The captured result. /// Please use asynchronous-defined policies when calling asynchronous ExecuteAsync (and similar) methods. [DebuggerStepThrough] public async Task> ExecuteAndCaptureAsync(Func> action, Context context, CancellationToken cancellationToken, bool continueOnCapturedContext) diff --git a/src/Polly/AsyncPolicy.TResult.cs b/src/Polly/AsyncPolicy.TResult.cs index e6c8898a168..74796e79f08 100644 --- a/src/Polly/AsyncPolicy.TResult.cs +++ b/src/Polly/AsyncPolicy.TResult.cs @@ -2,7 +2,7 @@ namespace Polly; /// -/// Transient exception handling policies that can be applied to asynchronous delegates +/// Transient exception handling policies that can be applied to asynchronous delegates. /// /// The return type of delegates which may be executed through the policy. public abstract partial class AsyncPolicy : PolicyBase diff --git a/src/Polly/AsyncPolicy.cs b/src/Polly/AsyncPolicy.cs index e2a37c717c3..46fbd60f15d 100644 --- a/src/Polly/AsyncPolicy.cs +++ b/src/Polly/AsyncPolicy.cs @@ -2,7 +2,7 @@ namespace Polly; /// -/// Transient exception handling policies that can be applied to asynchronous delegates +/// Transient exception handling policies that can be applied to asynchronous delegates. /// public abstract partial class AsyncPolicy { diff --git a/src/Polly/Bulkhead/AsyncBulkheadSyntax.cs b/src/Polly/Bulkhead/AsyncBulkheadSyntax.cs index 9e01a11930b..80cfc1459a9 100644 --- a/src/Polly/Bulkhead/AsyncBulkheadSyntax.cs +++ b/src/Polly/Bulkhead/AsyncBulkheadSyntax.cs @@ -23,7 +23,7 @@ public static AsyncBulkheadPolicy BulkheadAsync(int maxParallelization) /// An action to call asynchronously, if the bulkhead rejects execution due to oversubscription. /// The policy instance. /// maxParallelization;Value must be greater than zero. - /// onBulkheadRejectedAsync + /// Thrown when is . /// The policy instance. public static AsyncBulkheadPolicy BulkheadAsync(int maxParallelization, Func onBulkheadRejectedAsync) => BulkheadAsync(maxParallelization, 0, onBulkheadRejectedAsync); @@ -53,7 +53,7 @@ public static AsyncBulkheadPolicy BulkheadAsync(int maxParallelization, int maxQ /// The policy instance. /// maxParallelization;Value must be greater than zero. /// maxQueuingActions;Value must be greater than or equal to zero. - /// onBulkheadRejectedAsync + /// Thrown when is . public static AsyncBulkheadPolicy BulkheadAsync( int maxParallelization, int maxQueuingActions, diff --git a/src/Polly/Bulkhead/AsyncBulkheadTResultSyntax.cs b/src/Polly/Bulkhead/AsyncBulkheadTResultSyntax.cs index 77990236f53..721cb65923d 100644 --- a/src/Polly/Bulkhead/AsyncBulkheadTResultSyntax.cs +++ b/src/Polly/Bulkhead/AsyncBulkheadTResultSyntax.cs @@ -22,7 +22,7 @@ public static AsyncBulkheadPolicy BulkheadAsync(int maxParalle /// The maximum number of concurrent actions that may be executing through the policy. /// An action to call asynchronously, if the bulkhead rejects execution due to oversubscription. /// maxParallelization;Value must be greater than zero. - /// onBulkheadRejectedAsync + /// Thrown when is . /// The policy instance. public static AsyncBulkheadPolicy BulkheadAsync(int maxParallelization, Func onBulkheadRejectedAsync) => BulkheadAsync(maxParallelization, 0, onBulkheadRejectedAsync); @@ -36,7 +36,7 @@ public static AsyncBulkheadPolicy BulkheadAsync(int maxParalle /// The policy instance. /// maxParallelization;Value must be greater than zero. /// maxQueuingActions;Value must be greater than or equal to zero. - /// onBulkheadRejectedAsync + /// Thrown when is . public static AsyncBulkheadPolicy BulkheadAsync(int maxParallelization, int maxQueuingActions) { Func doNothingAsync = _ => TaskHelper.EmptyTask; @@ -53,7 +53,7 @@ public static AsyncBulkheadPolicy BulkheadAsync(int maxParalle /// The policy instance. /// maxParallelization;Value must be greater than zero. /// maxQueuingActions;Value must be greater than or equal to zero. - /// onBulkheadRejectedAsync + /// Thrown when is . public static AsyncBulkheadPolicy BulkheadAsync(int maxParallelization, int maxQueuingActions, Func onBulkheadRejectedAsync) { if (maxParallelization <= 0) diff --git a/src/Polly/Bulkhead/BulkheadSyntax.cs b/src/Polly/Bulkhead/BulkheadSyntax.cs index 2b15e6c757b..c841d9d8ba4 100644 --- a/src/Polly/Bulkhead/BulkheadSyntax.cs +++ b/src/Polly/Bulkhead/BulkheadSyntax.cs @@ -23,7 +23,7 @@ public static BulkheadPolicy Bulkhead(int maxParallelization) /// The maximum number of concurrent actions that may be executing through the policy. /// An action to call, if the bulkhead rejects execution due to oversubscription. /// maxParallelization;Value must be greater than zero. - /// onBulkheadRejected + /// Thrown when is . /// The policy instance. public static BulkheadPolicy Bulkhead(int maxParallelization, Action onBulkheadRejected) => Bulkhead(maxParallelization, 0, onBulkheadRejected); @@ -53,7 +53,7 @@ public static BulkheadPolicy Bulkhead(int maxParallelization, int maxQueuingActi /// The policy instance. /// maxParallelization;Value must be greater than zero. /// maxParallelization;Value must be greater than zero. - /// onBulkheadRejected + /// Thrown when is . public static BulkheadPolicy Bulkhead(int maxParallelization, int maxQueuingActions, Action onBulkheadRejected) { if (maxParallelization <= 0) diff --git a/src/Polly/Bulkhead/BulkheadTResultSyntax.cs b/src/Polly/Bulkhead/BulkheadTResultSyntax.cs index 55445998e36..d5918091faf 100644 --- a/src/Polly/Bulkhead/BulkheadTResultSyntax.cs +++ b/src/Polly/Bulkhead/BulkheadTResultSyntax.cs @@ -23,7 +23,7 @@ public static BulkheadPolicy Bulkhead(int maxParallelization) /// The maximum number of concurrent actions that may be executing through the policy. /// An action to call, if the bulkhead rejects execution due to oversubscription. /// maxParallelization;Value must be greater than zero. - /// onBulkheadRejected + /// Thrown when is . /// The policy instance. public static BulkheadPolicy Bulkhead(int maxParallelization, Action onBulkheadRejected) => Bulkhead(maxParallelization, 0, onBulkheadRejected); @@ -53,7 +53,7 @@ public static BulkheadPolicy Bulkhead(int maxParallelization, /// The policy instance. /// maxParallelization;Value must be greater than zero. /// maxQueuingActions;Value must be greater than or equal to zero. - /// onBulkheadRejected + /// Thrown when is . public static BulkheadPolicy Bulkhead(int maxParallelization, int maxQueuingActions, Action onBulkheadRejected) { if (maxParallelization <= 0) diff --git a/src/Polly/Caching/AsyncCacheSyntax.cs b/src/Polly/Caching/AsyncCacheSyntax.cs index b7a5702d117..3467f22d1ef 100644 --- a/src/Polly/Caching/AsyncCacheSyntax.cs +++ b/src/Polly/Caching/AsyncCacheSyntax.cs @@ -13,7 +13,7 @@ public partial class Policy /// Duration (ttl) for which to cache values. /// Delegate to call if an exception is thrown when attempting to get a value from or put a value into the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider + /// Thrown when is . public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider cacheProvider, TimeSpan ttl, Action? onCacheError = null) => CacheAsync(cacheProvider, new RelativeTtl(ttl), DefaultCacheKeyStrategy.Instance.GetCacheKey, onCacheError); @@ -27,8 +27,8 @@ public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider cacheProvider, Tim /// A strategy for specifying ttl for values to be cached. /// Delegate to call if an exception is thrown when attempting to get a value from or put a value into the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy + /// Thrown when is . + /// Thrown when is . public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, Action? onCacheError = null) => CacheAsync(cacheProvider, ttlStrategy, DefaultCacheKeyStrategy.Instance.GetCacheKey, onCacheError); @@ -43,8 +43,8 @@ public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider cacheProvider, ITt /// The cache key strategy. /// Delegate to call if an exception is thrown when attempting to get a value from or put a value into the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// cacheKeyStrategy + /// Thrown when is . + /// Thrown when is . public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider cacheProvider, TimeSpan ttl, ICacheKeyStrategy cacheKeyStrategy, Action? onCacheError = null) => CacheAsync(cacheProvider, new RelativeTtl(ttl), cacheKeyStrategy.GetCacheKey, onCacheError); @@ -59,9 +59,9 @@ public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider cacheProvider, Tim /// The cache key strategy. /// Delegate to call if an exception is thrown when attempting to get a value from or put a value into the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy - /// cacheKeyStrategy + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, ICacheKeyStrategy cacheKeyStrategy, Action? onCacheError = null) { if (cacheProvider == null) @@ -87,8 +87,8 @@ public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider cacheProvider, ITt /// The cache key strategy. /// Delegate to call if an exception is thrown when attempting to get a value from or put a value into the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// cacheKeyStrategy + /// Thrown when is . + /// Thrown when is . public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider cacheProvider, TimeSpan ttl, Func cacheKeyStrategy, Action? onCacheError = null) => CacheAsync(cacheProvider, new RelativeTtl(ttl), cacheKeyStrategy, onCacheError); @@ -103,9 +103,9 @@ public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider cacheProvider, Tim /// The cache key strategy. /// Delegate to call if an exception is thrown when attempting to get a value from or put a value into the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy - /// cacheKeyStrategy + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, Func cacheKeyStrategy, Action? onCacheError = null) { if (cacheProvider == null) @@ -134,10 +134,10 @@ public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider cacheProvider, ITt /// Delegate to call if an exception is thrown when attempting to get a value from the cache, passing the execution context, the cache key, and the exception. /// Delegate to call if an exception is thrown when attempting to put a value in the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// onCacheGet - /// onCacheMiss - /// onCachePut + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static AsyncCachePolicy CacheAsync( IAsyncCacheProvider cacheProvider, TimeSpan ttl, @@ -162,11 +162,11 @@ public static AsyncCachePolicy CacheAsync( /// Delegate to call if an exception is thrown when attempting to get a value from the cache, passing the execution context, the cache key, and the exception. /// Delegate to call if an exception is thrown when attempting to put a value in the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy - /// onCacheGet - /// onCacheMiss - /// onCachePut + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static AsyncCachePolicy CacheAsync( IAsyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, @@ -192,11 +192,11 @@ public static AsyncCachePolicy CacheAsync( /// Delegate to call if an exception is thrown when attempting to get a value from the cache, passing the execution context, the cache key, and the exception. /// Delegate to call if an exception is thrown when attempting to put a value in the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// cacheKeyStrategy - /// onCacheGet - /// onCacheMiss - /// onCachePut + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static AsyncCachePolicy CacheAsync( IAsyncCacheProvider cacheProvider, TimeSpan ttl, @@ -223,12 +223,12 @@ public static AsyncCachePolicy CacheAsync( /// Delegate to call if an exception is thrown when attempting to get a value from the cache, passing the execution context, the cache key, and the exception. /// Delegate to call if an exception is thrown when attempting to put a value in the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy - /// cacheKeyStrategy - /// onCacheGet - /// onCacheMiss - /// onCachePut + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static AsyncCachePolicy CacheAsync( IAsyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, @@ -255,11 +255,11 @@ public static AsyncCachePolicy CacheAsync( /// Delegate to call if an exception is thrown when attempting to get a value from the cache, passing the execution context, the cache key, and the exception. /// Delegate to call if an exception is thrown when attempting to put a value in the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// cacheKeyStrategy - /// onCacheGet - /// onCacheMiss - /// onCachePut + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static AsyncCachePolicy CacheAsync( IAsyncCacheProvider cacheProvider, TimeSpan ttl, @@ -286,12 +286,12 @@ public static AsyncCachePolicy CacheAsync( /// Delegate to call if an exception is thrown when attempting to get a value from the cache, passing the execution context, the cache key, and the exception. /// Delegate to call if an exception is thrown when attempting to put a value in the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy - /// cacheKeyStrategy - /// onCacheGet - /// onCacheMiss - /// onCachePut + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static AsyncCachePolicy CacheAsync( IAsyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, diff --git a/src/Polly/Caching/AsyncCacheTResultSyntax.cs b/src/Polly/Caching/AsyncCacheTResultSyntax.cs index 6a7752186bc..1fff0139e7b 100644 --- a/src/Polly/Caching/AsyncCacheTResultSyntax.cs +++ b/src/Polly/Caching/AsyncCacheTResultSyntax.cs @@ -13,7 +13,7 @@ public partial class Policy /// Duration (ttl) for which to cache values. /// Delegate to call if an exception is thrown when attempting to get a value from or put a value into the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider + /// Thrown when is . public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider cacheProvider, TimeSpan ttl, Action? onCacheError = null) { if (cacheProvider == null) @@ -32,8 +32,8 @@ public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider /// A strategy for specifying ttl for values to be cached. /// Delegate to call if an exception is thrown when attempting to get a value from or put a value into the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy + /// Thrown when is . + /// Thrown when is . public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, Action? onCacheError = null) { if (cacheProvider == null) @@ -53,8 +53,8 @@ public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider /// The cache key strategy. /// Delegate to call if an exception is thrown when attempting to get a value from or put a value into the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// cacheKeyStrategy + /// Thrown when is . + /// Thrown when is . public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider cacheProvider, TimeSpan ttl, ICacheKeyStrategy cacheKeyStrategy, Action? onCacheError = null) { if (cacheProvider == null) @@ -74,9 +74,9 @@ public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider /// The cache key strategy. /// Delegate to call if an exception is thrown when attempting to get a value from or put a value into the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy - /// cacheKeyStrategy + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, ICacheKeyStrategy cacheKeyStrategy, Action? onCacheError = null) { if (cacheProvider == null) @@ -96,8 +96,8 @@ public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider /// The cache key strategy. /// Delegate to call if an exception is thrown when attempting to get a value from or put a value into the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// cacheKeyStrategy + /// Thrown when is . + /// Thrown when is . public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider cacheProvider, TimeSpan ttl, Func cacheKeyStrategy, Action? onCacheError = null) { if (cacheProvider == null) @@ -117,9 +117,9 @@ public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider /// The cache key strategy. /// Delegate to call if an exception is thrown when attempting to get a value from or put a value into the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy - /// cacheKeyStrategy + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, Func cacheKeyStrategy, Action? onCacheError = null) { if (cacheProvider == null) @@ -142,10 +142,10 @@ public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider /// Delegate to call if an exception is thrown when attempting to get a value from the cache, passing the execution context, the cache key, and the exception. /// Delegate to call if an exception is thrown when attempting to put a value in the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// onCacheGet - /// onCacheMiss - /// onCachePut + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static AsyncCachePolicy CacheAsync( IAsyncCacheProvider cacheProvider, TimeSpan ttl, @@ -175,11 +175,11 @@ public static AsyncCachePolicy CacheAsync( /// Delegate to call if an exception is thrown when attempting to get a value from the cache, passing the execution context, the cache key, and the exception. /// Delegate to call if an exception is thrown when attempting to put a value in the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy - /// onCacheGet - /// onCacheMiss - /// onCachePut + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static AsyncCachePolicy CacheAsync( IAsyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, @@ -210,11 +210,11 @@ public static AsyncCachePolicy CacheAsync( /// Delegate to call if an exception is thrown when attempting to get a value from the cache, passing the execution context, the cache key, and the exception. /// Delegate to call if an exception is thrown when attempting to put a value in the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// cacheKeyStrategy - /// onCacheGet - /// onCacheMiss - /// onCachePut + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static AsyncCachePolicy CacheAsync( IAsyncCacheProvider cacheProvider, TimeSpan ttl, @@ -246,12 +246,12 @@ public static AsyncCachePolicy CacheAsync( /// Delegate to call if an exception is thrown when attempting to get a value from the cache, passing the execution context, the cache key, and the exception. /// Delegate to call if an exception is thrown when attempting to put a value in the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy - /// cacheKeyStrategy - /// onCacheGet - /// onCacheMiss - /// onCachePut + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static AsyncCachePolicy CacheAsync( IAsyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, @@ -283,11 +283,11 @@ public static AsyncCachePolicy CacheAsync( /// Delegate to call if an exception is thrown when attempting to get a value from the cache, passing the execution context, the cache key, and the exception. /// Delegate to call if an exception is thrown when attempting to put a value in the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// cacheKeyStrategy - /// onCacheGet - /// onCacheMiss - /// onCachePut + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static AsyncCachePolicy CacheAsync( IAsyncCacheProvider cacheProvider, TimeSpan ttl, @@ -319,12 +319,12 @@ public static AsyncCachePolicy CacheAsync( /// Delegate to call if an exception is thrown when attempting to get a value from the cache, passing the execution context, the cache key, and the exception. /// Delegate to call if an exception is thrown when attempting to put a value in the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy - /// cacheKeyStrategy - /// onCacheGet - /// onCacheMiss - /// onCachePut + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static AsyncCachePolicy CacheAsync( IAsyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, @@ -351,7 +351,7 @@ public static AsyncCachePolicy CacheAsync( /// Duration (ttl) for which to cache values. /// Delegate to call if an exception is thrown when attempting to get a value from or put a value into the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider + /// Thrown when is . public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider cacheProvider, TimeSpan ttl, Action? onCacheError = null) => CacheAsync(cacheProvider, new RelativeTtl(ttl), DefaultCacheKeyStrategy.Instance.GetCacheKey, onCacheError); @@ -365,8 +365,8 @@ public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider< /// A strategy for specifying ttl for values to be cached. /// Delegate to call if an exception is thrown when attempting to get a value from or put a value into the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy + /// Thrown when is . + /// Thrown when is . public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, Action? onCacheError = null) => CacheAsync(cacheProvider, ttlStrategy, DefaultCacheKeyStrategy.Instance.GetCacheKey, onCacheError); @@ -380,8 +380,8 @@ public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider< /// A strategy for specifying ttl for values to be cached. /// Delegate to call if an exception is thrown when attempting to get a value from or put a value into the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy + /// Thrown when is . + /// Thrown when is . public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, Action? onCacheError = null) => CacheAsync(cacheProvider, ttlStrategy, DefaultCacheKeyStrategy.Instance.GetCacheKey, onCacheError); @@ -396,8 +396,8 @@ public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider< /// The cache key strategy. /// Delegate to call if an exception is thrown when attempting to get a value from or put a value into the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// cacheKeyStrategy + /// Thrown when is . + /// Thrown when is . public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider cacheProvider, TimeSpan ttl, ICacheKeyStrategy cacheKeyStrategy, Action? onCacheError = null) => CacheAsync(cacheProvider, new RelativeTtl(ttl), cacheKeyStrategy.GetCacheKey, onCacheError); @@ -412,9 +412,9 @@ public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider< /// The cache key strategy. /// Delegate to call if an exception is thrown when attempting to get a value from or put a value into the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy - /// cacheKeyStrategy + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, ICacheKeyStrategy cacheKeyStrategy, Action? onCacheError = null) { Action emptyDelegate = (_, _) => { }; @@ -433,9 +433,9 @@ public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider< /// The cache key strategy. /// Delegate to call if an exception is thrown when attempting to get a value from or put a value into the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy - /// cacheKeyStrategy + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, ICacheKeyStrategy cacheKeyStrategy, Action? onCacheError = null) { Action emptyDelegate = (_, _) => { }; @@ -454,8 +454,8 @@ public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider< /// The cache key strategy. /// Delegate to call if an exception is thrown when attempting to get a value from or put a value into the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// cacheKeyStrategy + /// Thrown when is . + /// Thrown when is . public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider cacheProvider, TimeSpan ttl, Func cacheKeyStrategy, Action? onCacheError = null) => CacheAsync(cacheProvider, new RelativeTtl(ttl), cacheKeyStrategy, onCacheError); @@ -470,9 +470,9 @@ public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider< /// The cache key strategy. /// Delegate to call if an exception is thrown when attempting to get a value from or put a value into the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy - /// cacheKeyStrategy + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, Func cacheKeyStrategy, Action? onCacheError = null) { Action emptyDelegate = (_, _) => { }; @@ -491,9 +491,9 @@ public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider< /// The cache key strategy. /// Delegate to call if an exception is thrown when attempting to get a value from or put a value into the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy - /// cacheKeyStrategy + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, Func cacheKeyStrategy, Action? onCacheError = null) { Action emptyDelegate = (_, _) => { }; @@ -515,10 +515,10 @@ public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider< /// Delegate to call if an exception is thrown when attempting to get a value from the cache, passing the execution context, the cache key, and the exception. /// Delegate to call if an exception is thrown when attempting to put a value in the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// onCacheGet - /// onCacheMiss - /// onCachePut + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static AsyncCachePolicy CacheAsync( IAsyncCacheProvider cacheProvider, TimeSpan ttl, @@ -544,11 +544,11 @@ public static AsyncCachePolicy CacheAsync( /// Delegate to call if an exception is thrown when attempting to get a value from the cache, passing the execution context, the cache key, and the exception. /// Delegate to call if an exception is thrown when attempting to put a value in the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy - /// onCacheGet - /// onCacheMiss - /// onCachePut + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static AsyncCachePolicy CacheAsync( IAsyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, @@ -573,11 +573,11 @@ public static AsyncCachePolicy CacheAsync( /// Delegate to call if an exception is thrown when attempting to get a value from the cache, passing the execution context, the cache key, and the exception. /// Delegate to call if an exception is thrown when attempting to put a value in the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy - /// onCacheGet - /// onCacheMiss - /// onCachePut + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static AsyncCachePolicy CacheAsync( IAsyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, @@ -603,11 +603,11 @@ public static AsyncCachePolicy CacheAsync( /// Delegate to call if an exception is thrown when attempting to get a value from the cache, passing the execution context, the cache key, and the exception. /// Delegate to call if an exception is thrown when attempting to put a value in the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// cacheKeyStrategy - /// onCacheGet - /// onCacheMiss - /// onCachePut + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static AsyncCachePolicy CacheAsync( IAsyncCacheProvider cacheProvider, TimeSpan ttl, @@ -635,12 +635,12 @@ public static AsyncCachePolicy CacheAsync( /// Delegate to call if an exception is thrown when attempting to get a value from the cache, passing the execution context, the cache key, and the exception. /// Delegate to call if an exception is thrown when attempting to put a value in the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy - /// cacheKeyStrategy - /// onCacheGet - /// onCacheMiss - /// onCachePut + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static AsyncCachePolicy CacheAsync( IAsyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, @@ -667,12 +667,12 @@ public static AsyncCachePolicy CacheAsync( /// Delegate to call if an exception is thrown when attempting to get a value from the cache, passing the execution context, the cache key, and the exception. /// Delegate to call if an exception is thrown when attempting to put a value in the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy - /// cacheKeyStrategy - /// onCacheGet - /// onCacheMiss - /// onCachePut + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static AsyncCachePolicy CacheAsync( IAsyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, @@ -699,11 +699,11 @@ public static AsyncCachePolicy CacheAsync( /// Delegate to call if an exception is thrown when attempting to get a value from the cache, passing the execution context, the cache key, and the exception. /// Delegate to call if an exception is thrown when attempting to put a value in the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// cacheKeyStrategy - /// onCacheGet - /// onCacheMiss - /// onCachePut + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static AsyncCachePolicy CacheAsync( IAsyncCacheProvider cacheProvider, TimeSpan ttl, @@ -731,12 +731,12 @@ public static AsyncCachePolicy CacheAsync( /// Delegate to call if an exception is thrown when attempting to get a value from the cache, passing the execution context, the cache key, and the exception. /// Delegate to call if an exception is thrown when attempting to put a value in the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy - /// cacheKeyStrategy - /// onCacheGet - /// onCacheMiss - /// onCachePut + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static AsyncCachePolicy CacheAsync( IAsyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, @@ -763,12 +763,12 @@ public static AsyncCachePolicy CacheAsync( /// Delegate to call if an exception is thrown when attempting to get a value from the cache, passing the execution context, the cache key, and the exception. /// Delegate to call if an exception is thrown when attempting to put a value in the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy - /// cacheKeyStrategy - /// onCacheGet - /// onCacheMiss - /// onCachePut + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static AsyncCachePolicy CacheAsync( IAsyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, diff --git a/src/Polly/Caching/AsyncSerializingCacheProvider.cs b/src/Polly/Caching/AsyncSerializingCacheProvider.cs index 4d40c1a4099..0d0caeaa66d 100644 --- a/src/Polly/Caching/AsyncSerializingCacheProvider.cs +++ b/src/Polly/Caching/AsyncSerializingCacheProvider.cs @@ -15,8 +15,8 @@ public class AsyncSerializingCacheProvider : IAsyncCacheProvider /// /// The wrapped cache provider. /// The serializer. - /// wrappedCacheProvider - /// serializer + /// Thrown when is . + /// Thrown when is . public AsyncSerializingCacheProvider(IAsyncCacheProvider wrappedCacheProvider, ICacheItemSerializer serializer) { _wrappedCacheProvider = wrappedCacheProvider ?? throw new ArgumentNullException(nameof(wrappedCacheProvider)); @@ -73,8 +73,8 @@ public class AsyncSerializingCacheProvider : IAsyncCachePr /// /// The wrapped cache provider. /// The serializer. - /// wrappedCacheProvider - /// serializer + /// Thrown when is . + /// Thrown when is . public AsyncSerializingCacheProvider(IAsyncCacheProvider wrappedCacheProvider, ICacheItemSerializer serializer) { _wrappedCacheProvider = wrappedCacheProvider ?? throw new ArgumentNullException(nameof(wrappedCacheProvider)); diff --git a/src/Polly/Caching/CacheSyntax.cs b/src/Polly/Caching/CacheSyntax.cs index 68fe93eecc0..d0ee51653fa 100644 --- a/src/Polly/Caching/CacheSyntax.cs +++ b/src/Polly/Caching/CacheSyntax.cs @@ -13,7 +13,7 @@ public partial class Policy /// Duration (ttl) for which to cache values. /// Delegate to call if an exception is thrown when attempting to get a value from or put a value into the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider + /// Thrown when is . public static CachePolicy Cache(ISyncCacheProvider cacheProvider, TimeSpan ttl, Action? onCacheError = null) => Cache(cacheProvider, new RelativeTtl(ttl), DefaultCacheKeyStrategy.Instance.GetCacheKey, onCacheError); @@ -27,8 +27,8 @@ public static CachePolicy Cache(ISyncCacheProvider cacheProvider, TimeSpan ttl, /// A strategy for specifying ttl for values to be cached. /// Delegate to call if an exception is thrown when attempting to get a value from or put a value into the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy + /// Thrown when is . + /// Thrown when is . public static CachePolicy Cache(ISyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, Action? onCacheError = null) => Cache(cacheProvider, ttlStrategy, DefaultCacheKeyStrategy.Instance.GetCacheKey, onCacheError); @@ -43,8 +43,8 @@ public static CachePolicy Cache(ISyncCacheProvider cacheProvider, ITtlStrategy t /// The cache key strategy. /// Delegate to call if an exception is thrown when attempting to get a value from or put a value into the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// cacheKeyStrategy + /// Thrown when is . + /// Thrown when is . public static CachePolicy Cache(ISyncCacheProvider cacheProvider, TimeSpan ttl, ICacheKeyStrategy cacheKeyStrategy, Action? onCacheError = null) => Cache(cacheProvider, new RelativeTtl(ttl), cacheKeyStrategy.GetCacheKey, onCacheError); @@ -59,9 +59,9 @@ public static CachePolicy Cache(ISyncCacheProvider cacheProvider, TimeSpan ttl, /// The cache key strategy. /// Delegate to call if an exception is thrown when attempting to get a value from or put a value into the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy - /// cacheKeyStrategy + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static CachePolicy Cache(ISyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, ICacheKeyStrategy cacheKeyStrategy, Action? onCacheError = null) { if (cacheProvider == null) @@ -87,8 +87,8 @@ public static CachePolicy Cache(ISyncCacheProvider cacheProvider, ITtlStrategy t /// The cache key strategy. /// Delegate to call if an exception is thrown when attempting to get a value from or put a value into the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// cacheKeyStrategy + /// Thrown when is . + /// Thrown when is . public static CachePolicy Cache(ISyncCacheProvider cacheProvider, TimeSpan ttl, Func cacheKeyStrategy, Action? onCacheError = null) => Cache(cacheProvider, new RelativeTtl(ttl), cacheKeyStrategy, onCacheError); @@ -103,9 +103,9 @@ public static CachePolicy Cache(ISyncCacheProvider cacheProvider, TimeSpan ttl, /// The cache key strategy. /// Delegate to call if an exception is thrown when attempting to get a value from or put a value into the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy - /// cacheKeyStrategy + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static CachePolicy Cache(ISyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, Func cacheKeyStrategy, Action? onCacheError = null) { if (cacheProvider == null) @@ -134,12 +134,10 @@ public static CachePolicy Cache(ISyncCacheProvider cacheProvider, ITtlStrategy t /// Delegate to call if an exception is thrown when attempting to get a value from the cache, passing the execution context, the cache key, and the exception. /// Delegate to call if an exception is thrown when attempting to put a value in the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// - /// - /// cacheProvider - /// onCacheGet - /// onCacheMiss - /// onCachePut + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static CachePolicy Cache( ISyncCacheProvider cacheProvider, TimeSpan ttl, @@ -164,13 +162,11 @@ public static CachePolicy Cache( /// Delegate to call if an exception is thrown when attempting to get a value from the cache, passing the execution context, the cache key, and the exception. /// Delegate to call if an exception is thrown when attempting to put a value in the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// - /// - /// cacheProvider - /// ttlStrategy - /// onCacheGet - /// onCacheMiss - /// onCachePut + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static CachePolicy Cache( ISyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, @@ -196,13 +192,11 @@ public static CachePolicy Cache( /// Delegate to call if an exception is thrown when attempting to get a value from the cache, passing the execution context, the cache key, and the exception. /// Delegate to call if an exception is thrown when attempting to put a value in the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// - /// - /// cacheProvider - /// cacheKeyStrategy - /// onCacheGet - /// onCacheMiss - /// onCachePut + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static CachePolicy Cache( ISyncCacheProvider cacheProvider, TimeSpan ttl, @@ -229,14 +223,12 @@ public static CachePolicy Cache( /// Delegate to call if an exception is thrown when attempting to get a value from the cache, passing the execution context, the cache key, and the exception. /// Delegate to call if an exception is thrown when attempting to put a value in the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// - /// - /// cacheProvider - /// ttlStrategy - /// cacheKeyStrategy - /// onCacheGet - /// onCacheMiss - /// onCachePut + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static CachePolicy Cache( ISyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, @@ -263,13 +255,11 @@ public static CachePolicy Cache( /// Delegate to call if an exception is thrown when attempting to get a value from the cache, passing the execution context, the cache key, and the exception. /// Delegate to call if an exception is thrown when attempting to put a value in the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// - /// - /// cacheProvider - /// cacheKeyStrategy - /// onCacheGet - /// onCacheMiss - /// onCachePut + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static CachePolicy Cache( ISyncCacheProvider cacheProvider, TimeSpan ttl, @@ -296,14 +286,12 @@ public static CachePolicy Cache( /// Delegate to call if an exception is thrown when attempting to get a value from the cache, passing the execution context, the cache key, and the exception. /// Delegate to call if an exception is thrown when attempting to put a value in the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// - /// - /// cacheProvider - /// ttlStrategy - /// cacheKeyStrategy - /// onCacheGet - /// onCacheMiss - /// onCachePut + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static CachePolicy Cache( ISyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, diff --git a/src/Polly/Caching/CacheTResultSyntax.cs b/src/Polly/Caching/CacheTResultSyntax.cs index 737a27671cd..c0ab9fda3cf 100644 --- a/src/Polly/Caching/CacheTResultSyntax.cs +++ b/src/Polly/Caching/CacheTResultSyntax.cs @@ -13,7 +13,7 @@ public partial class Policy /// Duration (ttl) for which to cache values. /// Delegate to call if an exception is thrown when attempting to get a value from or put a value into the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider + /// Thrown when is . public static CachePolicy Cache(ISyncCacheProvider cacheProvider, TimeSpan ttl, Action? onCacheError = null) { if (cacheProvider == null) @@ -32,8 +32,8 @@ public static CachePolicy Cache(ISyncCacheProvider cacheProvid /// A strategy for specifying ttl for values to be cached. /// Delegate to call if an exception is thrown when attempting to get a value from or put a value into the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy + /// Thrown when is . + /// Thrown when is . public static CachePolicy Cache(ISyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, Action? onCacheError = null) { if (cacheProvider == null) @@ -53,8 +53,8 @@ public static CachePolicy Cache(ISyncCacheProvider cacheProvid /// The cache key strategy. /// Delegate to call if an exception is thrown when attempting to get a value from or put a value into the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// cacheKeyStrategy + /// Thrown when is . + /// Thrown when is . public static CachePolicy Cache(ISyncCacheProvider cacheProvider, TimeSpan ttl, ICacheKeyStrategy cacheKeyStrategy, Action? onCacheError = null) { if (cacheProvider == null) @@ -74,9 +74,9 @@ public static CachePolicy Cache(ISyncCacheProvider cacheProvid /// The cache key strategy. /// Delegate to call if an exception is thrown when attempting to get a value from or put a value into the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy - /// cacheKeyStrategy + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static CachePolicy Cache(ISyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, ICacheKeyStrategy cacheKeyStrategy, Action? onCacheError = null) { if (cacheProvider == null) @@ -96,8 +96,8 @@ public static CachePolicy Cache(ISyncCacheProvider cacheProvid /// The cache key strategy. /// Delegate to call if an exception is thrown when attempting to get a value from or put a value into the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// cacheKeyStrategy + /// Thrown when is . + /// Thrown when is . public static CachePolicy Cache(ISyncCacheProvider cacheProvider, TimeSpan ttl, Func cacheKeyStrategy, Action? onCacheError = null) { if (cacheProvider == null) @@ -117,9 +117,9 @@ public static CachePolicy Cache(ISyncCacheProvider cacheProvid /// The cache key strategy. /// Delegate to call if an exception is thrown when attempting to get a value from or put a value into the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy - /// cacheKeyStrategy + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static CachePolicy Cache(ISyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, Func cacheKeyStrategy, Action? onCacheError = null) { if (cacheProvider == null) @@ -142,10 +142,10 @@ public static CachePolicy Cache(ISyncCacheProvider cacheProvid /// Delegate to call if an exception is thrown when attempting to get a value from the cache, passing the execution context, the cache key, and the exception. /// Delegate to call if an exception is thrown when attempting to put a value in the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// onCacheGet - /// onCacheMiss - /// onCachePut + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static CachePolicy Cache( ISyncCacheProvider cacheProvider, TimeSpan ttl, @@ -175,11 +175,11 @@ public static CachePolicy Cache( /// Delegate to call if an exception is thrown when attempting to get a value from the cache, passing the execution context, the cache key, and the exception. /// Delegate to call if an exception is thrown when attempting to put a value in the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy - /// onCacheGet - /// onCacheMiss - /// onCachePut + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static CachePolicy Cache( ISyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, @@ -210,11 +210,11 @@ public static CachePolicy Cache( /// Delegate to call if an exception is thrown when attempting to get a value from the cache, passing the execution context, the cache key, and the exception. /// Delegate to call if an exception is thrown when attempting to put a value in the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// cacheKeyStrategy - /// onCacheGet - /// onCacheMiss - /// onCachePut + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static CachePolicy Cache( ISyncCacheProvider cacheProvider, TimeSpan ttl, @@ -246,12 +246,12 @@ public static CachePolicy Cache( /// Delegate to call if an exception is thrown when attempting to get a value from the cache, passing the execution context, the cache key, and the exception. /// Delegate to call if an exception is thrown when attempting to put a value in the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy - /// cacheKeyStrategy - /// onCacheGet - /// onCacheMiss - /// onCachePut + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static CachePolicy Cache( ISyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, @@ -283,11 +283,11 @@ public static CachePolicy Cache( /// Delegate to call if an exception is thrown when attempting to get a value from the cache, passing the execution context, the cache key, and the exception. /// Delegate to call if an exception is thrown when attempting to put a value in the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// cacheKeyStrategy - /// onCacheGet - /// onCacheMiss - /// onCachePut + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static CachePolicy Cache( ISyncCacheProvider cacheProvider, TimeSpan ttl, @@ -319,12 +319,12 @@ public static CachePolicy Cache( /// Delegate to call if an exception is thrown when attempting to get a value from the cache, passing the execution context, the cache key, and the exception. /// Delegate to call if an exception is thrown when attempting to put a value in the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy - /// cacheKeyStrategy - /// onCacheGet - /// onCacheMiss - /// onCachePut + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static CachePolicy Cache( ISyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, @@ -351,7 +351,7 @@ public static CachePolicy Cache( /// Duration (ttl) for which to cache values. /// Delegate to call if an exception is thrown when attempting to get a value from or put a value into the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider + /// Thrown when is . public static CachePolicy Cache(ISyncCacheProvider cacheProvider, TimeSpan ttl, Action? onCacheError = null) => Cache(cacheProvider, new RelativeTtl(ttl), DefaultCacheKeyStrategy.Instance.GetCacheKey, onCacheError); @@ -365,8 +365,8 @@ public static CachePolicy Cache(ISyncCacheProvider ca /// A strategy for specifying ttl for values to be cached. /// Delegate to call if an exception is thrown when attempting to get a value from or put a value into the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy + /// Thrown when is . + /// Thrown when is . public static CachePolicy Cache(ISyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, Action? onCacheError = null) => Cache(cacheProvider, ttlStrategy, DefaultCacheKeyStrategy.Instance.GetCacheKey, onCacheError); @@ -380,8 +380,8 @@ public static CachePolicy Cache(ISyncCacheProvider ca /// A strategy for specifying ttl for values to be cached. /// Delegate to call if an exception is thrown when attempting to get a value from or put a value into the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy + /// Thrown when is . + /// Thrown when is . public static CachePolicy Cache(ISyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, Action? onCacheError = null) => Cache(cacheProvider, ttlStrategy, DefaultCacheKeyStrategy.Instance.GetCacheKey, onCacheError); @@ -396,8 +396,8 @@ public static CachePolicy Cache(ISyncCacheProvider ca /// The cache key strategy. /// Delegate to call if an exception is thrown when attempting to get a value from or put a value into the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// cacheKeyStrategy + /// Thrown when is . + /// Thrown when is . public static CachePolicy Cache(ISyncCacheProvider cacheProvider, TimeSpan ttl, ICacheKeyStrategy cacheKeyStrategy, Action? onCacheError = null) => Cache(cacheProvider, new RelativeTtl(ttl), cacheKeyStrategy.GetCacheKey, onCacheError); @@ -412,9 +412,9 @@ public static CachePolicy Cache(ISyncCacheProvider ca /// The cache key strategy. /// Delegate to call if an exception is thrown when attempting to get a value from or put a value into the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy - /// cacheKeyStrategy + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static CachePolicy Cache(ISyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, ICacheKeyStrategy cacheKeyStrategy, Action? onCacheError = null) { Action emptyDelegate = (_, _) => { }; @@ -434,9 +434,9 @@ public static CachePolicy Cache(ISyncCacheProvider ca /// The cache key strategy. /// Delegate to call if an exception is thrown when attempting to get a value from or put a value into the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy - /// cacheKeyStrategy + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static CachePolicy Cache(ISyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, ICacheKeyStrategy cacheKeyStrategy, Action? onCacheError = null) { Action emptyDelegate = (_, _) => { }; @@ -456,8 +456,8 @@ public static CachePolicy Cache(ISyncCacheProvider ca /// The cache key strategy. /// Delegate to call if an exception is thrown when attempting to get a value from or put a value into the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// cacheKeyStrategy + /// Thrown when is . + /// Thrown when is . public static CachePolicy Cache(ISyncCacheProvider cacheProvider, TimeSpan ttl, Func cacheKeyStrategy, Action? onCacheError = null) => Cache(cacheProvider, new RelativeTtl(ttl), cacheKeyStrategy, onCacheError); @@ -472,9 +472,9 @@ public static CachePolicy Cache(ISyncCacheProvider ca /// The cache key strategy. /// Delegate to call if an exception is thrown when attempting to get a value from or put a value into the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy - /// cacheKeyStrategy + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static CachePolicy Cache(ISyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, Func cacheKeyStrategy, Action? onCacheError = null) { Action emptyDelegate = (_, _) => { }; @@ -494,9 +494,9 @@ public static CachePolicy Cache(ISyncCacheProvider ca /// The cache key strategy. /// Delegate to call if an exception is thrown when attempting to get a value from or put a value into the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy - /// cacheKeyStrategy + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static CachePolicy Cache(ISyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, Func cacheKeyStrategy, Action? onCacheError = null) { Action emptyDelegate = (_, _) => { }; @@ -519,10 +519,10 @@ public static CachePolicy Cache(ISyncCacheProvider ca /// Delegate to call if an exception is thrown when attempting to get a value from the cache, passing the execution context, the cache key, and the exception. /// Delegate to call if an exception is thrown when attempting to put a value in the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// onCacheGet - /// onCacheMiss - /// onCachePut + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static CachePolicy Cache( ISyncCacheProvider cacheProvider, TimeSpan ttl, @@ -548,11 +548,11 @@ public static CachePolicy Cache( /// Delegate to call if an exception is thrown when attempting to get a value from the cache, passing the execution context, the cache key, and the exception. /// Delegate to call if an exception is thrown when attempting to put a value in the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy - /// onCacheGet - /// onCacheMiss - /// onCachePut + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static CachePolicy Cache( ISyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, @@ -577,11 +577,11 @@ public static CachePolicy Cache( /// Delegate to call if an exception is thrown when attempting to get a value from the cache, passing the execution context, the cache key, and the exception. /// Delegate to call if an exception is thrown when attempting to put a value in the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy - /// onCacheGet - /// onCacheMiss - /// onCachePut + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static CachePolicy Cache( ISyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, @@ -607,11 +607,11 @@ public static CachePolicy Cache( /// Delegate to call if an exception is thrown when attempting to get a value from the cache, passing the execution context, the cache key, and the exception. /// Delegate to call if an exception is thrown when attempting to put a value in the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// cacheKeyStrategy - /// onCacheGet - /// onCacheMiss - /// onCachePut + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static CachePolicy Cache( ISyncCacheProvider cacheProvider, TimeSpan ttl, @@ -639,12 +639,12 @@ public static CachePolicy Cache( /// Delegate to call if an exception is thrown when attempting to get a value from the cache, passing the execution context, the cache key, and the exception. /// Delegate to call if an exception is thrown when attempting to put a value in the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy - /// cacheKeyStrategy - /// onCacheGet - /// onCacheMiss - /// onCachePut + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static CachePolicy Cache( ISyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, @@ -671,12 +671,12 @@ public static CachePolicy Cache( /// Delegate to call if an exception is thrown when attempting to get a value from the cache, passing the execution context, the cache key, and the exception. /// Delegate to call if an exception is thrown when attempting to put a value in the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy - /// cacheKeyStrategy - /// onCacheGet - /// onCacheMiss - /// onCachePut + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static CachePolicy Cache( ISyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, @@ -703,11 +703,11 @@ public static CachePolicy Cache( /// Delegate to call if an exception is thrown when attempting to get a value from the cache, passing the execution context, the cache key, and the exception. /// Delegate to call if an exception is thrown when attempting to put a value in the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// cacheKeyStrategy - /// onCacheGet - /// onCacheMiss - /// onCachePut + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static CachePolicy Cache( ISyncCacheProvider cacheProvider, TimeSpan ttl, @@ -735,12 +735,12 @@ public static CachePolicy Cache( /// Delegate to call if an exception is thrown when attempting to get a value from the cache, passing the execution context, the cache key, and the exception. /// Delegate to call if an exception is thrown when attempting to put a value in the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy - /// cacheKeyStrategy - /// onCacheGet - /// onCacheMiss - /// onCachePut + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static CachePolicy Cache( ISyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, @@ -768,12 +768,12 @@ public static CachePolicy Cache( /// Delegate to call if an exception is thrown when attempting to get a value from the cache, passing the execution context, the cache key, and the exception. /// Delegate to call if an exception is thrown when attempting to put a value in the cache, passing the execution context, the cache key, and the exception. /// The policy instance. - /// cacheProvider - /// ttlStrategy - /// cacheKeyStrategy - /// onCacheGet - /// onCacheMiss - /// onCachePut + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static CachePolicy Cache( ISyncCacheProvider cacheProvider, ITtlStrategy ttlStrategy, diff --git a/src/Polly/Caching/SerializingCacheProvider.cs b/src/Polly/Caching/SerializingCacheProvider.cs index 11028319cd8..19942157a7f 100644 --- a/src/Polly/Caching/SerializingCacheProvider.cs +++ b/src/Polly/Caching/SerializingCacheProvider.cs @@ -15,8 +15,8 @@ public class SerializingCacheProvider : ISyncCacheProvider /// /// The wrapped cache provider. /// The serializer. - /// wrappedCacheProvider - /// serializer + /// Thrown when is . + /// Thrown when is . public SerializingCacheProvider(ISyncCacheProvider wrappedCacheProvider, ICacheItemSerializer serializer) { _wrappedCacheProvider = wrappedCacheProvider ?? throw new ArgumentNullException(nameof(wrappedCacheProvider)); @@ -62,8 +62,8 @@ public class SerializingCacheProvider : ISyncCacheProvider /// /// The wrapped cache provider. /// The serializer. - /// wrappedCacheProvider - /// serializer + /// Thrown when is . + /// Thrown when is . public SerializingCacheProvider(ISyncCacheProvider wrappedCacheProvider, ICacheItemSerializer serializer) { _wrappedCacheProvider = wrappedCacheProvider ?? throw new ArgumentNullException(nameof(wrappedCacheProvider)); diff --git a/src/Polly/CircuitBreaker/AdvancedCircuitBreakerSyntax.cs b/src/Polly/CircuitBreaker/AdvancedCircuitBreakerSyntax.cs index 51e71f4102d..2c300108718 100644 --- a/src/Polly/CircuitBreaker/AdvancedCircuitBreakerSyntax.cs +++ b/src/Polly/CircuitBreaker/AdvancedCircuitBreakerSyntax.cs @@ -22,12 +22,12 @@ public static class AdvancedCircuitBreakerSyntax /// The minimum throughput: this many actions or more must pass through the circuit in the timeslice, for statistics to be considered significant and the circuit-breaker to come into action. /// The duration the circuit will stay open before resetting. /// The policy instance. - /// (see "Release It!" by Michael T. Nygard fi) - /// failureThreshold;Value must be greater than zero - /// failureThreshold;Value must be less than or equal to one - /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer - /// minimumThroughput;Value must be greater than one - /// durationOfBreak;Value must be greater than zero + /// (see "Release It!" by Michael T. Nygard fi). + /// failureThreshold;Value must be greater than zero. + /// failureThreshold;Value must be less than or equal to one. + /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer. + /// minimumThroughput;Value must be greater than one. + /// durationOfBreak;Value must be greater than zero. public static CircuitBreakerPolicy AdvancedCircuitBreaker(this PolicyBuilder policyBuilder, double failureThreshold, TimeSpan samplingDuration, int minimumThroughput, TimeSpan durationOfBreak) { Action doNothingOnBreak = (_, _) => { }; @@ -58,14 +58,14 @@ public static CircuitBreakerPolicy AdvancedCircuitBreaker(this PolicyBuilder pol /// The action to call when the circuit transitions to an state. /// The action to call when the circuit resets to a state. /// The policy instance. - /// (see "Release It!" by Michael T. Nygard fi) - /// failureThreshold;Value must be greater than zero - /// failureThreshold;Value must be less than or equal to one - /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer - /// minimumThroughput;Value must be greater than one - /// durationOfBreak;Value must be greater than zero - /// onBreak - /// onReset + /// (see "Release It!" by Michael T. Nygard fi). + /// failureThreshold;Value must be greater than zero. + /// failureThreshold;Value must be less than or equal to one. + /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer. + /// minimumThroughput;Value must be greater than one. + /// durationOfBreak;Value must be greater than zero. + /// Thrown when is . + /// Thrown when is . public static CircuitBreakerPolicy AdvancedCircuitBreaker(this PolicyBuilder policyBuilder, double failureThreshold, TimeSpan samplingDuration, int minimumThroughput, TimeSpan durationOfBreak, Action onBreak, Action onReset) => policyBuilder.AdvancedCircuitBreaker( failureThreshold, samplingDuration, minimumThroughput, @@ -91,14 +91,14 @@ public static CircuitBreakerPolicy AdvancedCircuitBreaker(this PolicyBuilder pol /// The action to call when the circuit transitions to an state. /// The action to call when the circuit resets to a state. /// The policy instance. - /// (see "Release It!" by Michael T. Nygard fi) - /// failureThreshold;Value must be greater than zero - /// failureThreshold;Value must be less than or equal to one - /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer - /// minimumThroughput;Value must be greater than one - /// durationOfBreak;Value must be greater than zero - /// onBreak - /// onReset + /// (see "Release It!" by Michael T. Nygard fi). + /// failureThreshold;Value must be greater than zero. + /// failureThreshold;Value must be less than or equal to one. + /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer. + /// minimumThroughput;Value must be greater than one. + /// durationOfBreak;Value must be greater than zero. + /// Thrown when is . + /// Thrown when is . public static CircuitBreakerPolicy AdvancedCircuitBreaker(this PolicyBuilder policyBuilder, double failureThreshold, TimeSpan samplingDuration, int minimumThroughput, TimeSpan durationOfBreak, Action onBreak, Action onReset) { Action doNothingOnHalfOpen = () => { }; @@ -128,15 +128,15 @@ public static CircuitBreakerPolicy AdvancedCircuitBreaker(this PolicyBuilder pol /// The action to call when the circuit resets to a state. /// The action to call when the circuit transitions to state, ready to try action executions again. /// The policy instance. - /// (see "Release It!" by Michael T. Nygard fi) - /// failureThreshold;Value must be greater than zero - /// failureThreshold;Value must be less than or equal to one - /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer - /// minimumThroughput;Value must be greater than one - /// durationOfBreak;Value must be greater than zero - /// onBreak - /// onReset - /// onHalfOpen + /// (see "Release It!" by Michael T. Nygard fi). + /// failureThreshold;Value must be greater than zero. + /// failureThreshold;Value must be less than or equal to one. + /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer. + /// minimumThroughput;Value must be greater than one. + /// durationOfBreak;Value must be greater than zero. + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static CircuitBreakerPolicy AdvancedCircuitBreaker(this PolicyBuilder policyBuilder, double failureThreshold, TimeSpan samplingDuration, int minimumThroughput, TimeSpan durationOfBreak, Action onBreak, Action onReset, Action onHalfOpen) => policyBuilder.AdvancedCircuitBreaker( failureThreshold, samplingDuration, minimumThroughput, @@ -165,15 +165,15 @@ public static CircuitBreakerPolicy AdvancedCircuitBreaker(this PolicyBuilder pol /// The action to call when the circuit resets to a state. /// The action to call when the circuit transitions to state, ready to try action executions again. /// The policy instance. - /// failureThreshold;Value must be greater than zero - /// failureThreshold;Value must be less than or equal to one - /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer - /// minimumThroughput;Value must be greater than one - /// durationOfBreak;Value must be greater than zero - /// onBreak - /// onReset - /// onHalfOpen - /// (see "Release It!" by Michael T. Nygard fi) + /// failureThreshold;Value must be greater than zero. + /// failureThreshold;Value must be less than or equal to one. + /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer. + /// minimumThroughput;Value must be greater than one. + /// durationOfBreak;Value must be greater than zero. + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// (see "Release It!" by Michael T. Nygard fi). public static CircuitBreakerPolicy AdvancedCircuitBreaker(this PolicyBuilder policyBuilder, double failureThreshold, TimeSpan samplingDuration, int minimumThroughput, TimeSpan durationOfBreak, Action onBreak, Action onReset, Action onHalfOpen) => policyBuilder.AdvancedCircuitBreaker( failureThreshold, samplingDuration, minimumThroughput, @@ -202,15 +202,15 @@ public static CircuitBreakerPolicy AdvancedCircuitBreaker(this PolicyBuilder pol /// The action to call when the circuit resets to a state. /// The action to call when the circuit transitions to state, ready to try action executions again. /// The policy instance. - /// failureThreshold;Value must be greater than zero - /// failureThreshold;Value must be less than or equal to one - /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer - /// minimumThroughput;Value must be greater than one - /// durationOfBreak;Value must be greater than zero - /// onBreak - /// onReset - /// onHalfOpen - /// (see "Release It!" by Michael T. Nygard fi) + /// failureThreshold;Value must be greater than zero. + /// failureThreshold;Value must be less than or equal to one. + /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer. + /// minimumThroughput;Value must be greater than one. + /// durationOfBreak;Value must be greater than zero. + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// (see "Release It!" by Michael T. Nygard fi). public static CircuitBreakerPolicy AdvancedCircuitBreaker( this PolicyBuilder policyBuilder, double failureThreshold, diff --git a/src/Polly/CircuitBreaker/AdvancedCircuitBreakerTResultSyntax.cs b/src/Polly/CircuitBreaker/AdvancedCircuitBreakerTResultSyntax.cs index 91c5a11d649..8dcc1b870c6 100644 --- a/src/Polly/CircuitBreaker/AdvancedCircuitBreakerTResultSyntax.cs +++ b/src/Polly/CircuitBreaker/AdvancedCircuitBreakerTResultSyntax.cs @@ -22,12 +22,12 @@ public static class AdvancedCircuitBreakerTResultSyntax /// The minimum throughput: this many actions or more must pass through the circuit in the timeslice, for statistics to be considered significant and the circuit-breaker to come into action. /// The duration the circuit will stay open before resetting. /// The policy instance. - /// failureThreshold;Value must be greater than zero - /// failureThreshold;Value must be less than or equal to one - /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer - /// minimumThroughput;Value must be greater than one - /// durationOfBreak;Value must be greater than zero - /// (see "Release It!" by Michael T. Nygard fi) + /// failureThreshold;Value must be greater than zero. + /// failureThreshold;Value must be less than or equal to one. + /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer. + /// minimumThroughput;Value must be greater than one. + /// durationOfBreak;Value must be greater than zero. + /// (see "Release It!" by Michael T. Nygard fi). public static CircuitBreakerPolicy AdvancedCircuitBreaker(this PolicyBuilder policyBuilder, double failureThreshold, TimeSpan samplingDuration, int minimumThroughput, TimeSpan durationOfBreak) { Action, TimeSpan> doNothingOnBreak = (_, _) => { }; @@ -58,14 +58,14 @@ public static CircuitBreakerPolicy AdvancedCircuitBreaker(this /// The action to call when the circuit transitions to an state. /// The action to call when the circuit resets to a state. /// The policy instance. - /// (see "Release It!" by Michael T. Nygard fi) - /// failureThreshold;Value must be greater than zero - /// failureThreshold;Value must be less than or equal to one - /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer - /// minimumThroughput;Value must be greater than one - /// durationOfBreak;Value must be greater than zero - /// onBreak - /// onReset + /// (see "Release It!" by Michael T. Nygard fi). + /// failureThreshold;Value must be greater than zero. + /// failureThreshold;Value must be less than or equal to one. + /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer. + /// minimumThroughput;Value must be greater than one. + /// durationOfBreak;Value must be greater than zero. + /// Thrown when is . + /// Thrown when is . public static CircuitBreakerPolicy AdvancedCircuitBreaker(this PolicyBuilder policyBuilder, double failureThreshold, TimeSpan samplingDuration, int minimumThroughput, TimeSpan durationOfBreak, Action, TimeSpan> onBreak, Action onReset) => policyBuilder.AdvancedCircuitBreaker( failureThreshold, samplingDuration, minimumThroughput, @@ -91,14 +91,14 @@ public static CircuitBreakerPolicy AdvancedCircuitBreaker(this /// The action to call when the circuit transitions to an state. /// The action to call when the circuit resets to a state. /// The policy instance. - /// (see "Release It!" by Michael T. Nygard fi) - /// failureThreshold;Value must be greater than zero - /// failureThreshold;Value must be less than or equal to one - /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer - /// minimumThroughput;Value must be greater than one - /// durationOfBreak;Value must be greater than zero - /// onBreak - /// onReset + /// (see "Release It!" by Michael T. Nygard fi). + /// failureThreshold;Value must be greater than zero. + /// failureThreshold;Value must be less than or equal to one. + /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer. + /// minimumThroughput;Value must be greater than one. + /// durationOfBreak;Value must be greater than zero. + /// Thrown when is . + /// Thrown when is . public static CircuitBreakerPolicy AdvancedCircuitBreaker(this PolicyBuilder policyBuilder, double failureThreshold, TimeSpan samplingDuration, int minimumThroughput, TimeSpan durationOfBreak, Action, TimeSpan, Context> onBreak, Action onReset) { Action doNothingOnHalfOpen = () => { }; @@ -128,15 +128,15 @@ public static CircuitBreakerPolicy AdvancedCircuitBreaker(this /// The action to call when the circuit resets to a state. /// The action to call when the circuit transitions to state, ready to try action executions again. /// The policy instance. - /// (see "Release It!" by Michael T. Nygard fi) - /// failureThreshold;Value must be greater than zero - /// failureThreshold;Value must be less than or equal to one - /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer - /// minimumThroughput;Value must be greater than one - /// durationOfBreak;Value must be greater than zero - /// onBreak - /// onReset - /// onHalfOpen + /// (see "Release It!" by Michael T. Nygard fi). + /// failureThreshold;Value must be greater than zero. + /// failureThreshold;Value must be less than or equal to one. + /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer. + /// minimumThroughput;Value must be greater than one. + /// durationOfBreak;Value must be greater than zero. + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static CircuitBreakerPolicy AdvancedCircuitBreaker(this PolicyBuilder policyBuilder, double failureThreshold, TimeSpan samplingDuration, int minimumThroughput, TimeSpan durationOfBreak, Action, TimeSpan> onBreak, Action onReset, Action onHalfOpen) => policyBuilder.AdvancedCircuitBreaker( failureThreshold, samplingDuration, minimumThroughput, @@ -166,15 +166,15 @@ public static CircuitBreakerPolicy AdvancedCircuitBreaker(this /// The action to call when the circuit resets to a state. /// The action to call when the circuit transitions to state, ready to try action executions again. /// The policy instance. - /// failureThreshold;Value must be greater than zero - /// failureThreshold;Value must be less than or equal to one - /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer - /// minimumThroughput;Value must be greater than one - /// durationOfBreak;Value must be greater than zero - /// onBreak - /// onReset - /// onHalfOpen - /// (see "Release It!" by Michael T. Nygard fi) + /// failureThreshold;Value must be greater than zero. + /// failureThreshold;Value must be less than or equal to one. + /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer. + /// minimumThroughput;Value must be greater than one. + /// durationOfBreak;Value must be greater than zero. + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// (see "Release It!" by Michael T. Nygard fi). public static CircuitBreakerPolicy AdvancedCircuitBreaker(this PolicyBuilder policyBuilder, double failureThreshold, TimeSpan samplingDuration, int minimumThroughput, TimeSpan durationOfBreak, Action, TimeSpan, Context> onBreak, Action onReset, Action onHalfOpen) => policyBuilder.AdvancedCircuitBreaker( failureThreshold, samplingDuration, minimumThroughput, @@ -204,15 +204,15 @@ public static CircuitBreakerPolicy AdvancedCircuitBreaker(this /// The action to call when the circuit resets to a state. /// The action to call when the circuit transitions to state, ready to try action executions again. /// The policy instance. - /// failureThreshold;Value must be greater than zero - /// failureThreshold;Value must be less than or equal to one - /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer - /// minimumThroughput;Value must be greater than one - /// durationOfBreak;Value must be greater than zero - /// onBreak - /// onReset - /// onHalfOpen - /// (see "Release It!" by Michael T. Nygard fi) + /// failureThreshold;Value must be greater than zero. + /// failureThreshold;Value must be less than or equal to one. + /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer. + /// minimumThroughput;Value must be greater than one. + /// durationOfBreak;Value must be greater than zero. + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . + /// (see "Release It!" by Michael T. Nygard fi). public static CircuitBreakerPolicy AdvancedCircuitBreaker( this PolicyBuilder policyBuilder, double failureThreshold, diff --git a/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerSyntax.cs b/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerSyntax.cs index 968d60a7aed..b5d464ac881 100644 --- a/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerSyntax.cs +++ b/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerSyntax.cs @@ -22,12 +22,12 @@ public static class AsyncAdvancedCircuitBreakerSyntax /// The minimum throughput: this many actions or more must pass through the circuit in the timeslice, for statistics to be considered significant and the circuit-breaker to come into action. /// The duration the circuit will stay open before resetting. /// The policy instance. - /// failureThreshold;Value must be greater than zero - /// failureThreshold;Value must be less than or equal to one - /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer - /// minimumThroughput;Value must be greater than one - /// durationOfBreak;Value must be greater than zero - /// (see "Release It!" by Michael T. Nygard fi) + /// failureThreshold;Value must be greater than zero. + /// failureThreshold;Value must be less than or equal to one. + /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer. + /// minimumThroughput;Value must be greater than one. + /// durationOfBreak;Value must be greater than zero. + /// (see "Release It!" by Michael T. Nygard fi). /// exceptionsAllowedBeforeBreaking;Value must be greater than zero. public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsync(this PolicyBuilder policyBuilder, double failureThreshold, TimeSpan samplingDuration, int minimumThroughput, TimeSpan durationOfBreak) { @@ -60,14 +60,14 @@ public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsync(this PolicyB /// The action to call when the circuit transitions to an state. /// The action to call when the circuit resets to a state. /// The policy instance. - /// (see "Release It!" by Michael T. Nygard fi) - /// failureThreshold;Value must be greater than zero - /// failureThreshold;Value must be less than or equal to one - /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer - /// minimumThroughput;Value must be greater than one - /// durationOfBreak;Value must be greater than zero - /// onBreak - /// onReset + /// (see "Release It!" by Michael T. Nygard fi). + /// failureThreshold;Value must be greater than zero. + /// failureThreshold;Value must be less than or equal to one. + /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer. + /// minimumThroughput;Value must be greater than one. + /// durationOfBreak;Value must be greater than zero. + /// Thrown when is . + /// Thrown when is . public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsync(this PolicyBuilder policyBuilder, double failureThreshold, TimeSpan samplingDuration, int minimumThroughput, TimeSpan durationOfBreak, Action onBreak, Action onReset) => policyBuilder.AdvancedCircuitBreakerAsync( failureThreshold, samplingDuration, minimumThroughput, @@ -94,14 +94,14 @@ public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsync(this PolicyB /// The action to call when the circuit transitions to an state. /// The action to call when the circuit resets to a state. /// The policy instance. - /// (see "Release It!" by Michael T. Nygard fi) - /// failureThreshold;Value must be greater than zero - /// failureThreshold;Value must be less than or equal to one - /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer - /// minimumThroughput;Value must be greater than one - /// durationOfBreak;Value must be greater than zero - /// onBreak - /// onReset + /// (see "Release It!" by Michael T. Nygard fi). + /// failureThreshold;Value must be greater than zero. + /// failureThreshold;Value must be less than or equal to one. + /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer. + /// minimumThroughput;Value must be greater than one. + /// durationOfBreak;Value must be greater than zero. + /// Thrown when is . + /// Thrown when is . public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsync(this PolicyBuilder policyBuilder, double failureThreshold, TimeSpan samplingDuration, int minimumThroughput, TimeSpan durationOfBreak, Action onBreak, Action onReset) { Action doNothingOnHalfOpen = () => { }; @@ -133,14 +133,14 @@ public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsync(this PolicyB /// The action to call when the circuit resets to a state. /// The action to call when the circuit transitions to state, ready to try action executions again. /// The policy instance. - /// (see "Release It!" by Michael T. Nygard fi) - /// failureThreshold;Value must be greater than zero - /// failureThreshold;Value must be less than or equal to one - /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer - /// minimumThroughput;Value must be greater than one - /// durationOfBreak;Value must be greater than zero - /// onBreak - /// onReset + /// (see "Release It!" by Michael T. Nygard fi). + /// failureThreshold;Value must be greater than zero. + /// failureThreshold;Value must be less than or equal to one. + /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer. + /// minimumThroughput;Value must be greater than one. + /// durationOfBreak;Value must be greater than zero. + /// Thrown when is . + /// Thrown when is . public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsync(this PolicyBuilder policyBuilder, double failureThreshold, TimeSpan samplingDuration, int minimumThroughput, TimeSpan durationOfBreak, Action onBreak, Action onReset, Action onHalfOpen) => policyBuilder.AdvancedCircuitBreakerAsync( failureThreshold, samplingDuration, minimumThroughput, @@ -169,15 +169,15 @@ public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsync(this PolicyB /// The action to call when the circuit resets to a state. /// The action to call when the circuit transitions to state, ready to try action executions again. /// The policy instance. - /// (see "Release It!" by Michael T. Nygard fi) - /// failureThreshold;Value must be greater than zero - /// failureThreshold;Value must be less than or equal to one - /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer - /// minimumThroughput;Value must be greater than one - /// durationOfBreak;Value must be greater than zero - /// onBreak - /// onReset - /// onHalfOpen + /// (see "Release It!" by Michael T. Nygard fi). + /// failureThreshold;Value must be greater than zero. + /// failureThreshold;Value must be less than or equal to one. + /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer. + /// minimumThroughput;Value must be greater than one. + /// durationOfBreak;Value must be greater than zero. + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsync(this PolicyBuilder policyBuilder, double failureThreshold, TimeSpan samplingDuration, int minimumThroughput, TimeSpan durationOfBreak, Action onBreak, Action onReset, Action onHalfOpen) => policyBuilder.AdvancedCircuitBreakerAsync( failureThreshold, samplingDuration, minimumThroughput, @@ -206,15 +206,15 @@ public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsync(this PolicyB /// The action to call when the circuit resets to a state. /// The action to call when the circuit transitions to state, ready to try action executions again. /// The policy instance. - /// (see "Release It!" by Michael T. Nygard fi) - /// failureThreshold;Value must be greater than zero - /// failureThreshold;Value must be less than or equal to one - /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer - /// minimumThroughput;Value must be greater than one - /// durationOfBreak;Value must be greater than zero - /// onBreak - /// onReset - /// onHalfOpen + /// (see "Release It!" by Michael T. Nygard fi). + /// failureThreshold;Value must be greater than zero. + /// failureThreshold;Value must be less than or equal to one. + /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer. + /// minimumThroughput;Value must be greater than one. + /// durationOfBreak;Value must be greater than zero. + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsync( this PolicyBuilder policyBuilder, double failureThreshold, diff --git a/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerTResultSyntax.cs b/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerTResultSyntax.cs index a31f374338c..a3efca75b3d 100644 --- a/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerTResultSyntax.cs +++ b/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerTResultSyntax.cs @@ -22,12 +22,12 @@ public static class AsyncAdvancedCircuitBreakerTResultSyntax /// The minimum throughput: this many actions or more must pass through the circuit in the timeslice, for statistics to be considered significant and the circuit-breaker to come into action. /// The duration the circuit will stay open before resetting. /// The policy instance. - /// (see "Release It!" by Michael T. Nygard fi) - /// failureThreshold;Value must be greater than zero - /// failureThreshold;Value must be less than or equal to one - /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer - /// minimumThroughput;Value must be greater than one - /// durationOfBreak;Value must be greater than zero + /// (see "Release It!" by Michael T. Nygard fi). + /// failureThreshold;Value must be greater than zero. + /// failureThreshold;Value must be less than or equal to one. + /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer. + /// minimumThroughput;Value must be greater than one. + /// durationOfBreak;Value must be greater than zero. public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsync(this PolicyBuilder policyBuilder, double failureThreshold, TimeSpan samplingDuration, int minimumThroughput, TimeSpan durationOfBreak) { Action, TimeSpan> doNothingOnBreak = (_, _) => { }; @@ -59,14 +59,14 @@ public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsyncThe action to call when the circuit transitions to an state. /// The action to call when the circuit resets to a state. /// The policy instance. - /// (see "Release It!" by Michael T. Nygard fi) - /// failureThreshold;Value must be greater than zero - /// failureThreshold;Value must be less than or equal to one - /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer - /// minimumThroughput;Value must be greater than one - /// durationOfBreak;Value must be greater than zero - /// onBreak - /// onReset + /// (see "Release It!" by Michael T. Nygard fi). + /// failureThreshold;Value must be greater than zero. + /// failureThreshold;Value must be less than or equal to one. + /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer. + /// minimumThroughput;Value must be greater than one. + /// durationOfBreak;Value must be greater than zero. + /// Thrown when is . + /// Thrown when is . public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsync(this PolicyBuilder policyBuilder, double failureThreshold, TimeSpan samplingDuration, int minimumThroughput, TimeSpan durationOfBreak, Action, TimeSpan> onBreak, Action onReset) => policyBuilder.AdvancedCircuitBreakerAsync( failureThreshold, samplingDuration, minimumThroughput, @@ -93,14 +93,14 @@ public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsyncThe action to call when the circuit transitions to an state. /// The action to call when the circuit resets to a state. /// The policy instance. - /// (see "Release It!" by Michael T. Nygard fi) - /// failureThreshold;Value must be greater than zero - /// failureThreshold;Value must be less than or equal to one - /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer - /// minimumThroughput;Value must be greater than one - /// durationOfBreak;Value must be greater than zero - /// onBreak - /// onReset + /// (see "Release It!" by Michael T. Nygard fi). + /// failureThreshold;Value must be greater than zero. + /// failureThreshold;Value must be less than or equal to one. + /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer. + /// minimumThroughput;Value must be greater than one. + /// durationOfBreak;Value must be greater than zero. + /// Thrown when is . + /// Thrown when is . public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsync(this PolicyBuilder policyBuilder, double failureThreshold, TimeSpan samplingDuration, int minimumThroughput, TimeSpan durationOfBreak, Action, TimeSpan, Context> onBreak, Action onReset) { Action doNothingOnHalfOpen = () => { }; @@ -133,14 +133,14 @@ public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsyncThe action to call when the circuit resets to a state. /// The action to call when the circuit transitions to state, ready to try action executions again. /// The policy instance. - /// (see "Release It!" by Michael T. Nygard fi) - /// failureThreshold;Value must be greater than zero - /// failureThreshold;Value must be less than or equal to one - /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer - /// minimumThroughput;Value must be greater than one - /// durationOfBreak;Value must be greater than zero - /// onBreak - /// onReset + /// (see "Release It!" by Michael T. Nygard fi). + /// failureThreshold;Value must be greater than zero. + /// failureThreshold;Value must be less than or equal to one. + /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer. + /// minimumThroughput;Value must be greater than one. + /// durationOfBreak;Value must be greater than zero. + /// Thrown when is . + /// Thrown when is . public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsync(this PolicyBuilder policyBuilder, double failureThreshold, TimeSpan samplingDuration, int minimumThroughput, TimeSpan durationOfBreak, Action, TimeSpan> onBreak, Action onReset, Action onHalfOpen) => policyBuilder.AdvancedCircuitBreakerAsync( failureThreshold, samplingDuration, minimumThroughput, @@ -169,15 +169,15 @@ public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsyncThe action to call when the circuit resets to a state. /// The action to call when the circuit transitions to state, ready to try action executions again. /// The policy instance. - /// (see "Release It!" by Michael T. Nygard fi) - /// failureThreshold;Value must be greater than zero - /// failureThreshold;Value must be less than or equal to one - /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer - /// minimumThroughput;Value must be greater than one - /// durationOfBreak;Value must be greater than zero - /// onBreak - /// onReset - /// onHalfOpen + /// (see "Release It!" by Michael T. Nygard fi). + /// failureThreshold;Value must be greater than zero. + /// failureThreshold;Value must be less than or equal to one. + /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer. + /// minimumThroughput;Value must be greater than one. + /// durationOfBreak;Value must be greater than zero. + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsync(this PolicyBuilder policyBuilder, double failureThreshold, TimeSpan samplingDuration, int minimumThroughput, TimeSpan durationOfBreak, Action, TimeSpan, Context> onBreak, Action onReset, Action onHalfOpen) => policyBuilder.AdvancedCircuitBreakerAsync( failureThreshold, samplingDuration, minimumThroughput, @@ -206,15 +206,15 @@ public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsyncThe action to call when the circuit resets to a state. /// The action to call when the circuit transitions to state, ready to try action executions again. /// The policy instance. - /// (see "Release It!" by Michael T. Nygard fi) - /// failureThreshold;Value must be greater than zero - /// failureThreshold;Value must be less than or equal to one - /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer - /// minimumThroughput;Value must be greater than one - /// durationOfBreak;Value must be greater than zero - /// onBreak - /// onReset - /// onHalfOpen + /// (see "Release It!" by Michael T. Nygard fi). + /// failureThreshold;Value must be greater than zero. + /// failureThreshold;Value must be less than or equal to one. + /// samplingDuration;Value must be equal to or greater than the minimum resolution of the CircuitBreaker timer. + /// minimumThroughput;Value must be greater than one. + /// durationOfBreak;Value must be greater than zero. + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsync(this PolicyBuilder policyBuilder, double failureThreshold, TimeSpan samplingDuration, int minimumThroughput, TimeSpan durationOfBreak, Action, CircuitState, TimeSpan, Context> onBreak, Action onReset, Action onHalfOpen) { var resolutionOfCircuit = TimeSpan.FromTicks(AdvancedCircuitController.ResolutionOfCircuitTimer); diff --git a/src/Polly/CircuitBreaker/AsyncCircuitBreakerSyntax.cs b/src/Polly/CircuitBreaker/AsyncCircuitBreakerSyntax.cs index 04f244fe7cb..557469c8038 100644 --- a/src/Polly/CircuitBreaker/AsyncCircuitBreakerSyntax.cs +++ b/src/Polly/CircuitBreaker/AsyncCircuitBreakerSyntax.cs @@ -21,7 +21,7 @@ public static class AsyncCircuitBreakerSyntax /// The number of exceptions that are allowed before opening the circuit. /// The duration the circuit will stay open before resetting. /// The policy instance. - /// (see "Release It!" by Michael T. Nygard fi) + /// (see "Release It!" by Michael T. Nygard fi). /// exceptionsAllowedBeforeBreaking;Value must be greater than zero. public static AsyncCircuitBreakerPolicy CircuitBreakerAsync(this PolicyBuilder policyBuilder, int exceptionsAllowedBeforeBreaking, TimeSpan durationOfBreak) { @@ -53,10 +53,10 @@ public static AsyncCircuitBreakerPolicy CircuitBreakerAsync(this PolicyBuilder p /// The action to call when the circuit transitions to an state. /// The action to call when the circuit resets to a state. /// The policy instance. - /// (see "Release It!" by Michael T. Nygard fi) + /// (see "Release It!" by Michael T. Nygard fi). /// exceptionsAllowedBeforeBreaking;Value must be greater than zero. - /// onBreak - /// onReset + /// Thrown when is . + /// Thrown when is . public static AsyncCircuitBreakerPolicy CircuitBreakerAsync(this PolicyBuilder policyBuilder, int exceptionsAllowedBeforeBreaking, TimeSpan durationOfBreak, Action onBreak, Action onReset) => policyBuilder.CircuitBreakerAsync( exceptionsAllowedBeforeBreaking, @@ -82,10 +82,10 @@ public static AsyncCircuitBreakerPolicy CircuitBreakerAsync(this PolicyBuilder p /// The action to call when the circuit transitions to an state. /// The action to call when the circuit resets to a state. /// The policy instance. - /// (see "Release It!" by Michael T. Nygard fi) + /// (see "Release It!" by Michael T. Nygard fi). /// exceptionsAllowedBeforeBreaking;Value must be greater than zero. - /// onBreak - /// onReset + /// Thrown when is . + /// Thrown when is . public static AsyncCircuitBreakerPolicy CircuitBreakerAsync(this PolicyBuilder policyBuilder, int exceptionsAllowedBeforeBreaking, TimeSpan durationOfBreak, Action onBreak, Action onReset) { Action doNothingOnHalfOpen = () => { }; @@ -117,10 +117,10 @@ public static AsyncCircuitBreakerPolicy CircuitBreakerAsync(this PolicyBuilder p /// The action to call when the circuit resets to a state. /// The action to call when the circuit transitions to state, ready to try action executions again. /// The policy instance. - /// (see "Release It!" by Michael T. Nygard fi) + /// (see "Release It!" by Michael T. Nygard fi). /// exceptionsAllowedBeforeBreaking;Value must be greater than zero. - /// onBreak - /// onReset + /// Thrown when is . + /// Thrown when is . public static AsyncCircuitBreakerPolicy CircuitBreakerAsync(this PolicyBuilder policyBuilder, int exceptionsAllowedBeforeBreaking, TimeSpan durationOfBreak, Action onBreak, Action onReset, Action onHalfOpen) => policyBuilder.CircuitBreakerAsync( exceptionsAllowedBeforeBreaking, @@ -148,11 +148,11 @@ public static AsyncCircuitBreakerPolicy CircuitBreakerAsync(this PolicyBuilder p /// The action to call when the circuit resets to a state. /// The action to call when the circuit transitions to state, ready to try action executions again. /// The policy instance. - /// (see "Release It!" by Michael T. Nygard fi) + /// (see "Release It!" by Michael T. Nygard fi). /// exceptionsAllowedBeforeBreaking;Value must be greater than zero. - /// onBreak - /// onReset - /// onHalfOpen + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static AsyncCircuitBreakerPolicy CircuitBreakerAsync(this PolicyBuilder policyBuilder, int exceptionsAllowedBeforeBreaking, TimeSpan durationOfBreak, Action onBreak, Action onReset, Action onHalfOpen) => policyBuilder.CircuitBreakerAsync( exceptionsAllowedBeforeBreaking, @@ -180,11 +180,11 @@ public static AsyncCircuitBreakerPolicy CircuitBreakerAsync(this PolicyBuilder p /// The action to call when the circuit resets to a state. /// The action to call when the circuit transitions to state, ready to try action executions again. /// The policy instance. - /// (see "Release It!" by Michael T. Nygard fi) + /// (see "Release It!" by Michael T. Nygard fi). /// exceptionsAllowedBeforeBreaking;Value must be greater than zero. - /// onBreak - /// onReset - /// onHalfOpen + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static AsyncCircuitBreakerPolicy CircuitBreakerAsync(this PolicyBuilder policyBuilder, int exceptionsAllowedBeforeBreaking, TimeSpan durationOfBreak, Action onBreak, Action onReset, Action onHalfOpen) { if (exceptionsAllowedBeforeBreaking <= 0) diff --git a/src/Polly/CircuitBreaker/AsyncCircuitBreakerTResultSyntax.cs b/src/Polly/CircuitBreaker/AsyncCircuitBreakerTResultSyntax.cs index 4885ab1acb3..71e965a3ada 100644 --- a/src/Polly/CircuitBreaker/AsyncCircuitBreakerTResultSyntax.cs +++ b/src/Polly/CircuitBreaker/AsyncCircuitBreakerTResultSyntax.cs @@ -21,7 +21,7 @@ public static class AsyncCircuitBreakerTResultSyntax /// The number of exceptions or handled results that are allowed before opening the circuit. /// The duration the circuit will stay open before resetting. /// The policy instance. - /// (see "Release It!" by Michael T. Nygard fi) + /// (see "Release It!" by Michael T. Nygard fi). /// handledEventsAllowedBeforeBreaking;Value must be greater than zero. public static AsyncCircuitBreakerPolicy CircuitBreakerAsync(this PolicyBuilder policyBuilder, int handledEventsAllowedBeforeBreaking, TimeSpan durationOfBreak) { @@ -53,10 +53,10 @@ public static AsyncCircuitBreakerPolicy CircuitBreakerAsync(th /// The action to call when the circuit transitions to an state. /// The action to call when the circuit resets to a state. /// The policy instance. - /// (see "Release It!" by Michael T. Nygard fi) + /// (see "Release It!" by Michael T. Nygard fi). /// handledEventsAllowedBeforeBreaking;Value must be greater than zero. - /// onBreak - /// onReset + /// Thrown when is . + /// Thrown when is . public static AsyncCircuitBreakerPolicy CircuitBreakerAsync(this PolicyBuilder policyBuilder, int handledEventsAllowedBeforeBreaking, TimeSpan durationOfBreak, Action, TimeSpan> onBreak, Action onReset) => policyBuilder.CircuitBreakerAsync( handledEventsAllowedBeforeBreaking, @@ -82,10 +82,10 @@ public static AsyncCircuitBreakerPolicy CircuitBreakerAsync(th /// The action to call when the circuit transitions to an state. /// The action to call when the circuit resets to a state. /// The policy instance. - /// (see "Release It!" by Michael T. Nygard fi) + /// (see "Release It!" by Michael T. Nygard fi). /// handledEventsAllowedBeforeBreaking;Value must be greater than zero. - /// onBreak - /// onReset + /// Thrown when is . + /// Thrown when is . public static AsyncCircuitBreakerPolicy CircuitBreakerAsync(this PolicyBuilder policyBuilder, int handledEventsAllowedBeforeBreaking, TimeSpan durationOfBreak, Action, TimeSpan, Context> onBreak, Action onReset) { Action doNothingOnHalfOpen = () => { }; @@ -117,10 +117,10 @@ public static AsyncCircuitBreakerPolicy CircuitBreakerAsync(th /// The action to call when the circuit resets to a state. /// The action to call when the circuit transitions to state, ready to try action executions again. /// The policy instance. - /// (see "Release It!" by Michael T. Nygard fi) + /// (see "Release It!" by Michael T. Nygard fi). /// handledEventsAllowedBeforeBreaking;Value must be greater than zero. - /// onBreak - /// onReset + /// Thrown when is . + /// Thrown when is . public static AsyncCircuitBreakerPolicy CircuitBreakerAsync(this PolicyBuilder policyBuilder, int handledEventsAllowedBeforeBreaking, TimeSpan durationOfBreak, Action, TimeSpan> onBreak, Action onReset, Action onHalfOpen) => policyBuilder.CircuitBreakerAsync( handledEventsAllowedBeforeBreaking, @@ -148,11 +148,11 @@ public static AsyncCircuitBreakerPolicy CircuitBreakerAsync(th /// The action to call when the circuit resets to a state. /// The action to call when the circuit transitions to state, ready to try action executions again. /// The policy instance. - /// (see "Release It!" by Michael T. Nygard fi) + /// (see "Release It!" by Michael T. Nygard fi). /// handledEventsAllowedBeforeBreaking;Value must be greater than zero. - /// onBreak - /// onReset - /// onHalfOpen + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static AsyncCircuitBreakerPolicy CircuitBreakerAsync(this PolicyBuilder policyBuilder, int handledEventsAllowedBeforeBreaking, TimeSpan durationOfBreak, Action, TimeSpan, Context> onBreak, Action onReset, Action onHalfOpen) => policyBuilder.CircuitBreakerAsync( handledEventsAllowedBeforeBreaking, @@ -180,11 +180,11 @@ public static AsyncCircuitBreakerPolicy CircuitBreakerAsync(th /// The action to call when the circuit resets to a state. /// The action to call when the circuit transitions to state, ready to try action executions again. /// The policy instance. - /// (see "Release It!" by Michael T. Nygard fi) + /// (see "Release It!" by Michael T. Nygard fi). /// handledEventsAllowedBeforeBreaking;Value must be greater than zero. - /// onBreak - /// onReset - /// onHalfOpen + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static AsyncCircuitBreakerPolicy CircuitBreakerAsync(this PolicyBuilder policyBuilder, int handledEventsAllowedBeforeBreaking, TimeSpan durationOfBreak, Action, CircuitState, TimeSpan, Context> onBreak, Action onReset, Action onHalfOpen) { if (handledEventsAllowedBeforeBreaking <= 0) diff --git a/src/Polly/CircuitBreaker/CircuitBreakerSyntax.cs b/src/Polly/CircuitBreaker/CircuitBreakerSyntax.cs index a321cf994c5..2b80229d05c 100644 --- a/src/Polly/CircuitBreaker/CircuitBreakerSyntax.cs +++ b/src/Polly/CircuitBreaker/CircuitBreakerSyntax.cs @@ -21,10 +21,10 @@ public static class CircuitBreakerSyntax /// The number of exceptions that are allowed before opening the circuit. /// The duration the circuit will stay open before resetting. /// The policy instance. - /// (see "Release It!" by Michael T. Nygard fi) + /// (see "Release It!" by Michael T. Nygard fi). /// exceptionsAllowedBeforeBreaking;Value must be greater than zero. - /// onBreak - /// onReset + /// Thrown when is . + /// Thrown when is . public static CircuitBreakerPolicy CircuitBreaker(this PolicyBuilder policyBuilder, int exceptionsAllowedBeforeBreaking, TimeSpan durationOfBreak) { Action doNothingOnBreak = (_, _) => { }; @@ -55,10 +55,10 @@ public static CircuitBreakerPolicy CircuitBreaker(this PolicyBuilder policyBuild /// The action to call when the circuit transitions to an state. /// The action to call when the circuit resets to a state. /// The policy instance. - /// (see "Release It!" by Michael T. Nygard fi) + /// (see "Release It!" by Michael T. Nygard fi). /// exceptionsAllowedBeforeBreaking;Value must be greater than zero. - /// onBreak - /// onReset + /// Thrown when is . + /// Thrown when is . public static CircuitBreakerPolicy CircuitBreaker(this PolicyBuilder policyBuilder, int exceptionsAllowedBeforeBreaking, TimeSpan durationOfBreak, Action onBreak, Action onReset) => policyBuilder.CircuitBreaker( exceptionsAllowedBeforeBreaking, @@ -84,10 +84,10 @@ public static CircuitBreakerPolicy CircuitBreaker(this PolicyBuilder policyBuild /// The action to call when the circuit transitions to an state. /// The action to call when the circuit resets to a state. /// The policy instance. - /// (see "Release It!" by Michael T. Nygard fi) + /// (see "Release It!" by Michael T. Nygard fi). /// exceptionsAllowedBeforeBreaking;Value must be greater than zero. - /// onBreak - /// onReset + /// Thrown when is . + /// Thrown when is . public static CircuitBreakerPolicy CircuitBreaker(this PolicyBuilder policyBuilder, int exceptionsAllowedBeforeBreaking, TimeSpan durationOfBreak, Action onBreak, Action onReset) { Action doNothingOnHalfOpen = () => { }; @@ -118,10 +118,10 @@ public static CircuitBreakerPolicy CircuitBreaker(this PolicyBuilder policyBuild /// The action to call when the circuit resets to a state. /// The action to call when the circuit transitions to state, ready to try action executions again. /// The policy instance. - /// (see "Release It!" by Michael T. Nygard fi) + /// (see "Release It!" by Michael T. Nygard fi). /// exceptionsAllowedBeforeBreaking;Value must be greater than zero. - /// onBreak - /// onReset + /// Thrown when is . + /// Thrown when is . public static CircuitBreakerPolicy CircuitBreaker(this PolicyBuilder policyBuilder, int exceptionsAllowedBeforeBreaking, TimeSpan durationOfBreak, Action onBreak, Action onReset, Action onHalfOpen) => policyBuilder.CircuitBreaker( exceptionsAllowedBeforeBreaking, @@ -149,11 +149,11 @@ public static CircuitBreakerPolicy CircuitBreaker(this PolicyBuilder policyBuild /// The action to call when the circuit resets to a state. /// The action to call when the circuit transitions to state, ready to try action executions again. /// The policy instance. - /// (see "Release It!" by Michael T. Nygard fi) + /// (see "Release It!" by Michael T. Nygard fi). /// exceptionsAllowedBeforeBreaking;Value must be greater than zero. - /// onBreak - /// onReset - /// onHalfOpen + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static CircuitBreakerPolicy CircuitBreaker(this PolicyBuilder policyBuilder, int exceptionsAllowedBeforeBreaking, TimeSpan durationOfBreak, Action onBreak, Action onReset, Action onHalfOpen) => policyBuilder.CircuitBreaker( exceptionsAllowedBeforeBreaking, @@ -181,11 +181,11 @@ public static CircuitBreakerPolicy CircuitBreaker(this PolicyBuilder policyBuild /// The action to call when the circuit resets to a state. /// The action to call when the circuit transitions to state, ready to try action executions again. /// The policy instance. - /// (see "Release It!" by Michael T. Nygard fi) + /// (see "Release It!" by Michael T. Nygard fi). /// exceptionsAllowedBeforeBreaking;Value must be greater than zero. - /// onBreak - /// onReset - /// onHalfOpen + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static CircuitBreakerPolicy CircuitBreaker(this PolicyBuilder policyBuilder, int exceptionsAllowedBeforeBreaking, TimeSpan durationOfBreak, Action onBreak, Action onReset, Action onHalfOpen) { if (exceptionsAllowedBeforeBreaking <= 0) diff --git a/src/Polly/CircuitBreaker/CircuitBreakerTResultSyntax.cs b/src/Polly/CircuitBreaker/CircuitBreakerTResultSyntax.cs index 99873ab0421..5861ae75acb 100644 --- a/src/Polly/CircuitBreaker/CircuitBreakerTResultSyntax.cs +++ b/src/Polly/CircuitBreaker/CircuitBreakerTResultSyntax.cs @@ -21,10 +21,10 @@ public static class CircuitBreakerTResultSyntax /// The number of exceptions or handled results that are allowed before opening the circuit. /// The duration the circuit will stay open before resetting. /// The policy instance. - /// (see "Release It!" by Michael T. Nygard fi) + /// (see "Release It!" by Michael T. Nygard fi). /// handledEventsAllowedBeforeBreaking;Value must be greater than zero. - /// onBreak - /// onReset + /// Thrown when is . + /// Thrown when is . public static CircuitBreakerPolicy CircuitBreaker(this PolicyBuilder policyBuilder, int handledEventsAllowedBeforeBreaking, TimeSpan durationOfBreak) { Action, TimeSpan> doNothingOnBreak = (_, _) => { }; @@ -55,10 +55,10 @@ public static CircuitBreakerPolicy CircuitBreaker(this PolicyB /// The action to call when the circuit transitions to an state. /// The action to call when the circuit resets to a state. /// The policy instance. - /// (see "Release It!" by Michael T. Nygard fi) + /// (see "Release It!" by Michael T. Nygard fi). /// handledEventsAllowedBeforeBreaking;Value must be greater than zero. - /// onBreak - /// onReset + /// Thrown when is . + /// Thrown when is . public static CircuitBreakerPolicy CircuitBreaker(this PolicyBuilder policyBuilder, int handledEventsAllowedBeforeBreaking, TimeSpan durationOfBreak, Action, TimeSpan> onBreak, Action onReset) => policyBuilder.CircuitBreaker( handledEventsAllowedBeforeBreaking, @@ -84,10 +84,10 @@ public static CircuitBreakerPolicy CircuitBreaker(this PolicyB /// The action to call when the circuit transitions to an state. /// The action to call when the circuit resets to a state. /// The policy instance. - /// (see "Release It!" by Michael T. Nygard fi) + /// (see "Release It!" by Michael T. Nygard fi). /// handledEventsAllowedBeforeBreaking;Value must be greater than zero. - /// onBreak - /// onReset + /// Thrown when is . + /// Thrown when is . public static CircuitBreakerPolicy CircuitBreaker(this PolicyBuilder policyBuilder, int handledEventsAllowedBeforeBreaking, TimeSpan durationOfBreak, Action, TimeSpan, Context> onBreak, Action onReset) { Action doNothingOnHalfOpen = () => { }; @@ -118,10 +118,10 @@ public static CircuitBreakerPolicy CircuitBreaker(this PolicyB /// The action to call when the circuit resets to a state. /// The action to call when the circuit transitions to state, ready to try action executions again. /// The policy instance. - /// (see "Release It!" by Michael T. Nygard fi) + /// (see "Release It!" by Michael T. Nygard fi). /// handledEventsAllowedBeforeBreaking;Value must be greater than zero. - /// onBreak - /// onReset + /// Thrown when is . + /// Thrown when is . public static CircuitBreakerPolicy CircuitBreaker(this PolicyBuilder policyBuilder, int handledEventsAllowedBeforeBreaking, TimeSpan durationOfBreak, Action, TimeSpan> onBreak, Action onReset, Action onHalfOpen) => policyBuilder.CircuitBreaker( handledEventsAllowedBeforeBreaking, @@ -149,11 +149,11 @@ public static CircuitBreakerPolicy CircuitBreaker(this PolicyB /// The action to call when the circuit resets to a state. /// The action to call when the circuit transitions to state, ready to try action executions again. /// The policy instance. - /// (see "Release It!" by Michael T. Nygard fi) + /// (see "Release It!" by Michael T. Nygard fi). /// handledEventsAllowedBeforeBreaking;Value must be greater than zero. - /// onBreak - /// onReset - /// onHalfOpen + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static CircuitBreakerPolicy CircuitBreaker(this PolicyBuilder policyBuilder, int handledEventsAllowedBeforeBreaking, TimeSpan durationOfBreak, Action, TimeSpan, Context> onBreak, Action onReset, Action onHalfOpen) => policyBuilder.CircuitBreaker( handledEventsAllowedBeforeBreaking, @@ -181,11 +181,11 @@ public static CircuitBreakerPolicy CircuitBreaker(this PolicyB /// The action to call when the circuit resets to a state. /// The action to call when the circuit transitions to state, ready to try action executions again. /// The policy instance. - /// (see "Release It!" by Michael T. Nygard fi) + /// (see "Release It!" by Michael T. Nygard fi). /// handledEventsAllowedBeforeBreaking;Value must be greater than zero. - /// onBreak - /// onReset - /// onHalfOpen + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . public static CircuitBreakerPolicy CircuitBreaker(this PolicyBuilder policyBuilder, int handledEventsAllowedBeforeBreaking, TimeSpan durationOfBreak, Action, CircuitState, TimeSpan, Context> onBreak, Action onReset, Action onHalfOpen) { if (handledEventsAllowedBeforeBreaking <= 0) diff --git a/src/Polly/DelegateResult.cs b/src/Polly/DelegateResult.cs index c63922ff1f6..03ed21f7cac 100644 --- a/src/Polly/DelegateResult.cs +++ b/src/Polly/DelegateResult.cs @@ -1,18 +1,18 @@ namespace Polly; /// -/// The captured outcome of executing an individual Func<TResult> +/// The captured outcome of executing an individual Func<TResult>. /// public class DelegateResult { /// - /// Create an instance of representing an execution which returned + /// Create an instance of representing an execution which returned . /// /// The result. public DelegateResult(TResult result) => Result = result; /// - /// Create an instance of representing an execution which threw + /// Create an instance of representing an execution which threw . /// /// The exception. public DelegateResult(Exception exception) => diff --git a/src/Polly/Fallback/AsyncFallbackSyntax.cs b/src/Polly/Fallback/AsyncFallbackSyntax.cs index c11741c422c..31009c0b54a 100644 --- a/src/Polly/Fallback/AsyncFallbackSyntax.cs +++ b/src/Polly/Fallback/AsyncFallbackSyntax.cs @@ -12,7 +12,7 @@ public static class AsyncFallbackSyntax /// /// The policy builder. /// The fallback delegate. - /// fallbackAction + /// Thrown when is . /// The policy instance. public static AsyncFallbackPolicy FallbackAsync(this PolicyBuilder policyBuilder, Func fallbackAction) { @@ -31,8 +31,8 @@ public static AsyncFallbackPolicy FallbackAsync(this PolicyBuilder policyBuilder /// The policy builder. /// The fallback delegate. /// The action to call asynchronously before invoking the fallback delegate. - /// fallbackAction - /// onFallbackAsync + /// Thrown when is . + /// Thrown when is . /// The policy instance. public static AsyncFallbackPolicy FallbackAsync(this PolicyBuilder policyBuilder, Func fallbackAction, Func onFallbackAsync) { @@ -52,8 +52,8 @@ public static AsyncFallbackPolicy FallbackAsync(this PolicyBuilder policyBuilder /// The policy builder. /// The fallback delegate. /// The action to call asynchronously before invoking the fallback delegate. - /// fallbackAction - /// onFallbackAsync + /// Thrown when is . + /// Thrown when is . /// The policy instance. public static AsyncFallbackPolicy FallbackAsync(this PolicyBuilder policyBuilder, Func fallbackAction, Func onFallbackAsync) { @@ -71,8 +71,8 @@ public static AsyncFallbackPolicy FallbackAsync(this PolicyBuilder policyBuilder /// The policy builder. /// The fallback delegate. /// The action to call asynchronously before invoking the fallback delegate. - /// fallbackAction - /// onFallbackAsync + /// Thrown when is . + /// Thrown when is . /// The policy instance. public static AsyncFallbackPolicy FallbackAsync(this PolicyBuilder policyBuilder, Func fallbackAction, Func onFallbackAsync) { @@ -109,7 +109,7 @@ public static AsyncFallbackPolicy FallbackAsync(this PolicyBui /// /// The policy builder. /// The fallback delegate. - /// fallbackAction + /// Thrown when is . /// The policy instance. public static AsyncFallbackPolicy FallbackAsync(this PolicyBuilder policyBuilder, Func> fallbackAction) { @@ -128,7 +128,7 @@ public static AsyncFallbackPolicy FallbackAsync(this PolicyBui /// The policy builder. /// The fallback value to provide. /// The action to call asynchronously before invoking the fallback delegate. - /// onFallbackAsync + /// Thrown when is . /// The policy instance. public static AsyncFallbackPolicy FallbackAsync(this PolicyBuilder policyBuilder, TResult fallbackValue, Func, Task> onFallbackAsync) { @@ -146,8 +146,8 @@ public static AsyncFallbackPolicy FallbackAsync(this PolicyBui /// The policy builder. /// The fallback delegate. /// The action to call asynchronously before invoking the fallback delegate. - /// fallbackAction - /// onFallbackAsync + /// Thrown when is . + /// Thrown when is . /// The policy instance. public static AsyncFallbackPolicy FallbackAsync(this PolicyBuilder policyBuilder, Func> fallbackAction, Func, Task> onFallbackAsync) { @@ -167,7 +167,7 @@ public static AsyncFallbackPolicy FallbackAsync(this PolicyBui /// The policy builder. /// The fallback value to provide. /// The action to call asynchronously before invoking the fallback delegate. - /// onFallbackAsync + /// Thrown when is . /// The policy instance. public static AsyncFallbackPolicy FallbackAsync(this PolicyBuilder policyBuilder, TResult fallbackValue, Func, Context, Task> onFallbackAsync) { @@ -185,8 +185,8 @@ public static AsyncFallbackPolicy FallbackAsync(this PolicyBui /// The policy builder. /// The fallback delegate. /// The action to call asynchronously before invoking the fallback delegate. - /// fallbackAction - /// onFallbackAsync + /// Thrown when is . + /// Thrown when is . /// The policy instance. public static AsyncFallbackPolicy FallbackAsync(this PolicyBuilder policyBuilder, Func> fallbackAction, Func, Context, Task> onFallbackAsync) { @@ -204,8 +204,8 @@ public static AsyncFallbackPolicy FallbackAsync(this PolicyBui /// The policy builder. /// The fallback delegate. /// The action to call asynchronously before invoking the fallback delegate. - /// fallbackAction - /// onFallbackAsync + /// Thrown when is . + /// Thrown when is . /// The policy instance. public static AsyncFallbackPolicy FallbackAsync(this PolicyBuilder policyBuilder, Func, Context, CancellationToken, Task> fallbackAction, Func, Context, Task> onFallbackAsync) { diff --git a/src/Polly/Fallback/FallbackSyntax.cs b/src/Polly/Fallback/FallbackSyntax.cs index d1551c2e2fa..d64ae981854 100644 --- a/src/Polly/Fallback/FallbackSyntax.cs +++ b/src/Polly/Fallback/FallbackSyntax.cs @@ -12,7 +12,7 @@ public static class FallbackSyntax /// /// The policy builder. /// The fallback action. - /// fallbackAction + /// Thrown when is . /// The policy instance. public static FallbackPolicy Fallback(this PolicyBuilder policyBuilder, Action fallbackAction) { @@ -28,7 +28,7 @@ public static FallbackPolicy Fallback(this PolicyBuilder policyBuilder, Action f /// /// The policy builder. /// The fallback action. - /// fallbackAction + /// Thrown when is . /// The policy instance. public static FallbackPolicy Fallback(this PolicyBuilder policyBuilder, Action fallbackAction) { @@ -45,8 +45,8 @@ public static FallbackPolicy Fallback(this PolicyBuilder policyBuilder, ActionThe policy builder. /// The fallback action. /// The action to call before invoking the fallback delegate. - /// fallbackAction - /// onFallback + /// Thrown when is . + /// Thrown when is . /// The policy instance. public static FallbackPolicy Fallback(this PolicyBuilder policyBuilder, Action fallbackAction, Action onFallback) { @@ -64,8 +64,8 @@ public static FallbackPolicy Fallback(this PolicyBuilder policyBuilder, Action f /// The policy builder. /// The fallback action. /// The action to call before invoking the fallback delegate. - /// fallbackAction - /// onFallback + /// Thrown when is . + /// Thrown when is . /// The policy instance. public static FallbackPolicy Fallback(this PolicyBuilder policyBuilder, Action fallbackAction, Action onFallback) { @@ -83,8 +83,8 @@ public static FallbackPolicy Fallback(this PolicyBuilder policyBuilder, ActionThe policy builder. /// The fallback action. /// The action to call before invoking the fallback delegate. - /// fallbackAction - /// onFallback + /// Thrown when is . + /// Thrown when is . /// The policy instance. public static FallbackPolicy Fallback(this PolicyBuilder policyBuilder, Action fallbackAction, Action onFallback) { @@ -102,8 +102,8 @@ public static FallbackPolicy Fallback(this PolicyBuilder policyBuilder, ActionThe policy builder. /// The fallback action. /// The action to call before invoking the fallback delegate. - /// fallbackAction - /// onFallback + /// Thrown when is . + /// Thrown when is . /// The policy instance. public static FallbackPolicy Fallback(this PolicyBuilder policyBuilder, Action fallbackAction, Action onFallback) { @@ -121,8 +121,8 @@ public static FallbackPolicy Fallback(this PolicyBuilder policyBuilder, ActionThe policy builder. /// The fallback action. /// The action to call before invoking the fallback delegate. - /// fallbackAction - /// onFallback + /// Thrown when is . + /// Thrown when is . /// The policy instance. public static FallbackPolicy Fallback(this PolicyBuilder policyBuilder, Action fallbackAction, Action onFallback) { @@ -160,7 +160,7 @@ public static FallbackPolicy Fallback(this PolicyBuilder /// The policy builder. /// The fallback action. - /// fallbackAction + /// Thrown when is . /// The policy instance. public static FallbackPolicy Fallback(this PolicyBuilder policyBuilder, Func fallbackAction) { @@ -176,7 +176,7 @@ public static FallbackPolicy Fallback(this PolicyBuilder /// The policy builder. /// The fallback action. - /// fallbackAction + /// Thrown when is . /// The policy instance. public static FallbackPolicy Fallback(this PolicyBuilder policyBuilder, Func fallbackAction) { @@ -193,7 +193,7 @@ public static FallbackPolicy Fallback(this PolicyBuilderThe policy builder. /// The fallback value to provide. /// The action to call before invoking the fallback delegate. - /// onFallback + /// Thrown when is . /// The policy instance. public static FallbackPolicy Fallback(this PolicyBuilder policyBuilder, TResult fallbackValue, Action> onFallback) { @@ -209,8 +209,8 @@ public static FallbackPolicy Fallback(this PolicyBuilderThe policy builder. /// The fallback action. /// The action to call before invoking the fallback delegate. - /// fallbackAction - /// onFallback + /// Thrown when is . + /// Thrown when is . /// The policy instance. public static FallbackPolicy Fallback(this PolicyBuilder policyBuilder, Func fallbackAction, Action> onFallback) { @@ -228,8 +228,8 @@ public static FallbackPolicy Fallback(this PolicyBuilderThe policy builder. /// The fallback action. /// The action to call before invoking the fallback delegate. - /// fallbackAction - /// onFallback + /// Thrown when is . + /// Thrown when is . /// The policy instance. public static FallbackPolicy Fallback(this PolicyBuilder policyBuilder, Func fallbackAction, Action> onFallback) { @@ -247,7 +247,7 @@ public static FallbackPolicy Fallback(this PolicyBuilderThe policy builder. /// The fallback value to provide. /// The action to call before invoking the fallback delegate. - /// onFallback + /// Thrown when is . /// The policy instance. public static FallbackPolicy Fallback(this PolicyBuilder policyBuilder, TResult fallbackValue, Action, Context> onFallback) { @@ -263,8 +263,8 @@ public static FallbackPolicy Fallback(this PolicyBuilderThe policy builder. /// The fallback action. /// The action to call before invoking the fallback delegate. - /// fallbackAction - /// onFallback + /// Thrown when is . + /// Thrown when is . /// The policy instance. public static FallbackPolicy Fallback(this PolicyBuilder policyBuilder, Func fallbackAction, Action, Context> onFallback) { @@ -282,8 +282,8 @@ public static FallbackPolicy Fallback(this PolicyBuilderThe policy builder. /// The fallback action. /// The action to call before invoking the fallback delegate. - /// fallbackAction - /// onFallback + /// Thrown when is . + /// Thrown when is . /// The policy instance. public static FallbackPolicy Fallback(this PolicyBuilder policyBuilder, Func fallbackAction, Action, Context> onFallback) { @@ -301,8 +301,8 @@ public static FallbackPolicy Fallback(this PolicyBuilderThe policy builder. /// The fallback action. /// The action to call before invoking the fallback delegate. - /// fallbackAction - /// onFallback + /// Thrown when is . + /// Thrown when is . /// The policy instance. public static FallbackPolicy Fallback(this PolicyBuilder policyBuilder, Func, Context, CancellationToken, TResult> fallbackAction, Action, Context> onFallback) { diff --git a/src/Polly/IAsyncPolicy.Extensions.cs b/src/Polly/IAsyncPolicy.Extensions.cs index ccfffda2163..c3b888bd49d 100644 --- a/src/Polly/IAsyncPolicy.Extensions.cs +++ b/src/Polly/IAsyncPolicy.Extensions.cs @@ -1,7 +1,7 @@ namespace Polly; /// -/// Contains extensions methods on +/// Contains extensions methods on . /// public static class IAsyncPolicyExtensions { diff --git a/src/Polly/IAsyncPolicy.TResult.cs b/src/Polly/IAsyncPolicy.TResult.cs index 647bb56c5c1..305c66dcff2 100644 --- a/src/Polly/IAsyncPolicy.TResult.cs +++ b/src/Polly/IAsyncPolicy.TResult.cs @@ -17,7 +17,7 @@ public interface IAsyncPolicy : IsPolicy /// Executes the specified asynchronous action within the policy and returns the result. /// /// The action to perform. - /// The value returned by the action + /// The value returned by the action. Task ExecuteAsync(Func> action); /// @@ -25,7 +25,7 @@ public interface IAsyncPolicy : IsPolicy /// /// The action to perform. /// Context data that is passed to the exception policy. - /// The value returned by the action + /// The value returned by the action. Task ExecuteAsync(Func> action, Context context); /// @@ -33,7 +33,7 @@ public interface IAsyncPolicy : IsPolicy /// /// The action to perform. /// Arbitrary data that is passed to the exception policy. - /// The value returned by the action + /// The value returned by the action. Task ExecuteAsync(Func> action, IDictionary contextData); /// @@ -41,7 +41,7 @@ public interface IAsyncPolicy : IsPolicy /// /// The action to perform. /// A cancellation token which can be used to cancel the action. When a retry policy is in use, also cancels any further retries. - /// The value returned by the action + /// The value returned by the action. Task ExecuteAsync(Func> action, CancellationToken cancellationToken); /// @@ -50,7 +50,7 @@ public interface IAsyncPolicy : IsPolicy /// The action to perform. /// Arbitrary data that is passed to the exception policy. /// A cancellation token which can be used to cancel the action. When a retry policy in use, also cancels any further retries. - /// The value returned by the action + /// The value returned by the action. Task ExecuteAsync(Func> action, IDictionary contextData, CancellationToken cancellationToken); /// @@ -59,7 +59,7 @@ public interface IAsyncPolicy : IsPolicy /// The action to perform. /// Context data that is passed to the exception policy. /// A cancellation token which can be used to cancel the action. When a retry policy is in use, also cancels any further retries. - /// The value returned by the action + /// The value returned by the action. Task ExecuteAsync(Func> action, Context context, CancellationToken cancellationToken); /// @@ -68,7 +68,7 @@ public interface IAsyncPolicy : IsPolicy /// The action to perform. /// Whether to continue on a captured synchronization context. /// A cancellation token which can be used to cancel the action. When a retry policy is in use, also cancels any further retries. - /// The value returned by the action + /// The value returned by the action. /// Please use asynchronous-defined policies when calling asynchronous ExecuteAsync (and similar) methods. Task ExecuteAsync(Func> action, CancellationToken cancellationToken, bool continueOnCapturedContext); @@ -79,8 +79,8 @@ public interface IAsyncPolicy : IsPolicy /// Arbitrary data that is passed to the exception policy. /// A cancellation token which can be used to cancel the action. When a retry policy in use, also cancels any further retries. /// Whether to continue on a captured synchronization context. - /// The value returned by the action - /// contextData + /// The value returned by the action. + /// Thrown when is . Task ExecuteAsync(Func> action, IDictionary contextData, CancellationToken cancellationToken, bool continueOnCapturedContext); /// @@ -90,7 +90,7 @@ public interface IAsyncPolicy : IsPolicy /// Context data that is passed to the exception policy. /// Whether to continue on a captured synchronization context. /// A cancellation token which can be used to cancel the action. When a retry policy is in use, also cancels any further retries. - /// The value returned by the action + /// The value returned by the action. /// Please use asynchronous-defined policies when calling asynchronous ExecuteAsync (and similar) methods. Task ExecuteAsync(Func> action, Context context, CancellationToken cancellationToken, bool continueOnCapturedContext); @@ -98,7 +98,7 @@ public interface IAsyncPolicy : IsPolicy /// Executes the specified asynchronous action within the policy and returns the result. /// /// The action to perform. - /// The captured result + /// The captured result. Task> ExecuteAndCaptureAsync(Func> action); /// @@ -106,8 +106,8 @@ public interface IAsyncPolicy : IsPolicy /// /// The action to perform. /// Arbitrary data that is passed to the exception policy. - /// contextData - /// The captured result + /// Thrown when is . + /// The captured result. Task> ExecuteAndCaptureAsync(Func> action, IDictionary contextData); /// @@ -115,7 +115,7 @@ public interface IAsyncPolicy : IsPolicy /// /// The action to perform. /// Context data that is passed to the exception policy. - /// The captured result + /// The captured result. Task> ExecuteAndCaptureAsync(Func> action, Context context); /// @@ -123,7 +123,7 @@ public interface IAsyncPolicy : IsPolicy /// /// The action to perform. /// A cancellation token which can be used to cancel the action. When a retry policy in use, also cancels any further retries. - /// The captured result + /// The captured result. Task> ExecuteAndCaptureAsync(Func> action, CancellationToken cancellationToken); /// @@ -132,17 +132,17 @@ public interface IAsyncPolicy : IsPolicy /// The action to perform. /// Arbitrary data that is passed to the exception policy. /// A cancellation token which can be used to cancel the action. When a retry policy in use, also cancels any further retries. - /// contextData - /// The captured result + /// Thrown when is . + /// The captured result. Task> ExecuteAndCaptureAsync(Func> action, IDictionary contextData, CancellationToken cancellationToken); /// /// Executes the specified asynchronous action within the policy and returns the result. /// /// The action to perform. - /// A cancellation token which can be used to cancel the action. When a retry policy in use, also cancels any further retries. + /// Context data that is passed to the exception policy. /// A cancellation token which can be used to cancel the action. When a retry policy in use, also cancels any further retries. - /// The captured result + /// The captured result. Task> ExecuteAndCaptureAsync(Func> action, Context context, CancellationToken cancellationToken); /// @@ -151,7 +151,7 @@ public interface IAsyncPolicy : IsPolicy /// The action to perform. /// A cancellation token which can be used to cancel the action. When a retry policy in use, also cancels any further retries. /// Whether to continue on a captured synchronization context. - /// The captured result + /// The captured result. /// Please use asynchronous-defined policies when calling asynchronous ExecuteAsync (and similar) methods. Task> ExecuteAndCaptureAsync(Func> action, CancellationToken cancellationToken, bool continueOnCapturedContext); @@ -162,8 +162,8 @@ public interface IAsyncPolicy : IsPolicy /// Arbitrary data that is passed to the exception policy. /// Whether to continue on a captured synchronization context. /// A cancellation token which can be used to cancel the action. When a retry policy in use, also cancels any further retries. - /// The captured result - /// contextData + /// The captured result. + /// Thrown when is . Task> ExecuteAndCaptureAsync(Func> action, IDictionary contextData, CancellationToken cancellationToken, bool continueOnCapturedContext); /// @@ -173,7 +173,7 @@ public interface IAsyncPolicy : IsPolicy /// Context data that is passed to the exception policy. /// A cancellation token which can be used to cancel the action. When a retry policy in use, also cancels any further retries. /// Whether to continue on a captured synchronization context. - /// The captured result + /// The captured result. /// Please use asynchronous-defined policies when calling asynchronous ExecuteAsync (and similar) methods. Task> ExecuteAndCaptureAsync(Func> action, Context context, CancellationToken cancellationToken, bool continueOnCapturedContext); } diff --git a/src/Polly/IAsyncPolicy.cs b/src/Polly/IAsyncPolicy.cs index b9cd202e654..3878d0299cb 100644 --- a/src/Polly/IAsyncPolicy.cs +++ b/src/Polly/IAsyncPolicy.cs @@ -1,7 +1,7 @@ namespace Polly; /// -/// An interface defining all executions available on a non-generic, asynchronous policy +/// An interface defining all executions available on a non-generic, asynchronous policy. /// public interface IAsyncPolicy : IsPolicy { @@ -67,10 +67,11 @@ public interface IAsyncPolicy : IsPolicy /// /// Executes the specified asynchronous action within the policy. /// - /// The action to perform. /// Arbitrary data that is passed to the exception policy. + /// The action to perform. + /// Arbitrary data that is passed to the exception policy. /// A cancellation token which can be used to cancel the action. When a retry policy in use, also cancels any further retries. /// Whether to continue on a captured synchronization context. - /// contextData + /// Thrown when is . Task ExecuteAsync(Func action, IDictionary contextData, CancellationToken cancellationToken, bool continueOnCapturedContext); /// @@ -88,7 +89,7 @@ public interface IAsyncPolicy : IsPolicy /// /// The type of the result. /// The action to perform. - /// The value returned by the action + /// The value returned by the action. Task ExecuteAsync(Func> action); /// @@ -97,7 +98,7 @@ public interface IAsyncPolicy : IsPolicy /// The type of the result. /// The action to perform. /// Context data that is passed to the exception policy. - /// The value returned by the action + /// The value returned by the action. Task ExecuteAsync(Func> action, Context context); /// @@ -105,7 +106,7 @@ public interface IAsyncPolicy : IsPolicy /// /// The action to perform. /// Arbitrary data that is passed to the exception policy. - /// The value returned by the action + /// The value returned by the action. Task ExecuteAsync(Func> action, IDictionary contextData); /// @@ -114,7 +115,7 @@ public interface IAsyncPolicy : IsPolicy /// The type of the result. /// The action to perform. /// A cancellation token which can be used to cancel the action. When a retry policy is in use, also cancels any further retries. - /// The value returned by the action + /// The value returned by the action. Task ExecuteAsync(Func> action, CancellationToken cancellationToken); /// @@ -123,7 +124,7 @@ public interface IAsyncPolicy : IsPolicy /// The action to perform. /// Arbitrary data that is passed to the exception policy. /// A cancellation token which can be used to cancel the action. When a retry policy in use, also cancels any further retries. - /// The value returned by the action + /// The value returned by the action. Task ExecuteAsync(Func> action, IDictionary contextData, CancellationToken cancellationToken); /// @@ -133,7 +134,7 @@ public interface IAsyncPolicy : IsPolicy /// The action to perform. /// Context data that is passed to the exception policy. /// A cancellation token which can be used to cancel the action. When a retry policy is in use, also cancels any further retries. - /// The value returned by the action + /// The value returned by the action. Task ExecuteAsync(Func> action, Context context, CancellationToken cancellationToken); /// @@ -143,7 +144,7 @@ public interface IAsyncPolicy : IsPolicy /// The action to perform. /// Whether to continue on a captured synchronization context. /// A cancellation token which can be used to cancel the action. When a retry policy is in use, also cancels any further retries. - /// The value returned by the action + /// The value returned by the action. /// Please use asynchronous-defined policies when calling asynchronous ExecuteAsync (and similar) methods. Task ExecuteAsync(Func> action, CancellationToken cancellationToken, bool continueOnCapturedContext); @@ -154,8 +155,8 @@ public interface IAsyncPolicy : IsPolicy /// Arbitrary data that is passed to the exception policy. /// A cancellation token which can be used to cancel the action. When a retry policy in use, also cancels any further retries. /// Whether to continue on a captured synchronization context. - /// The value returned by the action - /// contextData + /// The value returned by the action. + /// Thrown when is . Task ExecuteAsync(Func> action, IDictionary contextData, CancellationToken cancellationToken, bool continueOnCapturedContext); /// @@ -166,7 +167,7 @@ public interface IAsyncPolicy : IsPolicy /// Context data that is passed to the exception policy. /// Whether to continue on a captured synchronization context. /// A cancellation token which can be used to cancel the action. When a retry policy is in use, also cancels any further retries. - /// The value returned by the action + /// The value returned by the action. /// Please use asynchronous-defined policies when calling asynchronous ExecuteAsync (and similar) methods. Task ExecuteAsync(Func> action, Context context, CancellationToken cancellationToken, bool continueOnCapturedContext); @@ -174,7 +175,7 @@ public interface IAsyncPolicy : IsPolicy /// Executes the specified asynchronous action within the policy and returns the captured result. /// /// The action to perform. - /// The captured result + /// The captured result. Task ExecuteAndCaptureAsync(Func action); /// @@ -182,8 +183,8 @@ public interface IAsyncPolicy : IsPolicy /// /// The action to perform. /// Arbitrary data that is passed to the exception policy. - /// contextData - /// The captured result + /// Thrown when is . + /// The captured result. Task ExecuteAndCaptureAsync(Func action, IDictionary contextData); /// @@ -191,7 +192,7 @@ public interface IAsyncPolicy : IsPolicy /// /// The action to perform. /// Context data that is passed to the exception policy. - /// The captured result + /// The captured result. Task ExecuteAndCaptureAsync(Func action, Context context); /// @@ -207,8 +208,8 @@ public interface IAsyncPolicy : IsPolicy /// The action to perform. /// Arbitrary data that is passed to the exception policy. /// A cancellation token which can be used to cancel the action. When a retry policy in use, also cancels any further retries. - /// contextData - /// The captured result + /// Thrown when is . + /// The captured result. Task ExecuteAndCaptureAsync(Func action, IDictionary contextData, CancellationToken cancellationToken); /// @@ -235,8 +236,8 @@ public interface IAsyncPolicy : IsPolicy /// Arbitrary data that is passed to the exception policy. /// A cancellation token which can be used to cancel the action. When a retry policy in use, also cancels any further retries. /// Whether to continue on a captured synchronization context. - /// contextData - /// The captured result + /// Thrown when is . + /// The captured result. Task ExecuteAndCaptureAsync(Func action, IDictionary contextData, CancellationToken cancellationToken, bool continueOnCapturedContext); /// @@ -254,7 +255,7 @@ public interface IAsyncPolicy : IsPolicy /// /// The type of the result. /// The action to perform. - /// The captured result + /// The captured result. Task> ExecuteAndCaptureAsync(Func> action); /// @@ -263,8 +264,8 @@ public interface IAsyncPolicy : IsPolicy /// The type of the result. /// The action to perform. /// Arbitrary data that is passed to the exception policy. - /// contextData - /// The captured result + /// Thrown when is . + /// The captured result. Task> ExecuteAndCaptureAsync(Func> action, IDictionary contextData); /// @@ -273,7 +274,7 @@ public interface IAsyncPolicy : IsPolicy /// The type of the result. /// The action to perform. /// Context data that is passed to the exception policy. - /// The captured result + /// The captured result. Task> ExecuteAndCaptureAsync(Func> action, Context context); /// @@ -282,7 +283,7 @@ public interface IAsyncPolicy : IsPolicy /// The type of the result. /// The action to perform. /// A cancellation token which can be used to cancel the action. When a retry policy in use, also cancels any further retries. - /// The captured result + /// The captured result. Task> ExecuteAndCaptureAsync(Func> action, CancellationToken cancellationToken); /// @@ -292,8 +293,8 @@ public interface IAsyncPolicy : IsPolicy /// The action to perform. /// Arbitrary data that is passed to the exception policy. /// A cancellation token which can be used to cancel the action. When a retry policy in use, also cancels any further retries. - /// contextData - /// The captured result + /// Thrown when is . + /// The captured result. Task> ExecuteAndCaptureAsync(Func> action, IDictionary contextData, CancellationToken cancellationToken); /// @@ -301,9 +302,9 @@ public interface IAsyncPolicy : IsPolicy /// /// The type of the result. /// The action to perform. - /// A cancellation token which can be used to cancel the action. When a retry policy in use, also cancels any further retries. + /// Context data that is passed to the exception policy. /// A cancellation token which can be used to cancel the action. When a retry policy in use, also cancels any further retries. - /// The captured result + /// The captured result. Task> ExecuteAndCaptureAsync(Func> action, Context context, CancellationToken cancellationToken); /// @@ -313,7 +314,7 @@ public interface IAsyncPolicy : IsPolicy /// The action to perform. /// A cancellation token which can be used to cancel the action. When a retry policy in use, also cancels any further retries. /// Whether to continue on a captured synchronization context. - /// The captured result + /// The captured result. /// Please use asynchronous-defined policies when calling asynchronous ExecuteAsync (and similar) methods. Task> ExecuteAndCaptureAsync(Func> action, CancellationToken cancellationToken, bool continueOnCapturedContext); @@ -325,8 +326,8 @@ public interface IAsyncPolicy : IsPolicy /// Arbitrary data that is passed to the exception policy. /// Whether to continue on a captured synchronization context. /// A cancellation token which can be used to cancel the action. When a retry policy in use, also cancels any further retries. - /// The captured result - /// contextData + /// The captured result. + /// Thrown when is . Task> ExecuteAndCaptureAsync(Func> action, IDictionary contextData, CancellationToken cancellationToken, bool continueOnCapturedContext); /// @@ -337,7 +338,7 @@ public interface IAsyncPolicy : IsPolicy /// Context data that is passed to the exception policy. /// A cancellation token which can be used to cancel the action. When a retry policy in use, also cancels any further retries. /// Whether to continue on a captured synchronization context. - /// The captured result + /// The captured result. /// Please use asynchronous-defined policies when calling asynchronous ExecuteAsync (and similar) methods. Task> ExecuteAndCaptureAsync(Func> action, Context context, CancellationToken cancellationToken, bool continueOnCapturedContext); } diff --git a/src/Polly/ISyncPolicy.Extensions.cs b/src/Polly/ISyncPolicy.Extensions.cs index 0d608bb516c..31334800c40 100644 --- a/src/Polly/ISyncPolicy.Extensions.cs +++ b/src/Polly/ISyncPolicy.Extensions.cs @@ -1,7 +1,7 @@ namespace Polly; /// -/// Contains extensions methods on +/// Contains extensions methods on . /// public static class ISyncPolicyExtensions { diff --git a/src/Polly/ISyncPolicy.TResult.cs b/src/Polly/ISyncPolicy.TResult.cs index d75e4e40ed7..7d7edc14f41 100644 --- a/src/Polly/ISyncPolicy.TResult.cs +++ b/src/Polly/ISyncPolicy.TResult.cs @@ -17,7 +17,7 @@ public interface ISyncPolicy : IsPolicy /// Executes the specified action within the policy and returns the Result. /// /// The action to perform. - /// The value returned by the action + /// The value returned by the action. TResult Execute(Func action); /// @@ -25,11 +25,8 @@ public interface ISyncPolicy : IsPolicy /// /// The action to perform. /// Arbitrary data that is passed to the exception policy. - /// contextData - /// - /// The value returned by the action - /// - /// contextData + /// The value returned by the action. + /// Thrown when is . TResult Execute(Func action, IDictionary contextData); /// @@ -37,11 +34,8 @@ public interface ISyncPolicy : IsPolicy /// /// The action to perform. /// Context data that is passed to the exception policy. - /// context - /// - /// The value returned by the action - /// - /// contextData + /// The value returned by the action. + /// Thrown when is . TResult Execute(Func action, Context context); /// @@ -49,7 +43,7 @@ public interface ISyncPolicy : IsPolicy /// /// The action to perform. /// The cancellation token. - /// The value returned by the action + /// The value returned by the action. TResult Execute(Func action, CancellationToken cancellationToken); /// @@ -58,8 +52,8 @@ public interface ISyncPolicy : IsPolicy /// The action to perform. /// Arbitrary data that is passed to the exception policy. /// The cancellation token. - /// The value returned by the action - /// contextData + /// The value returned by the action. + /// Thrown when is . TResult Execute(Func action, IDictionary contextData, CancellationToken cancellationToken); /// @@ -68,14 +62,14 @@ public interface ISyncPolicy : IsPolicy /// The action to perform. /// Context data that is passed to the exception policy. /// The cancellation token. - /// The value returned by the action + /// The value returned by the action. TResult Execute(Func action, Context context, CancellationToken cancellationToken); /// - /// Executes the specified action within the policy and returns the captured result + /// Executes the specified action within the policy and returns the captured result. /// /// The action to perform. - /// The captured result + /// The captured result. PolicyResult ExecuteAndCapture(Func action); /// @@ -83,8 +77,8 @@ public interface ISyncPolicy : IsPolicy /// /// The action to perform. /// Arbitrary data that is passed to the exception policy. - /// contextData - /// The captured result + /// The captured result. + /// Thrown when is . PolicyResult ExecuteAndCapture(Func action, IDictionary contextData); /// @@ -92,16 +86,16 @@ public interface ISyncPolicy : IsPolicy /// /// The action to perform. /// Context data that is passed to the exception policy. - /// contextData - /// The captured result + /// The captured result. + /// Thrown when is . PolicyResult ExecuteAndCapture(Func action, Context context); /// - /// Executes the specified action within the policy and returns the captured result + /// Executes the specified action within the policy and returns the captured result. /// /// The action to perform. /// The cancellation token. - /// The captured result + /// The captured result. PolicyResult ExecuteAndCapture(Func action, CancellationToken cancellationToken); /// @@ -110,8 +104,8 @@ public interface ISyncPolicy : IsPolicy /// The action to perform. /// Arbitrary data that is passed to the exception policy. /// The cancellation token. - /// The captured result - /// contextData + /// The captured result. + /// Thrown when is . PolicyResult ExecuteAndCapture(Func action, IDictionary contextData, CancellationToken cancellationToken); /// @@ -120,6 +114,6 @@ public interface ISyncPolicy : IsPolicy /// The action to perform. /// Context data that is passed to the exception policy. /// The cancellation token. - /// The captured result + /// The captured result. PolicyResult ExecuteAndCapture(Func action, Context context, CancellationToken cancellationToken); } diff --git a/src/Polly/ISyncPolicy.cs b/src/Polly/ISyncPolicy.cs index f604f7a6301..3fddc2d7902 100644 --- a/src/Polly/ISyncPolicy.cs +++ b/src/Polly/ISyncPolicy.cs @@ -1,7 +1,7 @@ namespace Polly; /// -/// An interface defining all executions available on a non-generic, synchronous policy +/// An interface defining all executions available on a non-generic, synchronous policy. /// public interface ISyncPolicy : IsPolicy { @@ -45,7 +45,7 @@ public interface ISyncPolicy : IsPolicy /// The action to perform. /// Arbitrary data that is passed to the exception policy. /// The cancellation token. - /// contextData + /// Thrown when is . void Execute(Action action, IDictionary contextData, CancellationToken cancellationToken); /// @@ -61,7 +61,7 @@ public interface ISyncPolicy : IsPolicy /// /// The type of the Result. /// The action to perform. - /// The value returned by the action + /// The value returned by the action. TResult Execute(Func action); /// @@ -70,11 +70,8 @@ public interface ISyncPolicy : IsPolicy /// The type of the result. /// The action to perform. /// Arbitrary data that is passed to the exception policy. - /// contextData - /// - /// The value returned by the action - /// - /// contextData + /// The value returned by the action. + /// Thrown when is . TResult Execute(Func action, IDictionary contextData); /// @@ -83,11 +80,8 @@ public interface ISyncPolicy : IsPolicy /// The type of the result. /// The action to perform. /// Context data that is passed to the exception policy. - /// contextData - /// - /// The value returned by the action - /// - /// contextData + /// The value returned by the action. + /// Thrown when is . TResult Execute(Func action, Context context); /// @@ -96,7 +90,7 @@ public interface ISyncPolicy : IsPolicy /// The type of the result. /// The action to perform. /// The cancellation token. - /// The value returned by the action + /// The value returned by the action. TResult Execute(Func action, CancellationToken cancellationToken); /// @@ -106,8 +100,8 @@ public interface ISyncPolicy : IsPolicy /// The action to perform. /// Arbitrary data that is passed to the exception policy. /// The cancellation token. - /// The value returned by the action - /// contextData + /// The value returned by the action. + /// Thrown when is . TResult Execute(Func action, IDictionary contextData, CancellationToken cancellationToken); /// @@ -117,14 +111,14 @@ public interface ISyncPolicy : IsPolicy /// The action to perform. /// Context data that is passed to the exception policy. /// The cancellation token. - /// The value returned by the action + /// The value returned by the action. TResult Execute(Func action, Context context, CancellationToken cancellationToken); /// - /// Executes the specified action within the policy and returns the captured result + /// Executes the specified action within the policy and returns the captured result. /// /// The action to perform. - /// The captured result + /// The captured result. PolicyResult ExecuteAndCapture(Action action); /// @@ -132,8 +126,8 @@ public interface ISyncPolicy : IsPolicy /// /// The action to perform. /// Arbitrary data that is passed to the exception policy. - /// contextData - /// The captured result + /// The captured result. + /// Thrown when is . PolicyResult ExecuteAndCapture(Action action, IDictionary contextData); /// @@ -141,15 +135,15 @@ public interface ISyncPolicy : IsPolicy /// /// The action to perform. /// Context data that is passed to the exception policy. - /// The captured result + /// The captured result. PolicyResult ExecuteAndCapture(Action action, Context context); /// - /// Executes the specified action within the policy and returns the captured result + /// Executes the specified action within the policy and returns the captured result. /// /// The action to perform. /// The cancellation token. - /// The captured result + /// The captured result. PolicyResult ExecuteAndCapture(Action action, CancellationToken cancellationToken); /// @@ -158,24 +152,24 @@ public interface ISyncPolicy : IsPolicy /// The action to perform. /// Arbitrary data that is passed to the exception policy. /// The cancellation token. - /// The captured result - /// contextData + /// The captured result. + /// Thrown when is . PolicyResult ExecuteAndCapture(Action action, IDictionary contextData, CancellationToken cancellationToken); /// - /// Executes the specified action within the policy and returns the captured result + /// Executes the specified action within the policy and returns the captured result. /// /// The action to perform. /// Context data that is passed to the exception policy. /// The cancellation token. - /// The captured result + /// The captured result. PolicyResult ExecuteAndCapture(Action action, Context context, CancellationToken cancellationToken); /// - /// Executes the specified action within the policy and returns the captured result + /// Executes the specified action within the policy and returns the captured result. /// /// The action to perform. - /// The captured result + /// The captured result. PolicyResult ExecuteAndCapture(Func action); /// @@ -183,8 +177,8 @@ public interface ISyncPolicy : IsPolicy /// /// The action to perform. /// Arbitrary data that is passed to the exception policy. - /// contextData - /// The captured result + /// The captured result. + /// Thrown when is . PolicyResult ExecuteAndCapture(Func action, IDictionary contextData); /// @@ -192,17 +186,17 @@ public interface ISyncPolicy : IsPolicy /// /// The action to perform. /// Context data that is passed to the exception policy. - /// contextData - /// The captured result + /// The captured result. + /// Thrown when is . PolicyResult ExecuteAndCapture(Func action, Context context); /// - /// Executes the specified action within the policy and returns the captured result + /// Executes the specified action within the policy and returns the captured result. /// /// The type of the t result. /// The action to perform. /// The cancellation token. - /// The captured result + /// The captured result. PolicyResult ExecuteAndCapture(Func action, CancellationToken cancellationToken); /// @@ -212,8 +206,8 @@ public interface ISyncPolicy : IsPolicy /// The action to perform. /// Arbitrary data that is passed to the exception policy. /// The cancellation token. - /// The captured result - /// contextData + /// The captured result. + /// Thrown when is . PolicyResult ExecuteAndCapture(Func action, IDictionary contextData, CancellationToken cancellationToken); /// @@ -222,6 +216,6 @@ public interface ISyncPolicy : IsPolicy /// The action to perform. /// Context data that is passed to the exception policy. /// The cancellation token. - /// The captured result + /// The captured result. PolicyResult ExecuteAndCapture(Func action, Context context, CancellationToken cancellationToken); } diff --git a/src/Polly/IsPolicy.cs b/src/Polly/IsPolicy.cs index 5ba8583d449..8ce835ab065 100644 --- a/src/Polly/IsPolicy.cs +++ b/src/Polly/IsPolicy.cs @@ -1,7 +1,7 @@ namespace Polly; /// -/// A marker interface identifying Polly policies of all types, and containing properties common to all policies +/// A marker interface identifying Polly policies of all types, and containing properties common to all policies. /// public interface IsPolicy { diff --git a/src/Polly/Policy.ExecuteOverloads.cs b/src/Polly/Policy.ExecuteOverloads.cs index fbaf63f6415..5576b7399b1 100644 --- a/src/Polly/Policy.ExecuteOverloads.cs +++ b/src/Polly/Policy.ExecuteOverloads.cs @@ -31,10 +31,10 @@ public void Execute(Action action, Context context) => Execute((ctx, _) => action(ctx), context, DefaultCancellationToken); /// - /// Executes the specified action within the policy + /// Executes the specified action within the policy. /// - /// - /// + /// The action to perform. + /// The cancellation token. [DebuggerStepThrough] public void Execute(Action action, CancellationToken cancellationToken) => Execute((_, ct) => action(ct), [], cancellationToken); @@ -45,7 +45,7 @@ public void Execute(Action action, CancellationToken cancella /// The action to perform. /// Arbitrary data that is passed to the exception policy. /// The cancellation token. - /// contextData + /// Thrown when is . [DebuggerStepThrough] public void Execute(Action action, IDictionary contextData, CancellationToken cancellationToken) => Execute(action, new Context(contextData), cancellationToken); @@ -81,7 +81,7 @@ public void Execute(Action action, Context context, /// /// The type of the Result. /// The action to perform. - /// The value returned by the action + /// The value returned by the action. [DebuggerStepThrough] public TResult Execute(Func action) => Execute((_, _) => action(), [], DefaultCancellationToken); @@ -92,11 +92,8 @@ public TResult Execute(Func action) => /// The type of the result. /// The action to perform. /// Arbitrary data that is passed to the exception policy. - /// contextData - /// - /// The value returned by the action - /// - /// contextData + /// The value returned by the action. + /// Thrown when is . [DebuggerStepThrough] public TResult Execute(Func action, IDictionary contextData) => Execute((ctx, _) => action(ctx), new Context(contextData), DefaultCancellationToken); @@ -107,11 +104,8 @@ public TResult Execute(Func action, IDictionaryThe type of the result. /// The action to perform. /// Context data that is passed to the exception policy. - /// contextData - /// - /// The value returned by the action - /// - /// contextData + /// The value returned by the action. + /// Thrown when is . [DebuggerStepThrough] public TResult Execute(Func action, Context context) => Execute((ctx, _) => action(ctx), context, DefaultCancellationToken); @@ -122,7 +116,7 @@ public TResult Execute(Func action, Context context) /// The type of the result. /// The action to perform. /// The cancellation token. - /// The value returned by the action + /// The value returned by the action. [DebuggerStepThrough] public TResult Execute(Func action, CancellationToken cancellationToken) => Execute((_, ct) => action(ct), [], cancellationToken); @@ -134,8 +128,8 @@ public TResult Execute(Func action, Cancell /// The action to perform. /// Arbitrary data that is passed to the exception policy. /// The cancellation token. - /// The value returned by the action - /// contextData + /// The value returned by the action. + /// Thrown when is . [DebuggerStepThrough] public TResult Execute(Func action, IDictionary contextData, CancellationToken cancellationToken) => Execute(action, new Context(contextData), cancellationToken); @@ -147,7 +141,7 @@ public TResult Execute(Func action /// The action to perform. /// Context data that is passed to the exception policy. /// The cancellation token. - /// The value returned by the action + /// The value returned by the action. [DebuggerStepThrough] public TResult Execute(Func action, Context context, CancellationToken cancellationToken) { @@ -173,10 +167,10 @@ public TResult Execute(Func action #region ExecuteAndCapture overloads /// - /// Executes the specified action within the policy and returns the captured result + /// Executes the specified action within the policy and returns the captured result. /// /// The action to perform. - /// The captured result + /// The captured result. [DebuggerStepThrough] public PolicyResult ExecuteAndCapture(Action action) => ExecuteAndCapture((_, _) => action(), [], DefaultCancellationToken); @@ -186,8 +180,8 @@ public PolicyResult ExecuteAndCapture(Action action) => /// /// The action to perform. /// Arbitrary data that is passed to the exception policy. - /// contextData - /// The captured result + /// The captured result. + /// Thrown when is . [DebuggerStepThrough] public PolicyResult ExecuteAndCapture(Action action, IDictionary contextData) => ExecuteAndCapture((ctx, _) => action(ctx), new Context(contextData), DefaultCancellationToken); @@ -197,17 +191,17 @@ public PolicyResult ExecuteAndCapture(Action action, IDictionary /// The action to perform. /// Context data that is passed to the exception policy. - /// The captured result + /// The captured result. [DebuggerStepThrough] public PolicyResult ExecuteAndCapture(Action action, Context context) => ExecuteAndCapture((ctx, _) => action(ctx), context, DefaultCancellationToken); /// - /// Executes the specified action within the policy and returns the captured result + /// Executes the specified action within the policy and returns the captured result. /// /// The action to perform. /// The cancellation token. - /// The captured result + /// The captured result. [DebuggerStepThrough] public PolicyResult ExecuteAndCapture(Action action, CancellationToken cancellationToken) => ExecuteAndCapture((_, ct) => action(ct), [], cancellationToken); @@ -218,19 +212,19 @@ public PolicyResult ExecuteAndCapture(Action action, Cancella /// The action to perform. /// Arbitrary data that is passed to the exception policy. /// The cancellation token. - /// The captured result - /// contextData + /// The captured result. + /// Thrown when is . [DebuggerStepThrough] public PolicyResult ExecuteAndCapture(Action action, IDictionary contextData, CancellationToken cancellationToken) => ExecuteAndCapture(action, new Context(contextData), cancellationToken); /// - /// Executes the specified action within the policy and returns the captured result + /// Executes the specified action within the policy and returns the captured result. /// /// The action to perform. /// Context data that is passed to the exception policy. /// The cancellation token. - /// The captured result + /// The captured result. [DebuggerStepThrough] public PolicyResult ExecuteAndCapture(Action action, Context context, CancellationToken cancellationToken) { @@ -251,10 +245,10 @@ public PolicyResult ExecuteAndCapture(Action action, #region Overloads method-generic in TResult /// - /// Executes the specified action within the policy and returns the captured result + /// Executes the specified action within the policy and returns the captured result. /// /// The action to perform. - /// The captured result + /// The captured result. [DebuggerStepThrough] public PolicyResult ExecuteAndCapture(Func action) => ExecuteAndCapture((_, _) => action(), [], DefaultCancellationToken); @@ -264,8 +258,8 @@ public PolicyResult ExecuteAndCapture(Func action) => /// /// The action to perform. /// Arbitrary data that is passed to the exception policy. - /// contextData - /// The captured result + /// The captured result. + /// Thrown when is . [DebuggerStepThrough] public PolicyResult ExecuteAndCapture(Func action, IDictionary contextData) => ExecuteAndCapture((ctx, _) => action(ctx), new Context(contextData), DefaultCancellationToken); @@ -275,19 +269,19 @@ public PolicyResult ExecuteAndCapture(Func a /// /// The action to perform. /// Context data that is passed to the exception policy. - /// contextData - /// The captured result + /// The captured result. + /// Thrown when is . [DebuggerStepThrough] public PolicyResult ExecuteAndCapture(Func action, Context context) => ExecuteAndCapture((ctx, _) => action(ctx), context, DefaultCancellationToken); /// - /// Executes the specified action within the policy and returns the captured result + /// Executes the specified action within the policy and returns the captured result. /// /// The type of the t result. /// The action to perform. /// The cancellation token. - /// The captured result + /// The captured result. public PolicyResult ExecuteAndCapture(Func action, CancellationToken cancellationToken) => ExecuteAndCapture((_, ct) => action(ct), [], cancellationToken); @@ -298,8 +292,8 @@ public PolicyResult ExecuteAndCapture(FuncThe action to perform. /// Arbitrary data that is passed to the exception policy. /// The cancellation token. - /// The captured result - /// contextData + /// The captured result. + /// Thrown when is . [DebuggerStepThrough] public PolicyResult ExecuteAndCapture(Func action, IDictionary contextData, CancellationToken cancellationToken) => ExecuteAndCapture(action, new Context(contextData), cancellationToken); @@ -310,7 +304,7 @@ public PolicyResult ExecuteAndCapture(FuncThe action to perform. /// Context data that is passed to the exception policy. /// The cancellation token. - /// The captured result + /// The captured result. [DebuggerStepThrough] public PolicyResult ExecuteAndCapture(Func action, Context context, CancellationToken cancellationToken) { diff --git a/src/Polly/Policy.HandleSyntax.cs b/src/Polly/Policy.HandleSyntax.cs index 99dc69af7db..0ece8b16278 100644 --- a/src/Polly/Policy.HandleSyntax.cs +++ b/src/Polly/Policy.HandleSyntax.cs @@ -37,6 +37,7 @@ public static PolicyBuilder HandleInner() /// Specifies the type of exception that this policy can handle, with additional filters on this exception type, if found as an InnerException of a regular , or at any level of nesting within an . /// /// The type of the exception to handle. + /// The exception predicate to filter the type of exception this policy can handle. /// The PolicyBuilder instance, for fluent chaining. public static PolicyBuilder HandleInner(Func exceptionPredicate) where TException : Exception @@ -100,6 +101,7 @@ public static PolicyBuilder HandleInner() /// Specifies the type of exception that this policy can handle, with additional filters on this exception type, if found as an InnerException of a regular , or at any level of nesting within an . /// /// The type of the exception to handle. + /// The exception predicate to filter the type of exception this policy can handle. /// The PolicyBuilder instance, for fluent chaining. public static PolicyBuilder HandleInner(Func exceptionPredicate) where TException : Exception diff --git a/src/Polly/Policy.TResult.ExecuteOverloads.cs b/src/Polly/Policy.TResult.ExecuteOverloads.cs index b118b195bd1..1aaa40a0cb0 100644 --- a/src/Polly/Policy.TResult.ExecuteOverloads.cs +++ b/src/Polly/Policy.TResult.ExecuteOverloads.cs @@ -8,7 +8,7 @@ public abstract partial class Policy : ISyncPolicy /// Executes the specified action within the policy and returns the Result. /// /// The action to perform. - /// The value returned by the action + /// The value returned by the action. [DebuggerStepThrough] public TResult Execute(Func action) => Execute((_, _) => action(), [], DefaultCancellationToken); @@ -18,11 +18,8 @@ public TResult Execute(Func action) => /// /// The action to perform. /// Arbitrary data that is passed to the exception policy. - /// contextData - /// - /// The value returned by the action - /// - /// contextData + /// The value returned by the action. + /// Thrown when is . [DebuggerStepThrough] public TResult Execute(Func action, IDictionary contextData) => Execute((ctx, _) => action(ctx), new Context(contextData), DefaultCancellationToken); @@ -32,11 +29,8 @@ public TResult Execute(Func action, IDictionary /// The action to perform. /// Context data that is passed to the exception policy. - /// context - /// - /// The value returned by the action - /// - /// contextData + /// The value returned by the action. + /// Thrown when is . [DebuggerStepThrough] public TResult Execute(Func action, Context context) => Execute((ctx, _) => action(ctx), context, DefaultCancellationToken); @@ -46,7 +40,7 @@ public TResult Execute(Func action, Context context) => /// /// The action to perform. /// The cancellation token. - /// The value returned by the action + /// The value returned by the action. [DebuggerStepThrough] public TResult Execute(Func action, CancellationToken cancellationToken) => Execute((_, ct) => action(ct), [], cancellationToken); @@ -57,8 +51,8 @@ public TResult Execute(Func action, CancellationToke /// The action to perform. /// Arbitrary data that is passed to the exception policy. /// The cancellation token. - /// The value returned by the action - /// contextData + /// The value returned by the action. + /// Thrown when is . [DebuggerStepThrough] public TResult Execute(Func action, IDictionary contextData, CancellationToken cancellationToken) => Execute(action, new Context(contextData), cancellationToken); @@ -69,7 +63,7 @@ public TResult Execute(Func action, IDictio /// The action to perform. /// Context data that is passed to the exception policy. /// The cancellation token. - /// The value returned by the action + /// The value returned by the action. [DebuggerStepThrough] public TResult Execute(Func action, Context context, CancellationToken cancellationToken) { @@ -93,10 +87,10 @@ public TResult Execute(Func action, Context #region ExecuteAndCapture overloads /// - /// Executes the specified action within the policy and returns the captured result + /// Executes the specified action within the policy and returns the captured result. /// /// The action to perform. - /// The captured result + /// The captured result. [DebuggerStepThrough] public PolicyResult ExecuteAndCapture(Func action) => ExecuteAndCapture((_, _) => action(), [], DefaultCancellationToken); @@ -106,8 +100,8 @@ public PolicyResult ExecuteAndCapture(Func action) => /// /// The action to perform. /// Arbitrary data that is passed to the exception policy. - /// contextData - /// The captured result + /// The captured result. + /// Thrown when is . [DebuggerStepThrough] public PolicyResult ExecuteAndCapture(Func action, IDictionary contextData) => ExecuteAndCapture((ctx, _) => action(ctx), new Context(contextData), DefaultCancellationToken); @@ -117,18 +111,18 @@ public PolicyResult ExecuteAndCapture(Func action, ID /// /// The action to perform. /// Context data that is passed to the exception policy. - /// contextData - /// The captured result + /// The captured result. + /// Thrown when is . [DebuggerStepThrough] public PolicyResult ExecuteAndCapture(Func action, Context context) => ExecuteAndCapture((ctx, _) => action(ctx), context, DefaultCancellationToken); /// - /// Executes the specified action within the policy and returns the captured result + /// Executes the specified action within the policy and returns the captured result. /// /// The action to perform. /// The cancellation token. - /// The captured result + /// The captured result. [DebuggerStepThrough] public PolicyResult ExecuteAndCapture(Func action, CancellationToken cancellationToken) => ExecuteAndCapture((_, ct) => action(ct), [], cancellationToken); @@ -139,8 +133,8 @@ public PolicyResult ExecuteAndCapture(Func /// The action to perform. /// Arbitrary data that is passed to the exception policy. /// The cancellation token. - /// The captured result - /// contextData + /// The captured result. + /// Thrown when is . [DebuggerStepThrough] public PolicyResult ExecuteAndCapture(Func action, IDictionary contextData, CancellationToken cancellationToken) => ExecuteAndCapture(action, new Context(contextData), cancellationToken); @@ -151,7 +145,7 @@ public PolicyResult ExecuteAndCapture(FuncThe action to perform. /// Context data that is passed to the exception policy. /// The cancellation token. - /// The captured result + /// The captured result. [DebuggerStepThrough] public PolicyResult ExecuteAndCapture(Func action, Context context, CancellationToken cancellationToken) { diff --git a/src/Polly/Policy.TResult.cs b/src/Polly/Policy.TResult.cs index 8f52e3a1cc9..c9c54b48bd1 100644 --- a/src/Polly/Policy.TResult.cs +++ b/src/Polly/Policy.TResult.cs @@ -2,7 +2,7 @@ namespace Polly; /// -/// Transient fault handling policies that can be applied to delegates returning results of type +/// Transient fault handling policies that can be applied to delegates returning results of type . /// public abstract partial class Policy : PolicyBase { diff --git a/src/Polly/Policy.cs b/src/Polly/Policy.cs index 7d8a02ac1ba..7d3b85fce51 100644 --- a/src/Polly/Policy.cs +++ b/src/Polly/Policy.cs @@ -2,7 +2,7 @@ namespace Polly; /// -/// Transient exception handling policies that can be applied to synchronous delegates +/// Transient exception handling policies that can be applied to synchronous delegates. /// public abstract partial class Policy : PolicyBase { diff --git a/src/Polly/PolicyResult.cs b/src/Polly/PolicyResult.cs index 0de58d7e0d9..9aafa7e44b2 100644 --- a/src/Polly/PolicyResult.cs +++ b/src/Polly/PolicyResult.cs @@ -1,7 +1,7 @@ namespace Polly; /// -/// The captured result of executing a policy +/// The captured result of executing a policy. /// public class PolicyResult { @@ -14,17 +14,17 @@ internal PolicyResult(OutcomeType outcome, Exception finalException, ExceptionTy } /// - /// The outcome of executing the policy + /// The outcome of executing the policy. /// public OutcomeType Outcome { get; } /// - /// The final exception captured. Will be null if policy executed successfully + /// The final exception captured. Will be null if policy executed successfully. /// public Exception FinalException { get; } /// - /// The exception type of the final exception captured. Will be null if policy executed successfully + /// The exception type of the final exception captured. Will be null if policy executed successfully. /// public ExceptionType? ExceptionType { get; } @@ -36,7 +36,7 @@ internal PolicyResult(OutcomeType outcome, Exception finalException, ExceptionTy /// /// Builds a representing a successful execution through the policy. /// - /// The policy execution context + /// The policy execution context. /// /// A representing a successful execution through the policy. /// @@ -44,11 +44,11 @@ public static PolicyResult Successful(Context context) => new(OutcomeType.Successful, null, null, context); /// - /// Builds a representing a failed execution through the policy. /> + /// Builds a representing a failed execution through the policy. /// - /// The exception - /// The exception type - /// The policy execution context + /// The exception. + /// The exception type. + /// The policy execution context. /// /// A representing a failed execution through the policy. /// @@ -57,7 +57,7 @@ public static PolicyResult Failure(Exception exception, ExceptionType exceptionT } /// -/// The captured result of executing a policy +/// The captured result of executing a policy. /// public class PolicyResult { @@ -78,7 +78,7 @@ internal PolicyResult(TResult result, OutcomeType outcome, Exception finalExcept } /// - /// The outcome of executing the policy + /// The outcome of executing the policy. /// public OutcomeType Outcome { get; } @@ -88,12 +88,12 @@ internal PolicyResult(TResult result, OutcomeType outcome, Exception finalExcept public Exception FinalException { get; } /// - /// The exception type of the final exception captured. Will be null if policy executed successfully + /// The exception type of the final exception captured. Will be null if policy executed successfully. /// public ExceptionType? ExceptionType { get; } /// - /// The result of executing the policy. Will be default(TResult) if the policy failed + /// The result of executing the policy. Will be default(TResult) if the policy failed. /// public TResult Result { get; } @@ -103,7 +103,7 @@ internal PolicyResult(TResult result, OutcomeType outcome, Exception finalExcept public TResult FinalHandledResult { get; } /// - /// The fault type of the final fault captured. Will be null if policy executed successfully + /// The fault type of the final fault captured. Will be null if policy executed successfully. /// public FaultType? FaultType { get; } @@ -115,8 +115,8 @@ internal PolicyResult(TResult result, OutcomeType outcome, Exception finalExcept /// /// Builds a representing a successful execution through the policy. /// - /// The result returned by execution through the policy - /// The policy execution context + /// The result returned by execution through the policy. + /// The policy execution context. /// /// A representing a successful execution through the policy. /// @@ -126,9 +126,9 @@ public static PolicyResult Successful(TResult result, Context context) /// /// Builds a representing a failed execution through the policy. /// - /// The exception - /// The exception type - /// The policy execution context + /// The exception. + /// The exception type. + /// The policy execution context. /// /// A representing a failed execution through the policy. /// @@ -151,8 +151,8 @@ public static PolicyResult Failure(Exception exception, ExceptionType e /// /// Builds a representing a failed execution through the policy. /// - /// The result returned by execution through the policy, which was treated as a handled failure - /// The policy execution context + /// The result returned by execution through the policy, which was treated as a handled failure. + /// The policy execution context. /// /// A representing a failed execution through the policy. /// @@ -161,54 +161,54 @@ public static PolicyResult Failure(TResult handledResult, Context conte } /// -/// Represents the outcome of executing a policy +/// Represents the outcome of executing a policy. /// public enum OutcomeType { /// - /// Indicates that the policy ultimately executed successfully + /// Indicates that the policy ultimately executed successfully. /// Successful, /// - /// Indicates that the policy ultimately failed + /// Indicates that the policy ultimately failed. /// Failure } /// -/// Represents the type of exception resulting from a failed policy +/// Represents the type of exception resulting from a failed policy. /// public enum ExceptionType { /// - /// An exception type that has been defined to be handled by this policy + /// An exception type that has been defined to be handled by this policy. /// HandledByThisPolicy, /// - /// An exception type that has been not been defined to be handled by this policy + /// An exception type that has been not been defined to be handled by this policy. /// Unhandled } /// -/// Represents the type of outcome from a failed policy +/// Represents the type of outcome from a failed policy. /// public enum FaultType { /// - /// An exception type that has been defined to be handled by this policy + /// An exception type that has been defined to be handled by this policy. /// ExceptionHandledByThisPolicy, /// - /// An exception type that has been not been defined to be handled by this policy + /// An exception type that has been not been defined to be handled by this policy. /// UnhandledException, /// - /// A result value that has been defined to be handled by this policy + /// A result value that has been defined to be handled by this policy. /// ResultHandledByThisPolicy } diff --git a/src/Polly/Registry/IConcurrentPolicyRegistry.cs b/src/Polly/Registry/IConcurrentPolicyRegistry.cs index 0d43ba3993c..c201e83f066 100644 --- a/src/Polly/Registry/IConcurrentPolicyRegistry.cs +++ b/src/Polly/Registry/IConcurrentPolicyRegistry.cs @@ -33,7 +33,7 @@ bool TryRemove(TKey key, out TPolicy policy) /// /// Compares the existing policy for the specified key with a specified policy, and if they are equal, updates the policy with a third value. /// - /// + /// The type of Policy. /// The key whose value is compared with comparisonPolicy, and possibly replaced. /// The policy that replaces the value for the specified , if the comparison results in equality. /// The policy that is compared to the existing policy at the specified key. @@ -46,8 +46,8 @@ bool TryUpdate(TKey key, TPolicy newPolicy, TPolicy comparisonPolicy) /// if the key does not already exist. /// /// The key of the policy to add. - /// The function used to generate a policy for the key - /// The policy for the key. This will be either the existing policy for the key if the + /// The function used to generate a policy for the key. + /// The policy for the key. This will be either the existing policy for the key if the /// key is already in the registry, or the new policy for the key as returned by policyFactory /// if the key was not in the registry. TPolicy GetOrAdd(TKey key, Func policyFactory) @@ -58,8 +58,8 @@ TPolicy GetOrAdd(TKey key, Func policyFactory) /// if the key does not already exist. /// /// The key of the policy to add. - /// the value to be added, if the key does not already exist - /// The policy for the key. This will be either the existing policy for the key if the + /// The value to be added, if the key does not already exist. + /// The policy for the key. This will be either the existing policy for the key if the /// key is already in the registry, or the new policy if the key was not in the registry. TPolicy GetOrAdd(TKey key, TPolicy policy) where TPolicy : IsPolicy; @@ -69,11 +69,11 @@ TPolicy GetOrAdd(TKey key, TPolicy policy) /// exist, or updates a key/policy pair in the registry if the key /// already exists. /// - /// The key to be added or whose policy should be updated - /// The function used to generate a policy for an absent key + /// The key to be added or whose policy should be updated. + /// The function used to generate a policy for an absent key. /// The function used to generate a new policy for an existing key - /// based on the key's existing value - /// The new policy for the key. This will be either be the result of addPolicyFactory (if the key was + /// based on the key's existing value. + /// The new policy for the key. This will be either be the result of addPolicyFactory (if the key was /// absent) or the result of updatePolicyFactory (if the key was present). TPolicy AddOrUpdate(TKey key, Func addPolicyFactory, Func updatePolicyFactory) where TPolicy : IsPolicy; @@ -83,11 +83,11 @@ TPolicy AddOrUpdate(TKey key, Func addPolicyFactory, Fun /// exist, or updates a key/policy pair in the registry if the key /// already exists. /// - /// The key to be added or whose policy should be updated - /// The policy to be added for an absent key + /// The key to be added or whose policy should be updated. + /// The policy to be added for an absent key. /// The function used to generate a new policy for an existing key based on - /// the key's existing value - /// The new policy for the key. This will be either be addPolicy (if the key was + /// the key's existing value. + /// The new policy for the key. This will be either be addPolicy (if the key was /// absent) or the result of updatePolicyFactory (if the key was present). TPolicy AddOrUpdate(TKey key, TPolicy addPolicy, Func updatePolicyFactory) where TPolicy : IsPolicy; diff --git a/src/Polly/Registry/IPolicyRegistry.cs b/src/Polly/Registry/IPolicyRegistry.cs index e9fd8360328..4b3bbe6b611 100644 --- a/src/Polly/Registry/IPolicyRegistry.cs +++ b/src/Polly/Registry/IPolicyRegistry.cs @@ -12,7 +12,7 @@ public interface IPolicyRegistry : IReadOnlyPolicyRegistry /// The key for the policy. /// The policy to store in the registry. /// The type of Policy. - /// is null. + /// Thrown when is . /// A Policy with same already exists. void Add(TKey key, TPolicy policy) where TPolicy : IsPolicy; @@ -22,7 +22,7 @@ void Add(TKey key, TPolicy policy) /// To retrieve a policy directly as a particular Policy type or Policy interface (avoiding a cast), use the method. /// /// The key of the value to get or set. - /// is null. + /// Thrown when is . /// The given key was not present in the dictionary. /// The value associated with the specified key. new IsPolicy this[TKey key] { get; set; } @@ -32,7 +32,7 @@ void Add(TKey key, TPolicy policy) /// /// The key of the policy to remove. /// True if the policy is successfully removed. Otherwise false. - /// is null. + /// Thrown when is . bool Remove(TKey key); /// diff --git a/src/Polly/Registry/IReadOnlyPolicyRegistry.cs b/src/Polly/Registry/IReadOnlyPolicyRegistry.cs index 477a2fa388b..5ef42d3dc8a 100644 --- a/src/Polly/Registry/IReadOnlyPolicyRegistry.cs +++ b/src/Polly/Registry/IReadOnlyPolicyRegistry.cs @@ -11,7 +11,7 @@ public interface IReadOnlyPolicyRegistry : IEnumerableTo retrieve a policy directly as a particular Policy type or Policy interface (avoiding a cast), use the method. /// /// The key of the value to get or set. - /// is null. + /// Thrown when is . /// The given key was not present in the dictionary. /// The value associated with the specified key. IsPolicy this[TKey key] { get; } @@ -19,9 +19,10 @@ public interface IReadOnlyPolicyRegistry : IEnumerable /// Gets the policy stored under the provided key, casting to . /// + /// The key of the policy to get. /// The type of Policy. /// The policy stored in the registry under the given key. - /// is null. + /// Thrown when is . TPolicy Get(TKey key) where TPolicy : IsPolicy; @@ -47,8 +48,8 @@ bool TryGet(TKey key, out TPolicy policy) /// /// Determines whether the specified exists. /// - /// The Key to locate in the registry - /// True if exists otherwise false - /// is null + /// The Key to locate in the registry. + /// True if exists otherwise false. + /// Thrown when is . bool ContainsKey(TKey key); } diff --git a/src/Polly/Registry/PolicyRegistry.cs b/src/Polly/Registry/PolicyRegistry.cs index b9c874ea55a..022f2025c8a 100644 --- a/src/Polly/Registry/PolicyRegistry.cs +++ b/src/Polly/Registry/PolicyRegistry.cs @@ -49,7 +49,7 @@ private ConcurrentDictionary ThrowIfNotConcurrentImplementatio /// The key for the policy. /// The policy to store in the registry. /// The type of Policy. - /// is null. + /// Thrown when is . /// A Policy with same already exists. public void Add(string key, TPolicy policy) where TPolicy : IsPolicy => _registry.Add(key, policy); @@ -74,7 +74,7 @@ public bool TryAdd(string key, TPolicy policy) /// To retrieve a policy directly as a particular Policy type or Policy interface (avoiding a cast), use the method. /// /// The key of the policy to get or set. - /// is null. + /// Thrown when is . /// The given key was not present in the registry. /// The policy associated with the specified key. public IsPolicy this[string key] @@ -89,7 +89,7 @@ public IsPolicy this[string key] /// The type of Policy. /// The key of the policy to get. /// The policy stored in the registry under the given key. - /// is null. + /// is . /// The given key was not present in the registry. public TPolicy Get(string key) where TPolicy : IsPolicy => (TPolicy)_registry[key]; @@ -124,7 +124,7 @@ public void Clear() => /// /// The key to locate in the registry. /// True if exists otherwise false. - /// is null. + /// is . public bool ContainsKey(string key) => _registry.ContainsKey(key); @@ -133,7 +133,7 @@ public bool ContainsKey(string key) => /// /// The of the policy to remove. /// True if the policy is successfully removed. Otherwise false. - /// is null. + /// is . public bool Remove(string key) => _registry.Remove(key); @@ -182,7 +182,7 @@ public bool TryUpdate(string key, TPolicy newPolicy, TPolicy comparison /// if the key does not already exist. /// /// The key of the policy to add. - /// The function used to generate a policy for the key + /// The function used to generate a policy for the key. /// The policy for the key. This will be either the existing policy for the key if the /// key is already in the registry, or the new policy for the key as returned by policyFactory /// if the key was not in the registry. @@ -199,7 +199,7 @@ public TPolicy GetOrAdd(string key, Func policyFactory /// if the key does not already exist. /// /// The key of the policy to add. - /// the policy to be added, if the key does not already exist + /// the policy to be added, if the key does not already exist. /// The policy for the key. This will be either the existing policy for the key if the /// key is already in the registry, or the new policy if the key was not in the registry. public TPolicy GetOrAdd(string key, TPolicy policy) @@ -215,10 +215,10 @@ public TPolicy GetOrAdd(string key, TPolicy policy) /// exist, or updates a key/policy pair in the registry if the key /// already exists. /// - /// The key to be added or whose policy should be updated - /// The function used to generate a policy for an absent key + /// The key to be added or whose policy should be updated. + /// The function used to generate a policy for an absent key. /// The function used to generate a new policy for an existing key - /// based on the key's existing value + /// based on the key's existing value. /// The new policy for the key. This will be either be the result of addPolicyFactory (if the key was /// absent) or the result of updatePolicyFactory (if the key was present). public TPolicy AddOrUpdate(string key, Func addPolicyFactory, Func updatePolicyFactory) @@ -234,10 +234,10 @@ public TPolicy AddOrUpdate(string key, Func addPolicyF /// exist, or updates a key/policy pair in the registry if the key /// already exists. /// - /// The key to be added or whose policy should be updated - /// The policy to be added for an absent key + /// The key to be added or whose policy should be updated. + /// The policy to be added for an absent key. /// The function used to generate a new policy for an existing key based on - /// the key's existing value + /// the key's existing value. /// The new policy for the key. This will be either be addPolicy (if the key was /// absent) or the result of updatePolicyFactory (if the key was present). public TPolicy AddOrUpdate(string key, TPolicy addPolicy, Func updatePolicyFactory) diff --git a/src/Polly/Retry/AsyncRetrySyntax.cs b/src/Polly/Retry/AsyncRetrySyntax.cs index 363306c94a8..9f0b36dfc8d 100644 --- a/src/Polly/Retry/AsyncRetrySyntax.cs +++ b/src/Polly/Retry/AsyncRetrySyntax.cs @@ -33,7 +33,7 @@ public static AsyncRetryPolicy RetryAsync(this PolicyBuilder policyBuilder, int /// The policy builder. /// The action to call on each retry. /// The policy instance. - /// onRetry + /// Thrown when is . public static AsyncRetryPolicy RetryAsync(this PolicyBuilder policyBuilder, Action onRetry) => #pragma warning disable 1998 // async method has no awaits, will run synchronously policyBuilder.RetryAsync(1, @@ -47,7 +47,7 @@ public static AsyncRetryPolicy RetryAsync(this PolicyBuilder policyBuilder, Acti /// The policy builder. /// The action to call asynchronously on each retry. /// The policy instance. - /// onRetry + /// Thrown when is . public static AsyncRetryPolicy RetryAsync(this PolicyBuilder policyBuilder, Func onRetryAsync) => policyBuilder.RetryAsync(1, onRetryAsync: (outcome, i, _) => onRetryAsync(outcome, i)); @@ -60,7 +60,7 @@ public static AsyncRetryPolicy RetryAsync(this PolicyBuilder policyBuilder, Func /// The action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. - /// onRetry + /// Thrown when is . public static AsyncRetryPolicy RetryAsync(this PolicyBuilder policyBuilder, int retryCount, Action onRetry) { if (onRetry == null) @@ -80,7 +80,7 @@ public static AsyncRetryPolicy RetryAsync(this PolicyBuilder policyBuilder, int /// The action to call asynchronously on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. - /// onRetryAsync + /// Thrown when is . public static AsyncRetryPolicy RetryAsync(this PolicyBuilder policyBuilder, int retryCount, Func onRetryAsync) { if (onRetryAsync == null) @@ -96,7 +96,7 @@ public static AsyncRetryPolicy RetryAsync(this PolicyBuilder policyBuilder, int /// The policy builder. /// The action to call on each retry. /// The policy instance. - /// onRetry + /// Thrown when is . public static AsyncRetryPolicy RetryAsync(this PolicyBuilder policyBuilder, Action onRetry) => policyBuilder.RetryAsync(1, onRetry); @@ -107,7 +107,7 @@ public static AsyncRetryPolicy RetryAsync(this PolicyBuilder policyBuilder, Acti /// The policy builder. /// The action to call asynchronously on each retry. /// The policy instance. - /// onRetry + /// Thrown when is . public static AsyncRetryPolicy RetryAsync(this PolicyBuilder policyBuilder, Func onRetryAsync) => policyBuilder.RetryAsync(1, onRetryAsync); @@ -120,7 +120,7 @@ public static AsyncRetryPolicy RetryAsync(this PolicyBuilder policyBuilder, Func /// The action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than zero. - /// onRetry + /// Thrown when is . public static AsyncRetryPolicy RetryAsync(this PolicyBuilder policyBuilder, int retryCount, Action onRetry) { if (onRetry == null) @@ -141,7 +141,7 @@ public static AsyncRetryPolicy RetryAsync(this PolicyBuilder policyBuilder, int /// The action to call asynchronously on each retry. /// The policy instance. /// retryCount;Value must be greater than zero. - /// onRetryAsync + /// Thrown when is . public static AsyncRetryPolicy RetryAsync(this PolicyBuilder policyBuilder, int retryCount, Func onRetryAsync) { if (retryCount < 0) @@ -174,7 +174,7 @@ public static AsyncRetryPolicy RetryForeverAsync(this PolicyBuilder policyBuilde /// The policy builder. /// The action to call on each retry. /// The policy instance. - /// onRetry + /// Thrown when is . public static AsyncRetryPolicy RetryForeverAsync(this PolicyBuilder policyBuilder, Action onRetry) { if (onRetry == null) @@ -193,7 +193,7 @@ public static AsyncRetryPolicy RetryForeverAsync(this PolicyBuilder policyBuilde /// The policy builder. /// The action to call on each retry. /// The policy instance. - /// onRetry + /// Thrown when is . public static AsyncRetryPolicy RetryForeverAsync(this PolicyBuilder policyBuilder, Action onRetry) { if (onRetry == null) @@ -212,7 +212,7 @@ public static AsyncRetryPolicy RetryForeverAsync(this PolicyBuilder policyBuilde /// The policy builder. /// The action to call asynchronously on each retry. /// The policy instance. - /// onRetryAsync + /// Thrown when is . public static AsyncRetryPolicy RetryForeverAsync(this PolicyBuilder policyBuilder, Func onRetryAsync) { if (onRetryAsync == null) @@ -228,7 +228,7 @@ public static AsyncRetryPolicy RetryForeverAsync(this PolicyBuilder policyBuilde /// The policy builder. /// The action to call asynchronously on each retry. /// The policy instance. - /// onRetryAsync + /// Thrown when is . public static AsyncRetryPolicy RetryForeverAsync(this PolicyBuilder policyBuilder, Func onRetryAsync) { if (onRetryAsync == null) @@ -244,7 +244,7 @@ public static AsyncRetryPolicy RetryForeverAsync(this PolicyBuilder policyBuilde /// The policy builder. /// The action to call on each retry. /// The policy instance. - /// onRetry + /// Thrown when is . public static AsyncRetryPolicy RetryForeverAsync(this PolicyBuilder policyBuilder, Action onRetry) { if (onRetry == null) @@ -263,7 +263,7 @@ public static AsyncRetryPolicy RetryForeverAsync(this PolicyBuilder policyBuilde /// The policy builder. /// The action to call on each retry. /// The policy instance. - /// onRetry + /// Thrown when is . public static AsyncRetryPolicy RetryForeverAsync(this PolicyBuilder policyBuilder, Action onRetry) { if (onRetry == null) @@ -282,7 +282,7 @@ public static AsyncRetryPolicy RetryForeverAsync(this PolicyBuilder policyBuilde /// The policy builder. /// The action to call asynchronously on each retry. /// The policy instance. - /// onRetryAsync + /// Thrown when is . public static AsyncRetryPolicy RetryForeverAsync(this PolicyBuilder policyBuilder, Func onRetryAsync) { if (onRetryAsync == null) @@ -300,7 +300,7 @@ public static AsyncRetryPolicy RetryForeverAsync(this PolicyBuilder policyBuilde /// The policy builder. /// The action to call asynchronously on each retry. /// The policy instance. - /// onRetryAsync + /// Thrown when is . public static AsyncRetryPolicy RetryForeverAsync(this PolicyBuilder policyBuilder, Func onRetryAsync) { if (onRetryAsync == null) @@ -339,11 +339,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilde /// The action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. - /// - /// sleepDurationProvider - /// or - /// onRetry - /// + /// Thrown when or is . public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilder, int retryCount, Func sleepDurationProvider, Action onRetry) { if (onRetry == null) @@ -369,11 +365,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilde /// The action to call asynchronously on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. - /// - /// sleepDurationProvider - /// or - /// onRetryAsync - /// + /// Thrown when or is . public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilder, int retryCount, Func sleepDurationProvider, Func onRetryAsync) { if (onRetryAsync == null) @@ -399,11 +391,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilde /// The action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. - /// - /// sleepDurationProvider - /// or - /// onRetry - /// + /// Thrown when or is . public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilder, int retryCount, Func sleepDurationProvider, Action onRetry) { @@ -430,11 +418,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilde /// The action to call asynchronously on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. - /// - /// sleepDurationProvider - /// or - /// onRetryAsync - /// + /// Thrown when or is . public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilder, int retryCount, Func sleepDurationProvider, Func onRetryAsync) { @@ -459,11 +443,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilde /// The action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. - /// - /// sleepDurationProvider - /// or - /// onRetry - /// + /// Thrown when or is . public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilder, int retryCount, Func sleepDurationProvider, Action onRetry) { if (onRetry == null) @@ -489,11 +469,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilde /// The action to call asynchronously on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. - /// - /// sleepDurationProvider - /// or - /// onRetryAsync - /// + /// Thrown when or is . public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilder, int retryCount, Func sleepDurationProvider, Func onRetryAsync) { @@ -526,11 +502,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilde /// The action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. - /// - /// sleepDurationProvider - /// or - /// onRetry - /// + /// Thrown when or is . public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilder, int retryCount, Func sleepDurationProvider, Action onRetry) { @@ -557,11 +529,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilde /// The action to call asynchronously on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. - /// - /// sleepDurationProvider - /// or - /// onRetryAsync - /// + /// Thrown when or is . public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilder, int retryCount, Func sleepDurationProvider, Func onRetryAsync) { @@ -586,11 +554,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilde /// The action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. - /// - /// sleepDurationProvider - /// or - /// onRetry - /// + /// Thrown when or is . public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilder, int retryCount, Func sleepDurationProvider, Action onRetry) { if (onRetry == null) @@ -616,11 +580,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilde /// The action to call asynchronously on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. - /// - /// sleepDurationProvider - /// or - /// onRetryAsync - /// + /// Thrown when or is . public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilder, int retryCount, Func sleepDurationProvider, Func onRetryAsync) { @@ -644,11 +604,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilde /// The action to call asynchronously on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. - /// - /// sleepDurationProvider - /// or - /// onRetryAsync - /// + /// Thrown when or is . public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilder, int retryCount, Func sleepDurationProvider, Func onRetryAsync) { @@ -691,11 +647,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilde /// The sleep durations to wait for on each retry. /// The action to call on each retry. /// The policy instance. - /// - /// sleepDurations - /// or - /// onRetry - /// + /// Thrown when or is . public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilder, IEnumerable sleepDurations, Action onRetry) { if (onRetry == null) @@ -718,11 +670,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilde /// The sleep durations to wait for on each retry. /// The action to call asynchronously on each retry. /// The policy instance. - /// - /// sleepDurations - /// or - /// onRetryAsync - /// + /// Thrown when or is . public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilder, IEnumerable sleepDurations, Func onRetryAsync) { if (onRetryAsync == null) @@ -743,11 +691,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilde /// The sleep durations to wait for on each retry. /// The action to call on each retry. /// The policy instance. - /// - /// sleepDurations - /// or - /// onRetry - /// + /// Thrown when or is . public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilder, IEnumerable sleepDurations, Action onRetry) { if (onRetry == null) @@ -770,11 +714,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilde /// The sleep durations to wait for on each retry. /// The action to call asynchronously on each retry. /// The policy instance. - /// - /// sleepDurations - /// or - /// onRetryAsync - /// + /// Thrown when or is . public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilder, IEnumerable sleepDurations, Func onRetryAsync) { if (onRetryAsync == null) @@ -795,11 +735,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilde /// The sleep durations to wait for on each retry. /// The action to call on each retry. /// The policy instance. - /// - /// sleepDurations - /// or - /// onRetry - /// + /// Thrown when or is . public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilder, IEnumerable sleepDurations, Action onRetry) { if (onRetry == null) @@ -822,11 +758,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilde /// The sleep durations to wait for on each retry. /// The action to call asynchronously on each retry. /// The policy instance. - /// - /// sleepDurations - /// or - /// onRetryAsync - /// + /// Thrown when or is . public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilder, IEnumerable sleepDurations, Func onRetryAsync) { if (sleepDurations == null) @@ -843,12 +775,12 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilde /// /// Builds an that will wait and retry indefinitely until the action succeeds. /// On each retry, the duration to wait is calculated by calling with - /// the current retry number (1 for first retry, 2 for second etc) + /// the current retry number (1 for first retry, 2 for second etc). /// /// The policy builder. /// The function that provides the duration to wait for for a particular retry attempt. /// The policy instance. - /// sleepDurationProvider + /// Thrown when is . public static AsyncRetryPolicy WaitAndRetryForeverAsync(this PolicyBuilder policyBuilder, Func sleepDurationProvider) { if (sleepDurationProvider == null) @@ -867,7 +799,7 @@ public static AsyncRetryPolicy WaitAndRetryForeverAsync(this PolicyBuilder polic /// The policy builder. /// The function that provides the duration to wait for for a particular retry attempt. /// The policy instance. - /// sleepDurationProvider + /// Thrown when is . public static AsyncRetryPolicy WaitAndRetryForeverAsync(this PolicyBuilder policyBuilder, Func sleepDurationProvider) { if (sleepDurationProvider == null) @@ -882,14 +814,14 @@ public static AsyncRetryPolicy WaitAndRetryForeverAsync(this PolicyBuilder polic /// Builds an that will wait and retry indefinitely /// calling on each retry with the raised exception. /// On each retry, the duration to wait is calculated by calling with - /// the current retry number (1 for first retry, 2 for second etc) + /// the current retry number (1 for first retry, 2 for second etc). /// /// The policy builder. /// A function providing the duration to wait before retrying. /// The action to call on each retry. /// The policy instance. - /// sleepDurationProvider - /// onRetry + /// Thrown when is . + /// Thrown when is . public static AsyncRetryPolicy WaitAndRetryForeverAsync(this PolicyBuilder policyBuilder, Func sleepDurationProvider, Action onRetry) { if (sleepDurationProvider == null) @@ -906,14 +838,14 @@ public static AsyncRetryPolicy WaitAndRetryForeverAsync(this PolicyBuilder polic /// Builds an that will wait and retry indefinitely /// calling on each retry with the raised exception and retry count. /// On each retry, the duration to wait is calculated by calling with - /// the current retry number (1 for first retry, 2 for second etc) + /// the current retry number (1 for first retry, 2 for second etc). /// /// The policy builder. /// A function providing the duration to wait before retrying. /// The action to call on each retry. /// The policy instance. - /// sleepDurationProvider - /// onRetry + /// Thrown when is . + /// Thrown when is . public static AsyncRetryPolicy WaitAndRetryForeverAsync(this PolicyBuilder policyBuilder, Func sleepDurationProvider, Action onRetry) { if (sleepDurationProvider == null) @@ -930,14 +862,14 @@ public static AsyncRetryPolicy WaitAndRetryForeverAsync(this PolicyBuilder polic /// Builds an that will wait and retry indefinitely /// calling on each retry with the raised exception. /// On each retry, the duration to wait is calculated by calling with - /// the current retry number (1 for first retry, 2 for second etc) + /// the current retry number (1 for first retry, 2 for second etc). /// /// The policy builder. /// A function providing the duration to wait before retrying. /// The action to call asynchronously on each retry. /// The policy instance. - /// sleepDurationProvider - /// onRetryAsync + /// Thrown when is . + /// Thrown when is . public static AsyncRetryPolicy WaitAndRetryForeverAsync(this PolicyBuilder policyBuilder, Func sleepDurationProvider, Func onRetryAsync) { if (sleepDurationProvider == null) @@ -954,14 +886,14 @@ public static AsyncRetryPolicy WaitAndRetryForeverAsync(this PolicyBuilder polic /// Builds an that will wait and retry indefinitely /// calling on each retry with the raised exception and retry count. /// On each retry, the duration to wait is calculated by calling with - /// the current retry number (1 for first retry, 2 for second etc) + /// the current retry number (1 for first retry, 2 for second etc). /// /// The policy builder. /// A function providing the duration to wait before retrying. /// The action to call asynchronously on each retry. /// The policy instance. - /// sleepDurationProvider - /// onRetryAsync + /// Thrown when is . + /// Thrown when is . public static AsyncRetryPolicy WaitAndRetryForeverAsync(this PolicyBuilder policyBuilder, Func sleepDurationProvider, Func onRetryAsync) { if (sleepDurationProvider == null) @@ -984,8 +916,8 @@ public static AsyncRetryPolicy WaitAndRetryForeverAsync(this PolicyBuilder polic /// A function providing the duration to wait before retrying. /// The action to call on each retry. /// The policy instance. - /// sleepDurationProvider - /// onRetry + /// Thrown when is . + /// Thrown when is . public static AsyncRetryPolicy WaitAndRetryForeverAsync(this PolicyBuilder policyBuilder, Func sleepDurationProvider, Action onRetry) { if (sleepDurationProvider == null) @@ -1010,8 +942,8 @@ public static AsyncRetryPolicy WaitAndRetryForeverAsync(this PolicyBuilder polic /// A function providing the duration to wait before retrying. /// The action to call on each retry. /// The policy instance. - /// sleepDurationProvider - /// onRetry + /// Thrown when is . + /// Thrown when is . public static AsyncRetryPolicy WaitAndRetryForeverAsync(this PolicyBuilder policyBuilder, Func sleepDurationProvider, Action onRetry) { if (sleepDurationProvider == null) @@ -1036,8 +968,8 @@ public static AsyncRetryPolicy WaitAndRetryForeverAsync(this PolicyBuilder polic /// A function providing the duration to wait before retrying. /// The action to call asynchronously on each retry. /// The policy instance. - /// sleepDurationProvider - /// onRetryAsync + /// Thrown when is . + /// Thrown when is . public static AsyncRetryPolicy WaitAndRetryForeverAsync(this PolicyBuilder policyBuilder, Func sleepDurationProvider, Func onRetryAsync) { if (sleepDurationProvider == null) @@ -1058,8 +990,8 @@ public static AsyncRetryPolicy WaitAndRetryForeverAsync(this PolicyBuilder polic /// A function providing the duration to wait before retrying. /// The action to call asynchronously on each retry. /// The policy instance. - /// sleepDurationProvider - /// onRetryAsync + /// Thrown when is . + /// Thrown when is . public static AsyncRetryPolicy WaitAndRetryForeverAsync(this PolicyBuilder policyBuilder, Func sleepDurationProvider, Func onRetryAsync) { if (sleepDurationProvider == null) @@ -1080,8 +1012,8 @@ public static AsyncRetryPolicy WaitAndRetryForeverAsync(this PolicyBuilder polic /// A function providing the duration to wait before retrying. /// The action to call asynchronously on each retry. /// The policy instance. - /// sleepDurationProvider - /// onRetryAsync + /// Thrown when is . + /// Thrown when is . public static AsyncRetryPolicy WaitAndRetryForeverAsync(this PolicyBuilder policyBuilder, Func sleepDurationProvider, Func onRetryAsync) { if (sleepDurationProvider == null) @@ -1105,8 +1037,8 @@ public static AsyncRetryPolicy WaitAndRetryForeverAsync(this PolicyBuilder polic /// A function providing the duration to wait before retrying. /// The action to call asynchronously on each retry. /// The policy instance. - /// sleepDurationProvider - /// onRetryAsync + /// Thrown when is . + /// Thrown when is . public static AsyncRetryPolicy WaitAndRetryForeverAsync(this PolicyBuilder policyBuilder, Func sleepDurationProvider, Func onRetryAsync) { if (sleepDurationProvider == null) diff --git a/src/Polly/Retry/AsyncRetryTResultSyntax.cs b/src/Polly/Retry/AsyncRetryTResultSyntax.cs index 195e4ea3626..ebb08b1cddc 100644 --- a/src/Polly/Retry/AsyncRetryTResultSyntax.cs +++ b/src/Polly/Retry/AsyncRetryTResultSyntax.cs @@ -33,7 +33,7 @@ public static AsyncRetryPolicy RetryAsync(this PolicyBuilderThe policy builder. /// The action to call on each retry. /// The policy instance. - /// onRetry + /// Thrown when is . public static AsyncRetryPolicy RetryAsync(this PolicyBuilder policyBuilder, Action, int> onRetry) => #pragma warning disable 1998 // async method has no awaits, will run synchronously policyBuilder.RetryAsync(1, onRetryAsync: async (outcome, i, _) => onRetry(outcome, i)); @@ -46,7 +46,7 @@ public static AsyncRetryPolicy RetryAsync(this PolicyBuilderThe policy builder. /// The action to call asynchronously on each retry. /// The policy instance. - /// onRetry + /// Thrown when is . public static AsyncRetryPolicy RetryAsync(this PolicyBuilder policyBuilder, Func, int, Task> onRetryAsync) => policyBuilder.RetryAsync(1, onRetryAsync: (outcome, i, _) => onRetryAsync(outcome, i)); @@ -59,7 +59,7 @@ public static AsyncRetryPolicy RetryAsync(this PolicyBuilderThe action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. - /// onRetry + /// Thrown when is . public static AsyncRetryPolicy RetryAsync(this PolicyBuilder policyBuilder, int retryCount, Action, int> onRetry) { if (onRetry == null) @@ -80,7 +80,7 @@ public static AsyncRetryPolicy RetryAsync(this PolicyBuilderThe action to call asynchronously on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. - /// onRetryAsync + /// Thrown when is . public static AsyncRetryPolicy RetryAsync(this PolicyBuilder policyBuilder, int retryCount, Func, int, Task> onRetryAsync) { if (onRetryAsync == null) @@ -96,7 +96,7 @@ public static AsyncRetryPolicy RetryAsync(this PolicyBuilderThe policy builder. /// The action to call on each retry. /// The policy instance. - /// onRetry + /// Thrown when is . public static AsyncRetryPolicy RetryAsync(this PolicyBuilder policyBuilder, Action, int, Context> onRetry) => policyBuilder.RetryAsync(1, onRetry); @@ -107,7 +107,7 @@ public static AsyncRetryPolicy RetryAsync(this PolicyBuilderThe policy builder. /// The action to call asynchronously on each retry. /// The policy instance. - /// onRetry + /// Thrown when is . public static AsyncRetryPolicy RetryAsync(this PolicyBuilder policyBuilder, Func, int, Context, Task> onRetryAsync) => policyBuilder.RetryAsync(1, onRetryAsync); @@ -120,7 +120,7 @@ public static AsyncRetryPolicy RetryAsync(this PolicyBuilderThe action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than zero. - /// onRetry + /// Thrown when is . public static AsyncRetryPolicy RetryAsync(this PolicyBuilder policyBuilder, int retryCount, Action, int, Context> onRetry) { if (onRetry == null) @@ -141,7 +141,7 @@ public static AsyncRetryPolicy RetryAsync(this PolicyBuilderThe action to call asynchronously on each retry. /// The policy instance. /// retryCount;Value must be greater than zero. - /// onRetryAsync + /// Thrown when is . public static AsyncRetryPolicy RetryAsync(this PolicyBuilder policyBuilder, int retryCount, Func, int, Context, Task> onRetryAsync) { if (retryCount < 0) @@ -174,7 +174,7 @@ public static AsyncRetryPolicy RetryForeverAsync(this PolicyBu /// The policy builder. /// The action to call on each retry. /// The policy instance. - /// onRetry + /// Thrown when is . public static AsyncRetryPolicy RetryForeverAsync(this PolicyBuilder policyBuilder, Action> onRetry) { if (onRetry == null) @@ -193,7 +193,7 @@ public static AsyncRetryPolicy RetryForeverAsync(this PolicyBu /// The policy builder. /// The action to call on each retry. /// The policy instance. - /// onRetry + /// Thrown when is . public static AsyncRetryPolicy RetryForeverAsync(this PolicyBuilder policyBuilder, Action, int> onRetry) { if (onRetry == null) @@ -212,7 +212,7 @@ public static AsyncRetryPolicy RetryForeverAsync(this PolicyBu /// The policy builder. /// The action to call asynchronously on each retry. /// The policy instance. - /// onRetryAsync + /// Thrown when is . public static AsyncRetryPolicy RetryForeverAsync(this PolicyBuilder policyBuilder, Func, Task> onRetryAsync) { if (onRetryAsync == null) @@ -228,7 +228,7 @@ public static AsyncRetryPolicy RetryForeverAsync(this PolicyBu /// The policy builder. /// The action to call asynchronously on each retry. /// The policy instance. - /// onRetryAsync + /// Thrown when is . public static AsyncRetryPolicy RetryForeverAsync(this PolicyBuilder policyBuilder, Func, int, Task> onRetryAsync) { if (onRetryAsync == null) @@ -244,7 +244,7 @@ public static AsyncRetryPolicy RetryForeverAsync(this PolicyBu /// The policy builder. /// The action to call on each retry. /// The policy instance. - /// onRetry + /// Thrown when is . public static AsyncRetryPolicy RetryForeverAsync(this PolicyBuilder policyBuilder, Action, Context> onRetry) { if (onRetry == null) @@ -263,7 +263,7 @@ public static AsyncRetryPolicy RetryForeverAsync(this PolicyBu /// The policy builder. /// The action to call on each retry. /// The policy instance. - /// onRetry + /// Thrown when is . public static AsyncRetryPolicy RetryForeverAsync(this PolicyBuilder policyBuilder, Action, int, Context> onRetry) { if (onRetry == null) @@ -282,7 +282,7 @@ public static AsyncRetryPolicy RetryForeverAsync(this PolicyBu /// The policy builder. /// The action to call asynchronously on each retry. /// The policy instance. - /// onRetryAsync + /// Thrown when is . public static AsyncRetryPolicy RetryForeverAsync(this PolicyBuilder policyBuilder, Func, Context, Task> onRetryAsync) { if (onRetryAsync == null) @@ -300,7 +300,7 @@ public static AsyncRetryPolicy RetryForeverAsync(this PolicyBu /// The policy builder. /// The action to call asynchronously on each retry. /// The policy instance. - /// onRetryAsync + /// Thrown when is . public static AsyncRetryPolicy RetryForeverAsync(this PolicyBuilder policyBuilder, Func, int, Context, Task> onRetryAsync) { if (onRetryAsync == null) @@ -331,7 +331,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBu /// Builds an that will wait and retry times /// calling on each retry with the handled exception or result and the current sleep duration. /// On each retry, the duration to wait is calculated by calling with - /// the current retry number (1 for first retry, 2 for second etc) + /// the current retry number (1 for first retry, 2 for second etc). /// /// The policy builder. /// The retry count. @@ -339,11 +339,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBu /// The action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. - /// - /// sleepDurationProvider - /// or - /// onRetry - /// + /// Thrown when or is . public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilder, int retryCount, Func sleepDurationProvider, Action, TimeSpan> onRetry) { @@ -370,11 +366,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBu /// The action to call asynchronously on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. - /// - /// sleepDurationProvider - /// or - /// onRetryAsync - /// + /// Thrown when or is . public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilder, int retryCount, Func sleepDurationProvider, Func, TimeSpan, Task> onRetryAsync) { if (onRetryAsync == null) @@ -400,11 +392,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBu /// The action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. - /// - /// sleepDurationProvider - /// or - /// onRetry - /// + /// Thrown when or is . public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilder, int retryCount, Func sleepDurationProvider, Action, TimeSpan, Context> onRetry) { @@ -431,11 +419,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBu /// The action to call asynchronously on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. - /// - /// sleepDurationProvider - /// or - /// onRetryAsync - /// + /// Thrown when or is . public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilder, int retryCount, Func sleepDurationProvider, Func, TimeSpan, Context, Task> onRetryAsync) { if (onRetryAsync == null) @@ -459,11 +443,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBu /// The action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. - /// - /// sleepDurationProvider - /// or - /// onRetry - /// + /// Thrown when or is . public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilder, int retryCount, Func sleepDurationProvider, Action, TimeSpan, int, Context> onRetry) { if (onRetry == null) @@ -489,11 +469,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBu /// The action to call asynchronously on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. - /// - /// sleepDurationProvider - /// or - /// onRetryAsync - /// + /// Thrown when or is . public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilder, int retryCount, Func sleepDurationProvider, Func, TimeSpan, int, Context, Task> onRetryAsync) { @@ -526,11 +502,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBu /// The action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. - /// - /// sleepDurationProvider - /// or - /// onRetry - /// + /// Thrown when or is . public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilder, int retryCount, Func sleepDurationProvider, Action, TimeSpan, Context> onRetry) { @@ -557,11 +529,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBu /// The action to call asynchronously on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. - /// - /// sleepDurationProvider - /// or - /// onRetryAsync - /// + /// Thrown when or is . public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilder, int retryCount, Func sleepDurationProvider, Func, TimeSpan, Context, Task> onRetryAsync) { if (onRetryAsync == null) @@ -585,11 +553,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBu /// The action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. - /// - /// sleepDurationProvider - /// or - /// onRetry - /// + /// Thrown when or is . public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilder, int retryCount, Func sleepDurationProvider, Action, TimeSpan, int, Context> onRetry) { if (onRetry == null) @@ -615,11 +579,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBu /// The action to call asynchronously on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. - /// - /// sleepDurationProvider - /// or - /// onRetryAsync - /// + /// Thrown when or is . public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilder, int retryCount, Func sleepDurationProvider, Func, TimeSpan, int, Context, Task> onRetryAsync) { @@ -644,11 +604,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBu /// The action to call asynchronously on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. - /// - /// sleepDurationProvider - /// or - /// onRetryAsync - /// + /// Thrown when or is . public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilder, int retryCount, Func, Context, TimeSpan> sleepDurationProvider, Func, TimeSpan, int, Context, Task> onRetryAsync) { @@ -691,11 +647,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBu /// The sleep durations to wait for on each retry. /// The action to call on each retry. /// The policy instance. - /// - /// sleepDurations - /// or - /// onRetry - /// + /// Thrown when or is . public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilder, IEnumerable sleepDurations, Action, TimeSpan> onRetry) { if (onRetry == null) @@ -718,11 +670,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBu /// The sleep durations to wait for on each retry. /// The action to call asynchronously on each retry. /// The policy instance. - /// - /// sleepDurations - /// or - /// onRetryAsync - /// + /// Thrown when or is . public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilder, IEnumerable sleepDurations, Func, TimeSpan, Task> onRetryAsync) { if (onRetryAsync == null) @@ -743,11 +691,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBu /// The sleep durations to wait for on each retry. /// The action to call on each retry. /// The policy instance. - /// - /// sleepDurations - /// or - /// onRetry - /// + /// Thrown when or is . public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilder, IEnumerable sleepDurations, Action, TimeSpan, Context> onRetry) { if (onRetry == null) @@ -770,11 +714,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBu /// The sleep durations to wait for on each retry. /// The action to call asynchronously on each retry. /// The policy instance. - /// - /// sleepDurations - /// or - /// onRetryAsync - /// + /// Thrown when or is . public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilder, IEnumerable sleepDurations, Func, TimeSpan, Context, Task> onRetryAsync) { if (onRetryAsync == null) @@ -795,11 +735,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBu /// The sleep durations to wait for on each retry. /// The action to call on each retry. /// The policy instance. - /// - /// sleepDurations - /// or - /// onRetry - /// + /// Thrown when or is . public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilder, IEnumerable sleepDurations, Action, TimeSpan, int, Context> onRetry) { if (onRetry == null) @@ -822,11 +758,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBu /// The sleep durations to wait for on each retry. /// The action to call asynchronously on each retry. /// The policy instance. - /// - /// sleepDurations - /// or - /// onRetryAsync - /// + /// Thrown when or is . public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilder, IEnumerable sleepDurations, Func, TimeSpan, int, Context, Task> onRetryAsync) { if (sleepDurations == null) @@ -848,7 +780,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBu /// The policy builder. /// The function that provides the duration to wait for for a particular retry attempt. /// The policy instance. - /// sleepDurationProvider + /// Thrown when is . public static AsyncRetryPolicy WaitAndRetryForeverAsync(this PolicyBuilder policyBuilder, Func sleepDurationProvider) { if (sleepDurationProvider == null) @@ -867,7 +799,7 @@ public static AsyncRetryPolicy WaitAndRetryForeverAsync(this P /// The policy builder. /// The function that provides the duration to wait for for a particular retry attempt. /// The policy instance. - /// sleepDurationProvider + /// Thrown when is . public static AsyncRetryPolicy WaitAndRetryForeverAsync(this PolicyBuilder policyBuilder, Func sleepDurationProvider) { if (sleepDurationProvider == null) @@ -888,8 +820,8 @@ public static AsyncRetryPolicy WaitAndRetryForeverAsync(this P /// A function providing the duration to wait before retrying. /// The action to call on each retry. /// The policy instance. - /// sleepDurationProvider - /// onRetry + /// Thrown when is . + /// Thrown when is . public static AsyncRetryPolicy WaitAndRetryForeverAsync(this PolicyBuilder policyBuilder, Func sleepDurationProvider, Action, TimeSpan> onRetry) { if (sleepDurationProvider == null) @@ -912,8 +844,8 @@ public static AsyncRetryPolicy WaitAndRetryForeverAsync(this P /// A function providing the duration to wait before retrying. /// The action to call on each retry. /// The policy instance. - /// sleepDurationProvider - /// onRetry + /// Thrown when is . + /// Thrown when is . public static AsyncRetryPolicy WaitAndRetryForeverAsync(this PolicyBuilder policyBuilder, Func sleepDurationProvider, Action, int, TimeSpan> onRetry) { if (sleepDurationProvider == null) @@ -936,8 +868,8 @@ public static AsyncRetryPolicy WaitAndRetryForeverAsync(this P /// A function providing the duration to wait before retrying. /// The action to call asynchronously on each retry. /// The policy instance. - /// sleepDurationProvider - /// onRetryAsync + /// Thrown when is . + /// Thrown when is . public static AsyncRetryPolicy WaitAndRetryForeverAsync(this PolicyBuilder policyBuilder, Func sleepDurationProvider, Func, TimeSpan, Task> onRetryAsync) { if (sleepDurationProvider == null) @@ -960,8 +892,8 @@ public static AsyncRetryPolicy WaitAndRetryForeverAsync(this P /// A function providing the duration to wait before retrying. /// The action to call asynchronously on each retry. /// The policy instance. - /// sleepDurationProvider - /// onRetryAsync + /// Thrown when is . + /// Thrown when is . public static AsyncRetryPolicy WaitAndRetryForeverAsync(this PolicyBuilder policyBuilder, Func sleepDurationProvider, Func, int, TimeSpan, Task> onRetryAsync) { if (sleepDurationProvider == null) @@ -984,8 +916,8 @@ public static AsyncRetryPolicy WaitAndRetryForeverAsync(this P /// A function providing the duration to wait before retrying. /// The action to call on each retry. /// The policy instance. - /// sleepDurationProvider - /// onRetry + /// Thrown when is . + /// Thrown when is . public static AsyncRetryPolicy WaitAndRetryForeverAsync(this PolicyBuilder policyBuilder, Func sleepDurationProvider, Action, TimeSpan, Context> onRetry) { if (onRetry == null) @@ -1008,8 +940,8 @@ public static AsyncRetryPolicy WaitAndRetryForeverAsync(this P /// A function providing the duration to wait before retrying. /// The action to call on each retry. /// The policy instance. - /// sleepDurationProvider - /// onRetry + /// Thrown when is . + /// Thrown when is . public static AsyncRetryPolicy WaitAndRetryForeverAsync(this PolicyBuilder policyBuilder, Func sleepDurationProvider, Action, int, TimeSpan, Context> onRetry) { if (onRetry == null) @@ -1032,8 +964,8 @@ public static AsyncRetryPolicy WaitAndRetryForeverAsync(this P /// A function providing the duration to wait before retrying. /// The action to call asynchronously on each retry. /// The policy instance. - /// sleepDurationProvider - /// onRetryAsync + /// Thrown when is . + /// Thrown when is . public static AsyncRetryPolicy WaitAndRetryForeverAsync(this PolicyBuilder policyBuilder, Func sleepDurationProvider, Func, TimeSpan, Context, Task> onRetryAsync) { if (sleepDurationProvider == null) @@ -1054,8 +986,8 @@ public static AsyncRetryPolicy WaitAndRetryForeverAsync(this P /// A function providing the duration to wait before retrying. /// The action to call asynchronously on each retry. /// The policy instance. - /// sleepDurationProvider - /// onRetryAsync + /// Thrown when is . + /// Thrown when is . public static AsyncRetryPolicy WaitAndRetryForeverAsync(this PolicyBuilder policyBuilder, Func sleepDurationProvider, Func, int, TimeSpan, Context, Task> onRetryAsync) { if (sleepDurationProvider == null) @@ -1076,8 +1008,8 @@ public static AsyncRetryPolicy WaitAndRetryForeverAsync(this P /// A function providing the duration to wait before retrying. /// The action to call asynchronously on each retry. /// The policy instance. - /// sleepDurationProvider - /// onRetryAsync + /// Thrown when is . + /// Thrown when is . public static AsyncRetryPolicy WaitAndRetryForeverAsync(this PolicyBuilder policyBuilder, Func, Context, TimeSpan> sleepDurationProvider, Func, TimeSpan, Context, Task> onRetryAsync) { if (sleepDurationProvider == null) @@ -1101,8 +1033,8 @@ public static AsyncRetryPolicy WaitAndRetryForeverAsync(this P /// A function providing the duration to wait before retrying. /// The action to call asynchronously on each retry. /// The policy instance. - /// sleepDurationProvider - /// onRetryAsync + /// Thrown when is . + /// Thrown when is . public static AsyncRetryPolicy WaitAndRetryForeverAsync(this PolicyBuilder policyBuilder, Func, Context, TimeSpan> sleepDurationProvider, Func, int, TimeSpan, Context, Task> onRetryAsync) { if (sleepDurationProvider == null) diff --git a/src/Polly/Retry/RetrySyntax.cs b/src/Polly/Retry/RetrySyntax.cs index 73fe25cec0a..c4dd558437a 100644 --- a/src/Polly/Retry/RetrySyntax.cs +++ b/src/Polly/Retry/RetrySyntax.cs @@ -33,7 +33,7 @@ public static RetryPolicy Retry(this PolicyBuilder policyBuilder, int retryCount /// The policy builder. /// The action to call on each retry. /// The policy instance. - /// onRetry + /// Thrown when is . public static RetryPolicy Retry(this PolicyBuilder policyBuilder, Action onRetry) => policyBuilder.Retry(1, onRetry); @@ -46,7 +46,7 @@ public static RetryPolicy Retry(this PolicyBuilder policyBuilder, ActionThe action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. - /// onRetry + /// Thrown when is . public static RetryPolicy Retry(this PolicyBuilder policyBuilder, int retryCount, Action onRetry) { if (retryCount < 0) @@ -64,7 +64,7 @@ public static RetryPolicy Retry(this PolicyBuilder policyBuilder, int retryCount /// The policy builder. /// The action to call on each retry. /// The policy instance. - /// onRetry + /// Thrown when is . public static RetryPolicy Retry(this PolicyBuilder policyBuilder, Action onRetry) => policyBuilder.Retry(1, onRetry); @@ -77,7 +77,7 @@ public static RetryPolicy Retry(this PolicyBuilder policyBuilder, ActionThe action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. - /// onRetry + /// Thrown when is . public static RetryPolicy Retry(this PolicyBuilder policyBuilder, int retryCount, Action onRetry) { if (retryCount < 0) @@ -110,7 +110,7 @@ public static RetryPolicy RetryForever(this PolicyBuilder policyBuilder) /// The policy builder. /// The action to call on each retry. /// The policy instance. - /// onRetry + /// Thrown when is . public static RetryPolicy RetryForever(this PolicyBuilder policyBuilder, Action onRetry) { if (onRetry == null) @@ -126,7 +126,7 @@ public static RetryPolicy RetryForever(this PolicyBuilder policyBuilder, Action< /// The policy builder. /// The action to call on each retry. /// The policy instance. - /// onRetry + /// Thrown when is . public static RetryPolicy RetryForever(this PolicyBuilder policyBuilder, Action onRetry) { if (onRetry == null) @@ -142,7 +142,7 @@ public static RetryPolicy RetryForever(this PolicyBuilder policyBuilder, Action< /// The policy builder. /// The action to call on each retry. /// The policy instance. - /// onRetry + /// Thrown when is . public static RetryPolicy RetryForever(this PolicyBuilder policyBuilder, Action onRetry) { if (onRetry == null) @@ -160,7 +160,7 @@ public static RetryPolicy RetryForever(this PolicyBuilder policyBuilder, Action< /// The policy builder. /// The action to call on each retry. /// The policy instance. - /// onRetry + /// Thrown when is . public static RetryPolicy RetryForever(this PolicyBuilder policyBuilder, Action onRetry) { if (onRetry == null) @@ -199,11 +199,7 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilder policyBuilder, int ret /// The action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. - /// - /// sleepDurationProvider - /// or - /// onRetry - /// + /// Thrown when or is . public static RetryPolicy WaitAndRetry(this PolicyBuilder policyBuilder, int retryCount, Func sleepDurationProvider, Action onRetry) { if (onRetry == null) @@ -227,11 +223,7 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilder policyBuilder, int ret /// The action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. - /// - /// sleepDurationProvider - /// or - /// onRetry - /// + /// Thrown when or is . public static RetryPolicy WaitAndRetry(this PolicyBuilder policyBuilder, int retryCount, Func sleepDurationProvider, Action onRetry) { if (onRetry == null) @@ -255,11 +247,7 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilder policyBuilder, int ret /// The action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. - /// - /// timeSpanProvider - /// or - /// onRetry - /// + /// Thrown when or is . public static RetryPolicy WaitAndRetry(this PolicyBuilder policyBuilder, int retryCount, Func sleepDurationProvider, Action onRetry) { if (retryCount < 0) @@ -307,11 +295,7 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilder policyBuilder, int ret /// The action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. - /// - /// sleepDurationProvider - /// or - /// onRetry - /// + /// Thrown when or is . public static RetryPolicy WaitAndRetry(this PolicyBuilder policyBuilder, int retryCount, Func sleepDurationProvider, Action onRetry) { if (onRetry == null) @@ -335,11 +319,7 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilder policyBuilder, int ret /// The action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. - /// - /// timeSpanProvider - /// or - /// onRetry - /// + /// Thrown when or is . public static RetryPolicy WaitAndRetry(this PolicyBuilder policyBuilder, int retryCount, Func sleepDurationProvider, Action onRetry) { if (sleepDurationProvider == null) @@ -362,11 +342,7 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilder policyBuilder, int ret /// The action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. - /// - /// timeSpanProvider - /// or - /// onRetry - /// + /// Thrown when or is . public static RetryPolicy WaitAndRetry(this PolicyBuilder policyBuilder, int retryCount, Func sleepDurationProvider, Action onRetry) { if (retryCount < 0) @@ -406,11 +382,7 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilder policyBuilder, IEnumer /// The sleep durations to wait for on each retry. /// The action to call on each retry. /// The policy instance. - /// - /// sleepDurations - /// or - /// onRetry - /// + /// Thrown when or is . public static RetryPolicy WaitAndRetry(this PolicyBuilder policyBuilder, IEnumerable sleepDurations, Action onRetry) { if (onRetry == null) @@ -428,11 +400,7 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilder policyBuilder, IEnumer /// The sleep durations to wait for on each retry. /// The action to call on each retry. /// The policy instance. - /// - /// sleepDurations - /// or - /// onRetry - /// + /// Thrown when or is . public static RetryPolicy WaitAndRetry(this PolicyBuilder policyBuilder, IEnumerable sleepDurations, Action onRetry) { if (onRetry == null) @@ -450,11 +418,7 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilder policyBuilder, IEnumer /// The sleep durations to wait for on each retry. /// The action to call on each retry. /// The policy instance. - /// - /// sleepDurations - /// or - /// onRetry - /// + /// Thrown when or is . public static RetryPolicy WaitAndRetry(this PolicyBuilder policyBuilder, IEnumerable sleepDurations, Action onRetry) { if (sleepDurations == null) @@ -471,12 +435,12 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilder policyBuilder, IEnumer /// /// Builds a that will wait and retry indefinitely until the action succeeds. /// On each retry, the duration to wait is calculated by calling with - /// the current retry number (1 for first retry, 2 for second etc) + /// the current retry number (1 for first retry, 2 for second etc). /// /// The policy builder. /// The function that provides the duration to wait for for a particular retry attempt. /// The policy instance. - /// sleepDurationProvider + /// Thrown when is . public static RetryPolicy WaitAndRetryForever(this PolicyBuilder policyBuilder, Func sleepDurationProvider) { if (sleepDurationProvider == null) @@ -495,7 +459,7 @@ public static RetryPolicy WaitAndRetryForever(this PolicyBuilder policyBuilder, /// The policy builder. /// The function that provides the duration to wait for for a particular retry attempt. /// The policy instance. - /// sleepDurationProvider + /// Thrown when is . public static RetryPolicy WaitAndRetryForever(this PolicyBuilder policyBuilder, Func sleepDurationProvider) { if (sleepDurationProvider == null) @@ -510,14 +474,14 @@ public static RetryPolicy WaitAndRetryForever(this PolicyBuilder policyBuilder, /// Builds a that will wait and retry indefinitely until the action succeeds, /// calling on each retry with the raised exception. /// On each retry, the duration to wait is calculated by calling with - /// the current retry number (1 for first retry, 2 for second etc) + /// the current retry number (1 for first retry, 2 for second etc). /// /// The policy builder. /// A function providing the duration to wait before retrying. /// The action to call on each retry. /// The policy instance. - /// sleepDurationProvider - /// onRetry + /// Thrown when is . + /// Thrown when is . public static RetryPolicy WaitAndRetryForever(this PolicyBuilder policyBuilder, Func sleepDurationProvider, Action onRetry) { if (sleepDurationProvider == null) @@ -534,14 +498,14 @@ public static RetryPolicy WaitAndRetryForever(this PolicyBuilder policyBuilder, /// Builds a that will wait and retry indefinitely until the action succeeds, /// calling on each retry with the raised exception and retry count. /// On each retry, the duration to wait is calculated by calling with - /// the current retry number (1 for first retry, 2 for second etc) + /// the current retry number (1 for first retry, 2 for second etc). /// /// The policy builder. /// A function providing the duration to wait before retrying. /// The action to call on each retry. /// The policy instance. - /// sleepDurationProvider - /// onRetry + /// Thrown when is . + /// Thrown when is . public static RetryPolicy WaitAndRetryForever(this PolicyBuilder policyBuilder, Func sleepDurationProvider, Action onRetry) { if (sleepDurationProvider == null) @@ -564,8 +528,8 @@ public static RetryPolicy WaitAndRetryForever(this PolicyBuilder policyBuilder, /// A function providing the duration to wait before retrying. /// The action to call on each retry. /// The policy instance. - /// sleepDurationProvider - /// onRetry + /// Thrown when is . + /// Thrown when is . public static RetryPolicy WaitAndRetryForever(this PolicyBuilder policyBuilder, Func sleepDurationProvider, Action onRetry) { if (sleepDurationProvider == null) @@ -586,8 +550,8 @@ public static RetryPolicy WaitAndRetryForever(this PolicyBuilder policyBuilder, /// A function providing the duration to wait before retrying. /// The action to call on each retry. /// The policy instance. - /// sleepDurationProvider - /// onRetry + /// Thrown when is . + /// Thrown when is . public static RetryPolicy WaitAndRetryForever(this PolicyBuilder policyBuilder, Func sleepDurationProvider, Action onRetry) { if (sleepDurationProvider == null) @@ -608,8 +572,8 @@ public static RetryPolicy WaitAndRetryForever(this PolicyBuilder policyBuilder, /// A function providing the duration to wait before retrying. /// The action to call on each retry. /// The policy instance. - /// sleepDurationProvider - /// onRetry + /// Thrown when is . + /// Thrown when is . public static RetryPolicy WaitAndRetryForever(this PolicyBuilder policyBuilder, Func sleepDurationProvider, Action onRetry) { if (sleepDurationProvider == null) @@ -633,8 +597,8 @@ public static RetryPolicy WaitAndRetryForever(this PolicyBuilder policyBuilder, /// A function providing the duration to wait before retrying. /// The action to call on each retry. /// The policy instance. - /// sleepDurationProvider - /// onRetry + /// Thrown when is . + /// Thrown when is . public static RetryPolicy WaitAndRetryForever(this PolicyBuilder policyBuilder, Func sleepDurationProvider, Action onRetry) { if (sleepDurationProvider == null) diff --git a/src/Polly/Retry/RetryTResultSyntax.cs b/src/Polly/Retry/RetryTResultSyntax.cs index 95a7d8905ea..c04d9dde0ff 100644 --- a/src/Polly/Retry/RetryTResultSyntax.cs +++ b/src/Polly/Retry/RetryTResultSyntax.cs @@ -33,7 +33,7 @@ public static RetryPolicy Retry(this PolicyBuilder po /// The policy builder. /// The action to call on each retry. /// The policy instance. - /// onRetry + /// Thrown when is . public static RetryPolicy Retry(this PolicyBuilder policyBuilder, Action, int> onRetry) => policyBuilder.Retry(1, onRetry); @@ -46,7 +46,7 @@ public static RetryPolicy Retry(this PolicyBuilder po /// The action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. - /// onRetry + /// Thrown when is . public static RetryPolicy Retry(this PolicyBuilder policyBuilder, int retryCount, Action, int> onRetry) { if (retryCount < 0) @@ -64,7 +64,7 @@ public static RetryPolicy Retry(this PolicyBuilder po /// The policy builder. /// The action to call on each retry. /// The policy instance. - /// onRetry + /// Thrown when is . public static RetryPolicy Retry(this PolicyBuilder policyBuilder, Action, int, Context> onRetry) => policyBuilder.Retry(1, onRetry); @@ -77,7 +77,7 @@ public static RetryPolicy Retry(this PolicyBuilder po /// The action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. - /// onRetry + /// Thrown when is . public static RetryPolicy Retry(this PolicyBuilder policyBuilder, int retryCount, Action, int, Context> onRetry) { if (retryCount < 0) @@ -110,7 +110,7 @@ public static RetryPolicy RetryForever(this PolicyBuilderThe policy builder. /// The action to call on each retry. /// The policy instance. - /// onRetry + /// Thrown when is . public static RetryPolicy RetryForever(this PolicyBuilder policyBuilder, Action> onRetry) { if (onRetry == null) @@ -126,7 +126,7 @@ public static RetryPolicy RetryForever(this PolicyBuilderThe policy builder. /// The action to call on each retry. /// The policy instance. - /// onRetry + /// Thrown when is . public static RetryPolicy RetryForever(this PolicyBuilder policyBuilder, Action, int> onRetry) { if (onRetry == null) @@ -142,7 +142,7 @@ public static RetryPolicy RetryForever(this PolicyBuilderThe policy builder. /// The action to call on each retry. /// The policy instance. - /// onRetry + /// Thrown when is . public static RetryPolicy RetryForever(this PolicyBuilder policyBuilder, Action, Context> onRetry) { if (onRetry == null) @@ -160,7 +160,7 @@ public static RetryPolicy RetryForever(this PolicyBuilderThe policy builder. /// The action to call on each retry. /// The policy instance. - /// onRetry + /// Thrown when is . public static RetryPolicy RetryForever(this PolicyBuilder policyBuilder, Action, int, Context> onRetry) { if (onRetry == null) @@ -199,11 +199,7 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilderThe action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. - /// - /// sleepDurationProvider - /// or - /// onRetry - /// + /// Thrown when or is . public static RetryPolicy WaitAndRetry(this PolicyBuilder policyBuilder, int retryCount, Func sleepDurationProvider, Action, TimeSpan> onRetry) { if (onRetry == null) @@ -227,11 +223,7 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilderThe action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. - /// - /// sleepDurationProvider - /// or - /// onRetry - /// + /// Thrown when or is . public static RetryPolicy WaitAndRetry(this PolicyBuilder policyBuilder, int retryCount, Func sleepDurationProvider, Action, TimeSpan, Context> onRetry) { if (onRetry == null) @@ -255,11 +247,7 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilderThe action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. - /// - /// timeSpanProvider - /// or - /// onRetry - /// + /// Thrown when or is . public static RetryPolicy WaitAndRetry(this PolicyBuilder policyBuilder, int retryCount, Func sleepDurationProvider, Action, TimeSpan, int, Context> onRetry) { if (retryCount < 0) @@ -307,11 +295,7 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilderThe action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. - /// - /// sleepDurationProvider - /// or - /// onRetry - /// + /// Thrown when or is . public static RetryPolicy WaitAndRetry(this PolicyBuilder policyBuilder, int retryCount, Func sleepDurationProvider, Action, TimeSpan, Context> onRetry) { if (onRetry == null) @@ -335,11 +319,7 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilderThe action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. - /// - /// timeSpanProvider - /// or - /// onRetry - /// + /// Thrown when or is . public static RetryPolicy WaitAndRetry(this PolicyBuilder policyBuilder, int retryCount, Func sleepDurationProvider, Action, TimeSpan, int, Context> onRetry) => policyBuilder.WaitAndRetry( retryCount, @@ -374,11 +354,7 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilderThe action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. - /// - /// sleepDurationProvider - /// or - /// onRetry - /// + /// Thrown when or is . public static RetryPolicy WaitAndRetry(this PolicyBuilder policyBuilder, int retryCount, Func, Context, TimeSpan> sleepDurationProvider, Action, TimeSpan, Context> onRetry) { if (onRetry == null) @@ -402,11 +378,7 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilderThe action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. - /// - /// timeSpanProvider - /// or - /// onRetry - /// + /// Thrown when or is . public static RetryPolicy WaitAndRetry(this PolicyBuilder policyBuilder, int retryCount, Func, Context, TimeSpan> sleepDurationProvider, Action, TimeSpan, int, Context> onRetry) { if (retryCount < 0) @@ -446,11 +418,7 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilderThe sleep durations to wait for on each retry. /// The action to call on each retry. /// The policy instance. - /// - /// sleepDurations - /// or - /// onRetry - /// + /// Thrown when or is . public static RetryPolicy WaitAndRetry(this PolicyBuilder policyBuilder, IEnumerable sleepDurations, Action, TimeSpan> onRetry) { if (onRetry == null) @@ -468,11 +436,7 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilderThe sleep durations to wait for on each retry. /// The action to call on each retry. /// The policy instance. - /// - /// sleepDurations - /// or - /// onRetry - /// + /// Thrown when or is . public static RetryPolicy WaitAndRetry(this PolicyBuilder policyBuilder, IEnumerable sleepDurations, Action, TimeSpan, Context> onRetry) { if (onRetry == null) @@ -490,11 +454,7 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilderThe sleep durations to wait for on each retry. /// The action to call on each retry. /// The policy instance. - /// - /// sleepDurations - /// or - /// onRetry - /// + /// Thrown when or is . public static RetryPolicy WaitAndRetry(this PolicyBuilder policyBuilder, IEnumerable sleepDurations, Action, TimeSpan, int, Context> onRetry) { if (sleepDurations == null) @@ -511,12 +471,12 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilder /// Builds a that will wait and retry indefinitely until the action succeeds. /// On each retry, the duration to wait is calculated by calling with - /// the current retry number (1 for first retry, 2 for second etc) + /// the current retry number (1 for first retry, 2 for second etc). /// /// The policy builder. /// The function that provides the duration to wait for for a particular retry attempt. /// The policy instance. - /// sleepDurationProvider + /// Thrown when is . public static RetryPolicy WaitAndRetryForever(this PolicyBuilder policyBuilder, Func sleepDurationProvider) { if (sleepDurationProvider == null) @@ -530,12 +490,12 @@ public static RetryPolicy WaitAndRetryForever(this PolicyBuild /// /// Builds a that will wait and retry indefinitely until the action succeeds. /// On each retry, the duration to wait is calculated by calling with - /// the current retry number (1 for first retry, 2 for second etc) and execution context + /// the current retry number (1 for first retry, 2 for second etc) and execution context. /// /// The policy builder. /// The function that provides the duration to wait for for a particular retry attempt. /// The policy instance. - /// sleepDurationProvider + /// Thrown when is . public static RetryPolicy WaitAndRetryForever(this PolicyBuilder policyBuilder, Func sleepDurationProvider) { if (sleepDurationProvider == null) @@ -550,14 +510,14 @@ public static RetryPolicy WaitAndRetryForever(this PolicyBuild /// Builds a that will wait and retry indefinitely until the action succeeds, /// calling on each retry with the handled exception or result. /// On each retry, the duration to wait is calculated by calling with - /// the current retry number (1 for first retry, 2 for second etc) + /// the current retry number (1 for first retry, 2 for second etc). /// /// The policy builder. /// A function providing the duration to wait before retrying. /// The action to call on each retry. /// The policy instance. - /// sleepDurationProvider - /// onRetry + /// Thrown when is . + /// Thrown when is . public static RetryPolicy WaitAndRetryForever(this PolicyBuilder policyBuilder, Func sleepDurationProvider, Action, TimeSpan> onRetry) { if (sleepDurationProvider == null) @@ -574,14 +534,14 @@ public static RetryPolicy WaitAndRetryForever(this PolicyBuild /// Builds a that will wait and retry indefinitely until the action succeeds, /// calling on each retry with the handled exception or result and retry count. /// On each retry, the duration to wait is calculated by calling with - /// the current retry number (1 for first retry, 2 for second etc) + /// the current retry number (1 for first retry, 2 for second etc). /// /// The policy builder. /// A function providing the duration to wait before retrying. /// The action to call on each retry. /// The policy instance. - /// sleepDurationProvider - /// onRetry + /// Thrown when is . + /// Thrown when is . public static RetryPolicy WaitAndRetryForever(this PolicyBuilder policyBuilder, Func sleepDurationProvider, Action, int, TimeSpan> onRetry) { if (sleepDurationProvider == null) @@ -604,8 +564,8 @@ public static RetryPolicy WaitAndRetryForever(this PolicyBuild /// A function providing the duration to wait before retrying. /// The action to call on each retry. /// The policy instance. - /// sleepDurationProvider - /// onRetry + /// Thrown when is . + /// Thrown when is . public static RetryPolicy WaitAndRetryForever(this PolicyBuilder policyBuilder, Func sleepDurationProvider, Action, TimeSpan, Context> onRetry) { if (sleepDurationProvider == null) @@ -626,8 +586,8 @@ public static RetryPolicy WaitAndRetryForever(this PolicyBuild /// A function providing the duration to wait before retrying. /// The action to call on each retry. /// The policy instance. - /// sleepDurationProvider - /// onRetry + /// Thrown when is . + /// Thrown when is . public static RetryPolicy WaitAndRetryForever(this PolicyBuilder policyBuilder, Func sleepDurationProvider, Action, int, TimeSpan, Context> onRetry) { if (sleepDurationProvider == null) @@ -648,8 +608,8 @@ public static RetryPolicy WaitAndRetryForever(this PolicyBuild /// A function providing the duration to wait before retrying. /// The action to call on each retry. /// The policy instance. - /// sleepDurationProvider - /// onRetry + /// Thrown when is . + /// Thrown when is . public static RetryPolicy WaitAndRetryForever(this PolicyBuilder policyBuilder, Func, Context, TimeSpan> sleepDurationProvider, Action, TimeSpan, Context> onRetry) { if (sleepDurationProvider == null) @@ -673,8 +633,8 @@ public static RetryPolicy WaitAndRetryForever(this PolicyBuild /// A function providing the duration to wait before retrying. /// The action to call on each retry. /// The policy instance. - /// sleepDurationProvider - /// onRetry + /// Thrown when is . + /// Thrown when is . public static RetryPolicy WaitAndRetryForever(this PolicyBuilder policyBuilder, Func, Context, TimeSpan> sleepDurationProvider, Action, int, TimeSpan, Context> onRetry) { if (sleepDurationProvider == null) diff --git a/src/Polly/Timeout/AsyncTimeoutSyntax.cs b/src/Polly/Timeout/AsyncTimeoutSyntax.cs index 5c53c30ba9c..c268414569c 100644 --- a/src/Polly/Timeout/AsyncTimeoutSyntax.cs +++ b/src/Polly/Timeout/AsyncTimeoutSyntax.cs @@ -39,7 +39,7 @@ public static AsyncTimeoutPolicy TimeoutAsync(int seconds, TimeoutStrategy timeo /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. /// seconds;Value must be greater than zero. - /// onTimeoutAsync + /// Thrown when is . public static AsyncTimeoutPolicy TimeoutAsync(int seconds, Func onTimeoutAsync) { @@ -58,7 +58,7 @@ public static AsyncTimeoutPolicy TimeoutAsync(int seconds, FuncThe Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. /// seconds;Value must be greater than zero. - /// onTimeoutAsync + /// Thrown when is . public static AsyncTimeoutPolicy TimeoutAsync(int seconds, Func onTimeoutAsync) { if (seconds <= 0) @@ -109,7 +109,7 @@ public static AsyncTimeoutPolicy TimeoutAsync(int seconds, TimeoutStrategy timeo /// /// The timeout. /// The policy instance. - /// timeout;Value must be a positive TimeSpan (or Timeout.InfiniteTimeSpan to indicate no timeout) + /// timeout;Value must be a positive TimeSpan (or Timeout.InfiniteTimeSpan to indicate no timeout). public static AsyncTimeoutPolicy TimeoutAsync(TimeSpan timeout) { TimeoutValidator.ValidateTimeSpanTimeout(timeout); @@ -124,7 +124,7 @@ public static AsyncTimeoutPolicy TimeoutAsync(TimeSpan timeout) /// The timeout. /// The timeout strategy. /// The policy instance. - /// timeout;Value must be a positive TimeSpan (or Timeout.InfiniteTimeSpan to indicate no timeout) + /// timeout;Value must be a positive TimeSpan (or Timeout.InfiniteTimeSpan to indicate no timeout). public static AsyncTimeoutPolicy TimeoutAsync(TimeSpan timeout, TimeoutStrategy timeoutStrategy) { TimeoutValidator.ValidateTimeSpanTimeout(timeout); @@ -140,8 +140,8 @@ public static AsyncTimeoutPolicy TimeoutAsync(TimeSpan timeout, TimeoutStrategy /// An action to call on timeout, passing the execution context, the timeout applied, and a capturing the abandoned, timed-out action. /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. - /// timeout;Value must be a positive TimeSpan (or Timeout.InfiniteTimeSpan to indicate no timeout) - /// onTimeoutAsync + /// timeout;Value must be a positive TimeSpan (or Timeout.InfiniteTimeSpan to indicate no timeout). + /// Thrown when is . public static AsyncTimeoutPolicy TimeoutAsync(TimeSpan timeout, Func onTimeoutAsync) { TimeoutValidator.ValidateTimeSpanTimeout(timeout); @@ -157,7 +157,7 @@ public static AsyncTimeoutPolicy TimeoutAsync(TimeSpan timeout, FuncThe Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. /// timeout;Value must be greater than zero. - /// onTimeoutAsync + /// Thrown when is . public static AsyncTimeoutPolicy TimeoutAsync(TimeSpan timeout, Func onTimeoutAsync) { TimeoutValidator.ValidateTimeSpanTimeout(timeout); @@ -173,8 +173,8 @@ public static AsyncTimeoutPolicy TimeoutAsync(TimeSpan timeout, FuncAn action to call on timeout, passing the execution context, the timeout applied, and a capturing the abandoned, timed-out action. /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. - /// timeout;Value must be a positive TimeSpan (or Timeout.InfiniteTimeSpan to indicate no timeout) - /// onTimeoutAsync + /// timeout;Value must be a positive TimeSpan (or Timeout.InfiniteTimeSpan to indicate no timeout). + /// Thrown when is . public static AsyncTimeoutPolicy TimeoutAsync(TimeSpan timeout, TimeoutStrategy timeoutStrategy, Func onTimeoutAsync) { TimeoutValidator.ValidateTimeSpanTimeout(timeout); @@ -191,7 +191,7 @@ public static AsyncTimeoutPolicy TimeoutAsync(TimeSpan timeout, TimeoutStrategy /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. /// timeout;Value must be greater than zero. - /// onTimeoutAsync + /// Thrown when is . public static AsyncTimeoutPolicy TimeoutAsync(TimeSpan timeout, TimeoutStrategy timeoutStrategy, Func onTimeoutAsync) { TimeoutValidator.ValidateTimeSpanTimeout(timeout); @@ -203,7 +203,7 @@ public static AsyncTimeoutPolicy TimeoutAsync(TimeSpan timeout, TimeoutStrategy /// Builds an that will wait asynchronously for a delegate to complete for a specified period of time. A will be thrown if the delegate does not complete within the configured timeout. /// /// A function to provide the timeout for this execution. - /// timeoutProvider + /// Thrown when is . /// The policy instance. public static AsyncTimeoutPolicy TimeoutAsync(Func timeoutProvider) { @@ -220,7 +220,7 @@ public static AsyncTimeoutPolicy TimeoutAsync(Func timeoutProvider) /// A function to provide the timeout for this execution. /// The timeout strategy. /// The policy instance. - /// timeoutProvider + /// Thrown when is . public static AsyncTimeoutPolicy TimeoutAsync(Func timeoutProvider, TimeoutStrategy timeoutStrategy) { if (timeoutProvider == null) @@ -237,8 +237,8 @@ public static AsyncTimeoutPolicy TimeoutAsync(Func timeoutProvider, Ti /// An action to call on timeout, passing the execution context, the timeout applied, and a capturing the abandoned, timed-out action. /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. - /// timeoutProvider - /// onTimeoutAsync + /// Thrown when is . + /// Thrown when is . public static AsyncTimeoutPolicy TimeoutAsync(Func timeoutProvider, Func onTimeoutAsync) { if (timeoutProvider == null) @@ -254,8 +254,8 @@ public static AsyncTimeoutPolicy TimeoutAsync(Func timeoutProvider, Fu /// An action to call on timeout, passing the execution context, the timeout applied, the capturing the abandoned, timed-out action, and the captured . /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. - /// timeoutProvider - /// onTimeoutAsync + /// Thrown when is . + /// Thrown when is . public static AsyncTimeoutPolicy TimeoutAsync(Func timeoutProvider, Func onTimeoutAsync) { if (timeoutProvider == null) @@ -272,8 +272,8 @@ public static AsyncTimeoutPolicy TimeoutAsync(Func timeoutProvider, Fu /// An action to call on timeout, passing the execution context, the timeout applied, and a capturing the abandoned, timed-out action. /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. - /// timeoutProvider - /// onTimeoutAsync + /// Thrown when is . + /// Thrown when is . public static AsyncTimeoutPolicy TimeoutAsync(Func timeoutProvider, TimeoutStrategy timeoutStrategy, Func onTimeoutAsync) { if (timeoutProvider == null) @@ -290,8 +290,8 @@ public static AsyncTimeoutPolicy TimeoutAsync(Func timeoutProvider, Ti /// An action to call on timeout, passing the execution context, the timeout applied, the capturing the abandoned, timed-out action, and the captured . /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. - /// timeoutProvider - /// onTimeoutAsync + /// Thrown when is . + /// Thrown when is . public static AsyncTimeoutPolicy TimeoutAsync(Func timeoutProvider, TimeoutStrategy timeoutStrategy, Func onTimeoutAsync) { if (timeoutProvider == null) @@ -304,7 +304,7 @@ public static AsyncTimeoutPolicy TimeoutAsync(Func timeoutProvider, Ti /// Builds an that will wait asynchronously for a delegate to complete for a specified period of time. A will be thrown if the delegate does not complete within the configured timeout. /// /// A function to provide the timeout for this execution. - /// timeoutProvider + /// Thrown when is . /// The policy instance. public static AsyncTimeoutPolicy TimeoutAsync(Func timeoutProvider) { @@ -319,7 +319,7 @@ public static AsyncTimeoutPolicy TimeoutAsync(Func timeoutPro /// A function to provide the timeout for this execution. /// The timeout strategy. /// The policy instance. - /// timeoutProvider + /// Thrown when is . public static AsyncTimeoutPolicy TimeoutAsync(Func timeoutProvider, TimeoutStrategy timeoutStrategy) { Func doNothingAsync = (_, _, _, _) => TaskHelper.EmptyTask; @@ -334,8 +334,8 @@ public static AsyncTimeoutPolicy TimeoutAsync(Func timeoutPro /// An action to call on timeout, passing the execution context, the timeout applied, and a capturing the abandoned, timed-out action. /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. - /// timeoutProvider - /// onTimeoutAsync + /// Thrown when is . + /// Thrown when is . public static AsyncTimeoutPolicy TimeoutAsync(Func timeoutProvider, Func onTimeoutAsync) => TimeoutAsync(timeoutProvider, TimeoutStrategy.Optimistic, onTimeoutAsync); @@ -346,8 +346,8 @@ public static AsyncTimeoutPolicy TimeoutAsync(Func timeoutPro /// An action to call on timeout, passing the execution context, the timeout applied, the capturing the abandoned, timed-out action, and the captured . /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. - /// timeoutProvider - /// onTimeoutAsync + /// Thrown when is . + /// Thrown when is . public static AsyncTimeoutPolicy TimeoutAsync(Func timeoutProvider, Func onTimeoutAsync) => TimeoutAsync(timeoutProvider, TimeoutStrategy.Optimistic, onTimeoutAsync); @@ -359,8 +359,8 @@ public static AsyncTimeoutPolicy TimeoutAsync(Func timeoutPro /// An action to call on timeout, passing the execution context, the timeout applied, and a capturing the abandoned, timed-out action. /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. - /// timeoutProvider - /// onTimeoutAsync + /// Thrown when is . + /// Thrown when is . public static AsyncTimeoutPolicy TimeoutAsync(Func timeoutProvider, TimeoutStrategy timeoutStrategy, Func onTimeoutAsync) { if (onTimeoutAsync == null) @@ -377,8 +377,8 @@ public static AsyncTimeoutPolicy TimeoutAsync(Func timeoutPro /// An action to call on timeout, passing the execution context, the timeout applied, the capturing the abandoned, timed-out action, and the captured . /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. - /// timeoutProvider - /// onTimeoutAsync + /// Thrown when is . + /// Thrown when is . public static AsyncTimeoutPolicy TimeoutAsync( Func timeoutProvider, TimeoutStrategy timeoutStrategy, diff --git a/src/Polly/Timeout/AsyncTimeoutTResultSyntax.cs b/src/Polly/Timeout/AsyncTimeoutTResultSyntax.cs index a4a911b0771..461dfce33f0 100644 --- a/src/Polly/Timeout/AsyncTimeoutTResultSyntax.cs +++ b/src/Polly/Timeout/AsyncTimeoutTResultSyntax.cs @@ -39,7 +39,7 @@ public static AsyncTimeoutPolicy TimeoutAsync(int seconds, Tim /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. /// seconds;Value must be greater than zero. - /// onTimeoutAsync + /// Thrown when is . public static AsyncTimeoutPolicy TimeoutAsync(int seconds, Func onTimeoutAsync) { TimeoutValidator.ValidateSecondsTimeout(seconds); @@ -55,7 +55,7 @@ public static AsyncTimeoutPolicy TimeoutAsync(int seconds, Fun /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. /// seconds;Value must be greater than zero. - /// onTimeoutAsync + /// Thrown when is . public static AsyncTimeoutPolicy TimeoutAsync(int seconds, Func onTimeoutAsync) { if (seconds <= 0) @@ -73,7 +73,7 @@ public static AsyncTimeoutPolicy TimeoutAsync(int seconds, Fun /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. /// seconds;Value must be greater than zero. - /// onTimeoutAsync + /// Thrown when is . public static AsyncTimeoutPolicy TimeoutAsync(int seconds, TimeoutStrategy timeoutStrategy, Func onTimeoutAsync) { TimeoutValidator.ValidateSecondsTimeout(seconds); @@ -90,7 +90,7 @@ public static AsyncTimeoutPolicy TimeoutAsync(int seconds, Tim /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. /// seconds;Value must be greater than zero. - /// onTimeoutAsync + /// Thrown when is . public static AsyncTimeoutPolicy TimeoutAsync(int seconds, TimeoutStrategy timeoutStrategy, Func onTimeoutAsync) { if (seconds <= 0) @@ -104,7 +104,7 @@ public static AsyncTimeoutPolicy TimeoutAsync(int seconds, Tim /// /// The timeout. /// The policy instance. - /// timeout;Value must be a positive TimeSpan (or Timeout.InfiniteTimeSpan to indicate no timeout) + /// timeout;Value must be a positive TimeSpan (or Timeout.InfiniteTimeSpan to indicate no timeout). public static AsyncTimeoutPolicy TimeoutAsync(TimeSpan timeout) { TimeoutValidator.ValidateTimeSpanTimeout(timeout); @@ -119,7 +119,7 @@ public static AsyncTimeoutPolicy TimeoutAsync(TimeSpan timeout /// The timeout. /// The timeout strategy. /// The policy instance. - /// timeout;Value must be a positive TimeSpan (or Timeout.InfiniteTimeSpan to indicate no timeout) + /// timeout;Value must be a positive TimeSpan (or Timeout.InfiniteTimeSpan to indicate no timeout). public static AsyncTimeoutPolicy TimeoutAsync(TimeSpan timeout, TimeoutStrategy timeoutStrategy) { TimeoutValidator.ValidateTimeSpanTimeout(timeout); @@ -135,8 +135,8 @@ public static AsyncTimeoutPolicy TimeoutAsync(TimeSpan timeout /// An action to call on timeout, passing the execution context, the timeout applied, and a capturing the abandoned, timed-out action. /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. - /// timeout;Value must be a positive TimeSpan (or Timeout.InfiniteTimeSpan to indicate no timeout) - /// onTimeoutAsync + /// timeout;Value must be a positive TimeSpan (or Timeout.InfiniteTimeSpan to indicate no timeout). + /// Thrown when is . public static AsyncTimeoutPolicy TimeoutAsync(TimeSpan timeout, Func onTimeoutAsync) { TimeoutValidator.ValidateTimeSpanTimeout(timeout); @@ -154,7 +154,7 @@ public static AsyncTimeoutPolicy TimeoutAsync(TimeSpan timeout /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. /// timeout;Value must be greater than zero. - /// onTimeoutAsync + /// Thrown when is . public static AsyncTimeoutPolicy TimeoutAsync(TimeSpan timeout, Func onTimeoutAsync) { if (timeout <= TimeSpan.Zero) @@ -173,8 +173,8 @@ public static AsyncTimeoutPolicy TimeoutAsync(TimeSpan timeout /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The timeout strategy. /// The policy instance. - /// timeout;Value must be a positive TimeSpan (or Timeout.InfiniteTimeSpan to indicate no timeout) - /// onTimeoutAsync + /// timeout;Value must be a positive TimeSpan (or Timeout.InfiniteTimeSpan to indicate no timeout). + /// Thrown when is . public static AsyncTimeoutPolicy TimeoutAsync(TimeSpan timeout, TimeoutStrategy timeoutStrategy, Func onTimeoutAsync) { TimeoutValidator.ValidateTimeSpanTimeout(timeout); @@ -191,7 +191,7 @@ public static AsyncTimeoutPolicy TimeoutAsync(TimeSpan timeout /// The timeout strategy. /// The policy instance. /// timeout;Value must be greater than zero. - /// onTimeoutAsync + /// Thrown when is . public static AsyncTimeoutPolicy TimeoutAsync(TimeSpan timeout, TimeoutStrategy timeoutStrategy, Func onTimeoutAsync) { if (timeout <= TimeSpan.Zero) @@ -204,7 +204,7 @@ public static AsyncTimeoutPolicy TimeoutAsync(TimeSpan timeout /// Builds an that will wait asynchronously for a delegate to complete for a specified period of time. A will be thrown if the delegate does not complete within the configured timeout. /// /// A function to provide the timeout for this execution. - /// timeoutProvider + /// Thrown when is . /// The policy instance. public static AsyncTimeoutPolicy TimeoutAsync(Func timeoutProvider) { @@ -220,7 +220,7 @@ public static AsyncTimeoutPolicy TimeoutAsync(Func t /// /// A function to provide the timeout for this execution. /// The timeout strategy. - /// timeoutProvider + /// Thrown when is . /// The policy instance. public static AsyncTimeoutPolicy TimeoutAsync(Func timeoutProvider, TimeoutStrategy timeoutStrategy) { @@ -238,8 +238,8 @@ public static AsyncTimeoutPolicy TimeoutAsync(Func t /// An action to call on timeout, passing the execution context, the timeout applied, and a capturing the abandoned, timed-out action. /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. - /// timeoutProvider - /// onTimeoutAsync + /// Thrown when is . + /// Thrown when is . public static AsyncTimeoutPolicy TimeoutAsync(Func timeoutProvider, Func onTimeoutAsync) { if (timeoutProvider == null) @@ -255,8 +255,8 @@ public static AsyncTimeoutPolicy TimeoutAsync(Func t /// An action to call on timeout, passing the execution context, the timeout applied, the capturing the abandoned, timed-out action, and the captured . /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. - /// timeoutProvider - /// onTimeoutAsync + /// Thrown when is . + /// Thrown when is . public static AsyncTimeoutPolicy TimeoutAsync(Func timeoutProvider, Func onTimeoutAsync) { if (timeoutProvider == null) @@ -273,8 +273,8 @@ public static AsyncTimeoutPolicy TimeoutAsync(Func t /// An action to call on timeout, passing the execution context, the timeout applied, and a capturing the abandoned, timed-out action. /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. - /// timeoutProvider - /// onTimeoutAsync + /// Thrown when is . + /// Thrown when is . public static AsyncTimeoutPolicy TimeoutAsync(Func timeoutProvider, TimeoutStrategy timeoutStrategy, Func onTimeoutAsync) { if (timeoutProvider == null) @@ -291,8 +291,8 @@ public static AsyncTimeoutPolicy TimeoutAsync(Func t /// An action to call on timeout, passing the execution context, the timeout applied, the capturing the abandoned, timed-out action, and the captured . /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. - /// timeoutProvider - /// onTimeoutAsync + /// Thrown when is . + /// Thrown when is . public static AsyncTimeoutPolicy TimeoutAsync(Func timeoutProvider, TimeoutStrategy timeoutStrategy, Func onTimeoutAsync) { if (timeoutProvider == null) @@ -305,7 +305,7 @@ public static AsyncTimeoutPolicy TimeoutAsync(Func t /// Builds an that will wait asynchronously for a delegate to complete for a specified period of time. A will be thrown if the delegate does not complete within the configured timeout. /// /// A function to provide the timeout for this execution. - /// timeoutProvider + /// Thrown when is . /// The policy instance. public static AsyncTimeoutPolicy TimeoutAsync(Func timeoutProvider) { @@ -318,7 +318,7 @@ public static AsyncTimeoutPolicy TimeoutAsync(Func /// A function to provide the timeout for this execution. /// The timeout strategy. - /// timeoutProvider + /// Thrown when is . /// The policy instance. public static AsyncTimeoutPolicy TimeoutAsync(Func timeoutProvider, TimeoutStrategy timeoutStrategy) { @@ -333,8 +333,8 @@ public static AsyncTimeoutPolicy TimeoutAsync(FuncAn action to call on timeout, passing the execution context, the timeout applied, and a capturing the abandoned, timed-out action. /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. - /// timeoutProvider - /// onTimeoutAsync + /// Thrown when is . + /// Thrown when is . public static AsyncTimeoutPolicy TimeoutAsync(Func timeoutProvider, Func onTimeoutAsync) => TimeoutAsync(timeoutProvider, TimeoutStrategy.Optimistic, onTimeoutAsync); @@ -345,8 +345,8 @@ public static AsyncTimeoutPolicy TimeoutAsync(FuncAn action to call on timeout, passing the execution context, the timeout applied, the capturing the abandoned, timed-out action, and the captured . /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. - /// timeoutProvider - /// onTimeoutAsync + /// Thrown when is . + /// Thrown when is . public static AsyncTimeoutPolicy TimeoutAsync(Func timeoutProvider, Func onTimeoutAsync) => TimeoutAsync(timeoutProvider, TimeoutStrategy.Optimistic, onTimeoutAsync); @@ -358,8 +358,8 @@ public static AsyncTimeoutPolicy TimeoutAsync(FuncAn action to call on timeout, passing the execution context, the timeout applied, and a capturing the abandoned, timed-out action. /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. - /// timeoutProvider - /// onTimeoutAsync + /// Thrown when is . + /// Thrown when is . public static AsyncTimeoutPolicy TimeoutAsync(Func timeoutProvider, TimeoutStrategy timeoutStrategy, Func onTimeoutAsync) { if (onTimeoutAsync == null) @@ -376,8 +376,8 @@ public static AsyncTimeoutPolicy TimeoutAsync(FuncAn action to call on timeout, passing the execution context, the timeout applied, the capturing the abandoned, timed-out action, and the captured . /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. - /// timeoutProvider - /// onTimeoutAsync + /// Thrown when is . + /// Thrown when is . public static AsyncTimeoutPolicy TimeoutAsync(Func timeoutProvider, TimeoutStrategy timeoutStrategy, Func onTimeoutAsync) { if (timeoutProvider == null) diff --git a/src/Polly/Timeout/TimeoutSyntax.cs b/src/Polly/Timeout/TimeoutSyntax.cs index 2db2fd33588..e5e84ad9033 100644 --- a/src/Polly/Timeout/TimeoutSyntax.cs +++ b/src/Polly/Timeout/TimeoutSyntax.cs @@ -39,7 +39,7 @@ public static TimeoutPolicy Timeout(int seconds, TimeoutStrategy timeoutStrategy /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. /// seconds;Value must be greater than zero. - /// onTimeout + /// Thrown when is . public static TimeoutPolicy Timeout(int seconds, Action onTimeout) { TimeoutValidator.ValidateSecondsTimeout(seconds); @@ -55,7 +55,7 @@ public static TimeoutPolicy Timeout(int seconds, Action /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. /// seconds;Value must be greater than zero. - /// onTimeout + /// Thrown when is . public static TimeoutPolicy Timeout(int seconds, Action onTimeout) { if (seconds <= 0) @@ -73,7 +73,7 @@ public static TimeoutPolicy Timeout(int seconds, ActionThe Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. /// seconds;Value must be greater than zero. - /// onTimeout + /// Thrown when is . public static TimeoutPolicy Timeout(int seconds, TimeoutStrategy timeoutStrategy, Action onTimeout) { TimeoutValidator.ValidateSecondsTimeout(seconds); @@ -90,7 +90,7 @@ public static TimeoutPolicy Timeout(int seconds, TimeoutStrategy timeoutStrategy /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. /// seconds;Value must be greater than zero. - /// onTimeout + /// Thrown when is . public static TimeoutPolicy Timeout(int seconds, TimeoutStrategy timeoutStrategy, Action onTimeout) { if (seconds <= 0) @@ -104,7 +104,7 @@ public static TimeoutPolicy Timeout(int seconds, TimeoutStrategy timeoutStrategy /// /// The timeout. /// The policy instance. - /// timeout;Value must be a positive TimeSpan (or Timeout.InfiniteTimeSpan to indicate no timeout) + /// timeout;Value must be a positive TimeSpan (or Timeout.InfiniteTimeSpan to indicate no timeout). public static TimeoutPolicy Timeout(TimeSpan timeout) { TimeoutValidator.ValidateTimeSpanTimeout(timeout); @@ -119,7 +119,7 @@ public static TimeoutPolicy Timeout(TimeSpan timeout) /// The timeout. /// The timeout strategy. /// The policy instance. - /// timeout;Value must be a positive TimeSpan (or Timeout.InfiniteTimeSpan to indicate no timeout) + /// timeout;Value must be a positive TimeSpan (or Timeout.InfiniteTimeSpan to indicate no timeout). public static TimeoutPolicy Timeout(TimeSpan timeout, TimeoutStrategy timeoutStrategy) { TimeoutValidator.ValidateTimeSpanTimeout(timeout); @@ -135,8 +135,8 @@ public static TimeoutPolicy Timeout(TimeSpan timeout, TimeoutStrategy timeoutStr /// An action to call on timeout, passing the execution context, the timeout applied, and a capturing the abandoned, timed-out action. /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. - /// timeout;Value must be a positive TimeSpan (or Timeout.InfiniteTimeSpan to indicate no timeout) - /// onTimeout + /// timeout;Value must be a positive TimeSpan (or Timeout.InfiniteTimeSpan to indicate no timeout). + /// Thrown when is . public static TimeoutPolicy Timeout(TimeSpan timeout, Action onTimeout) { TimeoutValidator.ValidateTimeSpanTimeout(timeout); @@ -152,7 +152,7 @@ public static TimeoutPolicy Timeout(TimeSpan timeout, ActionThe Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. /// timeout;Value must be greater than zero. - /// onTimeout + /// Thrown when is . public static TimeoutPolicy Timeout(TimeSpan timeout, Action onTimeout) { TimeoutValidator.ValidateTimeSpanTimeout(timeout); @@ -168,8 +168,8 @@ public static TimeoutPolicy Timeout(TimeSpan timeout, ActionAn action to call on timeout, passing the execution context, the timeout applied, and a capturing the abandoned, timed-out action. /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. - /// timeout;Value must be a positive TimeSpan (or Timeout.InfiniteTimeSpan to indicate no timeout) - /// onTimeout + /// timeout;Value must be a positive TimeSpan (or Timeout.InfiniteTimeSpan to indicate no timeout). + /// Thrown when is . public static TimeoutPolicy Timeout(TimeSpan timeout, TimeoutStrategy timeoutStrategy, Action onTimeout) { TimeoutValidator.ValidateTimeSpanTimeout(timeout); @@ -186,7 +186,7 @@ public static TimeoutPolicy Timeout(TimeSpan timeout, TimeoutStrategy timeoutStr /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. /// timeout;Value must be greater than zero. - /// onTimeout + /// Thrown when is . public static TimeoutPolicy Timeout(TimeSpan timeout, TimeoutStrategy timeoutStrategy, Action onTimeout) { TimeoutValidator.ValidateTimeSpanTimeout(timeout); @@ -198,7 +198,7 @@ public static TimeoutPolicy Timeout(TimeSpan timeout, TimeoutStrategy timeoutStr /// Builds a that will wait for a delegate to complete for a specified period of time. A will be thrown if the delegate does not complete within the configured timeout. /// /// A function to provide the timeout for this execution. - /// timeoutProvider + /// Thrown when is . /// The policy instance. public static TimeoutPolicy Timeout(Func timeoutProvider) { @@ -215,7 +215,7 @@ public static TimeoutPolicy Timeout(Func timeoutProvider) /// A function to provide the timeout for this execution. /// The timeout strategy. /// The policy instance. - /// timeoutProvider + /// Thrown when is . public static TimeoutPolicy Timeout(Func timeoutProvider, TimeoutStrategy timeoutStrategy) { if (timeoutProvider == null) @@ -232,8 +232,8 @@ public static TimeoutPolicy Timeout(Func timeoutProvider, TimeoutStrat /// An action to call on timeout, passing the execution context, the timeout applied, and a capturing the abandoned, timed-out action. /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. - /// timeoutProvider - /// onTimeout + /// Thrown when is . + /// Thrown when is . public static TimeoutPolicy Timeout(Func timeoutProvider, Action onTimeout) { if (timeoutProvider == null) @@ -249,8 +249,8 @@ public static TimeoutPolicy Timeout(Func timeoutProvider, ActionAn action to call on timeout, passing the execution context, the timeout applied, the capturing the abandoned, timed-out action, and the captured . /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. - /// timeoutProvider - /// onTimeout + /// Thrown when is . + /// Thrown when is . public static TimeoutPolicy Timeout(Func timeoutProvider, Action onTimeout) { if (timeoutProvider == null) @@ -267,8 +267,8 @@ public static TimeoutPolicy Timeout(Func timeoutProvider, ActionAn action to call on timeout, passing the execution context, the timeout applied, and a capturing the abandoned, timed-out action. /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. - /// timeoutProvider - /// onTimeout + /// Thrown when is . + /// Thrown when is . public static TimeoutPolicy Timeout(Func timeoutProvider, TimeoutStrategy timeoutStrategy, Action onTimeout) { if (timeoutProvider == null) @@ -285,8 +285,8 @@ public static TimeoutPolicy Timeout(Func timeoutProvider, TimeoutStrat /// An action to call on timeout, passing the execution context, the timeout applied, the capturing the abandoned, timed-out action, and the captured . /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. - /// timeoutProvider - /// onTimeout + /// Thrown when is . + /// Thrown when is . public static TimeoutPolicy Timeout(Func timeoutProvider, TimeoutStrategy timeoutStrategy, Action onTimeout) { if (timeoutProvider == null) @@ -299,7 +299,7 @@ public static TimeoutPolicy Timeout(Func timeoutProvider, TimeoutStrat /// Builds a that will wait for a delegate to complete for a specified period of time. A will be thrown if the delegate does not complete within the configured timeout. /// /// A function to provide the timeout for this execution. - /// timeoutProvider + /// Thrown when is . /// The policy instance. public static TimeoutPolicy Timeout(Func timeoutProvider) { @@ -313,7 +313,7 @@ public static TimeoutPolicy Timeout(Func timeoutProvider) /// A function to provide the timeout for this execution. /// The timeout strategy. /// The policy instance. - /// timeoutProvider + /// Thrown when is . public static TimeoutPolicy Timeout(Func timeoutProvider, TimeoutStrategy timeoutStrategy) { Action doNothing = (_, _, _, _) => { }; @@ -327,8 +327,8 @@ public static TimeoutPolicy Timeout(Func timeoutProvider, Tim /// An action to call on timeout, passing the execution context, the timeout applied, and a capturing the abandoned, timed-out action. /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. - /// timeoutProvider - /// onTimeout + /// Thrown when is . + /// Thrown when is . public static TimeoutPolicy Timeout(Func timeoutProvider, Action onTimeout) => Timeout(timeoutProvider, TimeoutStrategy.Optimistic, onTimeout); @@ -339,8 +339,8 @@ public static TimeoutPolicy Timeout(Func timeoutProvider, Act /// An action to call on timeout, passing the execution context, the timeout applied, the capturing the abandoned, timed-out action, and the captured . /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. - /// timeoutProvider - /// onTimeout + /// Thrown when is . + /// Thrown when is . public static TimeoutPolicy Timeout(Func timeoutProvider, Action onTimeout) => Timeout(timeoutProvider, TimeoutStrategy.Optimistic, onTimeout); @@ -352,8 +352,8 @@ public static TimeoutPolicy Timeout(Func timeoutProvider, Act /// An action to call on timeout, passing the execution context, the timeout applied, and a capturing the abandoned, timed-out action. /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. - /// timeoutProvider - /// onTimeout + /// Thrown when is . + /// Thrown when is . public static TimeoutPolicy Timeout(Func timeoutProvider, TimeoutStrategy timeoutStrategy, Action onTimeout) { if (onTimeout == null) @@ -370,8 +370,8 @@ public static TimeoutPolicy Timeout(Func timeoutProvider, Tim /// An action to call on timeout, passing the execution context, the timeout applied, the capturing the abandoned, timed-out action, and the captured . /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. - /// timeoutProvider - /// onTimeout + /// Thrown when is . + /// Thrown when is . public static TimeoutPolicy Timeout( Func timeoutProvider, TimeoutStrategy timeoutStrategy, diff --git a/src/Polly/Timeout/TimeoutTResultSyntax.cs b/src/Polly/Timeout/TimeoutTResultSyntax.cs index 1fbdcab8d48..3ab38addce5 100644 --- a/src/Polly/Timeout/TimeoutTResultSyntax.cs +++ b/src/Polly/Timeout/TimeoutTResultSyntax.cs @@ -41,7 +41,7 @@ public static TimeoutPolicy Timeout(int seconds, TimeoutStrate /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. /// seconds;Value must be greater than zero. - /// onTimeout + /// Thrown when is . public static TimeoutPolicy Timeout(int seconds, Action onTimeout) { TimeoutValidator.ValidateSecondsTimeout(seconds); @@ -56,7 +56,7 @@ public static TimeoutPolicy Timeout(int seconds, ActionThe Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. /// seconds;Value must be greater than zero. - /// onTimeout + /// Thrown when is . public static TimeoutPolicy Timeout(int seconds, Action onTimeout) { if (seconds <= 0) @@ -75,7 +75,7 @@ public static TimeoutPolicy Timeout(int seconds, ActionThe Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. /// seconds;Value must be greater than zero. - /// onTimeout + /// Thrown when is . public static TimeoutPolicy Timeout(int seconds, TimeoutStrategy timeoutStrategy, Action onTimeout) { TimeoutValidator.ValidateSecondsTimeout(seconds); @@ -93,7 +93,7 @@ public static TimeoutPolicy Timeout(int seconds, TimeoutStrate /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. /// seconds;Value must be greater than zero. - /// onTimeout + /// Thrown when is . public static TimeoutPolicy Timeout(int seconds, TimeoutStrategy timeoutStrategy, Action onTimeout) { if (seconds <= 0) @@ -107,7 +107,7 @@ public static TimeoutPolicy Timeout(int seconds, TimeoutStrate /// /// The timeout. /// The policy instance. - /// timeout;Value must be a positive TimeSpan (or Timeout.InfiniteTimeSpan to indicate no timeout) + /// timeout;Value must be a positive TimeSpan (or Timeout.InfiniteTimeSpan to indicate no timeout). public static TimeoutPolicy Timeout(TimeSpan timeout) { TimeoutValidator.ValidateTimeSpanTimeout(timeout); @@ -123,7 +123,7 @@ public static TimeoutPolicy Timeout(TimeSpan timeout) /// The timeout. /// The timeout strategy. /// The policy instance. - /// timeout;Value must be a positive TimeSpan (or Timeout.InfiniteTimeSpan to indicate no timeout) + /// timeout;Value must be a positive TimeSpan (or Timeout.InfiniteTimeSpan to indicate no timeout). public static TimeoutPolicy Timeout(TimeSpan timeout, TimeoutStrategy timeoutStrategy) { TimeoutValidator.ValidateTimeSpanTimeout(timeout); @@ -139,8 +139,8 @@ public static TimeoutPolicy Timeout(TimeSpan timeout, TimeoutS /// An action to call on timeout, passing the execution context, the timeout applied, and a capturing the abandoned, timed-out action. /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. - /// timeout;Value must be a positive TimeSpan (or Timeout.InfiniteTimeSpan to indicate no timeout) - /// onTimeout + /// timeout;Value must be a positive TimeSpan (or Timeout.InfiniteTimeSpan to indicate no timeout). + /// Thrown when is . public static TimeoutPolicy Timeout(TimeSpan timeout, Action onTimeout) { TimeoutValidator.ValidateTimeSpanTimeout(timeout); @@ -155,7 +155,7 @@ public static TimeoutPolicy Timeout(TimeSpan timeout, ActionThe Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. /// timeout;Value must be greater than zero. - /// onTimeout + /// Thrown when is . public static TimeoutPolicy Timeout(TimeSpan timeout, Action onTimeout) { TimeoutValidator.ValidateTimeSpanTimeout(timeout); @@ -171,8 +171,8 @@ public static TimeoutPolicy Timeout(TimeSpan timeout, ActionAn action to call on timeout, passing the execution context, the timeout applied, and a capturing the abandoned, timed-out action. /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. - /// timeout;Value must be a positive TimeSpan (or Timeout.InfiniteTimeSpan to indicate no timeout) - /// onTimeout + /// timeout;Value must be a positive TimeSpan (or Timeout.InfiniteTimeSpan to indicate no timeout). + /// Thrown when is . public static TimeoutPolicy Timeout(TimeSpan timeout, TimeoutStrategy timeoutStrategy, Action onTimeout) { TimeoutValidator.ValidateTimeSpanTimeout(timeout); @@ -189,7 +189,7 @@ public static TimeoutPolicy Timeout(TimeSpan timeout, TimeoutS /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. /// timeout;Value must be greater than zero. - /// onTimeout + /// Thrown when is . public static TimeoutPolicy Timeout(TimeSpan timeout, TimeoutStrategy timeoutStrategy, Action onTimeout) { TimeoutValidator.ValidateTimeSpanTimeout(timeout); @@ -200,7 +200,7 @@ public static TimeoutPolicy Timeout(TimeSpan timeout, TimeoutS /// Builds a that will wait for a delegate to complete for a specified period of time. A will be thrown if the delegate does not complete within the configured timeout. /// /// A function to provide the timeout for this execution. - /// timeoutProvider + /// Thrown when is . /// The policy instance. public static TimeoutPolicy Timeout(Func timeoutProvider) { @@ -218,7 +218,7 @@ public static TimeoutPolicy Timeout(Func timeoutProv /// A function to provide the timeout for this execution. /// The timeout strategy. /// The policy instance. - /// timeoutProvider + /// Thrown when is . public static TimeoutPolicy Timeout(Func timeoutProvider, TimeoutStrategy timeoutStrategy) { if (timeoutProvider == null) @@ -235,8 +235,8 @@ public static TimeoutPolicy Timeout(Func timeoutProv /// An action to call on timeout, passing the execution context, the timeout applied, and a capturing the abandoned, timed-out action. /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. - /// timeoutProvider - /// onTimeout + /// Thrown when is . + /// Thrown when is . public static TimeoutPolicy Timeout(Func timeoutProvider, Action onTimeout) { if (timeoutProvider == null) @@ -252,8 +252,8 @@ public static TimeoutPolicy Timeout(Func timeoutProv /// An action to call on timeout, passing the execution context, the timeout applied, the capturing the abandoned, timed-out action, and the captured . /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. - /// timeoutProvider - /// onTimeout + /// Thrown when is . + /// Thrown when is . public static TimeoutPolicy Timeout(Func timeoutProvider, Action onTimeout) { if (timeoutProvider == null) @@ -271,8 +271,8 @@ public static TimeoutPolicy Timeout(Func timeoutProv /// An action to call on timeout, passing the execution context, the timeout applied, and a capturing the abandoned, timed-out action. /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. - /// timeoutProvider - /// onTimeout + /// Thrown when is . + /// Thrown when is . public static TimeoutPolicy Timeout(Func timeoutProvider, TimeoutStrategy timeoutStrategy, Action onTimeout) { if (timeoutProvider == null) @@ -290,8 +290,8 @@ public static TimeoutPolicy Timeout(Func timeoutProv /// An action to call on timeout, passing the execution context, the timeout applied, the capturing the abandoned, timed-out action, and the captured . /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. - /// timeoutProvider - /// onTimeout + /// Thrown when is . + /// Thrown when is . public static TimeoutPolicy Timeout(Func timeoutProvider, TimeoutStrategy timeoutStrategy, Action onTimeout) { if (timeoutProvider == null) @@ -304,7 +304,7 @@ public static TimeoutPolicy Timeout(Func timeoutProv /// Builds a that will wait for a delegate to complete for a specified period of time. A will be thrown if the delegate does not complete within the configured timeout. /// /// A function to provide the timeout for this execution. - /// timeoutProvider + /// Thrown when is . /// The policy instance. public static TimeoutPolicy Timeout(Func timeoutProvider) { @@ -319,7 +319,7 @@ public static TimeoutPolicy Timeout(Func ti /// A function to provide the timeout for this execution. /// The timeout strategy. /// The policy instance. - /// timeoutProvider + /// Thrown when is . public static TimeoutPolicy Timeout(Func timeoutProvider, TimeoutStrategy timeoutStrategy) { Action doNothing = (_, _, _, _) => { }; @@ -333,8 +333,8 @@ public static TimeoutPolicy Timeout(Func ti /// An action to call on timeout, passing the execution context, the timeout applied, and a capturing the abandoned, timed-out action. /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. - /// timeoutProvider - /// onTimeout + /// Thrown when is . + /// Thrown when is . public static TimeoutPolicy Timeout(Func timeoutProvider, Action onTimeout) => Timeout(timeoutProvider, TimeoutStrategy.Optimistic, onTimeout); @@ -345,8 +345,8 @@ public static TimeoutPolicy Timeout(Func ti /// An action to call on timeout, passing the execution context, the timeout applied, the capturing the abandoned, timed-out action, and the captured . /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. - /// timeoutProvider - /// onTimeout + /// Thrown when is . + /// Thrown when is . public static TimeoutPolicy Timeout(Func timeoutProvider, Action onTimeout) => Timeout(timeoutProvider, TimeoutStrategy.Optimistic, onTimeout); @@ -359,8 +359,8 @@ public static TimeoutPolicy Timeout(Func ti /// An action to call on timeout, passing the execution context, the timeout applied, and a capturing the abandoned, timed-out action. /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. - /// timeoutProvider - /// onTimeout + /// Thrown when is . + /// Thrown when is . public static TimeoutPolicy Timeout(Func timeoutProvider, TimeoutStrategy timeoutStrategy, Action onTimeout) { if (onTimeout == null) @@ -378,8 +378,8 @@ public static TimeoutPolicy Timeout(Func ti /// An action to call on timeout, passing the execution context, the timeout applied, the capturing the abandoned, timed-out action, and the captured . /// The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out. /// The policy instance. - /// timeoutProvider - /// onTimeout + /// Thrown when is . + /// Thrown when is . public static TimeoutPolicy Timeout( Func timeoutProvider, TimeoutStrategy timeoutStrategy, diff --git a/src/Polly/Utilities/ExceptionExtensions.cs b/src/Polly/Utilities/ExceptionExtensions.cs index 963e04964ba..ff59ace4068 100644 --- a/src/Polly/Utilities/ExceptionExtensions.cs +++ b/src/Polly/Utilities/ExceptionExtensions.cs @@ -11,7 +11,7 @@ public static class ExceptionExtensions /// /// Rethrows the extended , , using the class to rethrow it with its original stack trace, if differs from . /// - /// The exception to throw, if it differs from + /// The exception to throw, if it differs from . /// The exception to compare against. public static void RethrowWithOriginalStackTraceIfDiffersFrom(this Exception exceptionPossiblyToThrow, Exception exceptionToCompare) { diff --git a/src/Polly/Utilities/SystemClock.cs b/src/Polly/Utilities/SystemClock.cs index 3b51db4cd96..7902f61d57d 100644 --- a/src/Polly/Utilities/SystemClock.cs +++ b/src/Polly/Utilities/SystemClock.cs @@ -18,25 +18,25 @@ public static class SystemClock /// /// Allows the setting of a custom async Sleep implementation for testing. - /// By default this will be a call to taking a + /// By default this will be a call to taking a . /// public static Func SleepAsync = Task.Delay; /// /// Allows the setting of a custom DateTime.UtcNow implementation for testing. - /// By default this will be a call to + /// By default this will be a call to . /// public static Func UtcNow = () => DateTime.UtcNow; /// /// Allows the setting of a custom DateTimeOffset.UtcNow implementation for testing. - /// By default this will be a call to + /// By default this will be a call to . /// public static Func DateTimeOffsetUtcNow = () => DateTimeOffset.UtcNow; /// /// Allows the setting of a custom method for cancelling tokens after a timespan, for use in testing. - /// By default this will be a call to CancellationTokenSource.CancelAfter(timespan) + /// By default this will be a call to CancellationTokenSource.CancelAfter(timespan). /// public static Action CancelTokenAfter = (tokenSource, timespan) => tokenSource.CancelAfter(timespan);