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

ChaosLatencyStrategyOptions

Represents the options for the latency chaos strategy.
using System; using System.Runtime.CompilerServices; using System.Threading.Tasks; namespace Polly.Simmy.Latency { [NullableContext(2)] [Nullable(0)] public class ChaosLatencyStrategyOptions : ChaosStrategyOptions { public Func<OnLatencyInjectedArguments, ValueTask> OnLatencyInjected { get; set; } [Nullable(new byte[] { 2, 0 })] [field: Nullable(new byte[] { 2, 0 })] public Func<LatencyGeneratorArguments, ValueTask<TimeSpan>> LatencyGenerator { [return: Nullable(new byte[] { 2, 0 })] get; [param: Nullable(new byte[] { 2, 0 })] set; } public TimeSpan Latency { get; set; } = ChaosLatencyConstants.DefaultLatency; public ChaosLatencyStrategyOptions() { base.Name = "Chaos.Latency"; } } }