Falcon.Middleware/Falcon.Middleware.Test/MiddlewareTest.cs

22 lines
600 B
C#
Raw Normal View History

using Microsoft.AspNetCore.Http;
namespace Falcon.Middleware.Test
{
/// <summary>
/// 测试中间件
/// </summary>
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");
}
}
}