IFormEditorModelLockingStrategyExecuteInLockAsync - метод

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.

Definition

Пространство имён: Tessa.FormEditor
Сборка: Tessa (в Tessa.dll) Версия: 4.2.0+ffad8363f63902f18b3b3f4cfa533a14b2fb19a6
C#
ValueTask ExecuteInLockAsync(
	Guid formId,
	Func<IDbScope, CancellationToken, Task> actionAsync,
	CancellationToken cancellationToken = default
)

Параметры

formId  Guid
Form identifier.
actionAsync  FuncIDbScope, CancellationToken, Task
Action to be preformed during the lock.
cancellationToken  CancellationToken  (Optional)
Propagates notification that operations should be canceled.

Возвращаемое значение

ValueTask
Provides an awaitable result of an asynchronous operation.

См. также