Ejemplo n.º 1
0
        /// <summary>
        /// Create the template output
        /// </summary>
        public virtual string TransformText()
        {
            this.Write("\r\n");

            #line 10 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ArticleNavTemplate.tt"
            if (Articles.Count > 0)
            {
                foreach (var article in Articles)
                {
                    if (article is SDDocPlaceholder)
                    {
            #line default
            #line hidden
                        this.Write("\t\t\t<li> <object type=\"text/sitemap\">\r\n\t\t\t\t\t<param name=\"Name\" value=\"");

            #line 16 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ArticleNavTemplate.tt"
                        this.Write(this.ToStringHelper.ToStringWithCulture(WebUtility.HtmlEncode(article.Title)));

            #line default
            #line hidden
                        this.Write("\">\r\n\t\t\t\t\t<param name=\"Local\" value=\"");

            #line 17 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ArticleNavTemplate.tt"
                        this.Write(this.ToStringHelper.ToStringWithCulture(Helper.RemoveIllegalCharacters(article.Title.Replace(" ", "_"))));

            #line default
            #line hidden
                        this.Write(".html\">\r\n\t\t\t\t</object>\r\n\r\n\t\t\t\t");

            #line 20 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ArticleNavTemplate.tt"

                        var sdSolution   = StepInput.SDProject.Solutions[((SDDocPlaceholder)article).SolutionFile];
                        var sdRepository = sdSolution.Repositories.SingleOrDefault(r => r.TargetFx.Identifier == StepInput.CurrentTargetFx.Identifier);
                        if (sdRepository != null)
                        {
            #line default
            #line hidden
                            this.Write("\t\t\t\t\t\t\t\r\n\t\t\t\t\t<ul>\r\n\t\t\t\t\t");

            #line 26 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ArticleNavTemplate.tt"
                            var apiNavTemplate = new ApiNavTemplate {
                                SDRepository = sdRepository
                            };

            #line default
            #line hidden
                            this.Write("\t\t\t\t\t");

            #line 27 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ArticleNavTemplate.tt"
                            this.Write(this.ToStringHelper.ToStringWithCulture(apiNavTemplate.TransformText()));

            #line default
            #line hidden
                            this.Write("\r\n\t\t\t\t\t</ul>\r\n\r\n\t\t\t\t");

            #line 30 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ArticleNavTemplate.tt"
                        }

            #line default
            #line hidden
                        this.Write("\t\t\t</li>\r\n\t\t");

            #line 32 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ArticleNavTemplate.tt"
                    }
                    else if (article != null)
                    {
            #line default
            #line hidden
                        this.Write("\t\t\t<li> <object type=\"text/sitemap\">\r\n\t\t\t\t\t<param name=\"Name\" value=\"");

            #line 36 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ArticleNavTemplate.tt"
                        this.Write(this.ToStringHelper.ToStringWithCulture(WebUtility.HtmlEncode(article.Title)));

            #line default
            #line hidden
                        this.Write("\">\r\n\t\t\t\t\t<param name=\"Local\" value=\"");

            #line 37 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ArticleNavTemplate.tt"
                        this.Write(this.ToStringHelper.ToStringWithCulture(Helper.RemoveIllegalCharacters(article.Title.Replace(" ", "_"))));

            #line default
            #line hidden
                        this.Write(".html\">\r\n\t\t\t\t</object>\r\n\t\t\t</li>\r\n\t\t");

            #line 40 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ArticleNavTemplate.tt"
                    }
                    else
                    {
            #line default
            #line hidden
                        this.Write("\t\t\t<li> <object type=\"text/sitemap\">\r\n\t\t\t\t\t<param name=\"Name\" value=\"");

            #line 44 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ArticleNavTemplate.tt"
                        this.Write(this.ToStringHelper.ToStringWithCulture(WebUtility.HtmlEncode(article.Title)));

            #line default
            #line hidden
                        this.Write("\">\r\n\t\t\t\t\t<param name=\"Local\" value=\"");

            #line 45 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ArticleNavTemplate.tt"
                        this.Write(this.ToStringHelper.ToStringWithCulture(Helper.RemoveIllegalCharacters(article.Title.Replace(" ", "_"))));

            #line default
            #line hidden
                        this.Write(".html\">\r\n\t\t\t\t</object>\r\n\t\t\t\t<ul>\r\n\t\t\t\t");

            #line 48 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ArticleNavTemplate.tt"
                        var articleNavTemplate = new ArticleNavTemplate {
                            Articles = article.Children
                        };

            #line default
            #line hidden
                        this.Write("\t\t\t\t");

            #line 49 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ArticleNavTemplate.tt"
                        this.Write(this.ToStringHelper.ToStringWithCulture(articleNavTemplate.TransformText()));

            #line default
            #line hidden
                        this.Write("\r\n\t\t\t\t</ul>\r\n\t\t\t</li>\r\n\t\t");

            #line 52 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ArticleNavTemplate.tt"
                    }
                }
            }

            #line default
            #line hidden
            this.Write("\r\n");
            return(this.GenerationEnvironment.ToString());
        }
        /// <summary>
        /// Create the template output
        /// </summary>
        public virtual string TransformText()
        {
            this.Write("\r\n");
            
            #line 10 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ArticleNavTemplate.tt"
 if(Articles.Count > 0) {
	foreach (var article in Articles)
	{
		if (article is SDDocPlaceholder)
		{ 
            
            #line default
            #line hidden
            this.Write("\t\t\t<li> <object type=\"text/sitemap\">\r\n\t\t\t\t\t<param name=\"Name\" value=\"");
            
            #line 16 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ArticleNavTemplate.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(WebUtility.HtmlEncode(article.Title)));
            
            #line default
            #line hidden
            this.Write("\">\r\n\t\t\t\t\t<param name=\"Local\" value=\"");
            
            #line 17 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ArticleNavTemplate.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(Helper.RemoveIllegalCharacters(article.Title.Replace(" ", "_"))));
            
            #line default
            #line hidden
            this.Write(".html\">\r\n\t\t\t\t</object>\r\n\r\n\t\t\t\t");
            
            #line 20 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ArticleNavTemplate.tt"
 
				var sdSolution = StepInput.SDProject.Solutions[((SDDocPlaceholder)article).SolutionFile]; 
				var sdRepository = sdSolution.Repositories.SingleOrDefault(r => r.TargetFx.Identifier == StepInput.CurrentTargetFx.Identifier);
				if(sdRepository != null)
				{ 
            
            #line default
            #line hidden
            this.Write("\t\t\t\t\t\t\t\r\n\t\t\t\t\t<ul>\r\n\t\t\t\t\t");
            
            #line 26 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ArticleNavTemplate.tt"
 var apiNavTemplate = new ApiNavTemplate { SDRepository = sdRepository }; 
            
            #line default
            #line hidden
            this.Write("\t\t\t\t\t");
            
            #line 27 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ArticleNavTemplate.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(apiNavTemplate.TransformText()));
            
            #line default
            #line hidden
            this.Write("\r\n\t\t\t\t\t</ul>\r\n\r\n\t\t\t\t");
            
            #line 30 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ArticleNavTemplate.tt"
 } 
            
            #line default
            #line hidden
            this.Write("\t\t\t</li>\r\n\t\t");
            
            #line 32 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ArticleNavTemplate.tt"
 }
		else if (article != null)
		{ 
            
            #line default
            #line hidden
            this.Write("\t\t\t<li> <object type=\"text/sitemap\">\r\n\t\t\t\t\t<param name=\"Name\" value=\"");
            
            #line 36 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ArticleNavTemplate.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(WebUtility.HtmlEncode(article.Title)));
            
            #line default
            #line hidden
            this.Write("\">\r\n\t\t\t\t\t<param name=\"Local\" value=\"");
            
            #line 37 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ArticleNavTemplate.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(Helper.RemoveIllegalCharacters(article.Title.Replace(" ", "_"))));
            
            #line default
            #line hidden
            this.Write(".html\">\r\n\t\t\t\t</object>\r\n\t\t\t</li>\r\n\t\t");
            
            #line 40 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ArticleNavTemplate.tt"
 }
		else
		{ 
            
            #line default
            #line hidden
            this.Write("\t\t\t<li> <object type=\"text/sitemap\">\r\n\t\t\t\t\t<param name=\"Name\" value=\"");
            
            #line 44 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ArticleNavTemplate.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(WebUtility.HtmlEncode(article.Title)));
            
            #line default
            #line hidden
            this.Write("\">\r\n\t\t\t\t\t<param name=\"Local\" value=\"");
            
            #line 45 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ArticleNavTemplate.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(Helper.RemoveIllegalCharacters(article.Title.Replace(" ", "_"))));
            
            #line default
            #line hidden
            this.Write(".html\">\r\n\t\t\t\t</object>\r\n\t\t\t\t<ul>\r\n\t\t\t\t");
            
            #line 48 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ArticleNavTemplate.tt"
 var articleNavTemplate = new ArticleNavTemplate { Articles = article.Children }; 
            
            #line default
            #line hidden
            this.Write("\t\t\t\t");
            
            #line 49 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ArticleNavTemplate.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(articleNavTemplate.TransformText()));
            
            #line default
            #line hidden
            this.Write("\r\n\t\t\t\t</ul>\r\n\t\t\t</li>\r\n\t\t");
            
            #line 52 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ArticleNavTemplate.tt"
 }
	}
} 
            
            #line default
            #line hidden
            this.Write("\r\n");
            return this.GenerationEnvironment.ToString();
        }
        /// <summary>
        /// Create the template output
        /// </summary>
        public virtual string TransformText()
        {
            this.Write("\r\n<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\">\r\n<HTML>\r\n\t<HEAD>\r\n\t\t<meta name=\"" +
                       "GENERATOR\" content=\"sharpDox\">\r\n\t</HEAD>\r\n\t<BODY>\r\n\t\t<ul>\r\n\t\t<li> <object type=\"" +
                       "text/sitemap\">\r\n\t\t\t\t\t\t<param name=\"Name\" value=\"");

            #line 20 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\HhcTemplate.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(StepInput.SDProject.ProjectName));

            #line default
            #line hidden
            this.Write("\">\r\n\t\t\t\t\t\t<param name=\"Local\" value=\"");

            #line 21 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\HhcTemplate.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(StepInput.SDProject.ProjectName.Replace(" ", "")));

            #line default
            #line hidden
            this.Write("-Index.html\">\r\n\t\t\t\t\t</object>\r\n\r\n\t\t\t<ul>\r\n\t\t\t\t");

            #line 25 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\HhcTemplate.tt"
            if (StepInput.SDProject.Articles.Count > 0)
            {
                var articles = StepInput.SDProject.Articles.ContainsKey(StepInput.CurrentLanguage) ? StepInput.SDProject.Articles[StepInput.CurrentLanguage] : StepInput.SDProject.Articles["default"];
                foreach (var article in articles)
                {
            #line default
            #line hidden
                    this.Write("\t\t\t\t\t\t<li> <object type=\"text/sitemap\">\r\n\t\t\t\t\t\t\t\t\t<param name=\"Name\" value=\"");

            #line 30 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\HhcTemplate.tt"
                    this.Write(this.ToStringHelper.ToStringWithCulture(WebUtility.HtmlEncode(article.Title)));

            #line default
            #line hidden
                    this.Write("\">\r\n\t\t\t\t\t\t\t\t\t<param name=\"Local\" value=\"");

            #line 31 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\HhcTemplate.tt"
                    this.Write(this.ToStringHelper.ToStringWithCulture(Helper.RemoveIllegalCharacters(article.Title.Replace(" ", "_"))));

            #line default
            #line hidden
                    this.Write(".html\">\r\n\t\t\t\t\t\t\t</object>\r\n\r\n\t\t\t\t\t\t");

            #line 34 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\HhcTemplate.tt"
                    if (article is SDDocPlaceholder)
                    {
                        var sdSolution   = StepInput.SDProject.Solutions[((SDDocPlaceholder)article).SolutionFile];
                        var sdRepository = sdSolution.Repositories.SingleOrDefault(r => r.TargetFx.Identifier == StepInput.CurrentTargetFx.Identifier);
                        if (sdRepository != null)
                        {
            #line default
            #line hidden
                            this.Write("\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t<ul>\r\n\t\t\t\t\t\t\t\t");

            #line 41 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\HhcTemplate.tt"
                            var apiNavTemplate = new ApiNavTemplate {
                                SDRepository = sdRepository
                            };

            #line default
            #line hidden
                            this.Write("\t\t\t\t\t\t\t\t");

            #line 42 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\HhcTemplate.tt"
                            this.Write(this.ToStringHelper.ToStringWithCulture(apiNavTemplate.TransformText()));

            #line default
            #line hidden
                            this.Write("\r\n\t\t\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t\t\t</li>\r\n\t\t\t\t\t\t");

            #line 45 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\HhcTemplate.tt"
                        }
                        else
                        {
            #line default
            #line hidden
                            this.Write(" </li> ");

            #line 45 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\HhcTemplate.tt"
                        }
                    }
                    else if (article.Children.Count > 0)
                    {
            #line default
            #line hidden
                        this.Write("\t\t\t\t\t\t\t\t<ul>\r\n\t\t\t\t\t\t\t\t");

            #line 50 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\HhcTemplate.tt"
                        var articleNavTemplate = new ArticleNavTemplate {
                            Articles = article.Children
                        };

            #line default
            #line hidden
                        this.Write("\t\t\t\t\t\t\t\t");

            #line 51 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\HhcTemplate.tt"
                        this.Write(this.ToStringHelper.ToStringWithCulture(articleNavTemplate.TransformText()));

            #line default
            #line hidden
                        this.Write("\r\n\t\t\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t");

            #line 54 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\HhcTemplate.tt"
                    }

            #line default
            #line hidden
                    this.Write("\r\n\t\t\t\t\t\t</li>\r\n\t\t\t\t");

            #line 57 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\HhcTemplate.tt"
                }
            }
            else
            {
                var sdSolution   = StepInput.SDProject.Solutions.Values.Single();
                var sdRepository = sdSolution.Repositories.SingleOrDefault(r => r.TargetFx.Identifier == StepInput.CurrentTargetFx.Identifier);
                if (sdRepository != null)
                {
                    var apiNavTemplate = new ApiNavTemplate {
                        SDRepository = sdRepository
                    };

            #line default
            #line hidden
                    this.Write("\t\t\t\t\t\t");

            #line 64 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\HhcTemplate.tt"
                    this.Write(this.ToStringHelper.ToStringWithCulture(apiNavTemplate.TransformText()));

            #line default
            #line hidden
                    this.Write("\r\n\t\t\t\t");

            #line 65 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\HhcTemplate.tt"
                }
            }

            #line default
            #line hidden
            this.Write("\r\n\t\t\t</ul>\r\n\t\t</li>\r\n\t\t</ul>\r\n\t</BODY>\r\n</HTML>");
            return(this.GenerationEnvironment.ToString());
        }
