<PackageReference Include="Polly.Core" Version="8.2.0" />

LatencyStrategyOptions

Represents the options for the Latency chaos strategy.
using System; using System.Runtime.CompilerServices; using System.Threading.Tasks; namespace Polly.Simmy.Latency { [System.Runtime.CompilerServices.NullableContext(2)] [System.Runtime.CompilerServices.Nullable(0)] internal class LatencyStrategyOptions : MonkeyStrategyOptions { public Func<OnLatencyArguments, ValueTask> OnLatency { get; set; } [System.Runtime.CompilerServices.Nullable(new byte[] { 2, 0 })] [field: System.Runtime.CompilerServices.Nullable(new byte[] { 2, 0 })] public Func<LatencyGeneratorArguments, ValueTask<TimeSpan>> LatencyGenerator { [return: System.Runtime.CompilerServices.Nullable(new byte[] { 2, 0 })] get; [param: System.Runtime.CompilerServices.Nullable(new byte[] { 2, 0 })] set; } public TimeSpan Latency { get; set; } = LatencyConstants.DefaultLatency; } }