共用方式為


RetryPolicy.RunOperation(Func<Task>, TimeSpan) Method

Definition

Runs a Func<T,TResult>, using the current RetryPolicy.

public System.Threading.Tasks.Task RunOperation (Func<System.Threading.Tasks.Task> operation, TimeSpan operationTimeout);
member this.RunOperation : Func<System.Threading.Tasks.Task> * TimeSpan -> System.Threading.Tasks.Task
Public Function RunOperation (operation As Func(Of Task), operationTimeout As TimeSpan) As Task

Parameters

operation
Func<Task>

A Func<T,TResult> to be executed.

operationTimeout
TimeSpan

The timeout for the entire operation.

Returns

Applies to