C# Класс Catel.Data.ValidationContext

Context containing all validation and provides several methods to gather this information.
Наследование: IValidationContext
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
AddBusinessRuleValidationResult ( IBusinessRuleValidationResult businessRuleValidationResult ) : void

Adds the business rule validation result.

AddFieldValidationResult ( IFieldValidationResult fieldValidationResult ) : void

Adds the field validation result.

GetBusinessRuleErrorCount ( ) : int

Gets the business rule error count.

GetBusinessRuleErrorCount ( object tag ) : int

Gets the business rule error count with the specified tag.

GetBusinessRuleErrors ( ) : List

Gets all the business rule errors.

GetBusinessRuleErrors ( object tag ) : List

Gets all the business rule errors with the specified tag.

GetBusinessRuleValidationCount ( ) : int

Gets the business rule validation count.

GetBusinessRuleValidationCount ( object tag ) : int

Gets the business rule validation count with the specified tag.

GetBusinessRuleValidations ( ) : List

Gets all the business rule validations.

GetBusinessRuleValidations ( object tag ) : List

Gets all the business rule validations with the specified tag.

GetBusinessRuleWarningCount ( ) : int

Gets the business rule warning count.

GetBusinessRuleWarningCount ( object tag ) : int

Gets the business rule warning count with the specified tag.

GetBusinessRuleWarnings ( ) : List

Gets all the business rule warnings.

GetBusinessRuleWarnings ( object tag ) : List

Gets all the business rule warnings with the specified tag.

GetErrorCount ( ) : int

Gets the number of field and business rule errors inside this context.

GetErrorCount ( object tag ) : int

Gets the number of field and business rule errors with the specified tag inside this context.

GetErrors ( ) : List

Gets all field and business rule errors.

GetErrors ( object tag ) : List

Gets all field and business rule errors with the specified tag.

GetFieldErrorCount ( ) : int

Gets the field error count of all fields.

GetFieldErrorCount ( object tag ) : int

Gets the field error count of all fields with the specified tag.

GetFieldErrors ( ) : List

Gets all the field errors.

GetFieldErrors ( object tag ) : List

Gets all the field errors with the specified tag.

GetFieldErrors ( string propertyName ) : List

Gets all the field errors for the specified property name.

GetFieldErrors ( string propertyName, object tag ) : List

Gets all the field errors for the specified property name with the specified tag.

GetFieldValidationCount ( ) : int

Gets the field validation count of all fields.

GetFieldValidationCount ( object tag ) : int

Gets the field validation count of all fields with the specified tag.

GetFieldValidations ( ) : List

Gets all the field validations.

GetFieldValidations ( object tag ) : List

Gets all the field validations with the specified tag.

GetFieldValidations ( string propertyName ) : List

Gets all the field validations for the specified property name.

GetFieldValidations ( string propertyName, object tag ) : List

Gets all the field validations for the specified property name with the specified tag.

GetFieldWarningCount ( ) : int

Gets the field warning count of all fields.

GetFieldWarningCount ( object tag ) : int

Gets the field warning count of all fields with the specified tag.

GetFieldWarnings ( ) : List

Gets all the field warnings.

GetFieldWarnings ( object tag ) : List

Gets all the field warnings with the specified tag.

GetFieldWarnings ( string propertyName ) : List

Gets all the field warnings for the specified property name.

GetFieldWarnings ( string propertyName, object tag ) : List

Gets all the field warnings for the specified property name with the specified tag.

GetValidationCount ( ) : int

Gets the total validation count of all fields and business rules.

GetValidationCount ( object tag ) : int

Gets the total validation count of all fields and business rules with the specified tag.

GetValidations ( ) : List

Gets all the field and business rule validations.

GetValidations ( object tag ) : List

Gets all the field and business rule validations with the specified tag.

GetWarningCount ( ) : int

Gets the number of field and business rule warnings inside this context.

GetWarningCount ( object tag ) : int

Gets the number of field and business rule warnings with the specified tag inside this context.

GetWarnings ( ) : List

Gets all field and business rule warnings.

