Click or drag to resize

TreeNodeExtensionsFixAndTestParentChildRelationsT Method

Fixes the and test the parent-child relationship in a tree.

Namespace: Altaxo.Collections
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public static bool FixAndTestParentChildRelations<T>(
	this T node,
	Action<T, T> Set1stArgParentNodeTo2ndArg
)
where T : Object, ITreeListNodeWithParent<T>

Parameters

node  T
The node where the test starts (normally the root node of the tree).
Set1stArgParentNodeTo2ndArg  ActionT, T
Action to set the Parent node property of a node given as the 1st argument to a node given as 2nd argument.

Type Parameters

T
Type of node of the tree.

Return Value

Boolean
True if something changed (i.e. the parent-child relationship was broken), false otherwise.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type T. 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).
Exceptions
ExceptionCondition
ArgumentNullException node is null or Set1stArgParentNodeTo2ndArg is null.
See Also