public ServiceEndpoint(Dns.DnsServiceEntry srv) { Host = srv.Host; Port = srv.Port; Priority = srv.Priority; Weight = srv.Weight; Expires = srv.Expires; }
public static T Create <T>(Dns.DnsServiceEntry srv) where T : ServiceEndpoint, new() { return(new T { Host = srv.Host, Port = srv.Port, Priority = srv.Priority, Weight = srv.Weight, Expires = srv.Expires }); }
public DnsHostEntry[] GetHostEntries(DnsServiceEntry srv) { if (_dns.AllRecords == null) { throw new InvalidOperationException("Must 'Resolve()' before getting hosts"); } return((from r in _dns.AllRecords let host = r as DnsHostEntry where host?.Name == srv.Host select host ).ToArray()); }