RetryAction<T, Result> Class

Summary

Executes a function with automatic linear-backoff retries when a T exception is thrown.
Assembly
GitVersion.Core.dll
Namespace
GitVersion.Helpers
Base Types
  • Object
Derived Types
graph BT Type-->Base0["Object"] Type["RetryAction<T, Result>"] class Type type-node Derived0["RetryAction<T>"]-->Type click Derived0 "/api/GitVersion.Helpers/RetryAction_1"

Syntax

public class RetryAction<T, Result> where T : Exception

Attributes

Type Description
NullableContextAttribute
NullableAttribute

Type Parameters

Name Description
T
Result

Constructors

Name Summary
RetryAction(int) Initializes a new retry handler that retries up to maxRetries times with a linear backoff starting at 100 ms.

Methods

Name Value Summary
Execute(Func<Result>) Result
Executes operation, retrying on T according to the configured policy.

Extension Methods

Name Value Summary
NotNull<RetryAction<T, Result>>(string) T
Throws System.ArgumentNullException when value is null; otherwise returns the value.