2020-11-17 11:27:31 +01:00
|
|
|
using Microsoft.AspNetCore.Http;
|
|
|
|
|
|
2021-11-22 14:29:22 +01:00
|
|
|
namespace zero.Context
|
2020-11-17 11:27:31 +01:00
|
|
|
{
|
|
|
|
|
public class ZeroContextMiddleware
|
|
|
|
|
{
|
|
|
|
|
RequestDelegate Next;
|
|
|
|
|
|
|
|
|
|
public ZeroContextMiddleware(RequestDelegate next)
|
|
|
|
|
{
|
|
|
|
|
Next = next;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async Task Invoke(HttpContext httpContext, IZeroContext zeroContext)
|
|
|
|
|
{
|
|
|
|
|
await zeroContext.Resolve(httpContext);
|
|
|
|
|
await Next(httpContext);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|