private static void CreateTypes(Namespace ns, IEnumerable<XType> types)
        {
            foreach (var type in types)
            {
                var typeInNamespace = new CodeType
                {
                    Name = type.Name,
                    Namespace = ns,
                    Metrics = CreateMetrics(type.Metrics.Metric),
                    Members = new List<CodeMember>()
                };

                CreateMembers(typeInNamespace, type.Members.Member);

                ns.Types.Add(typeInNamespace);
            }
        }
        private static void CreateNamespaces(Module module, IEnumerable<XNamespace> namespaces)
        {
            foreach (var ns in namespaces)
            {
                var nsInModule = new Namespace
                {
                    Name = ns.Name,
                    Module = module,
                    Types = new List<CodeType>(),
                    Metrics = CreateMetrics(ns.Metrics.Metric)
                };

                CreateTypes(nsInModule, ns.Types.Type);

                module.Namespaces.Add(nsInModule);
            }
        }