SettingsUnitPluginBasePrepareForPersistentAsync - метод
A lifecycle hook invoked before the settings data is persisted to storage.
Пространство имён: Tessa.SettingsUnitsСборка: Tessa (в Tessa.dll) Версия: 4.2.0+ffad8363f63902f18b3b3f4cfa533a14b2fb19a6
public virtual ValueTask PrepareForPersistentAsync(
SettingsUnitRecord record,
CancellationToken cancellationToken = default
)
Public Overridable Function PrepareForPersistentAsync (
record As SettingsUnitRecord,
Optional cancellationToken As CancellationToken = Nothing
) As ValueTask
public:
virtual ValueTask PrepareForPersistentAsync(
SettingsUnitRecord^ record,
CancellationToken cancellationToken = CancellationToken()
)
abstract PrepareForPersistentAsync :
record : SettingsUnitRecord *
?cancellationToken : CancellationToken
(* Defaults:
let _cancellationToken = defaultArg cancellationToken new CancellationToken()
*)
-> ValueTask
override PrepareForPersistentAsync :
record : SettingsUnitRecord *
?cancellationToken : CancellationToken
(* Defaults:
let _cancellationToken = defaultArg cancellationToken new CancellationToken()
*)
-> ValueTask
- record SettingsUnitRecord
-
The settings unit record to be persisted.
The provided record object can be modified directly.
- cancellationToken CancellationToken (Optional)
Propagates notification that operations should be canceled.
ValueTaskProvides an awaitable result of an asynchronous operation.
ISettingsUnitPluginPrepareForPersistentAsync(SettingsUnitRecord, CancellationToken)
Use this method to normalize the data, remove transient properties, or perform final business-logic transformations prior to persistence.