Created
July 20, 2011 07:14
-
-
Save SuperYeti/1094500 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
| // Run as interactive exe in debug mode to allow easy | |
| // debugging. | |
| CCCS_Global_SVC service = new CCCS_Global_SVC(); | |
| service.OnStart(null); | |
| // Sleep the main thread indefinitely while the service code | |
| // runs in .OnStart | |
| System.Threading.Thread.Sleep(System.Threading.Timeout.Infinite); | |
| #else | |
| // Run normally as service in release mode. | |
| ServiceBase[] ServicesToRun; | |
| ServicesToRun = new ServiceBase[] { new CCCS_Global_SVC() }; | |
| ServiceBase.Run(ServicesToRun); | |
| #endif | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment