Class LookupClientOptions
The options used to configure defaults in LookupClient and to optionally use specific settings per query.
Inherited Members
Namespace: DnsClient
Assembly: DnsClient.dll
Syntax
public class LookupClientOptions : DnsQueryAndServerOptions
Constructors
| Improve this Doc View SourceLookupClientOptions()
Creates a new instance of LookupClientOptions with default settings.
Declaration
public LookupClientOptions()
LookupClientOptions(NameServer[])
Creates a new instance of LookupClientOptions.
Declaration
public LookupClientOptions(params NameServer[] nameServers)
Parameters
Type | Name | Description |
---|---|---|
NameServer[] | nameServers | A collection of name servers. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | If |
LookupClientOptions(IPAddress[])
Creates a new instance of LookupClientOptions.
Declaration
public LookupClientOptions(params IPAddress[] nameServers)
Parameters
Type | Name | Description |
---|---|---|
IPAddress[] | nameServers | A collection of name servers. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | If |
LookupClientOptions(IPEndPoint[])
Creates a new instance of LookupClientOptions.
Declaration
public LookupClientOptions(params IPEndPoint[] nameServers)
Parameters
Type | Name | Description |
---|---|---|
IPEndPoint[] | nameServers | A collection of name servers. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | If |
Properties
| Improve this Doc View SourceAutoResolveNameServers
Gets or sets a flag indicating whether the name server collection should be automatically resolved.
Default is True
.
Declaration
public bool AutoResolveNameServers { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
If name servers are configured manually via the constructor, this flag is set to false.
If you want both, your manually configured servers and auto resolved name servers,
you can use both (ctor or) NameServers and AutoResolveNameServers set to True
.
MaximumCacheTimeout
Gets a TimeSpan which can override the TTL of a resource record in case the
TTL of the record is higher than this maximum value.
Default is Null
.
Declaration
public TimeSpan? MaximumCacheTimeout { get; set; }
Property Value
Type | Description |
---|---|
Nullable<TimeSpan> |
Remarks
This setting gets igonred in case UseCache is set to False
,
or the value is set to Null
, Infinite or Zero.
The maximum value is 24 days (which shouldn't be used).
MinimumCacheTimeout
Gets or sets a TimeSpan which can override the TTL of a resource record in case the
TTL of the record is lower than this minimum value.
Default is Null
.
This is useful in case the server retruns records with zero TTL.
Declaration
public TimeSpan? MinimumCacheTimeout { get; set; }
Property Value
Type | Description |
---|---|
Nullable<TimeSpan> |