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
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
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