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