예제 #1
0
파일: Program.cs 프로젝트: ejgarcia/isabel
 public static void Main(string[] args)
 {
     // checks if we are running as a service or as a console interactive application
     // this allows us to run the same code interactively (for debug prupourses) or
     // in production
     if (!Environment.UserInteractive)
     {
         ServiceBase[] servicesToRun;
         servicesToRun = new ServiceBase[] { new DVRBService() };
         ServiceBase.Run(servicesToRun);
     }
     else
     {
         DVRBService service = new DVRBService();
         service.DVRBStart(null);
         System.Console.WriteLine("Press Enter to stop the service");
         System.Console.ReadLine();
         service.DVRBStop();
     }
 }
예제 #2
0
 public static void Main(string[] args)
 {
     // checks if we are running as a service or as a console interactive application
     // this allows us to run the same code interactively (for debug prupourses) or
     // in production
     if (!Environment.UserInteractive)
     {
         ServiceBase[] servicesToRun;
         servicesToRun = new ServiceBase[] { new DVRBService() };
         ServiceBase.Run(servicesToRun);
     }
     else
     {
         DVRBService service = new DVRBService();
         service.DVRBStart(null);
         System.Console.WriteLine("Press Enter to stop the service");
         System.Console.ReadLine();
         service.DVRBStop();
     }
 }