public CodeMappings(IList <MemberMapping> mappings, ISerializedDnModuleCreator serializedDnModuleCreator) { this.dict = new Dictionary <SerializedDnToken, MemberMapping>(mappings.Count); var serDict = new Dictionary <ModuleDef, SerializedDnModule>(); foreach (var m in mappings) { var module = m.Method.Module; if (module == null) { continue; } SerializedDnModule serMod; if (!serDict.TryGetValue(module, out serMod)) { serMod = serializedDnModuleCreator.Create(module); serDict.Add(module, serMod); } var key = new SerializedDnToken(serMod, m.Method.MDToken); MemberMapping oldMm; if (this.dict.TryGetValue(key, out oldMm)) { if (m.MemberCodeMappings.Count < oldMm.MemberCodeMappings.Count) { continue; } } this.dict[key] = m; } }
BreakpointManager(ITextLineObjectManager textLineObjectManager, IFileTabManager fileTabManager, ITheDebugger theDebugger, IMessageBoxManager messageBoxManager, ISerializedDnModuleCreator serializedDnModuleCreator) { this.textLineObjectManager = textLineObjectManager; this.fileTabManager = fileTabManager; this.theDebugger = theDebugger; this.messageBoxManager = messageBoxManager; this.serializedDnModuleCreator = serializedDnModuleCreator; textLineObjectManager.OnListModified += MarkedTextLinesManager_OnListModified; foreach (var bp in Breakpoints) { InitializeDebuggerBreakpoint(bp); } fileTabManager.FileCollectionChanged += FileTabManager_FileCollectionChanged; theDebugger.OnProcessStateChanged += TheDebugger_OnProcessStateChanged; if (theDebugger.IsDebugging) { AddDebuggerBreakpoints(); } }
public CodeMappings(IList<MemberMapping> mappings, ISerializedDnModuleCreator serializedDnModuleCreator) { this.dict = new Dictionary<SerializedDnToken, MemberMapping>(mappings.Count); var serDict = new Dictionary<ModuleDef, SerializedDnModule>(); foreach (var m in mappings) { var module = m.Method.Module; if (module == null) continue; SerializedDnModule serMod; if (!serDict.TryGetValue(module, out serMod)) { serMod = serializedDnModuleCreator.Create(module); serDict.Add(module, serMod); } var key = new SerializedDnToken(serMod, m.Method.MDToken); MemberMapping oldMm; if (this.dict.TryGetValue(key, out oldMm)) { if (m.MemberCodeMappings.Count < oldMm.MemberCodeMappings.Count) continue; } this.dict[key] = m; } }
CodeMappingsLoader(ITextEditorUIContextManager textEditorUIContextManager, ISerializedDnModuleCreator serializedDnModuleCreator) { this.serializedDnModuleCreator = serializedDnModuleCreator; textEditorUIContextManager.Add(OnTextEditorEvent, TextEditorUIContextManagerConstants.ORDER_DEBUGGER_CODEMAPPINGSCREATOR); }
BreakpointManager(ITextLineObjectManager textLineObjectManager, IFileTabManager fileTabManager, ITheDebugger theDebugger, IMessageBoxManager messageBoxManager, ISerializedDnModuleCreator serializedDnModuleCreator) { this.textLineObjectManager = textLineObjectManager; this.fileTabManager = fileTabManager; this.theDebugger = theDebugger; this.messageBoxManager = messageBoxManager; this.serializedDnModuleCreator = serializedDnModuleCreator; textLineObjectManager.OnListModified += MarkedTextLinesManager_OnListModified; foreach (var bp in Breakpoints) InitializeDebuggerBreakpoint(bp); fileTabManager.FileCollectionChanged += FileTabManager_FileCollectionChanged; theDebugger.OnProcessStateChanged += TheDebugger_OnProcessStateChanged; if (theDebugger.IsDebugging) AddDebuggerBreakpoints(); }
DebugManager(IAppWindow appWindow, IFileTabManager fileTabManager, IMessageBoxManager messageBoxManager, IDebuggerSettings debuggerSettings, ITheDebugger theDebugger, IStackFrameManager stackFrameManager, Lazy<IModuleLoader> moduleLoader, Lazy<IInMemoryModuleManager> inMemoryModuleManager, ISerializedDnModuleCreator serializedDnModuleCreator) { this.appWindow = appWindow; this.fileTabManager = fileTabManager; this.messageBoxManager = messageBoxManager; this.debuggerSettings = debuggerSettings; this.theDebugger = theDebugger; this.stackFrameManager = stackFrameManager; this.moduleLoader = moduleLoader; this.inMemoryModuleManager = inMemoryModuleManager; this.serializedDnModuleCreator = serializedDnModuleCreator; stackFrameManager.PropertyChanged += StackFrameManager_PropertyChanged; theDebugger.ProcessRunning += TheDebugger_ProcessRunning; theDebugger.OnProcessStateChanged += TheDebugger_OnProcessStateChanged; appWindow.MainWindowClosing += AppWindow_MainWindowClosing; debuggerSettings.PropertyChanged += DebuggerSettings_PropertyChanged; }