Exemplo n.º 1
0
 public static IApplicationBuilder UseCustomMiddleware(this IApplicationBuilder builder, CustomMiddlewareOptions options)
 {
     options = options ?? new CustomMiddlewareOptions();
     return(builder.UseMiddleware <CustomMiddleware>(options));
 }
Exemplo n.º 2
0
 public CustomMiddleware(RequestDelegate next, CustomMiddlewareOptions options)
 {
     _next    = next;
     _options = options;
 }