using Microsoft.AspNetCore.Http; namespace Falcon.Middleware.Test { /// /// 测试中间件 /// public class MiddlewareTest:MiddlewareBase { public MiddlewareTest(RequestDelegate next) : base(next) { } public async override void InvokeNextAfter(HttpContext context) { await context.Response.WriteAsync("\nInvokeNextAfter"); } public async override void InvokeNextBefore(HttpContext context) { await context.Response.WriteAsync("InvokeNextBefore\n"); } } }