IMockerBlazorTestHelpers<(Of <(<'T>)>)>..::..GetComponent<(Of <(<'TComponent>)>)> Method (Func<(Of <(<'IElement, Boolean>)>)>)

Gets the component.

Namespace:  FastMoq.Web.Blazor.Interfaces
Assembly:  FastMoq.Web (in FastMoq.Web.dll)

Syntax


IRenderedComponent<TComponent> GetComponent<TComponent>(
	Func<IElement, bool> predicate
)
where TComponent : IComponent, IComponent, IComponent
Function GetComponent(Of TComponent As {IComponent, IComponent, IComponent}) ( _
	predicate As Func(Of IElement, Boolean) _
) As IRenderedComponent(Of TComponent)
generic<typename TComponent>
where TComponent : IComponent, IComponent, IComponent
IRenderedComponent<TComponent>^ GetComponent(
	Func<IElement^, bool^>^ predicate
)

Type Parameters

TComponent
The type of the t component.

Parameters

predicate
Type: Func<(Of <(<'IElement, Boolean>)>)>
The predicate.

Return Value

IRenderedComponent<TComponent>.

Examples


Get FetchData component with inner html containing text. />
C#
var comp = GetComponent<FetchData>(element => element.InnerHtml.Contains("hello"));