ISettingsUnitPluginValidateForPersistentAsync - метод
A lifecycle hook invoked for validation the settings unit data before it is persisted.
Пространство имён: Tessa.SettingsUnitsСборка: Tessa (в Tessa.dll) Версия: 4.2.0+ffad8363f63902f18b3b3f4cfa533a14b2fb19a6
ValueTask<ValidationResult> ValidateForPersistentAsync(
SettingsUnitRecord record,
Dictionary<string, Object?>? data,
bool partial,
CancellationToken cancellationToken = default
)
Function ValidateForPersistentAsync (
record As SettingsUnitRecord,
data As Dictionary(Of String, Object),
partial As Boolean,
Optional cancellationToken As CancellationToken = Nothing
) As ValueTask(Of ValidationResult)
ValueTask<ValidationResult^> ValidateForPersistentAsync(
SettingsUnitRecord^ record,
Dictionary<String^, Object^>^ data,
bool partial,
CancellationToken cancellationToken = CancellationToken()
)
abstract ValidateForPersistentAsync :
record : SettingsUnitRecord *
data : Dictionary<string, Object> *
partial : bool *
?cancellationToken : CancellationToken
(* Defaults:
let _cancellationToken = defaultArg cancellationToken new CancellationToken()
*)
-> ValueTask<ValidationResult>
- 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.
ValueTaskValidationResultA
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.