コード例 #1
0
ファイル: Program.cs プロジェクト: spawluk/UberDeployer
        private static void Main(string[] args)
        {
            GlobalContext.Properties["applicationName"] = "UberDeployer.Agent.NtService";
              XmlConfigurator.Configure();

              if (args.Length == 1 && args[0] == "/console")
              {
            var serviceHostContainer =
              new UberDeployerAgentServiceHostContainer();

            serviceHostContainer.Start();
            Console.WriteLine("Press any key to exit...");
            Console.ReadKey();
            serviceHostContainer.Stop();
              }
              else
              {
            var servicesToRun = new ServiceBase[] { new UberDeployerAgentNtService() };

            ServiceBase.Run(servicesToRun);
              }
        }
コード例 #2
0
        private static void Main(string[] args)
        {
            GlobalContext.Properties["applicationName"] = "UberDeployer.Agent.NtService";
            XmlConfigurator.Configure();

            if (args.Length == 1 && args[0] == "/console")
            {
                var serviceHostContainer =
                    new UberDeployerAgentServiceHostContainer();

                serviceHostContainer.Start();
                Console.WriteLine("Press any key to exit...");
                Console.ReadKey();
                serviceHostContainer.Stop();
            }
            else
            {
                var servicesToRun = new ServiceBase[] { new UberDeployerAgentNtService() };

                ServiceBase.Run(servicesToRun);
            }
        }
コード例 #3
0
        public UberDeployerAgentNtService()
        {
            InitializeComponent();

              _serviceHostContainer = new UberDeployerAgentServiceHostContainer();
        }
コード例 #4
0
        public UberDeployerAgentNtService()
        {
            InitializeComponent();

            _serviceHostContainer = new UberDeployerAgentServiceHostContainer();
        }