-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathInternalExtensions.cs
More file actions
54 lines (48 loc) · 1.73 KB
/
Copy pathInternalExtensions.cs
File metadata and controls
54 lines (48 loc) · 1.73 KB
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
47
48
49
50
51
52
53
54
// Copyright (c) 2026 Phoenix Contact GmbH & Co. KG
// Licensed under the Apache License, Version 2.0
using Moryx.AbstractionLayer.Products;
using Moryx.AbstractionLayer.Recipes;
using Moryx.Workplans;
namespace Moryx.Products.Management;
/// <summary>
/// Extensions for the <see cref="ProductType"/>
/// </summary>
internal static class InternalExtensions
{
/// <summary>
/// Returns the string representation of the product type
/// </summary>
/// <param name="productType">Source product type</param>
/// <returns>Type identifier as string</returns>
public static string ProductTypeName(this ProductType productType)
{
return productType.GetType().FullName;
}
/// <summary>
/// Returns the string representation of the recipe type
/// </summary>
/// <param name="recipe">Source recipe</param>
/// <returns>Type identifier as string</returns>
public static string RecipeTypeName(this IRecipe recipe)
{
return recipe.GetType().FullName;
}
/// <summary>
/// Returns the string representation of the workplan step type
/// </summary>
/// <param name="workplanStep">Source Workplan-step</param>
/// <returns>Type identifier as string</returns>
public static string WorkplanStepTypeName(this IWorkplanStep workplanStep)
{
return workplanStep.GetType().FullName;
}
/// <summary>
/// Returns the string representation of the product instance type
/// </summary>
/// <param name="productInstance">Source product instance</param>
/// <returns>Type identifier as string</returns>
public static string ProductInstanceTypeName(this ProductInstance productInstance)
{
return productInstance.GetType().FullName;
}
}