GetWarnings ( object tag ) : List

Gets all field and business rule warnings with the specified tag.

RemoveBusinessRuleValidationResult ( IBusinessRuleValidationResult businessRuleValidationResult ) : void

Removes the business rule validation result.

RemoveFieldValidationResult ( IFieldValidationResult fieldValidationResult ) : void

Removes the field validation result.

ToString ( ) : string

Returns a System.String that represents this instance.

ValidationContext ( IEnumerable fieldValidationResults, IEnumerable businessRuleValidationResults ) : System

Initializes a new instance of the ValidationContext class.

ValidationContext ( IEnumerable fieldValidationResults, IEnumerable businessRuleValidationResults, System.DateTime lastModified ) : System

Initializes a new instance of the ValidationContext class.

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

Метод Описание
UpdateLastModificationStamp ( System.DateTime dateTime, bool resetLastModifiedTicksToZero = false ) : void
ValidationContext ( ) : System

Initializes static members of the ValidationContext class.

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

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

Adds the business rule validation result.
The is null.
public AddBusinessRuleValidationResult ( IBusinessRuleValidationResult businessRuleValidationResult ) : void
businessRuleValidationResult IBusinessRuleValidationResult The business rule validation result.
Результат void

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

Adds the field validation result.
The is null.
public AddFieldValidationResult ( IFieldValidationResult fieldValidationResult ) : void
fieldValidationResult IFieldValidationResult The field validation result.
Результат void

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

Gets the business rule error count.
public GetBusinessRuleErrorCount ( ) : int
Результат int

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

Gets the business rule error count with the specified tag.
public GetBusinessRuleErrorCount ( object tag ) : int
tag object The tag.
Результат int

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

Gets all the business rule errors.
public GetBusinessRuleErrors ( ) : List
Результат List

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

Gets all the business rule errors with the specified tag.
public GetBusinessRuleErrors ( object tag ) : List
tag object The tag.
Результат List

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

Gets the business rule validation count.
public GetBusinessRuleValidationCount ( ) : int
Результат int

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

Gets the business rule validation count with the specified tag.
public GetBusinessRuleValidationCount ( object tag ) : int
tag object The tag.
Результат int

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

Gets all the business rule validations.
public GetBusinessRuleValidations ( ) : List
Результат List

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

Gets all the business rule validations with the specified tag.
public GetBusinessRuleValidations ( object tag ) : List
tag object The tag.
Результат List

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

Gets the business rule warning count.
public GetBusinessRuleWarningCount ( ) : int
Результат int

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

Gets the business rule warning count with the specified tag.
public GetBusinessRuleWarningCount ( object tag ) : int
tag object The tag.
Результат int

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

Gets all the business rule warnings.
public GetBusinessRuleWarnings ( ) : List
Результат List

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

Gets all the business rule warnings with the specified tag.
public GetBusinessRuleWarnings ( object tag ) : List
tag object The tag.
Результат List

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

Gets the number of field and business rule errors inside this context.
public GetErrorCount ( ) : int
Результат int

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

Gets the number of field and business rule errors with the specified tag inside this context.
public GetErrorCount ( object tag ) : int
tag object The tag.
Результат int

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

Gets all field and business rule errors.
public GetErrors ( ) : List
Результат List

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

Gets all field and business rule errors with the specified tag.
public GetErrors ( object tag ) : List
tag object The tag.
Результат List

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

Gets the field error count of all fields.
public GetFieldErrorCount ( ) : int
Результат int

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

Gets the field error count of all fields with the specified tag.
public GetFieldErrorCount ( object tag ) : int
tag object The tag.
Результат int

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

Gets all the field errors.
public GetFieldErrors ( ) : List
Результат List

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

Gets all the field errors with the specified tag.
public GetFieldErrors ( object tag ) : List
tag object The tag.
Результат List

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

Gets all the field errors for the specified property name.
The is null or whitespace.
public GetFieldErrors ( string propertyName ) : List
propertyName string Name of the property.
Результат List

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

