ClientConfig.cs 467 B

123456789101112131415161718192021222324252627282930
  1. using System.Net;
  2. using MongoDB.Bson.Serialization.Attributes;
  3. namespace ETModel
  4. {
  5. public class ClientConfig: AConfigComponent
  6. {
  7. public string Host = "";
  8. public int Port;
  9. [BsonIgnore]
  10. private IPEndPoint ipEndPoint;
  11. public override void EndInit()
  12. {
  13. base.EndInit();
  14. this.ipEndPoint = NetworkHelper.ToIPEndPoint(this.Host, this.Port);
  15. }
  16. [BsonIgnore]
  17. public IPEndPoint IPEndPoint
  18. {
  19. get
  20. {
  21. return this.ipEndPoint;
  22. }
  23. }
  24. }
  25. }