Exemple #1
0
 public ValidationMessage(string code, string specificationCode, string message, ValidationResultTypeEnum validationResultType)
 {
     Code = code;
     SpecificationCode    = specificationCode;
     Message              = message;
     ValidationResultType = validationResultType;
 }
Exemple #2
0
 public SpecificationRegistration(
     string code,
     ValidationResultTypeEnum validationResultType,
     ISpecification <T> specification)
 {
     Code = code;
     ValidationResultType = validationResultType;
     Specification        = specification;
 }
Exemple #3
0
 // Public Methods
 public void AddSpecification(
     ISpecification <T> specification,
     string code = null,
     ValidationResultTypeEnum validationResultType = ValidationResultTypeEnum.Error)
 {
     _specificationRegistrationCollection.Add(new SpecificationRegistration <T>
                                              (
                                                  code ?? specification.DefaultCode,
                                                  validationResultType,
                                                  specification
                                              ));
 }
Exemple #4
0
        private DomainNotificationEventTypeEnum GetDomainNotificationType(ValidationResultTypeEnum validationResultType)
        {
            var domainNotificationEventType = default(DomainNotificationEventTypeEnum);

            switch (validationResultType)
            {
            case ValidationResultTypeEnum.Information:
                domainNotificationEventType = DomainNotificationEventTypeEnum.Information;
                break;

            case ValidationResultTypeEnum.Warning:
                domainNotificationEventType = DomainNotificationEventTypeEnum.Warning;
                break;

            case ValidationResultTypeEnum.Error:
                domainNotificationEventType = DomainNotificationEventTypeEnum.Error;
                break;
            }

            return(domainNotificationEventType);
        }
Exemple #5
0
 // Private Methods
 private void AddValidationMessage(string code, string specificationCode, string message, ValidationResultTypeEnum validationResultType)
 {
     MessageCollection.Add(new ValidationMessage(code, specificationCode, message, validationResultType));
 }