Esempio n. 1
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);
              }
        }
Esempio n. 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);
            }
        }
        public UberDeployerAgentNtService()
        {
            InitializeComponent();

              _serviceHostContainer = new UberDeployerAgentServiceHostContainer();
        }
        public UberDeployerAgentNtService()
        {
            InitializeComponent();

            _serviceHostContainer = new UberDeployerAgentServiceHostContainer();
        }