Class MustAttribute
Ensures that the value a parameter or property passes the given validation.
Inheritance
MustAttribute
Assembly: Solti.Utils.Rpc.Interfaces.dll
Syntax
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Parameter, AllowMultiple = false)]
public sealed class MustAttribute : ValidatorAttributeBase, IConditionalValidatior, IAsyncParameterValidator, IParameterValidator, IAsyncPropertyValidator, IPropertyValidator, ICustomValidator
Constructors
MustAttribute(Type)
Declaration
public MustAttribute(Type predicate)
Parameters
Type |
Name |
Description |
Type |
predicate |
|
Properties
ParameterValidationErrorMessage
Declaration
public string ParameterValidationErrorMessage { get; set; }
Property Value
PropertyValidationErrorMessage
Declaration
public string PropertyValidationErrorMessage { get; set; }
Property Value
Explicit Interface Implementations
IAsyncParameterValidator.ValidateAsync(ParameterInfo, Object, IInjector)
Declaration
async 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
async 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.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.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