source/TestCommon/source/TestCommon/Awaiter.cs
/// <summary>
/// Completes when the "condition" returns true or
/// when the time limit is exceeded and a XUnitException is thrown.
/// </summary>
/// <param name="condition">Boolean condition that is checked.</param>
/// <param name="timeLimit">Time limit until exception is thrown</param>
/// <param name="delay">Delay between each check on the condition</param>
Completes when the "condition" returns true or
when the time limit is exceeded and a XUnitException is thrown.
Completes when the " condition " returns true or when the time limit is exceeded and a XUnitException is thrown .
public static async Task WaitUntilConditionAsync(Func<bool> condition, TimeSpan timeLimit, TimeSpan? delay = null)
        {
            if (!await TryWaitUntilConditionAsync(condition, timeLimit, delay))
            {
                throw new XunitException("Condition not reached before time limit.");
            }
        }
public static async Task WaitUntilConditionAsync ( Func < bool > condition , TimeSpan timeLimit , TimeSpan ? delay = null ) { if ( ! await TryWaitUntilConditionAsync ( condition , timeLimit , delay ) ) { throw new XunitException ( " " ) ; } }
Completes when the "condition" returns true or
when the time limit is exceeded and a XUnitException is thrown.
Completes when the " condition " returns true or when the time limit is exceeded and a XUnitException is thrown .
condition
Func<bool>
Boolean condition that is checked.
Boolean condition that is checked .
timeLimit
TimeSpan
Time limit until exception is thrown
Time limit until exception is thrown
delay
TimeSpan?
Delay between each check on the condition
Delay between each check on the condition