cs-codex-dist-tests/TestCore/NumberSource.cs

29 lines
561 B
C#
Raw Normal View History

2023-03-21 07:23:15 +00:00
namespace CodexDistTests.TestCore
{
public class NumberSource
{
private int freePort;
private int nodeOrderNumber;
public NumberSource()
{
freePort = 30001;
nodeOrderNumber = 0;
}
public int GetFreePort()
{
var port = freePort;
freePort++;
return port;
}
public int GetNodeOrderNumber()
{
var number = nodeOrderNumber;
nodeOrderNumber++;
return number;
}
}
}