src/Slugent.APIInfo/SimpleInfo/EndpointSimpleMiddleware.cs
/// <summary>
/// Executes the middleware that provides configuration-debug-view page.
/// </summary>
/// <param name="httpContext">The <see cref="HttpContext"/> for the current request.</param>
/// <param name="simpleRetrievers">List of simple retriever objects that will be used to build the /simple page</param>
Executes the middleware that provides configuration-debug-view page.
Executes the middleware that provides configuration - debug - view page .
public async Task InvokeAsync(HttpContext httpContext, IEnumerable<ISimpleInfoRetriever> simpleRetrievers)
		{
			StringBuilder sb = new(4096);
			IEnumerable<ISimpleInfoRetriever> sorted = simpleRetrievers.OrderBy(ISimpleInfoRetriever => ISimpleInfoRetriever.SortedOrderValue)
			                                                           .ThenBy(ISimpleInfoRetriever => ISimpleInfoRetriever.Title);
			sb.Append("<html><head>");
			sb.Append(SimpleRetrieverAbstract.GetHTMLStyle());
			sb.Append("</head><body>");
			string ending = @"
</body>
</html>
";
			foreach ( ISimpleInfoRetriever retriever in sorted ) {
				sb.Append(retriever.ProvideHTML());
			}
			sb.Append(ending);
			string html = sb.ToString();
			await httpContext.Response.WriteAsync(html);
		}
public async Task InvokeAsync ( HttpContext httpContext , IEnumerable < ISimpleInfoRetriever > simpleRetrievers ) { StringBuilder sb = new ( 4096 ) ; IEnumerable < ISimpleInfoRetriever > sorted = simpleRetrievers . OrderBy ( ISimpleInfoRetriever => ISimpleInfoRetriever . SortedOrderValue ) . ThenBy ( ISimpleInfoRetriever => ISimpleInfoRetriever . Title ) ; sb . Append ( " " ) ; sb . Append ( SimpleRetrieverAbstract . GetHTMLStyle ( ) ) ; sb . Append ( " " ) ; string ending = @"
</body>
</html>
" ; foreach ( ISimpleInfoRetriever retriever in sorted ) { sb . Append ( retriever . ProvideHTML ( ) ) ; } sb . Append ( ending ) ; string html = sb . ToString ( ) ; await httpContext . Response . WriteAsync ( html ) ; }
Executes the middleware that provides configuration-debug-view page.
Executes the middleware that provides configuration - debug - view page .
// Get the retrievers in sorted order: // Create the HTML Page start and header.
httpContext
HttpContext
The  for the current request.
The for the current request .
simpleRetrievers
IEnumerable<ISimpleInfoRetriever>
List of simple retriever objects that will be used to build the /simple page
List of simple retriever objects that will be used to build the / simple page