Skip to content

Commit 613279e

Browse files
authored
XML documentation cleanup (#2008)
* Enable documentation generation for `Polly` * Fix CS1734 "XML comment on '{1}' has a paramref tag for '{0}', but there is no parameter by that name" * Fix CS1658 "Type parameter declaration must be an identifier not a type." * Fix SA1616 "Element return value documentation should have text" * Fix SA1648 "inheritdoc should be used with inheriting class" * Fix SA1642 "Constructor summary documentation should begin with standard text" * Fix SA1629 "Documentation text should end with a period" * Fix SA1619 "The documentation for type parameter 'TResult' is missing" * Fix CA1200 "Avoid using cref tags with a prefix" * Fix SA1600 "Elements should be documented"
1 parent 8a1f276 commit 613279e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+153
-91
lines changed

src/Polly/AsyncPolicy.TResult.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Polly;
88
public abstract partial class AsyncPolicy<TResult> : PolicyBase<TResult>
99
{
1010
/// <summary>
11-
/// Constructs a new instance of a derived <see cref="AsyncPolicy{TResult}"/> type with the passed <paramref name="exceptionPredicates"/> and <paramref name="resultPredicates"/>.
11+
/// Initializes a new instance of the <see cref="AsyncPolicy{TResult}"/> class.
1212
/// </summary>
1313
/// <param name="exceptionPredicates">Predicates indicating which exceptions the policy should handle. </param>
1414
/// <param name="resultPredicates">Predicates indicating which results the policy should handle. </param>
@@ -20,7 +20,7 @@ internal AsyncPolicy(
2020
}
2121

2222
/// <summary>
23-
/// Constructs a new instance of a derived <see cref="AsyncPolicy{TResult}"/> type with the passed <paramref name="policyBuilder"/>.
23+
/// Initializes a new instance of the <see cref="AsyncPolicy{TResult}"/> class.
2424
/// </summary>
2525
/// <param name="policyBuilder">A <see cref="PolicyBuilder{TResult}"/> indicating which exceptions and results the policy should handle.</param>
2626
protected AsyncPolicy(PolicyBuilder<TResult>? policyBuilder = null)

src/Polly/AsyncPolicy.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace Polly;
77
public abstract partial class AsyncPolicy
88
{
99
/// <summary>
10-
/// Constructs a new instance of a derived <see cref="AsyncPolicy"/> type with the passed <paramref name="exceptionPredicates"/>.
10+
/// Initializes a new instance of the <see cref="AsyncPolicy"/> class.
1111
/// </summary>
1212
/// <param name="exceptionPredicates">Predicates indicating which exceptions the policy should handle. </param>
1313
internal AsyncPolicy(ExceptionPredicates exceptionPredicates)
@@ -16,7 +16,7 @@ internal AsyncPolicy(ExceptionPredicates exceptionPredicates)
1616
}
1717

1818
/// <summary>
19-
/// Constructs a new instance of a derived <see cref="AsyncPolicy"/> type with the passed <paramref name="policyBuilder"/>.
19+
/// Initializes a new instance of the <see cref="AsyncPolicy"/> class.
2020
/// </summary>
2121
/// <param name="policyBuilder">A <see cref="PolicyBuilder"/> specifying which exceptions the policy should handle. </param>
2222
protected AsyncPolicy(PolicyBuilder? policyBuilder = null)

src/Polly/Bulkhead/AsyncBulkheadTResultSyntax.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ public static AsyncBulkheadPolicy<TResult> BulkheadAsync<TResult>(int maxParalle
3636
/// <returns>The policy instance.</returns>
3737
/// <exception cref="ArgumentOutOfRangeException">maxParallelization;Value must be greater than zero.</exception>
3838
/// <exception cref="ArgumentOutOfRangeException">maxQueuingActions;Value must be greater than or equal to zero.</exception>
39-
/// <exception cref="ArgumentNullException">Thrown when <paramref name="onBulkheadRejectedAsync"/> is <see langword="null"/>.</exception>
4039
public static AsyncBulkheadPolicy<TResult> BulkheadAsync<TResult>(int maxParallelization, int maxQueuingActions)
4140
{
4241
Func<Context, Task> doNothingAsync = _ => TaskHelper.EmptyTask;

src/Polly/Bulkhead/BulkheadPolicy.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ public class BulkheadPolicy<TResult> : Policy<TResult>, IBulkheadPolicy<TResult>
5858
private readonly int _maxQueueingActions;
5959
private readonly Action<Context> _onBulkheadRejected;
6060

61-
/// <inheritdoc/>
6261
internal BulkheadPolicy(
6362
int maxParallelization,
6463
int maxQueueingActions,

src/Polly/Caching/AsyncCacheSyntax.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ public partial class Policy
55
{
66
/// <summary>
77
/// <para>Builds an <see cref="AsyncPolicy"/> that will function like a result cache for delegate executions returning a result.</para>
8-
/// <para>Before executing a delegate returning a result, checks whether the <paramref name="cacheProvider"/> holds a value for the cache key specified by <see cref="M:Context.OperationKey"/>.
8+
/// <para>Before executing a delegate returning a result, checks whether the <paramref name="cacheProvider"/> holds a value for the cache key specified by <see cref="Context.OperationKey"/>.
99
/// If the <paramref name="cacheProvider"/> provides a value, returns that value and does not execute the governed delegate. If the <paramref name="cacheProvider"/> does not provide a value, executes the governed delegate, stores the value with the <paramref name="cacheProvider"/>, then returns the value.
1010
/// </para>
1111
/// </summary>
@@ -19,7 +19,7 @@ public static AsyncCachePolicy CacheAsync(IAsyncCacheProvider cacheProvider, Tim
1919

2020
/// <summary>
2121
/// <para>Builds an <see cref="AsyncPolicy"/> that will function like a result cache for delegate executions returning a result.</para>
22-
/// <para>Before executing a delegate returning a result, checks whether the <paramref name="cacheProvider"/> holds a value for the cache key specified by <see cref="M:Context.OperationKey"/>
22+
/// <para>Before executing a delegate returning a result, checks whether the <paramref name="cacheProvider"/> holds a value for the cache key specified by <see cref="Context.OperationKey"/>
2323
/// If the <paramref name="cacheProvider"/> provides a value, returns that value and does not execute the governed delegate. If the <paramref name="cacheProvider"/> does not provide a value, executes the governed delegate, stores the value with the <paramref name="cacheProvider"/>, then returns the value.
2424
/// </para>
2525
/// </summary>

src/Polly/Caching/AsyncCacheTResultSyntax.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ public partial class Policy
55
{
66
/// <summary>
77
/// <para>Builds an <see cref="AsyncPolicy{TResult}"/> that will function like a result cache for delegate executions returning a <typeparamref name="TResult"/>.</para>
8-
/// <para>Before executing a delegate, checks whether the <paramref name="cacheProvider"/> holds a value for the cache key specified by <see cref="M:Context.OperationKey"/>.
8+
/// <para>Before executing a delegate, checks whether the <paramref name="cacheProvider"/> holds a value for the cache key specified by <see cref="Context.OperationKey"/>.
99
/// If the <paramref name="cacheProvider"/> provides a value from cache, returns that value and does not execute the governed delegate. If the <paramref name="cacheProvider"/> does not provide a value, executes the governed delegate, stores the value with the <paramref name="cacheProvider"/>, then returns the value.
1010
/// </para>
1111
/// </summary>
@@ -24,7 +24,7 @@ public static AsyncCachePolicy<TResult> CacheAsync<TResult>(IAsyncCacheProvider
2424

2525
/// <summary>
2626
/// <para>Builds an <see cref="AsyncPolicy{TResult}"/> that will function like a result cache for delegate executions returning a <typeparamref name="TResult"/>.</para>
27-
/// <para>Before executing a delegate, checks whether the <paramref name="cacheProvider"/> holds a value for the cache key specified by <see cref="M:Context.OperationKey"/>.
27+
/// <para>Before executing a delegate, checks whether the <paramref name="cacheProvider"/> holds a value for the cache key specified by <see cref="Context.OperationKey"/>.
2828
/// If the <paramref name="cacheProvider"/> provides a value from cache, returns that value and does not execute the governed delegate. If the <paramref name="cacheProvider"/> does not provide a value, executes the governed delegate, stores the value with the <paramref name="cacheProvider"/>, then returns the value.
2929
/// </para>
3030
/// </summary>
@@ -343,7 +343,7 @@ public static AsyncCachePolicy<TResult> CacheAsync<TResult>(
343343

344344
/// <summary>
345345
/// <para>Builds an <see cref="AsyncPolicy{TResult}"/> that will function like a result cache for delegate executions returning a <typeparamref name="TResult"/>.</para>
346-
/// <para>Before executing a delegate, checks whether the <paramref name="cacheProvider"/> holds a value for the cache key specified by <see cref="M:Context.OperationKey"/>.
346+
/// <para>Before executing a delegate, checks whether the <paramref name="cacheProvider"/> holds a value for the cache key specified by <see cref="Context.OperationKey"/>.
347347
/// If the <paramref name="cacheProvider"/> provides a value from cache, returns that value and does not execute the governed delegate. If the <paramref name="cacheProvider"/> does not provide a value, executes the governed delegate, stores the value with the <paramref name="cacheProvider"/>, then returns the value.
348348
/// </para>
349349
/// </summary>
@@ -357,7 +357,7 @@ public static AsyncCachePolicy<TResult> CacheAsync<TResult>(IAsyncCacheProvider<
357357

358358
/// <summary>
359359
/// <para>Builds an <see cref="AsyncPolicy{TResult}"/> that will function like a result cache for delegate executions returning a <typeparamref name="TResult"/>.</para>
360-
/// <para>Before executing a delegate, checks whether the <paramref name="cacheProvider"/> holds a value for the cache key specified by <see cref="M:Context.OperationKey"/>.
360+
/// <para>Before executing a delegate, checks whether the <paramref name="cacheProvider"/> holds a value for the cache key specified by <see cref="Context.OperationKey"/>.
361361
/// If the <paramref name="cacheProvider"/> provides a value from cache, returns that value and does not execute the governed delegate. If the <paramref name="cacheProvider"/> does not provide a value, executes the governed delegate, stores the value with the <paramref name="cacheProvider"/>, then returns the value.
362362
/// </para>
363363
/// </summary>
@@ -372,7 +372,7 @@ public static AsyncCachePolicy<TResult> CacheAsync<TResult>(IAsyncCacheProvider<
372372

373373
/// <summary>
374374
/// <para>Builds an <see cref="AsyncPolicy{TResult}"/> that will function like a result cache for delegate executions returning a <typeparamref name="TResult"/>.</para>
375-
/// <para>Before executing a delegate, checks whether the <paramref name="cacheProvider"/> holds a value for the cache key specified by <see cref="M:Context.OperationKey"/>.
375+
/// <para>Before executing a delegate, checks whether the <paramref name="cacheProvider"/> holds a value for the cache key specified by <see cref="Context.OperationKey"/>.
376376
/// If the <paramref name="cacheProvider"/> provides a value from cache, returns that value and does not execute the governed delegate. If the <paramref name="cacheProvider"/> does not provide a value, executes the governed delegate, stores the value with the <paramref name="cacheProvider"/>, then returns the value.
377377
/// </para>
378378
/// </summary>

src/Polly/Caching/AsyncSerializingCacheProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public class AsyncSerializingCacheProvider<TSerialized> : IAsyncCacheProvider
1111
private readonly ICacheItemSerializer<object, TSerialized> _serializer;
1212

1313
/// <summary>
14-
/// Initializes a new instance of the <see cref="AsyncSerializingCacheProvider{TResult, TSerialized}"/> class.
14+
/// Initializes a new instance of the <see cref="AsyncSerializingCacheProvider{TSerialized}"/> class.
1515
/// </summary>
1616
/// <param name="wrappedCacheProvider">The wrapped cache provider.</param>
1717
/// <param name="serializer">The serializer.</param>

src/Polly/Caching/CacheProviderExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace Polly.Caching;
77
public static class CacheProviderExtensions
88
{
99
/// <summary>
10-
/// Provides a strongly <typeparamref name="TCacheFormat"/>-typed version of the supplied <see cref="ISyncCacheProvider"/>
10+
/// Provides a strongly <typeparamref name="TCacheFormat"/>-typed version of the supplied <see cref="ISyncCacheProvider"/>.
1111
/// </summary>
1212
/// <typeparam name="TCacheFormat">The type the returned <see cref="ISyncCacheProvider{TResult}"/> will handle.</typeparam>
1313
/// <param name="nonGenericCacheProvider">The non-generic cache provider to wrap.</param>
@@ -16,7 +16,7 @@ public static ISyncCacheProvider<TCacheFormat> For<TCacheFormat>(this ISyncCache
1616
new GenericCacheProvider<TCacheFormat>(nonGenericCacheProvider);
1717

1818
/// <summary>
19-
/// Provides a strongly <typeparamref name="TCacheFormat"/>-typed version of the supplied <see cref="IAsyncCacheProvider"/>
19+
/// Provides a strongly <typeparamref name="TCacheFormat"/>-typed version of the supplied <see cref="IAsyncCacheProvider"/>.
2020
/// </summary>
2121
/// <typeparam name="TCacheFormat">The type the returned <see cref="IAsyncCacheProvider{TResult}"/> will handle.</typeparam>
2222
/// <param name="nonGenericCacheProvider">The non-generic cache provider to wrap.</param>

src/Polly/Caching/CacheSyntax.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ public partial class Policy
55
{
66
/// <summary>
77
/// <para>Builds a <see cref="Policy"/> that will function like a result cache for delegate executions returning a result.</para>
8-
/// <para>Before executing a delegate returning a result, checks whether the <paramref name="cacheProvider"/> holds a value for the cache key specified by <see cref="M:Context.OperationKey"/>.
8+
/// <para>Before executing a delegate returning a result, checks whether the <paramref name="cacheProvider"/> holds a value for the cache key specified by <see cref="Context.OperationKey"/>.
99
/// If the <paramref name="cacheProvider"/> provides a value from cache, returns that value and does not execute the governed delegate. If the <paramref name="cacheProvider"/> does not provide a value, executes the governed delegate, stores the value with the <paramref name="cacheProvider"/>, then returns the value.
1010
/// </para>
1111
/// </summary>
@@ -19,7 +19,7 @@ public static CachePolicy Cache(ISyncCacheProvider cacheProvider, TimeSpan ttl,
1919

2020
/// <summary>
2121
/// <para>Builds a <see cref="Policy" /> that will function like a result cache for delegate executions returning a result.</para>
22-
/// <para>Before executing a delegate returning a result, checks whether the <paramref name="cacheProvider"/> holds a value for the cache key specified by <see cref="M:Context.OperationKey"/>.
22+
/// <para>Before executing a delegate returning a result, checks whether the <paramref name="cacheProvider"/> holds a value for the cache key specified by <see cref="Context.OperationKey"/>.
2323
/// If the <paramref name="cacheProvider"/> provides a value from cache, returns that value and does not execute the governed delegate. If the <paramref name="cacheProvider"/> does not provide a value, executes the governed delegate, stores the value with the <paramref name="cacheProvider"/>, then returns the value.
2424
/// </para>
2525
/// </summary>

src/Polly/Caching/CacheTResultSyntax.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ public partial class Policy
55
{
66
/// <summary>
77
/// <para>Builds a <see cref="Policy{TResult}"/> that will function like a result cache for delegate executions returning a <typeparamref name="TResult"/>.</para>
8-
/// <para>Before executing a delegate, checks whether the <paramref name="cacheProvider"/> holds a value for the cache key specified by <see cref="M:Context.OperationKey"/>.
8+
/// <para>Before executing a delegate, checks whether the <paramref name="cacheProvider"/> holds a value for the cache key specified by <see cref="Context.OperationKey"/>.
99
/// If the <paramref name="cacheProvider"/> provides a value from cache, returns that value and does not execute the governed delegate. If the <paramref name="cacheProvider"/> does not provide a value, executes the governed delegate, stores the value with the <paramref name="cacheProvider"/>, then returns the value.
1010
/// </para>
1111
/// </summary>
@@ -24,7 +24,7 @@ public static CachePolicy<TResult> Cache<TResult>(ISyncCacheProvider cacheProvid
2424

2525
/// <summary>
2626
/// <para>Builds a <see cref="Policy{TResult}"/> that will function like a result cache for delegate executions returning a <typeparamref name="TResult"/>.</para>
27-
/// <para>Before executing a delegate, checks whether the <paramref name="cacheProvider"/> holds a value for the cache key specified by <see cref="M:Context.OperationKey"/>.
27+
/// <para>Before executing a delegate, checks whether the <paramref name="cacheProvider"/> holds a value for the cache key specified by <see cref="Context.OperationKey"/>.
2828
/// If the <paramref name="cacheProvider"/> provides a value from cache, returns that value and does not execute the governed delegate. If the <paramref name="cacheProvider"/> does not provide a value, executes the governed delegate, stores the value with the <paramref name="cacheProvider"/>, then returns the value.
2929
/// </para>
3030
/// </summary>
@@ -343,7 +343,7 @@ public static CachePolicy<TResult> Cache<TResult>(
343343

344344
/// <summary>
345345
/// <para>Builds a <see cref="Policy{TResult}"/> that will function like a result cache for delegate executions returning a <typeparamref name="TResult"/>.</para>
346-
/// <para>Before executing a delegate, checks whether the <paramref name="cacheProvider"/> holds a value for the cache key specified by <see cref="M:Context.OperationKey"/>.
346+
/// <para>Before executing a delegate, checks whether the <paramref name="cacheProvider"/> holds a value for the cache key specified by <see cref="Context.OperationKey"/>.
347347
/// If the <paramref name="cacheProvider"/> provides a value from cache, returns that value and does not execute the governed delegate. If the <paramref name="cacheProvider"/> does not provide a value, executes the governed delegate, stores the value with the <paramref name="cacheProvider"/>, then returns the value.
348348
/// </para>
349349
/// </summary>
@@ -357,7 +357,7 @@ public static CachePolicy<TResult> Cache<TResult>(ISyncCacheProvider<TResult> ca
357357

358358
/// <summary>
359359
/// <para>Builds a <see cref="Policy{TResult}"/> that will function like a result cache for delegate executions returning a <typeparamref name="TResult"/>.</para>
360-
/// <para>Before executing a delegate, checks whether the <paramref name="cacheProvider"/> holds a value for the cache key specified by <see cref="M:Context.OperationKey"/>.
360+
/// <para>Before executing a delegate, checks whether the <paramref name="cacheProvider"/> holds a value for the cache key specified by <see cref="Context.OperationKey"/>.
361361
/// If the <paramref name="cacheProvider"/> provides a value from cache, returns that value and does not execute the governed delegate. If the <paramref name="cacheProvider"/> does not provide a value, executes the governed delegate, stores the value with the <paramref name="cacheProvider"/>, then returns the value.
362362
/// </para>
363363
/// </summary>
@@ -372,7 +372,7 @@ public static CachePolicy<TResult> Cache<TResult>(ISyncCacheProvider<TResult> ca
372372

373373
/// <summary>
374374
/// <para>Builds a <see cref="Policy{TResult}"/> that will function like a result cache for delegate executions returning a <typeparamref name="TResult"/>.</para>
375-
/// <para>Before executing a delegate, checks whether the <paramref name="cacheProvider"/> holds a value for the cache key specified by <see cref="M:Context.OperationKey"/>.
375+
/// <para>Before executing a delegate, checks whether the <paramref name="cacheProvider"/> holds a value for the cache key specified by <see cref="Context.OperationKey"/>.
376376
/// If the <paramref name="cacheProvider"/> provides a value from cache, returns that value and does not execute the governed delegate. If the <paramref name="cacheProvider"/> does not provide a value, executes the governed delegate, stores the value with the <paramref name="cacheProvider"/>, then returns the value.
377377
/// </para>
378378
/// </summary>

0 commit comments

Comments
 (0)