AWSSDK_DotNet.IntegrationTests.Tests.Servlet.FindFreePort C# (CSharp) Method

FindFreePort() private static method

private static FindFreePort ( ) : int
return int
        private static int FindFreePort()
        {
            for (int i = 0; i < 10; i++)
            {
                int port = RandomPort();
                if (!_usedPorts.Contains(port) && !IsBusy(port))
                    return port;
            }
            throw new InvalidOperationException("Unable to find a free port after 10 tries");
        }
        private static int RandomPort()