DefaultExecutionStrategy.ExecuteAsync Method

 

Namespace:   System.Data.Entity.Infrastructure
Assembly:  EntityFramework (in EntityFramework.dll)

NameDescription
System_CAPS_pubmethodExecuteAsync(Func<Task>, CancellationToken)

Executes the specified asynchronous operation once, without retrying on failure.

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

Executes the specified asynchronous operation once, without retrying on failure.


DefaultExecutionStrategy.ExecuteAsync Method (Func<Task>, CancellationToken)

Executes the specified asynchronous operation once, without retrying on failure.

public Task ExecuteAsync(
	Func<Task> operation,
	CancellationToken cancellationToken
)

Parameters

operation
Type: System.Func<Task>

A function that returns a started task.

cancellationToken
Type: System.Threading.CancellationToken

A cancellation token used to cancel the retry operation, but not operations that are already in flight or that already completed successfully.

Return Value

Type: System.Threading.Tasks.Task

A task that will run to completion if the original task completes successfully.


DefaultExecutionStrategy.ExecuteAsync<TResult> Method (Func<Task<TResult>>, CancellationToken)

Executes the specified asynchronous operation once, without retrying on failure.

public Task<TResult> ExecuteAsync<TResult>(
	Func<Task<TResult>> operation,
	CancellationToken cancellationToken
)

Parameters

operation
Type: System.Func<Task<TResult>>

A function that returns a started task.

cancellationToken
Type: System.Threading.CancellationToken

A cancellation token used to cancel the retry operation, but not operations that are already in flight or that already completed successfully.

Return Value

Type: System.Threading.Tasks.Task<TResult>

A task that will run to completion if the original task completes successfully.

Type Parameters

TResult

The result type of the Task<TResult> returned by operation.