コード例 #1
0
ファイル: Main.cs プロジェクト: arbinada-com/genie-lamp
        public static void Main(string[] args)
        {
            log4net.Config.XmlConfigurator.Configure();
            log.Warn("Service starting...");


            DomainServicesHost host = new DomainServicesHost();

            host.Init();
            host.Start(ListeningOn);

            Console.WriteLine("Started listening on: " + ListeningOn);
            Console.WriteLine("AppHost Created at {0}, listening on {1}", DateTime.Now, ListeningOn);
            log.Warn("Service started");

            Console.WriteLine("Press 'Q' or Ctrl+C to stop program");
            Console.CancelKeyPress += new ConsoleCancelEventHandler(
                delegate(object sender, ConsoleCancelEventArgs e)
            {
                host.Stop();
            });
            while (Console.ReadKey().KeyChar != 'Q')
            {
                ;
            }
            host.Stop();
            log.Warn("Service is down");
        }
コード例 #2
0
 public void TestFixtureTearDown()
 {
     if (host != null)
     {
         host.Stop();
         host.Dispose();
     }
     host = null;
 }
コード例 #3
0
        public void TextFixtureSetUp()
        {
            Arbinada.GenieLamp.Warehouse.Domain.Test.Environment.Init();

            host = new DomainServicesHost();
            host.Init();
            host.Start(ServiceUrl);
            Console.WriteLine("Host created at {0}, listening on {1}", DateTime.Now, ServiceUrl);
        }
コード例 #4
0
        static void Main(string[] args)
        {
            string             ServiceUrl = "http://localhost:8080/";
            DomainServicesHost host       = new DomainServicesHost();

            host.Init();
            host.Start(ServiceUrl);

            Console.WriteLine("Started listening on: " + ServiceUrl);
            Console.WriteLine("AppHost Created at {0}, listening on {1}", DateTime.Now, ServiceUrl);

            Console.WriteLine("Press 'Q' or Ctrl+C to stop program");
            Console.CancelKeyPress += new ConsoleCancelEventHandler(
                delegate(object sender, ConsoleCancelEventArgs e)
            {
                host.Stop();
            });
            while (Console.ReadKey().KeyChar != 'Q')
            {
                ;
            }
            host.Stop();
        }