Program.cs 927 B

1234567891011121314151617181920212223242526272829
  1. using System.Collections.Concurrent;
  2. using SmsTool.Models;
  3. using SmsTool.Tencent;
  4. using TencentCloud.Sms.V20210111.Models;
  5. using MiniWebApi.Network;
  6. using System;
  7. namespace SmsTool
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. TencentHelper.Init();
  14. var webApiServer = new WebApiServer("SmsTool");
  15. //webApiServer.Start(args[0]);
  16. //工具需要兼容老平台, 上线后保留此发短信工具
  17. webApiServer.Start(8302);
  18. Console.WriteLine("SmsTool server started");
  19. var readLine = Console.ReadLine();
  20. while (readLine != null && !readLine.Equals("q", StringComparison.OrdinalIgnoreCase))
  21. {
  22. Console.WriteLine("Type \"q\" to exit.");
  23. readLine = Console.ReadLine();
  24. }
  25. webApiServer.Stop();
  26. }
  27. }
  28. }