using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using OwinSample;

namespace Owin
{
    public static class HelloWorldExtensions
    {
        public static IAppBuilder UseHelloWorldMiddleware(this IAppBuilder app, string defaultName = "Welt")
        {
            app.UseType<HelloWorldOwinMiddleware>(defaultName);
            return app;
        }



        public static IAppBuilder UseUglyHelloWorldMiddleware(this IAppBuilder app, string defaultName = "Welt")
        {
            //if (options == null)
            //{
            //    options = new HelloWorldMiddlewareOptions();
            //    options.Name = "Welt";
            //}
            app.Use(typeof(UglyHelloWorldOwinMiddleware), defaultName);
            return app;
        }

      

    }
}
