Performs specified action on lock associated with form.
If lock cannot be acquired within a short time because another task is running concurrently on the lock, method throws an exception InvalidOperationException.
The lock is released even if specified method threw an exception, after which exception is thrown outside.
ValueTask ExecuteInLockAsync(
Guid formId,
Func<IDbScope, CancellationToken, Task> actionAsync,
CancellationToken cancellationToken = default
)Function ExecuteInLockAsync (
formId As Guid,
actionAsync As Func(Of IDbScope, CancellationToken, Task),
Optional cancellationToken As CancellationToken = Nothing
) As ValueTaskValueTask ExecuteInLockAsync(
Guid formId,
Func<IDbScope^, CancellationToken, Task^>^ actionAsync,
CancellationToken cancellationToken = CancellationToken()
)abstract ExecuteInLockAsync :
formId : Guid *
actionAsync : Func<IDbScope, CancellationToken, Task> *
?cancellationToken : CancellationToken
(* Defaults:
let _cancellationToken = defaultArg cancellationToken new CancellationToken()
*)
-> ValueTask