Interface IValidateHandler<TModel>
- Assembly
- McMaster.Extensions.CommandLineUtils.dll
Strongly-typed handler for validation via OnValidate method.
public interface IValidateHandler<TModel> : IValidateHandler where TModel : class
Type Parameters
TModelThe model type.
- Inherited Members
Methods
Invoke(TModel, ValidationContext, CommandLineContext)
Invokes the OnValidate method on the model.
ValidationResult? Invoke(TModel model, ValidationContext validationContext, CommandLineContext commandContext)
Parameters
modelTModelThe model instance.
validationContextValidationContextThe validation context.
commandContextCommandLineContextThe command line context.
Returns
- ValidationResult
The validation result, or null if validation passed.