Exemplo n.º 1
0
 public CustomMiddleware(RequestDelegate next, IOptions <CustomOptions> options, ILogger logger)
 {
     _next    = next;
     _options = options.Value;
     _logger  = logger;
 }
Exemplo n.º 2
0
 public static IApplicationBuilder UseCustom(this IApplicationBuilder app, CustomOptions options)
 {
     return(app.UseMiddleware <CustomMiddleware>(Options.Create(options)));
 }