System.Net.WebProxyScriptHelper.WebProxyScriptHelper.localHostOrDomainIs C# (CSharp) Method

localHostOrDomainIs() public method

public localHostOrDomainIs ( string host, string hostDom ) : bool
host string
hostDom string
return bool
        public bool localHostOrDomainIs(string host, string hostDom) {
            GlobalLog.Print("WebProxyScriptHelper::localHostOrDomainIs() host:" + ValidationHelper.ToString(host) + " hostDom:" + ValidationHelper.ToString(hostDom));
            if (host==null) {
                if(Logging.On)Logging.PrintWarning(Logging.Web, SR.GetString(SR.net_log_proxy_called_with_null_parameter, "WebProxyScriptHelper.localHostOrDomainIs()", "host"));
                throw new ArgumentNullException("host");
            }
            if (hostDom==null) {
                if(Logging.On)Logging.PrintWarning(Logging.Web, SR.GetString(SR.net_log_proxy_called_with_null_parameter, "WebProxyScriptHelper.localHostOrDomainIs()", "hostDom"));
                throw new ArgumentNullException("hostDom");
            }
            if (isPlainHostName(host)) {
                 int index = hostDom.IndexOf('.');
                 if (index > 0) {
                     hostDom = hostDom.Substring(0,index);
                 }
            }
            return string.Compare(host, hostDom, StringComparison.OrdinalIgnoreCase)==0;
        }