Ejemplo n.º 1
0
        public void Configuration(IAppBuilder app)
        {
            app.UseLogging();
            app.UseAuthentication();
            var options = new MyMiddlewareConfigOptions("Greetings!", "Kevin");
            options.IncludeDate = true;

            app.UseMyMiddelware(options);
            //app.UseMyOtherMiddleware();
        }
Ejemplo n.º 2
0
 public MyMiddlewareComponent(AppFunc next, MyMiddlewareConfigOptions configOptions)
 {
     this.next = next;
     this.configOptions = configOptions;
 }
Ejemplo n.º 3
0
 public static void UseMyMiddelware(this IAppBuilder app, MyMiddlewareConfigOptions options)
 {
     app.Use<MyMiddlewareComponent>(options);
 }