ISettingsUnitPluginPrepareForClientAsync - метод

A lifecycle hook invoked after a settings unit is loaded for use at client (UI editor), typically from cache. Intended for populating transient or context-specific data that must not be cached or persisted.

Definition

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

Параметры

record  SettingsUnitRecord
The settings unit record being prepared for use.
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 the data was enriched; otherwise, .

Заметки

Use this method to populate dynamic or calculated properties (e.g. display names, aggregated values) that are necessary for the client but are derived from the current context rather than stored.

См. также