public static IApplicationBuilder UserGreetingFunctionType(this IApplicationBuilder app, Action <GreetingOptions> configurationOptions) { GreetingOptions options = new GreetingOptions(); configurationOptions(options); return(app.UseMiddleware <GreetingMiddleware>(options)); }
public GreetingMiddleware(RequestDelegate next, GreetingOptions greetOption) { this.next = next; this.greetOption = greetOption; }