cs-codex-dist-tests/KubernetesWorkflow/WorkflowNumberSource.cs

30 lines
832 B
C#
Raw Normal View History

using Utils;
namespace KubernetesWorkflow
{
public class WorkflowNumberSource
{
private readonly NumberSource servicePortNumberSource;
2023-04-13 09:07:36 +00:00
private readonly NumberSource containerNumberSource;
2023-04-13 09:07:36 +00:00
public WorkflowNumberSource(int workflowNumber, NumberSource servicePortNumberSource, NumberSource containerNumberSource)
{
WorkflowNumber = workflowNumber;
this.servicePortNumberSource = servicePortNumberSource;
2023-04-13 09:07:36 +00:00
this.containerNumberSource = containerNumberSource;
}
public int WorkflowNumber { get; }
public int GetContainerNumber()
{
return containerNumberSource.GetNextNumber();
}
public int GetServicePort()
{
return servicePortNumberSource.GetNextNumber();
}
}
}