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()); }
public static void Update() { Errors.Clear(); foreach (ObservableObject obj in RegisteredObjects) { Errors.AddRange(obj.EvaluateErrors()); ListenerUpdated?.Invoke(new ListenerUpdateEventArgs()); } }