Created
May 15, 2016 20:37
-
-
Save syron/afc53f0b17ee33f9715b7d0a8fa68ffd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void Main() | |
{ | |
#if (!DEBUG) | |
System.ServiceProcess.ServiceBase[] ServicesToRun; | |
ServicesToRun = new System.ServiceProcess.ServiceBase[] { new Service1() }; | |
System.ServiceProcess.ServiceBase.Run(ServicesToRun); | |
#else | |
Service1 service = new Service1(); | |
service.Init(); | |
System.Threading.Thread.Sleep(System.Threading.Timeout.Infinite); | |
#endif | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment