November Happy Hour will be moved to Thursday December 5th.

Class RetryPolicy

Retry policy abstraction

Inheritance
System.Object
RetryPolicy
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Data.Providers
Assembly: EPiServer.Data.dll
Version: 9.12.2
Syntax
public abstract class RetryPolicy

Constructors

RetryPolicy()

Declaration
protected RetryPolicy()

Properties

NoRetries

A policy that just executes without retry

Declaration
public static RetryPolicy NoRetries { get; }
Property Value
Type Description
RetryPolicy

Methods

Execute<TResult>(Func<TResult>)

Execute with retry

Declaration
public abstract TResult Execute<TResult>(Func<TResult> method)
Parameters
Type Name Description
System.Func<TResult> method

The function to run

Returns
Type Description
TResult

The result

Type Parameters
Name Description
TResult

The type of the result that the function returns

ExecuteAsync<TResult>(Func<Task<TResult>>)

Execute async with retry

Declaration
public abstract Task<TResult> ExecuteAsync<TResult>(Func<Task<TResult>> method)
Parameters
Type Name Description
System.Func<System.Threading.Tasks.Task<TResult>> method

The function to run

Returns
Type Description
System.Threading.Tasks.Task<TResult>

The result

Type Parameters
Name Description
TResult

The type of the result that the function returns

Extension Methods