/*
* Copyright 2004-2006 Luke Quinane and Daniel Frampton
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using System;
using System.Net;
namespace NDns.Configuration{
/// <summary>
/// Provides configuration settings for this package.
/// </summary>
public class NDnsConfiguration
{
/// <summary>
/// Creates a new NDns configuration from the arguments.
/// </summary>
/// <param name="dnsServers">The list of DNS servers to query (in order).</param>
/// <param name="maxMXCacheSize">The maximum number of MX records to the cache.</param>
/// <param name="maxDomainCacheSize">The maximum number of domain records to the cache.</param>
/// <param name="maxAddressCacheSize">The maximum number of address records to the cache.</param>
public NDnsConfiguration(IPAddress[] dnsServers, int maxMXCacheSize,
int maxDomainCacheSize, int maxAddressCacheSize) {
this.dnsServers = dnsServers;
this.maximumMXCacheSize = maxMXCacheSize;
this.maximumDomainCacheSize = maxDomainCacheSize;
this.maximumAddressCacheSize = maxAddressCacheSize;
}
private IPAddress[] dnsServers;
private int maximumMXCacheSize;
private int maximumDomainCacheSize;
private int maximumAddressCacheSize;
/// <summary>
/// The list of DNS servers to query (in order of perference).
/// </summary>
public IPAddress[] DnsServers {
get {
return this.dnsServers;
}
}
/// <summary>
/// Returns the maximum cache for MX records size in entries.
/// </summary>
public int MaximumMXCacheSize {
get {
return this.maximumMXCacheSize;
}
}
/// <summary>
/// Returns the maximum cache for domain records size in entries.
/// </summary>
public int MaximumDomainCacheSize {
get {
return this.maximumDomainCacheSize;
}
}
/// <summary>
/// Returns the maximum cache for address records size in entries.
/// </summary>
public int MaximumAddressCacheSize {
get {
return this.maximumAddressCacheSize;
}
}
}
}
|