/// <summary> /// The main entry point for the application. /// </summary> static void Main() { CtxTrace.Initialize("cloudworks-agent", true); ErrorHandler.Initialize(); ServiceBase[] ServicesToRun; ServicesToRun = new ServiceBase[] { new AgentService() }; ServiceBase.Run(ServicesToRun); }
static void Main(string[] args) { CtxTrace.Initialize("cloudworks-agent-host", true); CloudworksServices svc = new CloudworksServices(); new UserDataState("C:\\cfn").InitialisationComplete = false; svc.Start(); Console.WriteLine("Agent is running"); Console.WriteLine("Press any key to stop"); Console.ReadLine(); svc.Stop(); Console.WriteLine("Agent is stopped"); Console.WriteLine("Press any key to exit"); Console.ReadLine(); }