internal ThreadStackFrameNode(ThreadStackNodeManager manager, TreeNode threadStackNode, int index, ThreadStackFrame threadStackframe)
        {
            if (threadStackNode == null)
                throw new ArgumentNullException("threadStackNode");

            if (manager == null)
                throw new ArgumentNullException("manager");

            if (threadStackframe == null)
                throw new ArgumentNullException("threadStackframe");

            r_manager = manager;
            r_threadStackNode = threadStackNode;

            String text = GetText(threadStackframe);

            r_frameNode = r_threadStackNode.Nodes.Insert(index, text);
            r_frameNode.ImageKey = "text_list_bullets.png";
            r_frameNode.SelectedImageKey = r_frameNode.ImageKey;
            r_frameNode.Tag = this;
            if (!threadStackframe.Managed)
            {
                r_frameNode.ForeColor = Color.Gray;
            }
            GetInfo(threadStackframe);
        }
        internal RootNode(ThreadStackNodeManager manager, TreeView root)
        {
            if (manager == null)
            {
                throw new ArgumentNullException("manager");
            }

            if (root == null)
            {
                throw new ArgumentNullException("root");
            }

            r_manager = manager;
            r_root    = root;

            r_root.Nodes.Clear();
            r_rootNode                  = r_root.Nodes.Add(r_manager.ApplicationName);
            r_rootNode.ImageKey         = "application_cascade.png";
            r_rootNode.SelectedImageKey = r_rootNode.ImageKey;
            r_rootNode.Tag              = this;

            r_deadLocksNode  = new DeadLocksNode(r_manager, r_rootNode);
            r_appDomainsNode = new AppDomainsNode(r_manager, r_rootNode);

            r_rootNode.Expand();
        }
        internal ThreadStackFrameNode(ThreadStackNodeManager manager, TreeNode threadStackNode, int index, ThreadStackFrame threadStackframe)
        {
            if (threadStackNode == null)
            {
                throw new ArgumentNullException("threadStackNode");
            }

            if (manager == null)
            {
                throw new ArgumentNullException("manager");
            }

            if (threadStackframe == null)
            {
                throw new ArgumentNullException("threadStackframe");
            }

            r_manager         = manager;
            r_threadStackNode = threadStackNode;

            String text = GetText(threadStackframe);

            r_frameNode                  = r_threadStackNode.Nodes.Insert(index, text);
            r_frameNode.ImageKey         = "text_list_bullets.png";
            r_frameNode.SelectedImageKey = r_frameNode.ImageKey;
            r_frameNode.Tag              = this;
            if (!threadStackframe.Managed)
            {
                r_frameNode.ForeColor = Color.Gray;
            }
            GetInfo(threadStackframe);
        }
        internal DeadLockItemNode(ThreadStackNodeManager manager, TreeNode deadlockNode, DeadLockItem deadlockItem)
        {
            if (deadlockNode == null)
            {
                throw new ArgumentNullException("deadlockNode");
            }

            if (manager == null)
            {
                throw new ArgumentNullException("manager");
            }

            if (deadlockItem == null)
            {
                throw new ArgumentNullException("deadlockItem");
            }

            r_manager      = manager;
            r_deadlockNode = deadlockNode;

            String text = GetDeadLockItemText(deadlockItem);

            r_deadlockItemNode                  = r_deadlockNode.Nodes.Add(text);
            r_deadlockItemNode.ImageKey         = "arrow_branch.png";
            r_deadlockItemNode.SelectedImageKey = r_deadlockItemNode.ImageKey;
            r_deadlockItemNode.Tag              = this;
        }
        internal AppDomainNode(ThreadStackNodeManager manager, TreeNode rootNode, Dictionary <UInt32, ThreadStack> threadStacks)
        {
            if (rootNode == null)
            {
                throw new ArgumentNullException("rootNode");
            }

            if (manager == null)
            {
                throw new ArgumentNullException("manager");
            }

            r_manager  = manager;
            r_rootNode = rootNode;

            String text = GetText(threadStacks);

            r_appDomainNode                  = r_rootNode.Nodes.Add(text);
            r_appDomainNode.ImageKey         = "application.png";
            r_appDomainNode.SelectedImageKey = r_appDomainNode.ImageKey;
            r_appDomainNode.Tag              = this;

            r_threadStackNodes = new Dictionary <uint, ThreadStackNode>();
            RefreshChildren(threadStacks);

            r_appDomainNode.Expand();
        }
        internal ThreadStackNode(ThreadStackNodeManager manager, TreeNode appDomainNode, ThreadStack threadStack)
        {
            if (appDomainNode == null)
            {
                throw new ArgumentNullException("appDomainNode");
            }

            if (manager == null)
            {
                throw new ArgumentNullException("manager");
            }

            r_manager       = manager;
            r_appDomainNode = appDomainNode;

            String text = GetText(threadStack);

            r_threadStackNode                  = appDomainNode.Nodes.Add(text);
            r_threadStackNode.ImageKey         = "cog.png";
            r_threadStackNode.SelectedImageKey = r_threadStackNode.ImageKey;
            r_threadStackNode.Tag              = this;
            r_waitedOnNode = new ThreadStackWaitedOnNode(r_manager, r_threadStackNode);
            r_ownedNodes   = new List <ThreadStackOwnedNode>();
            r_frameNodes   = new List <ThreadStackFrameNode>();

            RefreshChildren(threadStack);
        }
        public ManagedThreadStacksControl()
        {
            InitializeComponent();
            _contextMenuStrip = new ContextMenuStrip();

            r_nodeview = new ThreadStackNodeManager(tvwHierarchy, "Application X");

            InitCtxMenu();
        }
        internal ThreadStackWaitedOnNode(ThreadStackNodeManager manager, TreeNode threadStackNode)
        {
            if(threadStackNode==null)
                throw new ArgumentNullException("r_threadStackNode");

            if (manager == null)
                throw new ArgumentNullException("manager");

            r_manager = manager;
            r_threadStackNode = threadStackNode;
        }
        internal AppDomainsNode(ThreadStackNodeManager manager, TreeNode rootNode)
        {
            if (rootNode == null)
                throw new ArgumentNullException("rootNode");

            if (manager == null)
                throw new ArgumentNullException("manager");

            r_manager = manager;
            r_rootNode = rootNode;
            r_appDomainNodes = new Dictionary<UInt64, AppDomainNode>();

            Initialize(manager.ThreadStackManager.ThreadStacks);
        }
        internal ThreadStackWaitedOnNode(ThreadStackNodeManager manager, TreeNode threadStackNode)
        {
            if (threadStackNode == null)
            {
                throw new ArgumentNullException("r_threadStackNode");
            }

            if (manager == null)
            {
                throw new ArgumentNullException("manager");
            }

            r_manager         = manager;
            r_threadStackNode = threadStackNode;
        }
