ServerInfoSystem.cs 688 B

1234567891011121314151617181920212223
  1. namespace ET
  2. {
  3. public static class ServerInfoSystem
  4. {
  5. public static void FromMessage(this ServerInfo self, ServerInfoProto serverInfoProto)
  6. {
  7. self.Id = serverInfoProto.Id;
  8. self.Status = serverInfoProto.Status;
  9. self.ServerName = serverInfoProto.ServerName;
  10. self.OpenServerTime = serverInfoProto.OpenServerTime;
  11. }
  12. public static ServerInfoProto ToMessage(this ServerInfo self)
  13. {
  14. return new ServerInfoProto
  15. {
  16. Id = (int)self.Id,
  17. ServerName = self.ServerName,
  18. Status = self.Status,
  19. };
  20. }
  21. }
  22. }