Ejemplo n.º 4
0
        public virtual string TransformText()
        {
            this.Write("\r\n<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\">\r\n<HTML>\r\n\t<HEAD>\r\n\t\t<meta name=\"" +
                    "GENERATOR\" content=\"sharpDox\">\r\n\t</HEAD>\r\n\t<BODY>\r\n\t\t<ul>\r\n\t\t<li> <object type=\"" +
                    "text/sitemap\">\r\n\t\t\t\t\t\t<param name=\"Name\" value=\"");
            
            #line 19 "D:\Users\gega1de\Desktop\SharpDox\ChmExporter\Templates\Nav\HhcTemplate.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(SDRepository.ProjectInfo.ProjectName));
            
            #line default
            #line hidden
            this.Write("\">\r\n\t\t\t\t\t\t<param name=\"Local\" value=\"");
            
            #line 20 "D:\Users\gega1de\Desktop\SharpDox\ChmExporter\Templates\Nav\HhcTemplate.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(SDRepository.ProjectInfo.ProjectName.Replace(" ", "")));
            
            #line default
            #line hidden
            this.Write("-Index.html\">\r\n\t\t\t\t\t</object>\r\n\r\n\t\t\t<ul>\r\n\t\t\t\t");
            
            #line 24 "D:\Users\gega1de\Desktop\SharpDox\ChmExporter\Templates\Nav\HhcTemplate.tt"
 if(SDRepository.Articles.Count > 0) {
					var articles = SDRepository.Articles.ContainsKey(CurrentLanguage) ? SDRepository.Articles[CurrentLanguage] : SDRepository.Articles["default"];
					foreach (var article in articles)
					{ 
            
            #line default
            #line hidden
            this.Write("\t\t\t\t\t\t<li> <object type=\"text/sitemap\">\r\n\t\t\t\t\t\t\t\t\t<param name=\"Name\" value=\"");
            
            #line 29 "D:\Users\gega1de\Desktop\SharpDox\ChmExporter\Templates\Nav\HhcTemplate.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(WebUtility.HtmlEncode(article.Title)));
            
            #line default
            #line hidden
            this.Write("\">\r\n\t\t\t\t\t\t\t\t\t<param name=\"Local\" value=\"");
            
            #line 30 "D:\Users\gega1de\Desktop\SharpDox\ChmExporter\Templates\Nav\HhcTemplate.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(Helper.RemoveIllegalCharacters(article.Title.Replace(" ", "_"))));
            
            #line default
            #line hidden
            this.Write(".html\">\r\n\t\t\t\t\t\t\t</object>\r\n\r\n\t\t\t\t\t\t");
            
            #line 33 "D:\Users\gega1de\Desktop\SharpDox\ChmExporter\Templates\Nav\HhcTemplate.tt"
 if (article.Content == "SDDoc")
						{ 
            
            #line default
            #line hidden
            this.Write("\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t<ul>\r\n\t\t\t\t\t\t\t\t");
            
            #line 36 "D:\Users\gega1de\Desktop\SharpDox\ChmExporter\Templates\Nav\HhcTemplate.tt"
 var apiNavTemplate = new ApiNavTemplate { SDRepository = SDRepository, Strings = Strings }; 
            
            #line default
            #line hidden
            this.Write("\t\t\t\t\t\t\t\t");
            
            #line 37 "D:\Users\gega1de\Desktop\SharpDox\ChmExporter\Templates\Nav\HhcTemplate.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(apiNavTemplate.TransformText()));
            
            #line default
            #line hidden
            this.Write("\r\n\t\t\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t\t\t</li>\r\n\t\t\t\t\t\t");
            
            #line 40 "D:\Users\gega1de\Desktop\SharpDox\ChmExporter\Templates\Nav\HhcTemplate.tt"
 }
						else if(article.Children.Count > 0)
						{ 
            
            #line default
            #line hidden
            this.Write("\t\t\t\t\t\t\t\t<ul>\r\n\t\t\t\t\t\t\t\t");
            
            #line 44 "D:\Users\gega1de\Desktop\SharpDox\ChmExporter\Templates\Nav\HhcTemplate.tt"
 var articleNavTemplate = new ArticleNavTemplate { SDRepository = SDRepository, Articles = article.Children, Strings = Strings }; 
            
            #line default
            #line hidden
            this.Write("\t\t\t\t\t\t\t\t");
            
            #line 45 "D:\Users\gega1de\Desktop\SharpDox\ChmExporter\Templates\Nav\HhcTemplate.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(articleNavTemplate.TransformText()));
            
            #line default
            #line hidden
            this.Write("\r\n\t\t\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t");
            
            #line 48 "D:\Users\gega1de\Desktop\SharpDox\ChmExporter\Templates\Nav\HhcTemplate.tt"
 } 
            
            #line default
            #line hidden
            this.Write("\r\n\t\t\t\t\t\t</li>\r\n\t\t\t\t");
            
            #line 51 "D:\Users\gega1de\Desktop\SharpDox\ChmExporter\Templates\Nav\HhcTemplate.tt"
	}
				} else {
					var apiNavTemplate = new ApiNavTemplate { SDRepository = SDRepository, Strings = Strings }; 
            
            #line default
            #line hidden
            this.Write("\t\t\t\t\t");
            
            #line 54 "D:\Users\gega1de\Desktop\SharpDox\ChmExporter\Templates\Nav\HhcTemplate.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(apiNavTemplate.TransformText()));
            
            #line default
            #line hidden
            this.Write("\r\n\t\t\t\t");
            
            #line 55 "D:\Users\gega1de\Desktop\SharpDox\ChmExporter\Templates\Nav\HhcTemplate.tt"
 } 
            
            #line default
            #line hidden
            this.Write("\r\n\t\t\t</ul>\r\n\t\t</li>\r\n\t\t</ul>\r\n\t</BODY>\r\n</HTML>\r\n\r\n");
            return this.GenerationEnvironment.ToString();
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Create the template output
        /// </summary>
        public virtual string TransformText()
        {
            this.Write("\r\n<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\">\r\n<HTML>\r\n\t<HEAD>\r\n\t\t<meta name=\"" +
                    "GENERATOR\" content=\"sharpDox\">\r\n\t</HEAD>\r\n\t<BODY>\r\n\t\t<ul>\r\n\t\t<li> <object type=\"" +
                    "text/sitemap\">\r\n\t\t\t\t\t\t<param name=\"Name\" value=\"");
            
            #line 20 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\HhcTemplate.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(StepInput.SDProject.ProjectName));
            
            #line default
            #line hidden
            this.Write("\">\r\n\t\t\t\t\t\t<param name=\"Local\" value=\"");
            
            #line 21 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\HhcTemplate.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(StepInput.SDProject.ProjectName.Replace(" ", "")));
            
            #line default
            #line hidden
            this.Write("-Index.html\">\r\n\t\t\t\t\t</object>\r\n\r\n\t\t\t<ul>\r\n\t\t\t\t");
            
            #line 25 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\HhcTemplate.tt"
 if(StepInput.SDProject.Articles.Count > 0) {
					var articles = StepInput.SDProject.Articles.ContainsKey(StepInput.CurrentLanguage) ? StepInput.SDProject.Articles[StepInput.CurrentLanguage] : StepInput.SDProject.Articles["default"];
					foreach (var article in articles)
					{ 
            
            #line default
            #line hidden
            this.Write("\t\t\t\t\t\t<li> <object type=\"text/sitemap\">\r\n\t\t\t\t\t\t\t\t\t<param name=\"Name\" value=\"");
            
            #line 30 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\HhcTemplate.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(WebUtility.HtmlEncode(article.Title)));
            
            #line default
            #line hidden
            this.Write("\">\r\n\t\t\t\t\t\t\t\t\t<param name=\"Local\" value=\"");
            
            #line 31 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\HhcTemplate.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(Helper.RemoveIllegalCharacters(article.Title.Replace(" ", "_"))));
            
            #line default
            #line hidden
            this.Write(".html\">\r\n\t\t\t\t\t\t\t</object>\r\n\r\n\t\t\t\t\t\t");
            
            #line 34 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\HhcTemplate.tt"
 if (article is SDDocPlaceholder)
						{ 
							var sdSolution = StepInput.SDProject.Solutions[((SDDocPlaceholder)article).SolutionFile]; 
							var sdRepository = sdSolution.Repositories.SingleOrDefault(r => r.TargetFx.Identifier == StepInput.CurrentTargetFx.Identifier);
							if(sdRepository != null)
							{ 
            
            #line default
            #line hidden
            this.Write("\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t<ul>\r\n\t\t\t\t\t\t\t\t");
            
            #line 41 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\HhcTemplate.tt"
 var apiNavTemplate = new ApiNavTemplate { SDRepository = sdRepository }; 
            
            #line default
            #line hidden
            this.Write("\t\t\t\t\t\t\t\t");
            
            #line 42 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\HhcTemplate.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(apiNavTemplate.TransformText()));
            
            #line default
            #line hidden
            this.Write("\r\n\t\t\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t\t\t</li>\r\n\t\t\t\t\t\t");
            
            #line 45 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\HhcTemplate.tt"
  } else { 
            
            #line default
            #line hidden
            this.Write(" </li> ");
            
            #line 45 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\HhcTemplate.tt"
 }
						}
						else if(article.Children.Count > 0)
						{ 
            
            #line default
            #line hidden
            this.Write("\t\t\t\t\t\t\t\t<ul>\r\n\t\t\t\t\t\t\t\t");
            
            #line 50 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\HhcTemplate.tt"
 var articleNavTemplate = new ArticleNavTemplate { Articles = article.Children }; 
            
            #line default
            #line hidden
            this.Write("\t\t\t\t\t\t\t\t");
            
            #line 51 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\HhcTemplate.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(articleNavTemplate.TransformText()));
            
            #line default
            #line hidden
            this.Write("\r\n\t\t\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t");
            
            #line 54 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\HhcTemplate.tt"
 } 
            
            #line default
            #line hidden
            this.Write("\r\n\t\t\t\t\t\t</li>\r\n\t\t\t\t");
            
            #line 57 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\HhcTemplate.tt"
	}
				} else {
					var sdSolution = StepInput.SDProject.Solutions.Values.Single();
					var sdRepository = sdSolution.Repositories.SingleOrDefault(r => r.TargetFx.Identifier == StepInput.CurrentTargetFx.Identifier);
					if(sdRepository != null)
					{
						var apiNavTemplate = new ApiNavTemplate { SDRepository = sdRepository }; 
            
            #line default
            #line hidden
            this.Write("\t\t\t\t\t\t");
            
            #line 64 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\HhcTemplate.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(apiNavTemplate.TransformText()));
            
            #line default
            #line hidden
            this.Write("\r\n\t\t\t\t");
            
            #line 65 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\HhcTemplate.tt"
	}
				} 
            
            #line default
            #line hidden
            this.Write("\r\n\t\t\t</ul>\r\n\t\t</li>\r\n\t\t</ul>\r\n\t</BODY>\r\n</HTML>");
            return this.GenerationEnvironment.ToString();
        }
Ejemplo n.º 6
0
        public virtual string TransformText()
        {
            this.Write("\r\n");
            
            #line 12 "D:\Users\gega1de\Desktop\SharpDox\ChmExporter\Templates\Nav\ArticleNavTemplate.tt"
 if(Articles.Count > 0) {
	foreach (var article in Articles)
	{
		if (article.Content == "SDDoc")
		{ 
            
            #line default
            #line hidden
            this.Write("\t\t\t<li> <object type=\"text/sitemap\">\r\n\t\t\t\t\t<param name=\"Name\" value=\"");
            
            #line 18 "D:\Users\gega1de\Desktop\SharpDox\ChmExporter\Templates\Nav\ArticleNavTemplate.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(WebUtility.HtmlEncode(article.Title)));
            
            #line default
            #line hidden
            this.Write("\">\r\n\t\t\t\t\t<param name=\"Local\" value=\"");
            
            #line 19 "D:\Users\gega1de\Desktop\SharpDox\ChmExporter\Templates\Nav\ArticleNavTemplate.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(Helper.RemoveIllegalCharacters(article.Title.Replace(" ", "_"))));
            
            #line default
            #line hidden
            this.Write(".html\">\r\n\t\t\t\t</object>\r\n\t\t\t\t<ul>\r\n\t\t\t\t");
            
            #line 22 "D:\Users\gega1de\Desktop\SharpDox\ChmExporter\Templates\Nav\ArticleNavTemplate.tt"
 var apiNavTemplate = new ApiNavTemplate { SDRepository = SDRepository, Strings = Strings }; 
            
            #line default
            #line hidden
            this.Write("\t\t\t\t");
            
            #line 23 "D:\Users\gega1de\Desktop\SharpDox\ChmExporter\Templates\Nav\ArticleNavTemplate.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(apiNavTemplate.TransformText()));
            
            #line default
            #line hidden
            this.Write("\r\n\t\t\t\t</ul>\r\n\t\t\t</li>\r\n\t\t");
            
            #line 26 "D:\Users\gega1de\Desktop\SharpDox\ChmExporter\Templates\Nav\ArticleNavTemplate.tt"
 }
		else if (!string.IsNullOrEmpty(article.Content))
		{ 
            
            #line default
            #line hidden
            this.Write("\t\t\t<li> <object type=\"text/sitemap\">\r\n\t\t\t\t\t<param name=\"Name\" value=\"");
            
            #line 30 "D:\Users\gega1de\Desktop\SharpDox\ChmExporter\Templates\Nav\ArticleNavTemplate.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(WebUtility.HtmlEncode(article.Title)));
            
            #line default
            #line hidden
            this.Write("\">\r\n\t\t\t\t\t<param name=\"Local\" value=\"");
            
            #line 31 "D:\Users\gega1de\Desktop\SharpDox\ChmExporter\Templates\Nav\ArticleNavTemplate.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(Helper.RemoveIllegalCharacters(article.Title.Replace(" ", "_"))));
            
            #line default
            #line hidden
            this.Write(".html\">\r\n\t\t\t\t</object>\r\n\t\t\t</li>\r\n\t\t");
            
            #line 34 "D:\Users\gega1de\Desktop\SharpDox\ChmExporter\Templates\Nav\ArticleNavTemplate.tt"
 }
		else
		{ 
            
            #line default
            #line hidden
            this.Write("\t\t\t<li> <object type=\"text/sitemap\">\r\n\t\t\t\t\t<param name=\"Name\" value=\"");
            
            #line 38 "D:\Users\gega1de\Desktop\SharpDox\ChmExporter\Templates\Nav\ArticleNavTemplate.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(WebUtility.HtmlEncode(article.Title)));
            
            #line default
            #line hidden
            this.Write("\">\r\n\t\t\t\t\t<param name=\"Local\" value=\"");
            
            #line 39 "D:\Users\gega1de\Desktop\SharpDox\ChmExporter\Templates\Nav\ArticleNavTemplate.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(Helper.RemoveIllegalCharacters(article.Title.Replace(" ", "_"))));
            
            #line default
            #line hidden
            this.Write(".html\">\r\n\t\t\t\t</object>\r\n\t\t\t\t<ul>\r\n\t\t\t\t");
            
            #line 42 "D:\Users\gega1de\Desktop\SharpDox\ChmExporter\Templates\Nav\ArticleNavTemplate.tt"
 var articleNavTemplate = new ArticleNavTemplate { SDRepository = SDRepository, Articles = article.Children, Strings = Strings }; 
            
            #line default
            #line hidden
            this.Write("\t\t\t\t");
            
            #line 43 "D:\Users\gega1de\Desktop\SharpDox\ChmExporter\Templates\Nav\ArticleNavTemplate.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(articleNavTemplate.TransformText()));
            
            #line default
            #line hidden
            this.Write("\r\n\t\t\t\t</ul>\r\n\t\t\t</li>\r\n\t\t");
            
            #line 46 "D:\Users\gega1de\Desktop\SharpDox\ChmExporter\Templates\Nav\ArticleNavTemplate.tt"
 }
	}
} 
            
            #line default
            #line hidden
            this.Write("\r\n");
            return this.GenerationEnvironment.ToString();
        }