Beispiel #11
0
        internal DeadLockNode(ThreadStackNodeManager manager, TreeNode deadlocksNode, int index)
        {
            if (deadlocksNode == null)
                throw new ArgumentNullException("deadlocksNode");

            if (manager == null)
                throw new ArgumentNullException("manager");

            r_manager = manager;
            r_deadlocksNode = deadlocksNode;
            r_deadLockItemNodes = new List<DeadLockItemNode>();

            r_deadlockNode = r_deadlocksNode.Nodes.Add("DeadLock " + index);
            r_deadlockNode.ImageKey = "arrow_refresh.png";
            r_deadlockNode.SelectedImageKey = r_deadlockNode.ImageKey;
            r_deadlockNode.Tag = this;
        }
        internal AppDomainsNode(ThreadStackNodeManager manager, TreeNode rootNode)
        {
            if (rootNode == null)
            {
                throw new ArgumentNullException("rootNode");
            }

            if (manager == null)
            {
                throw new ArgumentNullException("manager");
            }

            r_manager        = manager;
            r_rootNode       = rootNode;
            r_appDomainNodes = new Dictionary <UInt64, AppDomainNode>();

            Initialize(manager.ThreadStackManager.ThreadStacks);
        }
        internal DeadLocksNode(ThreadStackNodeManager manager, TreeNode rootNode)
        {
            if (rootNode == null)
                throw new ArgumentNullException("rootNode");

            if (manager == null)
                throw new ArgumentNullException("manager");

            r_manager = manager;
            r_rootNode = rootNode;
            r_deadLockNodes = new List<DeadLockNode>();

            r_deadlocksNode = rootNode.Nodes.Add("DeadLocks");
            r_deadlocksNode.ImageKey = "arrow_switch.png";
            r_deadlocksNode.SelectedImageKey = r_deadlocksNode.ImageKey;
            r_deadlocksNode.Tag = this;
            Refresh(r_manager.ThreadStackManager.DeadLocks);
        }
        internal ThreadStackOwnedNode(ThreadStackNodeManager manager, TreeNode threadStackNode, int index, UInt64 objectAddress)
        {
            if(threadStackNode==null)
                throw new ArgumentNullException("r_threadStackNode");

            if (manager == null)
                throw new ArgumentNullException("manager");

            r_manager = manager;
            r_threadStackNode = threadStackNode;

            r_ownedNode = r_threadStackNode.Nodes.Insert(index, GetText(objectAddress));
            r_ownedNode.ImageKey = "key.png";
            r_ownedNode.SelectedImageKey = r_ownedNode.ImageKey;
            r_ownedNode.Tag = this;

            
        }
        internal DeadLockItemNode(ThreadStackNodeManager manager, TreeNode deadlockNode, DeadLockItem deadlockItem)
        {
            if (deadlockNode == null)
                throw new ArgumentNullException("deadlockNode");

            if (manager == null)
                throw new ArgumentNullException("manager");

            if (deadlockItem == null)
                throw new ArgumentNullException("deadlockItem");

            r_manager = manager;
            r_deadlockNode = deadlockNode;

            String text = GetDeadLockItemText(deadlockItem);
            r_deadlockItemNode = r_deadlockNode.Nodes.Add(text);
            r_deadlockItemNode.ImageKey = "arrow_branch.png";
            r_deadlockItemNode.SelectedImageKey = r_deadlockItemNode.ImageKey;
            r_deadlockItemNode.Tag = this;
        }
