Click or drag to resize

pipelineSubjectToolsGetParentOfTypeT, TSource Method (IEnumerableTSource, Int32)

Home | imbSCI | imbACE | imbNLP | imbWEM | imbWBI
Returns first parent in ansestor line that is of specified type

Namespace:  imbNLP.PartOfSpeech.pipelineForPos.subject
Assembly:  imbNLP.PartOfSpeech (in imbNLP.PartOfSpeech.dll) Version: 0.2.30
Syntax
C#
public static List<T> GetParentOfType<T, TSource>(
	this IEnumerable<TSource> source,
	int depthLimit = 10
)
where T : class, IPipelineTaskSubject, IGraphNode
where TSource : class, IPipelineTaskSubject, IGraphNode

Parameters

source
Type: System.Collections.GenericIEnumerableTSource
The source node - to start from
depthLimit (Optional)
Type: SystemInt32
Number of levels allowed for search

Type Parameters

T
Type that parent has to be
TSource

[Missing <typeparam name="TSource"/> documentation for "M:imbNLP.PartOfSpeech.pipelineForPos.subject.pipelineSubjectTools.GetParentOfType``2(System.Collections.Generic.IEnumerable{``1},System.Int32)"]

Return Value

Type: ListT
Parent of specified type or null if not found

Usage Note

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