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

Gets the component.

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

Syntax


public IRenderedComponent<TComponent> GetComponent<TComponent>(
	Func<IRenderedComponent<TComponent>, bool> predicate
)
where TComponent : IComponent, IComponent, IComponent
Public Function GetComponent(Of TComponent As {IComponent, IComponent, IComponent}) ( _
	predicate As Func(Of IRenderedComponent(Of TComponent), Boolean) _
) As IRenderedComponent(Of TComponent)
public:
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));