/// <summary>Gets the children of the given item for the given user interface.</summary> /// <param name="parent">The item whose children to get.</param> /// <param name="userInterface">The interface where the children are displayed.</param> /// <returns>An enumeration of the children.</returns> public virtual IEnumerable<ContentItem> GetChildren(Query query) { IEnumerable<ContentItem> children = GetNodeChildren(query); foreach (var child in children) yield return child; if (Interfaces.Managing == query.Interface) { foreach (var child in NodeFactory.GetChildren(query.Parent.Path)) { if (query.IsMatch(child)) yield return child; } } }