2021-11-20 13:52:28 +01:00
|
|
|
namespace zero.Architecture;
|
2021-11-19 14:59:24 +01:00
|
|
|
|
2021-11-24 15:49:25 +01:00
|
|
|
public class BlueprintOptions : List<Blueprint>
|
2021-11-19 14:59:24 +01:00
|
|
|
{
|
2021-11-24 15:49:25 +01:00
|
|
|
public bool Enabled { get; set; } = false;
|
2021-11-19 14:59:24 +01:00
|
|
|
|
|
|
|
|
public void Add<T>() where T : Blueprint, new()
|
|
|
|
|
{
|
2021-12-15 15:34:05 +01:00
|
|
|
base.Add(new T());
|
2021-11-19 14:59:24 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Add<T>(Blueprint<T> implementation) where T : ZeroEntity, new()
|
|
|
|
|
{
|
2021-12-15 15:34:05 +01:00
|
|
|
base.Add(implementation);
|
2021-11-19 14:59:24 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Add<T>(Action<Blueprint<T>> createExpression = null) where T : ZeroEntity, new()
|
|
|
|
|
{
|
2021-12-15 15:34:05 +01:00
|
|
|
base.Add(new DefaultBlueprint<T>(createExpression));
|
2021-11-19 14:59:24 +01:00
|
|
|
}
|
|
|
|
|
}
|