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