-
Notifications
You must be signed in to change notification settings - Fork 24
/
ProductionRecipe.cs
46 lines (38 loc) · 1.24 KB
/
ProductionRecipe.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Copyright (c) 2023, Phoenix Contact GmbH & Co. KG
// Licensed under the Apache License, Version 2.0
using Moryx.AbstractionLayer.Products;
namespace Moryx.AbstractionLayer.Recipes
{
/// <summary>
/// Recipe which contains a workplan and product
/// </summary>
public class ProductionRecipe : WorkplanRecipe, IProductionRecipe
{
/// <inheritdoc />
public IProductType Product { get; set; }
/// <inheritdoc />
public virtual IProductType Target => Product;
/// <summary>
/// Prepare recipe by filling DisabledSteps and TaskAssignment properties
/// </summary>
public ProductionRecipe()
{
}
/// <summary>
/// Clone a production recipe
/// </summary>
protected ProductionRecipe(ProductionRecipe source)
: base(source)
{
Product = source.Product;
}
/// <summary>
/// Create a <see cref="ProductionProcess"/> for this recipe
/// </summary>
public override IProcess CreateProcess() =>
new ProductionProcess { Recipe = this };
/// <inheritdoc />
public override IRecipe Clone() =>
new ProductionRecipe(this);
}
}