Example #1
0
        public void Configuration(IAppBuilder app)
        {
            MyMiddlewareConfigOptions options = new MyMiddlewareConfigOptions("Hawdy", "Ahmed") {IncludeDate = true};
            app.UseLogging();
            app.UseMockAuthentication();
            app.UseMyMiddleware(options);
            //app.UseMyOtherMiddleware();

        }
Example #2
0
        public void Configuration(IAppBuilder app)
        {
            MyMiddlewareConfigOptions options = new MyMiddlewareConfigOptions("Hawdy", "Ahmed")
            {
                IncludeDate = true
            };

            app.UseLogging();
            app.UseMockAuthentication();
            app.UseMyMiddleware(options);
            //app.UseMyOtherMiddleware();
        }
Example #3
0
 public MyMiddleware(AppFunc next, MyMiddlewareConfigOptions options)
 {
     _next    = next;
     _options = options;
 }
Example #4
0
 public static void UseMyMiddleware(this IAppBuilder app, MyMiddlewareConfigOptions options)
 {
     app.Use <MyMiddleware>(options);
 }
Example #5
0
 public MyMiddleware(AppFunc next, MyMiddlewareConfigOptions options)
 {
     _next = next;
     _options = options;
 }
Example #6
0
 public static void UseMyMiddleware(this IAppBuilder app, MyMiddlewareConfigOptions options)
 {
     app.Use<MyMiddleware>(options);
 }