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

Gets the components.

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

Syntax


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

Type Parameters

TComponent
The type of the t of type.

Parameters

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

Return Value

List<IRenderedComponent<TComponent>>.

Examples


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

Examples


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