C# Class ExoRule.Validation.CompareRule

Inheritance: PropertyRule
Mostrar archivo Open project: vc3/ExoRule Class Usage Examples

Public Methods

Method Description
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.

Protected Methods

Method Description
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.

Private Methods

Method Description
CreateError ( string property, string compareSource, CompareOperator compareOperator ) : ConditionType>.Func
ValidateRuleCriteria ( ) : void

Method Details

Compare() protected static method

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.
return bool?

CompareRule() public method

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
return System

CompareRule() public method

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
return System

CompareRule() public method

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
return System

CompareRule() public method

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
return System

ConditionApplies() protected method

Determines whether the value of the property is valid relative to the value of a comparison property.
protected ConditionApplies ( ModelInstance root ) : bool
root ModelInstance
return bool