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

Gets the component.

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

Syntax


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

Type Parameters

TComponent
The type of the t component.

Parameters

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

Return Value

IRenderedComponent<TComponent>.

Examples


Get FetchData component with Id 1234. />
C#
var comp = GetComponent<FetchData>(x => x.ComponentId == 1234));

Examples


Get FetchData instance property. />
C#
var comp = GetComponent<FetchData>(x => x.Instance.IsRunning));