Esempio n. 1
0
 public static NamespaceNode FindNamespaceNode(TreeNodeCollection nodes, string namespaceName)
 {
     foreach (TreeNode tn in nodes)
     {
         NamespaceNode ntn = tn as NamespaceNode;
         if (ntn == null)
         {
             continue;
         }
         if (ntn.Namespace == namespaceName)
         {
             return(ntn);
         }
     }
     return(null);
 }
Esempio n. 2
0
 public static TreeNode GetNamespaceNode(TreeNode asmNode, string typedefName)
 {
    string[] names = ReportHelper.SplitNamespaces(typedefName);
    TreeNode parentNode = asmNode;
    for (int i = 0; i < names.Length - 1; ++i)
    {
       NamespaceNode nextNode = FindNamespaceNode(parentNode.Nodes, names[i]);
       if (nextNode == null)
       {
          nextNode = new NamespaceNode(names[i]);
          parentNode.Nodes.Add(nextNode);
       }
       parentNode = nextNode;
    }
    return parentNode;
 }
Esempio n. 3
0
        public static TreeNode GetNamespaceNode(TreeNode asmNode, string typedefName)
        {
            string[] names      = ReportHelper.SplitNamespaces(typedefName);
            TreeNode parentNode = asmNode;

            for (int i = 0; i < names.Length - 1; ++i)
            {
                NamespaceNode nextNode = FindNamespaceNode(parentNode.Nodes, names[i]);
                if (nextNode == null)
                {
                    nextNode = new NamespaceNode(names[i]);
                    parentNode.Nodes.Add(nextNode);
                }
                parentNode = nextNode;
            }
            return(parentNode);
        }