public void Build()
 {
     foreach (string asmName in report.GetAssemblies())
     {
         AssemblyItem assemblyItem = new AssemblyItem(asmName);
         foreach (CoverageReport.TypeDescriptor d in report.GetTypes(assemblyItem.Name))
         {
             ClassItem classItem = new ClassItem(d.typeName, assemblyItem);
             BuildNamespaceChain(assemblyItem, classItem);
             BuildMethods(d.methods, classItem);
             assemblyItem.AddType(classItem);
         }
         assemblyList.Add(assemblyItem);
     }
 }
 private void BuildMethods(CoverageReport.MethodDescriptor[] mdList, ClassItem classItem)
 {
     foreach (CoverageReport.MethodDescriptor md in mdList)
     {
         MethodItem mdItem = new MethodItem(md, classItem);
         BuildMethodBlocks(md, mdItem);
         classItem.AddMethod(mdItem);
     }
 }
        private void BuildNamespaceChain(AssemblyItem assemblyItem, ClassItem classItem)
        {
            string[] parts = CoverageReportHelper.SplitNamespaces(classItem.QName);

            NamespaceItem lastNamespaceItem = null;
            for (int i = 0; i < parts.Length - 1; ++i)
            {
                NamespaceItem namespaceItem = assemblyItem.FindNamespace(parts[i], lastNamespaceItem);
                if (namespaceItem == null)
                {
                    namespaceItem = new NamespaceItem(parts[i], assemblyItem);
                    namespaceItem.Parent = lastNamespaceItem;
                    assemblyItem.AddNamespace(namespaceItem);
                }
                lastNamespaceItem = namespaceItem;
            }

            classItem.Namespace = lastNamespaceItem;
        }
 public void AddType(ClassItem item)
 {
     types.Add(item);
 }