ClassWaitAsync
Enables asynchronized waiting on custom conditions
Definition
Namespace:ArtOfTest.Common
Assembly:ArtOfTest.WebAii.dll
Syntax:
public class WaitAsync
Inheritance: objectWaitAsync
Derived Classes:
Constructors
WaitAsync(int, int)
Create a new WaitAsync object.
Properties
CheckInterval
Gets or sets the check interval for this wait object.
Methods
For<T, V>(Func<T, V, bool>, T, V, bool, int)
Wait for an action async. Attach to WaitCompleted to get notification when wait is completed
Declaration
public virtual void For<T, V>(Func<T, V, bool> func, T target, V custom, bool invertCondition, int timeout)
Parameters
func
The wait function delegate
target
T
The target object instance we are waiting on.
custom
V
The custom object instance to pass to the wait function.
invertCondition
True/false whether to invert the condition
timeout
The timeout to use.
For<T, V>(Func<T, V, bool>, T, V, bool, int, WaitResultType)
Declaration
public virtual void For<T, V>(Func<T, V, bool> func, T target, V custom, bool invertCondition, int timeout, WaitResultType errorResultType)
Parameters
func
target
T
custom
V
invertCondition
timeout
errorResultType
For<T>(Predicate<T>, T, bool, int)
Wait for an action async. Attach to WaitCompleted to get notification when wait is completed
Declaration
public virtual void For<T>(Predicate<T> predicate, T target, bool invertCondition, int timeout)
Parameters
predicate
Predicate<T>
The function delegate
target
T
The actual target object instance
invertCondition
Whether to invert the condition
timeout
The timeout to use.
For<T>(Predicate<T>, T, bool, int, WaitResultType)
Declaration
public virtual void For<T>(Predicate<T> predicate, T target, bool invertCondition, int timeout, WaitResultType errorResultType)
Parameters
predicate
Predicate<T>
target
T
invertCondition
timeout
errorResultType
OnWaitComplete(WaitCompleteEventArgs)
Invoke the wait complete event.
Declaration
protected void OnWaitComplete(WaitCompleteEventArgs args)
Parameters
args
WaitCompleteEventArgs
Events
WaitCompleted
Triggered when the wait operation is completed
Declaration
public event EventHandler<WaitCompleteEventArgs> WaitCompleted
Event Value