SettingsUnitPluginBaseUpgradeAsync - метод

Upgrades the structure of the settings data to be compatible with the current [!:SchemeVersion].

Definition

Пространство имён: Tessa.SettingsUnits
Сборка: Tessa (в Tessa.dll) Версия: 4.2.0+ffad8363f63902f18b3b3f4cfa533a14b2fb19a6
C#
public virtual ValueTask<Dictionary<string?, Object>> UpgradeAsync(
	SettingsUnitRecord record,
	CancellationToken cancellationToken = default
)

Параметры

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, Object
A 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].

См. также