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

dnsDomainLevels() public method

public dnsDomainLevels ( string host ) : int
host string
return int
        public int dnsDomainLevels(string host) {
            GlobalLog.Print("WebProxyScriptHelper::dnsDomainLevels() host:" + ValidationHelper.ToString(host));
            if (host==null) {
                if(Logging.On)Logging.PrintWarning(Logging.Web, SR.GetString(SR.net_log_proxy_called_with_null_parameter, "WebProxyScriptHelper.dnsDomainLevels()", "host"));
                throw new ArgumentNullException("host");
            }
            int index = 0;
            int domainCount = 0;
            while((index = host.IndexOf('.', index)) != -1) {
                domainCount++;
                index++;
            }
            return domainCount;
        }