Пример #1
0
 public string this[string columnName]
 {
     get
     {
         if (validator == null)
         {
             validator = new NetPortInfoModelValidator();
         }
         var firstOrDefault = validator.Validate(this)
                              .Errors.FirstOrDefault(lol => lol.PropertyName == columnName);
         return(firstOrDefault?.ErrorMessage);
     }
 }
Пример #2
0
 public NetPortInfoModel()
 {
     validator = new NetPortInfoModelValidator();
 }