C# 클래스 System.Data.Entity.Internal.Validation.ValidationAttributeValidator

Validates a property, complex property or an entity using validation attributes the property or the complex/entity type is decorated with.
Note that this class is used for validating primitive properties using attributes declared on the property (property level validation) and complex properties and entities using attributes declared on the type (type level validation).
상속: IValidator
파일 보기 프로젝트 열기: aspnet/EntityFramework6 1 사용 예제들

공개 메소드들

메소드 설명
Validate ( System.Data.Entity.Internal.Validation.EntityValidationContext entityValidationContext, InternalMemberEntry property ) : IEnumerable

Validates a property or an entity.

ValidationAttributeValidator ( System.ComponentModel.DataAnnotations.ValidationAttribute validationAttribute, System.ComponentModel.DataAnnotations.DisplayAttribute displayAttribute ) : System.Collections.Generic

Creates an instance of ValidationAttributeValidator class.

보호된 메소드들

메소드 설명
AttributeApplicable ( System.Data.Entity.Internal.Validation.EntityValidationContext entityValidationContext, InternalMemberEntry property ) : bool

Determines if the attribute should be enforced given the context of the validation request.

메소드 상세

AttributeApplicable() 보호된 메소드

Determines if the attribute should be enforced given the context of the validation request.
protected AttributeApplicable ( System.Data.Entity.Internal.Validation.EntityValidationContext entityValidationContext, InternalMemberEntry property ) : bool
entityValidationContext System.Data.Entity.Internal.Validation.EntityValidationContext Validation context. Never null.
property InternalMemberEntry Property to validate. Null for entity validation. Not null for property validation.
리턴 bool

Validate() 공개 메소드

Validates a property or an entity.
public Validate ( System.Data.Entity.Internal.Validation.EntityValidationContext entityValidationContext, InternalMemberEntry property ) : IEnumerable
entityValidationContext System.Data.Entity.Internal.Validation.EntityValidationContext Validation context. Never null.
property InternalMemberEntry Property to validate. Null for entity validation. Not null for property validation.
리턴 IEnumerable

ValidationAttributeValidator() 공개 메소드

Creates an instance of ValidationAttributeValidator class.
public ValidationAttributeValidator ( System.ComponentModel.DataAnnotations.ValidationAttribute validationAttribute, System.ComponentModel.DataAnnotations.DisplayAttribute displayAttribute ) : System.Collections.Generic
validationAttribute System.ComponentModel.DataAnnotations.ValidationAttribute Validation attribute used to validate a property or an entity.
displayAttribute System.ComponentModel.DataAnnotations.DisplayAttribute
리턴 System.Collections.Generic