Interface IDnsQuery
Generic contract to query DNS endpoints. Implemented by LookupClient.
Namespace: DnsClient
Assembly: DnsClient.dll
Syntax
public interface IDnsQuery
Methods
| Improve this Doc View SourceQuery(DnsQuestion)
Performs a DNS lookup for the given question.
Declaration
IDnsQueryResponse Query(DnsQuestion question)
Parameters
| Type | Name | Description |
|---|---|---|
| DnsQuestion | question | The domain name query. |
Returns
| Type | Description |
|---|---|
| IDnsQueryResponse | The IDnsQueryResponse which contains the response headers and lists of resource records. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | If |
| DnsResponseException | After retries and fallbacks, if none of the servers were accessible, timed out or (if ThrowDnsErrors is enabled) returned error results. |
Query(DnsQuestion, DnsQueryAndServerOptions)
Performs a DNS lookup for the given question.
Declaration
IDnsQueryResponse Query(DnsQuestion question, DnsQueryAndServerOptions queryOptions)
Parameters
| Type | Name | Description |
|---|---|---|
| DnsQuestion | question | The domain name query. |
| DnsQueryAndServerOptions | queryOptions | Query options to be used instead of LookupClient's settings. |
Returns
| Type | Description |
|---|---|
| IDnsQueryResponse | The IDnsQueryResponse which contains the response headers and lists of resource records. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | If |
| DnsResponseException | After retries and fallbacks, if none of the servers were accessible, timed out or (if ThrowDnsErrors is enabled) returned error results. |
Query(String, QueryType, QueryClass)
Performs a DNS lookup for the given query, queryType and queryClass.
Declaration
IDnsQueryResponse Query(string query, QueryType queryType, QueryClass queryClass = QueryClass.IN)
Parameters
| Type | Name | Description |
|---|---|---|
| String | query | The domain name query. |
| QueryType | queryType | The QueryType. |
| QueryClass | queryClass | The QueryClass. |
Returns
| Type | Description |
|---|---|
| IDnsQueryResponse | The IDnsQueryResponse which contains the response headers and lists of resource records. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | If |
| DnsResponseException | After retries and fallbacks, if none of the servers were accessible, timed out or (if ThrowDnsErrors is enabled) returned error results. |
QueryAsync(DnsQuestion, DnsQueryAndServerOptions, CancellationToken)
Performs a DNS lookup for the given question.
Declaration
Task<IDnsQueryResponse> QueryAsync(DnsQuestion question, DnsQueryAndServerOptions queryOptions, CancellationToken cancellationToken = default(CancellationToken))
Parameters
| Type | Name | Description |
|---|---|---|
| DnsQuestion | question | The domain name query. |
| DnsQueryAndServerOptions | queryOptions | Query options to be used instead of LookupClient's settings. |
| CancellationToken | cancellationToken | The cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<IDnsQueryResponse> | The IDnsQueryResponse which contains the response headers and lists of resource records. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | If |
| DnsResponseException | After retries and fallbacks, if none of the servers were accessible, timed out or (if ThrowDnsErrors is enabled) returned error results. |
QueryAsync(DnsQuestion, CancellationToken)
Performs a DNS lookup for the given question.
Declaration
Task<IDnsQueryResponse> QueryAsync(DnsQuestion question, CancellationToken cancellationToken = default(CancellationToken))
Parameters
| Type | Name | Description |
|---|---|---|
| DnsQuestion | question | The domain name query. |
| CancellationToken | cancellationToken | The cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<IDnsQueryResponse> | The IDnsQueryResponse which contains the response headers and lists of resource records. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | If |
| DnsResponseException | After retries and fallbacks, if none of the servers were accessible, timed out or (if ThrowDnsErrors is enabled) returned error results. |
QueryAsync(String, QueryType, QueryClass, CancellationToken)
Performs a DNS lookup for the given query, queryType and queryClass
Declaration
Task<IDnsQueryResponse> QueryAsync(string query, QueryType queryType, QueryClass queryClass = QueryClass.IN, CancellationToken cancellationToken = default(CancellationToken))
Parameters
| Type | Name | Description |
|---|---|---|
| String | query | The domain name query. |
| QueryType | queryType | The QueryType. |
| QueryClass | queryClass | The QueryClass. |
| CancellationToken | cancellationToken | The cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<IDnsQueryResponse> | The IDnsQueryResponse which contains the response headers and lists of resource records. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | If |
| OperationCanceledException | If cancellation has been requested for the passed in |
| DnsResponseException | After retries and fallbacks, if none of the servers were accessible, timed out or (if ThrowDnsErrors is enabled) returned error results. |
QueryReverse(IPAddress)
Does a reverse lookup for the ipAddress.
Declaration
IDnsQueryResponse QueryReverse(IPAddress ipAddress)
Parameters
| Type | Name | Description |
|---|---|---|
| IPAddress | ipAddress | The IPAddress. |
Returns
| Type | Description |
|---|---|
| IDnsQueryResponse | The IDnsQueryResponse which might contain the PtrRecord for the |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | If |
| DnsResponseException | After retries and fallbacks, if none of the servers were accessible, timed out or (if ThrowDnsErrors is enabled) returned error results. |
QueryReverse(IPAddress, DnsQueryAndServerOptions)
Does a reverse lookup for the ipAddress.
Declaration
IDnsQueryResponse QueryReverse(IPAddress ipAddress, DnsQueryAndServerOptions queryOptions)
Parameters
| Type | Name | Description |
|---|---|---|
| IPAddress | ipAddress | The IPAddress. |
| DnsQueryAndServerOptions | queryOptions | Query options to be used instead of LookupClient's settings. |
Returns
| Type | Description |
|---|---|
| IDnsQueryResponse | The IDnsQueryResponse which might contain the PtrRecord for the |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | If |
| DnsResponseException | After retries and fallbacks, if none of the servers were accessible, timed out or (if ThrowDnsErrors is enabled) returned error results. |
QueryReverseAsync(IPAddress, DnsQueryAndServerOptions, CancellationToken)
Does a reverse lookup for the ipAddress.
Declaration
Task<IDnsQueryResponse> QueryReverseAsync(IPAddress ipAddress, DnsQueryAndServerOptions queryOptions, CancellationToken cancellationToken = default(CancellationToken))
Parameters
| Type | Name | Description |
|---|---|---|
| IPAddress | ipAddress | The IPAddress. |
| DnsQueryAndServerOptions | queryOptions | Query options to be used instead of LookupClient's settings. |
| CancellationToken | cancellationToken | The cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<IDnsQueryResponse> | The IDnsQueryResponse which might contain the PtrRecord for the |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | If |
| OperationCanceledException | If cancellation has been requested for the passed in |
| DnsResponseException | After retries and fallbacks, if none of the servers were accessible, timed out or (if ThrowDnsErrors is enabled) returned error results. |
QueryReverseAsync(IPAddress, CancellationToken)
Does a reverse lookup for the ipAddress.
Declaration
Task<IDnsQueryResponse> QueryReverseAsync(IPAddress ipAddress, CancellationToken cancellationToken = default(CancellationToken))
Parameters
| Type | Name | Description |
|---|---|---|
| IPAddress | ipAddress | The IPAddress. |
| CancellationToken | cancellationToken | The cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<IDnsQueryResponse> | The IDnsQueryResponse which might contain the PtrRecord for the |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | If |
| OperationCanceledException | If cancellation has been requested for the passed in |
| DnsResponseException | After retries and fallbacks, if none of the servers were accessible, timed out or (if ThrowDnsErrors is enabled) returned error results. |
QueryServer(IReadOnlyCollection<NameServer>, DnsQuestion)
Performs a DNS lookup for the given question
using only the passed in servers.
Declaration
IDnsQueryResponse QueryServer(IReadOnlyCollection<NameServer> servers, DnsQuestion question)
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyCollection<NameServer> | servers | The list of one or more server(s) which should be used for the lookup. |
| DnsQuestion | question | The domain name query. |
Returns
| Type | Description |
|---|---|
| IDnsQueryResponse | The IDnsQueryResponse which contains the response headers and lists of resource records. |
Remarks
To query specific servers can be useful in cases where you have to use a different DNS server than initially configured (without creating a new instance of ILookupClient for example).
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException | If the |
| ArgumentNullException | If |
| DnsResponseException | After retries and fallbacks, if none of the servers were accessible, timed out or (if ThrowDnsErrors is enabled) returned error results. |
QueryServer(IReadOnlyCollection<NameServer>, DnsQuestion, DnsQueryOptions)
Performs a DNS lookup for the given question
using only the passed in servers.
Declaration
IDnsQueryResponse QueryServer(IReadOnlyCollection<NameServer> servers, DnsQuestion question, DnsQueryOptions queryOptions)
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyCollection<NameServer> | servers | The list of one or more server(s) which should be used for the lookup. |
| DnsQuestion | question | The domain name query. |
| DnsQueryOptions | queryOptions | Query options to be used instead of LookupClient's settings. |
Returns
| Type | Description |
|---|---|
| IDnsQueryResponse | The IDnsQueryResponse which contains the response headers and lists of resource records. |
Remarks
To query specific servers can be useful in cases where you have to use a different DNS server than initially configured (without creating a new instance of ILookupClient for example).
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException | If the |
| ArgumentNullException | If |
| DnsResponseException | After retries and fallbacks, if none of the servers were accessible, timed out or (if ThrowDnsErrors is enabled) returned error results. |
QueryServer(IReadOnlyCollection<NameServer>, String, QueryType, QueryClass)
Performs a DNS lookup for the given query, queryType and queryClass
using only the passed in servers.
Declaration
IDnsQueryResponse QueryServer(IReadOnlyCollection<NameServer> servers, string query, QueryType queryType, QueryClass queryClass = QueryClass.IN)
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyCollection<NameServer> | servers | The list of one or more server(s) which should be used for the lookup. |
| String | query | The domain name query. |
| QueryType | queryType | The QueryType. |
| QueryClass | queryClass | The QueryClass. |
Returns
| Type | Description |
|---|---|
| IDnsQueryResponse | The IDnsQueryResponse which contains the response headers and lists of resource records. |
Remarks
To query specific servers can be useful in cases where you have to use a different DNS server than initially configured (without creating a new instance of ILookupClient for example).
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException | If the |
| ArgumentNullException | If |
| DnsResponseException | After retries and fallbacks, if none of the servers were accessible, timed out or (if ThrowDnsErrors is enabled) returned error results. |
QueryServer(IReadOnlyCollection<IPAddress>, String, QueryType, QueryClass)
Performs a DNS lookup for the given query, queryType and queryClass
using only the passed in servers.
Declaration
IDnsQueryResponse QueryServer(IReadOnlyCollection<IPAddress> servers, string query, QueryType queryType, QueryClass queryClass = QueryClass.IN)
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyCollection<IPAddress> | servers | The list of one or more server(s) which should be used for the lookup. |
| String | query | The domain name query. |
| QueryType | queryType | The QueryType. |
| QueryClass | queryClass | The QueryClass. |
Returns
| Type | Description |
|---|---|
| IDnsQueryResponse | The IDnsQueryResponse which contains the response headers and lists of resource records. |
Remarks
To query specific servers can be useful in cases where you have to use a different DNS server than initially configured (without creating a new instance of ILookupClient for example).
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException | If the |
| ArgumentNullException | If |
| DnsResponseException | After retries and fallbacks, if none of the servers were accessible, timed out or (if ThrowDnsErrors is enabled) returned error results. |
QueryServer(IReadOnlyCollection<IPEndPoint>, String, QueryType, QueryClass)
Performs a DNS lookup for the given query, queryType and queryClass
using only the passed in servers.
Declaration
IDnsQueryResponse QueryServer(IReadOnlyCollection<IPEndPoint> servers, string query, QueryType queryType, QueryClass queryClass = QueryClass.IN)
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyCollection<IPEndPoint> | servers | The list of one or more server(s) which should be used for the lookup. |
| String | query | The domain name query. |
| QueryType | queryType | The QueryType. |
| QueryClass | queryClass | The QueryClass. |
Returns
| Type | Description |
|---|---|
| IDnsQueryResponse | The IDnsQueryResponse which contains the response headers and lists of resource records. |
Remarks
To query specific servers can be useful in cases where you have to use a different DNS server than initially configured (without creating a new instance of ILookupClient for example).
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException | If the |
| ArgumentNullException | If |
| DnsResponseException | After retries and fallbacks, if none of the servers were accessible, timed out or (if ThrowDnsErrors is enabled) returned error results. |
QueryServerAsync(IReadOnlyCollection<NameServer>, DnsQuestion, DnsQueryOptions, CancellationToken)
Performs a DNS lookup for the given question
using only the passed in servers.
Declaration
Task<IDnsQueryResponse> QueryServerAsync(IReadOnlyCollection<NameServer> servers, DnsQuestion question, DnsQueryOptions queryOptions, CancellationToken cancellationToken = default(CancellationToken))
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyCollection<NameServer> | servers | The list of one or more server(s) which should be used for the lookup. |
| DnsQuestion | question | The domain name query. |
| DnsQueryOptions | queryOptions | Query options to be used instead of LookupClient's settings. |
| CancellationToken | cancellationToken | The cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<IDnsQueryResponse> | The IDnsQueryResponse which contains the response headers and lists of resource records. |
Remarks
To query specific servers can be useful in cases where you have to use a different DNS server than initially configured (without creating a new instance of ILookupClient for example).
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException | If the |
| ArgumentNullException | If |
| DnsResponseException | After retries and fallbacks, if none of the servers were accessible, timed out or (if ThrowDnsErrors is enabled) returned error results. |
QueryServerAsync(IReadOnlyCollection<NameServer>, DnsQuestion, CancellationToken)
Performs a DNS lookup for the given question
using only the passed in servers.
Declaration
Task<IDnsQueryResponse> QueryServerAsync(IReadOnlyCollection<NameServer> servers, DnsQuestion question, CancellationToken cancellationToken = default(CancellationToken))
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyCollection<NameServer> | servers | The list of one or more server(s) which should be used for the lookup. |
| DnsQuestion | question | The domain name query. |
| CancellationToken | cancellationToken | The cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<IDnsQueryResponse> | The IDnsQueryResponse which contains the response headers and lists of resource records. |
Remarks
To query specific servers can be useful in cases where you have to use a different DNS server than initially configured (without creating a new instance of ILookupClient for example).
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException | If the |
| ArgumentNullException | If |
| DnsResponseException | After retries and fallbacks, if none of the servers were accessible, timed out or (if ThrowDnsErrors is enabled) returned error results. |
QueryServerAsync(IReadOnlyCollection<NameServer>, String, QueryType, QueryClass, CancellationToken)
Performs a DNS lookup for the given query, queryType and queryClass
using only the passed in servers.
Declaration
Task<IDnsQueryResponse> QueryServerAsync(IReadOnlyCollection<NameServer> servers, string query, QueryType queryType, QueryClass queryClass = QueryClass.IN, CancellationToken cancellationToken = default(CancellationToken))
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyCollection<NameServer> | servers | The list of one or more server(s) which should be used for the lookup. |
| String | query | The domain name query. |
| QueryType | queryType | The QueryType. |
| QueryClass | queryClass | The QueryClass. |
| CancellationToken | cancellationToken | The cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<IDnsQueryResponse> | The IDnsQueryResponse which contains the response headers and lists of resource records. |
Remarks
To query specific servers can be useful in cases where you have to use a different DNS server than initially configured (without creating a new instance of ILookupClient for example).
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException | If the |
| ArgumentNullException | If |
| OperationCanceledException | If cancellation has been requested for the passed in |
| DnsResponseException | After retries and fallbacks, if none of the servers were accessible, timed out or (if ThrowDnsErrors is enabled) returned error results. |
QueryServerAsync(IReadOnlyCollection<IPAddress>, String, QueryType, QueryClass, CancellationToken)
Performs a DNS lookup for the given query, queryType and queryClass
using only the passed in servers.
Declaration
Task<IDnsQueryResponse> QueryServerAsync(IReadOnlyCollection<IPAddress> servers, string query, QueryType queryType, QueryClass queryClass = QueryClass.IN, CancellationToken cancellationToken = default(CancellationToken))
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyCollection<IPAddress> | servers | The list of one or more server(s) which should be used for the lookup. |
| String | query | The domain name query. |
| QueryType | queryType | The QueryType. |
| QueryClass | queryClass | The QueryClass. |
| CancellationToken | cancellationToken | The cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<IDnsQueryResponse> | The IDnsQueryResponse which contains the response headers and lists of resource records. |
Remarks
To query specific servers can be useful in cases where you have to use a different DNS server than initially configured (without creating a new instance of ILookupClient for example).
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException | If the |
| ArgumentNullException | If |
| OperationCanceledException | If cancellation has been requested for the passed in |
| DnsResponseException | After retries and fallbacks, if none of the servers were accessible, timed out or (if ThrowDnsErrors is enabled) returned error results. |
QueryServerAsync(IReadOnlyCollection<IPEndPoint>, String, QueryType, QueryClass, CancellationToken)
Performs a DNS lookup for the given query, queryType and queryClass
using only the passed in servers.
Declaration
Task<IDnsQueryResponse> QueryServerAsync(IReadOnlyCollection<IPEndPoint> servers, string query, QueryType queryType, QueryClass queryClass = QueryClass.IN, CancellationToken cancellationToken = default(CancellationToken))
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyCollection<IPEndPoint> | servers | The list of one or more server(s) which should be used for the lookup. |
| String | query | The domain name query. |
| QueryType | queryType | The QueryType. |
| QueryClass | queryClass | The QueryClass. |
| CancellationToken | cancellationToken | The cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<IDnsQueryResponse> | The IDnsQueryResponse which contains the response headers and lists of resource records. |
Remarks
To query specific servers can be useful in cases where you have to use a different DNS server than initially configured (without creating a new instance of ILookupClient for example).
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException | If the |
| ArgumentNullException | If |
| OperationCanceledException | If cancellation has been requested for the passed in |
| DnsResponseException | After retries and fallbacks, if none of the servers were accessible, timed out or (if ThrowDnsErrors is enabled) returned error results. |
QueryServerReverse(IReadOnlyCollection<NameServer>, IPAddress)
Does a reverse lookup for the ipAddress
using only the passed in servers.
Declaration
IDnsQueryResponse QueryServerReverse(IReadOnlyCollection<NameServer> servers, IPAddress ipAddress)
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyCollection<NameServer> | servers | The list of one or more server(s) which should be used for the lookup. |
| IPAddress | ipAddress | The IPAddress. |
Returns
| Type | Description |
|---|---|
| IDnsQueryResponse | The IDnsQueryResponse which might contain the PtrRecord for the |
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException | If the |
| ArgumentNullException | If |
| DnsResponseException | After retries and fallbacks, if none of the servers were accessible, timed out or (if ThrowDnsErrors is enabled) returned error results. |
QueryServerReverse(IReadOnlyCollection<NameServer>, IPAddress, DnsQueryOptions)
Does a reverse lookup for the ipAddress
using only the passed in servers.
Declaration
IDnsQueryResponse QueryServerReverse(IReadOnlyCollection<NameServer> servers, IPAddress ipAddress, DnsQueryOptions queryOptions)
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyCollection<NameServer> | servers | The list of one or more server(s) which should be used for the lookup. |
| IPAddress | ipAddress | The IPAddress. |
| DnsQueryOptions | queryOptions | Query options to be used instead of LookupClient's settings. |
Returns
| Type | Description |
|---|---|
| IDnsQueryResponse | The IDnsQueryResponse which might contain the PtrRecord for the |
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException | If the |
| ArgumentNullException | If |
| DnsResponseException | After retries and fallbacks, if none of the servers were accessible, timed out or (if ThrowDnsErrors is enabled) returned error results. |
QueryServerReverse(IReadOnlyCollection<IPAddress>, IPAddress)
Does a reverse lookup for the ipAddress
using only the passed in servers.
Declaration
IDnsQueryResponse QueryServerReverse(IReadOnlyCollection<IPAddress> servers, IPAddress ipAddress)
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyCollection<IPAddress> | servers | The list of one or more server(s) which should be used for the lookup. |
| IPAddress | ipAddress | The IPAddress. |
Returns
| Type | Description |
|---|---|
| IDnsQueryResponse | The IDnsQueryResponse which might contain the PtrRecord for the |
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException | If the |
| ArgumentNullException | If |
| DnsResponseException | After retries and fallbacks, if none of the servers were accessible, timed out or (if ThrowDnsErrors is enabled) returned error results. |
QueryServerReverse(IReadOnlyCollection<IPEndPoint>, IPAddress)
Does a reverse lookup for the ipAddress
using only the passed in servers.
Declaration
IDnsQueryResponse QueryServerReverse(IReadOnlyCollection<IPEndPoint> servers, IPAddress ipAddress)
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyCollection<IPEndPoint> | servers | The list of one or more server(s) which should be used for the lookup. |
| IPAddress | ipAddress | The IPAddress. |
Returns
| Type | Description |
|---|---|
| IDnsQueryResponse | The IDnsQueryResponse which might contain the PtrRecord for the |
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException | If the |
| ArgumentNullException | If |
| DnsResponseException | After retries and fallbacks, if none of the servers were accessible, timed out or (if ThrowDnsErrors is enabled) returned error results. |
QueryServerReverseAsync(IReadOnlyCollection<NameServer>, IPAddress, DnsQueryOptions, CancellationToken)
Does a reverse lookup for the ipAddress
using only the passed in servers.
Declaration
Task<IDnsQueryResponse> QueryServerReverseAsync(IReadOnlyCollection<NameServer> servers, IPAddress ipAddress, DnsQueryOptions queryOptions, CancellationToken cancellationToken = default(CancellationToken))
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyCollection<NameServer> | servers | The list of one or more server(s) which should be used for the lookup. |
| IPAddress | ipAddress | The IPAddress. |
| DnsQueryOptions | queryOptions | Query options to be used instead of LookupClient's settings. |
| CancellationToken | cancellationToken | The cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<IDnsQueryResponse> | The IDnsQueryResponse which might contain the PtrRecord for the |
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException | If the |
| ArgumentNullException | If |
| OperationCanceledException | If cancellation has been requested for the passed in |
| DnsResponseException | After retries and fallbacks, if none of the servers were accessible, timed out or (if ThrowDnsErrors is enabled) returned error results. |
QueryServerReverseAsync(IReadOnlyCollection<NameServer>, IPAddress, CancellationToken)
Does a reverse lookup for the ipAddress
using only the passed in servers.
Declaration
Task<IDnsQueryResponse> QueryServerReverseAsync(IReadOnlyCollection<NameServer> servers, IPAddress ipAddress, CancellationToken cancellationToken = default(CancellationToken))
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyCollection<NameServer> | servers | The list of one or more server(s) which should be used for the lookup. |
| IPAddress | ipAddress | The IPAddress. |
| CancellationToken | cancellationToken | The cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<IDnsQueryResponse> | The IDnsQueryResponse which might contain the PtrRecord for the |
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException | If the |
| ArgumentNullException | If |
| OperationCanceledException | If cancellation has been requested for the passed in |
| DnsResponseException | After retries and fallbacks, if none of the servers were accessible, timed out or (if ThrowDnsErrors is enabled) returned error results. |
QueryServerReverseAsync(IReadOnlyCollection<IPAddress>, IPAddress, CancellationToken)
Does a reverse lookup for the ipAddress
using only the passed in servers.
Declaration
Task<IDnsQueryResponse> QueryServerReverseAsync(IReadOnlyCollection<IPAddress> servers, IPAddress ipAddress, CancellationToken cancellationToken = default(CancellationToken))
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyCollection<IPAddress> | servers | The list of one or more server(s) which should be used for the lookup. |
| IPAddress | ipAddress | The IPAddress. |
| CancellationToken | cancellationToken | The cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<IDnsQueryResponse> | The IDnsQueryResponse which might contain the PtrRecord for the |
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException | If the |
| ArgumentNullException | If |
| OperationCanceledException | If cancellation has been requested for the passed in |
| DnsResponseException | After retries and fallbacks, if none of the servers were accessible, timed out or (if ThrowDnsErrors is enabled) returned error results. |
QueryServerReverseAsync(IReadOnlyCollection<IPEndPoint>, IPAddress, CancellationToken)
Does a reverse lookup for the ipAddress
using only the passed in servers.
Declaration
Task<IDnsQueryResponse> QueryServerReverseAsync(IReadOnlyCollection<IPEndPoint> servers, IPAddress ipAddress, CancellationToken cancellationToken = default(CancellationToken))
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyCollection<IPEndPoint> | servers | The list of one or more server(s) which should be used for the lookup. |
| IPAddress | ipAddress | The IPAddress. |
| CancellationToken | cancellationToken | The cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<IDnsQueryResponse> | The IDnsQueryResponse which might contain the PtrRecord for the |
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException | If the |
| ArgumentNullException | If |
| OperationCanceledException | If cancellation has been requested for the passed in |
| DnsResponseException | After retries and fallbacks, if none of the servers were accessible, timed out or (if ThrowDnsErrors is enabled) returned error results. |