Exemple #1
0
        internal HiApplication LookUp(string url)
        {
            HiApplication result;

            if (this.Pattern != null)
            {
                if (!this.regex.IsMatch(url))
                {
                    result = null;
                    return(result);
                }
            }
            for (int i = 0; i < this.keys.Count; i++)
            {
                HiApplication hiApplication = this.ht[this.keys[i]] as HiApplication;
                if (hiApplication.IsMatch(url))
                {
                    result = hiApplication;
                    return(result);
                }
            }
            if (this.DefaultName != null)
            {
                result = (this.ht[this.DefaultName] as HiApplication);
            }
            else
            {
                result = null;
            }
            return(result);
        }