Ejemplo n.º 1
0
        public void Configuration(IAppBuilder builder)
        {
            var middleware      = new Func <AppFunc, AppFunc>(MiddleWare);
            var othermiddleware = new Func <AppFunc, AppFunc>(MySecondMiddleWare);

            builder.Use <LoggingMiddleWare>();
            builder.Use <AuthenticationMiddleWare>();
            //builder.Use(middleware);
            //builder.Use(othermiddleware);
            MiddleWareOptions _option = new MiddleWareOptions("Hello", "John");

            builder.Use <MyMiddleWare>(_option);
        }
Ejemplo n.º 2
0
 public MyMiddleWare(AppFunc next, MiddleWareOptions options)
 {
     _next    = next;
     _options = options;
 }