예제 #1
0
        public static IApplicationBuilder UserGreetingFunctionType(this IApplicationBuilder app, Action <GreetingOptions> configurationOptions)
        {
            GreetingOptions options = new GreetingOptions();

            configurationOptions(options);
            return(app.UseMiddleware <GreetingMiddleware>(options));
        }
예제 #2
0
 public GreetingMiddleware(RequestDelegate next, GreetingOptions greetOption)
 {
     this.next        = next;
     this.greetOption = greetOption;
 }