CenterServiceConnectionService.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using IES.ExamServer.Models;
  2. namespace IES.ExamServer.DI
  3. {
  4. public class CenterServiceConnectionService
  5. {
  6. private bool _centerIsConnected;
  7. private bool _notifyIsConnected;
  8. public Network? primaryNetwork { get; set; }
  9. // private bool _musicIsConnected;
  10. public string? centerUrl { get; set; }
  11. public string? notifyUrl { get; set; }
  12. /// <summary>
  13. /// 音乐播放服务
  14. /// "MusicAIServer": {
  15. /// "MusicUrl": "https://musicapi.winteach.cn/api/v1",
  16. /// "AppId": "8a68f563f3384662acbc268336b98ae2",
  17. /// "KeyAES": "GcRHG7pGgepXXOOU",
  18. /// "IvAES": "W5yt6WthEs2mQlSn"
  19. /// }
  20. /// "MusicAIServer": {
  21. /// "MusicUrl": "https://tmdapi.yosocloud.com/api/v1",
  22. /// "AppId": "8a68f563f3384662acbc268336b98ae2",
  23. /// "KeyAES": "GcRHG7pGgepXXOOU",
  24. /// "IvAES": "W5yt6WthEs2mQlSn"
  25. /// }
  26. /// </summary>
  27. public string? musicUrl { get; set; }
  28. public string? loginToken { get; set; }
  29. public ServerDevice? serverDevice { get; set; }
  30. public bool musicIsConnected
  31. { get;set;
  32. //get { return string.IsNullOrWhiteSpace(musicUrl) ? false : _musicIsConnected; }
  33. //set { _musicIsConnected = value; }
  34. }
  35. public bool notifyIsConnected
  36. {
  37. get { return string.IsNullOrWhiteSpace(notifyUrl) ? false : _notifyIsConnected; }
  38. set { _notifyIsConnected = value; }
  39. }
  40. public bool centerIsConnected
  41. {
  42. get { return string.IsNullOrWhiteSpace(centerUrl) ? false : _centerIsConnected; }
  43. set { _centerIsConnected = value; }
  44. }
  45. }
  46. }