ISettingsUnitCacheGetAsync - метод

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.1+2efecbe35c10dec386bb05925f2876c4acbb708d
C#
ValueTask<SettingsUnitRecord> GetAsync(
	SettingsUnitKey key,
	IValidationResultBuilder validationResult,
	CancellationToken cancellationToken = default
)

Параметры

key  SettingsUnitKey
Key for identifying a settings unit or fragment.
validationResult  IValidationResultBuilder
Объект, выполняющий построение результата валидации.
cancellationToken  CancellationToken  (Optional)
Propagates notification that operations should be canceled.

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

ValueTaskSettingsUnitRecord
A cached SettingsUnitRecord or if any validation errors.

Заметки

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

См. также