SettingsUnitCacheGetAsync(SettingsUnitKey, CancellationToken) - метод

Retrieves a settings unit record by key. If missing in the cache, it will be loaded asynchronously and stored for subsequent requests.

Definition

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

Параметры

key  SettingsUnitKey
Key for identifying a settings unit or fragment.
cancellationToken  CancellationToken  (Optional)
Propagates notification that operations should be canceled.

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

ValueTaskSettingsUnitRecord
Object that describes the settings unit record.

Реализации

ISettingsUnitCacheGetAsync(SettingsUnitKey, CancellationToken)

Заметки

To change record fields or data, you must clone the record to prevent the changed values from being stored in the cache.

См. также