Table of Contents

FindInstance Method

Definition

FindInstance<T>(IDecorator<IHierarchy<T>>, Func<IHierarchy<T>, bool>)

Retrieves all node instances that match the conditions defined by the function delegate match.

public static IEnumerable<T> FindInstance<T>(this IDecorator<IHierarchy<T>> decorator, Func<IHierarchy<T>, bool> match)

Parameters

decorator IDecorator<IHierarchy<T>>

The decorator that wraps the IHierarchy<T> to extend.

match Func<IHierarchy<T>, bool>

The function delegate that defines the conditions of the nodes to search for.

Returns

IEnumerable<T>

An IEnumerable<T> sequence containing all node instances that match the conditions defined by the specified predicate, if found.

Type Parameters

T

The type of the instance that this node represents.