コード例 #1
0
ファイル: Dns.cs プロジェクト: jHodgkinson/AdAspNetProvider
        /// <summary>
        /// Constructor.
        /// </summary>
        public Dns(AdServiceConfiguration config)
        {
            // Initialize DnsCache.
            this.DnsCache = new ConcurrentDictionary <string, DnsCache>();

            // Store configuration.
            this.Config = config;
        }
コード例 #2
0
        /// <summary>
        /// Constructor to create cache.
        /// </summary>
        /// <param name="hostname">Hostname associated with cache entries.</param>
        /// <param name="serverIPs"></param>
        public DnsCache(string hostname, AdServiceConfiguration config)
        {
            // Store hostname.
            this.Hostname = hostname;

            // Store configuration.
            this.Config = config;

            // Initialize cache.  It is not populated until Dns lookup is actually performed.
            this.CacheItems = new ConcurrentDictionary <IPAddress, DnsCacheItem>();
        }
コード例 #3
0
        /// <summary>
        /// Create new Active Directory connection.
        /// </summary>
        /// <param name="configuration">Configuration settings to use.</param>
        public AdService(AdServiceConfiguration configuration)
        {
            // Verify a valid configuration object was passed.
            if (configuration == null)
            {
                throw new ArgumentException("A valid configuration was not specified.");
            }

            // Store configuration.
            this.Config = configuration;

            // Initialize Dns configuration.
            this.Dns = new Dns(this.Config);
        }