public DebugSessionManager(IDebuggerInternalAdapter debugger, IDiagnosticLogger logger) { _debugger = debugger; _logger = logger; _eventSink = new DebugSessionEventSink(); _eventSink.SessionCreated += (sender, args) => ProcessSessionCreateOrDestoryEvent("created"); _eventSink.SessionDestroyed += (sender, args) => ProcessSessionCreateOrDestoryEvent("destroyed"); var hr = _debugger.RegisterInternalEventSink(_eventSink); if (hr != VSConstants.S_OK) Marshal.ThrowExceptionForHR(hr); }
public DebugSessionManager(IDebuggerInternalAdapter debugger, IDiagnosticLogger logger) { _debugger = debugger; _logger = logger; _eventSink = new DebugSessionEventSink(); _eventSink.SessionCreated += (sender, args) => ProcessSessionCreateOrDestoryEvent("created"); _eventSink.SessionDestroyed += (sender, args) => ProcessSessionCreateOrDestoryEvent("destroyed"); var hr = _debugger.RegisterInternalEventSink(_eventSink); if (hr != VSConstants.S_OK) { Marshal.ThrowExceptionForHR(hr); } }