From 84518b81c6db70612dee12897b7e13d775f72216 Mon Sep 17 00:00:00 2001 From: iamdmitrij <3024338+iamdmitrij@users.noreply.github.com> Date: Thu, 25 Apr 2024 23:33:40 +0300 Subject: [PATCH 1/2] Fix SA1618 by documenting typeparams https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1618.md --- src/Polly/AsyncPolicy.ExecuteOverloads.cs | 3 + .../Bulkhead/AsyncBulkheadTResultSyntax.cs | 4 + src/Polly/Bulkhead/BulkheadPolicy.cs | 1 + src/Polly/Bulkhead/BulkheadTResultSyntax.cs | 4 + src/Polly/Bulkhead/IBulkheadPolicy.cs | 1 + src/Polly/Caching/AsyncCacheTResultSyntax.cs | 30 +++++++ src/Polly/Caching/CachePolicy.cs | 1 + src/Polly/Caching/CacheTResultSyntax.cs | 30 +++++++ src/Polly/Caching/IAsyncCacheProvider.cs | 1 + src/Polly/Caching/ICachePolicy.cs | 1 + src/Polly/Caching/ISyncCacheProvider.cs | 1 + src/Polly/Caching/ITtlStrategy.cs | 1 + .../AdvancedCircuitBreakerTResultSyntax.cs | 4 + ...syncAdvancedCircuitBreakerTResultSyntax.cs | 6 ++ .../AsyncCircuitBreakerTResultSyntax.cs | 6 ++ .../CircuitBreaker/CircuitBreakerPolicy.cs | 1 + .../CircuitBreakerTResultSyntax.cs | 6 ++ .../CircuitBreaker/ICircuitBreakerPolicy.cs | 1 + src/Polly/DelegateResult.cs | 1 + src/Polly/Fallback/AsyncFallbackSyntax.cs | 7 ++ src/Polly/Fallback/FallbackPolicy.cs | 1 + src/Polly/Fallback/FallbackSyntax.cs | 10 +++ src/Polly/Fallback/IFallbackPolicy.cs | 1 + src/Polly/IAsyncPolicy.Extensions.cs | 1 + src/Polly/IAsyncPolicy.cs | 3 + src/Polly/ISyncPolicy.Extensions.cs | 1 + src/Polly/ISyncPolicy.cs | 4 + src/Polly/NoOp/AsyncNoOpPolicy.cs | 1 + src/Polly/NoOp/INoOpPolicy.cs | 1 + src/Polly/Policy.ExecuteOverloads.cs | 4 + src/Polly/PolicyBase.cs | 1 + src/Polly/PolicyResult.cs | 1 + src/Polly/Polly.csproj | 2 +- src/Polly/RateLimit/AsyncRateLimitPolicy.cs | 1 + src/Polly/RateLimit/IRateLimitPolicy.cs | 1 + src/Polly/RateLimit/RateLimitPolicy.cs | 1 + .../Registry/IConcurrentPolicyRegistry.cs | 4 + src/Polly/Registry/PolicyRegistry.cs | 4 + .../ResiliencePipelineConversionExtensions.cs | 2 + src/Polly/ResultPredicates.cs | 1 + src/Polly/Retry/AsyncRetryPolicy.cs | 1 + src/Polly/Retry/AsyncRetrySyntax.cs | 28 +++---- src/Polly/Retry/AsyncRetryTResultSyntax.cs | 78 +++++++++++++++---- src/Polly/Retry/IRetryPolicy.cs | 1 + src/Polly/Retry/RetryPolicy.cs | 1 + src/Polly/Retry/RetrySyntax.cs | 20 ++--- src/Polly/Retry/RetryTResultSyntax.cs | 57 +++++++++++--- .../Timeout/AsyncTimeoutTResultSyntax.cs | 24 ++++++ src/Polly/Timeout/ITimeoutPolicy.cs | 1 + src/Polly/Timeout/TimeoutPolicy.cs | 1 + src/Polly/Timeout/TimeoutTResultSyntax.cs | 11 +++ src/Polly/Wrap/AsyncPolicyWrapSyntax.cs | 3 + src/Polly/Wrap/IPolicyWrap.cs | 1 + src/Polly/Wrap/PolicyWrapSyntax.cs | 3 + 54 files changed, 334 insertions(+), 51 deletions(-) diff --git a/src/Polly/AsyncPolicy.ExecuteOverloads.cs b/src/Polly/AsyncPolicy.ExecuteOverloads.cs index 744a3dfb869..661cfadf64b 100644 --- a/src/Polly/AsyncPolicy.ExecuteOverloads.cs +++ b/src/Polly/AsyncPolicy.ExecuteOverloads.cs @@ -123,6 +123,7 @@ public Task ExecuteAsync(Func> action) => /// /// Executes the specified asynchronous action within the policy and returns the result. /// + /// The type of the result. /// The action to perform. /// Arbitrary data that is passed to the exception policy. /// The value returned by the action. @@ -155,6 +156,7 @@ public Task ExecuteAsync(Func /// /// Executes the specified asynchronous action within the policy and returns the result. /// + /// The type of the result. /// 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. @@ -191,6 +193,7 @@ public Task ExecuteAsync(Func /// /// Executes the specified asynchronous action within the policy and returns the result. /// + /// The type of the result. /// 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. diff --git a/src/Polly/Bulkhead/AsyncBulkheadTResultSyntax.cs b/src/Polly/Bulkhead/AsyncBulkheadTResultSyntax.cs index b31a35104fb..ee3f43ccfb3 100644 --- a/src/Polly/Bulkhead/AsyncBulkheadTResultSyntax.cs +++ b/src/Polly/Bulkhead/AsyncBulkheadTResultSyntax.cs @@ -7,6 +7,7 @@ public partial class Policy /// Builds a bulkhead isolation , which limits the maximum concurrency of actions executed through the policy. Imposing a maximum concurrency limits the potential of governed actions, when faulting, to bring down the system. /// When an execution would cause the number of actions executing concurrently through the policy to exceed , the action is not executed and a is thrown. /// + /// The type of the result. /// The maximum number of concurrent actions that may be executing through the policy. /// The policy instance. public static AsyncBulkheadPolicy BulkheadAsync(int maxParallelization) @@ -19,6 +20,7 @@ public static AsyncBulkheadPolicy BulkheadAsync(int maxParalle /// Builds a bulkhead isolation , which limits the maximum concurrency of actions executed through the policy. Imposing a maximum concurrency limits the potential of governed actions, when faulting, to bring down the system. /// When an execution would cause the number of actions executing concurrently through the policy to exceed , the action is not executed and a is thrown. /// + /// The type of the result. /// 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. @@ -31,6 +33,7 @@ public static AsyncBulkheadPolicy BulkheadAsync(int maxParalle /// Builds a bulkhead isolation , which limits the maximum concurrency of actions executed through the policy. Imposing a maximum concurrency limits the potential of governed actions, when faulting, to bring down the system. /// When an execution would cause the number of actions executing concurrently through the policy to exceed , the policy allows a further executions to queue, waiting for a concurrent execution slot. When an execution would cause the number of queuing actions to exceed , a is thrown. /// + /// The type of the result. /// The maximum number of concurrent actions that may be executing through the policy. /// The maximum number of actions that may be queuing, waiting for an execution slot. /// The policy instance. @@ -46,6 +49,7 @@ public static AsyncBulkheadPolicy BulkheadAsync(int maxParalle /// Builds a bulkhead isolation , which limits the maximum concurrency of actions executed through the policy. Imposing a maximum concurrency limits the potential of governed actions, when faulting, to bring down the system. /// When an execution would cause the number of actions executing concurrently through the policy to exceed , the policy allows a further executions to queue, waiting for a concurrent execution slot. When an execution would cause the number of queuing actions to exceed , a is thrown. /// + /// The type of the result. /// The maximum number of concurrent actions that may be executing through the policy. /// The maximum number of actions that may be queuing, waiting for an execution slot. /// An action to call asynchronously, if the bulkhead rejects execution due to oversubscription. diff --git a/src/Polly/Bulkhead/BulkheadPolicy.cs b/src/Polly/Bulkhead/BulkheadPolicy.cs index 35c3dd0963b..9d769025267 100644 --- a/src/Polly/Bulkhead/BulkheadPolicy.cs +++ b/src/Polly/Bulkhead/BulkheadPolicy.cs @@ -51,6 +51,7 @@ public void Dispose() /// /// A bulkhead-isolation policy which can be applied to delegates returning a value of type . /// +/// The type of the result. public class BulkheadPolicy : Policy, IBulkheadPolicy { private readonly SemaphoreSlim _maxParallelizationSemaphore; diff --git a/src/Polly/Bulkhead/BulkheadTResultSyntax.cs b/src/Polly/Bulkhead/BulkheadTResultSyntax.cs index d5918091faf..19f7efe267c 100644 --- a/src/Polly/Bulkhead/BulkheadTResultSyntax.cs +++ b/src/Polly/Bulkhead/BulkheadTResultSyntax.cs @@ -7,6 +7,7 @@ public partial class Policy /// Builds a bulkhead isolation , which limits the maximum concurrency of actions executed through the policy. Imposing a maximum concurrency limits the potential of governed actions, when faulting, to bring down the system. /// When an execution would cause the number of actions executing concurrently through the policy to exceed , the action is not executed and a is thrown. /// + /// The type of the result. /// The maximum number of concurrent actions that may be executing through the policy. /// maxParallelization;Value must be greater than zero. /// The policy instance. @@ -20,6 +21,7 @@ public static BulkheadPolicy Bulkhead(int maxParallelization) /// Builds a bulkhead isolation , which limits the maximum concurrency of actions executed through the policy. Imposing a maximum concurrency limits the potential of governed actions, when faulting, to bring down the system. /// When an execution would cause the number of actions executing concurrently through the policy to exceed , the action is not executed and a is thrown. /// + /// The type of the result. /// 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. @@ -32,6 +34,7 @@ public static BulkheadPolicy Bulkhead(int maxParallelization, /// Builds a bulkhead isolation , which limits the maximum concurrency of actions executed through the policy. Imposing a maximum concurrency limits the potential of governed actions, when faulting, to bring down the system. /// When an execution would cause the number of actions executing concurrently through the policy to exceed , the policy allows a further executions to queue, waiting for a concurrent execution slot. When an execution would cause the number of queuing actions to exceed , a is thrown. /// + /// The type of the result. /// The maximum number of concurrent actions that may be executing through the policy. /// The maximum number of actions that may be queuing, waiting for an execution slot. /// The policy instance. @@ -47,6 +50,7 @@ public static BulkheadPolicy Bulkhead(int maxParallelization, /// Builds a bulkhead isolation , which limits the maximum concurrency of actions executed through the policy. Imposing a maximum concurrency limits the potential of governed actions, when faulting, to bring down the system. /// When an execution would cause the number of actions executing concurrently through the policy to exceed , the policy allows a further executions to queue, waiting for a concurrent execution slot. When an execution would cause the number of queuing actions to exceed , a is thrown. /// + /// The type of the result. /// The maximum number of concurrent actions that may be executing through the policy. /// The maximum number of actions that may be queuing, waiting for an execution slot. /// An action to call, if the bulkhead rejects execution due to oversubscription. diff --git a/src/Polly/Bulkhead/IBulkheadPolicy.cs b/src/Polly/Bulkhead/IBulkheadPolicy.cs index c2a8996c21f..127896b2aae 100644 --- a/src/Polly/Bulkhead/IBulkheadPolicy.cs +++ b/src/Polly/Bulkhead/IBulkheadPolicy.cs @@ -20,6 +20,7 @@ public interface IBulkheadPolicy : IsPolicy, IDisposable /// /// Defines properties and methods common to all bulkhead policies generic-typed for executions returning results of type . /// +/// The type of the result. public interface IBulkheadPolicy : IBulkheadPolicy { } diff --git a/src/Polly/Caching/AsyncCacheTResultSyntax.cs b/src/Polly/Caching/AsyncCacheTResultSyntax.cs index 91d43c9bbc7..3a4daa6d419 100644 --- a/src/Polly/Caching/AsyncCacheTResultSyntax.cs +++ b/src/Polly/Caching/AsyncCacheTResultSyntax.cs @@ -9,6 +9,7 @@ public partial class Policy /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// 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. @@ -28,6 +29,7 @@ public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// 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. @@ -48,6 +50,7 @@ public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// Duration (ttl) for which to cache values. /// The cache key strategy. @@ -69,6 +72,7 @@ public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// A strategy for specifying ttl for values to be cached. /// The cache key strategy. @@ -91,6 +95,7 @@ public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// Duration (ttl) for which to cache values. /// The cache key strategy. @@ -112,6 +117,7 @@ public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// A strategy for specifying ttl for values to be cached. /// The cache key strategy. @@ -134,6 +140,7 @@ public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// Duration (ttl) for which to cache values. /// Delegate to call on a cache hit, when value is returned from cache. @@ -167,6 +174,7 @@ public static AsyncCachePolicy CacheAsync( /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// A strategy for specifying ttl for values to be cached. /// Delegate to call on a cache hit, when value is returned from cache. @@ -201,6 +209,7 @@ public static AsyncCachePolicy CacheAsync( /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// Duration (ttl) for which to cache values. /// The cache key strategy. @@ -237,6 +246,7 @@ public static AsyncCachePolicy CacheAsync( /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// A strategy for specifying ttl for values to be cached. /// The cache key strategy. @@ -274,6 +284,7 @@ public static AsyncCachePolicy CacheAsync( /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// Duration (ttl) for which to cache values. /// The cache key strategy. @@ -310,6 +321,7 @@ public static AsyncCachePolicy CacheAsync( /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// A strategy for specifying ttl for values to be cached. /// The cache key strategy. @@ -347,6 +359,7 @@ public static AsyncCachePolicy CacheAsync( /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// 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. @@ -361,6 +374,7 @@ public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider< /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// 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. @@ -376,6 +390,7 @@ public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider< /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// 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. @@ -391,6 +406,7 @@ public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider< /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// Duration (ttl) for which to cache values. /// The cache key strategy. @@ -407,6 +423,7 @@ public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider< /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// A strategy for specifying ttl for values to be cached. /// The cache key strategy. @@ -428,6 +445,7 @@ public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider< /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// A strategy for specifying ttl for values to be cached. /// The cache key strategy. @@ -449,6 +467,7 @@ public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider< /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// Duration (ttl) for which to cache values. /// The cache key strategy. @@ -465,6 +484,7 @@ public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider< /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// A strategy for specifying ttl for values to be cached. /// The cache key strategy. @@ -486,6 +506,7 @@ public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider< /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// A strategy for specifying ttl for values to be cached. /// The cache key strategy. @@ -507,6 +528,7 @@ public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider< /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// Duration (ttl) for which to cache values. /// Delegate to call on a cache hit, when value is returned from cache. @@ -536,6 +558,7 @@ public static AsyncCachePolicy CacheAsync( /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// A strategy for specifying ttl for values to be cached. /// Delegate to call on a cache hit, when value is returned from cache. @@ -565,6 +588,7 @@ public static AsyncCachePolicy CacheAsync( /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// A strategy for specifying ttl for values to be cached. /// Delegate to call on a cache hit, when value is returned from cache. @@ -594,6 +618,7 @@ public static AsyncCachePolicy CacheAsync( /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// Duration (ttl) for which to cache values. /// The cache key strategy. @@ -626,6 +651,7 @@ public static AsyncCachePolicy CacheAsync( /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// A strategy for specifying ttl for values to be cached. /// The cache key strategy. @@ -658,6 +684,7 @@ public static AsyncCachePolicy CacheAsync( /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// A strategy for specifying ttl for values to be cached. /// The cache key strategy. @@ -690,6 +717,7 @@ public static AsyncCachePolicy CacheAsync( /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// Duration (ttl) for which to cache values. /// The cache key strategy. @@ -722,6 +750,7 @@ public static AsyncCachePolicy CacheAsync( /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// A strategy for specifying ttl for values to be cached. /// The cache key strategy. @@ -754,6 +783,7 @@ public static AsyncCachePolicy CacheAsync( /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// A strategy for specifying ttl for values to be cached. /// The cache key strategy. diff --git a/src/Polly/Caching/CachePolicy.cs b/src/Polly/Caching/CachePolicy.cs index da58c7bca24..efd576bc674 100644 --- a/src/Polly/Caching/CachePolicy.cs +++ b/src/Polly/Caching/CachePolicy.cs @@ -62,6 +62,7 @@ protected override TResult Implementation(Func /// A cache policy that can be applied to the results of delegate executions. /// +/// The type of the result. public class CachePolicy : Policy, ICachePolicy { private readonly Action _onCacheGet; diff --git a/src/Polly/Caching/CacheTResultSyntax.cs b/src/Polly/Caching/CacheTResultSyntax.cs index d96ec358335..4f7c6712267 100644 --- a/src/Polly/Caching/CacheTResultSyntax.cs +++ b/src/Polly/Caching/CacheTResultSyntax.cs @@ -9,6 +9,7 @@ public partial class Policy /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// 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. @@ -28,6 +29,7 @@ public static CachePolicy Cache(ISyncCacheProvider cacheProvid /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// 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. @@ -48,6 +50,7 @@ public static CachePolicy Cache(ISyncCacheProvider cacheProvid /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// Duration (ttl) for which to cache values. /// The cache key strategy. @@ -69,6 +72,7 @@ public static CachePolicy Cache(ISyncCacheProvider cacheProvid /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// A strategy for specifying ttl for values to be cached. /// The cache key strategy. @@ -91,6 +95,7 @@ public static CachePolicy Cache(ISyncCacheProvider cacheProvid /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// Duration (ttl) for which to cache values. /// The cache key strategy. @@ -112,6 +117,7 @@ public static CachePolicy Cache(ISyncCacheProvider cacheProvid /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// A strategy for specifying ttl for values to be cached. /// The cache key strategy. @@ -134,6 +140,7 @@ public static CachePolicy Cache(ISyncCacheProvider cacheProvid /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// Duration (ttl) for which to cache values. /// Delegate to call on a cache hit, when value is returned from cache. @@ -167,6 +174,7 @@ public static CachePolicy Cache( /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// A strategy for specifying ttl for values to be cached. /// Delegate to call on a cache hit, when value is returned from cache. @@ -201,6 +209,7 @@ public static CachePolicy Cache( /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// Duration (ttl) for which to cache values. /// The cache key strategy. @@ -237,6 +246,7 @@ public static CachePolicy Cache( /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// A strategy for specifying ttl for values to be cached. /// The cache key strategy. @@ -274,6 +284,7 @@ public static CachePolicy Cache( /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// Duration (ttl) for which to cache values. /// The cache key strategy. @@ -310,6 +321,7 @@ public static CachePolicy Cache( /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// A strategy for specifying ttl for values to be cached. /// The cache key strategy. @@ -347,6 +359,7 @@ public static CachePolicy Cache( /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// 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. @@ -361,6 +374,7 @@ public static CachePolicy Cache(ISyncCacheProvider ca /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// 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. @@ -376,6 +390,7 @@ public static CachePolicy Cache(ISyncCacheProvider ca /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// 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. @@ -391,6 +406,7 @@ public static CachePolicy Cache(ISyncCacheProvider ca /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// Duration (ttl) for which to cache values. /// The cache key strategy. @@ -407,6 +423,7 @@ public static CachePolicy Cache(ISyncCacheProvider ca /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// A strategy for specifying ttl for values to be cached. /// The cache key strategy. @@ -429,6 +446,7 @@ public static CachePolicy Cache(ISyncCacheProvider ca /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// A strategy for specifying ttl for values to be cached. /// The cache key strategy. @@ -451,6 +469,7 @@ public static CachePolicy Cache(ISyncCacheProvider ca /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// Duration (ttl) for which to cache values. /// The cache key strategy. @@ -467,6 +486,7 @@ public static CachePolicy Cache(ISyncCacheProvider ca /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// A strategy for specifying ttl for values to be cached. /// The cache key strategy. @@ -489,6 +509,7 @@ public static CachePolicy Cache(ISyncCacheProvider ca /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// A strategy for specifying ttl for values to be cached. /// The cache key strategy. @@ -511,6 +532,7 @@ public static CachePolicy Cache(ISyncCacheProvider ca /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// Duration (ttl) for which to cache values. /// Delegate to call on a cache hit, when value is returned from cache. @@ -540,6 +562,7 @@ public static CachePolicy Cache( /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// A strategy for specifying ttl for values to be cached. /// Delegate to call on a cache hit, when value is returned from cache. @@ -569,6 +592,7 @@ public static CachePolicy Cache( /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// A strategy for specifying ttl for values to be cached. /// Delegate to call on a cache hit, when value is returned from cache. @@ -598,6 +622,7 @@ public static CachePolicy Cache( /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// Duration (ttl) for which to cache values. /// The cache key strategy. @@ -630,6 +655,7 @@ public static CachePolicy Cache( /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// A strategy for specifying ttl for values to be cached. /// The cache key strategy. @@ -662,6 +688,7 @@ public static CachePolicy Cache( /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// A strategy for specifying ttl for values to be cached. /// The cache key strategy. @@ -694,6 +721,7 @@ public static CachePolicy Cache( /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// Duration (ttl) for which to cache values. /// The cache key strategy. @@ -726,6 +754,7 @@ public static CachePolicy Cache( /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// A strategy for specifying ttl for values to be cached. /// The cache key strategy. @@ -759,6 +788,7 @@ public static CachePolicy Cache( /// If the provides a value from cache, returns that value and does not execute the governed delegate. If the does not provide a value, executes the governed delegate, stores the value with the , then returns the value. /// /// + /// The type of the result. /// The cache provider. /// A strategy for specifying ttl for values to be cached. /// The cache key strategy. diff --git a/src/Polly/Caching/IAsyncCacheProvider.cs b/src/Polly/Caching/IAsyncCacheProvider.cs index 3d390a8ea17..d1fddb20a6c 100644 --- a/src/Polly/Caching/IAsyncCacheProvider.cs +++ b/src/Polly/Caching/IAsyncCacheProvider.cs @@ -33,6 +33,7 @@ public interface IAsyncCacheProvider /// /// Defines methods for classes providing asynchronous cache functionality for Polly s. /// +/// The type of the result. public interface IAsyncCacheProvider { /// diff --git a/src/Polly/Caching/ICachePolicy.cs b/src/Polly/Caching/ICachePolicy.cs index ca01367942f..0f73405cb50 100644 --- a/src/Polly/Caching/ICachePolicy.cs +++ b/src/Polly/Caching/ICachePolicy.cs @@ -11,6 +11,7 @@ public interface ICachePolicy : IsPolicy /// /// Defines properties and methods common to all Cache policies generic-typed for executions returning results of type . /// +/// The type of the result. public interface ICachePolicy : ICachePolicy { } diff --git a/src/Polly/Caching/ISyncCacheProvider.cs b/src/Polly/Caching/ISyncCacheProvider.cs index 6e2eefd6cf3..7c4b87917f2 100644 --- a/src/Polly/Caching/ISyncCacheProvider.cs +++ b/src/Polly/Caching/ISyncCacheProvider.cs @@ -28,6 +28,7 @@ public interface ISyncCacheProvider /// /// Defines methods for classes providing synchronous cache functionality for Polly s. /// +/// The type of the result. public interface ISyncCacheProvider { /// diff --git a/src/Polly/Caching/ITtlStrategy.cs b/src/Polly/Caching/ITtlStrategy.cs index fd911a07ec3..6aeaa60ee97 100644 --- a/src/Polly/Caching/ITtlStrategy.cs +++ b/src/Polly/Caching/ITtlStrategy.cs @@ -11,6 +11,7 @@ public interface ITtlStrategy : ITtlStrategy /// /// Defines a strategy for providing time-to-live durations for cacheable results. /// +/// The type of the result. public interface ITtlStrategy { /// diff --git a/src/Polly/CircuitBreaker/AdvancedCircuitBreakerTResultSyntax.cs b/src/Polly/CircuitBreaker/AdvancedCircuitBreakerTResultSyntax.cs index 8dcc1b870c6..16740fe6472 100644 --- a/src/Polly/CircuitBreaker/AdvancedCircuitBreakerTResultSyntax.cs +++ b/src/Polly/CircuitBreaker/AdvancedCircuitBreakerTResultSyntax.cs @@ -16,6 +16,7 @@ public static class AdvancedCircuitBreakerTResultSyntax /// again for another ; if no exception or handled result is encountered, the circuit will reset. /// /// + /// The type of the result. /// The policy builder. /// The failure threshold at which the circuit will break (a number between 0 and 1; eg 0.5 represents breaking if 50% or more of actions result in a handled failure). /// The duration of the timeslice over which failure ratios are assessed. @@ -50,6 +51,7 @@ public static CircuitBreakerPolicy AdvancedCircuitBreaker(this /// again for another ; if no exception or handled result is encountered, the circuit will reset. /// /// + /// The return type of delegates which may be executed through the policy. /// The policy builder. /// The failure threshold at which the circuit will break (a number between 0 and 1; eg 0.5 represents breaking if 50% or more of actions result in a handled failure. /// The duration of the timeslice over which failure ratios are assessed. @@ -83,6 +85,7 @@ public static CircuitBreakerPolicy AdvancedCircuitBreaker(this /// again for another ; if no exception or handled result is encountered, the circuit will reset. /// /// + /// The return type of delegates which may be executed through the policy. /// The policy builder. /// The failure threshold at which the circuit will break (a number between 0 and 1; eg 0.5 represents breaking if 50% or more of actions result in a handled failure. /// The duration of the timeslice over which failure ratios are assessed. @@ -119,6 +122,7 @@ public static CircuitBreakerPolicy AdvancedCircuitBreaker(this /// again for another ; if no exception or handled result is encountered, the circuit will reset. /// /// + /// The return type of delegates which may be executed through the policy. /// The policy builder. /// The failure threshold at which the circuit will break (a number between 0 and 1; eg 0.5 represents breaking if 50% or more of actions result in a handled failure. /// The duration of the timeslice over which failure ratios are assessed. diff --git a/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerTResultSyntax.cs b/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerTResultSyntax.cs index a3efca75b3d..930902fac64 100644 --- a/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerTResultSyntax.cs +++ b/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerTResultSyntax.cs @@ -16,6 +16,7 @@ public static class AsyncAdvancedCircuitBreakerTResultSyntax /// again for another ; if no exception or handled result is encountered, the circuit will reset. /// /// + /// The return type of delegates which may be executed through the policy. /// The policy builder. /// The failure threshold at which the circuit will break (a number between 0 and 1; eg 0.5 represents breaking if 50% or more of actions result in a handled failure). /// The duration of the timeslice over which failure ratios are assessed. @@ -51,6 +52,7 @@ public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsync; if no exception or handled result is encountered, the circuit will reset. /// /// + /// The return type of delegates which may be executed through the policy. /// The policy builder. /// The failure threshold at which the circuit will break (a number between 0 and 1; eg 0.5 represents breaking if 50% or more of actions result in a handled failure). /// The duration of the timeslice over which failure ratios are assessed. @@ -85,6 +87,7 @@ public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsync; if no exception or handled result is encountered, the circuit will reset. /// /// + /// The type of the result. /// The policy builder. /// The failure threshold at which the circuit will break (a number between 0 and 1; eg 0.5 represents breaking if 50% or more of actions result in a handled failure). /// The duration of the timeslice over which failure ratios are assessed. @@ -124,6 +127,7 @@ public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsync; if no exception or handled result is encountered, the circuit will reset. /// /// + /// The return type of delegates which may be executed through the policy. /// The policy builder. /// The failure threshold at which the circuit will break (a number between 0 and 1; eg 0.5 represents breaking if 50% or more of actions result in a handled failure). /// The duration of the timeslice over which failure ratios are assessed. @@ -160,6 +164,7 @@ public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsync; if no exception or handled result is encountered, the circuit will reset. /// /// + /// The return type of delegates which may be executed through the policy. /// The policy builder. /// The failure threshold at which the circuit will break (a number between 0 and 1; eg 0.5 represents breaking if 50% or more of actions result in a handled failure). /// The duration of the timeslice over which failure ratios are assessed. @@ -197,6 +202,7 @@ public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsync; if no exception or handled result is encountered, the circuit will reset. /// /// + /// The return type of delegates which may be executed through the policy. /// The policy builder. /// The failure threshold at which the circuit will break (a number between 0 and 1; eg 0.5 represents breaking if 50% or more of actions result in a handled failure). /// The duration of the timeslice over which failure ratios are assessed. diff --git a/src/Polly/CircuitBreaker/AsyncCircuitBreakerTResultSyntax.cs b/src/Polly/CircuitBreaker/AsyncCircuitBreakerTResultSyntax.cs index 71e965a3ada..18b424e0ebc 100644 --- a/src/Polly/CircuitBreaker/AsyncCircuitBreakerTResultSyntax.cs +++ b/src/Polly/CircuitBreaker/AsyncCircuitBreakerTResultSyntax.cs @@ -17,6 +17,7 @@ public static class AsyncCircuitBreakerTResultSyntax /// again for another ; if no exception or handled result is encountered, the circuit will reset. /// /// + /// The return type of delegates which may be executed through the policy. /// The policy builder. /// The number of exceptions or handled results that are allowed before opening the circuit. /// The duration the circuit will stay open before resetting. @@ -47,6 +48,7 @@ public static AsyncCircuitBreakerPolicy CircuitBreakerAsync(th /// again for another ; if no exception or handled result is encountered, the circuit will reset. /// /// + /// The return type of delegates which may be executed through the policy. /// The policy builder. /// The number of exceptions or handled results that are allowed before opening the circuit. /// The duration the circuit will stay open before resetting. @@ -76,6 +78,7 @@ public static AsyncCircuitBreakerPolicy CircuitBreakerAsync(th /// again for another ; if no exception or handled result is encountered, the circuit will reset. /// /// + /// The return type of delegates which may be executed through the policy. /// The policy builder. /// The number of exceptions or handled results that are allowed before opening the circuit. /// The duration the circuit will stay open before resetting. @@ -110,6 +113,7 @@ public static AsyncCircuitBreakerPolicy CircuitBreakerAsync(th /// again for another ; if no exception or handled result is encountered, the circuit will reset. /// /// + /// The type of the result. /// The policy builder. /// The number of exceptions or handled results that are allowed before opening the circuit. /// The duration the circuit will stay open before resetting. @@ -141,6 +145,7 @@ public static AsyncCircuitBreakerPolicy CircuitBreakerAsync(th /// again for another ; if no exception or handled result is encountered, the circuit will reset. /// /// + /// The return type of delegates which may be executed through the policy. /// The policy builder. /// The number of exceptions or handled results that are allowed before opening the circuit. /// The duration the circuit will stay open before resetting. @@ -173,6 +178,7 @@ public static AsyncCircuitBreakerPolicy CircuitBreakerAsync(th /// again for another ; if no exception or handled result is encountered, the circuit will reset. /// /// + /// The return type of delegates which may be executed through the policy. /// The policy builder. /// The number of exceptions or handled results that are allowed before opening the circuit. /// The duration the circuit will stay open before resetting. diff --git a/src/Polly/CircuitBreaker/CircuitBreakerPolicy.cs b/src/Polly/CircuitBreaker/CircuitBreakerPolicy.cs index 138185ae781..0e356ac181d 100644 --- a/src/Polly/CircuitBreaker/CircuitBreakerPolicy.cs +++ b/src/Polly/CircuitBreaker/CircuitBreakerPolicy.cs @@ -55,6 +55,7 @@ protected override TResult Implementation(Func /// A circuit-breaker policy that can be applied to delegates returning a value of type . /// +/// The type of the result. public class CircuitBreakerPolicy : Policy, ICircuitBreakerPolicy { internal readonly ICircuitController _breakerController; diff --git a/src/Polly/CircuitBreaker/CircuitBreakerTResultSyntax.cs b/src/Polly/CircuitBreaker/CircuitBreakerTResultSyntax.cs index 1f85c40ae67..b001aa2db57 100644 --- a/src/Polly/CircuitBreaker/CircuitBreakerTResultSyntax.cs +++ b/src/Polly/CircuitBreaker/CircuitBreakerTResultSyntax.cs @@ -17,6 +17,7 @@ public static class CircuitBreakerTResultSyntax /// again for another ; if no exception or handled result is encountered, the circuit will reset. /// /// + /// The type of the result. /// The policy builder. /// The number of exceptions or handled results that are allowed before opening the circuit. /// The duration the circuit will stay open before resetting. @@ -47,6 +48,7 @@ public static CircuitBreakerPolicy CircuitBreaker(this PolicyB /// again for another ; if no exception or handled result is encountered, the circuit will reset. /// /// + /// The type of the result. /// The policy builder. /// The number of exceptions or handled results that are allowed before opening the circuit. /// The duration the circuit will stay open before resetting. @@ -76,6 +78,7 @@ public static CircuitBreakerPolicy CircuitBreaker(this PolicyB /// again for another ; if no exception or handled result is encountered, the circuit will reset. /// /// + /// The type of the result. /// The policy builder. /// The number of exceptions or handled results that are allowed before opening the circuit. /// The duration the circuit will stay open before resetting. @@ -109,6 +112,7 @@ public static CircuitBreakerPolicy CircuitBreaker(this PolicyB /// again for another ; if no exception or handled result is encountered, the circuit will reset. /// /// + /// The type of the result. /// The policy builder. /// The number of exceptions or handled results that are allowed before opening the circuit. /// The duration the circuit will stay open before resetting. @@ -140,6 +144,7 @@ public static CircuitBreakerPolicy CircuitBreaker(this PolicyB /// again for another ; if no exception or handled result is encountered, the circuit will reset. /// /// + /// The type of the result. /// The policy builder. /// The number of exceptions or handled results that are allowed before opening the circuit. /// The duration the circuit will stay open before resetting. @@ -172,6 +177,7 @@ public static CircuitBreakerPolicy CircuitBreaker(this PolicyB /// again for another ; if no exception or handled result is encountered, the circuit will reset. /// /// + /// The type of the result. /// The policy builder. /// The number of exceptions or handled results that are allowed before opening the circuit. /// The duration the circuit will stay open before resetting. diff --git a/src/Polly/CircuitBreaker/ICircuitBreakerPolicy.cs b/src/Polly/CircuitBreaker/ICircuitBreakerPolicy.cs index 2c0f882ac9b..9cf4b8bd839 100644 --- a/src/Polly/CircuitBreaker/ICircuitBreakerPolicy.cs +++ b/src/Polly/CircuitBreaker/ICircuitBreakerPolicy.cs @@ -30,6 +30,7 @@ public interface ICircuitBreakerPolicy : IsPolicy /// /// Defines properties and methods common to all circuit-breaker policies generic-typed for executions returning results of type . /// +/// The type of the result. public interface ICircuitBreakerPolicy : ICircuitBreakerPolicy { /// diff --git a/src/Polly/DelegateResult.cs b/src/Polly/DelegateResult.cs index fc2bc3fc04c..6012b5664db 100644 --- a/src/Polly/DelegateResult.cs +++ b/src/Polly/DelegateResult.cs @@ -3,6 +3,7 @@ /// /// The captured outcome of executing an individual Func<TResult>. /// +/// The type of the result. public class DelegateResult { /// diff --git a/src/Polly/Fallback/AsyncFallbackSyntax.cs b/src/Polly/Fallback/AsyncFallbackSyntax.cs index 31009c0b54a..d0b4cc9de94 100644 --- a/src/Polly/Fallback/AsyncFallbackSyntax.cs +++ b/src/Polly/Fallback/AsyncFallbackSyntax.cs @@ -93,6 +93,7 @@ public static class AsyncFallbackTResultSyntax /// /// Builds an which provides a fallback value if the main execution fails. Executes the main delegate asynchronously, but if this throws a handled exception or raises a handled result, returns . /// + /// The type of the result. /// The policy builder. /// The fallback value to provide. /// The policy instance. @@ -107,6 +108,7 @@ public static AsyncFallbackPolicy FallbackAsync(this PolicyBui /// /// Builds an which provides a fallback value if the main execution fails. Executes the main delegate asynchronously, but if this throws a handled exception or raises a handled result, asynchronously calls and returns its result. /// + /// The type of the result. /// The policy builder. /// The fallback delegate. /// Thrown when is . @@ -125,6 +127,7 @@ public static AsyncFallbackPolicy FallbackAsync(this PolicyBui /// /// Builds an which provides a fallback value if the main execution fails. Executes the main delegate asynchronously, but if this throws a handled exception or raises a handled result, first asynchronously calls with details of the handled exception or result; then returns . /// + /// The type of the result. /// The policy builder. /// The fallback value to provide. /// The action to call asynchronously before invoking the fallback delegate. @@ -143,6 +146,7 @@ public static AsyncFallbackPolicy FallbackAsync(this PolicyBui /// /// Builds an which provides a fallback value if the main execution fails. Executes the main delegate asynchronously, but if this throws a handled exception or raises a handled result, first asynchronously calls with details of the handled exception or result; then asynchronously calls and returns its result. /// + /// The type of the result. /// The policy builder. /// The fallback delegate. /// The action to call asynchronously before invoking the fallback delegate. @@ -164,6 +168,7 @@ public static AsyncFallbackPolicy FallbackAsync(this PolicyBui /// /// Builds an which provides a fallback value if the main execution fails. Executes the main delegate asynchronously, but if this throws a handled exception or raises a handled result, first asynchronously calls with details of the handled exception or result and the execution context; then returns . /// + /// The type of the result. /// The policy builder. /// The fallback value to provide. /// The action to call asynchronously before invoking the fallback delegate. @@ -182,6 +187,7 @@ public static AsyncFallbackPolicy FallbackAsync(this PolicyBui /// /// Builds an which provides a fallback value if the main execution fails. Executes the main delegate asynchronously, but if this throws a handled exception or raises a handled result, first asynchronously calls with details of the handled exception or result and the execution context; then asynchronously calls and returns its result. /// + /// The type of the result. /// The policy builder. /// The fallback delegate. /// The action to call asynchronously before invoking the fallback delegate. @@ -201,6 +207,7 @@ public static AsyncFallbackPolicy FallbackAsync(this PolicyBui /// /// Builds an which provides a fallback value if the main execution fails. Executes the main delegate asynchronously, but if this throws a handled exception or raises a handled result, first asynchronously calls with details of the handled exception or result and the execution context; then asynchronously calls and returns its result. /// + /// The type of the result. /// The policy builder. /// The fallback delegate. /// The action to call asynchronously before invoking the fallback delegate. diff --git a/src/Polly/Fallback/FallbackPolicy.cs b/src/Polly/Fallback/FallbackPolicy.cs index 56fe7c91e72..3deeaeea9f0 100644 --- a/src/Polly/Fallback/FallbackPolicy.cs +++ b/src/Polly/Fallback/FallbackPolicy.cs @@ -48,6 +48,7 @@ protected override TResult Implementation(Func /// A fallback policy that can be applied to delegates returning a value of type . /// +/// The type of the result. public class FallbackPolicy : Policy, IFallbackPolicy { private readonly Action, Context> _onFallback; diff --git a/src/Polly/Fallback/FallbackSyntax.cs b/src/Polly/Fallback/FallbackSyntax.cs index d64ae981854..91143eaa60d 100644 --- a/src/Polly/Fallback/FallbackSyntax.cs +++ b/src/Polly/Fallback/FallbackSyntax.cs @@ -146,6 +146,7 @@ public static class FallbackTResultSyntax /// /// Builds a which provides a fallback value if the main execution fails. Executes the main delegate, but if this throws a handled exception or raises a handled result, returns instead. /// + /// The type of the result. /// The policy builder. /// The fallback value to provide. /// The policy instance. @@ -158,6 +159,7 @@ public static FallbackPolicy Fallback(this PolicyBuilder /// Builds a which provides a fallback value if the main execution fails. Executes the main delegate, but if this throws a handled exception or raises a handled result, calls and returns its result. /// + /// The type of the result. /// The policy builder. /// The fallback action. /// Thrown when is . @@ -174,6 +176,7 @@ public static FallbackPolicy Fallback(this PolicyBuilder /// Builds a which provides a fallback value if the main execution fails. Executes the main delegate, but if this throws a handled exception or raises a handled result, calls and returns its result. /// + /// The type of the result. /// The policy builder. /// The fallback action. /// Thrown when is . @@ -190,6 +193,7 @@ public static FallbackPolicy Fallback(this PolicyBuilder /// Builds a which provides a fallback value if the main execution fails. Executes the main delegate, but if this throws a handled exception or raises a handled result, first calls with details of the handled exception or result; then returns . /// + /// The type of the result. /// The policy builder. /// The fallback value to provide. /// The action to call before invoking the fallback delegate. @@ -206,6 +210,7 @@ public static FallbackPolicy Fallback(this PolicyBuilder /// Builds a which provides a fallback value if the main execution fails. Executes the main delegate, but if this throws a handled exception or raises a handled result, first calls with details of the handled exception or result; then calls and returns its result. /// + /// The type of the result. /// The policy builder. /// The fallback action. /// The action to call before invoking the fallback delegate. @@ -225,6 +230,7 @@ public static FallbackPolicy Fallback(this PolicyBuilder /// Builds a which provides a fallback value if the main execution fails. Executes the main delegate, but if this throws a handled exception or raises a handled result, first calls with details of the handled exception or result; then calls and returns its result. /// + /// The type of the result. /// The policy builder. /// The fallback action. /// The action to call before invoking the fallback delegate. @@ -244,6 +250,7 @@ public static FallbackPolicy Fallback(this PolicyBuilder /// Builds a which provides a fallback value if the main execution fails. Executes the main delegate, but if this throws a handled exception or raises a handled result, first calls with details of the handled exception or result and the execution context; then returns . /// + /// The type of the result. /// The policy builder. /// The fallback value to provide. /// The action to call before invoking the fallback delegate. @@ -260,6 +267,7 @@ public static FallbackPolicy Fallback(this PolicyBuilder /// Builds a which provides a fallback value if the main execution fails. Executes the main delegate, but if this throws a handled exception or raises a handled result, first calls with details of the handled exception or result and the execution context; then calls and returns its result. /// + /// The type of the result. /// The policy builder. /// The fallback action. /// The action to call before invoking the fallback delegate. @@ -279,6 +287,7 @@ public static FallbackPolicy Fallback(this PolicyBuilder /// Builds a which provides a fallback value if the main execution fails. Executes the main delegate, but if this throws a handled exception or raises a handled result, first calls with details of the handled exception or result and the execution context; then calls and returns its result. /// + /// The type of the result. /// The policy builder. /// The fallback action. /// The action to call before invoking the fallback delegate. @@ -298,6 +307,7 @@ public static FallbackPolicy Fallback(this PolicyBuilder /// Builds a which provides a fallback value if the main execution fails. Executes the main delegate, but if this throws a handled exception or raises a handled result, first calls with details of the handled exception or result and the execution context; then calls and returns its result. /// + /// The type of the result. /// The policy builder. /// The fallback action. /// The action to call before invoking the fallback delegate. diff --git a/src/Polly/Fallback/IFallbackPolicy.cs b/src/Polly/Fallback/IFallbackPolicy.cs index 19ce1103863..102fdd58624 100644 --- a/src/Polly/Fallback/IFallbackPolicy.cs +++ b/src/Polly/Fallback/IFallbackPolicy.cs @@ -12,6 +12,7 @@ public interface IFallbackPolicy : IsPolicy /// /// Defines properties and methods common to all Fallback policies generic-typed for executions returning results of type . /// +/// The type of the result. public interface IFallbackPolicy : IFallbackPolicy { } diff --git a/src/Polly/IAsyncPolicy.Extensions.cs b/src/Polly/IAsyncPolicy.Extensions.cs index c3b888bd49d..2e6974d919c 100644 --- a/src/Polly/IAsyncPolicy.Extensions.cs +++ b/src/Polly/IAsyncPolicy.Extensions.cs @@ -9,6 +9,7 @@ public static class IAsyncPolicyExtensions /// Converts a non-generic into a generic for handling only executions returning . /// /// This method allows you to convert a non-generic into a generic for contexts such as variables or parameters which may explicitly require a generic . + /// The type of the result. /// The non-generic to convert to a generic . /// A generic version of the supplied non-generic . public static IAsyncPolicy AsAsyncPolicy(this IAsyncPolicy policy) => diff --git a/src/Polly/IAsyncPolicy.cs b/src/Polly/IAsyncPolicy.cs index faa75d2f241..387650d7410 100644 --- a/src/Polly/IAsyncPolicy.cs +++ b/src/Polly/IAsyncPolicy.cs @@ -104,6 +104,7 @@ public interface IAsyncPolicy : IsPolicy /// /// Executes the specified asynchronous action within the policy and returns the result. /// + /// The type of the result. /// The action to perform. /// Arbitrary data that is passed to the exception policy. /// The value returned by the action. @@ -121,6 +122,7 @@ public interface IAsyncPolicy : IsPolicy /// /// Executes the specified asynchronous action within the policy and returns the result. /// + /// The type of the result. /// 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. @@ -151,6 +153,7 @@ public interface IAsyncPolicy : IsPolicy /// /// Executes the specified asynchronous action within the policy and returns the result. /// + /// The type of the result. /// 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. diff --git a/src/Polly/ISyncPolicy.Extensions.cs b/src/Polly/ISyncPolicy.Extensions.cs index 31334800c40..a5053e55b99 100644 --- a/src/Polly/ISyncPolicy.Extensions.cs +++ b/src/Polly/ISyncPolicy.Extensions.cs @@ -9,6 +9,7 @@ public static class ISyncPolicyExtensions /// Converts a non-generic into a generic for handling only executions returning . /// /// This method allows you to convert a non-generic into a generic for contexts such as variables or parameters which may explicitly require a generic . + /// The type of the result. /// The non-generic to convert to a generic . /// A generic version of the supplied non-generic . public static ISyncPolicy AsPolicy(this ISyncPolicy policy) => diff --git a/src/Polly/ISyncPolicy.cs b/src/Polly/ISyncPolicy.cs index 3fddc2d7902..e14f7f5f202 100644 --- a/src/Polly/ISyncPolicy.cs +++ b/src/Polly/ISyncPolicy.cs @@ -168,6 +168,7 @@ public interface ISyncPolicy : IsPolicy /// /// Executes the specified action within the policy and returns the captured result. /// + /// The type of the result. /// The action to perform. /// The captured result. PolicyResult ExecuteAndCapture(Func action); @@ -175,6 +176,7 @@ public interface ISyncPolicy : IsPolicy /// /// Executes the specified action within the policy and returns the captured result. /// + /// The type of the result. /// The action to perform. /// Arbitrary data that is passed to the exception policy. /// The captured result. @@ -184,6 +186,7 @@ public interface ISyncPolicy : IsPolicy /// /// Executes the specified action within the policy and returns the captured result. /// + /// The type of the result. /// The action to perform. /// Context data that is passed to the exception policy. /// The captured result. @@ -213,6 +216,7 @@ public interface ISyncPolicy : IsPolicy /// /// Executes the specified action within the policy and returns the captured result. /// + /// The type of the result. /// The action to perform. /// Context data that is passed to the exception policy. /// The cancellation token. diff --git a/src/Polly/NoOp/AsyncNoOpPolicy.cs b/src/Polly/NoOp/AsyncNoOpPolicy.cs index f75cddafd7e..68fdcb74976 100644 --- a/src/Polly/NoOp/AsyncNoOpPolicy.cs +++ b/src/Polly/NoOp/AsyncNoOpPolicy.cs @@ -21,6 +21,7 @@ protected override Task ImplementationAsync(Func /// A noop policy that can be applied to asynchronous delegates returning a value of type . /// +/// The type of the result. public class AsyncNoOpPolicy : AsyncPolicy, INoOpPolicy { internal AsyncNoOpPolicy() diff --git a/src/Polly/NoOp/INoOpPolicy.cs b/src/Polly/NoOp/INoOpPolicy.cs index 8e04c7372da..e5b32d3005b 100644 --- a/src/Polly/NoOp/INoOpPolicy.cs +++ b/src/Polly/NoOp/INoOpPolicy.cs @@ -12,6 +12,7 @@ public interface INoOpPolicy : IsPolicy /// /// Defines properties and methods common to all NoOp policies generic-typed for executions returning results of type . /// +/// The type of the result. public interface INoOpPolicy : INoOpPolicy { } diff --git a/src/Polly/Policy.ExecuteOverloads.cs b/src/Polly/Policy.ExecuteOverloads.cs index 5576b7399b1..c4828d63f81 100644 --- a/src/Polly/Policy.ExecuteOverloads.cs +++ b/src/Polly/Policy.ExecuteOverloads.cs @@ -247,6 +247,7 @@ public PolicyResult ExecuteAndCapture(Action action, /// /// Executes the specified action within the policy and returns the captured result. /// + /// The type of the result. /// The action to perform. /// The captured result. [DebuggerStepThrough] @@ -256,6 +257,7 @@ public PolicyResult ExecuteAndCapture(Func action) => /// /// Executes the specified action within the policy and returns the captured result. /// + /// The type of the result. /// The action to perform. /// Arbitrary data that is passed to the exception policy. /// The captured result. @@ -267,6 +269,7 @@ public PolicyResult ExecuteAndCapture(Func a /// /// Executes the specified action within the policy and returns the captured result. /// + /// The type of the result. /// The action to perform. /// Context data that is passed to the exception policy. /// The captured result. @@ -301,6 +304,7 @@ public PolicyResult ExecuteAndCapture(Func /// Executes the specified action within the policy and returns the captured result. /// + /// The type of the result. /// The action to perform. /// Context data that is passed to the exception policy. /// The cancellation token. diff --git a/src/Polly/PolicyBase.cs b/src/Polly/PolicyBase.cs index 85f11886fde..a54a8f3db1b 100644 --- a/src/Polly/PolicyBase.cs +++ b/src/Polly/PolicyBase.cs @@ -49,6 +49,7 @@ protected PolicyBase(PolicyBuilder policyBuilder) /// /// Implements elements common to sync and async generic policies. /// +/// The type of the result. public abstract class PolicyBase : PolicyBase { /// diff --git a/src/Polly/PolicyResult.cs b/src/Polly/PolicyResult.cs index 9aafa7e44b2..7446035b312 100644 --- a/src/Polly/PolicyResult.cs +++ b/src/Polly/PolicyResult.cs @@ -59,6 +59,7 @@ public static PolicyResult Failure(Exception exception, ExceptionType exceptionT /// /// The captured result of executing a policy. /// +/// The type of the result. public class PolicyResult { internal PolicyResult(TResult result, OutcomeType outcome, Exception finalException, ExceptionType? exceptionType, Context context) diff --git a/src/Polly/Polly.csproj b/src/Polly/Polly.csproj index e128b592ed9..ef9bae12f9a 100644 --- a/src/Polly/Polly.csproj +++ b/src/Polly/Polly.csproj @@ -9,7 +9,7 @@ true $(NoWarn);IDE0011;S103;S3872;SA1402;SA1414;S3215 $(NoWarn);IDE1006;CA1062;S107;CA1068;S4039;CA1000;CA1063;CA1031;CA1051 - $(NoWarn);CA2211;S2223;CA1032;CA1815;CA1816;S4457;SA1615;SA1618;CA1033 + $(NoWarn);CA2211;S2223;CA1032;CA1815;CA1816;S4457;SA1615;CA1033 $(NoWarn);S4023;CA1010;S3442;CA1064;SA1649;SA1625;SA1623;SA1118 $(NoWarn);S3253;S3971;S6605;CA1724;CA1716;SA1108;CA1710;S4049;S3246 $(NoWarn);CA1805 diff --git a/src/Polly/RateLimit/AsyncRateLimitPolicy.cs b/src/Polly/RateLimit/AsyncRateLimitPolicy.cs index 86e8b0c2949..0acec910a53 100644 --- a/src/Polly/RateLimit/AsyncRateLimitPolicy.cs +++ b/src/Polly/RateLimit/AsyncRateLimitPolicy.cs @@ -22,6 +22,7 @@ protected override Task ImplementationAsync(Func /// A rate-limit policy that can be applied to asynchronous delegates returning a value of type . /// +/// The type of the result. public class AsyncRateLimitPolicy : AsyncPolicy, IRateLimitPolicy { private readonly IRateLimiter _rateLimiter; diff --git a/src/Polly/RateLimit/IRateLimitPolicy.cs b/src/Polly/RateLimit/IRateLimitPolicy.cs index 58e8b5041b3..d30534ef538 100644 --- a/src/Polly/RateLimit/IRateLimitPolicy.cs +++ b/src/Polly/RateLimit/IRateLimitPolicy.cs @@ -12,6 +12,7 @@ public interface IRateLimitPolicy : IsPolicy /// /// Defines properties and methods common to all RateLimit policies generic-typed for executions returning results of type . /// +/// The type of the result. public interface IRateLimitPolicy : IRateLimitPolicy { } diff --git a/src/Polly/RateLimit/RateLimitPolicy.cs b/src/Polly/RateLimit/RateLimitPolicy.cs index d9cb2bc2066..07de422bfb2 100644 --- a/src/Polly/RateLimit/RateLimitPolicy.cs +++ b/src/Polly/RateLimit/RateLimitPolicy.cs @@ -21,6 +21,7 @@ protected override TResult Implementation(Func /// A rate-limit policy that can be applied to synchronous delegates returning a value of type . /// +/// The type of the result. public class RateLimitPolicy : Policy, IRateLimitPolicy { private readonly IRateLimiter _rateLimiter; diff --git a/src/Polly/Registry/IConcurrentPolicyRegistry.cs b/src/Polly/Registry/IConcurrentPolicyRegistry.cs index 7c2427ddfe1..4f8c30c44ff 100644 --- a/src/Polly/Registry/IConcurrentPolicyRegistry.cs +++ b/src/Polly/Registry/IConcurrentPolicyRegistry.cs @@ -45,6 +45,7 @@ bool TryUpdate(TKey key, TPolicy newPolicy, TPolicy comparisonPolicy) /// Adds a policy with the provided key and policy to the registry /// if the key does not already exist. /// + /// The type of Policy. /// 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 @@ -57,6 +58,7 @@ TPolicy GetOrAdd(TKey key, Func policyFactory) /// Adds a key/policy pair to the registry /// if the key does not already exist. /// + /// The type of Policy. /// 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 @@ -69,6 +71,7 @@ TPolicy GetOrAdd(TKey key, TPolicy policy) /// exist, or updates a key/policy pair in the registry if the key /// already exists. /// + /// The type of Policy. /// 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 @@ -83,6 +86,7 @@ TPolicy AddOrUpdate(TKey key, Func addPolicyFactory, Fun /// exist, or updates a key/policy pair in the registry if the key /// already exists. /// + /// The type of Policy. /// 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 diff --git a/src/Polly/Registry/PolicyRegistry.cs b/src/Polly/Registry/PolicyRegistry.cs index 6e927b3336d..34169e35d22 100644 --- a/src/Polly/Registry/PolicyRegistry.cs +++ b/src/Polly/Registry/PolicyRegistry.cs @@ -181,6 +181,7 @@ public bool TryUpdate(string key, TPolicy newPolicy, TPolicy comparison /// Adds a policy with the provided key and policy to the registry /// if the key does not already exist. /// + /// The type of Policy. /// 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 @@ -198,6 +199,7 @@ public TPolicy GetOrAdd(string key, Func policyFactory /// Adds a key/policy pair to the registry /// if the key does not already exist. /// + /// The type of Policy. /// The key of the policy to add. /// 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 @@ -215,6 +217,7 @@ public TPolicy GetOrAdd(string key, TPolicy policy) /// exist, or updates a key/policy pair in the registry if the key /// already exists. /// + /// The type of Policy. /// 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 @@ -234,6 +237,7 @@ public TPolicy AddOrUpdate(string key, Func addPolicyF /// exist, or updates a key/policy pair in the registry if the key /// already exists. /// + /// The type of Policy. /// 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 diff --git a/src/Polly/ResiliencePipelineConversionExtensions.cs b/src/Polly/ResiliencePipelineConversionExtensions.cs index b943c65805c..a02ef89c270 100644 --- a/src/Polly/ResiliencePipelineConversionExtensions.cs +++ b/src/Polly/ResiliencePipelineConversionExtensions.cs @@ -19,6 +19,7 @@ public static IAsyncPolicy AsAsyncPolicy(this ResiliencePipeline strategy) /// /// Converts a to an . /// + /// The type of the result. /// The strategy instance. /// An instance of . /// Thrown when is . @@ -38,6 +39,7 @@ public static ISyncPolicy AsSyncPolicy(this ResiliencePipeline strategy) /// Converts a to an . /// /// The strategy instance. + /// The type of the result. /// An instance of . /// Thrown when is . public static ISyncPolicy AsSyncPolicy(this ResiliencePipeline strategy) diff --git a/src/Polly/ResultPredicates.cs b/src/Polly/ResultPredicates.cs index ebe34ed8541..63b02ddec3a 100644 --- a/src/Polly/ResultPredicates.cs +++ b/src/Polly/ResultPredicates.cs @@ -3,6 +3,7 @@ /// /// A collection of predicates used to define whether a policy handles a given value. /// +/// The type of the result. public class ResultPredicates { private List> _predicates; diff --git a/src/Polly/Retry/AsyncRetryPolicy.cs b/src/Polly/Retry/AsyncRetryPolicy.cs index f7c2081f621..bd8b6b4b0f5 100644 --- a/src/Polly/Retry/AsyncRetryPolicy.cs +++ b/src/Polly/Retry/AsyncRetryPolicy.cs @@ -54,6 +54,7 @@ protected override Task ImplementationAsync( /// /// A retry policy that can be applied to asynchronous delegates returning a value of type . /// +/// The type of the result. public class AsyncRetryPolicy : AsyncPolicy, IRetryPolicy { private readonly Func, TimeSpan, int, Context, Task> _onRetryAsync; diff --git a/src/Polly/Retry/AsyncRetrySyntax.cs b/src/Polly/Retry/AsyncRetrySyntax.cs index ef247265b90..7cbb1d06070 100644 --- a/src/Polly/Retry/AsyncRetrySyntax.cs +++ b/src/Polly/Retry/AsyncRetrySyntax.cs @@ -318,7 +318,7 @@ public static AsyncRetryPolicy RetryForeverAsync(this PolicyBuilder policyBuilde /// /// The policy builder. /// The retry count. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The policy instance. public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilder, int retryCount, Func sleepDurationProvider) { @@ -335,7 +335,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilde /// /// The policy builder. /// The retry count. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. @@ -361,7 +361,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilde /// /// The policy builder. /// The retry count. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The action to call asynchronously on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. @@ -387,7 +387,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilde /// /// The policy builder. /// The retry count. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. @@ -414,7 +414,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilde /// /// The policy builder. /// The retry count. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The action to call asynchronously on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. @@ -439,7 +439,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilde /// /// The policy builder. /// The retry count. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. @@ -465,7 +465,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilde /// /// The policy builder. /// The retry count. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The action to call asynchronously on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. @@ -498,7 +498,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilde /// /// The policy builder. /// The retry count. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. @@ -525,7 +525,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilde /// /// The policy builder. /// The retry count. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The action to call asynchronously on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. @@ -550,7 +550,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilde /// /// The policy builder. /// The retry count. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. @@ -576,7 +576,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilde /// /// The policy builder. /// The retry count. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The action to call asynchronously on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. @@ -600,7 +600,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilde /// /// The policy builder. /// The retry count. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The action to call asynchronously on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. @@ -778,7 +778,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilde /// the current retry number (1 for first retry, 2 for second etc). /// /// The policy builder. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The policy instance. /// Thrown when is . public static AsyncRetryPolicy WaitAndRetryForeverAsync(this PolicyBuilder policyBuilder, Func sleepDurationProvider) @@ -797,7 +797,7 @@ public static AsyncRetryPolicy WaitAndRetryForeverAsync(this PolicyBuilder polic /// the current retry number (1 for first retry, 2 for second etc) and execution context. /// /// The policy builder. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The policy instance. /// Thrown when is . public static AsyncRetryPolicy WaitAndRetryForeverAsync(this PolicyBuilder policyBuilder, Func sleepDurationProvider) diff --git a/src/Polly/Retry/AsyncRetryTResultSyntax.cs b/src/Polly/Retry/AsyncRetryTResultSyntax.cs index 8770a1420ea..5d5a8ba9227 100644 --- a/src/Polly/Retry/AsyncRetryTResultSyntax.cs +++ b/src/Polly/Retry/AsyncRetryTResultSyntax.cs @@ -8,6 +8,7 @@ public static class AsyncRetryTResultSyntax /// /// Builds an that will retry once. /// + /// The type of the result. /// The policy builder. /// The policy instance. public static AsyncRetryPolicy RetryAsync(this PolicyBuilder policyBuilder) => @@ -16,6 +17,7 @@ public static AsyncRetryPolicy RetryAsync(this PolicyBuilder /// Builds an that will retry times. /// + /// The type of the result. /// The policy builder. /// The retry count. /// The policy instance. @@ -30,6 +32,7 @@ public static AsyncRetryPolicy RetryAsync(this PolicyBuilder that will retry once /// calling on retry with the handled exception or result and retry count. /// + /// The type of the result. /// The policy builder. /// The action to call on each retry. /// The policy instance. @@ -43,6 +46,7 @@ public static AsyncRetryPolicy RetryAsync(this PolicyBuilder that will retry once /// calling on retry with the handled exception or result and retry count. /// + /// The type of the result. /// The policy builder. /// The action to call asynchronously on each retry. /// The policy instance. @@ -54,6 +58,7 @@ public static AsyncRetryPolicy RetryAsync(this PolicyBuilder that will retry times /// calling on each retry with the handled exception or result and retry count. /// + /// The type of the result. /// The policy builder. /// The retry count. /// The action to call on each retry. @@ -75,6 +80,7 @@ public static AsyncRetryPolicy RetryAsync(this PolicyBuilder that will retry times /// calling on each retry with the handled exception or result and retry count. /// + /// The type of the result. /// The policy builder. /// The retry count. /// The action to call asynchronously on each retry. @@ -93,6 +99,7 @@ public static AsyncRetryPolicy RetryAsync(this PolicyBuilder that will retry once /// calling on retry with the handled exception or result, retry count and context data. /// + /// The type of the result. /// The policy builder. /// The action to call on each retry. /// The policy instance. @@ -104,6 +111,7 @@ public static AsyncRetryPolicy RetryAsync(this PolicyBuilder that will retry once /// calling on retry with the handled exception or result, retry count and context data. /// + /// The type of the result. /// The policy builder. /// The action to call asynchronously on each retry. /// The policy instance. @@ -115,6 +123,7 @@ public static AsyncRetryPolicy RetryAsync(this PolicyBuilder that will retry times /// calling on each retry with the handled exception or result, retry count and context data. /// + /// The type of the result. /// The policy builder. /// The retry count. /// The action to call on each retry. @@ -136,6 +145,7 @@ public static AsyncRetryPolicy RetryAsync(this PolicyBuilder that will retry times /// calling on each retry with the handled exception or result, retry count and context data. /// + /// The type of the result. /// The policy builder. /// The retry count. /// The action to call asynchronously on each retry. @@ -158,6 +168,7 @@ public static AsyncRetryPolicy RetryAsync(this PolicyBuilder /// Builds an that will retry indefinitely until the action succeeds. /// + /// The type of the result. /// The policy builder. /// The policy instance. public static AsyncRetryPolicy RetryForeverAsync(this PolicyBuilder policyBuilder) @@ -171,6 +182,7 @@ public static AsyncRetryPolicy RetryForeverAsync(this PolicyBu /// Builds an that will retry indefinitely /// calling on each retry with the handled exception or result. /// + /// The type of the result. /// The policy builder. /// The action to call on each retry. /// The policy instance. @@ -190,6 +202,7 @@ public static AsyncRetryPolicy RetryForeverAsync(this PolicyBu /// Builds an that will retry indefinitely /// calling on each retry with the handled exception or result and retry count. /// + /// The type of the result. /// The policy builder. /// The action to call on each retry. /// The policy instance. @@ -209,6 +222,7 @@ public static AsyncRetryPolicy RetryForeverAsync(this PolicyBu /// Builds an that will retry indefinitely /// calling on each retry with the handled exception or result. /// + /// The type of the result. /// The policy builder. /// The action to call asynchronously on each retry. /// The policy instance. @@ -225,6 +239,7 @@ public static AsyncRetryPolicy RetryForeverAsync(this PolicyBu /// Builds an that will retry indefinitely /// calling on each retry with the handled exception or result and retry count. /// + /// The type of the result. /// The policy builder. /// The action to call asynchronously on each retry. /// The policy instance. @@ -241,6 +256,7 @@ public static AsyncRetryPolicy RetryForeverAsync(this PolicyBu /// Builds an that will retry indefinitely /// calling on each retry with the handled exception or result and context data. /// + /// The type of the result. /// The policy builder. /// The action to call on each retry. /// The policy instance. @@ -260,6 +276,7 @@ public static AsyncRetryPolicy RetryForeverAsync(this PolicyBu /// Builds an that will retry indefinitely /// calling on each retry with the handled exception or result, retry count and context data. /// + /// The type of the result. /// The policy builder. /// The action to call on each retry. /// The policy instance. @@ -279,6 +296,7 @@ public static AsyncRetryPolicy RetryForeverAsync(this PolicyBu /// Builds an that will retry indefinitely /// calling on each retry with the handled exception or result and context data. /// + /// The type of the result. /// The policy builder. /// The action to call asynchronously on each retry. /// The policy instance. @@ -297,6 +315,7 @@ public static AsyncRetryPolicy RetryForeverAsync(this PolicyBu /// Builds an that will retry indefinitely /// calling on each retry with the handled exception or result, retry count and context data. /// + /// The type of the result. /// The policy builder. /// The action to call asynchronously on each retry. /// The policy instance. @@ -316,9 +335,10 @@ public static AsyncRetryPolicy RetryForeverAsync(this PolicyBu /// 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 type of the result. /// The policy builder. /// The retry count. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The policy instance. public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBuilder policyBuilder, int retryCount, Func sleepDurationProvider) { @@ -333,9 +353,10 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBu /// 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 type of the result. /// The policy builder. /// The retry count. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. @@ -360,9 +381,10 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBu /// 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 type of the result. /// The policy builder. /// The retry count. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The action to call asynchronously on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. @@ -386,9 +408,10 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBu /// 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 type of the result. /// The policy builder. /// The retry count. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. @@ -413,9 +436,10 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBu /// 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 type of the result. /// The policy builder. /// The retry count. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The action to call asynchronously on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. @@ -437,9 +461,10 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBu /// 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 type of the result. /// The policy builder. /// The retry count. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. @@ -463,9 +488,10 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBu /// 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 type of the result. /// The policy builder. /// The retry count. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The action to call asynchronously on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. @@ -496,9 +522,10 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBu /// 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 type of the result. /// The policy builder. /// The retry count. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. @@ -523,9 +550,10 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBu /// 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 type of the result. /// The policy builder. /// The retry count. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The action to call asynchronously on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. @@ -547,9 +575,10 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBu /// 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 type of the result. /// The policy builder. /// The retry count. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. @@ -573,9 +602,10 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBu /// 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 type of the result. /// The policy builder. /// The retry count. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The action to call asynchronously on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. @@ -598,9 +628,10 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBu /// On each retry, the duration to wait is calculated by calling with /// the current retry number (1 for first retry, 2 for second etc), result of previous execution, and execution context. /// + /// The type of the result. /// The policy builder. /// The retry count. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The action to call asynchronously on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. @@ -627,6 +658,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBu /// /// On each retry, the duration to wait is the current item. /// + /// The type of the result. /// The policy builder. /// The sleep durations to wait for on each retry. /// The policy instance. @@ -643,6 +675,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBu /// calling on each retry with the handled exception or result and the current sleep duration. /// On each retry, the duration to wait is the current item. /// + /// The type of the result. /// The policy builder. /// The sleep durations to wait for on each retry. /// The action to call on each retry. @@ -666,6 +699,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBu /// calling on each retry with the handled exception or result and the current sleep duration. /// On each retry, the duration to wait is the current item. /// + /// The type of the result. /// The policy builder. /// The sleep durations to wait for on each retry. /// The action to call asynchronously on each retry. @@ -687,6 +721,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBu /// calling on each retry with the handled exception or result, the current sleep duration and context data. /// On each retry, the duration to wait is the current item. /// + /// The type of the result. /// The policy builder. /// The sleep durations to wait for on each retry. /// The action to call on each retry. @@ -710,6 +745,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBu /// calling on each retry with the handled exception or result, the current sleep duration and context data. /// On each retry, the duration to wait is the current item. /// + /// The type of the result. /// The policy builder. /// The sleep durations to wait for on each retry. /// The action to call asynchronously on each retry. @@ -731,6 +767,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBu /// calling on each retry with the handled exception or result, the current sleep duration, retry count, and context data. /// On each retry, the duration to wait is the current item. /// + /// The type of the result. /// The policy builder. /// The sleep durations to wait for on each retry. /// The action to call on each retry. @@ -754,6 +791,7 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBu /// calling on each retry with the handled exception or result, the current sleep duration, retry count, and context data. /// On each retry, the duration to wait is the current item. /// + /// The type of the result. /// The policy builder. /// The sleep durations to wait for on each retry. /// The action to call asynchronously on each retry. @@ -777,8 +815,9 @@ public static AsyncRetryPolicy WaitAndRetryAsync(this PolicyBu /// 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 type of the result. /// The policy builder. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The policy instance. /// Thrown when is . public static AsyncRetryPolicy WaitAndRetryForeverAsync(this PolicyBuilder policyBuilder, Func sleepDurationProvider) @@ -796,8 +835,9 @@ public static AsyncRetryPolicy WaitAndRetryForeverAsync(this P /// 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 type of the result. /// The policy builder. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The policy instance. /// Thrown when is . public static AsyncRetryPolicy WaitAndRetryForeverAsync(this PolicyBuilder policyBuilder, Func sleepDurationProvider) @@ -816,6 +856,7 @@ public static AsyncRetryPolicy WaitAndRetryForeverAsync(this P /// 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 type of the result. /// The policy builder. /// A function providing the duration to wait before retrying. /// The action to call on each retry. @@ -840,6 +881,7 @@ public static AsyncRetryPolicy WaitAndRetryForeverAsync(this P /// 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 type of the result. /// The policy builder. /// A function providing the duration to wait before retrying. /// The action to call on each retry. @@ -864,6 +906,7 @@ public static AsyncRetryPolicy WaitAndRetryForeverAsync(this P /// 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 type of the result. /// The policy builder. /// A function providing the duration to wait before retrying. /// The action to call asynchronously on each retry. @@ -888,6 +931,7 @@ public static AsyncRetryPolicy WaitAndRetryForeverAsync(this P /// 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 type of the result. /// The policy builder. /// A function providing the duration to wait before retrying. /// The action to call asynchronously on each retry. @@ -912,6 +956,7 @@ public static AsyncRetryPolicy WaitAndRetryForeverAsync(this P /// 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 type of the result. /// The policy builder. /// A function providing the duration to wait before retrying. /// The action to call on each retry. @@ -936,6 +981,7 @@ public static AsyncRetryPolicy WaitAndRetryForeverAsync(this P /// 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 type of the result. /// The policy builder. /// A function providing the duration to wait before retrying. /// The action to call on each retry. @@ -960,6 +1006,7 @@ public static AsyncRetryPolicy WaitAndRetryForeverAsync(this P /// 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 type of the result. /// The policy builder. /// A function providing the duration to wait before retrying. /// The action to call asynchronously on each retry. @@ -982,6 +1029,7 @@ public static AsyncRetryPolicy WaitAndRetryForeverAsync(this P /// 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 type of the result. /// The policy builder. /// A function providing the duration to wait before retrying. /// The action to call asynchronously on each retry. @@ -1004,6 +1052,7 @@ public static AsyncRetryPolicy WaitAndRetryForeverAsync(this P /// On each retry, the duration to wait is calculated by calling with /// the current retry number (1 for first retry, 2 for second etc), previous execution result and execution context. /// + /// The type of the result. /// The policy builder. /// A function providing the duration to wait before retrying. /// The action to call asynchronously on each retry. @@ -1029,6 +1078,7 @@ public static AsyncRetryPolicy WaitAndRetryForeverAsync(this P /// On each retry, the duration to wait is calculated by calling with /// the current retry number (1 for first retry, 2 for second etc), previous execution result and execution context. /// + /// The type of the result. /// The policy builder. /// A function providing the duration to wait before retrying. /// The action to call asynchronously on each retry. diff --git a/src/Polly/Retry/IRetryPolicy.cs b/src/Polly/Retry/IRetryPolicy.cs index 7dc3a45e523..0e938d039c4 100644 --- a/src/Polly/Retry/IRetryPolicy.cs +++ b/src/Polly/Retry/IRetryPolicy.cs @@ -10,6 +10,7 @@ public interface IRetryPolicy : IsPolicy /// /// Defines properties and methods common to all Retry policies generic-typed for executions returning results of type . /// +/// The type of the result. public interface IRetryPolicy : IRetryPolicy { } diff --git a/src/Polly/Retry/RetryPolicy.cs b/src/Polly/Retry/RetryPolicy.cs index 06042672875..8662c5869bf 100644 --- a/src/Polly/Retry/RetryPolicy.cs +++ b/src/Polly/Retry/RetryPolicy.cs @@ -47,6 +47,7 @@ protected override TResult Implementation(Func /// A retry policy that can be applied to synchronous delegates returning a value of type . /// +/// The type of the result. public class RetryPolicy : Policy, IRetryPolicy { private readonly Action, TimeSpan, int, Context> _onRetry; diff --git a/src/Polly/Retry/RetrySyntax.cs b/src/Polly/Retry/RetrySyntax.cs index c4dd558437a..8a371b9aa41 100644 --- a/src/Polly/Retry/RetrySyntax.cs +++ b/src/Polly/Retry/RetrySyntax.cs @@ -178,7 +178,7 @@ public static RetryPolicy RetryForever(this PolicyBuilder policyBuilder, Action< /// /// The policy builder. /// The retry count. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The policy instance. public static RetryPolicy WaitAndRetry(this PolicyBuilder policyBuilder, int retryCount, Func sleepDurationProvider) { @@ -195,7 +195,7 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilder policyBuilder, int ret /// /// The policy builder. /// The retry count. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. @@ -219,7 +219,7 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilder policyBuilder, int ret /// /// The policy builder. /// The retry count. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. @@ -243,7 +243,7 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilder policyBuilder, int ret /// /// The policy builder. /// The retry count. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. @@ -274,7 +274,7 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilder policyBuilder, int ret /// /// The policy builder. /// The retry count. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The policy instance. public static RetryPolicy WaitAndRetry(this PolicyBuilder policyBuilder, int retryCount, Func sleepDurationProvider) { @@ -291,7 +291,7 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilder policyBuilder, int ret /// /// The policy builder. /// The retry count. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. @@ -315,7 +315,7 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilder policyBuilder, int ret /// /// The policy builder. /// The retry count. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. @@ -338,7 +338,7 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilder policyBuilder, int ret /// /// The policy builder. /// The retry count. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. @@ -438,7 +438,7 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilder policyBuilder, IEnumer /// the current retry number (1 for first retry, 2 for second etc). /// /// The policy builder. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The policy instance. /// Thrown when is . public static RetryPolicy WaitAndRetryForever(this PolicyBuilder policyBuilder, Func sleepDurationProvider) @@ -457,7 +457,7 @@ public static RetryPolicy WaitAndRetryForever(this PolicyBuilder policyBuilder, /// the current retry number (1 for first retry, 2 for second etc) and execution context. /// /// The policy builder. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The policy instance. /// Thrown when is . public static RetryPolicy WaitAndRetryForever(this PolicyBuilder policyBuilder, Func sleepDurationProvider) diff --git a/src/Polly/Retry/RetryTResultSyntax.cs b/src/Polly/Retry/RetryTResultSyntax.cs index c04d9dde0ff..3c1fbc30be5 100644 --- a/src/Polly/Retry/RetryTResultSyntax.cs +++ b/src/Polly/Retry/RetryTResultSyntax.cs @@ -8,6 +8,7 @@ public static class RetryTResultSyntax /// /// Builds a that will retry once. /// + /// The type of the result. /// The policy builder. /// The policy instance. public static RetryPolicy Retry(this PolicyBuilder policyBuilder) => @@ -16,6 +17,7 @@ public static RetryPolicy Retry(this PolicyBuilder po /// /// Builds a that will retry times. /// + /// The type of the result. /// The policy builder. /// The retry count. /// The policy instance. @@ -30,6 +32,7 @@ public static RetryPolicy Retry(this PolicyBuilder po /// Builds a that will retry once /// calling on retry with the handled exception or result and retry count. /// + /// The type of the result. /// The policy builder. /// The action to call on each retry. /// The policy instance. @@ -41,6 +44,7 @@ public static RetryPolicy Retry(this PolicyBuilder po /// Builds a that will retry times /// calling on each retry with the handled exception or result and retry count. /// + /// The type of the result. /// The policy builder. /// The retry count. /// The action to call on each retry. @@ -61,6 +65,7 @@ public static RetryPolicy Retry(this PolicyBuilder po /// Builds a that will retry once /// calling on retry with the handled exception or result, retry count and context data. /// + /// The type of the result. /// The policy builder. /// The action to call on each retry. /// The policy instance. @@ -72,6 +77,7 @@ public static RetryPolicy Retry(this PolicyBuilder po /// Builds a that will retry times /// calling on each retry with the handled exception or result, retry count and context data. /// + /// The type of the result. /// The policy builder. /// The retry count. /// The action to call on each retry. @@ -94,6 +100,7 @@ public static RetryPolicy Retry(this PolicyBuilder po /// /// Builds a that will retry indefinitely until the action succeeds. /// + /// The type of the result. /// The policy builder. /// The policy instance. public static RetryPolicy RetryForever(this PolicyBuilder policyBuilder) @@ -107,6 +114,7 @@ public static RetryPolicy RetryForever(this PolicyBuilder that will retry indefinitely /// calling on each retry with the handled exception or result. /// + /// The type of the result. /// The policy builder. /// The action to call on each retry. /// The policy instance. @@ -123,6 +131,7 @@ public static RetryPolicy RetryForever(this PolicyBuilder that will retry indefinitely /// calling on each retry with the handled exception or result and retry count. /// + /// The type of the result. /// The policy builder. /// The action to call on each retry. /// The policy instance. @@ -139,6 +148,7 @@ public static RetryPolicy RetryForever(this PolicyBuilder that will retry indefinitely /// calling on each retry with the handled exception or result and context data. /// + /// The type of the result. /// The policy builder. /// The action to call on each retry. /// The policy instance. @@ -157,6 +167,7 @@ public static RetryPolicy RetryForever(this PolicyBuilder that will retry indefinitely /// calling on each retry with the handled exception or result, retry count and context data. /// + /// The type of the result. /// The policy builder. /// The action to call on each retry. /// The policy instance. @@ -176,9 +187,10 @@ public static RetryPolicy RetryForever(this PolicyBuilder with /// the current retry number (1 for first retry, 2 for second etc). /// + /// The type of the result. /// The policy builder. /// The retry count. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The policy instance. public static RetryPolicy WaitAndRetry(this PolicyBuilder policyBuilder, int retryCount, Func sleepDurationProvider) { @@ -193,9 +205,10 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilder with /// the current retry number (1 for first retry, 2 for second etc). /// + /// The type of the result. /// The policy builder. /// The retry count. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. @@ -217,9 +230,10 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilder with /// the current retry number (1 for first retry, 2 for second etc). /// + /// The type of the result. /// The policy builder. /// The retry count. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. @@ -241,9 +255,10 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilder with /// the current retry number (1 for first retry, 2 for second etc). /// + /// The type of the result. /// The policy builder. /// The retry count. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. @@ -272,9 +287,10 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilder with /// the current retry number (1 for first retry, 2 for second etc) and execution context. /// + /// The type of the result. /// The policy builder. /// The retry count. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The policy instance. public static RetryPolicy WaitAndRetry(this PolicyBuilder policyBuilder, int retryCount, Func sleepDurationProvider) { @@ -289,9 +305,10 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilder with /// the current retry number (1 for first retry, 2 for second etc) and execution context. /// + /// The type of the result. /// The policy builder. /// The retry count. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. @@ -313,9 +330,10 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilder with /// the current retry number (1 for first retry, 2 for second etc) and execution context. /// + /// The type of the result. /// The policy builder. /// The retry count. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. @@ -331,9 +349,10 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilder with /// the current retry number (1 for first retry, 2 for second etc), previous execution result and execution context. /// + /// The type of the result. /// The policy builder. /// The retry count. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The policy instance. public static RetryPolicy WaitAndRetry(this PolicyBuilder policyBuilder, int retryCount, Func, Context, TimeSpan> sleepDurationProvider) { @@ -348,9 +367,10 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilder with /// the current retry number (1 for first retry, 2 for second etc), previous execution result and execution context. /// + /// The type of the result. /// The policy builder. /// The retry count. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. @@ -372,9 +392,10 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilder with /// the current retry number (1 for first retry, 2 for second etc), previous execution result and execution context. /// + /// The type of the result. /// The policy builder. /// The retry count. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The action to call on each retry. /// The policy instance. /// retryCount;Value must be greater than or equal to zero. @@ -399,6 +420,7 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilder that will wait and retry as many times as there are provided /// On each retry, the duration to wait is the current item. /// + /// The type of the result. /// The policy builder. /// The sleep durations to wait for on each retry. /// The policy instance. @@ -414,6 +436,7 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilder on each retry with the handled exception or result and the current sleep duration. /// On each retry, the duration to wait is the current item. /// + /// The type of the result. /// The policy builder. /// The sleep durations to wait for on each retry. /// The action to call on each retry. @@ -432,6 +455,7 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilder on each retry with the handled exception or result, current sleep duration and context data. /// On each retry, the duration to wait is the current item. /// + /// The type of the result. /// The policy builder. /// The sleep durations to wait for on each retry. /// The action to call on each retry. @@ -450,6 +474,7 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilder on each retry with the handled exception or result, current sleep duration, retry count and context data. /// On each retry, the duration to wait is the current item. /// + /// The type of the result. /// The policy builder. /// The sleep durations to wait for on each retry. /// The action to call on each retry. @@ -473,8 +498,9 @@ public static RetryPolicy WaitAndRetry(this PolicyBuilder with /// the current retry number (1 for first retry, 2 for second etc). /// + /// The type of the result. /// The policy builder. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The policy instance. /// Thrown when is . public static RetryPolicy WaitAndRetryForever(this PolicyBuilder policyBuilder, Func sleepDurationProvider) @@ -492,8 +518,9 @@ public static RetryPolicy WaitAndRetryForever(this PolicyBuild /// 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 type of the result. /// The policy builder. - /// The function that provides the duration to wait for for a particular retry attempt. + /// The function that provides the duration to wait for a particular retry attempt. /// The policy instance. /// Thrown when is . public static RetryPolicy WaitAndRetryForever(this PolicyBuilder policyBuilder, Func sleepDurationProvider) @@ -512,6 +539,7 @@ public static RetryPolicy WaitAndRetryForever(this PolicyBuild /// 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 type of the result. /// The policy builder. /// A function providing the duration to wait before retrying. /// The action to call on each retry. @@ -536,6 +564,7 @@ public static RetryPolicy WaitAndRetryForever(this PolicyBuild /// 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 type of the result. /// The policy builder. /// A function providing the duration to wait before retrying. /// The action to call on each retry. @@ -560,6 +589,7 @@ public static RetryPolicy WaitAndRetryForever(this PolicyBuild /// 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 type of the result. /// The policy builder. /// A function providing the duration to wait before retrying. /// The action to call on each retry. @@ -582,6 +612,7 @@ public static RetryPolicy WaitAndRetryForever(this PolicyBuild /// 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 type of the result. /// The policy builder. /// A function providing the duration to wait before retrying. /// The action to call on each retry. @@ -604,6 +635,7 @@ public static RetryPolicy WaitAndRetryForever(this PolicyBuild /// On each retry, the duration to wait is calculated by calling with /// the current retry number (1 for first retry, 2 for second etc), previous execution result and execution context. /// + /// The type of the result. /// The policy builder. /// A function providing the duration to wait before retrying. /// The action to call on each retry. @@ -629,6 +661,7 @@ public static RetryPolicy WaitAndRetryForever(this PolicyBuild /// On each retry, the duration to wait is calculated by calling with /// the current retry number (1 for first retry, 2 for second etc), previous execution result and execution context. /// + /// The type of the result. /// The policy builder. /// A function providing the duration to wait before retrying. /// The action to call on each retry. diff --git a/src/Polly/Timeout/AsyncTimeoutTResultSyntax.cs b/src/Polly/Timeout/AsyncTimeoutTResultSyntax.cs index 7e73cdfe099..ff1986a2ad6 100644 --- a/src/Polly/Timeout/AsyncTimeoutTResultSyntax.cs +++ b/src/Polly/Timeout/AsyncTimeoutTResultSyntax.cs @@ -5,6 +5,7 @@ public partial class Policy /// /// 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. /// + /// The type of the result. /// The number of seconds after which to timeout. /// seconds;Value must be greater than zero. /// The policy instance. @@ -19,6 +20,7 @@ public static AsyncTimeoutPolicy TimeoutAsync(int seconds) /// /// 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. /// + /// The type of the result. /// The number of seconds after which to timeout. /// The timeout strategy. /// seconds;Value must be greater than zero. @@ -34,6 +36,7 @@ public static AsyncTimeoutPolicy TimeoutAsync(int seconds, Tim /// /// 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. /// + /// The type of the result. /// The number of seconds after which to 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. @@ -50,6 +53,7 @@ public static AsyncTimeoutPolicy TimeoutAsync(int seconds, Fun /// /// 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. /// + /// The type of the result. /// The number of seconds after which to timeout. /// 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. @@ -67,6 +71,7 @@ public static AsyncTimeoutPolicy TimeoutAsync(int seconds, Fun /// /// 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. /// + /// The type of the result. /// The number of seconds after which to timeout. /// The timeout strategy. /// An action to call on timeout, passing the execution context, the timeout applied, and a capturing the abandoned, timed-out action. @@ -84,6 +89,7 @@ public static AsyncTimeoutPolicy TimeoutAsync(int seconds, Tim /// /// 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. /// + /// The type of the result. /// The number of seconds after which to timeout. /// The timeout strategy. /// An action to call on timeout, passing the execution context, the timeout applied, the capturing the abandoned, timed-out action, and the captured . @@ -102,6 +108,7 @@ public static AsyncTimeoutPolicy TimeoutAsync(int seconds, Tim /// /// 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. /// + /// The type of the result. /// The timeout. /// The policy instance. /// timeout;Value must be a positive TimeSpan (or Timeout.InfiniteTimeSpan to indicate no timeout). @@ -116,6 +123,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. /// + /// The type of the result. /// The timeout. /// The timeout strategy. /// The policy instance. @@ -131,6 +139,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. /// + /// The type of the result. /// The 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. @@ -149,6 +158,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. /// + /// The type of the result. /// The timeout. /// 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. @@ -168,6 +178,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. /// + /// The type of the result. /// The timeout. /// The timeout strategy. /// An action to call on timeout, passing the execution context, the timeout applied, and a capturing the abandoned, timed-out action. @@ -185,6 +196,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. /// + /// The type of the result. /// The timeout. /// The timeout strategy. /// An action to call on timeout, passing the execution context, the timeout applied, the capturing the abandoned, timed-out action, and the captured . @@ -202,6 +214,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. /// + /// The type of the result. /// A function to provide the timeout for this execution. /// Thrown when is . /// The policy instance. @@ -217,6 +230,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. /// + /// The type of the result. /// A function to provide the timeout for this execution. /// The timeout strategy. /// Thrown when is . @@ -233,6 +247,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. /// + /// The type of the result. /// A function to provide the timeout for this execution. /// 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. @@ -250,6 +265,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. /// + /// The type of the result. /// A function to provide the timeout for this execution. /// 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. @@ -267,6 +283,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. /// + /// The type of the result. /// A function to provide the timeout for this execution. /// The timeout strategy. /// An action to call on timeout, passing the execution context, the timeout applied, and a capturing the abandoned, timed-out action. @@ -285,6 +302,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. /// + /// The type of the result. /// A function to provide the timeout for this execution. /// The timeout strategy. /// An action to call on timeout, passing the execution context, the timeout applied, the capturing the abandoned, timed-out action, and the captured . @@ -303,6 +321,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. /// + /// The type of the result. /// A function to provide the timeout for this execution. /// Thrown when is . /// The policy instance. @@ -315,6 +334,7 @@ public static AsyncTimeoutPolicy TimeoutAsync(Func /// 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. /// + /// The type of the result. /// A function to provide the timeout for this execution. /// The timeout strategy. /// Thrown when is . @@ -328,6 +348,7 @@ public static AsyncTimeoutPolicy TimeoutAsync(Func /// 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. /// + /// The type of the result. /// A function to provide the timeout for this execution. /// 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. @@ -340,6 +361,7 @@ public static AsyncTimeoutPolicy TimeoutAsync(Func /// 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. /// + /// The type of the result. /// A function to provide the timeout for this execution. /// 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. @@ -352,6 +374,7 @@ public static AsyncTimeoutPolicy TimeoutAsync(Func /// 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. /// + /// The type of the result. /// A function to provide the timeout for this execution. /// The timeout strategy. /// An action to call on timeout, passing the execution context, the timeout applied, and a capturing the abandoned, timed-out action. @@ -370,6 +393,7 @@ public static AsyncTimeoutPolicy TimeoutAsync(Func /// 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. /// + /// The type of the result. /// A function to provide the timeout for this execution. /// The timeout strategy. /// An action to call on timeout, passing the execution context, the timeout applied, the capturing the abandoned, timed-out action, and the captured . diff --git a/src/Polly/Timeout/ITimeoutPolicy.cs b/src/Polly/Timeout/ITimeoutPolicy.cs index 8c4ab380281..df2b44a4fca 100644 --- a/src/Polly/Timeout/ITimeoutPolicy.cs +++ b/src/Polly/Timeout/ITimeoutPolicy.cs @@ -10,6 +10,7 @@ public interface ITimeoutPolicy : IsPolicy /// /// Defines properties and methods common to all Timeout policies generic-typed for executions returning results of type . /// +/// The type of the result. public interface ITimeoutPolicy : ITimeoutPolicy { } diff --git a/src/Polly/Timeout/TimeoutPolicy.cs b/src/Polly/Timeout/TimeoutPolicy.cs index 0f9390ed66f..179b37301db 100644 --- a/src/Polly/Timeout/TimeoutPolicy.cs +++ b/src/Polly/Timeout/TimeoutPolicy.cs @@ -34,6 +34,7 @@ protected override TResult Implementation(Func /// A timeout policy which can be applied to delegates returning a value of type . /// +/// The type of the result. public class TimeoutPolicy : Policy, ITimeoutPolicy { private readonly TimeoutStrategy _timeoutStrategy; diff --git a/src/Polly/Timeout/TimeoutTResultSyntax.cs b/src/Polly/Timeout/TimeoutTResultSyntax.cs index 3ab38addce5..cab88febc5e 100644 --- a/src/Polly/Timeout/TimeoutTResultSyntax.cs +++ b/src/Polly/Timeout/TimeoutTResultSyntax.cs @@ -36,6 +36,7 @@ public static TimeoutPolicy Timeout(int seconds, TimeoutStrate /// /// 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. /// + /// The return type of delegates which may be executed through the policy. /// The number of seconds after which to 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. @@ -51,6 +52,7 @@ public static TimeoutPolicy Timeout(int seconds, Action /// 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. /// + /// The return type of delegates which may be executed through the policy. /// The number of seconds after which to timeout. /// 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. @@ -105,6 +107,7 @@ public static TimeoutPolicy Timeout(int seconds, TimeoutStrate /// /// 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. /// + /// The type of the result. /// The timeout. /// The policy instance. /// timeout;Value must be a positive TimeSpan (or Timeout.InfiniteTimeSpan to indicate no timeout). @@ -135,6 +138,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. /// + /// The return type of delegates which may be executed through the policy. /// The 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. @@ -150,6 +154,7 @@ public static TimeoutPolicy Timeout(TimeSpan timeout, Action /// 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. /// + /// The return type of delegates which may be executed through the policy. /// The timeout. /// 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. @@ -199,6 +204,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. /// + /// The return type of delegates which may be executed through the policy. /// A function to provide the timeout for this execution. /// Thrown when is . /// The policy instance. @@ -231,6 +237,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. /// + /// The return type of delegates which may be executed through the policy. /// A function to provide the timeout for this execution. /// 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. @@ -248,6 +255,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. /// + /// The return type of delegates which may be executed through the policy. /// A function to provide the timeout for this execution. /// 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. @@ -303,6 +311,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. /// + /// The return type of delegates which may be executed through the policy. /// A function to provide the timeout for this execution. /// Thrown when is . /// The policy instance. @@ -329,6 +338,7 @@ public static TimeoutPolicy Timeout(Func ti /// /// 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. /// + /// The return type of delegates which may be executed through the policy. /// A function to provide the timeout for this execution. /// 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. @@ -341,6 +351,7 @@ public static TimeoutPolicy Timeout(Func ti /// /// 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. /// + /// The return type of delegates which may be executed through the policy. /// A function to provide the timeout for this execution. /// 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. diff --git a/src/Polly/Wrap/AsyncPolicyWrapSyntax.cs b/src/Polly/Wrap/AsyncPolicyWrapSyntax.cs index 0bb2cc19367..cbc0cdd6868 100644 --- a/src/Polly/Wrap/AsyncPolicyWrapSyntax.cs +++ b/src/Polly/Wrap/AsyncPolicyWrapSyntax.cs @@ -21,6 +21,7 @@ public static AsyncPolicyWrap WrapAsync(this IAsyncPolicy outerPolicy, IAsyncPol /// /// Wraps the specified outer policy round the inner policy. /// + /// The type of the result. /// The outer policy. /// The inner policy. /// A instance representing the combined wrap. @@ -34,6 +35,7 @@ public static AsyncPolicyWrap WrapAsync(this IAsyncPolicy oute /// /// Wraps the specified outer policy round the inner policy. /// + /// The type of the result. /// The outer policy. /// The inner policy. /// A instance representing the combined wrap. @@ -47,6 +49,7 @@ public static AsyncPolicyWrap WrapAsync(this IAsyncPolicy /// Wraps the specified outer policy round the inner policy. /// + /// The type of the result. /// The outer policy. /// The inner policy. /// A instance representing the combined wrap. diff --git a/src/Polly/Wrap/IPolicyWrap.cs b/src/Polly/Wrap/IPolicyWrap.cs index abea62a2ecd..b8535ea78bd 100644 --- a/src/Polly/Wrap/IPolicyWrap.cs +++ b/src/Polly/Wrap/IPolicyWrap.cs @@ -19,6 +19,7 @@ public interface IPolicyWrap : IsPolicy /// /// Defines properties and methods common to all PolicyWrap policies generic-typed for executions returning results of type . /// +/// The type of the result. public interface IPolicyWrap : IPolicyWrap { } diff --git a/src/Polly/Wrap/PolicyWrapSyntax.cs b/src/Polly/Wrap/PolicyWrapSyntax.cs index a55c9d6c6d5..e44fea20e36 100644 --- a/src/Polly/Wrap/PolicyWrapSyntax.cs +++ b/src/Polly/Wrap/PolicyWrapSyntax.cs @@ -21,6 +21,7 @@ public static PolicyWrap Wrap(this ISyncPolicy outerPolicy, ISyncPolicy innerPol /// /// Wraps the specified outer policy round the inner policy. /// + /// The type of the result. /// The outer policy. /// The inner policy. /// A instance representing the combined wrap. @@ -34,6 +35,7 @@ public static PolicyWrap Wrap(this ISyncPolicy outerPolicy, IS /// /// Wraps the specified outer policy round the inner policy. /// + /// The type of the result. /// The outer policy. /// The inner policy. /// A instance representing the combined wrap. @@ -47,6 +49,7 @@ public static PolicyWrap Wrap(this ISyncPolicy outerP /// /// Wraps the specified outer policy round the inner policy. /// + /// The type of the result. /// The outer policy. /// The inner policy. /// A instance representing the combined wrap. From f32222b70dec918d3d05e5cba3f698c696fdcd71 Mon Sep 17 00:00:00 2001 From: iamdmitrij <3024338+iamdmitrij@users.noreply.github.com> Date: Thu, 25 Apr 2024 23:38:22 +0300 Subject: [PATCH 2/2] Consolidate typeparam text --- src/Polly/CircuitBreaker/AdvancedCircuitBreakerTResultSyntax.cs | 2 +- .../CircuitBreaker/AsyncAdvancedCircuitBreakerTResultSyntax.cs | 2 +- src/Polly/CircuitBreaker/AsyncCircuitBreakerTResultSyntax.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Polly/CircuitBreaker/AdvancedCircuitBreakerTResultSyntax.cs b/src/Polly/CircuitBreaker/AdvancedCircuitBreakerTResultSyntax.cs index 16740fe6472..bc19455523e 100644 --- a/src/Polly/CircuitBreaker/AdvancedCircuitBreakerTResultSyntax.cs +++ b/src/Polly/CircuitBreaker/AdvancedCircuitBreakerTResultSyntax.cs @@ -16,7 +16,7 @@ public static class AdvancedCircuitBreakerTResultSyntax /// again for another ; if no exception or handled result is encountered, the circuit will reset. /// /// - /// The type of the result. + /// The return type of delegates which may be executed through the policy. /// The policy builder. /// The failure threshold at which the circuit will break (a number between 0 and 1; eg 0.5 represents breaking if 50% or more of actions result in a handled failure). /// The duration of the timeslice over which failure ratios are assessed. diff --git a/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerTResultSyntax.cs b/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerTResultSyntax.cs index 930902fac64..67afe0c6fff 100644 --- a/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerTResultSyntax.cs +++ b/src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerTResultSyntax.cs @@ -87,7 +87,7 @@ public static AsyncCircuitBreakerPolicy AdvancedCircuitBreakerAsync; if no exception or handled result is encountered, the circuit will reset. /// /// - /// The type of the result. + /// The return type of delegates which may be executed through the policy. /// The policy builder. /// The failure threshold at which the circuit will break (a number between 0 and 1; eg 0.5 represents breaking if 50% or more of actions result in a handled failure). /// The duration of the timeslice over which failure ratios are assessed. diff --git a/src/Polly/CircuitBreaker/AsyncCircuitBreakerTResultSyntax.cs b/src/Polly/CircuitBreaker/AsyncCircuitBreakerTResultSyntax.cs index 18b424e0ebc..885777e73d5 100644 --- a/src/Polly/CircuitBreaker/AsyncCircuitBreakerTResultSyntax.cs +++ b/src/Polly/CircuitBreaker/AsyncCircuitBreakerTResultSyntax.cs @@ -113,7 +113,7 @@ public static AsyncCircuitBreakerPolicy CircuitBreakerAsync(th /// again for another ; if no exception or handled result is encountered, the circuit will reset. /// /// - /// The type of the result. + /// The return type of delegates which may be executed through the policy. /// The policy builder. /// The number of exceptions or handled results that are allowed before opening the circuit. /// The duration the circuit will stay open before resetting.