ItemTreeNodeTNode, TItemMapCopyToTDestNode, TDestItem(TDestNode, FuncTNode, Boolean, FuncTNode, TDestItem, NullableInt32) Method

Deep copy node/item to destination node/item type starting at destination parent; uses an item mapping function and a filtering predicate. The filtering predicate will terminate traversing source branch if no children satisfy the predicate, even if deeper descendants do.

Definition

Namespace: MobileTrack.Common.Models.TreeViews.ItemTree
Assembly: MobileTrack.Common (in MobileTrack.Common.dll) Version: 0.7+45c8d9adb5970d727cceec44a5ed61aea0016e50
public void MapCopyTo<TDestNode, TDestItem>(
	TDestNode destParent,
	Func<TNode, bool>? allowNext,
	Func<TNode, TDestItem> mapToDestItem,
	int? maxRelativeDepth = null
)
where TDestNode : ItemTreeNode<TDestNode, TDestItem>
where TDestItem : IIdLabel

Parameters

destParent  TDestNode
Parent/root destination node
allowNext  FuncTNode, Boolean
Predicate determining eligibility of source node and its descendants
mapToDestItem  FuncTNode, TDestItem
Map source node to destination item
maxRelativeDepth  NullableInt32  (Optional)
Max depth of traversal (relative to this node)

Type Parameters

TDestNode
Destination node type
TDestItem
Destination model type

See Also