Beispiel #1
0
        public RootModel()
        {
            SubModel = new SubModel();

            Validator = new Validator(this);
            Validator.ValidateAll(); // call it for initial validation if required
        }
 public Concrete()
 {
     Validator = new Validator(this)
     {
         { "Count", () => Count < 0 ? "Count should be positive." : null }
     };
     Validator.ValidateAll();
 }
Beispiel #3
0
 public Concrete()
 {
     Validator = new Validator(this)
     {
         { "Count", () => Count < 0 ? "Count should be positive." : null }
     };
     Validator.ValidateAll();
 }
        public RootModel()
        {
            SubModel = new SubModel();

            Validator = new Validator(this);
            Validator.ValidateAll(); // call it for initial validation if required
        }