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

Retrieves a settings unit record by key. The record will not be loaded if missing in the cache.

Definition

Пространство имён: Tessa.SettingsUnits
Сборка: Tessa (в Tessa.dll) Версия: 4.2.0+ffad8363f63902f18b3b3f4cfa533a14b2fb19a6
C#
public ValueTask<SettingsUnitRecord> TryGetAsync(
	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
SettingsUnitRecord object if found in the cache or successfully loaded; otherwise, .

Реализации

ISettingsUnitCacheTryGetAsync(SettingsUnitKey, CancellationToken)

Заметки

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

См. также