DefaultExecutionStrategy.ExecuteAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
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. |
ExecuteAsync(Func<Task>, CancellationToken)
Executes the specified asynchronous operation once, without retrying on failure.
public System.Threading.Tasks.Task ExecuteAsync (Func<System.Threading.Tasks.Task> operation, System.Threading.CancellationToken cancellationToken);
abstract member ExecuteAsync : Func<System.Threading.Tasks.Task> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.ExecuteAsync : Func<System.Threading.Tasks.Task> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Parameters
- cancellationToken
- CancellationToken
A cancellation token used to cancel the retry operation, but not operations that are already in flight or that already completed successfully.
Returns
A task that will run to completion if the original task completes successfully.
Implements
Applies to
ExecuteAsync<TResult>(Func<Task<TResult>>, CancellationToken)
Executes the specified asynchronous operation once, without retrying on failure.
public System.Threading.Tasks.Task<TResult> ExecuteAsync<TResult> (Func<System.Threading.Tasks.Task<TResult>> operation, System.Threading.CancellationToken cancellationToken);
abstract member ExecuteAsync : Func<System.Threading.Tasks.Task<'Result>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'Result>
override this.ExecuteAsync : Func<System.Threading.Tasks.Task<'Result>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'Result>
Type Parameters
- TResult
The result type of the Task<TResult> returned by operation
.
Parameters
- cancellationToken
- CancellationToken
A cancellation token used to cancel the retry operation, but not operations that are already in flight or that already completed successfully.
Returns
A task that will run to completion if the original task completes successfully.
Implements
Applies to
Entity Framework