Exemple #1
0
        internal HiApplication CurrentHiApplication()
        {
            HttpContext   current = HttpContext.Current;
            HiApplication result;

            if (current == null)
            {
                result = null;
            }
            else
            {
                HiApplication hiApplication = current.Items["AppLocation"] as HiApplication;
                if (hiApplication == null)
                {
                    hiApplication = this.LookUp(current.Request.Path);
                    if (hiApplication != null)
                    {
                        current.Items.Add("AppLocation", hiApplication);
                    }
                }
                result = hiApplication;
            }
            return(result);
        }