protected override void Render(HtmlTextWriter output) { var operationsPart = new TableTemplate { Title = "Operations", Items = this.OperationNames, ForEachItem = RenderRow }.ToString(); var xsdsPart = new ListTemplate { Title = "XSDS:", ListItemsIntMap = this.Xsds, ListItemTemplate = @"<li><a href=""?xsd={0}"">{1}</a></li>" }.ToString(); var wsdlTemplate = new StringBuilder(); var soap11Config = MetadataConfig.GetMetadataConfig("soap11") as SoapMetadataConfig; var soap12Config = MetadataConfig.GetMetadataConfig("soap12") as SoapMetadataConfig; if (soap11Config != null || soap12Config != null) { wsdlTemplate.AppendLine("<h3>WSDLS:</h3>"); wsdlTemplate.AppendLine("<ul>"); if (soap11Config != null) { wsdlTemplate.AppendFormat( @"<li><a href=""{0}"">{0}</a></li>", soap11Config.WsdlMetadataUri); } if (soap12Config != null) { wsdlTemplate.AppendFormat( @"<li><a href=""{0}"">{0}</a></li>", soap12Config.WsdlMetadataUri); } wsdlTemplate.AppendLine("</ul>"); } var debugOnlyInfo = new StringBuilder(); if (HostContext.DebugMode) { debugOnlyInfo.Append("<h3>Debug Info:</h3>"); debugOnlyInfo.AppendLine("<ul>"); debugOnlyInfo.AppendLine("<li><a href=\"operations/metadata\">Operations Metadata</a></li>"); debugOnlyInfo.AppendLine("</ul>"); } var renderedTemplate = HtmlTemplates.Format( HtmlTemplates.GetIndexOperationsTemplate(), this.Title, this.XsdServiceTypesIndex, operationsPart, xsdsPart, wsdlTemplate, debugOnlyInfo); output.Write(renderedTemplate); }
protected override void Render(HtmlTextWriter output) { var operationsPart = new TableTemplate { Title = "Operations:", Items = this.OperationNames, ForEachItem = RenderRow }.ToString(); var xsdsPart = new ListTemplate { Title = "XSDS:", ListItemsIntMap = this.Xsds, ListItemTemplate = @"<li><a href=""?xsd={0}"">{1}</a></li>" }.ToString(); var wsdlTemplate = new StringBuilder(); var soap11Config = MetadataConfig.GetMetadataConfig("soap11") as SoapMetadataConfig; var soap12Config = MetadataConfig.GetMetadataConfig("soap12") as SoapMetadataConfig; if (soap11Config != null || soap12Config != null) { wsdlTemplate.AppendLine("<h3>WSDLS:</h3>"); wsdlTemplate.AppendLine("<ul>"); if (soap11Config != null) { wsdlTemplate.AppendFormat( @"<li><a href=""{0}"">{0}</a></li>", soap11Config.WsdlMetadataUri); } if (soap12Config != null) { wsdlTemplate.AppendFormat( @"<li><a href=""{0}"">{0}</a></li>", soap12Config.WsdlMetadataUri); } wsdlTemplate.AppendLine("</ul>"); } var debugOnlyInfo = new StringBuilder(); if (EndpointHost.DebugMode) { debugOnlyInfo.Append("<h3>Debug Info:</h3>"); debugOnlyInfo.AppendLine("<ul>"); debugOnlyInfo.AppendLine("<li><a href=\"operations/metadata\">Operations Metadata</a></li>"); debugOnlyInfo.AppendLine("</ul>"); } var renderedTemplate = HtmlTemplates.Format( HtmlTemplates.IndexOperationsTemplate, this.Title, this.MetadataPageBodyHtml, this.XsdServiceTypesIndex, operationsPart, xsdsPart, wsdlTemplate, debugOnlyInfo); output.Write(renderedTemplate); }
protected override void Render(HtmlTextWriter output) { var operationsPart = new TableTemplate { Title = "Operations", Items = this.OperationNames, ForEachItem = RenderRow }.ToString(); var xsdsPart = new ListTemplate { Title = "XSDS:", ListItemsIntMap = this.Xsds, ListItemTemplate = @"<li><a href=""?xsd={0}"">{1}</a></li>" }.ToString(); var wsdlTemplate = new StringBuilder(); var soap11Config = MetadataConfig.GetMetadataConfig("soap11") as SoapMetadataConfig; var soap12Config = MetadataConfig.GetMetadataConfig("soap12") as SoapMetadataConfig; if (soap11Config != null || soap12Config != null) { wsdlTemplate.AppendLine("<h3>WSDLS:</h3>"); wsdlTemplate.AppendLine("<ul>"); if (soap11Config != null) { wsdlTemplate.AppendFormat( @"<li><a href=""{0}"">{0}</a></li>", soap11Config.WsdlMetadataUri); } if (soap12Config != null) { wsdlTemplate.AppendFormat( @"<li><a href=""{0}"">{0}</a></li>", soap12Config.WsdlMetadataUri); } wsdlTemplate.AppendLine("</ul>"); } var metadata = HostContext.GetPlugin<MetadataFeature>(); var pluginLinks = metadata != null && metadata.PluginLinks.Count > 0 ? new ListTemplate { Title = metadata.PluginLinksTitle, ListItemsMap = metadata.PluginLinks, ListItemTemplate = @"<li><a href=""{0}"">{1}</a></li>" }.ToString() : ""; var debugOnlyInfo = HostContext.DebugMode && metadata != null && metadata.DebugLinks.Count > 0 ? new ListTemplate { Title = metadata.DebugLinksTitle, ListItemsMap = metadata.DebugLinks, ListItemTemplate = @"<li><a href=""{0}"">{1}</a></li>" }.ToString() : ""; var renderedTemplate = HtmlTemplates.Format( HtmlTemplates.GetIndexOperationsTemplate(), this.Title, this.XsdServiceTypesIndex, operationsPart, xsdsPart, wsdlTemplate, pluginLinks, debugOnlyInfo, Env.VersionString); output.Write(renderedTemplate); }
protected override void Render(HtmlTextWriter output) { var operationsPart = new TableTemplate { Title = "Operations", Items = this.OperationNames, ForEachItem = RenderRow }.ToString(); #if !NETSTANDARD1_6 var xsdsPart = new ListTemplate { Title = "XSDS:", ListItemsIntMap = this.Xsds, ListItemTemplate = @"<li><a href=""?xsd={0}"">{1}</a></li>" }.ToString(); #else var xsdsPart = ""; #endif var wsdlTemplate = StringBuilderCache.Allocate(); var soap11Config = MetadataConfig.GetMetadataConfig("soap11") as SoapMetadataConfig; var soap12Config = MetadataConfig.GetMetadataConfig("soap12") as SoapMetadataConfig; if (soap11Config != null || soap12Config != null) { wsdlTemplate.AppendLine("<h3>WSDLS:</h3>"); wsdlTemplate.AppendLine("<ul>"); if (soap11Config != null) { wsdlTemplate.AppendFormat( @"<li><a href=""{0}"">{0}</a></li>", soap11Config.WsdlMetadataUri); } if (soap12Config != null) { wsdlTemplate.AppendFormat( @"<li><a href=""{0}"">{0}</a></li>", soap12Config.WsdlMetadataUri); } wsdlTemplate.AppendLine("</ul>"); } var metadata = HostContext.GetPlugin <MetadataFeature>(); var pluginLinks = metadata != null && metadata.PluginLinks.Count > 0 ? new ListTemplate { Title = metadata.PluginLinksTitle, ListItemsMap = ToAbsoluteUrls(metadata.PluginLinks), ListItemTemplate = @"<li><a href=""{0}"">{1}</a></li>" }.ToString() : ""; var debugOnlyInfo = HostContext.DebugMode && metadata != null && metadata.DebugLinks.Count > 0 ? new ListTemplate { Title = metadata.DebugLinksTitle, ListItemsMap = ToAbsoluteUrls(metadata.DebugLinks), ListItemTemplate = @"<li><a href=""{0}"">{1}</a></li>" }.ToString() : ""; var errorCount = HostContext.AppHost.StartUpErrors.Count; var plural = errorCount > 1 ? "s" : ""; var startupErrors = HostContext.DebugMode && errorCount > 0 ? $"<div class='error-popup'><a href='?debug=requestinfo'>Review {errorCount} Error{plural} on Startup</a></div>" : ""; var renderedTemplate = HtmlTemplates.Format( HtmlTemplates.GetIndexOperationsTemplate(), this.Title, this.XsdServiceTypesIndex, operationsPart, xsdsPart, StringBuilderCache.ReturnAndFree(wsdlTemplate), pluginLinks, debugOnlyInfo, Env.VersionString, startupErrors); output.Write(renderedTemplate); }
protected override void Render(HtmlTextWriter output) { var operationsPart = new TableTemplate { Title = "Operations", Items = this.OperationNames, ForEachItem = RenderRow }.ToString(); var xsdsPart = new ListTemplate { Title = "XSDS:", ListItemsIntMap = this.Xsds, //modified by Yang Li //ListItemTemplate = @"<li><a href=""?xsd={0}"">{1}</a></li>" ListItemTemplate = @"<li><a href=""?xsd={0}"" target='_blank'>{1}</a></li>" }.ToString(); var wsdlTemplate = new StringBuilder(); var soap11Config = MetadataConfig.GetMetadataConfig("soap11") as SoapMetadataConfig; var soap12Config = MetadataConfig.GetMetadataConfig("soap12") as SoapMetadataConfig; if (soap11Config != null || soap12Config != null) { wsdlTemplate.AppendLine("<h3>WSDLS:</h3>"); wsdlTemplate.AppendLine("<ul>"); if (soap11Config != null) { //modified by Yang Li wsdlTemplate.AppendFormat( //@"<li><a href=""{0}"">{0}</a></li>", @"<li><a href=""{0}"" target='_blank'>{0}</a></li>", soap11Config.WsdlMetadataUri); } if (soap12Config != null) { //modified by Yang Li wsdlTemplate.AppendFormat( //@"<li><a href=""{0}"">{0}</a></li>", @"<li><a href=""{0}"" target='_blank'>{0}</a></li>", soap12Config.WsdlMetadataUri); } wsdlTemplate.AppendLine("</ul>"); } var metadata = HostContext.GetPlugin <MetadataFeature>(); var pluginLinks = metadata != null && metadata.PluginLinks.Count > 0 ? new ListTemplate { Title = metadata.PluginLinksTitle, ListItemsMap = metadata.PluginLinks, //modified by Yang Li //ListItemTemplate = @"<li><a href=""{0}"">{1}</a></li>" ListItemTemplate = @"<li><a href=""{0}"" target='_blank'>{1}</a></li>" }.ToString() : ""; var debugOnlyInfo = HostContext.DebugMode && metadata != null && metadata.DebugLinks.Count > 0 ? new ListTemplate { Title = metadata.DebugLinksTitle, ListItemsMap = metadata.DebugLinks, //modified by Yang Li //ListItemTemplate = @"<li><a href=""{0}"">{1}</a></li>" ListItemTemplate = @"<li><a href=""{0}"" target='_blank'>{1}</a></li>" }.ToString() : ""; var renderedTemplate = HtmlTemplates.Format( HtmlTemplates.GetIndexOperationsTemplate(), this.Title, this.XsdServiceTypesIndex, operationsPart, xsdsPart, wsdlTemplate, pluginLinks, debugOnlyInfo, Env.VersionString); output.Write(renderedTemplate); }