summaryrefslogtreecommitdiff
path: root/src/ext/NetFx/wixext/Symbols
diff options
context:
space:
mode:
Diffstat (limited to 'src/ext/NetFx/wixext/Symbols')
-rw-r--r--src/ext/NetFx/wixext/Symbols/NetFxDotNetCompatibilityCheckSymbol.cs79
-rw-r--r--src/ext/NetFx/wixext/Symbols/NetfxSymbolDefinitions.cs6
2 files changed, 85 insertions, 0 deletions
diff --git a/src/ext/NetFx/wixext/Symbols/NetFxDotNetCompatibilityCheckSymbol.cs b/src/ext/NetFx/wixext/Symbols/NetFxDotNetCompatibilityCheckSymbol.cs
new file mode 100644
index 00000000..a46cf17f
--- /dev/null
+++ b/src/ext/NetFx/wixext/Symbols/NetFxDotNetCompatibilityCheckSymbol.cs
@@ -0,0 +1,79 @@
1// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
3namespace WixToolset.Netfx
4{
5 using WixToolset.Data;
6 using WixToolset.Netfx.Symbols;
7
8 public static partial class NetfxSymbolDefinitions
9 {
10 public static readonly IntermediateSymbolDefinition NetFxDotNetCompatibilityCheck = new IntermediateSymbolDefinition(
11 NetfxSymbolDefinitionType.NetFxDotNetCompatibilityCheck.ToString(),
12 new[]
13 {
14 new IntermediateFieldDefinition(nameof(NetFxDotNetCompatibilityCheckSymbollFields.RuntimeType), IntermediateFieldType.String),
15 new IntermediateFieldDefinition(nameof(NetFxDotNetCompatibilityCheckSymbollFields.Platform), IntermediateFieldType.String),
16 new IntermediateFieldDefinition(nameof(NetFxDotNetCompatibilityCheckSymbollFields.Version), IntermediateFieldType.String),
17 new IntermediateFieldDefinition(nameof(NetFxDotNetCompatibilityCheckSymbollFields.RollForward), IntermediateFieldType.String),
18 new IntermediateFieldDefinition(nameof(NetFxDotNetCompatibilityCheckSymbollFields.Property), IntermediateFieldType.String),
19 },
20 typeof(NetFxDotNetCompatibilityCheckSymbol));
21 }
22}
23
24namespace WixToolset.Netfx.Symbols
25{
26 using WixToolset.Data;
27
28 public enum NetFxDotNetCompatibilityCheckSymbollFields
29 {
30 RuntimeType,
31 Platform,
32 Version,
33 RollForward,
34 Property,
35 }
36
37 public class NetFxDotNetCompatibilityCheckSymbol : IntermediateSymbol
38 {
39 public NetFxDotNetCompatibilityCheckSymbol() : base(NetfxSymbolDefinitions.NetFxDotNetCompatibilityCheck, null, null)
40 {
41 }
42
43 public NetFxDotNetCompatibilityCheckSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(NetfxSymbolDefinitions.NetFxDotNetCompatibilityCheck, sourceLineNumber, id)
44 {
45 }
46
47 public IntermediateField this[NetFxDotNetCompatibilityCheckSymbollFields index] => this.Fields[(int)index];
48
49 public string RuntimeType
50 {
51 get => this.Fields[(int)NetFxDotNetCompatibilityCheckSymbollFields.RuntimeType].AsString();
52 set => this.Set((int)NetFxDotNetCompatibilityCheckSymbollFields.RuntimeType, value);
53 }
54
55 public string Platform
56 {
57 get => this.Fields[(int)NetFxDotNetCompatibilityCheckSymbollFields.Platform].AsString();
58 set => this.Set((int)NetFxDotNetCompatibilityCheckSymbollFields.Platform, value);
59 }
60
61 public string Version
62 {
63 get => this.Fields[(int)NetFxDotNetCompatibilityCheckSymbollFields.Version].AsString();
64 set => this.Set((int)NetFxDotNetCompatibilityCheckSymbollFields.Version, value);
65 }
66
67 public string RollForward
68 {
69 get => this.Fields[(int)NetFxDotNetCompatibilityCheckSymbollFields.RollForward].AsString();
70 set => this.Set((int)NetFxDotNetCompatibilityCheckSymbollFields.RollForward, value);
71 }
72
73 public string Property
74 {
75 get => this.Fields[(int)NetFxDotNetCompatibilityCheckSymbollFields.Property].AsString();
76 set => this.Set((int)NetFxDotNetCompatibilityCheckSymbollFields.Property, value);
77 }
78 }
79}
diff --git a/src/ext/NetFx/wixext/Symbols/NetfxSymbolDefinitions.cs b/src/ext/NetFx/wixext/Symbols/NetfxSymbolDefinitions.cs
index 862eba16..ad729dd4 100644
--- a/src/ext/NetFx/wixext/Symbols/NetfxSymbolDefinitions.cs
+++ b/src/ext/NetFx/wixext/Symbols/NetfxSymbolDefinitions.cs
@@ -10,10 +10,13 @@ namespace WixToolset.Netfx
10 { 10 {
11 NetFxNativeImage, 11 NetFxNativeImage,
12 NetFxNetCoreSearch, 12 NetFxNetCoreSearch,
13 NetFxDotNetCompatibilityCheck
13 } 14 }
14 15
15 public static partial class NetfxSymbolDefinitions 16 public static partial class NetfxSymbolDefinitions
16 { 17 {
18 public static readonly Version Version = new Version("4.0.0");
19
17 public static IntermediateSymbolDefinition ByName(string name) 20 public static IntermediateSymbolDefinition ByName(string name)
18 { 21 {
19 if (!Enum.TryParse(name, out NetfxSymbolDefinitionType type)) 22 if (!Enum.TryParse(name, out NetfxSymbolDefinitionType type))
@@ -33,6 +36,9 @@ namespace WixToolset.Netfx
33 36
34 case NetfxSymbolDefinitionType.NetFxNetCoreSearch: 37 case NetfxSymbolDefinitionType.NetFxNetCoreSearch:
35 return NetfxSymbolDefinitions.NetFxNetCoreSearch; 38 return NetfxSymbolDefinitions.NetFxNetCoreSearch;
39
40 case NetfxSymbolDefinitionType.NetFxDotNetCompatibilityCheck:
41 return NetfxSymbolDefinitions.NetFxDotNetCompatibilityCheck;
36 42
37 default: 43 default:
38 throw new ArgumentOutOfRangeException(nameof(type)); 44 throw new ArgumentOutOfRangeException(nameof(type));