ISettingsUnitLockingStrategyObtainReaderLockAsync - метод

Acquires a read lock for the settings unit. Returns a value indicating whether the lock was successfully acquired.

Definition

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

Параметры

id  Guid
The unique identifier of the settings unit 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
An object responsible for building the validation result, indicating the reason why the lock could not be acquired.
cancellationToken  CancellationToken  (Optional)
Propagates notification that operations should be canceled.

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

TaskBoolean
if the lock was successfully acquired; if an error occurred while acquiring the lock.

См. также