SettingsUnitPluginValidateForStoreAsync - метод
A lifecycle hook invoked to validate the settings unit data before it is stored.
Пространство имён: Tessa.SettingsUnitsСборка: Tessa (в Tessa.dll) Версия: 4.2.3+85077ef6104b2e81389e52f8b825d77905da3c54
public virtual ValueTask ValidateForStoreAsync(
SettingsUnitPluginContext context,
Dictionary<string, Object?>? data,
bool partial,
CancellationToken cancellationToken = default
)
Public Overridable Function ValidateForStoreAsync (
context As SettingsUnitPluginContext,
data As Dictionary(Of String, Object),
partial As Boolean,
Optional cancellationToken As CancellationToken = Nothing
) As ValueTask
public:
virtual ValueTask ValidateForStoreAsync(
SettingsUnitPluginContext^ context,
Dictionary<String^, Object^>^ data,
bool partial,
CancellationToken cancellationToken = CancellationToken()
)
abstract ValidateForStoreAsync :
context : SettingsUnitPluginContext *
data : Dictionary<string, Object> *
partial : bool *
?cancellationToken : CancellationToken
(* Defaults:
let _cancellationToken = defaultArg cancellationToken new CancellationToken()
*)
-> ValueTask
override ValidateForStoreAsync :
context : SettingsUnitPluginContext *
data : Dictionary<string, Object> *
partial : bool *
?cancellationToken : CancellationToken
(* Defaults:
let _cancellationToken = defaultArg cancellationToken new CancellationToken()
*)
-> ValueTask
- 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.
ValueTaskProvides 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.