Skip to content

IRhinoAccountsManager.ExecuteProtectedCodeAsync

Public Class

Any asynchronous method in the IRhinoAccountsManager class must be executed within the function passed to this method, or an InvalidOperationException will be thrown.

Namespace: Rhino.Runtime.RhinoAccounts

Assembly: RhinoCommon (in RhinoCommon.dll)

Syntax

Task ExecuteProtectedCodeAsync(
Func<SecretKey, Task> protectedCode
)

Parameters

protectedCode

Type:System.Func. SecretKey, Task.
A function returning an awaitable task that has a SecretKey passed to it. You will need to pass this secret key to any method you wish to call within IRhinoAccountsManager.

Return Value

Type:Task

Exceptions

Exception

Condition


RhinoAccountsOperationInProgressException

Another operation is already in progress.


Remarks

The code within the function passed must be kept as breif as possible for performance and security reasons.