コード例 #1
0
ファイル: Program.cs プロジェクト: CuneytKukrer/TestProject
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     AppDomain.CurrentDomain.UnhandledException += (o, e) => log.Error((Exception)e.ExceptionObject);
     if (Environment.UserInteractive)
     {
         var dbis = new DownloadBingImageService();
         dbis.Start(args);
     }
     else
     {
         ServiceBase[] ServicesToRun;
         ServicesToRun = new ServiceBase[]
                 {
                     new DownloadBingImageService()
                 };
         ServiceBase.Run(ServicesToRun);
     }
     Thread.Sleep(TimeSpan.FromDays(1));
 }
コード例 #2
0
ファイル: Program.cs プロジェクト: rajeshwarn/TestProject
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     AppDomain.CurrentDomain.UnhandledException += (o, e) => log.Error((Exception)e.ExceptionObject);
     if (Environment.UserInteractive)
     {
         var dbis = new DownloadBingImageService();
         dbis.Start(args);
     }
     else
     {
         ServiceBase[] ServicesToRun;
         ServicesToRun = new ServiceBase[]
         {
             new DownloadBingImageService()
         };
         ServiceBase.Run(ServicesToRun);
     }
     Thread.Sleep(TimeSpan.FromDays(1));
 }