Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
        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();
        }