<PackageReference Include="Polly.Core" Version="8.0.0-alpha.1" />

TimeoutStrategyOptions

Represents the options for the timeout strategy.
using System; using System.Runtime.CompilerServices; using System.Threading; using System.Threading.Tasks; namespace Polly.Timeout { [System.Runtime.CompilerServices.NullableContext(2)] [System.Runtime.CompilerServices.Nullable(0)] public class TimeoutStrategyOptions : ResilienceStrategyOptions { [System.Runtime.CompilerServices.Nullable(1)] public sealed override string StrategyType { [System.Runtime.CompilerServices.NullableContext(1)] get { return "Timeout"; } } [Timeout] public TimeSpan Timeout { get; set; } = System.Threading.Timeout.InfiniteTimeSpan; [System.Runtime.CompilerServices.Nullable(new byte[] { 2, 0 })] [field: System.Runtime.CompilerServices.Nullable(new byte[] { 2, 0 })] public Func<TimeoutGeneratorArguments, ValueTask<TimeSpan>> TimeoutGenerator { [return: System.Runtime.CompilerServices.Nullable(new byte[] { 2, 0 })] get; [param: System.Runtime.CompilerServices.Nullable(new byte[] { 2, 0 })] set; } public Func<OnTimeoutArguments, ValueTask> OnTimeout { get; set; } } }