Ejemplo n.º 1
0
        public static IDisposable Start(SimpleConfiguration cfg, Action<IAppBuilder, SimpleConfiguration> builder)
        {
            var start = new StartOptions() {
                Port = cfg.Port
            };

            if(cfg.Url != null) {
                start.Urls.Add(cfg.Url);
            }

            if(cfg.ServerFactory != null) {
                start.ServerFactory = cfg.ServerFactory;
            }
              return WebApp.Start(start, app => builder(app, cfg));
        }
Ejemplo n.º 2
0
        public static IDisposable Start(SimpleConfiguration cfg, Action <IAppBuilder, SimpleConfiguration> builder)
        {
            var start = new StartOptions()
            {
                Port = cfg.Port
            };

            if (cfg.Url != null)
            {
                start.Urls.Add(cfg.Url);
            }

            if (cfg.ServerFactory != null)
            {
                start.ServerFactory = cfg.ServerFactory;
            }
            return(WebApp.Start(start, app => builder(app, cfg)));
        }
Ejemplo n.º 3
0
 public static IAppBuilder Map(IAppBuilder app, SimpleConfiguration cfg, string path, Action<IAppBuilder, SimpleConfiguration> callback)
 {
     return app.Map(path, sub => callback(sub, cfg));
 }
Ejemplo n.º 4
0
 public static IAppBuilder Map(IAppBuilder app, SimpleConfiguration cfg, string path, Action <IAppBuilder, SimpleConfiguration> callback)
 {
     return(app.Map(path, sub => callback(sub, cfg)));
 }