public void Dispose() { if (_session == null) { return; } lock (_lock) { _session.Dispose(); _session = null; } }
// Token: 0x06000005 RID: 5 RVA: 0x00002144 File Offset: 0x00000344 private void ConfigureSession(SoftDebuggerSession debuggerSession, IProgress <string> progress) { debuggerSession.TargetExited += delegate(object s, TargetEventArgs e) { debuggerSession.Dispose(); }; debuggerSession.OutputWriter = delegate(bool is_stderr, string text) { if (progress != null && text.Trim(new char[] { '\n', '' }).Length > 0) { progress.Report(text.TrimEnd(new char[] { '\n' })); } }; SoftDebuggerSession softDebuggerSession = debuggerSession; softDebuggerSession.ExceptionHandler = (ExceptionHandler)Delegate.Combine(softDebuggerSession.ExceptionHandler, new ExceptionHandler(delegate(Exception e) { progress.Report(e.Message); DebuggerSession.tracer.Error(e); return(true); })); debuggerSession.LogWriter = debuggerSession.OutputWriter; }
public static void Kill() { lock (_lock) { if (_session == null) { return; } CommandLine.InferiorExecuting = true; if (!_session.HasExited) { _session.Exit(); } _session.Dispose(); _session = null; } }
void DebuggerKill() { lock (m_Lock) { if (m_Session != null) { m_DebuggeeExecuting = true; if (!m_Session.HasExited) { m_Session.Exit(); } m_Session.Dispose(); m_Session = null; } } }