Skip to content

ICosmosOperationExecutor.ExecuteOperation(Func<TArg, Task<TResult>>, TArg, CancellationToken)

ExecuteOperation(Func<TArg, Task<TResult>>, TArg, CancellationToken)

virtual
View source
public virtual Task<TResult> ExecuteOperation<TArg, TResult>(Func<TArg, Task<TResult>> func, TArg arg, CancellationToken cancellationToken)
Executes the provided Cosmos DB operation with cancellation.

Parameters

funcFunc<TArg, Task<TResult>>
The delegate to execute.
argTArg
The argument to pass to delegate invocations.
cancellationTokenCancellationToken
The token used to cancel the operation and retry waits.

Returns

The result of invoking the delegate.