mirror of
https://github.com/vacp2p/cs-codex-dist-tests.git
synced 2025-02-24 00:08:22 +00:00
25 lines
598 B
C#
25 lines
598 B
C#
|
using System.Globalization;
|
|||
|
|
|||
|
namespace KubernetesWorkflow
|
|||
|
{
|
|||
|
public class RecipeComponentFactory
|
|||
|
{
|
|||
|
private NumberSource portNumberSource = new NumberSource(8080);
|
|||
|
|
|||
|
public Port CreatePort()
|
|||
|
{
|
|||
|
return new Port(portNumberSource.GetNextNumber());
|
|||
|
}
|
|||
|
|
|||
|
public EnvVar CreateEnvVar(string name, int value)
|
|||
|
{
|
|||
|
return CreateEnvVar(name, value.ToString(CultureInfo.InvariantCulture));
|
|||
|
}
|
|||
|
|
|||
|
public EnvVar CreateEnvVar(string name, string value)
|
|||
|
{
|
|||
|
return new EnvVar(name, value);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|