Class WaitUntilOrTimeOut
A custom yield instruction that waits until a predicate is true or a timeout is reached.
Inherited Members
UnityEngine.CustomYieldInstruction.MoveNext()
UnityEngine.CustomYieldInstruction.Reset()
UnityEngine.CustomYieldInstruction.Current
Namespace: Unity.AppUI.Tests
Syntax
public class WaitUntilOrTimeOut : CustomYieldInstruction, IEnumerator
Constructors
WaitUntilOrTimeOut(Func<Boolean>, Boolean, Nullable<TimeSpan>, String, String, Int32)
Constructor.
Declaration
public WaitUntilOrTimeOut(Func<bool> predicate, bool failTestOnTimeout = true, TimeSpan? timeout = null, string callerMemberName = "", string callerFilePath = "", int callerLineNumber = 0)
Parameters
Type | Name | Description |
---|---|---|
Func<Boolean> | predicate | The predicate to wait for. |
Boolean | failTestOnTimeout | If true, the test will fail if the timeout is reached. |
Nullable<TimeSpan> | timeout | The timeout. |
String | callerMemberName | The name of the calling method. |
String | callerFilePath | The path of the calling file. |
Int32 | callerLineNumber | The line number of the calling method. |
Properties
keepWaiting
Returns true if the instruction should keep waiting.
Declaration
public override bool keepWaiting { get; }
Property Value
Type | Description |
---|---|
Boolean |