Waits indefinitely for an event of type T. When an event arrives, checkEventFunc is called, passing the event. If checkEventFunc returns true then the event is returned, otherwise it continues to wait.

Namespace: BaseLib
Assembly: BaseLib (in BaseLib.dll) Version: 0.5.0.0

Syntax

C#
T WaitFor<T>(
	Func<T, bool> checkEventFunc
)
where T : EventBase

Parameters

checkEventFunc
Type: System..::..Func<(Of <(<'T, Boolean>)>)>
Function to filter the events matching type T. You can use a filter function to make sure the event has properties you want.

Type Parameters

T
The type of the event to wait for.

Return Value

The event that matches type T and causes checkEventFunc to return true.

See Also