Program.cs 938 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 init ServiceStation
  14. ServiceStation.Init();
  15. //ServiceStation.Discovery(typeof(Program).Assembly);
  16. if (!ServiceStation.Start())
  17. {
  18. Logger.Error("can not connect to ServiceCenter. Closing station now.");
  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. }