Skip to content

Commit

Permalink
Improve documentation (#1487)
Browse files Browse the repository at this point in the history
  • Loading branch information
martintmk authored Aug 15, 2023
1 parent d72ae6c commit 72e5599
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public class CircuitBreakerStrategyOptions<TResult> : ResilienceStrategyOptions
#pragma warning restore

/// <summary>
/// Gets or sets the predicates for the circuit breaker.
/// Gets or sets a predicate that determines whether the outcome should be handled by the circuit breaker.
/// </summary>
/// <value>
/// The default value is a predicate that handles circuit breaker on any exception except <see cref="OperationCanceledException"/>.
Expand Down
4 changes: 2 additions & 2 deletions src/Polly.Core/Fallback/FallbackStrategyOptions.TResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class FallbackStrategyOptions<TResult> : ResilienceStrategyOptions
public FallbackStrategyOptions() => Name = FallbackConstants.DefaultName;

/// <summary>
/// Gets or sets the outcome predicate for determining whether a fallback should be executed.
/// Gets or sets a predicate that determines whether the fallback should be executed for a given outcome.
/// </summary>
/// <value>
/// The default value is a predicate that fallbacks on any exception except <see cref="OperationCanceledException"/>. This property is required.
Expand All @@ -32,7 +32,7 @@ public class FallbackStrategyOptions<TResult> : ResilienceStrategyOptions
public Func<OutcomeArguments<TResult, FallbackPredicateArguments>, ValueTask<Outcome<TResult>>>? FallbackAction { get; set; }

/// <summary>
/// Gets or sets the outcome event instance responsible for triggering fallback events.
/// Gets or sets event delegate that is raised when fallback happens.
/// </summary>
/// <value>
/// The default value is <see langword="null"/> instance.
Expand Down
6 changes: 3 additions & 3 deletions src/Polly.Core/Hedging/HedgingStrategyOptions.TResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class HedgingStrategyOptions<TResult> : ResilienceStrategyOptions
public int MaxHedgedAttempts { get; set; } = HedgingConstants.DefaultMaxHedgedAttempts;

/// <summary>
/// Gets or sets the predicate that determines whether a hedging should be performed for a given result.
/// Gets or sets a predicate that determines whether the hedging should be executed for a given outcome.
/// </summary>
/// <value>
/// The default value is a predicate that hedges on any exception except <see cref="OperationCanceledException"/>.
Expand All @@ -51,7 +51,7 @@ public class HedgingStrategyOptions<TResult> : ResilienceStrategyOptions
public Func<OutcomeArguments<TResult, HedgingPredicateArguments>, ValueTask<bool>> ShouldHandle { get; set; } = DefaultPredicates<HedgingPredicateArguments, TResult>.HandleOutcome;

/// <summary>
/// Gets or sets the hedging action generator that creates hedged actions.
/// Gets or sets a generator that creates hedged actions.
/// </summary>
/// <value>
/// The default generator executes the original callback that was passed to the hedging resilience strategy. This property is required.
Expand All @@ -71,7 +71,7 @@ public class HedgingStrategyOptions<TResult> : ResilienceStrategyOptions
};

/// <summary>
/// Gets or sets the generator that generates hedging delays for each hedging attempt.
/// Gets or sets a generator that generates hedging delays for each hedging attempt.
/// </summary>
/// <remarks>
/// The <see cref="HedgingDelayGenerator"/> takes precedence over <see cref="HedgingDelay"/>. If specified, the <see cref="HedgingDelay"/> is ignored.
Expand Down
6 changes: 3 additions & 3 deletions src/Polly.Core/Retry/RetryStrategyOptions.TResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public class RetryStrategyOptions<TResult> : ResilienceStrategyOptions
#pragma warning restore IL2026

/// <summary>
/// Gets or sets an outcome predicate that is used to register the predicates to determine if a retry should be performed.
/// Gets or sets a predicate that determines whether the retry should be executed for a given outcome.
/// </summary>
/// <value>
/// The default is a delegate that retries on any exception except <see cref="OperationCanceledException"/>. This property is required.
Expand All @@ -82,7 +82,7 @@ public class RetryStrategyOptions<TResult> : ResilienceStrategyOptions
public Func<OutcomeArguments<TResult, RetryPredicateArguments>, ValueTask<bool>> ShouldHandle { get; set; } = DefaultPredicates<RetryPredicateArguments, TResult>.HandleOutcome;

/// <summary>
/// Gets or sets the generator instance that is used to calculate the time between retries.
/// Gets or sets a generator instance that calculates the time between retries.
/// </summary>
/// <remarks>
/// The generator has precedence over <see cref="BaseDelay"/> and <see cref="BackoffType"/>.
Expand All @@ -93,7 +93,7 @@ public class RetryStrategyOptions<TResult> : ResilienceStrategyOptions
public Func<OutcomeArguments<TResult, RetryDelayArguments>, ValueTask<TimeSpan>>? RetryDelayGenerator { get; set; }

/// <summary>
/// Gets or sets an outcome event that is used to register on-retry callbacks.
/// Gets or sets an event delegate that is raised when the retry happens.
/// </summary>
/// <remarks>
/// After this event, the result produced the by user-callback is discarded and disposed to prevent resource over-consumption. If
Expand Down
4 changes: 2 additions & 2 deletions src/Polly.Core/Timeout/TimeoutStrategyOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class TimeoutStrategyOptions : ResilienceStrategyOptions
#pragma warning restore IL2026

/// <summary>
/// Gets or sets the timeout generator that generates the timeout for a given execution.
/// Gets or sets a timeout generator that generates the timeout for a given execution.
/// </summary>
/// <remarks>
/// If generator returns a <see cref="TimeSpan"/> value that is less or equal to <see cref="TimeSpan.Zero"/>
Expand All @@ -39,7 +39,7 @@ public class TimeoutStrategyOptions : ResilienceStrategyOptions
public Func<TimeoutGeneratorArguments, ValueTask<TimeSpan>>? TimeoutGenerator { get; set; }

/// <summary>
/// Gets or sets the timeout that's raised when timeout occurs.
/// Gets or sets the timeout delegate that raised when timeout occurs.
/// </summary>
/// <value>
/// The default value is <see langword="null"/>.
Expand Down
2 changes: 1 addition & 1 deletion src/Polly.RateLimiting/RateLimiterStrategyOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class RateLimiterStrategyOptions : ResilienceStrategyOptions
public Func<OnRateLimiterRejectedArguments, ValueTask>? OnRejected { get; set; }

/// <summary>
/// Gets or sets the rate limiter that the strategy uses.
/// Gets or sets a rate limiter used by the strategy.
/// </summary>
/// <value>
/// The default value is <see langword="null"/>. If this property is <see langword="null"/>, then the strategy
Expand Down

0 comments on commit 72e5599

Please sign in to comment.