ISettingsUnitTransactionStrategyExecuteInReaderLockAsync - метод

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

Definition

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

Параметры

key  SettingsUnitKey
The unique key for identifying a settings unit or fragment for which the lock is being 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.

См. также