SettingsUnitPluginBaseUpgradeAsync - метод
Upgrades the structure of the settings data to be compatible with the current [!:SchemeVersion].
Пространство имён: Tessa.SettingsUnitsСборка: Tessa (в Tessa.dll) Версия: 4.2.0+ffad8363f63902f18b3b3f4cfa533a14b2fb19a6
public virtual ValueTask<Dictionary<string?, Object>> UpgradeAsync(
SettingsUnitRecord record,
CancellationToken cancellationToken = default
)
Public Overridable Function UpgradeAsync (
record As SettingsUnitRecord,
Optional cancellationToken As CancellationToken = Nothing
) As ValueTask(Of Dictionary(Of String, Object))
public:
virtual ValueTask<Dictionary<String^, Object^>^> UpgradeAsync(
SettingsUnitRecord^ record,
CancellationToken cancellationToken = CancellationToken()
)
abstract UpgradeAsync :
record : SettingsUnitRecord *
?cancellationToken : CancellationToken
(* Defaults:
let _cancellationToken = defaultArg cancellationToken new CancellationToken()
*)
-> ValueTask<Dictionary<string, Object>>
override UpgradeAsync :
record : SettingsUnitRecord *
?cancellationToken : CancellationToken
(* Defaults:
let _cancellationToken = defaultArg cancellationToken new CancellationToken()
*)
-> ValueTask<Dictionary<string, Object>>
- record SettingsUnitRecord
-
The settings unit record whose data must be upgraded.
The provided record object must not be modified directly.
Return a modified copy of Data if changes are required.
- cancellationToken CancellationToken (Optional)
Propagates notification that operations should be canceled.
ValueTaskDictionaryString,
ObjectA modified
[!:SettingsUnitData] object if an upgrade was performed; otherwise,
.
ISettingsUnitPluginUpgradeAsync(SettingsUnitRecord, CancellationToken)
This method provides schema migration support and ensures backward compatibility by migrating older data schemas to the current one.
It is invoked once during the initialization of the web service for each settings unit whose stored version differs from [!:SchemeVersion].