public void Stop() { lock (this.locker) { if (this.monitorResultWatcher != null) { HealthStateTracker.HandleCommonExceptions("HealthStateTracker.Stop", delegate { this.monitorResultWatcher.Stop(); }); this.monitorResultWatcher = null; } } }
private void StartupThread(object notUsed) { lock (this.locker) { HealthStateTracker.HandleCommonExceptions("HealthStateTracker.Start", delegate { this.ReadExisting(); }); HealthStateTracker.HandleCommonExceptions("HealthStateTracker.SetupWatcher", delegate { this.monitorResultWatcher = new ResultWatcher <MonitorResult>(null, null, false); this.monitorResultWatcher.ResultArrivedCallback = new ResultWatcher <MonitorResult> .ResultArrivedDelegate(this.ResultArrived); this.monitorResultWatcher.QueryUserPropertyCondition = "(IsHaImpacting=1)"; this.monitorResultWatcher.Start(); }); } }