Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more

Class RetryPolicy

Retry policy abstraction

Inheritance
System.Object
RetryPolicy
Namespace: EPiServer.Data.Providers
Assembly: EPiServer.Data.dll
Version: 12.0.3
Syntax
public abstract class RetryPolicy : Object

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