ISettingsUnitPluginValidateForPersistentAsync - метод

A lifecycle hook invoked for validation the settings unit data before it is persisted.

Definition

Пространство имён: Tessa.SettingsUnits
Сборка: Tessa (в Tessa.dll) Версия: 4.2.0+ffad8363f63902f18b3b3f4cfa533a14b2fb19a6
C#
ValueTask<ValidationResult> ValidateForPersistentAsync(
	SettingsUnitRecord record,
	Dictionary<string, Object?>? data,
	bool partial,
	CancellationToken cancellationToken = default
)

Параметры

record  SettingsUnitRecord
The current settings unit record to be validated, which that containing the complete data set, if available. The provided record object must not be modified directly.
data  DictionaryString, Object
The changed data to validate or if the settings unit does not contain any stored data.
partial  Boolean
Indicates that partial data is being stored.
cancellationToken  CancellationToken  (Optional)
Propagates notification that operations should be canceled.

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

ValueTaskValidationResult
A ValidationResult describing validation errors, or a successful result if no errors are found.

Заметки

Use this method to ensure data integrity, including required fields, value formats, and business rule compliance.

См. также