Exemple #1
0
        // Remove the AppDomain ``e.AppDomain'' from the TreeView
        private void _on_appdomain_exit(Object sender,
                                        DebuggedAppDomainEventArgs e)
        {
            _history("AppDomain Exit: " + e.AppDomain.Name);
            AppDomainNode ad = m_procn.Get(e.AppDomain);

            m_procn.Remove(ad);
        }
Exemple #2
0
        // The names of AppDomains may change through the life of the program,
        // so we do that here.
        private void _on_name_change(Object sender, DebuggedThreadEventArgs e)
        {
            AppDomainNode adn = m_procn.Get(e.AppDomain);

            _history("AppDomain Name Change; AppDomain (" + e.AppDomain.Id +
                     ") now known as: " + _appdomain_name(e.AppDomain));
            adn.Text = e.AppDomain.Name;
        }
Exemple #3
0
        // Get the appropriate AppDomainNodeNode that matches the
        // name of the DebuggedAppDomain.
        public AppDomainNode Get(DebuggedAppDomain ad, bool thro)
        {
            AppDomainNode adn = (AppDomainNode)m_adm[ad.Id];

            if (adn == null && thro)
            {
                throw new NoSuchAppDomain();
            }
            return(adn);
        }
Exemple #4
0
        // Add an AppDomainNode underneath this node in the TreeView.
        public AppDomainNode Add(AppDomainNode ad)
        {
            AppDomainNode t = Get(ad.AppDomain, false);

            if (t == null)
            {
                t = ad;
                Nodes.Add(t);
                m_adm.Add(t.AppDomain.Id, t);
            }
            return(t);
        }
Exemple #5
0
        // Update the display with information retrieved from ``dn''.
        public void Display(DisplayableNode dn)
        {
            if (!(dn is AppDomainNode))
            {
                throw new Exception("internal error: expected AppDomainNode");
            }
            AppDomainNode an = (AppDomainNode)dn;

            try
            {
                // process needs to be synchronized in order to view modules
                an.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;
                    }
                }

                _update_assemblies(an.AppDomain);
                _update_breakpoints(an.AppDomain);
                _update_steppers(an.AppDomain);

                an.AppDomain.Continue(false);
            }
            catch
            {
                if (!an.AppDomain.IsRunning())
                {
                    an.AppDomain.Continue(false);
                }
            }
        }
Exemple #6
0
        // Add an AssemblyNode underneath the appropriate AppDomain.
        public AssemblyNode Add(AssemblyNode a)
        {
            AppDomainNode adn = Get(a.Assembly.AppDomain);

            return(adn.Add(a));
        }
Exemple #7
0
 public void Remove(AppDomainNode ad)
 {
     ad.Remove();
     m_adm.Remove(ad.AppDomain.Id);
 }