SettingsUnitLockingStrategyObtainReaderLockAsync - метод
Acquires a read lock for the settings unit. Returns a value indicating whether the lock was successfully acquired.
Пространство имён: Tessa.SettingsUnitsСборка: Tessa (в Tessa.dll) Версия: 4.2.0+ffad8363f63902f18b3b3f4cfa533a14b2fb19a6
public Task<bool> ObtainReaderLockAsync(
Guid id,
bool? shouldExist,
IValidationResultBuilder validationResult,
CancellationToken cancellationToken = default
)
Public Function ObtainReaderLockAsync (
id As Guid,
shouldExist As Boolean?,
validationResult As IValidationResultBuilder,
Optional cancellationToken As CancellationToken = Nothing
) As Task(Of Boolean)
public:
virtual Task<bool>^ ObtainReaderLockAsync(
Guid id,
Nullable<bool> shouldExist,
IValidationResultBuilder^ validationResult,
CancellationToken cancellationToken = CancellationToken()
) sealed
abstract ObtainReaderLockAsync :
id : Guid *
shouldExist : Nullable<bool> *
validationResult : IValidationResultBuilder *
?cancellationToken : CancellationToken
(* Defaults:
let _cancellationToken = defaultArg cancellationToken new CancellationToken()
*)
-> Task<bool>
override ObtainReaderLockAsync :
id : Guid *
shouldExist : Nullable<bool> *
validationResult : IValidationResultBuilder *
?cancellationToken : CancellationToken
(* Defaults:
let _cancellationToken = defaultArg cancellationToken new CancellationToken()
*)
-> Task<bool>
- 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.
ISettingsUnitLockingStrategyObtainReaderLockAsync(Guid, NullableBoolean, IValidationResultBuilder, CancellationToken)