dotnet core web IApplicationBuilder 中间件学习
编写一个自己的中间件的模版
public static class MyApp
{
public static IApplicationBuilder UserMyApp(this IApplicationBuilder app)
{
Func<RequestDelegate, RequestDelegate> middleware = next =>
{
return context =>
{
return next(context);
};
};
return app.Use(middleware);
}
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)