ISettingsUnitProviderGetAsyncT - метод
Retrieves a strongly-typed object derived from the settings unit record identified by the specified key.
Пространство имён: Tessa.SettingsUnitsСборка: Tessa (в Tessa.dll) Версия: 4.2.2+a8f0dd3c063817b2e3f05a923303d808e447c338
ValueTask<T> GetAsync<T>(
SettingsUnitKey key,
Func<SettingsUnitRecord, T> factory,
IValidationResultBuilder validationResult,
CancellationToken cancellationToken = default
)
Function GetAsync(Of T) (
key As SettingsUnitKey,
factory As Func(Of SettingsUnitRecord, T),
validationResult As IValidationResultBuilder,
Optional cancellationToken As CancellationToken = Nothing
) As ValueTask(Of T)
generic<typename T>
ValueTask<T> GetAsync(
SettingsUnitKey^ key,
Func<SettingsUnitRecord^, T>^ factory,
IValidationResultBuilder^ validationResult,
CancellationToken cancellationToken = CancellationToken()
)
abstract GetAsync :
key : SettingsUnitKey *
factory : Func<SettingsUnitRecord, 'T> *
validationResult : IValidationResultBuilder *
?cancellationToken : CancellationToken
(* Defaults:
let _cancellationToken = defaultArg cancellationToken new CancellationToken()
*)
-> ValueTask<'T>
- key SettingsUnitKey
Key for identifying a settings unit or fragment.
- factory FuncSettingsUnitRecord, T
-
A delegate that receives the SettingsUnitRecord and produces an instance of type T.
Important: The factory delegate should be fast and avoid blocking operations, as it may be called inside a lock.
- validationResult IValidationResultBuilder
Объект, выполняющий построение результата валидации.
- cancellationToken CancellationToken (Optional)
Propagates notification that operations should be canceled.
- T
- The type of object to construct from the settings unit record.
ValueTaskT
Requested object of type
T, or
if the settings unit record could not be loaded or validation failed.
When the
InitializationState is not
Initialized,
the record passed to the
factory is created with default values rather than loaded from the system.
Use the
Initialized property to indicate such records.
Such record is not cached at provider instance.