Class DataValidationValueChecker<TValue>
The default IValueChecker<T> that uses ValidationAttribute to check an option value.
public sealed class DataValidationValueChecker<TValue> : IValueChecker<TValue> where TValue : IValue
Type Parameters
TValue
- Inheritance
-
DataValidationValueChecker<TValue>
- Implements
-
IValueChecker<TValue>
- Inherited Members
Constructors
DataValidationValueChecker(ValidationAttribute)
Initializes a new instance.
public DataValidationValueChecker(ValidationAttribute validationAttribute)
Parameters
validationAttribute
ValidationAttributeThe validation attribute.
Properties
ValidationAttribute
The validation attribute.
public ValidationAttribute ValidationAttribute { get; }
Property Value
Methods
CheckValueAsync(TValue)
Checks the option value.
public Task CheckValueAsync(TValue value)
Parameters
value
TValueThe entity to check.
Returns
Equals(DataValidationValueChecker<TValue>)
public bool Equals(DataValidationValueChecker<TValue> other)
Parameters
other
DataValidationValueChecker<TValue>
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
obj
object
Returns
GetHashCode()
public override int GetHashCode()
Returns
GetRawType()
Returns the underlying checker raw type.
public Type GetRawType()
Returns
Operators
operator ==(DataValidationValueChecker<TValue>?, DataValidationValueChecker<TValue>?)
public static bool operator ==(DataValidationValueChecker<TValue>? left, DataValidationValueChecker<TValue>? right)
Parameters
left
DataValidationValueChecker<TValue>right
DataValidationValueChecker<TValue>
Returns
operator !=(DataValidationValueChecker<TValue>?, DataValidationValueChecker<TValue>?)
public static bool operator !=(DataValidationValueChecker<TValue>? left, DataValidationValueChecker<TValue>? right)
Parameters
left
DataValidationValueChecker<TValue>right
DataValidationValueChecker<TValue>