Ejemplo n.º 1
0
        public void TestInitialize()
        {
            var person = new Model("person", typeof(Person));
            var engine = new ExecutionEngine(person);

            this.validator = engine.Operators.Models.Validator;

            this.model = new AndModel
            {
                Operands = new[] {
                    new BinaryComparerModel {
                        Left = new PropertyModel {
                            Path = "person.Relatives.Count"
                        },
                        Right = new ConstModel {
                            Value = "2"
                        },
                        Operation = ExpressionType.Equal
                    },
                    new BinaryComparerModel {
                        Left = new PropertyModel {
                            Path = "person.Birthday"
                        },
                        Right = new ConstModel {
                            Value = "1976-09-17"
                        },
                        Operation = ExpressionType.Equal
                    },
                },
            };
        }
Ejemplo n.º 2
0
        public CollectorBase CreateFrom(OperatorModelValidator parent, PropertyInfo property)
        {
            var collector = GetValidatorFromProperty(property);

            return((CollectorBase)Activator.CreateInstance(collector, parent, property));
        }
Ejemplo n.º 3
0
 public PropertyValidator(OperatorModelValidator parent, PropertyInfo property) : base(parent, property)
 {
 }
Ejemplo n.º 4
0
 public CollectorForOperatorModelCollection(OperatorModelValidator parent, PropertyInfo property)
     : base(parent, property)
 {
 }