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); } }
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(); }