コード例 #1
0
ファイル: Program.cs プロジェクト: cesarreyesa/monkey
        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();
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: edazdarevic/kayak
        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();
        }