C# Class ExoRule.Validation.AllowedValuesRule

Applies conditions when the value of a ModelProperty is not an allowed value.
Inheritance: PropertyRule
Mostrar archivo Open project: vc3/ExoRule

Public Methods

Method Description
AllowedValuesRule ( string rootType, string property, LambdaExpression source, Error error, RuleInvocationType invocationTypes, bool ignoreValidation = false ) : System
AllowedValuesRule ( string rootType, string property, LambdaExpression source, RuleInvocationType invocationTypes, bool ignoreValidation = false ) : System
AllowedValuesRule ( string rootType, string property, LambdaExpression source, bool ignoreValidation = false ) : System
AllowedValuesRule ( string rootType, string property, LambdaExpression source, string errorMessage, bool ignoreValidation = false ) : System
AllowedValuesRule ( string rootType, string property, string source, Error error, RuleInvocationType invocationTypes, bool ignoreValidation = false ) : System
AllowedValuesRule ( string rootType, string property, string source, RuleInvocationType invocationTypes, bool ignoreValidation = false ) : System
AllowedValuesRule ( string rootType, string property, string source, bool ignoreValidation = false ) : System
AllowedValuesRule ( string rootType, string property, string source, string errorMessage, bool ignoreValidation = false ) : System
GetAllowedValues ( ModelInstance root, ModelProperty property ) : IEnumerable

Gets the set of allowed values for the specified instance and property.

Protected Methods

Method Description
ConditionApplies ( ModelInstance root ) : bool

Private Methods

Method Description
CreateError ( string property ) : ConditionType>.Func
GetAllowedValues ( ModelInstance root ) : IEnumerable
InitializeSource ( string source, LambdaExpression expression ) : void

Method Details

AllowedValuesRule() public method

public AllowedValuesRule ( string rootType, string property, LambdaExpression source, Error error, RuleInvocationType invocationTypes, bool ignoreValidation = false ) : System
rootType string
property string
source System.Linq.Expressions.LambdaExpression
error Error
invocationTypes RuleInvocationType
ignoreValidation bool
return System

AllowedValuesRule() public method

public AllowedValuesRule ( string rootType, string property, LambdaExpression source, RuleInvocationType invocationTypes, bool ignoreValidation = false ) : System
rootType string
property string
source System.Linq.Expressions.LambdaExpression
invocationTypes RuleInvocationType
ignoreValidation bool
return System

AllowedValuesRule() public method

public AllowedValuesRule ( string rootType, string property, LambdaExpression source, bool ignoreValidation = false ) : System
rootType string
property string
source System.Linq.Expressions.LambdaExpression
ignoreValidation bool
return System

AllowedValuesRule() public method

public AllowedValuesRule ( string rootType, string property, LambdaExpression source, string errorMessage, bool ignoreValidation = false ) : System
rootType string
property string
source System.Linq.Expressions.LambdaExpression
errorMessage string
ignoreValidation bool
return System

AllowedValuesRule() public method

public AllowedValuesRule ( string rootType, string property, string source, Error error, RuleInvocationType invocationTypes, bool ignoreValidation = false ) : System
rootType string
property string
source string
error Error
invocationTypes RuleInvocationType
ignoreValidation bool
return System

AllowedValuesRule() public method

public AllowedValuesRule ( string rootType, string property, string source, RuleInvocationType invocationTypes, bool ignoreValidation = false ) : System
rootType string
property string
source string
invocationTypes RuleInvocationType
ignoreValidation bool
return System

AllowedValuesRule() public method

public AllowedValuesRule ( string rootType, string property, string source, bool ignoreValidation = false ) : System
rootType string
property string
source string
ignoreValidation bool
return System

AllowedValuesRule() public method

public AllowedValuesRule ( string rootType, string property, string source, string errorMessage, bool ignoreValidation = false ) : System
rootType string
property string
source string
errorMessage string
ignoreValidation bool
return System

ConditionApplies() protected method

protected ConditionApplies ( ModelInstance root ) : bool
root ModelInstance
return bool

GetAllowedValues() public static method

Gets the set of allowed values for the specified instance and property.
public static GetAllowedValues ( ModelInstance root, ModelProperty property ) : IEnumerable
root ModelInstance
property ModelProperty
return IEnumerable