You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: build/MTConnect.NET-SysML-Import/CSharp/Templates/EnumOrStringDescriptions.scriban
+8-3Lines changed: 8 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,15 @@
1
1
// Copyright (c) 2024 TrakHound Inc., All Rights Reserved.
2
2
// TrakHound Inc. licenses this file to you under the MIT license.
3
+
{{-# Shape-B consolidated Descriptions template. Valid for every MTConnect version. #}}
4
+
{{-# Covers both the enum-descriptions and the string-constant-descriptions callers. #}}
5
+
{{-# When is_string is truthy, the Get(...) overload takes a `string value` and the #}}
6
+
{{-# class doc reads "string constant" instead of "value"; when falsy, the Get(...) #}}
7
+
{{-# overload takes an enum-typed value and the class doc reads "value". #}}
3
8
4
9
namespace {{namespace}}
5
10
{
6
11
/// <summary>
7
-
/// Description text for each <see cref="{{name}}"/> value as defined by the MTConnect Standard.
12
+
/// Description text for each <see cref="{{name}}"/> {{ if is_string }}string constant{{ else }}value{{ end }} as defined by the MTConnect Standard.
8
13
/// </summary>
9
14
public static class {{name}}Descriptions
10
15
{
@@ -21,9 +26,9 @@ namespace {{namespace}}
21
26
22
27
23
28
/// <summary>
24
-
/// Returns the MTConnect Standard description text for the specified<see cref="{{name}}"/> value, or <c>null</c> when none is defined.
29
+
/// Returns the MTConnect Standard description text for the specified{{ if is_string }}{{ else }} <see cref="{{name}}"/>{{ end }} value, or <c>null</c> when none is defined.
25
30
/// </summary>
26
-
public static string Get({{name}} value)
31
+
public static string Get({{ if is_string }}string{{ else }}{{name}}{{ end }} value)
0 commit comments