C# Class ExoRule.Validation.RequiredRule

Applies conditions when the value of a ModelProperty is null or an empty list.
Inheritance: PropertyRule
Mostrar archivo Open project: vc3/ExoRule

Public Methods

Method Description
RequiredRule ( string rootType, string property ) : System
RequiredRule ( string rootType, string property, Error error ) : System
RequiredRule ( string rootType, string property, Error error, object requiredValue ) : System
RequiredRule ( string rootType, string property, RuleInvocationType invocationTypes ) : System
RequiredRule ( string rootType, string property, RuleInvocationType invocationTypes, Error error ) : System
RequiredRule ( string rootType, string property, RuleInvocationType invocationTypes, Error error, object requiredValue ) : System
RequiredRule ( string rootType, string property, RuleInvocationType invocationTypes, object requiredValue ) : System
RequiredRule ( string rootType, string property, RuleInvocationType invocationTypes, string errorMessage ) : System
RequiredRule ( string rootType, string property, RuleInvocationType invocationTypes, string errorMessage, object requiredValue ) : System
RequiredRule ( string rootType, string property, object requiredValue ) : System
RequiredRule ( string rootType, string property, string errorMessage ) : System
RequiredRule ( string rootType, string property, string errorMessage, object requiredValue ) : System

Protected Methods

Method Description
ConditionApplies ( ModelInstance root ) : bool

Determines whether the rule should attach its condition to the given ModelInstance.

Private Methods

Method Description
CreateError ( string property ) : ConditionType>.Func

Method Details

ConditionApplies() protected method

Determines whether the rule should attach its condition to the given ModelInstance.
protected ConditionApplies ( ModelInstance root ) : bool
root ModelInstance The model instance to evaluate the rule for.
return bool

RequiredRule() public method

public RequiredRule ( string rootType, string property ) : System
rootType string
property string
return System

RequiredRule() public method

public RequiredRule ( string rootType, string property, Error error ) : System
rootType string
property string
error Error
return System

RequiredRule() public method

public RequiredRule ( string rootType, string property, Error error, object requiredValue ) : System
rootType string
property string
error Error
requiredValue object
return System

RequiredRule() public method

public RequiredRule ( string rootType, string property, RuleInvocationType invocationTypes ) : System
rootType string
property string
invocationTypes RuleInvocationType
return System

RequiredRule() public method

public RequiredRule ( string rootType, string property, RuleInvocationType invocationTypes, Error error ) : System
rootType string
property string
invocationTypes RuleInvocationType
error Error
return System

RequiredRule() public method

public RequiredRule ( string rootType, string property, RuleInvocationType invocationTypes, Error error, object requiredValue ) : System
rootType string
property string
invocationTypes RuleInvocationType
error Error
requiredValue object
return System

RequiredRule() public method

public RequiredRule ( string rootType, string property, RuleInvocationType invocationTypes, object requiredValue ) : System
rootType string
property string
invocationTypes RuleInvocationType
requiredValue object
return System

RequiredRule() public method

public RequiredRule ( string rootType, string property, RuleInvocationType invocationTypes, string errorMessage ) : System
rootType string
property string
invocationTypes RuleInvocationType
errorMessage string
return System

RequiredRule() public method

public RequiredRule ( string rootType, string property, RuleInvocationType invocationTypes, string errorMessage, object requiredValue ) : System
rootType string
property string
invocationTypes RuleInvocationType
errorMessage string
requiredValue object
return System

RequiredRule() public method

public RequiredRule ( string rootType, string property, object requiredValue ) : System
rootType string
property string
requiredValue object
return System

RequiredRule() public method

public RequiredRule ( string rootType, string property, string errorMessage ) : System
rootType string
property string
errorMessage string
return System

RequiredRule() public method

public RequiredRule ( string rootType, string property, string errorMessage, object requiredValue ) : System
rootType string
property string
errorMessage string
requiredValue object
return System