public void CreateApiDoc(SDRepository sdRepository, int navigationLevel) { foreach (var sdNamespace in sdRepository.GetAllNamespaces()) { _namespaceBuilder.InsertNamespace(sdNamespace, navigationLevel); } }
private void RemoveEmptyNamespaces(SDRepository repository) { foreach (var sdNamespace in repository.GetAllNamespaces()) { if (sdNamespace.Types.Count == 0) { repository.RemoveNamespace(sdNamespace); } } }
private void ParseMethodCalls() { var pi = 0; var methodCallParser = new MethodCallParser(_repository, _solution); methodCallParser.OnItemParseStart += (n, i, t) => { PostProgress(_sdBuildStrings.ParsingMethod + ": " + n, i, t, pi, _repository.GetAllNamespaces().Count); }; var namespaces = _repository.GetAllNamespaces(); for (int i = 0; i < namespaces.Count; i++) { pi = i; methodCallParser.ParseMethodCalls(namespaces[i]); } }
private void ParseCompleted(SDRepository repository) { Application.Current.Dispatcher.BeginInvoke( DispatcherPriority.Background, new Action(() => { TreeView = new VisibilityItemList(); if (repository != null) { foreach (var sdNamespace in repository.GetAllNamespaces()) { TreeView.Add(new NamespaceViewModel(sdNamespace, _sharpDoxConfig.ExcludedIdentifiers)); } } IsTreeRefreshing = false; })); }
/// <summary> /// Create the template output /// </summary> public virtual string TransformText() { this.Write("\n"); this.Write("\n"); this.Write("\n"); this.Write("\n"); this.Write("\n"); this.Write("\n"); this.Write("\n"); this.Write("\n"); this.Write("\n\n"); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" foreach (var nameSpace in SDRepository.GetAllNamespaces()) { #line default #line hidden this.Write("\n \n<li> <object type=\"text/sitemap\">\n\t\t<param name=\"Name\" value=\""); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(nameSpace.Fullname)); #line default #line hidden this.Write("\">\n\t\t<param name=\"Local\" value=\""); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(nameSpace.Guid)); #line default #line hidden this.Write(".html\">\n\t</object>\n\n\t"); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" if (nameSpace.Types.Count > 0) { #line default #line hidden this.Write("\n \n\t\t<ul>\n\n\t\t"); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" foreach (var type in nameSpace.Types) { var sdType = SDRepository.GetTypeByIdentifier(type.Identifier); #line default #line hidden this.Write("\n\n\t\t\t<li> <object type=\"text/sitemap\">\n\t\t\t\t\t<param name=\"Name\" value=\""); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(sdType.Name)); #line default #line hidden this.Write("\">\n\t\t\t\t\t<param name=\"Local\" value=\""); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(sdType.Guid)); #line default #line hidden this.Write(".html\">\n\t\t\t\t</object>\n \n\t\t\t"); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" if (sdType.Constructors.Count > 0 || sdType.Fields.Count > 0 || sdType.Properties.Count > 0 || sdType.Methods.Count > 0 || sdType.Events.Count > 0) { #line default #line hidden this.Write("\n \n\t\t\t\t<ul>\n\n\t\t\t\t"); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" if (sdType.Constructors.Count > 0) { #line default #line hidden this.Write("\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t<li> <object type=\"text/sitemap\">\n\t\t\t\t\t\t\t<param name=\"Name\" value=" + "\""); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(StepInput.DocStrings.Constructors)); #line default #line hidden this.Write("\">\n\t\t\t\t\t\t\t<param name=\"Local\" value=\""); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(sdType.Guid)); #line default #line hidden this.Write("-Constructors.html\">\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<ul>\n\n\t\t\t\t\t\t"); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" foreach (var constructor in sdType.Constructors) { #line default #line hidden this.Write("\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<li> <object type=\"text/sitemap\">\n\t\t\t\t\t\t\t\t\t<param name=\"Name\" " + "value=\""); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(constructor.Name)); #line default #line hidden this.Write("\">\n\t\t\t\t\t\t\t\t\t<param name=\"Local\" value=\""); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(sdType.Guid)); #line default #line hidden this.Write(".html#"); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(constructor.Guid)); #line default #line hidden this.Write("\">\n\t\t\t\t\t\t\t\t</object> </li>\n\n\t\t\t\t\t\t"); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" } #line default #line hidden this.Write("\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</li>\n\n\t\t\t\t"); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" } #line default #line hidden this.Write("\n\n\t\t\t\t"); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" if (sdType.Fields.Count > 0) { #line default #line hidden this.Write("\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t<li> <object type=\"text/sitemap\">\n\t\t\t\t\t\t\t<param name=\"Name\" value=" + "\""); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(StepInput.DocStrings.Fields)); #line default #line hidden this.Write("\">\n\t\t\t\t\t\t\t<param name=\"Local\" value=\""); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(sdType.Guid)); #line default #line hidden this.Write("-Fields.html\">\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<ul>\n\n\t\t\t\t\t\t"); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" foreach (var field in sdType.Fields) { #line default #line hidden this.Write("\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<li> <object type=\"text/sitemap\">\n\t\t\t\t\t\t\t\t\t<param name=\"Name\" " + "value=\""); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(field.Name)); #line default #line hidden this.Write("\">\n\t\t\t\t\t\t\t\t\t<param name=\"Local\" value=\""); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(sdType.Guid)); #line default #line hidden this.Write(".html#"); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(field.Guid)); #line default #line hidden this.Write("\">\n\t\t\t\t\t\t\t\t</object> </li>\n\n\t\t\t\t\t\t"); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" } #line default #line hidden this.Write("\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</li>\n\n\t\t\t\t"); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" } #line default #line hidden this.Write("\n\n\t\t\t\t"); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" if (sdType.Properties.Count > 0) { #line default #line hidden this.Write("\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t<li> <object type=\"text/sitemap\">\n\t\t\t\t\t\t\t<param name=\"Name\" value=" + "\""); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(StepInput.DocStrings.Properties)); #line default #line hidden this.Write("\">\n\t\t\t\t\t\t\t<param name=\"Local\" value=\""); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(sdType.Guid)); #line default #line hidden this.Write("-Properties.html\">\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<ul>\n\n\t\t\t\t\t\t"); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" foreach (var property in sdType.Properties) { #line default #line hidden this.Write("\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<li> <object type=\"text/sitemap\">\n\t\t\t\t\t\t\t\t\t<param name=\"Name\" " + "value=\""); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(property.Name)); #line default #line hidden this.Write("\">\n\t\t\t\t\t\t\t\t\t<param name=\"Local\" value=\""); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(sdType.Guid)); #line default #line hidden this.Write(".html#"); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(property.Guid)); #line default #line hidden this.Write("\">\n\t\t\t\t\t\t\t\t</object> </li>\n\n\t\t\t\t\t\t"); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" } #line default #line hidden this.Write("\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</li>\n\n\t\t\t\t"); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" } #line default #line hidden this.Write("\n\n\t\t\t\t"); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" if (sdType.Methods.Count > 0) { #line default #line hidden this.Write("\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t<li> <object type=\"text/sitemap\">\n\t\t\t\t\t\t\t<param name=\"Name\" value=" + "\""); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(StepInput.DocStrings.Methods)); #line default #line hidden this.Write("\">\n\t\t\t\t\t\t\t<param name=\"Local\" value=\""); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(sdType.Guid)); #line default #line hidden this.Write("-Methods.html\">\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<ul>\n\n\t\t\t\t\t\t"); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" foreach (var method in sdType.Methods) { #line default #line hidden this.Write("\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<li> <object type=\"text/sitemap\">\n\t\t\t\t\t\t\t\t\t<param name=\"Name\" " + "value=\""); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("\">\n\t\t\t\t\t\t\t\t\t<param name=\"Local\" value=\""); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(sdType.Guid)); #line default #line hidden this.Write(".html#"); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Guid)); #line default #line hidden this.Write("\">\n\t\t\t\t\t\t\t\t</object> </li>\n\n\t\t\t\t\t\t"); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" } #line default #line hidden this.Write("\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</li>\n\n\t\t\t\t"); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" } #line default #line hidden this.Write("\n\n\t\t\t\t"); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" if (sdType.Events.Count > 0) { #line default #line hidden this.Write("\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t<li> <object type=\"text/sitemap\">\n\t\t\t\t\t\t\t<param name=\"Name\" value=" + "\""); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(StepInput.DocStrings.Events)); #line default #line hidden this.Write("\">\n\t\t\t\t\t\t\t<param name=\"Local\" value=\""); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(sdType.Guid)); #line default #line hidden this.Write("-Events.html\">\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<ul>\n\n\t\t\t\t\t\t"); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" foreach (var eve in sdType.Events) { #line default #line hidden this.Write("\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<li> <object type=\"text/sitemap\">\n\t\t\t\t\t\t\t\t\t<param name=\"Name\" " + "value=\""); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(eve.Name)); #line default #line hidden this.Write("\">\n\t\t\t\t\t\t\t\t\t<param name=\"Local\" value=\""); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(sdType.Guid)); #line default #line hidden this.Write(".html#"); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(eve.Guid)); #line default #line hidden this.Write("\">\n\t\t\t\t\t\t\t\t</object> </li>\n\n\t\t\t\t\t\t"); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" } #line default #line hidden this.Write("\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</li>\n\n\t\t\t\t"); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" } #line default #line hidden this.Write("\n\n\t\t\t\t</ul>\n\n\t\t\t"); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" } #line default #line hidden this.Write("\n\n\t\t\t</li>\n\n\t\t"); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" } #line default #line hidden this.Write("\n\n\t\t</ul>\n\n\t"); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" } #line default #line hidden this.Write("\n\n\t</li>\n\n"); #line 1 "D:\Github\SharpDox.Plugins.Chm\src\Templates\Nav\ApiNavTemplate.tt" } #line default #line hidden this.Write("\n\n"); return(this.GenerationEnvironment.ToString()); }