| TreeHelperGetLeavesT Method |
Gets the leaves of a given tree.
Namespace: DigitalRune.LinqAssembly: DigitalRune (in DigitalRune.dll) Version: 1.20.0.0 (1.20.1.14552)
Syntax public static IEnumerable<T> GetLeaves<T>(
T node,
Func<T, IEnumerable<T>> getChildren
)
where T : class
Public Shared Function GetLeaves(Of T As Class) (
node As T,
getChildren As Func(Of T, IEnumerable(Of T))
) As IEnumerable(Of T)
public:
generic<typename T>
where T : ref class
static IEnumerable<T>^ GetLeaves(
T node,
Func<T, IEnumerable<T>^>^ getChildren
)
static member GetLeaves :
node : 'T *
getChildren : Func<'T, IEnumerable<'T>> -> IEnumerable<'T> when 'T : not struct
Parameters
- node
- Type: T
The reference node where to start the search. - getChildren
- Type: SystemFuncT, IEnumerableT
A method that retrieves the children of an object of type T.
GetLeavesT(T, FuncT, IEnumerableT) guarantees that
getChildren is never called with as parameter. The
enumeration returned by getChildren may contain .
Type Parameters
- T
- The type of node that is enumerated.
Return Value
Type:
IEnumerableTThe leaves of
node.
Exceptions See Also