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

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

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