ModelsAsync<TModel>(INodeViewModel, IEnumerable<Link>, Func<TModel, bool>)
Gets node view models for the specified collection of links. Only internal links that point to a valid published node of the specified model type will be returned.
public static ValueTask<IReadOnlyList<INodeViewModel<TModel>>> ModelsAsync<TModel>(INodeViewModel model, IEnumerable<Link> links, Func<TModel, bool> filter)
- Returns:
- ValueTask<IReadOnlyList<INodeViewModel<TModel>>>
Parameters
The links to retrieve node view models for.
An optional filter predicate that will be applied to the result collection.
Type Parameters
The view model type of the links.
ModelsAsync<TModel>(INodeViewModel, IEnumerable<IPublishedContent>, Func<TModel, bool>)
Gets node view models for the specified collection of published content objects.
public static ValueTask<IReadOnlyList<INodeViewModel<TModel>>> ModelsAsync<TModel>(INodeViewModel model, IEnumerable<IPublishedContent> publishedContent, Func<TModel, bool> filter)
- Returns:
- ValueTask<IReadOnlyList<INodeViewModel<TModel>>>
Parameters
The published content objects to retrieve node view models for.
An optional filter predicate that will be applied to the result collection.
Type Parameters
The view model type of the content.
ModelsAsync<TModel>(INodeViewModel, IEnumerable<string>, Func<TModel, bool>)
Gets node view models for the specified collection of node ids and the current culture.
public static ValueTask<IReadOnlyList<INodeViewModel<TModel>>> ModelsAsync<TModel>(INodeViewModel model, IEnumerable<string> nodeIds, Func<TModel, bool> filter)
- Returns:
- ValueTask<IReadOnlyList<INodeViewModel<TModel>>>
Parameters
The node ids to retrieve node view models for.
An optional filter predicate that will be applied to the result collection.
Type Parameters
The view model type of the content.