ExtensionMethods::FindAncestor<TAncestorType, TElementType> Method (TElementType, Func<TElementType, TElementType>^)

 

Microsoft internal use only.

Namespace:   Microsoft.VisualStudio.PlatformUI
Assembly:  Microsoft.VisualStudio.Utilities (in Microsoft.VisualStudio.Utilities.dll)

public:
generic<typename TAncestorType, typename TElementType>
where TAncestorType : ref class
[ExtensionAttribute]
static TAncestorType FindAncestor(
	TElementType obj,
	Func<TElementType, TElementType>^ parentEvaluator
)

Parameters

obj
Type: TElementType

The object at which to begin searching.

parentEvaluator
Type: System::Func<TElementTypeTElementType>^

The method used to determine the parent of an element.

Return Value

Type: TAncestorType

Type Parameters

TAncestorType

The type of ancestor to find.

TElementType

The base type of intermediate elements in the ancestor tree.

Return to top
Show: