static void Main(string[] args) { CtxTrace.Initialize("self-service-desktops-agent-host", true); DesktopAgentService svc = new DesktopAgentService(); svc.Start(); Console.WriteLine("Desktop Agent is running"); Console.WriteLine("Press any key to stop"); Console.ReadLine(); svc.Stop(); Console.WriteLine("Desktop Agent is stopped"); Console.WriteLine("Press any key to exit"); Console.ReadLine(); }
protected override void OnStart(string[] args) { CtxTrace.TraceInformation(); _Service = new DesktopAgentService(); _Service.Start(); }