C# 클래스 Nettiers.AdventureWorks.Entities.Validation.ValidationRules

파일 보기 프로젝트 열기: netTiers/netTiers

Private Properties

프로퍼티 타입 설명
GetPropertyRules List
ValidateRuleList void
ValidationRules System

공개 메소드들

메소드 설명
AddRule ( ValidationRuleHandler handler, ValidationRuleArgs args ) : void

Adds a rule to the list of validated rules.

A rule is implemented by a method which conforms to the method signature defined by the ValidationRuleHandler delegate.

AddRule ( ValidationRuleHandler handler, string propertyName ) : void

Adds a rule to the list of validated rules.

A rule is implemented by a method which conforms to the method signature defined by the ValidationRuleHandler delegate.

Clear ( ) : void

Clear the rules list.

GetBrokenRules ( ) : BrokenRulesList

Return a BrokenRulesList that contains all of the invalid rules.

ValidateRules ( ) : void

Validate all the rules for all properties.

ValidateRules ( string propertyName ) : void

Validates all rules for a property

비공개 메소드들

메소드 설명
GetPropertyRules ( string propertyName ) : List

Returns a list of ValidationRuleInfo objects for a specified property.

ValidateRuleList ( List ruleList ) : void

Validates a list of rules.

This method calls the Invoke method on each rule in the list. If the rule fails, it is added to the BrokenRulesList

ValidationRules ( object businessEntity ) : System

Creates an instance of the class and associates the target.

메소드 상세

AddRule() 공개 메소드

Adds a rule to the list of validated rules.

A rule is implemented by a method which conforms to the method signature defined by the ValidationRuleHandler delegate.

public AddRule ( ValidationRuleHandler handler, ValidationRuleArgs args ) : void
handler ValidationRuleHandler The method that implements the rule.
args ValidationRuleArgs /// A object specifying the property name and other arguments /// passed to the rule method ///
리턴 void

AddRule() 공개 메소드

Adds a rule to the list of validated rules.

A rule is implemented by a method which conforms to the method signature defined by the ValidationRuleHandler delegate.

public AddRule ( ValidationRuleHandler handler, string propertyName ) : void
handler ValidationRuleHandler The method that implements the rule.
propertyName string /// The name of the property on the target object where the rule implementation can retrieve /// the value to be validated. ///
리턴 void

Clear() 공개 메소드

Clear the rules list.
public Clear ( ) : void
리턴 void

GetBrokenRules() 공개 메소드

Return a BrokenRulesList that contains all of the invalid rules.
public GetBrokenRules ( ) : BrokenRulesList
리턴 BrokenRulesList

ValidateRules() 공개 메소드

Validate all the rules for all properties.
public ValidateRules ( ) : void
리턴 void

ValidateRules() 공개 메소드

Validates all rules for a property
public ValidateRules ( string propertyName ) : void
propertyName string Name of the property to validate.
리턴 void