public bool InitalizeExpressions() { bool result = false; if (!IsValid) { return(false); } try { if (TypeExpression != null && TypeExpression != "") { typeRegex = new Regex(TypeExpression, RegexOptions.Compiled, new TimeSpan(0, 0, 0, 1)); } if (AttributeExpression != null && AttributeExpression != "") { attributeRegex = new Regex(AttributeExpression, RegexOptions.Compiled, new TimeSpan(0, 0, 0, 1)); } result = true; } catch (Exception ex) { ValidationFailures.Add(ex.Message); } return(result); }
public IRequestValidationResult AddValidationFailure(string property, string message) { ValidationFailures.Add(new Failure() { Message = message, Property = property }); return(this); }
public DomainRuleException(string name, string message) { ValidationFailures.Add(new ValidationFailure(name, message)); }
public IRequestValidationResult AddValidationFailure(Failure failure) { ValidationFailures.Add(failure); return(this); }