jellyfin/MediaBrowser.Model/Net/IpEndPointInfo.cs

31 lines
656 B
C#
Raw Normal View History

2016-11-04 08:31:05 +00:00
using System;
2016-11-08 18:44:23 +00:00
using System.Globalization;
2016-11-04 08:31:05 +00:00
namespace MediaBrowser.Model.Net
{
public class IpEndPointInfo
{
public IpAddressInfo IpAddress { get; set; }
public int Port { get; set; }
2016-11-08 18:44:23 +00:00
public IpEndPointInfo()
{
}
public IpEndPointInfo(IpAddressInfo address, int port)
{
IpAddress = address;
Port = port;
}
2016-11-04 08:31:05 +00:00
public override string ToString()
{
var ipAddresString = IpAddress == null ? string.Empty : IpAddress.ToString();
2016-11-08 18:44:23 +00:00
return ipAddresString + ":" + Port.ToString(CultureInfo.InvariantCulture);
2016-11-04 08:31:05 +00:00
}
}
}