BF2Statistics.Net.DnsCacheResult.DnsCacheResult C# (CSharp) Method

DnsCacheResult() public method

Creates a new instance of DnsCacheResult
public DnsCacheResult ( string hostname, IPAddress expecting = null ) : System
hostname string The hostname to check against the DNS cache
expecting System.Net.IPAddress /// If expecting a IPAddress from , than provide it here /// to unlock the use of ///
return System
        public DnsCacheResult(string hostname, IPAddress expecting = null)
        {
            // Set internals
            HostName = hostname;
            ExpectedAddress = expecting ?? IPAddress.None;
            ResultAddresses = new IPAddress[0];

            // Fetch Results
            try
            {
                ResultAddresses = Dns.GetHostAddresses(hostname);
            }
            catch (Exception e)
            {
                Error = e;
                IsFaulted = true;
            }
        }
DnsCacheResult