예제 #1
0
        public override void Clear()
        {
            var oldErrors = this.ToList();

            base.Clear();
            oldErrors.ForEach(ve => EntityAspect.OnErrorsChanged(ve));
        }
예제 #2
0
 public override void Add(ValidationError item)
 {
     if (!this.Contains(item))
     {
         base.Add(item);
         EntityAspect.OnErrorsChanged(item);
     }
 }
예제 #3
0
 public override bool Remove(ValidationError item)
 {
     if (base.Remove(item))
     {
         EntityAspect.OnErrorsChanged(item);
         return(true);
     }
     else
     {
         return(false);
     }
 }
예제 #4
0
        public override bool RemoveKey(string key)
        {
            var removedError = this[key];

            if (removedError != null)
            {
                base.RemoveKey(key);
                EntityAspect.OnErrorsChanged(removedError);
                return(true);
            }
            else
            {
                return(false);
            }
        }