public static IEnumerable <DnsRecord> QuerySrv(string query) { if (Environment.OSVersion.Platform != PlatformID.Win32NT) { throw new InvalidOperationException("DNS query is not supported on non-Win32 platforms yet"); } return(DnsQueryWin32.QuerySrvRecord(query)); }
public Task <IReadOnlyCollection <DnsRecord> > Query(string query, DnsRecordType type) { if (!this.IsSupported) { throw new InvalidOperationException("The win32 DNS query implementation is not supported outside of Windows"); } var result = DnsQueryWin32.QuerySrvRecord(query, type); return(Task.FromResult(result)); }
public static IEnumerable <DnsRecord> QuerySrv(string query) { if (Environment.OSVersion.Platform != PlatformID.Win32NT) { throw new InvalidOperationException("DNS query is not supported on non-Win32 platforms yet"); } if (Debug) { System.Diagnostics.Debug.WriteLine($"Trying to query for {query}"); } return(DnsQueryWin32.QuerySrvRecord(query)); }