static void Main(string[] args) { // /P - port, /C - certificate path, /T - test/emulator connector, /L - lan adapter // /D - developer/debug mode, runs in console bool console = false; foreach (string s in args) { if ("/D".Equals(s)) { console = true; break; } } if (console) { CloverRESTService service = new CloverRESTService(); service.DebugStart(args); System.Threading.Thread.Sleep(System.Threading.Timeout.Infinite); } else { ServiceBase.Run(new CloverRESTService()); } }