using System; namespace ScreenConnect; public struct OperationRetryOptions { public static OperationRetryOptions NoRetry = new OperationRetryOptions { RetryCount = 0 }; public static OperationRetryOptions Default = new OperationRetryOptions(); public static OperationRetryOptions Retry5TimesWithoutSleeping = new OperationRetryOptions { RetryCount = 5, SleepMillisecondsBetweenRetries = 0 }; public static OperationRetryOptions Retry5TimesWith1SecondSleep = new OperationRetryOptions { RetryCount = 5, SleepMillisecondsBetweenRetries = 1000 }; public Func? TransientExceptionChecker { get; init; } = null; public int RetryCount { get; init; } = 5; public int SleepMillisecondsBetweenRetries { get; init; } = 0; public OperationRetryOptions() { } }