Skip to content

Commit

Permalink
improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
martintmk committed Aug 29, 2023
1 parent b53c9ea commit a50d85a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
14 changes: 5 additions & 9 deletions src/Polly.Core/Hedging/HedgingStrategyOptions.TResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ public class HedgingStrategyOptions<TResult> : ResilienceStrategyOptions
public HedgingStrategyOptions() => Name = HedgingConstants.DefaultName;

/// <summary>
/// Gets or sets the minimal time of waiting before spawning a new hedged call.
/// Gets or sets the maximum waiting time before spawning a new hedged action.
/// </summary>
/// <remarks>
/// You can also use <see cref="TimeSpan.Zero"/> to create all hedged tasks (value of <see cref="MaxHedgedAttempts"/>) at once
/// or <see cref="System.Threading.Timeout.InfiniteTimeSpan"/> to force the hedging strategy to never create new task before the old one is finished.
/// You can use <see cref="TimeSpan.Zero"/> to create all hedged actions (value of <see cref="MaxHedgedAttempts"/>) at once
/// or <see cref="System.Threading.Timeout.InfiniteTimeSpan"/> to force the hedging strategy to never create new action before the old one is finished.
/// <para> If you want a greater control over hedging delay customization use <see cref="DelayGenerator"/>.</para>
/// </remarks>
/// <value>
Expand All @@ -27,12 +27,8 @@ public class HedgingStrategyOptions<TResult> : ResilienceStrategyOptions
public TimeSpan Delay { get; set; } = HedgingConstants.DefaultHedgingDelay;

/// <summary>
/// Gets or sets the maximum hedged attempts to perform the desired task.
/// Gets or sets the maximum number of hedged actions to use, in addition to the original action.
/// </summary>
/// <remarks>
/// The value defines the maximum number of hedged tasks that are executed by the strategy.
/// This value does not include the primary hedged task that is always performed initially.
/// </remarks>
/// <value>
/// The default value is 1. The value must be bigger or equal to 1, and lower or equal to 10.
/// </value>
Expand Down Expand Up @@ -70,7 +66,7 @@ public class HedgingStrategyOptions<TResult> : ResilienceStrategyOptions
};

/// <summary>
/// Gets or sets a generator that generates hedging delays for each hedging attempt.
/// Gets or sets a generator that generates hedging delays for each hedging action.
/// </summary>
/// <remarks>
/// The <see cref="DelayGenerator"/> takes precedence over <see cref="Delay"/>. If specified, the <see cref="Delay"/> is ignored.
Expand Down
2 changes: 1 addition & 1 deletion src/Polly.Core/Retry/RetryStrategyOptions.TResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public class RetryStrategyOptions<TResult> : ResilienceStrategyOptions
public Func<RetryPredicateArguments<TResult>, ValueTask<bool>> ShouldHandle { get; set; } = DefaultPredicates<RetryPredicateArguments<TResult>, TResult>.HandleOutcome;

/// <summary>
/// Gets or sets a generator instance that calculates the time between retries.
/// Gets or sets a generator that calculates the delay between retries.
/// </summary>
/// <remarks>
/// The generator has precedence over <see cref="Delay"/> and <see cref="BackoffType"/>.
Expand Down

0 comments on commit a50d85a

Please sign in to comment.