Esempio n. 1
0
        protected Umc(HttpContext context)
        {
            if (!Register.checkActive())
            {
                throw new LicenseException();
            }

            XSite.Open(context.Server);

            this.context = context;
            // XSite.Open(context.Server);
            //    object user = GetObject("", USER_COMID);
            object sec = GetObject("", SECURITY_COMID);

            if (sec is ISecurity)
            {
                this.security = sec as ISecurity;
            }
            else
            {
                throw new XException("Securty Component not implement xbase.security.ISecurity interface,please reregister security component");
            }


            if (!isInit)
            {
                Initialize(XSite.AppSchemaPath + "umc");
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 保存页面的Wbdl配置信息
        /// </summary>
        /// <param name="pageFullName"></param>
        /// <param name="wbdl"></param>
        public static void saveWbdl(string pageFullName, WbdlSchema wbdl)
        {
            string pageFile = XSite.MapPath(pageFullName);
            string pageId   = pageFile.Remove(0, XSite.SitePhysicalPath.Length);

            wbdl.Id = pageId;
            WbdlSchemaContainer.Instance().UpdateItem(pageId, wbdl);
        }
Esempio n. 3
0
 public static void RegWbo(string url)
 {
     if (string.IsNullOrEmpty(url))
     {
         throw new XException("RegWbo src param " + Lang.CanNotIsNull);
     }
     if (url.EndsWith(".dll", StringComparison.OrdinalIgnoreCase))
     {
         url = XSite.MapPath(url);
     }
     RegComponent(url);
 }
Esempio n. 4
0
        public static string getPageId(string path)
        {
            string pageFile = XSite.MapPath(path);

            string pageId = pageFile.Remove(0, XSite.SitePhysicalPath.Length);

            if (WbdlSchemaContainer.Instance().Contains(pageId))
            {
                return(pageId);
            }

            string oldPageId = Path.ChangeExtension(pageFile, "").TrimEnd('.');

            oldPageId = oldPageId.Remove(0, XSite.SitePhysicalPath.Length);
            if (WbdlSchemaContainer.Instance().Contains(oldPageId))
            {
                return(oldPageId);
            }

            return(pageId);
        }
Esempio n. 5
0
        public static WbdlSchema getWbdl(string pageFullName)
        {
            string pageFile = XSite.MapPath(pageFullName);

            string pageId = pageFile.Remove(0, XSite.SitePhysicalPath.Length);

            if (WbdlSchemaContainer.Instance().Contains(pageId))
            {
                return(WbdlSchemaContainer.Instance().GetItem(pageId));
            }

            string oldPageId = Path.ChangeExtension(pageFile, "").TrimEnd('.');

            oldPageId = oldPageId.Remove(0, XSite.SitePhysicalPath.Length);

            if (WbdlSchemaContainer.Instance().Contains(oldPageId))
            {
                return(WbdlSchemaContainer.Instance().GetItem(oldPageId));
            }

            return(new WbdlSchema());
        }