Esempio n. 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);
     }
 }
Esempio n. 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);
     }
 }