Exemple #1
0
        private static void ObjectToRegister_PropertyChanged(object sender, PropertyChangedEventArgs args)
        {
            ObservableObject registeredObject = (ObservableObject)sender;

            Errors.RemoveAll(x => x.Source == registeredObject);
            Errors.AddRange(registeredObject.EvaluateErrors());
            ListenerUpdated?.Invoke(new ListenerUpdateEventArgs());
        }
Exemple #2
0
 public static void Update()
 {
     Errors.Clear();
     foreach (ObservableObject obj in RegisteredObjects)
     {
         Errors.AddRange(obj.EvaluateErrors());
         ListenerUpdated?.Invoke(new ListenerUpdateEventArgs());
     }
 }