You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
#region << 版 本 注 释 >>
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* 版权所有 (c)2024 保留所有权
|
|
|
|
|
* CLR版本 4.0.30319.42000
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#endregion << 版 本 注 释 >>
|
|
|
|
|
|
|
|
|
|
namespace Ds.Module.AppMiddlewareLibrary
|
|
|
|
|
{
|
|
|
|
|
public static class ApplicationBuilderExtensions
|
|
|
|
|
{
|
|
|
|
|
public static IApplicationBuilder UseMyMiddlewares(this IApplicationBuilder app)
|
|
|
|
|
{
|
|
|
|
|
app.UseMiddleware<RequestLoggingMiddleware>();
|
|
|
|
|
app.UseMiddleware<GlobalExceptionHandler>();
|
|
|
|
|
app.UseSwagger();
|
|
|
|
|
app.UseSwaggerDocumentation();
|
|
|
|
|
app.UseHttpsRedirection();
|
|
|
|
|
app.UseRouting();
|
|
|
|
|
app.UseEndpoints(endpoints =>
|
|
|
|
|
{
|
|
|
|
|
endpoints.MapControllers();
|
|
|
|
|
});
|
|
|
|
|
app.UseDynamicStartups();
|
|
|
|
|
|
|
|
|
|
return app;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|