Gets all the field errors for the specified property name with the specified tag.
The is null or whitespace.
public GetFieldErrors ( string propertyName, object tag ) : List
propertyName string Name of the property.
tag object The tag.
Результат List

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

Gets the field validation count of all fields.
public GetFieldValidationCount ( ) : int
Результат int

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

Gets the field validation count of all fields with the specified tag.
public GetFieldValidationCount ( object tag ) : int
tag object The tag.
Результат int

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

Gets all the field validations.
public GetFieldValidations ( ) : List
Результат List

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

Gets all the field validations with the specified tag.
public GetFieldValidations ( object tag ) : List
tag object The tag.
Результат List

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

Gets all the field validations for the specified property name.
The is null or whitespace.
public GetFieldValidations ( string propertyName ) : List
propertyName string Name of the property.
Результат List

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

Gets all the field validations for the specified property name with the specified tag.
The is null or whitespace.
public GetFieldValidations ( string propertyName, object tag ) : List
propertyName string Name of the property.
tag object The tag.
Результат List

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

Gets the field warning count of all fields.
public GetFieldWarningCount ( ) : int
Результат int

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

Gets the field warning count of all fields with the specified tag.
public GetFieldWarningCount ( object tag ) : int
tag object The tag.
Результат int

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

Gets all the field warnings.
public GetFieldWarnings ( ) : List
Результат List

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

Gets all the field warnings with the specified tag.
public GetFieldWarnings ( object tag ) : List
tag object The tag.
Результат List

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

Gets all the field warnings for the specified property name.
The is null or whitespace.
public GetFieldWarnings ( string propertyName ) : List
propertyName string Name of the property.
Результат List

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

Gets all the field warnings for the specified property name with the specified tag.
The is null or whitespace.
public GetFieldWarnings ( string propertyName, object tag ) : List
propertyName string Name of the property.
tag object The tag.
Результат List

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

Gets the total validation count of all fields and business rules.
public GetValidationCount ( ) : int
Результат int

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

Gets the total validation count of all fields and business rules with the specified tag.
public GetValidationCount ( object tag ) : int
tag object The tag.
Результат int

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

Gets all the field and business rule validations.
public GetValidations ( ) : List
Результат List

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

Gets all the field and business rule validations with the specified tag.
public GetValidations ( object tag ) : List
tag object The tag.
Результат List

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

Gets the number of field and business rule warnings inside this context.
public GetWarningCount ( ) : int
Результат int

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

Gets the number of field and business rule warnings with the specified tag inside this context.
public GetWarningCount ( object tag ) : int
tag object The tag.
Результат int

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

Gets all field and business rule warnings.
public GetWarnings ( ) : List
Результат List

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

Gets all field and business rule warnings with the specified tag.
public GetWarnings ( object tag ) : List
tag object The tag.
Результат List

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

Removes the business rule validation result.
The is null.
public RemoveBusinessRuleValidationResult ( IBusinessRuleValidationResult businessRuleValidationResult ) : void
businessRuleValidationResult IBusinessRuleValidationResult The business rule validation result.
Результат void

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

Removes the field validation result.
The is null.
public RemoveFieldValidationResult ( IFieldValidationResult fieldValidationResult ) : void
fieldValidationResult IFieldValidationResult The field validation result.
Результат void

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

Returns a System.String that represents this instance.
public ToString ( ) : string
Результат string

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

Initializes a new instance of the ValidationContext class.
public ValidationContext ( IEnumerable fieldValidationResults, IEnumerable businessRuleValidationResults ) : System
fieldValidationResults IEnumerable The field validation results. Can be null to add no field validation results.
businessRuleValidationResults IEnumerable The business rule validation results. Can be null to add no business rule validations.
Результат System

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

Initializes a new instance of the ValidationContext class.
public ValidationContext ( IEnumerable fieldValidationResults, IEnumerable businessRuleValidationResults, System.DateTime lastModified ) : System
fieldValidationResults IEnumerable The field validation results. Can be null to add no field validation results.
businessRuleValidationResults IEnumerable The business rule validation results. Can be null to add no business rule validations.
lastModified System.DateTime The last modified date/time.
Результат System