ItemTreeBuildExtensionsBuildTNode, TItem(TNode, FuncTNode, IEnumerableTItem, NullableInt32) Method
Build tree from parent/root node. Uses function to retrieve child items.
Namespace: MobileTrack.Common.Models.TreeViews.ItemTreeAssembly: MobileTrack.Common (in MobileTrack.Common.dll) Version: 0.7+1dadc87dcf0a0f837e19a3ce2deb7c1cd85375d1
public static void Build<TNode, TItem>(
this TNode parent,
Func<TNode, IEnumerable<TItem>> getChildItems,
int? maxRelativeDepth = null
)
where TNode : ItemTreeNode<TNode, TItem>
where TItem : IIdLabel
- parent TNode
- Parent/root destination node
- getChildItems FuncTNode, IEnumerableTItem
- Function to retrieve child items
- maxRelativeDepth NullableInt32 (Optional)
- Max depth of traversal (relative to this node)
- TNode
- Node type
- TItem
- Business object type in the collection, derived from IIdLabel
In Visual Basic and C#, you can call this method as an instance method on any object of type
TNode. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).