MockerTestBase<(Of <(<'TComponent>)>)>..::..WaitFor<(Of <(<'T>)>)> Method (Func<(Of <(<'T>)>)>, TimeSpan, TimeSpan)

Waits for an action.

Namespace:  FastMoq
Assembly:  FastMoq.Core (in FastMoq.Core.dll)

Syntax


public static T WaitFor<T>(
	Func<T> logic,
	TimeSpan timespan,
	TimeSpan waitBetweenChecks
)
Public Shared Function WaitFor(Of T) ( _
	logic As Func(Of T), _
	timespan As TimeSpan, _
	waitBetweenChecks As TimeSpan _
) As T
public:
generic<typename T>
static T WaitFor(
	Func<T>^ logic, 
	TimeSpan^ timespan, 
	TimeSpan^ waitBetweenChecks
)

Type Parameters

T
Logic of T.

Parameters

logic
Type: Func<(Of <(<'T>)>)>
The action.
timespan
Type: TimeSpan
The maximum time to wait.
waitBetweenChecks
Type: TimeSpan
Time between each check.

Return Value

T.

Exceptions


ExceptionCondition
ArgumentNullExceptionlogic
ApplicationExceptionTimeout waiting for condition