コード例 #1
0
        public void Execute()
        {
            MockBuild builder = new MockBuild();
            
            MRefBuilder task = new MRefBuilder();
            task.BuildEngine = builder;
            task.Assemblies = new TaskItem[] {
                new TaskItem(@"..\..\..\..\Libraries\ICSharpCode.SharpZipLib.dll") 
            };
            task.OutputFile = new TaskItem("reflection.org");
            bool result = task.Execute();

            Assert.IsTrue(result);
        }
コード例 #2
0
ファイル: Sandcastle.cs プロジェクト: 464884492/msbuildtasks
        //step 3
        private bool Reflection()
        {
            Log.LogMessage("Creating reflection data.");

            ITaskItem reflectionItem = new TaskItem(
                Path.Combine(TopicStyleDirectory, "reflection.org"));

            MRefBuilder mref = new MRefBuilder();
            CopyBuildEngine(mref);

            mref.Assemblies = WorkingAssemblies;
            mref.References = WorkingReferences;
            mref.OutputFile = reflectionItem;

            if (!mref.Execute())
                return false;

            XslTransform xslt = new XslTransform();
            CopyBuildEngine(xslt);

            xslt.XmlFile = reflectionItem;
            xslt.OutputFile = new TaskItem(ReflectionFile);

            if (TopicStyle == "prototype")
            {
                xslt.XsltFiles = new ITaskItem[] {
                    new TaskItem(Path.Combine(
                        SandcastleEnviroment.TransformsDirectory, 
                        "ApplyPrototypeDocModel.xsl")),
                    new TaskItem(Path.Combine(
                        SandcastleEnviroment.TransformsDirectory, 
                        "AddGuidFilenames.xsl"))
                };

            }
            else
            {
                xslt.XsltFiles = new ITaskItem[] {
                    new TaskItem(Path.Combine(
                        SandcastleEnviroment.TransformsDirectory, 
                        "ApplyVSDocModel.xsl")),
                    new TaskItem(Path.Combine(
                        SandcastleEnviroment.TransformsDirectory, 
                        "AddFriendlyFilenames.xsl"))
                };
                if (TopicStyle == "hana")
                    xslt.Arguments = new string[] {
                        "IncludeAllMembersTopic=false",
                        "IncludeInheritedOverloadTopics=true" };
                else
                    xslt.Arguments = new string[] {
                        "IncludeAllMembersTopic=true",
                        "IncludeInheritedOverloadTopics=true" };
            }
            return xslt.Execute();
        }
コード例 #3
0
ファイル: Sandcastle.cs プロジェクト: julthep/CommunityServer
        //step 3
        private bool Reflection()
        {
            Log.LogMessage("Creating reflection data.");

            ITaskItem reflectionItem = new TaskItem(
                Path.Combine(TopicStyleDirectory, "reflection.org"));

            MRefBuilder mref = new MRefBuilder();

            CopyBuildEngine(mref);

            mref.Assemblies = WorkingAssemblies;
            mref.References = WorkingReferences;
            mref.OutputFile = reflectionItem;

            if (!mref.Execute())
            {
                return(false);
            }

            XslTransform xslt = new XslTransform();

            CopyBuildEngine(xslt);

            xslt.XmlFile    = reflectionItem;
            xslt.OutputFile = new TaskItem(ReflectionFile);

            if (TopicStyle == "prototype")
            {
                xslt.XsltFiles = new ITaskItem[] {
                    new TaskItem(Path.Combine(
                                     SandcastleEnviroment.TransformsDirectory,
                                     "ApplyPrototypeDocModel.xsl")),
                    new TaskItem(Path.Combine(
                                     SandcastleEnviroment.TransformsDirectory,
                                     "AddGuidFilenames.xsl"))
                };
            }
            else
            {
                xslt.XsltFiles = new ITaskItem[] {
                    new TaskItem(Path.Combine(
                                     SandcastleEnviroment.TransformsDirectory,
                                     "ApplyVSDocModel.xsl")),
                    new TaskItem(Path.Combine(
                                     SandcastleEnviroment.TransformsDirectory,
                                     "AddFriendlyFilenames.xsl"))
                };
                if (TopicStyle == "hana")
                {
                    xslt.Arguments = new string[] {
                        "IncludeAllMembersTopic=false",
                        "IncludeInheritedOverloadTopics=true"
                    }
                }
                ;
                else
                {
                    xslt.Arguments = new string[] {
                        "IncludeAllMembersTopic=true",
                        "IncludeInheritedOverloadTopics=true"
                    }
                };
            }
            return(xslt.Execute());
        }