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);
        }
Exemplo n.º 2
0
        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);
            }
        }