Class ValidatePropertiesAttribute
Indicates that the properties of a parameter or property may be validated.
Inheritance
ValidatePropertiesAttribute
Assembly: Solti.Utils.Rpc.Interfaces.dll
Syntax
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Parameter, AllowMultiple = false)]
public sealed class ValidatePropertiesAttribute : ValidatorAttributeBase, IConditionalValidatior, IAsyncPropertyValidator, IPropertyValidator, IAsyncParameterValidator, IParameterValidator, ICustomValidator
Constructors
ValidatePropertiesAttribute(Boolean)
Declaration
public ValidatePropertiesAttribute(bool aggregate = false)
Parameters
Type |
Name |
Description |
Boolean |
aggregate |
|
Properties
Aggregate
Returns true if the validator should collect all the validation errors.
Declaration
public bool Aggregate { get; }
Property Value
Methods
ShouldRun(MethodInfo, IInjector)
Declaration
public override bool ShouldRun(MethodInfo containingMethod, IInjector currentScope)
Parameters
Type |
Name |
Description |
MethodInfo |
containingMethod |
|
Solti.Utils.DI.Interfaces.IInjector |
currentScope |
|
Returns
Overrides
Explicit Interface Implementations
IAsyncParameterValidator.ValidateAsync(ParameterInfo, Object, IInjector)
Declaration
Task IAsyncParameterValidator.ValidateAsync(ParameterInfo param, object value, IInjector currentScope)
Parameters
Type |
Name |
Description |
ParameterInfo |
param |
|
Object |
value |
|
Solti.Utils.DI.Interfaces.IInjector |
currentScope |
|
Returns
IAsyncPropertyValidator.ValidateAsync(PropertyInfo, Object, IInjector)
Declaration
Task IAsyncPropertyValidator.ValidateAsync(PropertyInfo prop, object value, IInjector currentScope)
Parameters
Type |
Name |
Description |
PropertyInfo |
prop |
|
Object |
value |
|
Solti.Utils.DI.Interfaces.IInjector |
currentScope |
|
Returns
IParameterValidator.ParameterValidationErrorMessage
Declaration
string IParameterValidator.ParameterValidationErrorMessage { get; set; }
Returns
IParameterValidator.Validate(ParameterInfo, Object, IInjector)
Declaration
void IParameterValidator.Validate(ParameterInfo param, object value, IInjector currentScope)
Parameters
Type |
Name |
Description |
ParameterInfo |
param |
|
Object |
value |
|
Solti.Utils.DI.Interfaces.IInjector |
currentScope |
|
IPropertyValidator.PropertyValidationErrorMessage
Declaration
string IPropertyValidator.PropertyValidationErrorMessage { get; set; }
Returns
IPropertyValidator.Validate(PropertyInfo, Object, IInjector)
Declaration
void IPropertyValidator.Validate(PropertyInfo prop, object value, IInjector currentScope)
Parameters
Type |
Name |
Description |
PropertyInfo |
prop |
|
Object |
value |
|
Solti.Utils.DI.Interfaces.IInjector |
currentScope |
|
Implements