C# Класс System.ComponentModel.DataAnnotations.ValidationException

Наследование: Exception
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
ValidationException ( ) : System.Runtime.Serialization

Default constructor.

The long form of this constructor is preferred because it gives better error reporting.

ValidationException ( System.ComponentModel.DataAnnotations.ValidationResult validationResult, System.ComponentModel.DataAnnotations.ValidationAttribute validatingAttribute, object value ) : System.Runtime.Serialization

Constructor that accepts a structured ValidationResult describing the problem.

ValidationException ( string message ) : System.Runtime.Serialization

Constructor that accepts only a localized message

The long form of this constructor is preferred because it gives better error reporting.

ValidationException ( string message, Exception innerException ) : System.Runtime.Serialization

Constructor that accepts a localized message and an inner exception

The long form of this constructor is preferred because it gives better error reporting

ValidationException ( string errorMessage, System.ComponentModel.DataAnnotations.ValidationAttribute validatingAttribute, object value ) : System.Runtime.Serialization

Constructor that accepts an error message, the failing attribute, and the invalid value.

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

Метод Описание
ValidationException ( SerializationInfo info, StreamingContext context ) : System.Runtime.Serialization

Constructor that takes a SerializationInfo.

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

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

Default constructor.
The long form of this constructor is preferred because it gives better error reporting.
public ValidationException ( ) : System.Runtime.Serialization
Результат System.Runtime.Serialization

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

Constructor that takes a SerializationInfo.
protected ValidationException ( SerializationInfo info, StreamingContext context ) : System.Runtime.Serialization
info System.Runtime.Serialization.SerializationInfo The SerializationInfo.
context System.Runtime.Serialization.StreamingContext The StreamingContext.
Результат System.Runtime.Serialization

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

Constructor that accepts a structured ValidationResult describing the problem.
public ValidationException ( System.ComponentModel.DataAnnotations.ValidationResult validationResult, System.ComponentModel.DataAnnotations.ValidationAttribute validatingAttribute, object value ) : System.Runtime.Serialization
validationResult System.ComponentModel.DataAnnotations.ValidationResult The value describing the validation error
validatingAttribute System.ComponentModel.DataAnnotations.ValidationAttribute The attribute that triggered this exception
value object The value that caused the validating attribute to trigger the exception
Результат System.Runtime.Serialization

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

Constructor that accepts only a localized message
The long form of this constructor is preferred because it gives better error reporting.
public ValidationException ( string message ) : System.Runtime.Serialization
message string The localized message
Результат System.Runtime.Serialization

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

Constructor that accepts a localized message and an inner exception
The long form of this constructor is preferred because it gives better error reporting
public ValidationException ( string message, Exception innerException ) : System.Runtime.Serialization
message string The localized error message
innerException Exception inner exception
Результат System.Runtime.Serialization

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

Constructor that accepts an error message, the failing attribute, and the invalid value.
public ValidationException ( string errorMessage, System.ComponentModel.DataAnnotations.ValidationAttribute validatingAttribute, object value ) : System.Runtime.Serialization
errorMessage string The localized error message
validatingAttribute System.ComponentModel.DataAnnotations.ValidationAttribute The attribute that triggered this exception
value object The value that caused the validating attribute to trigger the exception
Результат System.Runtime.Serialization