IDistributedServerInfosManager.cs 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. using System;
  2. using WingServerCommon.Log;
  3. using WingServerCommon.Interfaces.OpLog;
  4. namespace WingServerCommon.Interfaces.Cache
  5. {
  6. public interface IDistributedServerInfosManager : IBaseCacheManager<CacheDistributedServerInfosDTO>
  7. {
  8. }
  9. public class DistributedServerInfosManager : CacheManager<CacheDistributedServerInfosDTO>, IDistributedServerInfosManager
  10. {
  11. public DistributedServerInfosManager() : base()
  12. {
  13. }
  14. }
  15. public class CacheDistributedServerInfosDTO : ICacheObject
  16. {
  17. /// <summary>
  18. /// 编码
  19. /// </summary>
  20. public string Code { get; set; }
  21. /// <summary>
  22. /// 是否主服务器
  23. /// </summary>
  24. /// <value></value>
  25. public bool IsMaster { get; set; }
  26. /// <summary>
  27. /// 服务器名称
  28. /// </summary>
  29. public string Name { get; set; }
  30. /// <summary>
  31. /// 描述
  32. /// </summary>
  33. /// <value></value>
  34. public string Description { get; set; }
  35. /// <summary>
  36. /// 启用
  37. /// </summary>
  38. /// <value></value>
  39. public bool Enable { get; set; }
  40. /// <summary>
  41. /// 功能区分 官方或私有服务器
  42. /// </summary>
  43. /// <value></value>
  44. public int ServerType { get; set; }
  45. /// <summary>
  46. /// 云服务地址
  47. /// </summary>
  48. public string ServerUrl { get; set; }
  49. /// <summary>
  50. /// 纬度
  51. /// </summary>
  52. /// <value></value>
  53. public string Lat { get; set; }
  54. /// <summary>
  55. /// 经度
  56. /// </summary>
  57. /// <value></value>
  58. public string Lng { get; set; }
  59. /// <summary>
  60. /// 指定客户端IP访问此服务器
  61. /// </summary>
  62. /// <value></value>
  63. public List<CacheIPAddressInfoDTO> AssignClientIPList { get; set; }
  64. /// <summary>
  65. /// 内网地址含端口
  66. /// </summary>
  67. /// <value></value>
  68. public string LANHost { get; set; }
  69. }
  70. /// <summary>
  71. /// IP 字段信息
  72. /// </summary>
  73. public class CacheIPAddressInfoDTO
  74. {
  75. /// <summary>
  76. /// 起始IP段
  77. /// </summary>
  78. /// <value></value>
  79. public string StartIp { get; set; }
  80. /// <summary>
  81. /// 结束IP段
  82. /// </summary>
  83. /// <value></value>
  84. public string EndIp { get; set; }
  85. /// <summary>
  86. /// 起始IP段 Long类型
  87. /// </summary>
  88. /// <value></value>
  89. public long LongStartIP { get; set; }
  90. /// <summary>
  91. /// 结束IP段 Long类型
  92. /// </summary>
  93. /// <value></value>
  94. public long LongEndIP { get; set; }
  95. }
  96. }