Table of Contents

Class DataValidationValueChecker<TValue>

Namespace
OneImlx.Terminal.Commands.Checkers
Assembly
OneImlx.Terminal.dll

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
Inherited Members

Constructors

DataValidationValueChecker(ValidationAttribute)

Initializes a new instance.

public DataValidationValueChecker(ValidationAttribute validationAttribute)

Parameters

validationAttribute ValidationAttribute

The validation attribute.

Properties

ValidationAttribute

The validation attribute.

public ValidationAttribute ValidationAttribute { get; }

Property Value

ValidationAttribute

Methods

CheckValueAsync(TValue)

Checks the option value.

public Task CheckValueAsync(TValue value)

Parameters

value TValue

The entity to check.

Returns

Task

Equals(DataValidationValueChecker<TValue>)

public bool Equals(DataValidationValueChecker<TValue> other)

Parameters

other DataValidationValueChecker<TValue>

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

GetRawType()

Returns the underlying checker raw type.

public Type GetRawType()

Returns

Type

Operators

operator ==(DataValidationValueChecker<TValue>?, DataValidationValueChecker<TValue>?)

public static bool operator ==(DataValidationValueChecker<TValue>? left, DataValidationValueChecker<TValue>? right)

Parameters

left DataValidationValueChecker<TValue>
right DataValidationValueChecker<TValue>

Returns

bool

operator !=(DataValidationValueChecker<TValue>?, DataValidationValueChecker<TValue>?)

public static bool operator !=(DataValidationValueChecker<TValue>? left, DataValidationValueChecker<TValue>? right)

Parameters

left DataValidationValueChecker<TValue>
right DataValidationValueChecker<TValue>

Returns

bool