示例#1
0
        public void LoadChildren()
        {
            if (m_childrenLoaded)
            {
                return;
            }

            //
            // Load threads.
            //
            Nodes.Clear();
            try
            {
                using (Native.ThreadEnumeration pe =
                           new Native.ThreadEnumeration(m_processId))
                {
                    Native.ThreadInfo info = new Native.ThreadInfo();

                    while (pe.NextItem(ref info))
                    {
                        Nodes.Add(new ThreadNode(new Thread(info)));
                    }
                }
            }
            catch (Exception x)
            {
                Nodes.Add(new ErrorNode(x.Message));
            }
            m_childrenLoaded = true;
        }
示例#2
0
        public void LoadChildren()
        {
            if (m_childrenLoaded)
            {
                return;
            }

            //
            // Load threads.
            //
            Nodes.Clear();
            try
            {
                using (Native.ThreadEnumeration pe =
                    new Native.ThreadEnumeration(m_processId))
                {
                    Native.ThreadInfo info = new Native.ThreadInfo();

                    while (pe.NextItem(ref info))
                    {
                        Nodes.Add(new ThreadNode(new Thread(info)));
                    }
                }
            }
            catch (Exception x)
            {
                Nodes.Add(new ErrorNode(x.Message));
            }
            m_childrenLoaded = true;
        }