TimeoutStrategyOptions
Configures the timeout resilience strategy.Properties
TimeSpan
default:"00:00:30"
The default timeout duration.
- Must be greater than 10 milliseconds
- Must be less than 24 hours
- Default is 30 seconds
Func<TimeoutGeneratorArguments, ValueTask<TimeSpan>>?
default:"null"
A generator that produces the timeout for a given execution.When
null, the Timeout property value is used instead.Special values:- Return
TimeSpan.Zeroor negative value: Strategy does nothing - Return
Timeout.InfiniteTimeSpan: Disable timeout for the execution
Func<OnTimeoutArguments, ValueTask>?
default:"null"
A delegate that is invoked when a timeout occurs.
Extension Methods
Add timeout strategies to a resilience pipeline:OnTimeoutArguments
Arguments passed to theOnTimeout callback.
Usage Example
Dynamic Timeouts
UseTimeoutGenerator for per-execution timeout values: