Program.cs 1016 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1.  using Quartz;
  2. using Quartz.Impl;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Configuration;
  6. using System.Data;
  7. using System.IO;
  8. using System.Linq;
  9. using System.Security.Permissions;
  10. using System.Text;
  11. using Topshelf;
  12. namespace TimedUpload
  13. {
  14. class Program
  15. {
  16. static void Main(string[] args)
  17. {
  18. log4net.Config.XmlConfigurator.ConfigureAndWatch(new FileInfo(AppDomain.CurrentDomain.BaseDirectory + "log4net.config"));
  19. try
  20. {
  21. HostFactory.Run(x =>
  22. {
  23. x.UseLog4Net();
  24. x.Service<ServiceRunner>();
  25. x.SetDescription("SetDescription");
  26. x.SetDisplayName("SetDisplayName");
  27. x.SetServiceName("SetServiceName");
  28. x.EnablePauseAndContinue();
  29. });
  30. }
  31. catch (Exception ex)
  32. {
  33. Console.Write(ex.Message);
  34. }
  35. }
  36. }
  37. }