DefaultExecutionStrategy.ExecuteAsync Method
Assembly: EntityFramework (in EntityFramework.dll)
Name | Description | |
---|---|---|
![]() | ExecuteAsync(Func<Task>, CancellationToken) | Executes the specified asynchronous operation once, without retrying on failure. |
![]() | ExecuteAsync<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.
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.TaskA 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.