SettingsUnitServiceStoreRecordAsync - метод

Stores the changed data for settings unit record if available for current session.

Definition

Пространство имён: Tessa.SettingsUnits
Сборка: Tessa (в Tessa.dll) Версия: 4.2.0+ffad8363f63902f18b3b3f4cfa533a14b2fb19a6
C#
public Task StoreRecordAsync(
	SettingsUnitKey key,
	int version,
	Dictionary<string, Object?>? data,
	bool partial,
	IValidationResultBuilder validationResult,
	CancellationToken cancellationToken = default
)

Параметры

key  SettingsUnitKey
Key for identifying a settings unit or fragment.
version  Int32
The expected version of the settings unit.
- Use 0 to create a new record.
- Use a positive value to update an existing record with optimistic concurrency control.
- Use a negative value only when partial is to automatically use the current version from the existing record. This may lead to data overwrite in concurrent usage scenarios. For concurrent-safe updates, use explicit version control with positive version numbers.
data  DictionaryString, Object
Settings unit data model that stores configuration values.
- Must not be when updating an existing record with complete data replacement.
- Must not be when performing a partial update (partial is ).
- Can be when creating a new record (version is 0).
partial  Boolean
Indicates that partial data is being stored. - When , only specified fields in data will be updated.
- When , all data will be replaced with the provided data.
validationResult  IValidationResultBuilder
Объект, выполняющий построение результата валидации.
cancellationToken  CancellationToken  (Optional)
Propagates notification that operations should be canceled.

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

Task

Реализации

ISettingsUnitServiceStoreRecordAsync(SettingsUnitKey, Int32, DictionaryString, Object, Boolean, IValidationResultBuilder, CancellationToken)

Заметки

- Creating a new record is only allowed for complete data (when partial is ).
- Parameter partial allows using negative version to automatically retrieve the current version from the existing record.

См. также