/// <summary> /// Builds the sub-items. /// Conditions on this node are also applied to the sub-nodes. /// </summary> public List <T> BuildSubItems <T>() { if (subItemNode == null) { return(new List <T>()); } else { return(subItemNode.BuildChildItems <T>(parameter, conditions)); } }
/// <summary> /// Builds the items in the path. Ensures that all items have the type T. /// </summary> /// <param name="path">A path in the addin tree.</param> /// <param name="parameter">The owner used to create the objects.</param> /// <param name="throwOnNotFound">If true, throws a <see cref="TreePathNotFoundException"/> /// if the path is not found. If false, an empty ArrayList is returned when the /// path is not found.</param> public IReadOnlyList <T> BuildItems <T>(string path, object parameter, bool throwOnNotFound = true) { AddInTreeNode node = GetTreeNode(path, throwOnNotFound); if (node == null) { return(new List <T>()); } else { return(node.BuildChildItems <T>(parameter)); } }