source/TestCommon/source/FunctionApp.TestCommon/FunctionAppHost/HostStartedOutputListener.cs
/// <summary>
/// Validate if Host is started and ready within timeout.
/// </summary>
/// <param name="timeout">Represents the max. time to wait for the Host to be ready.</param>
/// <returns>True if the Host is started and ready to serve; otherwise, false.</returns>
Validate if Host is started and ready within timeout.
Validate if Host is started and ready within timeout .
public bool WaitForStarted(TimeSpan timeout)
        {
            var isHostStarted = StartedWaitHandle.Wait(timeout);
            WaitForStartedEvent = false;
            Process.OutputDataReceived -= OnListenForStartedEvent;
            StartedWaitHandle.Dispose();
            return isHostStarted;
        }
public bool WaitForStarted ( TimeSpan timeout ) { var isHostStarted = StartedWaitHandle . Wait ( timeout ) ; WaitForStartedEvent = false ; Process . OutputDataReceived -= OnListenForStartedEvent ; StartedWaitHandle . Dispose ( ) ; return isHostStarted ; }
Validate if Host is started and ready within timeout.
Validate if Host is started and ready within timeout .
// Cleanup
True if the Host is started and ready to serve; otherwise, false.
True if the Host is started and ready to serve ; otherwise false .
timeout
TimeSpan
Represents the max. time to wait for the Host to be ready.
Represents the max . time to wait for the Host to be ready .