• NeonSDK
  • NeonKUBE
Search Results for

    Show / Hide Table of Contents
    • Neon
      • Build
    • Neon.Blazor
      • BlazorHelper
      • BodyOutlet
      • ClientRenderContext
      • DOMRectReadOnly
      • EventHandlers
      • FileDownloader
      • HtmlElement
      • IRenderContext
      • IntersectionChangedEventArgs
      • IntersectionObserver
      • IntersectionObserverContext
      • MobileDetector
      • NeonBlazorExtensions
      • ServerRenderContext
      • SwipeDirection
      • SwipeHandler
    • Neon.Blazor.Analyzers
      • SvgGenerator
      • SvgGenerator.Svg
    • Neon.BuildInfo
      • ThisAssembly
      • ThisAssembly.Git
      • ThisAssembly.Git.BaseVersion
      • ThisAssembly.Git.SemVer
    • Neon.CSharp
      • CSharpHelper
      • CompilerErrorException
      • MetadataReferences
    • Neon.Cassandra
      • KeyspaceStatus
      • RowSetExtensions
      • SchemaManager
      • SchemaManagerException
      • SchemaStatus
      • SessionExtensions
    • Neon.Collections
      • ArgDictionary
      • Bits
      • IObjectDictionary
      • NiceDictionary<TKey, TValue>
      • ObjectDictionary
    • Neon.Common
      • AppDomainExtensions
      • Block
      • BlockArray
      • ByteEncoding
      • ByteUnits
      • CommandLine
      • CommandLine.OptionDefinition
      • CommandLine.Redactor
      • CpuArchitecture
      • Credentials
      • DateTimeExtensions
      • EnumExtensions
      • EnvironmentParser
      • EnvironmentParser.Parser<T>
      • EnvironmentParser.Validator<T>
      • EnvironmentParser.VariableSource
      • ExceptionExtensions
      • ExecuteException
      • ExecuteResponse
      • GlobPattern
      • HexDumpOption
      • HttpClientExtensions
      • HttpResponseMessageExtensions
      • IEnumerableExtensions
      • ILabeled
      • IOExtensions
      • IServiceContainer
      • IStaticDirectoryExtensions
      • LabelSelector
      • LabelSelectorOptions
      • LabelSelector<TItem>
      • NeonAssemblyExtensions
      • NeonExtendedHelper
      • NeonHelper
      • NetFramework
      • NewtonsoftExtensions
      • NotReadyException
      • ProcessExtensions
      • ProgramEntrypoint
      • ProgramEntrypointAsync
      • ProgramExitException
      • ProgramRunner
      • RandomExtensions
      • ReflectionExtensions
      • SemanticVersion
      • ServiceContainer
      • StaticZipOptions
      • StringBuilderExtensions
      • StringExtensions
      • Stub
      • Stub.Value
      • TaskExtensions
      • TimeSpanExtensions
      • ToolException
      • TriState
      • WeakEventController
      • WindowsEdition
      • WindowsFeatureStatus
      • YamlDotNetExtensions
    • Neon.Cryptography
      • AesCipher
      • CryptoExtensions
      • CryptoHelper
      • NeonVault
      • Wildcard
    • Neon.Csv
      • CsvReader
      • CsvTableReader
      • CsvTableWriter
      • CsvWriter
    • Neon.Data
      • DateTimeJsonConverter
      • DateTimeOffsetJsonConverter
      • IEnhancedJsonConverter
      • IGeneratedServiceClient
      • IPersistableType
      • IPersistableType<T>
      • IRoundtripData
      • IntegerEnumConverter<TEnum>
      • NotifyPropertyChanged
      • RoundtripDataFactory
      • RoundtripDataHelper
      • TimeSpanJsonConverter
      • VersionJsonConverter
    • Neon.Deployment
      • AwsCli
      • DeploymentException
      • DeploymentHelper
      • DownloadManifest
      • DownloadPart
      • DownloadProgressDelegate
      • DownloadProgressType
      • GitHub
      • GitHubActionsApi
      • GitHubPackage
      • GitHubPackageApi
      • GitHubPackageType
      • GitHubPackageVersion
      • GitHubPackageVisibility
      • GitHubReleaseApi
      • GitHubRepoPath
      • GitHubTagApi
      • IProfileClient
      • IProfileRequest
      • IProfileResponse
      • MaintainerProfile
      • NotifyClient
      • OnePassword
      • OnePasswordException
      • ProfileException
      • ProfileHandlerResult
      • ProfileRequest
      • ProfileResponse
      • ProfileServer
      • ProfileStatus
      • XenServer
    • Neon.Deployment.CodeSigning
      • AzureProfile
      • CodeSigner
      • UsbTokenProfile
    • Neon.Diagnostics
      • AssertException
      • ConfigExtensions
      • ConsoleJsonLogExporter
      • ConsoleJsonLogExporterOptions
      • ConsoleTextLogExporter
      • ConsoleTextLogExporterOptions
      • ExceptionInfo
      • FileLogExporter
      • FileLogExporterFormat
      • FileLogExporterOptions
      • LogAsTraceProcessor
      • LogAsTraceProcessorOptions
      • LogAttributeNames
      • LogAttributes
      • LogEvent
      • LogEventInterceptor
      • LoggerExtensions
      • NullLogger
      • TelemetryHub
      • TelemetrySpanEventNames
      • TelemetrySpanExtensions
    • Neon.Docker
      • DockerClient
      • DockerNetwork
      • DockerNetworkContainer
      • DockerNetworkIpam
      • DockerNode
      • DockerNodeManagerStatus
      • DockerResponse
      • DockerSettings
      • DockerVolume
      • NetworkCreateResponse
      • ServiceBindOptions
      • ServiceConfig
      • ServiceContainerSpec
      • ServiceCredentialSpec
      • ServiceDetails
      • ServiceDiscreteResourceSpec
      • ServiceDnsConfig
      • ServiceEndpoint
      • ServiceEndpointMode
      • ServiceEndpointPortConfig
      • ServiceEndpointSpec
      • ServiceFile
      • ServiceGenericResources
      • ServiceGlobalSchedulingMode
      • ServiceHealthCheck
      • ServiceIsolationMode
      • ServiceListResponse
      • ServiceLogDriver
      • ServiceMode
      • ServiceMount
      • ServiceMountBindPropagation
      • ServiceMountConsistency
      • ServiceMountType
      • ServiceNamedResourceSpec
      • ServiceNetwork
      • ServicePlacement
      • ServicePlacementPreferences
      • ServicePlacementSpreadSettings
      • ServicePlatform
      • ServicePortMode
      • ServicePortProtocol
      • ServicePrivileges
      • ServiceReplicatedSchedulingMode
      • ServiceResourceSettings
      • ServiceResources
      • ServiceRestartCondition
      • ServiceRestartPolicy
      • ServiceRollbackConfig
      • ServiceRollbackFailureAction
      • ServiceRollbackOrder
      • ServiceSELinuxContext
      • ServiceSchedulingMode
      • ServiceSecret
      • ServiceSpec
      • ServiceTaskTemplate
      • ServiceTmpfsOptions
      • ServiceUpdateConfig
      • ServiceUpdateFailureAction
      • ServiceUpdateOrder
      • ServiceUpdateState
      • ServiceUpdateStatus
      • ServiceVersion
      • ServiceVirtualIP
      • ServiceVolumeDriverConfig
      • ServiceVolumeOptions
      • VolumeListResponse
    • Neon.GitHub
      • GitExtensions
      • GitHubCredentials
      • GitHubRepo
      • LocalRepoApi
      • NoLocalRepositoryException
      • RemoteRepoApi
      • RemoteRepoBranchApi
      • RemoteRepoIssueApi
      • RemoteRepoIssueCommentApi
      • RemoteRepoPath
      • RemoteRepoReleaseApi
      • RemoteRepoTagApi
    • Neon.HyperV
      • HyperVClient
      • HyperVDriverType
      • HyperVException
      • NetAdapter
      • VirtualDrive
      • VirtualIPAddress
      • VirtualMachine
      • VirtualMachineNetworkAdapter
      • VirtualMachineState
      • VirtualNat
      • VirtualSwitch
      • VirtualSwitchType
    • Neon.IO
      • BlockStream
      • FixedLengthStream
      • IStaticDirectory
      • IStaticFile
      • LineEnding
      • LinuxPath
      • LinuxPermissions
      • PreprocessReader
      • RelayStream
      • StaticDirectoryBase
      • StaticFileBase
      • SubStream
      • TempFile
      • TempFolder
    • Neon.JsonConverters
      • JsonDateTimeConverter
      • JsonGenericConverter<T>
      • JsonNullableDateTimeConverter
    • Neon.ModelGen
      • ActionResult<T>
      • ApiVersion
      • ApiVersionAttribute
      • BodyStreamAttribute
      • ControllerValidationAttribute
      • DataModelAttribute
      • EnumMember
      • FromBodyAttribute
      • FromHeaderAttribute
      • FromQueryAttribute
      • FromRouteAttribute
      • GeneratedClientAttribute
      • GeneratedMethodAttribute
      • GeneratedParamAttribute
      • HashSourceAttribute
      • HttpAttribute
      • HttpDeleteAttribute
      • HttpGetAttribute
      • HttpHeadAttribute
      • HttpOptionsAttribute
      • HttpPatchAttribute
      • HttpPostAttribute
      • HttpPutAttribute
      • IActionResult
      • ModelGenerator
      • ModelGeneratorOutput
      • ModelGeneratorSettings
      • NoCodeGenAttribute
      • NoControllerValidationAttribute
      • PassAs
      • PersistableAttribute
      • PersistableKeyAttribute
      • RouteAttribute
      • ServiceModelAttribute
      • TargetAttribute
      • UxFrameworks
    • Neon.Net
      • HttpApiException
      • HttpException
      • JsonClient
      • JsonClientPayload
      • JsonResponse
      • Jwt
      • LocalHostSection
      • NetConst
      • NetHelper
      • NetworkCidr
      • NetworkConfiguration
      • NetworkException
      • NetworkPorts
      • Pinger
      • ReachableHost
      • ReachableHostMode
      • StreamDocument
    • Neon.Postgres
      • ConnectionExtensions
      • DatabaseStatus
      • PreparedCommand
      • ReaderAsyncEnumerator
      • ReaderEnumerator
      • ReaderExtensions
      • SchemaManager
      • SchemaManagerException
      • SchemaStatus
    • Neon.Retry
      • ExponentialRetryPolicy
      • IRetryPolicy
      • LinearRetryPolicy
      • NoRetryPolicy
      • RetryPolicy
      • RetryPolicyBase
      • RetryTransientArgs
      • TransientDetector
      • TransientException
    • Neon.Roslyn
      • DisplayFormat
      • DocumentationComment
      • DocumentationItem
      • MetadataLoadContext
      • RoslynAssembly
      • RoslynConstructorInfo
      • RoslynCustomAttributeData
      • RoslynExtensions
      • RoslynFieldInfo
      • RoslynMethodInfo
      • RoslynParameterInfo
      • RoslynPropertyInfo
      • RoslynType
      • SharedUtilities
    • Neon.Roslyn.Xunit
      • AdditionalSourceText
      • CompilationOptions
      • CompilationOptionsProvider
      • TestCompilation
      • TestCompilationAssertions
      • TestCompilationBuilder
      • TestCompilationBuilderExtensions
      • TestCompilationExtensions
    • Neon.SSH
      • CommandBundle
      • CommandFile
      • CommandResponse
      • HostFolders
      • IBashCommandFormatter
      • ILinuxSshProxy
      • LinuxDiskInfo
      • LinuxDiskPartition
      • LinuxSshProxy
      • LinuxSshProxy<TMetadata>
      • NamespaceDoc
      • RemoteCommandException
      • RunOptions
      • SshCredentials
      • SshExtensions
      • SshProxyException
    • Neon.Service
      • LogMetricsProcessor
      • MetricsMode
      • MetricsOptions
      • NeonService
      • NeonServiceOptions
      • NeonServiceStatus
      • OtelConfigExtensions
      • OtlpCollectorChecker
      • ProcessTerminator
      • ServiceApiContact
      • ServiceApiInfo
      • ServiceApiLicense
      • ServiceDependencies
      • ServiceDescription
      • ServiceEndpoint
      • ServiceEndpointProtocol
      • ServiceEndpoints
      • ServiceMap
    • Neon.SignalR
      • DependencyInjectionExtensions
      • DnsCache
      • GroupAction
      • GroupCommand
      • IDnsCache
      • Invocation
      • NatsHubLifetimeManager<THub>
      • ProxyConfig
      • ServiceCollectionExtensions
      • ServiceDiscovey
      • SignalrProxyMiddleware
      • SignalrProxyMiddlewareExtensions
      • TracerProviderBuilderExtensions
    • Neon.Tailwind
      • ClickOffEventHandler
      • ComponentEventArgs<TSender>
      • ComponentEventArgs<TSender, TEventArgs>
      • DisclosureState
      • EventHandlerComponentBase<TComponent>
      • HeadlessButton
      • HeadlessDialog
      • HeadlessDialogPanel
      • HeadlessDisclosure
      • HeadlessDisclosureButton
      • HeadlessDisclosurePanel
      • HeadlessListboxButton<TValue>
      • HeadlessListboxLabel<TValue>
      • HeadlessListboxOption<TValue>
      • HeadlessListboxOptions<TValue>
      • HeadlessListbox<TValue>
      • HeadlessMenu
      • HeadlessMenuButton
      • HeadlessMenuItem
      • HeadlessMenuItems
      • HeadlessSwitch
      • HeadlessSwitchGroup
      • HeadlessSwitchLabel
      • IPortalBinder
      • KeyDownEventHandler
      • KeyboardKey
      • ListboxFocus
      • ListboxState
      • MenuFocus
      • MenuState
      • Portal
      • PortalBinder
      • PortalContent
      • SearchAssistant
      • TailwindExtensions
      • Transition
      • TransitionGroup
      • TransitionState
    • Neon.Tasks
      • Async
      • AsyncAutoResetEvent
      • AsyncManualResetEvent
      • AsyncMutex
      • AsyncPeriodicTask
      • AsyncReaderWriterLock
      • AsyncReentrantMutex
      • AsyncTimer
      • IAsyncFuture
      • IAsyncFuture<T>
      • NonDisposableTask
      • NonDisposableTask<T>
      • SyncContext
      • SyncContextMode
    • Neon.Temporal
      • ActivityHelper
      • ActivityLogEnricher
      • TemporalEnricherTagNames
      • WorkflowLogEnricher
    • Neon.Time
      • GatedTimer
      • GoDuration
      • PolledTimer
      • RecurringTimer
      • RecurringTimerType
      • SysTime
      • TimeOfDay
    • Neon.WSL
      • Wsl2Proxy
    • Neon.Web
      • AesProtector
      • DataProtectionExtensions
      • NeonController
      • NeonControllerBase
      • RoundTripJsonInputFormatter
      • RoundTripJsonOutputFormatter
      • TracerProviderBuilderExtensions
      • WebHelper
    • Neon.WinTTY
      • ConsoleTTY
    • Neon.Windows
      • MEMORYSTATUSEX
      • PowerShellException
      • Win32
    • Neon.XenServer
      • IXenClient
      • XenClient
      • XenClient.MachineOperations
      • XenClient.StorageOperations
      • XenClient.TemplateOperations
      • XenException
      • XenHostInfo
      • XenObject
      • XenResponse
      • XenStorageRepository
      • XenTempIso
      • XenTemplate
      • XenVirtualDisk
      • XenVirtualMachine
      • XenVmPowerState
    • Neon.Xunit
      • AnsiblePlayResults
      • AnsiblePlayer
      • AnsibleTaskResult
      • AspNetFixture
      • BasicFixture
      • CodeFixture
      • CollectionComparer<T>
      • ComposedFixture
      • ContainerFixture
      • ContainerLimits
      • DockerComposeFixture
      • DockerFixture
      • DockerFixture.ConfigInfo
      • DockerFixture.ContainerInfo
      • DockerFixture.NetworkInfo
      • DockerFixture.SecretInfo
      • DockerFixture.ServiceInfo
      • DockerFixture.StackDefinition
      • DockerFixture.StackInfo
      • DockerFixture.StackService
      • EnvironmentFixture
      • HostsFixture
      • ITestFixture
      • IncompatibleServiceException
      • MaintainerFactAttribute
      • MaintainerTheoryAttribute
      • MockHttpServer
      • MockHttpServerExtensions
      • NatsFixture
      • NatsStreamingFixture
      • NeonServiceFixture<TService>
      • PlatformFactAttribute
      • RepeatAttribute
      • TargetPlatforms
      • TestArea
      • TestCollection
      • TestContext
      • TestFixture
      • TestFixtureStatus
      • TestHelper
      • TestHttpClient
      • TestOutputWriter
      • TestTrait
      • XunitExtensions
    • Neon.Xunit.YugaByte
      • YugaByteFixture
    • Neon.YugaByte
      • YugaByteHelper

    Class LinearRetryPolicy

    Implements a simple IRetryPolicy that retries an operation at a fixed interval for a specified maximum number of times.

    Inheritance
    object
    RetryPolicyBase
    LinearRetryPolicy
    Implements
    IRetryPolicy
    Inherited Members
    RetryPolicyBase.DefaultCategoryName
    RetryPolicyBase.Timeout
    RetryPolicyBase.OnTransient
    RetryPolicyBase.CategoryName
    RetryPolicyBase.LogTransient(Exception)
    RetryPolicyBase.SysDeadline()
    RetryPolicyBase.AdjustDelay(TimeSpan, DateTime)
    Namespace: Neon.Retry
    Assembly: Neon.Common.dll
    Syntax
    public class LinearRetryPolicy : RetryPolicyBase, IRetryPolicy
    Remarks

    You can enable transient error logging by passing a non-empty logCategory name to the constructor. This creates an embedded ILogger using that name and any retried transient errors will then be logged as warnings including [transient-retry] in the message.

    note

    Only the retried errors will be logged. The final exception thrown after all retries fail will not be logged because it's assumed that these will be caught and handled upstack by application code.

    Choose a category name that can be used to easily identify the affected component. For example, yugabyte:my-cluster to identify a specific YugaBYte database cluster.

    Constructors

    LinearRetryPolicy(Func<Exception, bool>, int, TimeSpan?, TimeSpan?, string)

    Constructs the retry policy with a specific transitent detection function.

    Declaration
    public LinearRetryPolicy(Func<Exception, bool> transientDetector = null, int maxAttempts = -1, TimeSpan? retryInterval = null, TimeSpan? timeout = null, string categoryName = "transient-errors")
    Parameters
    Type Name Description
    Func<Exception, bool> transientDetector

    Optionally specifies the function that determines whether an exception is transient (see TransientDetector). You can pass null when all exceptions are to be considered to be transient.

    int maxAttempts

    Optionally specifies the maximum number of times an action should be retried (defaults to 5).

    TimeSpan? retryInterval

    Optionally specifies time interval between retry attempts (defaults to 1 second).

    TimeSpan? timeout

    Optionally specifies the maximum time the operation will be retried (defaults to unconstrained)

    string categoryName

    Optionally customizes the transient error logging source category name (defaults to DefaultCategoryName). You can disable transient error logging by passing null or by adding an event handler to OnTransient that ignores the event and also indicates that the event was handled.

    Remarks

    The maxAttempts parameter defaults to -1 indicating that the operation should be attempted up to 5 times, unless a Timeout is specified. In this case, maxAttempts will be ignored and the timeout will be honored.

    When maxAttempts is greater than or equal to zero and Timeout is passed, then both maxAttempts and Timeout will be honored, with retries stopping when either are exceeded.

    LinearRetryPolicy(Type, int, TimeSpan?, TimeSpan?, string)

    Constructs the retry policy to handle a specific exception type as transient.

    Declaration
    public LinearRetryPolicy(Type exceptionType, int maxAttempts = -1, TimeSpan? retryInterval = null, TimeSpan? timeout = null, string categoryName = null)
    Parameters
    Type Name Description
    Type exceptionType

    Specifies the exception type to be considered to be transient.

    int maxAttempts

    Optionally specifies the maximum number of times an action should be retried (defaults to 5).

    TimeSpan? retryInterval

    Optionally specifies the time interval between retry attempts (defaults to 1 second).

    TimeSpan? timeout

    Optionally specifies the maximum time the operation will be retried (defaults to unconstrained)

    string categoryName

    Optionally enables transient error logging by identifying the source category name (defaults to null).

    Remarks

    The maxAttempts parameter defaults to -1 indicating that the operation should be attempted up to 5 times, unless a Timeout is specified. In this case, maxAttempts will be ignored and the timeout will be honored.

    When maxAttempts is greater than or equal to zero and Timeout is passed, then both maxAttempts and Timeout will be honored, with retries stopping when either are exceeded.

    LinearRetryPolicy(Type[], int, TimeSpan?, TimeSpan?, string)

    Constructs the retry policy to handle a multiple exception types as transient.

    Declaration
    public LinearRetryPolicy(Type[] exceptionTypes, int maxAttempts = -1, TimeSpan? retryInterval = null, TimeSpan? timeout = null, string categoryName = null)
    Parameters
    Type Name Description
    Type[] exceptionTypes

    Specifies the exception types to be considered to be transient.

    int maxAttempts

    Optionally specifies the maximum number of times an action should be retried (defaults to 5).

    TimeSpan? retryInterval

    Optionally specifies the time interval between retry attempts (defaults to 1 second).

    TimeSpan? timeout

    Optionally specifies the maximum time the operation will be retried (defaults to unconstrained)

    string categoryName

    Optionally enables transient error logging by identifying the source category name (defaults to null).

    Remarks

    The maxAttempts parameter defaults to -1 indicating that the operation should be attempted up to 5 times, unless a Timeout is specified. In this case, maxAttempts will be ignored and the timeout will be honored.

    When maxAttempts is greater than or equal to zero and Timeout is passed, then both maxAttempts and Timeout will be honored, with retries stopping when either are exceeded.

    Properties

    MaxAttempts

    Returns the maximum number of times the action should be attempted.

    Declaration
    public int MaxAttempts { get; }
    Property Value
    Type Description
    int

    RetryInterval

    Returns the fixed interval between action retry attempts.

    Declaration
    public TimeSpan RetryInterval { get; }
    Property Value
    Type Description
    TimeSpan

    Methods

    Clone(Func<Exception, bool>)

    Returns a copy of the retry policy.

    Declaration
    public override IRetryPolicy Clone(Func<Exception, bool> transientDetector = null)
    Parameters
    Type Name Description
    Func<Exception, bool> transientDetector

    Optionally specifies a replacement transient detector function that will be set in the cloned policy.

    Returns
    Type Description
    IRetryPolicy

    The policy copy.

    Overrides
    RetryPolicyBase.Clone(Func<Exception, bool>)

    Invoke(Action, CancellationToken)

    Retries a synchronous action that returns no result when it throws exceptions due to transient errors. The classification of what is a transient error, the interval between the retries as well as the number of times the operation are retried are determined by the policy implementation.

    Declaration
    public override void Invoke(Action action, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    Action action

    The synchronous action to be performed.

    CancellationToken cancellationToken

    Optionally specifies a cancellation token.

    Overrides
    RetryPolicyBase.Invoke(Action, CancellationToken)

    InvokeAsync(Func<Task>, CancellationToken)

    Retries an asynchronous action that returns no result when it throws exceptions due to transient errors. The classification of what is a transient error, the interval between the retries as well as the number of times the operation are retried are determined by the policy implementation.

    Declaration
    public override Task InvokeAsync(Func<Task> action, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    Func<Task> action

    The asynchronous action to be performed.

    CancellationToken cancellationToken

    Optionally specifies a cancellation token.

    Returns
    Type Description
    Task
    Overrides
    RetryPolicyBase.InvokeAsync(Func<Task>, CancellationToken)

    InvokeAsync<TResult>(Func<Task<TResult>>, CancellationToken)

    Retries an asynchronous action that returns TResult when it throws exceptions due to transient errors. he classification of what is a transient error, the interval between the retries as well as the number of times the operation are retried are determined by the policy implementation.

    Declaration
    public override Task<TResult> InvokeAsync<TResult>(Func<Task<TResult>> action, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    Func<Task<TResult>> action

    The asynchronous action to be performed.

    CancellationToken cancellationToken

    Optionally specifies a cancellation token.

    Returns
    Type Description
    Task<TResult>

    The action result.

    Type Parameters
    Name Description
    TResult

    The action result type.

    Overrides
    RetryPolicyBase.InvokeAsync<TResult>(Func<Task<TResult>>, CancellationToken)

    Invoke<TResult>(Func<TResult>, CancellationToken)

    Retries a synchronous action that returns a result when it throws exceptions due to transient errors. The classification of what is a transient error, the interval between the retries as well as the number of times the operation are retried are determined by the policy implementation.

    Declaration
    public override TResult Invoke<TResult>(Func<TResult> action, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    Func<TResult> action

    The synchronous action to be performed.

    CancellationToken cancellationToken

    Optionally specifies a cancellation token.

    Returns
    Type Description
    TResult

    The action result.

    Type Parameters
    Name Description
    TResult

    The action result type.

    Overrides
    RetryPolicyBase.Invoke<TResult>(Func<TResult>, CancellationToken)

    Implements

    IRetryPolicy
    In this article
    Back to top © Copyright 2005-2023 by NEONFORGE LLC