示例#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;
 }