Exemplo n.º 1
0
 public ValidationResult ValidateDataTypes()
 {
     ValidationResult result = new ValidationResult();
     result.IsValid = true;
     result.Message = string.Empty;
     foreach (DataValidatorItem item in this.m_DataValidatorList)
     {
         if (item.DataTypeValidationResult.IsValid == false)
         {
             result.IsValid = false;
             result.Message += item.DataTypeValidationResult.Message + "\r\n";
         }
     }
     return result;
 }
Exemplo n.º 2
0
 public ValidationResult ValidateDomain()
 {
     ValidationResult result = new ValidationResult();
     result.IsValid = true;
     result.Message = string.Empty;
     foreach (DataValidatorItem item in this.m_DataValidatorList)
     {
         item.DomainValidationResult = (ValidationResult)item.DomainValidationMethod.Invoke();
         if (item.DomainValidationResult.IsValid == false)
         {
             result.IsValid = false;
             result.Message += item.DomainValidationResult.Message + "\r\n";
         }
     }
     return result;
 }
Exemplo n.º 3
0
 public DataValidatorItem(ValidationResult dataTypeValidationResult, BindingExpression bindingExpression, Func<ValidationResult> domainValidationMethod)
 {
     this.m_DataTypeValidationResult = dataTypeValidationResult;
     this.m_BindingExpression = bindingExpression;
     this.m_DomainValidationMethod = domainValidationMethod;
 }