forked from PHOENIXCONTACT/MORYX-Framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProductRecipe.cs
41 lines (35 loc) · 991 Bytes
/
ProductRecipe.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
// 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 to create instances of a product
/// </summary>
public class ProductRecipe : Recipe, IProductRecipe
{
/// <summary>
/// Create a new product recipe
/// </summary>
public ProductRecipe()
{
}
/// <summary>
/// Clone a product recipe
/// </summary>
protected ProductRecipe(ProductRecipe source)
: base(source)
{
Product = source.Product;
}
/// <inheritdoc />
public IProductType Product { get; set; }
/// <inheritdoc />
public virtual IProductType Target => Product;
/// <inheritdoc />
public override IRecipe Clone()
{
return new ProductRecipe(this);
}
}
}