public static AppLocation Default() { AppLocation appLocation = new AppLocation(); appLocation.Add(new HiApplication("/", "Common", ApplicationType.Common)); return(appLocation); }
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); }
public static AppLocation Create(XmlNode node) { if (node == null) { return(null); } AppLocation location = new AppLocation(); XmlAttributeCollection attributes = node.Attributes; if (attributes != null) { foreach (XmlAttribute attribute in attributes) { if (attribute.Name == "pattern") { location.Pattern = Globals.ApplicationPath + attribute.Value; } else if (attribute.Name == "defaultName") { location.DefaultName = attribute.Value; } } for (int i = 0; i < node.ChildNodes.Count; i++) { XmlNode node2 = node.ChildNodes[i]; if (node2.Name == "add") { XmlAttributeCollection attributes2 = node2.Attributes; if (attributes2 != null) { string pattern = Globals.ApplicationPath + attributes2["pattern"].Value; string name = attributes2["name"].Value; ApplicationType appType = (ApplicationType)Enum.Parse(typeof(ApplicationType), attributes2["type"].Value, true); location.Add(new HiApplication(pattern, name, appType)); } } } } return(location); }
public static AppLocation Create(XmlNode node) { if (node == null) { return null; } AppLocation location = new AppLocation(); XmlAttributeCollection attributes = node.Attributes; if (attributes != null) { foreach (XmlAttribute attribute in attributes) { if (attribute.Name == "pattern") { location.Pattern = Globals.ApplicationPath + attribute.Value; } else if (attribute.Name == "defaultName") { location.DefaultName = attribute.Value; } } for (int i = 0; i < node.ChildNodes.Count; i++) { XmlNode node2 = node.ChildNodes[i]; if (node2.Name == "add") { XmlAttributeCollection attributes2 = node2.Attributes; if (attributes2 != null) { string pattern = Globals.ApplicationPath + attributes2["pattern"].Value; string name = attributes2["name"].Value; ApplicationType appType = (ApplicationType) Enum.Parse(typeof(ApplicationType), attributes2["type"].Value, true); location.Add(new HiApplication(pattern, name, appType)); } } } } return location; }
public static AppLocation Default() { AppLocation location = new AppLocation(); location.Add(new HiApplication("/", "Common", ApplicationType.Common)); return location; }