C# Class Catel.Data.ValidationContext

Context containing all validation and provides several methods to gather this information.
Inheritance: IValidationContext
Afficher le fichier Open project: Catel/Catel Class Usage Examples

Méthodes publiques

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

Private Methods

Méthode Description
UpdateLastModificationStamp ( System.DateTime dateTime, bool resetLastModifiedTicksToZero = false ) : void
ValidationContext ( ) : System

Initializes static members of the ValidationContext class.

Method Details

AddBusinessRuleValidationResult() public méthode

Adds the business rule validation result.
The is null.
public AddBusinessRuleValidationResult ( IBusinessRuleValidationResult businessRuleValidationResult ) : void
businessRuleValidationResult IBusinessRuleValidationResult The business rule validation result.
Résultat void

AddFieldValidationResult() public méthode

Adds the field validation result.
The is null.
public AddFieldValidationResult ( IFieldValidationResult fieldValidationResult ) : void
fieldValidationResult IFieldValidationResult The field validation result.
Résultat void

GetBusinessRuleErrorCount() public méthode

Gets the business rule error count.
public GetBusinessRuleErrorCount ( ) : int
Résultat int

GetBusinessRuleErrorCount() public méthode

Gets the business rule error count with the specified tag.
public GetBusinessRuleErrorCount ( object tag ) : int
tag object The tag.
Résultat int

GetBusinessRuleErrors() public méthode

Gets all the business rule errors.
public GetBusinessRuleErrors ( ) : List
Résultat List

GetBusinessRuleErrors() public méthode

Gets all the business rule errors with the specified tag.
public GetBusinessRuleErrors ( object tag ) : List
tag object The tag.
Résultat List

GetBusinessRuleValidationCount() public méthode

Gets the business rule validation count.
public GetBusinessRuleValidationCount ( ) : int
Résultat int

GetBusinessRuleValidationCount() public méthode

Gets the business rule validation count with the specified tag.
public GetBusinessRuleValidationCount ( object tag ) : int
tag object The tag.
Résultat int

GetBusinessRuleValidations() public méthode

Gets all the business rule validations.
public GetBusinessRuleValidations ( ) : List
Résultat List

GetBusinessRuleValidations() public méthode

Gets all the business rule validations with the specified tag.
public GetBusinessRuleValidations ( object tag ) : List
tag object The tag.
Résultat List

GetBusinessRuleWarningCount() public méthode

Gets the business rule warning count.
public GetBusinessRuleWarningCount ( ) : int
Résultat int

GetBusinessRuleWarningCount() public méthode

Gets the business rule warning count with the specified tag.
public GetBusinessRuleWarningCount ( object tag ) : int
tag object The tag.
Résultat int

GetBusinessRuleWarnings() public méthode

Gets all the business rule warnings.
public GetBusinessRuleWarnings ( ) : List
Résultat List

GetBusinessRuleWarnings() public méthode

Gets all the business rule warnings with the specified tag.
public GetBusinessRuleWarnings ( object tag ) : List
tag object The tag.
Résultat List

GetErrorCount() public méthode

Gets the number of field and business rule errors inside this context.
public GetErrorCount ( ) : int
Résultat int

GetErrorCount() public méthode

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

GetErrors() public méthode

Gets all field and business rule errors.
public GetErrors ( ) : List
Résultat List

GetErrors() public méthode

Gets all field and business rule errors with the specified tag.
public GetErrors ( object tag ) : List
tag object The tag.
Résultat List

GetFieldErrorCount() public méthode

Gets the field error count of all fields.
public GetFieldErrorCount ( ) : int
Résultat int

GetFieldErrorCount() public méthode

Gets the field error count of all fields with the specified tag.
public GetFieldErrorCount ( object tag ) : int
tag object The tag.
Résultat int

GetFieldErrors() public méthode

Gets all the field errors.
public GetFieldErrors ( ) : List
Résultat List

GetFieldErrors() public méthode

Gets all the field errors with the specified tag.
public GetFieldErrors ( object tag ) : List
tag object The tag.
Résultat List

GetFieldErrors() public méthode

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

GetFieldErrors() public méthode

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

GetFieldValidationCount() public méthode

Gets the field validation count of all fields.
public GetFieldValidationCount ( ) : int
Résultat int

GetFieldValidationCount() public méthode

Gets the field validation count of all fields with the specified tag.
public GetFieldValidationCount ( object tag ) : int
tag object The tag.
Résultat int

GetFieldValidations() public méthode

Gets all the field validations.
public GetFieldValidations ( ) : List
Résultat List

GetFieldValidations() public méthode

Gets all the field validations with the specified tag.
public GetFieldValidations ( object tag ) : List
tag object The tag.
Résultat List

GetFieldValidations() public méthode

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

GetFieldValidations() public méthode

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

GetFieldWarningCount() public méthode

Gets the field warning count of all fields.
public GetFieldWarningCount ( ) : int
Résultat int

GetFieldWarningCount() public méthode

Gets the field warning count of all fields with the specified tag.
public GetFieldWarningCount ( object tag ) : int
tag object The tag.
Résultat int

GetFieldWarnings() public méthode

Gets all the field warnings.
public GetFieldWarnings ( ) : List
Résultat List

GetFieldWarnings() public méthode

Gets all the field warnings with the specified tag.
public GetFieldWarnings ( object tag ) : List
tag object The tag.
Résultat List

GetFieldWarnings() public méthode

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

GetFieldWarnings() public méthode

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

GetValidationCount() public méthode

Gets the total validation count of all fields and business rules.
public GetValidationCount ( ) : int
Résultat int

GetValidationCount() public méthode

Gets the total validation count of all fields and business rules with the specified tag.
public GetValidationCount ( object tag ) : int
tag object The tag.
Résultat int

GetValidations() public méthode

Gets all the field and business rule validations.
public GetValidations ( ) : List
Résultat List

GetValidations() public méthode

Gets all the field and business rule validations with the specified tag.
public GetValidations ( object tag ) : List
tag object The tag.
Résultat List

GetWarningCount() public méthode

Gets the number of field and business rule warnings inside this context.
public GetWarningCount ( ) : int
Résultat int

GetWarningCount() public méthode

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

GetWarnings() public méthode

Gets all field and business rule warnings.
public GetWarnings ( ) : List
Résultat List

GetWarnings() public méthode

Gets all field and business rule warnings with the specified tag.
public GetWarnings ( object tag ) : List
tag object The tag.
Résultat List

RemoveBusinessRuleValidationResult() public méthode

Removes the business rule validation result.
The is null.
public RemoveBusinessRuleValidationResult ( IBusinessRuleValidationResult businessRuleValidationResult ) : void
businessRuleValidationResult IBusinessRuleValidationResult The business rule validation result.
Résultat void

RemoveFieldValidationResult() public méthode

Removes the field validation result.
The is null.
public RemoveFieldValidationResult ( IFieldValidationResult fieldValidationResult ) : void
fieldValidationResult IFieldValidationResult The field validation result.
Résultat void

ToString() public méthode

Returns a System.String that represents this instance.
public ToString ( ) : string
Résultat string

ValidationContext() public méthode

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

ValidationContext() public méthode

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