dotnet-installer/test/Microsoft.DotNet.Tools.Tests.Utilities/NetworkUtils/PortManager.cs
Sridhar Periyasamy dbb25d8fb3 Get free port starting from 8001 instead of using TcpListener.
Enable kestrel tests to run in parallel.
2016-04-05 14:16:12 -07:00

16 lines
334 B
C#

using System;
using System.Collections.Generic;
using System.Threading;
namespace Microsoft.DotNet.Tools.Test.Utilities
{
public static class PortManager
{
private static int s_nextPort = 8001;
public static int GetPort()
{
return Interlocked.Increment(ref s_nextPort);
}
}
}