// Remove the Assembly ``e.Assembly'' from the TreeView private void _on_assembly_unload(Object sender, DebuggedAssemblyEventArgs e) { _history("Assembly Unload: " + e.Assembly.Name); AssemblyNode an = m_procn.Get(e.Assembly); an.Remove(); }
// Get the subnode corresponding to ``a''. public AssemblyNode Get(DebuggedAssembly a, bool thro) { AssemblyNode an = (AssemblyNode)TreeNodeUtils.GetNode(this, a.Name); if (an == null && thro) { throw new NoSuchAssembly(); } return(an); }
// Add an AssemblyNode underneath this node in the TreeView. public AssemblyNode Add(AssemblyNode a) { AssemblyNode an = Get(a.Assembly, false); if (an == null) { an = a; Nodes.Add(an); } return(an); }
// Update the display with information retrieved from ``dn''. public void Display(DisplayableNode dn) { if (!(dn is AssemblyNode)) { throw new Exception("internal error: expected AssemblyNode"); } AssemblyNode an = (AssemblyNode)dn; m_modules.Items.Clear(); try { an.Assembly.AppDomain.Stop(5000); foreach (NameValueInfo nv in s_values) { nv.Value.Text = nv.Update(an); // make text left-aligned in the textbox. if (nv.Value is TextBoxBase) { ((TextBoxBase)nv.Value).SelectionLength = 0; } } foreach (DebuggedModule dm in an.Assembly.Modules) { m_modules.Items.Add(new ListViewItem(dm.Name)); } an.Assembly.AppDomain.Continue(false); } catch { m_modules.Items.Add(new ListViewItem("error viewing module")); if (!an.Assembly.AppDomain.IsRunning()) { an.Assembly.AppDomain.Continue(false); } } m_modules.Columns[0].Width = m_modules.ClientSize.Width; }
// Add the Assembly ``e.Assembly'' to the TreeView, underneath the // correct AppDomain. private void _on_assembly_load(Object sender, DebuggedAssemblyEventArgs e) { _history("Assembly Load: " + e.Assembly.Name); AssemblyNode an = m_procn.Add(new AssemblyNode(m_iasm, e.Assembly)); }
// Add an AssemblyNode underneath the appropriate AppDomain. public AssemblyNode Add(AssemblyNode a) { AppDomainNode adn = Get(a.Assembly.AppDomain); return(adn.Add(a)); }