C# Class Catel.Data.ValidationContext

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

Public Methods

Method 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

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

Initializes static members of the ValidationContext class.

Method Details

AddBusinessRuleValidationResult() public method

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

AddFieldValidationResult() public method

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

GetBusinessRuleErrorCount() public method

Gets the business rule error count.
public GetBusinessRuleErrorCount ( ) : int
return int

GetBusinessRuleErrorCount() public method

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

GetBusinessRuleErrors() public method

Gets all the business rule errors.
public GetBusinessRuleErrors ( ) : List
return List

GetBusinessRuleErrors() public method

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

GetBusinessRuleValidationCount() public method

Gets the business rule validation count.
public GetBusinessRuleValidationCount ( ) : int
return int

GetBusinessRuleValidationCount() public method

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

GetBusinessRuleValidations() public method

Gets all the business rule validations.
public GetBusinessRuleValidations ( ) : List
return List

GetBusinessRuleValidations() public method

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

GetBusinessRuleWarningCount() public method

Gets the business rule warning count.
public GetBusinessRuleWarningCount ( ) : int
return int

GetBusinessRuleWarningCount() public method

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

GetBusinessRuleWarnings() public method

Gets all the business rule warnings.
public GetBusinessRuleWarnings ( ) : List
return List

GetBusinessRuleWarnings() public method

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

GetErrorCount() public method

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

GetErrorCount() public method

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.
return int

GetErrors() public method

Gets all field and business rule errors.
public GetErrors ( ) : List
return List

GetErrors() public method

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

GetFieldErrorCount() public method

Gets the field error count of all fields.
public GetFieldErrorCount ( ) : int
return int

GetFieldErrorCount() public method

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

GetFieldErrors() public method

Gets all the field errors.
public GetFieldErrors ( ) : List
return List

GetFieldErrors() public method

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

GetFieldErrors() public method

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.
return List

GetFieldErrors() public method

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.
return List

GetFieldValidationCount() public method

Gets the field validation count of all fields.
public GetFieldValidationCount ( ) : int
return int

GetFieldValidationCount() public method

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

GetFieldValidations() public method

Gets all the field validations.
public GetFieldValidations ( ) : List
return List

GetFieldValidations() public method

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

GetFieldValidations() public method

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.
return List

GetFieldValidations() public method

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.
return List

GetFieldWarningCount() public method

Gets the field warning count of all fields.
public GetFieldWarningCount ( ) : int
return int

GetFieldWarningCount() public method

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

GetFieldWarnings() public method

Gets all the field warnings.
public GetFieldWarnings ( ) : List
return List

GetFieldWarnings() public method

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

GetFieldWarnings() public method

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.
return List

GetFieldWarnings() public method

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.
return List

GetValidationCount() public method

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

GetValidationCount() public method

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

GetValidations() public method

Gets all the field and business rule validations.
public GetValidations ( ) : List
return List

GetValidations() public method

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

GetWarningCount() public method

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

GetWarningCount() public method

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.
return int

GetWarnings() public method

Gets all field and business rule warnings.
public GetWarnings ( ) : List
return List

GetWarnings() public method

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

RemoveBusinessRuleValidationResult() public method

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

RemoveFieldValidationResult() public method

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

ToString() public method

Returns a System.String that represents this instance.
public ToString ( ) : string
return string

ValidationContext() public method

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.
return System

ValidationContext() public method

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.
return System