SettingsUnitPluginValidateForStoreAsync - метод

A lifecycle hook invoked to validate the settings unit data before it is stored.

Definition

Пространство имён: Tessa.SettingsUnits
Сборка: Tessa (в Tessa.dll) Версия: 4.2.3+85077ef6104b2e81389e52f8b825d77905da3c54
C#
public virtual ValueTask ValidateForStoreAsync(
	SettingsUnitPluginContext context,
	Dictionary<string, Object?>? data,
	bool partial,
	CancellationToken cancellationToken = default
)

Параметры

context  SettingsUnitPluginContext
Context of the settings unit record to be validated, which contains the complete data set, if available. The provided record object must not be modified directly. If there are any errors, they must be written to the ValidationResult in this context.
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.

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

ValueTask
Provides an awaitable result of an asynchronous operation.

Реализации

ISettingsUnitPluginValidateForStoreAsync(SettingsUnitPluginContext, DictionaryString, Object, Boolean, CancellationToken)

Заметки

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

См. также