Program.cs 711 B

12345678910111213141516171819202122232425
  1. using MiniWebApi.Network;
  2. using Sms.Tool.Tencent;
  3. using System;
  4. using System.Threading.Tasks;
  5. namespace Sms.Tool
  6. {
  7. class Program
  8. {
  9. static void Main(string[] args)
  10. {
  11. TencentHelper.Init();
  12. var webApiServer = new WebApiServer("SmsTool");
  13. webApiServer.Start(9998);
  14. Console.WriteLine("SmsTool server started");
  15. var readLine = Console.ReadLine();
  16. while (readLine != null && !readLine.Equals("q", StringComparison.OrdinalIgnoreCase))
  17. {
  18. Console.WriteLine("Type \"q\" to exit.");
  19. readLine = Console.ReadLine();
  20. }
  21. webApiServer.Stop();
  22. }
  23. }
  24. }