C# Класс ExpressiveAnnotations.Attributes.RequiredIfAttribute

Наследование: System.ComponentModel.DataAnnotations.ValidationAttribute
Показать файл Открыть проект

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

Метод Описание
RequiredIfAttribute ( string expression ) : System

Initializes a new instance of the RequiredIfAttribute class.

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

Метод Описание
IsValidInternal ( object value, System.ComponentModel.DataAnnotations.ValidationContext validationContext ) : System.ComponentModel.DataAnnotations.ValidationResult

Validates a specified value with respect to the associated validation attribute. Internally used by the ExpressiveAttribute.IsValid(object,System.ComponentModel.DataAnnotations.ValidationContext) method.

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

Метод Описание
AssertNonValueType ( object value ) : void

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

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

Validates a specified value with respect to the associated validation attribute. Internally used by the ExpressiveAttribute.IsValid(object,System.ComponentModel.DataAnnotations.ValidationContext) method.
protected IsValidInternal ( object value, System.ComponentModel.DataAnnotations.ValidationContext validationContext ) : System.ComponentModel.DataAnnotations.ValidationResult
value object The value to validate.
validationContext System.ComponentModel.DataAnnotations.ValidationContext The validation context.
Результат System.ComponentModel.DataAnnotations.ValidationResult

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

Initializes a new instance of the RequiredIfAttribute class.
public RequiredIfAttribute ( string expression ) : System
expression string The logical expression based on which requirement condition is computed.
Результат System