static void Main(string[] args) { Repository.CreateDbIfNotExists(); var scheduler = new KayakScheduler(new SchedulerDelegate()); scheduler.Post(() => KayakServer.Factory .CreateHttp(new RequestDelegate()) .Listen(new IPEndPoint(IPAddress.Any, 8080))); // runs scheduler on calling thread. this method will block until // someone calls Stop() on the scheduler. scheduler.Start(); }
static void Main(string[] args) { #if DEBUG Debug.Listeners.Add(new TextWriterTraceListener(Console.Out)); Debug.AutoFlush = true; #endif var scheduler = new KayakScheduler(new SchedulerDelegate()); scheduler.Post(() => { KayakServer.Factory .CreateHttp(new RequestDelegate()) .Listen(new IPEndPoint(IPAddress.Any, 8080)); }); // runs scheduler on calling thread. this method will block until // someone calls Stop() on the scheduler. scheduler.Start(); }