22 lines
600 B
C#
22 lines
600 B
C#
|
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");
|
|||
|
}
|
|||
|
}
|
|||
|
}
|