File tree Expand file tree Collapse file tree 1 file changed +14
-19
lines changed
IntegrationEngine.ConsoleHost Expand file tree Collapse file tree 1 file changed +14
-19
lines changed Original file line number Diff line number Diff line change @@ -11,25 +11,20 @@ public class Program
1111 public static EngineHost EngineHosts { get ; set ; }
1212 public static void Main ( string [ ] args )
1313 {
14- Start ( args ) ;
15- Console . WriteLine ( "Press any key to stop..." ) ;
16- Console . ReadLine ( ) ;
17- Stop ( ) ;
18-
19- // if (!Environment.UserInteractive)
20- // {
21- // // Set current working directory as services use the system directory by default.
22- // Directory.SetCurrentDirectory(AppDomain.CurrentDomain.BaseDirectory);
23- // using (var service = new Service())
24- // ServiceBase.Run(service);
25- // }
26- // else
27- // {
28- // Start(args);
29- // Console.WriteLine("Press any key to stop...");
30- // Console.ReadLine();
31- // Stop();
32- // }
14+ if ( ! Environment . UserInteractive )
15+ {
16+ // Set current working directory as services use the system directory by default.
17+ Directory . SetCurrentDirectory ( AppDomain . CurrentDomain . BaseDirectory ) ;
18+ using ( var service = new Service ( ) )
19+ ServiceBase . Run ( service ) ;
20+ }
21+ else
22+ {
23+ Start ( args ) ;
24+ Console . WriteLine ( "Press any key to stop..." ) ;
25+ Console . ReadLine ( ) ;
26+ Stop ( ) ;
27+ }
3328 }
3429
3530 private static void Start ( string [ ] args )
You can’t perform that action at this time.
0 commit comments