/// <summary> /// Creates a new instance of <see cref="DnsQueryAndServerSettings"/>. /// </summary> public DnsQuerySettings(DnsQueryOptions options) { if (options == null) { throw new ArgumentNullException(nameof(options)); } ContinueOnDnsError = options.ContinueOnDnsError; ContinueOnEmptyResponse = options.ContinueOnEmptyResponse; EnableAuditTrail = options.EnableAuditTrail; Recursion = options.Recursion; Retries = options.Retries; ThrowDnsErrors = options.ThrowDnsErrors; Timeout = options.Timeout; UseCache = options.UseCache; UseRandomNameServer = options.UseRandomNameServer; UseTcpFallback = options.UseTcpFallback; UseTcpOnly = options.UseTcpOnly; ExtendedDnsBufferSize = options.ExtendedDnsBufferSize; RequestDnsSecRecords = options.RequestDnsSecRecords; }
/// <summary> /// Creates a new instance of <see cref="DnsQuerySettings"/>. /// </summary> public DnsQuerySettings(DnsQueryOptions options) { if (options == null) { throw new ArgumentNullException(nameof(options)); } _endpoints = options.NameServers.ToArray(); ContinueOnDnsError = options.ContinueOnDnsError; EnableAuditTrail = options.EnableAuditTrail; Recursion = options.Recursion; Retries = options.Retries; ThrowDnsErrors = options.ThrowDnsErrors; Timeout = options.Timeout; UseCache = options.UseCache; UseRandomNameServer = options.UseRandomNameServer; UseTcpFallback = options.UseTcpFallback; UseTcpOnly = options.UseTcpOnly; AutoResolvedNameServers = options.AutoResolvedNameServers; }
/// <summary> /// Creates a new instance of <see cref="DnsQuerySettings"/>. /// </summary> public DnsQuerySettings(DnsQueryOptions options, IReadOnlyCollection <NameServer> overrideServers) : this(options) { _endpoints = overrideServers?.ToArray() ?? throw new ArgumentNullException(nameof(overrideServers)); }