Click or drag to resize

graphToolsGetParentsT Method

imbSCI | imbACE | imbNLP | imbWEM | imbWBI
Gets first level parents of the source collection

Namespace:  imbSCI.Data.collection.graph
Assembly:  imbSCI.Data (in imbSCI.Data.dll) Version: 0.3.70.
Syntax
C#
public static List<T> GetParents<T>(
	this IEnumerable<T> source,
	bool keepRootsFromSource = false
)
where T : class, IGraphNode
Request Example View Source

Parameters

source
Type: System.Collections.GenericIEnumerableT
The source.
keepRootsFromSource (Optional)
Type: SystemBoolean
if set to true: the output will also contain any root (node without parent) node from the specified source collection.

Type Parameters

T

Return Value

Type: ListT

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerableT. 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