public void ClearMonitors() { foreach (var rule in DependentWidgets) { rule.Remove(); rule.StateChanged -= onStateChangedHandler; } DependentWidgets.Clear(); }
public void RegisterMonitor(IWatchRule match) { DependentWidgets.Add(match); match.StateChanged += onStateChangedHandler; }