public BaseVM(BaseVM parent) { this.Parent = parent; propertyValidators = new Dictionary<string, PropertyValidator>(); foreach (PropertyInfo propertyInfo in this.GetType().GetProperties()) { ValidationAttribute[] vas = GetValidationAttributes(propertyInfo); if (vas.Length > 0 && propertyInfo.GetGetMethod() != null) { PropertyValidator validator = new PropertyValidator(propertyInfo.Name, propertyInfo.GetGetMethod(), vas); propertyValidators[propertyInfo.Name] = validator; } } }
public BaseVM(BaseVM parent) { this.Parent = parent; propertyValidators = new Dictionary <string, PropertyValidator>(); foreach (PropertyInfo propertyInfo in this.GetType().GetProperties()) { ValidationAttribute[] vas = GetValidationAttributes(propertyInfo); if (vas.Length > 0 && propertyInfo.GetGetMethod() != null) { PropertyValidator validator = new PropertyValidator(propertyInfo.Name, propertyInfo.GetGetMethod(), vas); propertyValidators[propertyInfo.Name] = validator; } } }
public CondGroupVM DeepCopy(BaseVM parent) { CondGroupVM newCondGroup = new CondGroupVM(); newCondGroup.Parent = parent; foreach (CondVM cond in Conds) { CondVM newCond = cond.DeepCopy(newCondGroup); newCondGroup.Conds.Add(newCond); } return newCondGroup; }
public CheckOptionVM(BaseVM parent, CheckOption checkOption) : base(parent) { this.checkOption = checkOption; }
public CondVM DeepCopy(BaseVM parent) { CondVM newCond = new CondVM(); newCond.Parent = parent; newCond.SelectedQuestionConstruct = SelectedQuestionConstruct; newCond.selectedOperatorCode = SelectedOperatorCode; newCond.CondValue = CondValue; return newCond; }