private void Term() { _agentConnect.Term(Logger); if (_termHandle != null) _termHandle.Set(); if (_thread != null) _thread.Join(); _thread = null; _instance = null; }
public static void Start(EventLog eventLog, string workDirectory) { if (_instance == null) _instance = new SqlTraceReader(eventLog, workDirectory); }
private void Exit(string message) { _eventLog.WriteEntry(message, EventLogEntryType.Error); _thread = null; _instance = null; InvokeStopping(new SqlTraceService.StoppingEventArgs { Reason = message }); }