Exemple #1
0
        public RxProjectInfo Compile()
        {
            RxProjectInfo projectInfo = new RxProjectInfo();
            projectInfo.Build()

            return new RxProjectInfo();
        }
        public RxAssemblyInfo BuildAssemblyInfo(RxProjectInfo project, Assembly reflection, string assemblyCommentsPath)
        {
            RxAssemblyInfo instance = new RxAssemblyInfo()
            {
                Project = project,
                Reflection = reflection,
                id = string.Concat("A:", reflection.GetName().Name),
                caption = reflection.GetName().Name + ".dll",
                fileName = Path.GetFileName(reflection.Location),
                cultureInfo = reflection.GetName().CultureInfo.ToString(),
                version = reflection.GetName().Version.ToString(),
            };
            instance.SetUri(project, instance.id);

            project.AppendAssembly(context, this);
            context.LogNormal("Built Assembly : {0}", id);

            BuildFileComments(instance);

            BuildExtensionMethods(context);

            Project.AddMember(this);

            //Load the input XML document
            XDocument source = XDocument.Load(assemblyCommentsPath, LoadOptions.None);

            //Build a dictionary based on the name/id of each member
            memberElements = source.Descendants("member").ToDictionary(memberElement => memberElement.Attribute("name").Value);

            //Partition types by namespace
            ILookup<string, Type> typesByNamespace = reflection.GetExportedTypes().ToLookup(t => t.Namespace);

            List<RxNamespaceInfo> rxNamespaces = new List<RxNamespaceInfo>(typesByNamespace.Count);

            //Process each namespace
            foreach (IGrouping<string, Type> typeGrouping in typesByNamespace)
            {
                RxNamespaceInfo xns = new RxNamespaceInfo();
                xns.Build(context, this, typeGrouping.Key, typeGrouping);

                rxNamespaces.Add(xns);
            }
            this.@namespace = rxNamespaces.ToArray();
        }