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)); }
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))); }
public static IAppBuilder Map(IAppBuilder app, SimpleConfiguration cfg, string path, Action<IAppBuilder, SimpleConfiguration> callback) { return app.Map(path, sub => callback(sub, cfg)); }
public static IAppBuilder Map(IAppBuilder app, SimpleConfiguration cfg, string path, Action <IAppBuilder, SimpleConfiguration> callback) { return(app.Map(path, sub => callback(sub, cfg))); }