IpEndPointInfo.cs 639 B

1234567891011121314151617181920212223242526272829
  1. using System.Globalization;
  2. namespace MediaBrowser.Model.Net
  3. {
  4. public class IpEndPointInfo
  5. {
  6. public IpAddressInfo IpAddress { get; set; }
  7. public int Port { get; set; }
  8. public IpEndPointInfo()
  9. {
  10. }
  11. public IpEndPointInfo(IpAddressInfo address, int port)
  12. {
  13. IpAddress = address;
  14. Port = port;
  15. }
  16. public override string ToString()
  17. {
  18. var ipAddresString = IpAddress == null ? string.Empty : IpAddress.ToString();
  19. return ipAddresString + ":" + Port.ToString(CultureInfo.InvariantCulture);
  20. }
  21. }
  22. }