示例#1
0
        public static AppLocation Default()
        {
            AppLocation appLocation = new AppLocation();

            appLocation.Add(new HiApplication("/", "Common", ApplicationType.Common));
            return(appLocation);
        }
示例#2
0
        internal void LoadValuesFromConfigurationXml()
        {
            XmlNode configSection             = this.GetConfigSection("Ecdev/Core");
            XmlAttributeCollection attributes = configSection.Attributes;

            this.GetAttributes(attributes);
            foreach (XmlNode xmlNode in configSection.ChildNodes)
            {
                if (xmlNode.Name == "Languages")
                {
                    this.GetLanguages(xmlNode);
                }
                if (xmlNode.Name == "appLocation")
                {
                    this.GetAppLocation(xmlNode);
                }
                if (xmlNode.Name == "IntegratedApplications")
                {
                    this.GetIntegratedApplications(xmlNode);
                }
            }
            if (this.app == null)
            {
                this.app = AppLocation.Default();
            }
            if (this.roleConfiguration == null)
            {
                this.roleConfiguration = new RolesConfiguration();
            }
        }
示例#3
0
        public static AppLocation Create(XmlNode node)
        {
            AppLocation result;

            if (node == null)
            {
                result = null;
            }
            else
            {
                AppLocation            appLocation = new AppLocation();
                XmlAttributeCollection attributes  = node.Attributes;
                if (attributes != null)
                {
                    foreach (XmlAttribute xmlAttribute in attributes)
                    {
                        if (xmlAttribute.Name == "pattern")
                        {
                            appLocation.Pattern = Globals.ApplicationPath + xmlAttribute.Value;
                        }
                        else
                        {
                            if (xmlAttribute.Name == "defaultName")
                            {
                                appLocation.DefaultName = xmlAttribute.Value;
                            }
                        }
                    }
                    for (int i = 0; i < node.ChildNodes.Count; i++)
                    {
                        XmlNode xmlNode = node.ChildNodes[i];
                        if (xmlNode.Name == "add")
                        {
                            XmlAttributeCollection attributes2 = xmlNode.Attributes;
                            if (attributes2 != null)
                            {
                                string          text    = Globals.ApplicationPath + attributes2["pattern"].Value;
                                string          value   = attributes2["name"].Value;
                                ApplicationType appType = (ApplicationType)Enum.Parse(typeof(ApplicationType), attributes2["type"].Value, true);
                                appLocation.Add(new HiApplication(text, value, appType));
                            }
                        }
                    }
                }
                result = appLocation;
            }
            return(result);
        }
示例#4
0
 internal void GetAppLocation(XmlNode node)
 {
     this.app = AppLocation.Create(node);
 }