internal static SavedDecompileTabState FromXmlInternal(XElement child) { var savedState = new SavedDecompileTabState(); savedState.Language = SessionSettings.Unescape((string)child.Attribute("language")) ?? "C#"; foreach (var path in child.Elements("Path")) { savedState.Paths.Add(FullNodePathName.FromXml(path)); } savedState.ActiveAutoLoadedAssemblies = new List <string>(); var autoAsms = child.Element("ActiveAutoLoadedAssemblies"); if (autoAsms != null) { savedState.ActiveAutoLoadedAssemblies.AddRange(autoAsms.Elements().Select(e => SessionSettings.Unescape((string)e))); } savedState.EditorPositionState = EditorPositionState.FromXml(child.Element("EditorPositionState")); return(savedState); }
/// <summary> /// Retrieves a node using the NodePathName property of its ancestors. /// </summary> public ILSpyTreeNode FindNodeByPath(FullNodePathName fullPath) { ILSpyTreeNode node = this; foreach (var name in fullPath.Names) { if (node == null) break; node.EnsureChildrenFiltered(); node = (ILSpyTreeNode)node.Children.FirstOrDefault(c => ((ILSpyTreeNode)c).NodePathName == name); } return node == this ? null : node; }