public ValidationClause(Validations parent, ValidationTarget target, PropertyInfo property, bool precondition = false) { this.parent = parent; this.target = target; this.property = property; this.precondition = precondition; }
public ValidationTarget For(Enum type) { if (!rules.ContainsKey(type)) { rules.Add(type, new List <ValidationTarget>()); } var target = new ValidationTarget(this, type); rules[type].Add(target); return(target); }