C# Class ExpressiveAnnotations.Attributes.RequiredIfAttribute

Inheritance: System.ComponentModel.DataAnnotations.ValidationAttribute
Afficher le fichier Open project: jwaliszko/ExpressiveAnnotations

Méthodes publiques

Méthode Description
RequiredIfAttribute ( string expression ) : System

Initializes a new instance of the RequiredIfAttribute class.

Méthodes protégées

Méthode Description
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.

Private Methods

Méthode Description
AssertNonValueType ( object value ) : void

Method Details

IsValidInternal() protected méthode

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.
Résultat System.ComponentModel.DataAnnotations.ValidationResult

RequiredIfAttribute() public méthode

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.
Résultat System