C# Класс ExoRule.Validation.CompareRule

Наследование: PropertyRule
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
CompareRule ( string rootType, string property, string compareSource, CompareOperator compareOperator ) : System

Creates a new instance of CompareRule for the specified property.

CompareRule ( string rootType, string property, string compareSource, CompareOperator compareOperator, Error error, RuleInvocationType invocationTypes ) : System

Creates a new instance of CompareRule for the specified property.

CompareRule ( string rootType, string property, string compareSource, CompareOperator compareOperator, RuleInvocationType invocationTypes ) : System

Creates a new instance of CompareRule for the specified property.

CompareRule ( string rootType, string property, string compareSource, CompareOperator compareOperator, string errorMessage ) : System

Creates a new instance of CompareRule for the specified property.

Защищенные методы

Метод Описание
Compare ( object sourceValue, CompareOperator compareOperator, object compareValue ) : bool?

Determines whether the comparison conditions are met by the given source value and compare value.

ConditionApplies ( ModelInstance root ) : bool

Determines whether the value of the property is valid relative to the value of a comparison property.

Приватные методы

Метод Описание
CreateError ( string property, string compareSource, CompareOperator compareOperator ) : ConditionType>.Func
ValidateRuleCriteria ( ) : void

Описание методов

Compare() защищенный статический Метод

Determines whether the comparison conditions are met by the given source value and compare value.
protected static Compare ( object sourceValue, CompareOperator compareOperator, object compareValue ) : bool?
sourceValue object The source value.
compareOperator CompareOperator The comparison operator.
compareValue object The compare value.
Результат bool?

CompareRule() публичный Метод

Creates a new instance of CompareRule for the specified property.
public CompareRule ( string rootType, string property, string compareSource, CompareOperator compareOperator ) : System
rootType string
property string
compareSource string
compareOperator CompareOperator
Результат System

CompareRule() публичный Метод

Creates a new instance of CompareRule for the specified property.
public CompareRule ( string rootType, string property, string compareSource, CompareOperator compareOperator, Error error, RuleInvocationType invocationTypes ) : System
rootType string
property string
compareSource string
compareOperator CompareOperator
error Error
invocationTypes RuleInvocationType
Результат System

CompareRule() публичный Метод

Creates a new instance of CompareRule for the specified property.
public CompareRule ( string rootType, string property, string compareSource, CompareOperator compareOperator, RuleInvocationType invocationTypes ) : System
rootType string
property string
compareSource string
compareOperator CompareOperator
invocationTypes RuleInvocationType
Результат System

CompareRule() публичный Метод

Creates a new instance of CompareRule for the specified property.
public CompareRule ( string rootType, string property, string compareSource, CompareOperator compareOperator, string errorMessage ) : System
rootType string
property string
compareSource string
compareOperator CompareOperator
errorMessage string
Результат System

ConditionApplies() защищенный Метод

Determines whether the value of the property is valid relative to the value of a comparison property.
protected ConditionApplies ( ModelInstance root ) : bool
root ModelInstance
Результат bool