ISettingsUnitTransactionStrategyExecuteInReaderLockAsync - метод

Executes a read request for a settings unit within a reader/writer lock.

Definition

Пространство имён: Tessa.SettingsUnits
Сборка: Tessa (в Tessa.dll) Версия: 4.2.0+ffad8363f63902f18b3b3f4cfa533a14b2fb19a6
C#
Task<bool> ExecuteInReaderLockAsync(
	Guid id,
	bool? shouldExist,
	IValidationResultBuilder validationResult,
	Func<SettingsUnitTransactionParameter, Task> asyncAction,
	CancellationToken cancellationToken = default
)

Параметры

id  Guid
The unique identifier of the settings unit for which the lock is established.
shouldExist  NullableBoolean
Indicates the expected existence of the settings unit in the system.
  • – The unit must exist
  • – The unit must not exist
  • – Existence doesn't matter
validationResult  IValidationResultBuilder
Объект, выполняющий построение результата валидации.
asyncAction  FuncSettingsUnitTransactionParameter, Task
The read request for the settings unit, accepting a parameter with transaction information.
cancellationToken  CancellationToken  (Optional)
Propagates notification that operations should be canceled.

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

TaskBoolean
if the request completed successfully; if an exception occurred during transaction creation or request execution, resulting in a rollback of the initiated transaction.

См. также