Retrieves the breadth-first descendant of a given view model type with an optional filter.

public static ValueTask<INodeViewModel<TModel>> FirstDescendantAsync<TModel>(INodeViewModel model, Func<TModel, bool> filter)
Returns:
ValueTask<INodeViewModel<TModel>>

Parameters

The view model to get the descendant for.

filter Func<TModel, bool>

An optional filter predicate.

Type Parameters

TModel

The view model type of the descendant.

In this article