From a18e456b19ddee6aea612d609d8367bf91d03bdf Mon Sep 17 00:00:00 2001 From: gintsk <3540004+gintsk@users.noreply.github.com> Date: Sun, 3 Mar 2024 16:37:07 +0200 Subject: [PATCH 01/13] Fix SA1629 for ArgumentNullException XML comments --- src/Polly/AsyncPolicy.ExecuteOverloads.cs | 62 ++--- .../AsyncPolicy.TResult.ExecuteOverloads.cs | 44 ++-- src/Polly/Bulkhead/AsyncBulkheadSyntax.cs | 4 +- .../Bulkhead/AsyncBulkheadTResultSyntax.cs | 6 +- src/Polly/Bulkhead/BulkheadSyntax.cs | 4 +- src/Polly/Bulkhead/BulkheadTResultSyntax.cs | 4 +- src/Polly/Caching/AsyncCacheSyntax.cs | 88 +++---- src/Polly/Caching/AsyncCacheTResultSyntax.cs | 226 +++++++++--------- .../Caching/AsyncSerializingCacheProvider.cs | 8 +- src/Polly/Caching/CacheSyntax.cs | 88 +++---- src/Polly/Caching/CacheTResultSyntax.cs | 226 +++++++++--------- src/Polly/Caching/SerializingCacheProvider.cs | 8 +- .../AdvancedCircuitBreakerSyntax.cs | 26 +- .../AdvancedCircuitBreakerTResultSyntax.cs | 26 +- .../AsyncAdvancedCircuitBreakerSyntax.cs | 24 +- ...syncAdvancedCircuitBreakerTResultSyntax.cs | 24 +- .../AsyncCircuitBreakerSyntax.cs | 24 +- .../AsyncCircuitBreakerTResultSyntax.cs | 24 +- .../CircuitBreaker/CircuitBreakerSyntax.cs | 28 +-- .../CircuitBreakerTResultSyntax.cs | 28 +-- src/Polly/Fallback/AsyncFallbackSyntax.cs | 32 +-- src/Polly/Fallback/FallbackSyntax.cs | 52 ++-- src/Polly/IAsyncPolicy.TResult.cs | 44 ++-- src/Polly/IAsyncPolicy.cs | 62 ++--- src/Polly/ISyncPolicy.TResult.cs | 36 +-- src/Polly/ISyncPolicy.cs | 54 ++--- src/Polly/Policy.ExecuteOverloads.cs | 54 ++--- src/Polly/Policy.TResult.ExecuteOverloads.cs | 36 +-- src/Polly/Retry/AsyncRetrySyntax.cs | 76 +++--- src/Polly/Retry/AsyncRetryTResultSyntax.cs | 76 +++--- src/Polly/Retry/RetrySyntax.cs | 44 ++-- src/Polly/Retry/RetryTResultSyntax.cs | 44 ++-- src/Polly/Timeout/AsyncTimeoutSyntax.cs | 52 ++-- .../Timeout/AsyncTimeoutTResultSyntax.cs | 56 ++--- src/Polly/Timeout/TimeoutSyntax.cs | 56 ++--- src/Polly/Timeout/TimeoutTResultSyntax.cs | 56 ++--- 36 files changed, 901 insertions(+), 901 deletions(-) diff --git a/src/Polly/AsyncPolicy.ExecuteOverloads.cs b/src/Polly/AsyncPolicy.ExecuteOverloads.cs index 2040b08e4b7..ea8e434958d 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 + /// Thrown when is . + /// The captured result. [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 + /// Thrown when is . + /// The captured result. [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 + /// Thrown when is . + /// The captured result. [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 + /// Thrown when is . + /// The captured result. [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 + /// Thrown when is . + /// The captured result. [DebuggerStepThrough] public Task> ExecuteAndCaptureAsync(Func> action, IDictionary contextData, CancellationToken cancellationToken) => ExecuteAndCaptureAsync(action, new Context(contextData), cancellationToken, DefaultContinueOnCapturedContext); @@ -411,7 +411,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. /// 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..5b3020deba5 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 + /// Thrown when is . + /// The captured result. [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 + /// Thrown when is . + /// The captured result. [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/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..60bb51b3f72 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) @@ -136,10 +136,10 @@ public static CachePolicy Cache(ISyncCacheProvider cacheProvider, ITtlStrategy t /// 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, @@ -166,11 +166,11 @@ public static CachePolicy Cache( /// 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, @@ -198,11 +198,11 @@ public static CachePolicy Cache( /// 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, @@ -231,12 +231,12 @@ public static CachePolicy Cache( /// 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, @@ -265,11 +265,11 @@ public static CachePolicy Cache( /// 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, @@ -298,12 +298,12 @@ public static CachePolicy Cache( /// 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..5f8d83c4075 100644 --- a/src/Polly/CircuitBreaker/AdvancedCircuitBreakerSyntax.cs +++ b/src/Polly/CircuitBreaker/AdvancedCircuitBreakerSyntax.cs @@ -64,8 +64,8 @@ public static CircuitBreakerPolicy AdvancedCircuitBreaker(this PolicyBuilder pol /// 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 + /// 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, @@ -97,8 +97,8 @@ public static CircuitBreakerPolicy AdvancedCircuitBreaker(this PolicyBuilder pol /// 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 + /// 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 = () => { }; @@ -134,9 +134,9 @@ public static CircuitBreakerPolicy AdvancedCircuitBreaker(this PolicyBuilder pol /// 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 + /// 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, @@ -170,9 +170,9 @@ public static CircuitBreakerPolicy AdvancedCircuitBreaker(this PolicyBuilder pol /// 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 + /// 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( @@ -207,9 +207,9 @@ public static CircuitBreakerPolicy AdvancedCircuitBreaker(this PolicyBuilder pol /// 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 + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . /// (see "Release It!" by Michael T. Nygard fi) public static CircuitBreakerPolicy AdvancedCircuitBreaker( this PolicyBuilder policyBuilder, diff --git a/src/Polly/CircuitBreaker/AdvancedCircuitBreakerTResultSyntax.cs b/src/Polly/CircuitBreaker/AdvancedCircuitBreakerTResultSyntax.cs index 91c5a11d649..d0916a2b6e6 100644 --- a/src/Polly/CircuitBreaker/AdvancedCircuitBreakerTResultSyntax.cs +++ b/src/Polly/CircuitBreaker/AdvancedCircuitBreakerTResultSyntax.cs @@ -64,8 +64,8 @@ public static CircuitBreakerPolicy AdvancedCircuitBreaker(this /// 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 + /// 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, @@ -97,8 +97,8 @@ public static CircuitBreakerPolicy AdvancedCircuitBreaker(this /// 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 + /// 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 = () => { }; @@ -134,9 +134,9 @@ public static CircuitBreakerPolicy AdvancedCircuitBreaker(this /// 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 + /// 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, @@ -171,9 +171,9 @@ public static CircuitBreakerPolicy AdvancedCircuitBreaker(this /// 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 + /// 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( @@ -209,9 +209,9 @@ public static CircuitBreakerPolicy AdvancedCircuitBreaker(this /// 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 + /// Thrown when is . + /// Thrown when is . + /// Thrown when is . /// (see "Release It!" by Michael T. Nygard fi) public static CircuitBreakerPolicy AdvancedCircuitBreaker( this PolicyBuilder policyBuilder, diff --git a/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerSyntax.cs b/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerSyntax.cs index 968d60a7aed..bd96b79f71c 100644 --- a/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerSyntax.cs +++ b/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerSyntax.cs @@ -66,8 +66,8 @@ public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsync(this PolicyB /// 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 + /// 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, @@ -100,8 +100,8 @@ public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsync(this PolicyB /// 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 + /// 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 = () => { }; @@ -139,8 +139,8 @@ public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsync(this PolicyB /// 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 + /// 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, @@ -175,9 +175,9 @@ public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsync(this PolicyB /// 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 + /// 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, @@ -212,9 +212,9 @@ public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsync(this PolicyB /// 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 + /// 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..440fd48f0ac 100644 --- a/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerTResultSyntax.cs +++ b/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerTResultSyntax.cs @@ -65,8 +65,8 @@ public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsyncsamplingDuration;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 + /// 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, @@ -99,8 +99,8 @@ public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsyncsamplingDuration;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 + /// 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 = () => { }; @@ -139,8 +139,8 @@ public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsyncsamplingDuration;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 + /// 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, @@ -175,9 +175,9 @@ public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsyncsamplingDuration;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 + /// 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, @@ -212,9 +212,9 @@ public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsyncsamplingDuration;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 + /// 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..4a9de76ee42 100644 --- a/src/Polly/CircuitBreaker/AsyncCircuitBreakerSyntax.cs +++ b/src/Polly/CircuitBreaker/AsyncCircuitBreakerSyntax.cs @@ -55,8 +55,8 @@ public static AsyncCircuitBreakerPolicy CircuitBreakerAsync(this PolicyBuilder p /// The policy instance. /// (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, @@ -84,8 +84,8 @@ public static AsyncCircuitBreakerPolicy CircuitBreakerAsync(this PolicyBuilder p /// The policy instance. /// (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 = () => { }; @@ -119,8 +119,8 @@ public static AsyncCircuitBreakerPolicy CircuitBreakerAsync(this PolicyBuilder p /// The policy instance. /// (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, @@ -150,9 +150,9 @@ public static AsyncCircuitBreakerPolicy CircuitBreakerAsync(this PolicyBuilder p /// The policy instance. /// (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, @@ -182,9 +182,9 @@ public static AsyncCircuitBreakerPolicy CircuitBreakerAsync(this PolicyBuilder p /// The policy instance. /// (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..64a80b8ca7e 100644 --- a/src/Polly/CircuitBreaker/AsyncCircuitBreakerTResultSyntax.cs +++ b/src/Polly/CircuitBreaker/AsyncCircuitBreakerTResultSyntax.cs @@ -55,8 +55,8 @@ public static AsyncCircuitBreakerPolicy CircuitBreakerAsync(th /// The policy instance. /// (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, @@ -84,8 +84,8 @@ public static AsyncCircuitBreakerPolicy CircuitBreakerAsync(th /// The policy instance. /// (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 = () => { }; @@ -119,8 +119,8 @@ public static AsyncCircuitBreakerPolicy CircuitBreakerAsync(th /// The policy instance. /// (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, @@ -150,9 +150,9 @@ public static AsyncCircuitBreakerPolicy CircuitBreakerAsync(th /// The policy instance. /// (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, @@ -182,9 +182,9 @@ public static AsyncCircuitBreakerPolicy CircuitBreakerAsync(th /// The policy instance. /// (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..517d8f5c6ee 100644 --- a/src/Polly/CircuitBreaker/CircuitBreakerSyntax.cs +++ b/src/Polly/CircuitBreaker/CircuitBreakerSyntax.cs @@ -23,8 +23,8 @@ public static class CircuitBreakerSyntax /// The policy instance. /// (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 = (_, _) => { }; @@ -57,8 +57,8 @@ public static CircuitBreakerPolicy CircuitBreaker(this PolicyBuilder policyBuild /// The policy instance. /// (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, @@ -86,8 +86,8 @@ public static CircuitBreakerPolicy CircuitBreaker(this PolicyBuilder policyBuild /// The policy instance. /// (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 = () => { }; @@ -120,8 +120,8 @@ public static CircuitBreakerPolicy CircuitBreaker(this PolicyBuilder policyBuild /// The policy instance. /// (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, @@ -151,9 +151,9 @@ public static CircuitBreakerPolicy CircuitBreaker(this PolicyBuilder policyBuild /// The policy instance. /// (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, @@ -183,9 +183,9 @@ public static CircuitBreakerPolicy CircuitBreaker(this PolicyBuilder policyBuild /// The policy instance. /// (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..efe25fc7e5f 100644 --- a/src/Polly/CircuitBreaker/CircuitBreakerTResultSyntax.cs +++ b/src/Polly/CircuitBreaker/CircuitBreakerTResultSyntax.cs @@ -23,8 +23,8 @@ public static class CircuitBreakerTResultSyntax /// The policy instance. /// (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 = (_, _) => { }; @@ -57,8 +57,8 @@ public static CircuitBreakerPolicy CircuitBreaker(this PolicyB /// The policy instance. /// (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, @@ -86,8 +86,8 @@ public static CircuitBreakerPolicy CircuitBreaker(this PolicyB /// The policy instance. /// (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 = () => { }; @@ -120,8 +120,8 @@ public static CircuitBreakerPolicy CircuitBreaker(this PolicyB /// The policy instance. /// (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, @@ -151,9 +151,9 @@ public static CircuitBreakerPolicy CircuitBreaker(this PolicyB /// The policy instance. /// (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, @@ -183,9 +183,9 @@ public static CircuitBreakerPolicy CircuitBreaker(this PolicyB /// The policy instance. /// (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/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.TResult.cs b/src/Polly/IAsyncPolicy.TResult.cs index 647bb56c5c1..72e7ce5aec6 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,8 +132,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); /// @@ -142,7 +142,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. /// 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..a6eb4cfb11c 100644 --- a/src/Polly/IAsyncPolicy.cs +++ b/src/Polly/IAsyncPolicy.cs @@ -70,7 +70,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. /// Whether to continue on a captured synchronization context. - /// contextData + /// Thrown when is . Task ExecuteAsync(Func action, IDictionary contextData, CancellationToken cancellationToken, bool continueOnCapturedContext); /// @@ -88,7 +88,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 +97,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 +105,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 +114,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 +123,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 +133,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 +143,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 +154,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 +166,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 +174,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 +182,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 +191,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 +207,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 +235,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 +254,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 +263,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 +273,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 +282,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 +292,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); /// @@ -303,7 +303,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. /// 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 +313,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 +325,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 +337,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.TResult.cs b/src/Polly/ISyncPolicy.TResult.cs index d75e4e40ed7..e4ce97d272f 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,11 @@ public interface ISyncPolicy : IsPolicy /// /// The action to perform. /// Arbitrary data that is passed to the exception policy. - /// contextData + /// Thrown when is . /// /// The value returned by the action /// - /// contextData + /// Thrown when is . TResult Execute(Func action, IDictionary contextData); /// @@ -37,11 +37,11 @@ public interface ISyncPolicy : IsPolicy /// /// The action to perform. /// Context data that is passed to the exception policy. - /// context + /// Thrown when is . /// /// The value returned by the action /// - /// contextData + /// Thrown when is . TResult Execute(Func action, Context context); /// @@ -49,7 +49,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 +58,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 +68,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 /// /// The action to perform. - /// The captured result + /// The captured result. PolicyResult ExecuteAndCapture(Func action); /// @@ -83,8 +83,8 @@ public interface ISyncPolicy : IsPolicy /// /// The action to perform. /// Arbitrary data that is passed to the exception policy. - /// contextData - /// The captured result + /// Thrown when is . + /// The captured result. PolicyResult ExecuteAndCapture(Func action, IDictionary contextData); /// @@ -92,8 +92,8 @@ public interface ISyncPolicy : IsPolicy /// /// The action to perform. /// Context data that is passed to the exception policy. - /// contextData - /// The captured result + /// Thrown when is . + /// The captured result. PolicyResult ExecuteAndCapture(Func action, Context context); /// @@ -101,7 +101,7 @@ public interface ISyncPolicy : IsPolicy /// /// The action to perform. /// The cancellation token. - /// The captured result + /// The captured result. PolicyResult ExecuteAndCapture(Func action, CancellationToken cancellationToken); /// @@ -110,8 +110,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 +120,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..a69bbd733e4 100644 --- a/src/Polly/ISyncPolicy.cs +++ b/src/Polly/ISyncPolicy.cs @@ -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,11 @@ public interface ISyncPolicy : IsPolicy /// The type of the result. /// The action to perform. /// Arbitrary data that is passed to the exception policy. - /// contextData + /// Thrown when is . /// /// The value returned by the action /// - /// contextData + /// Thrown when is . TResult Execute(Func action, IDictionary contextData); /// @@ -83,11 +83,11 @@ public interface ISyncPolicy : IsPolicy /// The type of the result. /// The action to perform. /// Context data that is passed to the exception policy. - /// contextData + /// Thrown when is . /// /// The value returned by the action /// - /// contextData + /// Thrown when is . TResult Execute(Func action, Context context); /// @@ -96,7 +96,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 +106,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 +117,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 /// /// The action to perform. - /// The captured result + /// The captured result. PolicyResult ExecuteAndCapture(Action action); /// @@ -132,8 +132,8 @@ public interface ISyncPolicy : IsPolicy /// /// The action to perform. /// Arbitrary data that is passed to the exception policy. - /// contextData - /// The captured result + /// Thrown when is . + /// The captured result. PolicyResult ExecuteAndCapture(Action action, IDictionary contextData); /// @@ -141,7 +141,7 @@ 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); /// @@ -149,7 +149,7 @@ public interface ISyncPolicy : IsPolicy /// /// The action to perform. /// The cancellation token. - /// The captured result + /// The captured result. PolicyResult ExecuteAndCapture(Action action, CancellationToken cancellationToken); /// @@ -158,8 +158,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(Action action, IDictionary contextData, CancellationToken cancellationToken); /// @@ -168,14 +168,14 @@ 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(Action action, Context context, CancellationToken cancellationToken); /// /// 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 +183,8 @@ public interface ISyncPolicy : IsPolicy /// /// The action to perform. /// Arbitrary data that is passed to the exception policy. - /// contextData - /// The captured result + /// Thrown when is . + /// The captured result. PolicyResult ExecuteAndCapture(Func action, IDictionary contextData); /// @@ -192,8 +192,8 @@ public interface ISyncPolicy : IsPolicy /// /// The action to perform. /// Context data that is passed to the exception policy. - /// contextData - /// The captured result + /// Thrown when is . + /// The captured result. PolicyResult ExecuteAndCapture(Func action, Context context); /// @@ -202,7 +202,7 @@ public interface ISyncPolicy : IsPolicy /// 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 +212,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 +222,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/Policy.ExecuteOverloads.cs b/src/Polly/Policy.ExecuteOverloads.cs index fbaf63f6415..280b6d1679a 100644 --- a/src/Polly/Policy.ExecuteOverloads.cs +++ b/src/Polly/Policy.ExecuteOverloads.cs @@ -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,11 @@ public TResult Execute(Func action) => /// The type of the result. /// The action to perform. /// Arbitrary data that is passed to the exception policy. - /// contextData + /// Thrown when is . /// /// The value returned by the action /// - /// contextData + /// Thrown when is . [DebuggerStepThrough] public TResult Execute(Func action, IDictionary contextData) => Execute((ctx, _) => action(ctx), new Context(contextData), DefaultCancellationToken); @@ -107,11 +107,11 @@ public TResult Execute(Func action, IDictionaryThe type of the result. /// The action to perform. /// Context data that is passed to the exception policy. - /// contextData + /// Thrown when is . /// /// The value returned by the action /// - /// contextData + /// Thrown when is . [DebuggerStepThrough] public TResult Execute(Func action, Context context) => Execute((ctx, _) => action(ctx), context, DefaultCancellationToken); @@ -122,7 +122,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 +134,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 +147,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) { @@ -176,7 +176,7 @@ public TResult Execute(Func action /// 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 +186,8 @@ public PolicyResult ExecuteAndCapture(Action action) => /// /// The action to perform. /// Arbitrary data that is passed to the exception policy. - /// contextData - /// The captured result + /// Thrown when is . + /// The captured result. [DebuggerStepThrough] public PolicyResult ExecuteAndCapture(Action action, IDictionary contextData) => ExecuteAndCapture((ctx, _) => action(ctx), new Context(contextData), DefaultCancellationToken); @@ -197,7 +197,7 @@ 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); @@ -207,7 +207,7 @@ public PolicyResult ExecuteAndCapture(Action action, Context context) = /// /// 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,8 +218,8 @@ 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); @@ -230,7 +230,7 @@ public PolicyResult ExecuteAndCapture(Action action, /// 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) { @@ -254,7 +254,7 @@ public PolicyResult ExecuteAndCapture(Action action, /// 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 +264,8 @@ public PolicyResult ExecuteAndCapture(Func action) => /// /// The action to perform. /// Arbitrary data that is passed to the exception policy. - /// contextData - /// The captured result + /// Thrown when is . + /// The captured result. [DebuggerStepThrough] public PolicyResult ExecuteAndCapture(Func action, IDictionary contextData) => ExecuteAndCapture((ctx, _) => action(ctx), new Context(contextData), DefaultCancellationToken); @@ -275,8 +275,8 @@ public PolicyResult ExecuteAndCapture(Func a /// /// The action to perform. /// Context data that is passed to the exception policy. - /// contextData - /// The captured result + /// Thrown when is . + /// The captured result. [DebuggerStepThrough] public PolicyResult ExecuteAndCapture(Func action, Context context) => ExecuteAndCapture((ctx, _) => action(ctx), context, DefaultCancellationToken); @@ -287,7 +287,7 @@ public PolicyResult ExecuteAndCapture(Func a /// 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 +298,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 +310,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.ExecuteOverloads.cs b/src/Polly/Policy.TResult.ExecuteOverloads.cs index b118b195bd1..8a91caaffc4 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,11 @@ public TResult Execute(Func action) => /// /// The action to perform. /// Arbitrary data that is passed to the exception policy. - /// contextData + /// Thrown when is . /// /// The value returned by the action /// - /// contextData + /// Thrown when is . [DebuggerStepThrough] public TResult Execute(Func action, IDictionary contextData) => Execute((ctx, _) => action(ctx), new Context(contextData), DefaultCancellationToken); @@ -32,11 +32,11 @@ public TResult Execute(Func action, IDictionary /// The action to perform. /// Context data that is passed to the exception policy. - /// context + /// Thrown when is . /// /// The value returned by the action /// - /// contextData + /// Thrown when is . [DebuggerStepThrough] public TResult Execute(Func action, Context context) => Execute((ctx, _) => action(ctx), context, DefaultCancellationToken); @@ -46,7 +46,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 +57,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 +69,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) { @@ -96,7 +96,7 @@ public TResult Execute(Func action, Context /// 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 +106,8 @@ public PolicyResult ExecuteAndCapture(Func action) => /// /// The action to perform. /// Arbitrary data that is passed to the exception policy. - /// contextData - /// The captured result + /// Thrown when is . + /// The captured result. [DebuggerStepThrough] public PolicyResult ExecuteAndCapture(Func action, IDictionary contextData) => ExecuteAndCapture((ctx, _) => action(ctx), new Context(contextData), DefaultCancellationToken); @@ -117,8 +117,8 @@ public PolicyResult ExecuteAndCapture(Func action, ID /// /// The action to perform. /// Context data that is passed to the exception policy. - /// contextData - /// The captured result + /// Thrown when is . + /// The captured result. [DebuggerStepThrough] public PolicyResult ExecuteAndCapture(Func action, Context context) => ExecuteAndCapture((ctx, _) => action(ctx), context, DefaultCancellationToken); @@ -128,7 +128,7 @@ public PolicyResult ExecuteAndCapture(Func action, Co /// /// 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 +139,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 +151,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/Retry/AsyncRetrySyntax.cs b/src/Polly/Retry/AsyncRetrySyntax.cs index 363306c94a8..451616ba7b2 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) @@ -848,7 +848,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilde /// 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 +867,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) @@ -888,8 +888,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) @@ -912,8 +912,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) @@ -936,8 +936,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) @@ -960,8 +960,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) @@ -984,8 +984,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 +1010,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 +1036,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 +1058,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 +1080,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 +1105,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..3c9873d05f2 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) @@ -848,7 +848,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 +867,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 +888,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 +912,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 +936,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 +960,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 +984,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 +1008,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 +1032,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 +1054,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 +1076,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 +1101,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..562125d069f 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) @@ -476,7 +476,7 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilder policyBuilder, IEnumer /// 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 +495,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) @@ -516,8 +516,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) @@ -540,8 +540,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) @@ -564,8 +564,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 +586,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 +608,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 +633,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..5fd8b7fc9ae 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) @@ -516,7 +516,7 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilderThe 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) @@ -535,7 +535,7 @@ public static RetryPolicy WaitAndRetryForever(this PolicyBuild /// 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) @@ -556,8 +556,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> onRetry) { if (sleepDurationProvider == null) @@ -580,8 +580,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> onRetry) { if (sleepDurationProvider == null) @@ -604,8 +604,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 +626,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 +648,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 +673,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..1215e50d408 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) @@ -141,7 +141,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 a positive TimeSpan (or Timeout.InfiniteTimeSpan to indicate no timeout) - /// onTimeoutAsync + /// 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); @@ -174,7 +174,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 a positive TimeSpan (or Timeout.InfiniteTimeSpan to indicate no timeout) - /// onTimeoutAsync + /// 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..8380805d327 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) @@ -136,7 +136,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 a positive TimeSpan (or Timeout.InfiniteTimeSpan to indicate no timeout) - /// onTimeoutAsync + /// 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) @@ -174,7 +174,7 @@ public static AsyncTimeoutPolicy TimeoutAsync(TimeSpan timeout /// The timeout strategy. /// The policy instance. /// timeout;Value must be a positive TimeSpan (or Timeout.InfiniteTimeSpan to indicate no timeout) - /// onTimeoutAsync + /// 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..47c5d837671 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) @@ -136,7 +136,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 a positive TimeSpan (or Timeout.InfiniteTimeSpan to indicate no timeout) - /// onTimeout + /// 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); @@ -169,7 +169,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 a positive TimeSpan (or Timeout.InfiniteTimeSpan to indicate no timeout) - /// onTimeout + /// 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..da4339dd6d6 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) @@ -140,7 +140,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 a positive TimeSpan (or Timeout.InfiniteTimeSpan to indicate no timeout) - /// onTimeout + /// 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); @@ -172,7 +172,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 a positive TimeSpan (or Timeout.InfiniteTimeSpan to indicate no timeout) - /// onTimeout + /// 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, From d343447c3a084b8a2a3e69a153e0a916b23e588e Mon Sep 17 00:00:00 2001 From: gintsk <3540004+gintsk@users.noreply.github.com> Date: Sun, 3 Mar 2024 16:44:34 +0200 Subject: [PATCH 02/13] Fix "CA1200: Avoid using cref tags with a prefix" for ArgumentNullException --- src/Polly/Registry/IPolicyRegistry.cs | 2 +- src/Polly/Registry/IReadOnlyPolicyRegistry.cs | 2 +- src/Polly/Registry/PolicyRegistry.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Polly/Registry/IPolicyRegistry.cs b/src/Polly/Registry/IPolicyRegistry.cs index e9fd8360328..5573fa1ef4a 100644 --- a/src/Polly/Registry/IPolicyRegistry.cs +++ b/src/Polly/Registry/IPolicyRegistry.cs @@ -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; } diff --git a/src/Polly/Registry/IReadOnlyPolicyRegistry.cs b/src/Polly/Registry/IReadOnlyPolicyRegistry.cs index 477a2fa388b..a247b7ef6af 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; } diff --git a/src/Polly/Registry/PolicyRegistry.cs b/src/Polly/Registry/PolicyRegistry.cs index b9c874ea55a..b16e3808755 100644 --- a/src/Polly/Registry/PolicyRegistry.cs +++ b/src/Polly/Registry/PolicyRegistry.cs @@ -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] From 51af212a3346a8ed270fffa025d4d95f4dac06eb Mon Sep 17 00:00:00 2001 From: gintsk <3540004+gintsk@users.noreply.github.com> Date: Sun, 3 Mar 2024 16:51:40 +0200 Subject: [PATCH 03/13] Fix SA1629 and unify ArgumentNullException style --- src/Polly/Registry/IReadOnlyPolicyRegistry.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Polly/Registry/IReadOnlyPolicyRegistry.cs b/src/Polly/Registry/IReadOnlyPolicyRegistry.cs index a247b7ef6af..733b9bafedb 100644 --- a/src/Polly/Registry/IReadOnlyPolicyRegistry.cs +++ b/src/Polly/Registry/IReadOnlyPolicyRegistry.cs @@ -49,6 +49,6 @@ bool TryGet(TKey key, out TPolicy policy) /// /// The Key to locate in the registry /// True if exists otherwise false - /// is null + /// Thrown when is . bool ContainsKey(TKey key); } From 47ade1efdb9347f12797ad19bb3664184df80b86 Mon Sep 17 00:00:00 2001 From: gintsk <3540004+gintsk@users.noreply.github.com> Date: Sun, 3 Mar 2024 16:51:58 +0200 Subject: [PATCH 04/13] Fix "SA1627 The documentation text within the 'exception' tag should not be empty" --- src/Polly/Caching/CacheSyntax.cs | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/Polly/Caching/CacheSyntax.cs b/src/Polly/Caching/CacheSyntax.cs index 60bb51b3f72..d0ee51653fa 100644 --- a/src/Polly/Caching/CacheSyntax.cs +++ b/src/Polly/Caching/CacheSyntax.cs @@ -134,8 +134,6 @@ 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. - /// - /// /// Thrown when is . /// Thrown when is . /// Thrown when is . @@ -164,8 +162,6 @@ 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. - /// - /// /// Thrown when is . /// Thrown when is . /// Thrown when is . @@ -196,8 +192,6 @@ 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. - /// - /// /// Thrown when is . /// Thrown when is . /// Thrown when is . @@ -229,8 +223,6 @@ 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. - /// - /// /// Thrown when is . /// Thrown when is . /// Thrown when is . @@ -263,8 +255,6 @@ 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. - /// - /// /// Thrown when is . /// Thrown when is . /// Thrown when is . @@ -296,8 +286,6 @@ 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. - /// - /// /// Thrown when is . /// Thrown when is . /// Thrown when is . From 2c1531617f70818a753ea1ae58d58706e044a70f Mon Sep 17 00:00:00 2001 From: gintsk <3540004+gintsk@users.noreply.github.com> Date: Sun, 3 Mar 2024 16:59:52 +0200 Subject: [PATCH 05/13] Unify ArgumentNullException XML comment style --- src/Polly.Core/ResiliencePipelineBuilderExtensions.cs | 4 ++-- src/Polly/Registry/IPolicyRegistry.cs | 4 ++-- src/Polly/Registry/IReadOnlyPolicyRegistry.cs | 2 +- src/Polly/Registry/PolicyRegistry.cs | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) 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/Registry/IPolicyRegistry.cs b/src/Polly/Registry/IPolicyRegistry.cs index 5573fa1ef4a..7348e8e1857 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. + /// is . /// A Policy with same already exists. void Add(TKey key, TPolicy policy) where TPolicy : IsPolicy; @@ -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. + /// is . bool Remove(TKey key); /// diff --git a/src/Polly/Registry/IReadOnlyPolicyRegistry.cs b/src/Polly/Registry/IReadOnlyPolicyRegistry.cs index 733b9bafedb..c3bf645cba7 100644 --- a/src/Polly/Registry/IReadOnlyPolicyRegistry.cs +++ b/src/Polly/Registry/IReadOnlyPolicyRegistry.cs @@ -21,7 +21,7 @@ public interface IReadOnlyPolicyRegistry : IEnumerable /// The type of Policy. /// The policy stored in the registry under the given key. - /// is null. + /// is . TPolicy Get(TKey key) where TPolicy : IsPolicy; diff --git a/src/Polly/Registry/PolicyRegistry.cs b/src/Polly/Registry/PolicyRegistry.cs index b16e3808755..25b64b3c6a8 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. + /// is . /// A Policy with same already exists. public void Add(string key, TPolicy policy) where TPolicy : IsPolicy => _registry.Add(key, policy); @@ -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); From 997420a619f6ea2b1d3513abb63e19cdd7aa251c Mon Sep 17 00:00:00 2001 From: gintsk <3540004+gintsk@users.noreply.github.com> Date: Sun, 3 Mar 2024 17:02:28 +0200 Subject: [PATCH 06/13] Fix SA1629 in remarks (are they even neccessary?) --- .../CircuitBreaker/AdvancedCircuitBreakerSyntax.cs | 12 ++++++------ .../AdvancedCircuitBreakerTResultSyntax.cs | 12 ++++++------ .../AsyncAdvancedCircuitBreakerSyntax.cs | 12 ++++++------ .../AsyncAdvancedCircuitBreakerTResultSyntax.cs | 12 ++++++------ .../CircuitBreaker/AsyncCircuitBreakerSyntax.cs | 12 ++++++------ .../AsyncCircuitBreakerTResultSyntax.cs | 12 ++++++------ src/Polly/CircuitBreaker/CircuitBreakerSyntax.cs | 12 ++++++------ .../CircuitBreaker/CircuitBreakerTResultSyntax.cs | 12 ++++++------ 8 files changed, 48 insertions(+), 48 deletions(-) diff --git a/src/Polly/CircuitBreaker/AdvancedCircuitBreakerSyntax.cs b/src/Polly/CircuitBreaker/AdvancedCircuitBreakerSyntax.cs index 5f8d83c4075..7c522aeb134 100644 --- a/src/Polly/CircuitBreaker/AdvancedCircuitBreakerSyntax.cs +++ b/src/Polly/CircuitBreaker/AdvancedCircuitBreakerSyntax.cs @@ -22,7 +22,7 @@ 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) + /// (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 @@ -58,7 +58,7 @@ 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) + /// (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 @@ -91,7 +91,7 @@ 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) + /// (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 @@ -128,7 +128,7 @@ 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) + /// (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 @@ -173,7 +173,7 @@ public static CircuitBreakerPolicy AdvancedCircuitBreaker(this PolicyBuilder pol /// Thrown when is . /// Thrown when is . /// Thrown when is . - /// (see "Release It!" by Michael T. Nygard fi) + /// (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, @@ -210,7 +210,7 @@ public static CircuitBreakerPolicy AdvancedCircuitBreaker(this PolicyBuilder pol /// Thrown when is . /// Thrown when is . /// Thrown when is . - /// (see "Release It!" by Michael T. Nygard fi) + /// (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 d0916a2b6e6..5c45600a9ba 100644 --- a/src/Polly/CircuitBreaker/AdvancedCircuitBreakerTResultSyntax.cs +++ b/src/Polly/CircuitBreaker/AdvancedCircuitBreakerTResultSyntax.cs @@ -27,7 +27,7 @@ public static class AdvancedCircuitBreakerTResultSyntax /// 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) + /// (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,7 +58,7 @@ 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) + /// (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 @@ -91,7 +91,7 @@ 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) + /// (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 @@ -128,7 +128,7 @@ 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) + /// (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 @@ -174,7 +174,7 @@ public static CircuitBreakerPolicy AdvancedCircuitBreaker(this /// Thrown when is . /// Thrown when is . /// Thrown when is . - /// (see "Release It!" by Michael T. Nygard fi) + /// (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, @@ -212,7 +212,7 @@ public static CircuitBreakerPolicy AdvancedCircuitBreaker(this /// Thrown when is . /// Thrown when is . /// Thrown when is . - /// (see "Release It!" by Michael T. Nygard fi) + /// (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 bd96b79f71c..b763dd97326 100644 --- a/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerSyntax.cs +++ b/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerSyntax.cs @@ -27,7 +27,7 @@ public static class AsyncAdvancedCircuitBreakerSyntax /// 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) + /// (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,7 +60,7 @@ 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) + /// (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 @@ -94,7 +94,7 @@ 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) + /// (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 @@ -133,7 +133,7 @@ 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) + /// (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 @@ -169,7 +169,7 @@ 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) + /// (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 @@ -206,7 +206,7 @@ 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) + /// (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 diff --git a/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerTResultSyntax.cs b/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerTResultSyntax.cs index 440fd48f0ac..59645d51d54 100644 --- a/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerTResultSyntax.cs +++ b/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerTResultSyntax.cs @@ -22,7 +22,7 @@ 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) + /// (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 @@ -59,7 +59,7 @@ 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) + /// (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 @@ -93,7 +93,7 @@ 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) + /// (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 @@ -133,7 +133,7 @@ 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) + /// (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 @@ -169,7 +169,7 @@ 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) + /// (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 @@ -206,7 +206,7 @@ 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) + /// (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 diff --git a/src/Polly/CircuitBreaker/AsyncCircuitBreakerSyntax.cs b/src/Polly/CircuitBreaker/AsyncCircuitBreakerSyntax.cs index 4a9de76ee42..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,7 +53,7 @@ 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. /// Thrown when is . /// Thrown when is . @@ -82,7 +82,7 @@ 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. /// Thrown when is . /// Thrown when is . @@ -117,7 +117,7 @@ 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. /// Thrown when is . /// Thrown when is . @@ -148,7 +148,7 @@ 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. /// Thrown when is . /// Thrown when is . @@ -180,7 +180,7 @@ 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. /// Thrown when is . /// Thrown when is . diff --git a/src/Polly/CircuitBreaker/AsyncCircuitBreakerTResultSyntax.cs b/src/Polly/CircuitBreaker/AsyncCircuitBreakerTResultSyntax.cs index 64a80b8ca7e..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,7 +53,7 @@ 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. /// Thrown when is . /// Thrown when is . @@ -82,7 +82,7 @@ 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. /// Thrown when is . /// Thrown when is . @@ -117,7 +117,7 @@ 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. /// Thrown when is . /// Thrown when is . @@ -148,7 +148,7 @@ 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. /// Thrown when is . /// Thrown when is . @@ -180,7 +180,7 @@ 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. /// Thrown when is . /// Thrown when is . diff --git a/src/Polly/CircuitBreaker/CircuitBreakerSyntax.cs b/src/Polly/CircuitBreaker/CircuitBreakerSyntax.cs index 517d8f5c6ee..2b80229d05c 100644 --- a/src/Polly/CircuitBreaker/CircuitBreakerSyntax.cs +++ b/src/Polly/CircuitBreaker/CircuitBreakerSyntax.cs @@ -21,7 +21,7 @@ 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. /// Thrown when is . /// Thrown when is . @@ -55,7 +55,7 @@ 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. /// Thrown when is . /// Thrown when is . @@ -84,7 +84,7 @@ 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. /// Thrown when is . /// Thrown when is . @@ -118,7 +118,7 @@ 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. /// Thrown when is . /// Thrown when is . @@ -149,7 +149,7 @@ 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. /// Thrown when is . /// Thrown when is . @@ -181,7 +181,7 @@ 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. /// Thrown when is . /// Thrown when is . diff --git a/src/Polly/CircuitBreaker/CircuitBreakerTResultSyntax.cs b/src/Polly/CircuitBreaker/CircuitBreakerTResultSyntax.cs index efe25fc7e5f..5861ae75acb 100644 --- a/src/Polly/CircuitBreaker/CircuitBreakerTResultSyntax.cs +++ b/src/Polly/CircuitBreaker/CircuitBreakerTResultSyntax.cs @@ -21,7 +21,7 @@ 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. /// Thrown when is . /// Thrown when is . @@ -55,7 +55,7 @@ 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. /// Thrown when is . /// Thrown when is . @@ -84,7 +84,7 @@ 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. /// Thrown when is . /// Thrown when is . @@ -118,7 +118,7 @@ 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. /// Thrown when is . /// Thrown when is . @@ -149,7 +149,7 @@ 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. /// Thrown when is . /// Thrown when is . @@ -181,7 +181,7 @@ 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. /// Thrown when is . /// Thrown when is . From 386dd7ef0f24e4a55d1daf52173c2c9e1825f9b8 Mon Sep 17 00:00:00 2001 From: gintsk <3540004+gintsk@users.noreply.github.com> Date: Sun, 3 Mar 2024 17:03:22 +0200 Subject: [PATCH 07/13] Unify ArgumentNullException XML comment style --- src/Polly/Registry/IPolicyRegistry.cs | 4 ++-- src/Polly/Registry/IReadOnlyPolicyRegistry.cs | 2 +- src/Polly/Registry/PolicyRegistry.cs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Polly/Registry/IPolicyRegistry.cs b/src/Polly/Registry/IPolicyRegistry.cs index 7348e8e1857..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 . + /// Thrown when is . /// A Policy with same already exists. void Add(TKey key, TPolicy policy) where TPolicy : IsPolicy; @@ -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 . + /// Thrown when is . bool Remove(TKey key); /// diff --git a/src/Polly/Registry/IReadOnlyPolicyRegistry.cs b/src/Polly/Registry/IReadOnlyPolicyRegistry.cs index c3bf645cba7..c27e92640e5 100644 --- a/src/Polly/Registry/IReadOnlyPolicyRegistry.cs +++ b/src/Polly/Registry/IReadOnlyPolicyRegistry.cs @@ -21,7 +21,7 @@ public interface IReadOnlyPolicyRegistry : IEnumerable /// The type of Policy. /// The policy stored in the registry under the given key. - /// is . + /// Thrown when is . TPolicy Get(TKey key) where TPolicy : IsPolicy; diff --git a/src/Polly/Registry/PolicyRegistry.cs b/src/Polly/Registry/PolicyRegistry.cs index 25b64b3c6a8..2f2413515c3 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 . + /// Thrown when is . /// A Policy with same already exists. public void Add(string key, TPolicy policy) where TPolicy : IsPolicy => _registry.Add(key, policy); From 4e9e28fe2fd37c612749f1a09ea0b8ba5a37087b Mon Sep 17 00:00:00 2001 From: gintsk <3540004+gintsk@users.noreply.github.com> Date: Sun, 3 Mar 2024 17:33:14 +0200 Subject: [PATCH 08/13] Fix SA1629 and unify XML comments in ArgumentNullException with two params; and fix wrongly referenced parameters in comments --- src/Polly/Retry/AsyncRetrySyntax.cs | 102 ++++----------------- src/Polly/Retry/AsyncRetryTResultSyntax.cs | 102 ++++----------------- src/Polly/Retry/RetrySyntax.cs | 54 ++--------- src/Polly/Retry/RetryTResultSyntax.cs | 60 ++---------- 4 files changed, 53 insertions(+), 265 deletions(-) diff --git a/src/Polly/Retry/AsyncRetrySyntax.cs b/src/Polly/Retry/AsyncRetrySyntax.cs index 451616ba7b2..c9481e2cf78 100644 --- a/src/Polly/Retry/AsyncRetrySyntax.cs +++ b/src/Polly/Retry/AsyncRetrySyntax.cs @@ -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) diff --git a/src/Polly/Retry/AsyncRetryTResultSyntax.cs b/src/Polly/Retry/AsyncRetryTResultSyntax.cs index 3c9873d05f2..dc7edcefd40 100644 --- a/src/Polly/Retry/AsyncRetryTResultSyntax.cs +++ b/src/Polly/Retry/AsyncRetryTResultSyntax.cs @@ -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) diff --git a/src/Polly/Retry/RetrySyntax.cs b/src/Polly/Retry/RetrySyntax.cs index 562125d069f..fb94c992e1a 100644 --- a/src/Polly/Retry/RetrySyntax.cs +++ b/src/Polly/Retry/RetrySyntax.cs @@ -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) diff --git a/src/Polly/Retry/RetryTResultSyntax.cs b/src/Polly/Retry/RetryTResultSyntax.cs index 5fd8b7fc9ae..566b0e02872 100644 --- a/src/Polly/Retry/RetryTResultSyntax.cs +++ b/src/Polly/Retry/RetryTResultSyntax.cs @@ -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) From caacb3e2a8f6b4e76f9c9dd7b133edbdbafd9efa Mon Sep 17 00:00:00 2001 From: gintsk <3540004+gintsk@users.noreply.github.com> Date: Sun, 3 Mar 2024 17:46:27 +0200 Subject: [PATCH 09/13] Fix SA1629 and unify comments in returns tag Fix SA1629 in ArgumentOutOfRangeException XML comments and an summary tags --- .../AdvancedCircuitBreakerSyntax.cs | 60 +++++++++---------- .../AdvancedCircuitBreakerTResultSyntax.cs | 60 +++++++++---------- .../AsyncAdvancedCircuitBreakerSyntax.cs | 60 +++++++++---------- ...syncAdvancedCircuitBreakerTResultSyntax.cs | 60 +++++++++---------- src/Polly/IAsyncPolicy.cs | 2 +- src/Polly/ISyncPolicy.TResult.cs | 12 ++-- src/Polly/ISyncPolicy.cs | 20 +++---- src/Polly/Policy.ExecuteOverloads.cs | 20 +++---- src/Polly/Policy.TResult.ExecuteOverloads.cs | 12 ++-- src/Polly/Retry/AsyncRetrySyntax.cs | 10 ++-- src/Polly/Retry/AsyncRetryTResultSyntax.cs | 2 +- src/Polly/Retry/RetrySyntax.cs | 6 +- src/Polly/Retry/RetryTResultSyntax.cs | 8 +-- src/Polly/Timeout/AsyncTimeoutSyntax.cs | 8 +-- .../Timeout/AsyncTimeoutTResultSyntax.cs | 8 +-- src/Polly/Timeout/TimeoutSyntax.cs | 8 +-- src/Polly/Timeout/TimeoutTResultSyntax.cs | 8 +-- 17 files changed, 174 insertions(+), 190 deletions(-) diff --git a/src/Polly/CircuitBreaker/AdvancedCircuitBreakerSyntax.cs b/src/Polly/CircuitBreaker/AdvancedCircuitBreakerSyntax.cs index 7c522aeb134..2c300108718 100644 --- a/src/Polly/CircuitBreaker/AdvancedCircuitBreakerSyntax.cs +++ b/src/Polly/CircuitBreaker/AdvancedCircuitBreakerSyntax.cs @@ -23,11 +23,11 @@ public static class AdvancedCircuitBreakerSyntax /// 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 + /// 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 = (_, _) => { }; @@ -59,11 +59,11 @@ public static CircuitBreakerPolicy AdvancedCircuitBreaker(this PolicyBuilder pol /// 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 + /// 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) => @@ -92,11 +92,11 @@ public static CircuitBreakerPolicy AdvancedCircuitBreaker(this PolicyBuilder pol /// 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 + /// 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) @@ -129,11 +129,11 @@ public static CircuitBreakerPolicy AdvancedCircuitBreaker(this PolicyBuilder pol /// 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 + /// 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 . @@ -165,11 +165,11 @@ 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 + /// 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 . @@ -202,11 +202,11 @@ 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 + /// 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 . diff --git a/src/Polly/CircuitBreaker/AdvancedCircuitBreakerTResultSyntax.cs b/src/Polly/CircuitBreaker/AdvancedCircuitBreakerTResultSyntax.cs index 5c45600a9ba..8dcc1b870c6 100644 --- a/src/Polly/CircuitBreaker/AdvancedCircuitBreakerTResultSyntax.cs +++ b/src/Polly/CircuitBreaker/AdvancedCircuitBreakerTResultSyntax.cs @@ -22,11 +22,11 @@ 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 + /// 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) { @@ -59,11 +59,11 @@ public static CircuitBreakerPolicy AdvancedCircuitBreaker(this /// 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 + /// 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) => @@ -92,11 +92,11 @@ public static CircuitBreakerPolicy AdvancedCircuitBreaker(this /// 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 + /// 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) @@ -129,11 +129,11 @@ public static CircuitBreakerPolicy AdvancedCircuitBreaker(this /// 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 + /// 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 . @@ -166,11 +166,11 @@ 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 + /// 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 . @@ -204,11 +204,11 @@ 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 + /// 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 . diff --git a/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerSyntax.cs b/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerSyntax.cs index b763dd97326..b5d464ac881 100644 --- a/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerSyntax.cs +++ b/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerSyntax.cs @@ -22,11 +22,11 @@ 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 + /// 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) @@ -61,11 +61,11 @@ public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsync(this PolicyB /// 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 + /// 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) => @@ -95,11 +95,11 @@ public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsync(this PolicyB /// 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 + /// 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) @@ -134,11 +134,11 @@ public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsync(this PolicyB /// 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 + /// 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) => @@ -170,11 +170,11 @@ public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsync(this PolicyB /// 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 + /// 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 . @@ -207,11 +207,11 @@ public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsync(this PolicyB /// 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 + /// 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 . diff --git a/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerTResultSyntax.cs b/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerTResultSyntax.cs index 59645d51d54..a3efca75b3d 100644 --- a/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerTResultSyntax.cs +++ b/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerTResultSyntax.cs @@ -23,11 +23,11 @@ public static class AsyncAdvancedCircuitBreakerTResultSyntax /// 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 + /// 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 = (_, _) => { }; @@ -60,11 +60,11 @@ public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsyncThe 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 + /// 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) => @@ -94,11 +94,11 @@ public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsyncThe 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 + /// 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) @@ -134,11 +134,11 @@ public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsyncThe 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 + /// 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) => @@ -170,11 +170,11 @@ public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsyncThe 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 + /// 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 . @@ -207,11 +207,11 @@ public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsyncThe 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 + /// 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 . diff --git a/src/Polly/IAsyncPolicy.cs b/src/Polly/IAsyncPolicy.cs index a6eb4cfb11c..0b834da1301 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 { diff --git a/src/Polly/ISyncPolicy.TResult.cs b/src/Polly/ISyncPolicy.TResult.cs index e4ce97d272f..7dacc6be707 100644 --- a/src/Polly/ISyncPolicy.TResult.cs +++ b/src/Polly/ISyncPolicy.TResult.cs @@ -26,9 +26,7 @@ public interface ISyncPolicy : IsPolicy /// The action to perform. /// Arbitrary data that is passed to the exception policy. /// Thrown when is . - /// - /// The value returned by the action - /// + /// The value returned by the action. /// Thrown when is . TResult Execute(Func action, IDictionary contextData); @@ -38,9 +36,7 @@ public interface ISyncPolicy : IsPolicy /// The action to perform. /// Context data that is passed to the exception policy. /// Thrown when is . - /// - /// The value returned by the action - /// + /// The value returned by the action. /// Thrown when is . TResult Execute(Func action, Context context); @@ -72,7 +68,7 @@ public interface ISyncPolicy : IsPolicy 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. @@ -97,7 +93,7 @@ public interface ISyncPolicy : IsPolicy 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. diff --git a/src/Polly/ISyncPolicy.cs b/src/Polly/ISyncPolicy.cs index a69bbd733e4..1642050dd03 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 { @@ -71,9 +71,7 @@ public interface ISyncPolicy : IsPolicy /// The action to perform. /// Arbitrary data that is passed to the exception policy. /// Thrown when is . - /// - /// The value returned by the action - /// + /// The value returned by the action. /// Thrown when is . TResult Execute(Func action, IDictionary contextData); @@ -84,9 +82,7 @@ public interface ISyncPolicy : IsPolicy /// The action to perform. /// Context data that is passed to the exception policy. /// Thrown when is . - /// - /// The value returned by the action - /// + /// The value returned by the action. /// Thrown when is . TResult Execute(Func action, Context context); @@ -121,7 +117,7 @@ public interface ISyncPolicy : IsPolicy 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. @@ -145,7 +141,7 @@ public interface ISyncPolicy : IsPolicy 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. @@ -163,7 +159,7 @@ public interface ISyncPolicy : IsPolicy 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. @@ -172,7 +168,7 @@ public interface ISyncPolicy : IsPolicy 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. @@ -197,7 +193,7 @@ public interface ISyncPolicy : IsPolicy 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. diff --git a/src/Polly/Policy.ExecuteOverloads.cs b/src/Polly/Policy.ExecuteOverloads.cs index 280b6d1679a..6682cddd242 100644 --- a/src/Polly/Policy.ExecuteOverloads.cs +++ b/src/Polly/Policy.ExecuteOverloads.cs @@ -31,7 +31,7 @@ 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. /// /// /// @@ -93,9 +93,7 @@ public TResult Execute(Func action) => /// The action to perform. /// Arbitrary data that is passed to the exception policy. /// Thrown when is . - /// - /// The value returned by the action - /// + /// The value returned by the action. /// Thrown when is . [DebuggerStepThrough] public TResult Execute(Func action, IDictionary contextData) => @@ -108,9 +106,7 @@ public TResult Execute(Func action, IDictionaryThe action to perform. /// Context data that is passed to the exception policy. /// Thrown when is . - /// - /// The value returned by the action - /// + /// The value returned by the action. /// Thrown when is . [DebuggerStepThrough] public TResult Execute(Func action, Context context) => @@ -173,7 +169,7 @@ 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. @@ -203,7 +199,7 @@ 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. @@ -225,7 +221,7 @@ public PolicyResult ExecuteAndCapture(Action action, 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. @@ -251,7 +247,7 @@ 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. @@ -282,7 +278,7 @@ public PolicyResult ExecuteAndCapture(Func a 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. diff --git a/src/Polly/Policy.TResult.ExecuteOverloads.cs b/src/Polly/Policy.TResult.ExecuteOverloads.cs index 8a91caaffc4..eeccba00a3f 100644 --- a/src/Polly/Policy.TResult.ExecuteOverloads.cs +++ b/src/Polly/Policy.TResult.ExecuteOverloads.cs @@ -19,9 +19,7 @@ public TResult Execute(Func action) => /// The action to perform. /// Arbitrary data that is passed to the exception policy. /// Thrown when is . - /// - /// The value returned by the action - /// + /// The value returned by the action. /// Thrown when is . [DebuggerStepThrough] public TResult Execute(Func action, IDictionary contextData) => @@ -33,9 +31,7 @@ public TResult Execute(Func action, IDictionaryThe action to perform. /// Context data that is passed to the exception policy. /// Thrown when is . - /// - /// The value returned by the action - /// + /// The value returned by the action. /// Thrown when is . [DebuggerStepThrough] public TResult Execute(Func action, Context context) => @@ -93,7 +89,7 @@ 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. @@ -124,7 +120,7 @@ public PolicyResult ExecuteAndCapture(Func action, Co 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. diff --git a/src/Polly/Retry/AsyncRetrySyntax.cs b/src/Polly/Retry/AsyncRetrySyntax.cs index c9481e2cf78..9f0b36dfc8d 100644 --- a/src/Polly/Retry/AsyncRetrySyntax.cs +++ b/src/Polly/Retry/AsyncRetrySyntax.cs @@ -775,7 +775,7 @@ 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. @@ -814,7 +814,7 @@ 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. @@ -838,7 +838,7 @@ 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. @@ -862,7 +862,7 @@ 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. @@ -886,7 +886,7 @@ 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. diff --git a/src/Polly/Retry/AsyncRetryTResultSyntax.cs b/src/Polly/Retry/AsyncRetryTResultSyntax.cs index dc7edcefd40..ebb08b1cddc 100644 --- a/src/Polly/Retry/AsyncRetryTResultSyntax.cs +++ b/src/Polly/Retry/AsyncRetryTResultSyntax.cs @@ -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. diff --git a/src/Polly/Retry/RetrySyntax.cs b/src/Polly/Retry/RetrySyntax.cs index fb94c992e1a..c4dd558437a 100644 --- a/src/Polly/Retry/RetrySyntax.cs +++ b/src/Polly/Retry/RetrySyntax.cs @@ -435,7 +435,7 @@ 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. @@ -474,7 +474,7 @@ 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. @@ -498,7 +498,7 @@ 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. diff --git a/src/Polly/Retry/RetryTResultSyntax.cs b/src/Polly/Retry/RetryTResultSyntax.cs index 566b0e02872..c04d9dde0ff 100644 --- a/src/Polly/Retry/RetryTResultSyntax.cs +++ b/src/Polly/Retry/RetryTResultSyntax.cs @@ -471,7 +471,7 @@ 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. @@ -490,7 +490,7 @@ 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. @@ -510,7 +510,7 @@ 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. @@ -534,7 +534,7 @@ 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. diff --git a/src/Polly/Timeout/AsyncTimeoutSyntax.cs b/src/Polly/Timeout/AsyncTimeoutSyntax.cs index 1215e50d408..c268414569c 100644 --- a/src/Polly/Timeout/AsyncTimeoutSyntax.cs +++ b/src/Polly/Timeout/AsyncTimeoutSyntax.cs @@ -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,7 +140,7 @@ 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) + /// 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) { @@ -173,7 +173,7 @@ 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) + /// 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) { diff --git a/src/Polly/Timeout/AsyncTimeoutTResultSyntax.cs b/src/Polly/Timeout/AsyncTimeoutTResultSyntax.cs index 8380805d327..461dfce33f0 100644 --- a/src/Polly/Timeout/AsyncTimeoutTResultSyntax.cs +++ b/src/Polly/Timeout/AsyncTimeoutTResultSyntax.cs @@ -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,7 +135,7 @@ 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) + /// 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) { @@ -173,7 +173,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 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). /// Thrown when is . public static AsyncTimeoutPolicy TimeoutAsync(TimeSpan timeout, TimeoutStrategy timeoutStrategy, Func onTimeoutAsync) { diff --git a/src/Polly/Timeout/TimeoutSyntax.cs b/src/Polly/Timeout/TimeoutSyntax.cs index 47c5d837671..e5e84ad9033 100644 --- a/src/Polly/Timeout/TimeoutSyntax.cs +++ b/src/Polly/Timeout/TimeoutSyntax.cs @@ -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,7 +135,7 @@ 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) + /// 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) { @@ -168,7 +168,7 @@ 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) + /// 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) { diff --git a/src/Polly/Timeout/TimeoutTResultSyntax.cs b/src/Polly/Timeout/TimeoutTResultSyntax.cs index da4339dd6d6..3ab38addce5 100644 --- a/src/Polly/Timeout/TimeoutTResultSyntax.cs +++ b/src/Polly/Timeout/TimeoutTResultSyntax.cs @@ -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,7 +139,7 @@ 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) + /// 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) { @@ -171,7 +171,7 @@ 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) + /// 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) { From 9d6de3fb7f74c80bd582c512366bb2da7b912755 Mon Sep 17 00:00:00 2001 From: gintsk <3540004+gintsk@users.noreply.github.com> Date: Sun, 3 Mar 2024 17:48:12 +0200 Subject: [PATCH 10/13] Fix SA1614 "Element parameter documentation should have text" --- src/Polly/Policy.ExecuteOverloads.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Polly/Policy.ExecuteOverloads.cs b/src/Polly/Policy.ExecuteOverloads.cs index 6682cddd242..f5af038c141 100644 --- a/src/Polly/Policy.ExecuteOverloads.cs +++ b/src/Polly/Policy.ExecuteOverloads.cs @@ -33,8 +33,8 @@ public void Execute(Action action, Context context) => /// /// 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); From a68b4aa8502e4c114e28443ef3f9ed1ceba19a81 Mon Sep 17 00:00:00 2001 From: gintsk <3540004+gintsk@users.noreply.github.com> Date: Sun, 3 Mar 2024 17:53:39 +0200 Subject: [PATCH 11/13] Fix SA1629 in param and returns tags Fix SA1611 "The documentation for parameter 'key' is missing" --- src/Polly/Registry/IReadOnlyPolicyRegistry.cs | 5 +++-- src/Polly/Registry/PolicyRegistry.cs | 16 ++++++++-------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/Polly/Registry/IReadOnlyPolicyRegistry.cs b/src/Polly/Registry/IReadOnlyPolicyRegistry.cs index c27e92640e5..5ef42d3dc8a 100644 --- a/src/Polly/Registry/IReadOnlyPolicyRegistry.cs +++ b/src/Polly/Registry/IReadOnlyPolicyRegistry.cs @@ -19,6 +19,7 @@ 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. /// Thrown when is . @@ -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 + /// 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 2f2413515c3..022f2025c8a 100644 --- a/src/Polly/Registry/PolicyRegistry.cs +++ b/src/Polly/Registry/PolicyRegistry.cs @@ -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) From a50ef2be2ef247c8c04fa5eb8a17adbfe5ab5f1b Mon Sep 17 00:00:00 2001 From: gintsk <3540004+gintsk@users.noreply.github.com> Date: Sun, 3 Mar 2024 21:37:49 +0200 Subject: [PATCH 12/13] Fix more SA1629; fixed some incorrect and added missing param comments --- src/Polly/AsyncPolicy.ExecuteOverloads.cs | 2 +- src/Polly/AsyncPolicy.TResult.cs | 2 +- src/Polly/AsyncPolicy.cs | 2 +- src/Polly/DelegateResult.cs | 6 +- src/Polly/IAsyncPolicy.Extensions.cs | 2 +- src/Polly/IAsyncPolicy.TResult.cs | 2 +- src/Polly/IAsyncPolicy.cs | 5 +- src/Polly/ISyncPolicy.Extensions.cs | 2 +- src/Polly/IsPolicy.cs | 2 +- src/Polly/Policy.HandleSyntax.cs | 2 + src/Polly/Policy.TResult.cs | 2 +- src/Polly/Policy.cs | 2 +- src/Polly/PolicyResult.cs | 62 +++++++++---------- .../Registry/IConcurrentPolicyRegistry.cs | 26 ++++---- src/Polly/Utilities/ExceptionExtensions.cs | 2 +- src/Polly/Utilities/SystemClock.cs | 8 +-- 16 files changed, 66 insertions(+), 63 deletions(-) diff --git a/src/Polly/AsyncPolicy.ExecuteOverloads.cs b/src/Polly/AsyncPolicy.ExecuteOverloads.cs index ea8e434958d..ff7956dd098 100644 --- a/src/Polly/AsyncPolicy.ExecuteOverloads.cs +++ b/src/Polly/AsyncPolicy.ExecuteOverloads.cs @@ -409,7 +409,7 @@ 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. [DebuggerStepThrough] 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/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/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 72e7ce5aec6..305c66dcff2 100644 --- a/src/Polly/IAsyncPolicy.TResult.cs +++ b/src/Polly/IAsyncPolicy.TResult.cs @@ -140,7 +140,7 @@ public interface IAsyncPolicy : IsPolicy /// 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. Task> ExecuteAndCaptureAsync(Func> action, Context context, CancellationToken cancellationToken); diff --git a/src/Polly/IAsyncPolicy.cs b/src/Polly/IAsyncPolicy.cs index 0b834da1301..3878d0299cb 100644 --- a/src/Polly/IAsyncPolicy.cs +++ b/src/Polly/IAsyncPolicy.cs @@ -67,7 +67,8 @@ 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. /// Thrown when is . @@ -301,7 +302,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. + /// 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. Task> ExecuteAndCaptureAsync(Func> action, Context context, CancellationToken cancellationToken); 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/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.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.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/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); From e18de1a665623c5619945e75a8ee2cc1bd7b51a3 Mon Sep 17 00:00:00 2001 From: gintsk <3540004+gintsk@users.noreply.github.com> Date: Mon, 4 Mar 2024 22:11:52 +0200 Subject: [PATCH 13/13] PR comments (fix tag order, parameter name, remove duplicates) --- src/Polly/AsyncPolicy.ExecuteOverloads.cs | 10 +++++----- src/Polly/AsyncPolicy.TResult.ExecuteOverloads.cs | 4 ++-- src/Polly/ISyncPolicy.TResult.cs | 8 +++----- src/Polly/ISyncPolicy.cs | 10 ++++------ src/Polly/Policy.ExecuteOverloads.cs | 10 ++++------ src/Polly/Policy.TResult.ExecuteOverloads.cs | 8 +++----- 6 files changed, 21 insertions(+), 29 deletions(-) diff --git a/src/Polly/AsyncPolicy.ExecuteOverloads.cs b/src/Polly/AsyncPolicy.ExecuteOverloads.cs index ff7956dd098..2bb15cd021a 100644 --- a/src/Polly/AsyncPolicy.ExecuteOverloads.cs +++ b/src/Polly/AsyncPolicy.ExecuteOverloads.cs @@ -249,8 +249,8 @@ public Task ExecuteAndCaptureAsync(Func action) => /// /// The action to perform. /// Arbitrary data that is passed to the exception policy. - /// Thrown when is . /// The captured result. + /// Thrown when is . [DebuggerStepThrough] public Task ExecuteAndCaptureAsync(Func action, IDictionary contextData) => ExecuteAndCaptureAsync((ctx, _) => action(ctx), new Context(contextData), 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. - /// Thrown when is . /// 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. - /// Thrown when is . /// 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); @@ -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. - /// Thrown when is . /// The captured result. + /// Thrown when is . [DebuggerStepThrough] public Task> ExecuteAndCaptureAsync(Func> action, IDictionary contextData) => ExecuteAndCaptureAsync((ctx, _) => action(ctx), new Context(contextData), DefaultCancellationToken, 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. - /// Thrown when is . /// The captured result. + /// Thrown when is . [DebuggerStepThrough] public Task> ExecuteAndCaptureAsync(Func> action, IDictionary contextData, CancellationToken cancellationToken) => ExecuteAndCaptureAsync(action, new Context(contextData), cancellationToken, DefaultContinueOnCapturedContext); diff --git a/src/Polly/AsyncPolicy.TResult.ExecuteOverloads.cs b/src/Polly/AsyncPolicy.TResult.ExecuteOverloads.cs index 5b3020deba5..8941c58fa76 100644 --- a/src/Polly/AsyncPolicy.TResult.ExecuteOverloads.cs +++ b/src/Polly/AsyncPolicy.TResult.ExecuteOverloads.cs @@ -135,8 +135,8 @@ public Task> ExecuteAndCaptureAsync(Func> ac /// /// The action to perform. /// Arbitrary data that is passed to the exception policy. - /// Thrown when is . /// The captured result. + /// Thrown when is . [DebuggerStepThrough] public Task> ExecuteAndCaptureAsync(Func> action, IDictionary contextData) => ExecuteAndCaptureAsync((ctx, _) => action(ctx), new Context(contextData), CancellationToken.None, DefaultContinueOnCapturedContext); @@ -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. - /// Thrown when is . /// The captured result. + /// Thrown when is . [DebuggerStepThrough] public Task> ExecuteAndCaptureAsync(Func> action, IDictionary contextData, CancellationToken cancellationToken) => ExecuteAndCaptureAsync(action, new Context(contextData), cancellationToken, DefaultContinueOnCapturedContext); diff --git a/src/Polly/ISyncPolicy.TResult.cs b/src/Polly/ISyncPolicy.TResult.cs index 7dacc6be707..7d7edc14f41 100644 --- a/src/Polly/ISyncPolicy.TResult.cs +++ b/src/Polly/ISyncPolicy.TResult.cs @@ -25,7 +25,6 @@ public interface ISyncPolicy : IsPolicy /// /// The action to perform. /// Arbitrary data that is passed to the exception policy. - /// Thrown when is . /// The value returned by the action. /// Thrown when is . TResult Execute(Func action, IDictionary contextData); @@ -35,9 +34,8 @@ public interface ISyncPolicy : IsPolicy /// /// The action to perform. /// Context data that is passed to the exception policy. - /// Thrown when is . /// The value returned by the action. - /// Thrown when is . + /// Thrown when is . TResult Execute(Func action, Context context); /// @@ -79,8 +77,8 @@ public interface ISyncPolicy : IsPolicy /// /// The action to perform. /// Arbitrary data that is passed to the exception policy. - /// Thrown when is . /// The captured result. + /// Thrown when is . PolicyResult ExecuteAndCapture(Func action, IDictionary contextData); /// @@ -88,8 +86,8 @@ public interface ISyncPolicy : IsPolicy /// /// The action to perform. /// Context data that is passed to the exception policy. - /// Thrown when is . /// The captured result. + /// Thrown when is . PolicyResult ExecuteAndCapture(Func action, Context context); /// diff --git a/src/Polly/ISyncPolicy.cs b/src/Polly/ISyncPolicy.cs index 1642050dd03..3fddc2d7902 100644 --- a/src/Polly/ISyncPolicy.cs +++ b/src/Polly/ISyncPolicy.cs @@ -70,7 +70,6 @@ public interface ISyncPolicy : IsPolicy /// The type of the result. /// The action to perform. /// Arbitrary data that is passed to the exception policy. - /// Thrown when is . /// The value returned by the action. /// Thrown when is . TResult Execute(Func action, IDictionary contextData); @@ -81,9 +80,8 @@ public interface ISyncPolicy : IsPolicy /// The type of the result. /// The action to perform. /// Context data that is passed to the exception policy. - /// Thrown when is . /// The value returned by the action. - /// Thrown when is . + /// Thrown when is . TResult Execute(Func action, Context context); /// @@ -128,8 +126,8 @@ public interface ISyncPolicy : IsPolicy /// /// The action to perform. /// Arbitrary data that is passed to the exception policy. - /// Thrown when is . /// The captured result. + /// Thrown when is . PolicyResult ExecuteAndCapture(Action action, IDictionary contextData); /// @@ -179,8 +177,8 @@ public interface ISyncPolicy : IsPolicy /// /// The action to perform. /// Arbitrary data that is passed to the exception policy. - /// Thrown when is . /// The captured result. + /// Thrown when is . PolicyResult ExecuteAndCapture(Func action, IDictionary contextData); /// @@ -188,8 +186,8 @@ public interface ISyncPolicy : IsPolicy /// /// The action to perform. /// Context data that is passed to the exception policy. - /// Thrown when is . /// The captured result. + /// Thrown when is . PolicyResult ExecuteAndCapture(Func action, Context context); /// diff --git a/src/Polly/Policy.ExecuteOverloads.cs b/src/Polly/Policy.ExecuteOverloads.cs index f5af038c141..5576b7399b1 100644 --- a/src/Polly/Policy.ExecuteOverloads.cs +++ b/src/Polly/Policy.ExecuteOverloads.cs @@ -92,7 +92,6 @@ public TResult Execute(Func action) => /// The type of the result. /// The action to perform. /// Arbitrary data that is passed to the exception policy. - /// Thrown when is . /// The value returned by the action. /// Thrown when is . [DebuggerStepThrough] @@ -105,9 +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. - /// Thrown when is . /// The value returned by the action. - /// Thrown when is . + /// Thrown when is . [DebuggerStepThrough] public TResult Execute(Func action, Context context) => Execute((ctx, _) => action(ctx), context, DefaultCancellationToken); @@ -182,8 +180,8 @@ public PolicyResult ExecuteAndCapture(Action action) => /// /// The action to perform. /// Arbitrary data that is passed to the exception policy. - /// Thrown when is . /// The captured result. + /// Thrown when is . [DebuggerStepThrough] public PolicyResult ExecuteAndCapture(Action action, IDictionary contextData) => ExecuteAndCapture((ctx, _) => action(ctx), new Context(contextData), DefaultCancellationToken); @@ -260,8 +258,8 @@ public PolicyResult ExecuteAndCapture(Func action) => /// /// The action to perform. /// Arbitrary data that is passed to the exception policy. - /// Thrown when is . /// The captured result. + /// Thrown when is . [DebuggerStepThrough] public PolicyResult ExecuteAndCapture(Func action, IDictionary contextData) => ExecuteAndCapture((ctx, _) => action(ctx), new Context(contextData), DefaultCancellationToken); @@ -271,8 +269,8 @@ public PolicyResult ExecuteAndCapture(Func a /// /// The action to perform. /// Context data that is passed to the exception policy. - /// Thrown when is . /// The captured result. + /// Thrown when is . [DebuggerStepThrough] public PolicyResult ExecuteAndCapture(Func action, Context context) => ExecuteAndCapture((ctx, _) => action(ctx), context, DefaultCancellationToken); diff --git a/src/Polly/Policy.TResult.ExecuteOverloads.cs b/src/Polly/Policy.TResult.ExecuteOverloads.cs index eeccba00a3f..1aaa40a0cb0 100644 --- a/src/Polly/Policy.TResult.ExecuteOverloads.cs +++ b/src/Polly/Policy.TResult.ExecuteOverloads.cs @@ -18,7 +18,6 @@ public TResult Execute(Func action) => /// /// The action to perform. /// Arbitrary data that is passed to the exception policy. - /// Thrown when is . /// The value returned by the action. /// Thrown when is . [DebuggerStepThrough] @@ -30,9 +29,8 @@ public TResult Execute(Func action, IDictionary /// The action to perform. /// Context data that is passed to the exception policy. - /// Thrown when is . /// The value returned by the action. - /// Thrown when is . + /// Thrown when is . [DebuggerStepThrough] public TResult Execute(Func action, Context context) => Execute((ctx, _) => action(ctx), context, DefaultCancellationToken); @@ -102,8 +100,8 @@ public PolicyResult ExecuteAndCapture(Func action) => /// /// The action to perform. /// Arbitrary data that is passed to the exception policy. - /// Thrown when is . /// The captured result. + /// Thrown when is . [DebuggerStepThrough] public PolicyResult ExecuteAndCapture(Func action, IDictionary contextData) => ExecuteAndCapture((ctx, _) => action(ctx), new Context(contextData), DefaultCancellationToken); @@ -113,8 +111,8 @@ public PolicyResult ExecuteAndCapture(Func action, ID /// /// The action to perform. /// Context data that is passed to the exception policy. - /// Thrown when is . /// The captured result. + /// Thrown when is . [DebuggerStepThrough] public PolicyResult ExecuteAndCapture(Func action, Context context) => ExecuteAndCapture((ctx, _) => action(ctx), context, DefaultCancellationToken);