Program.cs 694 B

12345678910111213141516171819202122232425262728293031323334
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Linq;
  5. using System.ServiceProcess;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. namespace MultiService
  9. {
  10. static class Program
  11. {
  12. /// <summary>
  13. /// The main entry point for the application.
  14. /// </summary>
  15. static void Main()
  16. {
  17. ServiceBase[] ServicesToRun;
  18. ServicesToRun = new ServiceBase[]
  19. {
  20. new MultiServiceI(),
  21. new MultiServiceII()
  22. };
  23. ServiceBase.Run(ServicesToRun);
  24. }
  25. public static string LastService = "";
  26. public static void Log(string logText)
  27. {
  28. File.AppendAllLines("C:\\temp\\multiservice.log", new[] { logText });
  29. }
  30. }
  31. }