Inheritance: NamespaceNavigationBase
Exemplo n.º 1
0
        /// <summary>
        /// Create the template output
        /// </summary>
        public virtual string TransformText()
        {
            this.Write("\r\n");
            this.Write("\r\n");
            
            #line 11 "D:\Github\SharpDox.Plugins.Html\src\Templates\Navigation\ApiNavigation.tt"
 
//First merge all namespace and types to create a navigation for all available targets
var consolidatedNamespaces = new List<SDNamespace>();
var targetNamespaces = SDSolution.GetAllSolutionNamespaces(); 
foreach(var targetNamespace in targetNamespaces)
{
	var consolidatedNamespace = targetNamespace.Value.Values.First();
	foreach(var sdNamespace in targetNamespace.Value.Values.Skip(1))
	{
		foreach(var sdType in sdNamespace.Types)
		{
			if(consolidatedNamespace.Types.SingleOrDefault(s => s.Identifier == sdType.Identifier) == null)
			{
				consolidatedNamespace.Types.Add(sdType);
			}			
		}
	}
	consolidatedNamespaces.Add(consolidatedNamespace);
}

foreach(var sdNamespace in consolidatedNamespaces)
{
	var namespaceNavTemplate = new NamespaceNavigation { Namespace = sdNamespace }; 
            
            #line default
            #line hidden
            this.Write("\t{\r\n\t\tid: \'");
            
            #line 35 "D:\Github\SharpDox.Plugins.Html\src\Templates\Navigation\ApiNavigation.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(sdNamespace.Identifier));
            
            #line default
            #line hidden
            this.Write("\',\r\n\t\ttext: \'");
            
            #line 36 "D:\Github\SharpDox.Plugins.Html\src\Templates\Navigation\ApiNavigation.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(sdNamespace.Fullname));
            
            #line default
            #line hidden
            this.Write("\',\r\n\t\ticon: \'./assets/icons/namespace_public.png\',\r\n\t\ta_attr: { href : \'#/namespa" +
                    "ce/");
            
            #line 38 "D:\Github\SharpDox.Plugins.Html\src\Templates\Navigation\ApiNavigation.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(sdNamespace.Identifier));
            
            #line default
            #line hidden
            this.Write("\' },\r\n\t\tchildren: [\r\n\t\t\t");
            
            #line 40 "D:\Github\SharpDox.Plugins.Html\src\Templates\Navigation\ApiNavigation.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(namespaceNavTemplate.TransformText()));
            
            #line default
            #line hidden
            this.Write("\r\n\t\t]\r\n\t},\r\n");
            
            #line 43 "D:\Github\SharpDox.Plugins.Html\src\Templates\Navigation\ApiNavigation.tt"
 } 
            
            #line default
            #line hidden
            this.Write("\r\n");
            return this.GenerationEnvironment.ToString();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Create the template output
        /// </summary>
        public virtual string TransformText()
        {
            this.Write("\r\n");
            this.Write("\r\n");

            #line 11 "D:\Github\SharpDox.Plugins.Html\src\Templates\Navigation\ApiNavigation.tt"

//First merge all namespace and types to create a navigation for all available targets
            var consolidatedNamespaces = new List <SDNamespace>();
            var targetNamespaces       = SDSolution.GetAllSolutionNamespaces();
            foreach (var targetNamespace in targetNamespaces)
            {
                var consolidatedNamespace = targetNamespace.Value.Values.First();
                foreach (var sdNamespace in targetNamespace.Value.Values.Skip(1))
                {
                    foreach (var sdType in sdNamespace.Types)
                    {
                        if (consolidatedNamespace.Types.SingleOrDefault(s => s.Identifier == sdType.Identifier) == null)
                        {
                            consolidatedNamespace.Types.Add(sdType);
                        }
                    }
                }
                consolidatedNamespaces.Add(consolidatedNamespace);
            }

            foreach (var sdNamespace in consolidatedNamespaces)
            {
                var namespaceNavTemplate = new NamespaceNavigation {
                    Namespace = sdNamespace
                };

            #line default
            #line hidden
                this.Write("\t{\r\n\t\tid: \'");

            #line 35 "D:\Github\SharpDox.Plugins.Html\src\Templates\Navigation\ApiNavigation.tt"
                this.Write(this.ToStringHelper.ToStringWithCulture(sdNamespace.Identifier));

            #line default
            #line hidden
                this.Write("\',\r\n\t\ttext: \'");

            #line 36 "D:\Github\SharpDox.Plugins.Html\src\Templates\Navigation\ApiNavigation.tt"
                this.Write(this.ToStringHelper.ToStringWithCulture(sdNamespace.Fullname));

            #line default
            #line hidden
                this.Write("\',\r\n\t\ticon: \'./assets/icons/namespace_public.png\',\r\n\t\ta_attr: { href : \'#/namespa" +
                           "ce/");

            #line 38 "D:\Github\SharpDox.Plugins.Html\src\Templates\Navigation\ApiNavigation.tt"
                this.Write(this.ToStringHelper.ToStringWithCulture(sdNamespace.Identifier));

            #line default
            #line hidden
                this.Write("\' },\r\n\t\tchildren: [\r\n\t\t\t");

            #line 40 "D:\Github\SharpDox.Plugins.Html\src\Templates\Navigation\ApiNavigation.tt"
                this.Write(this.ToStringHelper.ToStringWithCulture(namespaceNavTemplate.TransformText()));

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

            #line 43 "D:\Github\SharpDox.Plugins.Html\src\Templates\Navigation\ApiNavigation.tt"
            }

            #line default
            #line hidden
            this.Write("\r\n");
            return(this.GenerationEnvironment.ToString());
        }