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.1+2efecbe35c10dec386bb05925f2876c4acbb708d
public Task<bool> ObtainReaderLockAsync(
SettingsUnitKey key,
bool? shouldExist,
IValidationResultBuilder validationResult,
CancellationToken cancellationToken = default
)
Public Function ObtainReaderLockAsync (
key As SettingsUnitKey,
shouldExist As Boolean?,
validationResult As IValidationResultBuilder,
Optional cancellationToken As CancellationToken = Nothing
) As Task(Of Boolean)
public:
virtual Task<bool>^ ObtainReaderLockAsync(
SettingsUnitKey^ key,
Nullable<bool> shouldExist,
IValidationResultBuilder^ validationResult,
CancellationToken cancellationToken = CancellationToken()
) sealed
abstract ObtainReaderLockAsync :
key : SettingsUnitKey *
shouldExist : Nullable<bool> *
validationResult : IValidationResultBuilder *
?cancellationToken : CancellationToken
(* Defaults:
let _cancellationToken = defaultArg cancellationToken new CancellationToken()
*)
-> Task<bool>
override ObtainReaderLockAsync :
key : SettingsUnitKey *
shouldExist : Nullable<bool> *
validationResult : IValidationResultBuilder *
?cancellationToken : CancellationToken
(* Defaults:
let _cancellationToken = defaultArg cancellationToken new CancellationToken()
*)
-> Task<bool>
- 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
-
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(SettingsUnitKey, NullableBoolean, IValidationResultBuilder, CancellationToken)