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

ChaosLatencyStrategyOptions

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)] public class ChaosLatencyStrategyOptions : ChaosStrategyOptions { public Func<OnLatencyInjectedArguments, ValueTask> OnLatencyInjected { 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; } = ChaosLatencyConstants.DefaultLatency; public ChaosLatencyStrategyOptions() { base.Name = "Chaos.Latency"; } } }