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

TimeoutStrategyOptions

Represents the options for the timeout strategy.
using System; using System.ComponentModel.DataAnnotations; using System.Runtime.CompilerServices; using System.Threading.Tasks; namespace Polly.Timeout { public class TimeoutStrategyOptions : ResilienceStrategyOptions { [Range(typeof(TimeSpan), "00:00:01", "1.00:00:00")] public TimeSpan Timeout { get; set; } = TimeSpan.FromSeconds(30); [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; } [System.Runtime.CompilerServices.Nullable(new byte[] { 2, 1 })] [field: System.Runtime.CompilerServices.Nullable(new byte[] { 2, 1 })] public Func<OnTimeoutArguments, ValueTask> OnTimeout { [return: System.Runtime.CompilerServices.Nullable(new byte[] { 2, 1 })] get; [param: System.Runtime.CompilerServices.Nullable(new byte[] { 2, 1 })] set; } } }