cs-codex-dist-tests/Framework/Utils/Address.cs

25 lines
457 B
C#
Raw Permalink Normal View History

namespace Utils
{
public class Address
{
public Address(string host, int port)
{
Host = host;
Port = port;
}
public string Host { get; }
public int Port { get; }
public override string ToString()
{
return $"{Host}:{Port}";
}
public bool IsValid()
{
return !string.IsNullOrEmpty(Host) && Port > 0;
}
}
}