Esempio n. 1
0
 public ValidationClause(Validations parent, ValidationTarget target, PropertyInfo property, bool precondition = false)
 {
     this.parent       = parent;
     this.target       = target;
     this.property     = property;
     this.precondition = precondition;
 }
Esempio n. 2
0
        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);
        }