Program.cs 930 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using System;
  2. using Sers.Gateway;
  3. using Sers.ServiceStation;
  4. using Vit.Core.Module.Log;
  5. namespace App.Gateway
  6. {
  7. public class Program
  8. {
  9. public static void Main(string[] args)
  10. {
  11. try
  12. {
  13. #region (x.1)初始化ServiceStation
  14. ServiceStation.Init();
  15. //ServiceStation.Discovery(typeof(Program).Assembly);
  16. if (!ServiceStation.Start())
  17. {
  18. Logger.Error("无法连接服务中心。站点关闭");
  19. return;
  20. }
  21. #endregion
  22. GatewayHelp.Bridge();
  23. ServiceStation.RunAwait();
  24. }
  25. catch (Exception ex)
  26. {
  27. Logger.Error(ex);
  28. Console.WriteLine("Exception:" + ex.Message);
  29. }
  30. }
  31. }
  32. }