TreeNodeExtensionsProjectTreeToNewTreeS, D(S, FuncS, D, ActionD, D) Method |
Projects a tree (source tree) to a new tree (destination tree).
Namespace: Altaxo.CollectionsAssembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax public static D ProjectTreeToNewTree<S, D>(
this S sourceRoot,
Func<S, D> createDestinationNodeFromSourceNode,
Action<D, D> addChildToDestinationNode
)
where S : Object, ITreeNode<S>
where D : Object, ITreeNode<D>
Parameters
- sourceRoot S
- The source root tree node.
- createDestinationNodeFromSourceNode FuncS, D
- Function used to create a destination node from a source node.
- addChildToDestinationNode ActionD, D
- Procedure to add a child node to a destination node (first argument is the parent node, 2nd argument is the child node).
Type Parameters
- S
- Type of the source tree node.
- D
- Type of the destination tree node.
Return Value
DThe root node of the newly created destination tree that reflects the structure of the source tree.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
S. 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).
See Also