Beispiel #16
0
        internal ThreadStackOwnedNode(ThreadStackNodeManager manager, TreeNode threadStackNode, int index, UInt64 objectAddress)
        {
            if (threadStackNode == null)
            {
                throw new ArgumentNullException("r_threadStackNode");
            }

            if (manager == null)
            {
                throw new ArgumentNullException("manager");
            }

            r_manager         = manager;
            r_threadStackNode = threadStackNode;

            r_ownedNode                  = r_threadStackNode.Nodes.Insert(index, GetText(objectAddress));
            r_ownedNode.ImageKey         = "key.png";
            r_ownedNode.SelectedImageKey = r_ownedNode.ImageKey;
            r_ownedNode.Tag              = this;
        }
        internal DeadLockNode(ThreadStackNodeManager manager, TreeNode deadlocksNode, int index)
        {
            if (deadlocksNode == null)
            {
                throw new ArgumentNullException("deadlocksNode");
            }

            if (manager == null)
            {
                throw new ArgumentNullException("manager");
            }

            r_manager           = manager;
            r_deadlocksNode     = deadlocksNode;
            r_deadLockItemNodes = new List <DeadLockItemNode>();

            r_deadlockNode                  = r_deadlocksNode.Nodes.Add("DeadLock " + index);
            r_deadlockNode.ImageKey         = "arrow_refresh.png";
            r_deadlockNode.SelectedImageKey = r_deadlockNode.ImageKey;
            r_deadlockNode.Tag              = this;
        }
Beispiel #18
0
        internal RootNode(ThreadStackNodeManager manager, TreeView root)
        {
            if (manager == null)
                throw new ArgumentNullException("manager");

            if (root == null)
                throw new ArgumentNullException("root");

            r_manager = manager;
            r_root = root;

            r_root.Nodes.Clear();
            r_rootNode = r_root.Nodes.Add(r_manager.ApplicationName);
            r_rootNode.ImageKey = "application_cascade.png";
            r_rootNode.SelectedImageKey = r_rootNode.ImageKey;
            r_rootNode.Tag = this;
            
            r_deadLocksNode = new DeadLocksNode(r_manager, r_rootNode);
            r_appDomainsNode = new AppDomainsNode(r_manager, r_rootNode);

            r_rootNode.Expand();
        }
        internal AppDomainNode(ThreadStackNodeManager manager, TreeNode rootNode, Dictionary<UInt32, ThreadStack> threadStacks)
        {
            if (rootNode == null)
                throw new ArgumentNullException("rootNode");

            if (manager == null)
                throw new ArgumentNullException("manager");

            r_manager = manager;
            r_rootNode = rootNode;

            String text = GetText(threadStacks);
            r_appDomainNode = r_rootNode.Nodes.Add(text);
            r_appDomainNode.ImageKey = "application.png";
            r_appDomainNode.SelectedImageKey = r_appDomainNode.ImageKey;
            r_appDomainNode.Tag = this;

            r_threadStackNodes = new Dictionary<uint, ThreadStackNode>();
            RefreshChildren(threadStacks);

            r_appDomainNode.Expand();
        }
        internal DeadLocksNode(ThreadStackNodeManager manager, TreeNode rootNode)
        {
            if (rootNode == null)
            {
                throw new ArgumentNullException("rootNode");
            }

            if (manager == null)
            {
                throw new ArgumentNullException("manager");
            }

            r_manager       = manager;
            r_rootNode      = rootNode;
            r_deadLockNodes = new List <DeadLockNode>();

            r_deadlocksNode                  = rootNode.Nodes.Add("DeadLocks");
            r_deadlocksNode.ImageKey         = "arrow_switch.png";
            r_deadlocksNode.SelectedImageKey = r_deadlocksNode.ImageKey;
            r_deadlocksNode.Tag              = this;
            Refresh(r_manager.ThreadStackManager.DeadLocks);
        }
        internal ThreadStackNode(ThreadStackNodeManager manager, TreeNode appDomainNode, ThreadStack threadStack)
        {
            if (appDomainNode == null)
                throw new ArgumentNullException("appDomainNode");

            if (manager == null)
                throw new ArgumentNullException("manager");

            r_manager = manager;
            r_appDomainNode = appDomainNode;

            String text = GetText(threadStack);
            r_threadStackNode = appDomainNode.Nodes.Add(text);
            r_threadStackNode.ImageKey = "cog.png";
            r_threadStackNode.SelectedImageKey = r_threadStackNode.ImageKey;
            r_threadStackNode.Tag = this;
            r_waitedOnNode = new ThreadStackWaitedOnNode(r_manager, r_threadStackNode);
            r_ownedNodes = new List<ThreadStackOwnedNode>();
            r_frameNodes = new List<ThreadStackFrameNode>();

            RefreshChildren(threadStack);
        }