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

Abstract base for simple validation rules for properties in a model.
Наследование: Rule, IPropertyRule
Показать файл Открыть проект

Private Properties

Свойство Тип Описание
PropertyRule System

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

Метод Описание
PropertyRule ( string rootType, string property, ConditionType conditionType, RuleInvocationType invocationTypes ) : System

Creates a new PropertyRule for the specified property and condition type.

PropertyRule ( string rootType, string property, ConditionType>.Func conditionType, RuleInvocationType invocationTypes ) : System

Creates a new PropertyRule for the specified property and condition type.

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

Метод Описание
ConditionApplies ( ModelInstance root ) : bool

Overridden in subclasses to determine if the ConditionType applies.

Format ( ModelType rootType, string property, object value ) : string

Formats the specified value based on the formatting associated with the specified property.

GetErrorCode ( string rootType, string property, string rule ) : string

Generates a unique error code for a property-specific rule.

GetLabel ( ModelType rootType, string property ) : string

Gets the label for the specified property.

GetSourceLabel ( ModelType rootType, string source ) : string

Gets the label for the specified source property path.

InitializePredicates ( ) : void

Initializes predicates for the specified property rule which leverages a comparison property.

OnInvoke ( ModelInstance root, ModelEvent modelEvent ) : void
PropertyRule ( string rootType, string property, RuleInvocationType invocationTypes ) : System

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

Метод Описание
PropertyRule ( ) : System

Register resources for validation rule subclasses.

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

ConditionApplies() защищенный абстрактный Метод

Overridden in subclasses to determine if the ConditionType applies.
protected abstract ConditionApplies ( ModelInstance root ) : bool
root ModelInstance
Результат bool

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

Formats the specified value based on the formatting associated with the specified property.
protected static Format ( ModelType rootType, string property, object value ) : string
rootType ModelType
property string
value object
Результат string

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

Generates a unique error code for a property-specific rule.
protected static GetErrorCode ( string rootType, string property, string rule ) : string
rootType string
property string
rule string
Результат string

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

Gets the label for the specified property.
protected static GetLabel ( ModelType rootType, string property ) : string
rootType ModelType
property string
Результат string

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

Gets the label for the specified source property path.
protected static GetSourceLabel ( ModelType rootType, string source ) : string
rootType ModelType
source string
Результат string

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

Initializes predicates for the specified property rule which leverages a comparison property.
protected InitializePredicates ( ) : void
Результат void

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

protected OnInvoke ( ModelInstance root, ModelEvent modelEvent ) : void
root ModelInstance
modelEvent ExoModel.ModelEvent
Результат void

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

Creates a new PropertyRule for the specified property and condition type.
public PropertyRule ( string rootType, string property, ConditionType conditionType, RuleInvocationType invocationTypes ) : System
rootType string
property string
conditionType ConditionType
invocationTypes RuleInvocationType
Результат System

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

Creates a new PropertyRule for the specified property and condition type.
public PropertyRule ( string rootType, string property, ConditionType>.Func conditionType, RuleInvocationType invocationTypes ) : System
rootType string
property string
conditionType ConditionType>.Func
invocationTypes RuleInvocationType
Результат System

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

protected PropertyRule ( string rootType, string property, RuleInvocationType invocationTypes ) : System
rootType string
property string
invocationTypes RuleInvocationType
Результат System