public override void PopulateTree (Tree tree) { XPathNavigator n = new XPathDocument (Path.Combine (basedir, "toc.xml")).CreateNavigator (); n.MoveToRoot (); n.MoveToFirstChild (); PopulateNode (n.SelectChildren ("node", ""), tree.RootNode); }
protected BuildVerifier() { this.m_UnsupportedAssemblies = new Dictionary<string, HashSet<string>>(); string uri = Path.Combine(Path.Combine(EditorApplication.applicationContentsPath, "Resources"), "BuildVerification.xml"); XPathNavigator navigator = new XPathDocument(uri).CreateNavigator(); navigator.MoveToFirstChild(); XPathNodeIterator iterator = navigator.SelectChildren("assembly", ""); while (iterator.MoveNext()) { string attribute = iterator.Current.GetAttribute("name", ""); if ((attribute == null) || (attribute.Length < 1)) { throw new ApplicationException(string.Format("Failed to load {0}, <assembly> name attribute is empty", uri)); } string key = iterator.Current.GetAttribute("platform", ""); if ((key == null) || (key.Length < 1)) { key = "*"; } if (!this.m_UnsupportedAssemblies.ContainsKey(key)) { this.m_UnsupportedAssemblies.Add(key, new HashSet<string>()); } this.m_UnsupportedAssemblies[key].Add(attribute); } }
public LinkXmlReader() { foreach (string userBlacklistFile in AssemblyStripper.GetUserBlacklistFiles()) { XPathNavigator navigator = new XPathDocument(userBlacklistFile).CreateNavigator(); navigator.MoveToFirstChild(); XPathNodeIterator xpathNodeIterator = navigator.SelectChildren("assembly", string.Empty); while (xpathNodeIterator.MoveNext()) this._assembliesInALinkXmlFile.Add(xpathNodeIterator.Current.GetAttribute("fullname", string.Empty)); } }