SettingsUnitPluginBasePrepareForCacheAsync - метод

A lifecycle hook invoked after the settings data is loaded from persistent storage or created via TryGetDefaultAsync(SettingsUnitKey, CancellationToken), but before it is placed into the cache.

Definition

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

Параметры

record  SettingsUnitRecord
The settings unit record about to be cached.
The provided record object can be modified directly.
cancellationToken  CancellationToken  (Optional)
Propagates notification that operations should be canceled.

Возвращаемое значение

ValueTask
Provides an awaitable result of an asynchronous operation.

Реализации

ISettingsUnitPluginPrepareForCacheAsync(SettingsUnitRecord, CancellationToken)

Заметки

Use this method to enrich the data with additional information obtained from other services or data sources before the record is cached.

См. также