/// <summary> /// Validates a property. If validation fails, adds an error. /// </summary> /// <param name="validate">Validate.</param> /// <param name="error">Error.</param> protected virtual void ValidateProperty(Func <bool> validate, ViewModelError error) { if (validate()) { this.errors.Remove(error); } else if (!this.errors.Contains(error)) { this.errors.Add(error); } }
protected virtual void ValidateProperty(Func<bool> validate, ViewModelError error) { if(validate()) { this.errors.Remove (error); } else if(!this.errors.Contains(error)) { this.errors.Add (error); } }