private AssemblyType GetAssemblyType(AssemblyNamespace assemblyNamespace, Type type)
        {
            AssemblyType assemblyType = new AssemblyType();

            assemblyNamespace.AssTypes.Add(assemblyType);
            assemblyType.AssType = type.Name;
            return(assemblyType);
        }
        private AssemblyNamespace GetAssemblyNamespace(AssemblyResult assemblyResult, Type type)
        {
            foreach (AssemblyNamespace assemblyNamespace in assemblyResult.AssemblyNamespaces)
            {
                if (type.Namespace == null || assemblyNamespace.Namespace == null)
                {
                    return(null);
                }
                else if (assemblyNamespace.Namespace.Equals(type.Namespace))
                {
                    return(assemblyNamespace);
                }
            }
            AssemblyNamespace tempNamespace = new AssemblyNamespace();

            assemblyResult.AssemblyNamespaces.Add(tempNamespace);
            tempNamespace.Namespace = type.Namespace;
            return(tempNamespace);
        }
        public AssemblyResult Run(string filename)
        {
            assembly = Assembly.LoadFrom(filename);
            AssemblyResult assemblyResult = new AssemblyResult();

            assemblyResult.AssemblyName = assembly.FullName;

            Type[] types;
            types = assembly.GetTypes();
            foreach (Type type in types)
            {
                AssemblyNamespace assemblyNamespace = GetAssemblyNamespace(assemblyResult, type);
                if (assemblyNamespace != null)
                {
                    AssemblyType assemblyType = GetAssemblyType(assemblyNamespace, type);
                    FillInformationInAssemblyType(assembly, assemblyType, type);
                }
            }
            SortAssemblyResult(assemblyResult);
            return(assemblyResult);
        }