Example #1
0
 /// <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);
     }
 }
Example #2
0
 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);
     }
 }