summaryrefslogtreecommitdiff
path: root/src/ext/NetFx/wixext/Symbols
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2021-05-03 16:05:08 -0700
committerRob Mensching <rob@firegiant.com>2021-05-03 16:05:08 -0700
commit7bdd5e9159b298e0411afa689a06c44e36e293cd (patch)
tree57d24ea7fdd8025baf6a822a99b588c9df74a60d /src/ext/NetFx/wixext/Symbols
parentca02e81316d700a3647414f355eab4d2115d6163 (diff)
downloadwix-7bdd5e9159b298e0411afa689a06c44e36e293cd.tar.gz
wix-7bdd5e9159b298e0411afa689a06c44e36e293cd.tar.bz2
wix-7bdd5e9159b298e0411afa689a06c44e36e293cd.zip
Move NetFx.wixext into ext
Diffstat (limited to 'src/ext/NetFx/wixext/Symbols')
-rw-r--r--src/ext/NetFx/wixext/Symbols/NetFxNativeImageSymbol.cs58
-rw-r--r--src/ext/NetFx/wixext/Symbols/NetfxSymbolDefinitions.cs26
2 files changed, 84 insertions, 0 deletions
diff --git a/src/ext/NetFx/wixext/Symbols/NetFxNativeImageSymbol.cs b/src/ext/NetFx/wixext/Symbols/NetFxNativeImageSymbol.cs
new file mode 100644
index 00000000..3803abd6
--- /dev/null
+++ b/src/ext/NetFx/wixext/Symbols/NetFxNativeImageSymbol.cs
@@ -0,0 +1,58 @@
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.Symbols
4{
5 using WixToolset.Data;
6
7 public enum NetFxNativeImageSymbolFields
8 {
9 FileRef,
10 Priority,
11 Attributes,
12 ApplicationFileRef,
13 ApplicationBaseDirectoryRef,
14 }
15
16 public class NetFxNativeImageSymbol : IntermediateSymbol
17 {
18 public NetFxNativeImageSymbol() : base(NetfxSymbolDefinitions.NetFxNativeImage, null, null)
19 {
20 }
21
22 public NetFxNativeImageSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(NetfxSymbolDefinitions.NetFxNativeImage, sourceLineNumber, id)
23 {
24 }
25
26 public IntermediateField this[NetFxNativeImageSymbolFields index] => this.Fields[(int)index];
27
28 public string FileRef
29 {
30 get => this.Fields[(int)NetFxNativeImageSymbolFields.FileRef].AsString();
31 set => this.Set((int)NetFxNativeImageSymbolFields.FileRef, value);
32 }
33
34 public int Priority
35 {
36 get => this.Fields[(int)NetFxNativeImageSymbolFields.Priority].AsNumber();
37 set => this.Set((int)NetFxNativeImageSymbolFields.Priority, value);
38 }
39
40 public int Attributes
41 {
42 get => this.Fields[(int)NetFxNativeImageSymbolFields.Attributes].AsNumber();
43 set => this.Set((int)NetFxNativeImageSymbolFields.Attributes, value);
44 }
45
46 public string ApplicationFileRef
47 {
48 get => this.Fields[(int)NetFxNativeImageSymbolFields.ApplicationFileRef].AsString();
49 set => this.Set((int)NetFxNativeImageSymbolFields.ApplicationFileRef, value);
50 }
51
52 public string ApplicationBaseDirectoryRef
53 {
54 get => this.Fields[(int)NetFxNativeImageSymbolFields.ApplicationBaseDirectoryRef].AsString();
55 set => this.Set((int)NetFxNativeImageSymbolFields.ApplicationBaseDirectoryRef, value);
56 }
57 }
58} \ No newline at end of file
diff --git a/src/ext/NetFx/wixext/Symbols/NetfxSymbolDefinitions.cs b/src/ext/NetFx/wixext/Symbols/NetfxSymbolDefinitions.cs
new file mode 100644
index 00000000..3c0f1176
--- /dev/null
+++ b/src/ext/NetFx/wixext/Symbols/NetfxSymbolDefinitions.cs
@@ -0,0 +1,26 @@
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.Symbols
4{
5 using WixToolset.Data;
6
7 public static class NetfxSymbolDefinitionNames
8 {
9 public static string NetFxNativeImage { get; } = "NetFxNativeImage";
10 }
11
12 public static class NetfxSymbolDefinitions
13 {
14 public static readonly IntermediateSymbolDefinition NetFxNativeImage = new IntermediateSymbolDefinition(
15 NetfxSymbolDefinitionNames.NetFxNativeImage,
16 new[]
17 {
18 new IntermediateFieldDefinition(nameof(NetFxNativeImageSymbolFields.FileRef), IntermediateFieldType.String),
19 new IntermediateFieldDefinition(nameof(NetFxNativeImageSymbolFields.Priority), IntermediateFieldType.Number),
20 new IntermediateFieldDefinition(nameof(NetFxNativeImageSymbolFields.Attributes), IntermediateFieldType.Number),
21 new IntermediateFieldDefinition(nameof(NetFxNativeImageSymbolFields.ApplicationFileRef), IntermediateFieldType.String),
22 new IntermediateFieldDefinition(nameof(NetFxNativeImageSymbolFields.ApplicationBaseDirectoryRef), IntermediateFieldType.String),
23 },
24 typeof(NetFxNativeImageSymbol));
25 }
26}