main
cs 79 lines 3.12 KB
Raw
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
3 namespace 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 NetFxNativeImage = new IntermediateSymbolDefinition(
11 NetfxSymbolDefinitionType.NetFxNativeImage.ToString(),
12 new[]
13 {
14 new IntermediateFieldDefinition(nameof(NetFxNativeImageSymbolFields.FileRef), IntermediateFieldType.String),
15 new IntermediateFieldDefinition(nameof(NetFxNativeImageSymbolFields.Priority), IntermediateFieldType.Number),
16 new IntermediateFieldDefinition(nameof(NetFxNativeImageSymbolFields.Attributes), IntermediateFieldType.Number),
17 new IntermediateFieldDefinition(nameof(NetFxNativeImageSymbolFields.ApplicationFileRef), IntermediateFieldType.String),
18 new IntermediateFieldDefinition(nameof(NetFxNativeImageSymbolFields.ApplicationBaseDirectoryRef), IntermediateFieldType.String),
19 },
20 typeof(NetFxNativeImageSymbol));
21 }
22 }
23
24 namespace WixToolset.Netfx.Symbols
25 {
26 using WixToolset.Data;
27
28 public enum NetFxNativeImageSymbolFields
29 {
30 FileRef,
31 Priority,
32 Attributes,
33 ApplicationFileRef,
34 ApplicationBaseDirectoryRef,
35 }
36
37 public class NetFxNativeImageSymbol : IntermediateSymbol
38 {
39 public NetFxNativeImageSymbol() : base(NetfxSymbolDefinitions.NetFxNativeImage, null, null)
40 {
41 }
42
43 public NetFxNativeImageSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(NetfxSymbolDefinitions.NetFxNativeImage, sourceLineNumber, id)
44 {
45 }
46
47 public IntermediateField this[NetFxNativeImageSymbolFields index] => this.Fields[(int)index];
48
49 public string FileRef
50 {
51 get => this.Fields[(int)NetFxNativeImageSymbolFields.FileRef].AsString();
52 set => this.Set((int)NetFxNativeImageSymbolFields.FileRef, value);
53 }
54
55 public int Priority
56 {
57 get => this.Fields[(int)NetFxNativeImageSymbolFields.Priority].AsNumber();
58 set => this.Set((int)NetFxNativeImageSymbolFields.Priority, value);
59 }
60
61 public int Attributes
62 {
63 get => this.Fields[(int)NetFxNativeImageSymbolFields.Attributes].AsNumber();
64 set => this.Set((int)NetFxNativeImageSymbolFields.Attributes, value);
65 }
66
67 public string ApplicationFileRef
68 {
69 get => this.Fields[(int)NetFxNativeImageSymbolFields.ApplicationFileRef].AsString();
70 set => this.Set((int)NetFxNativeImageSymbolFields.ApplicationFileRef, value);
71 }
72
73 public string ApplicationBaseDirectoryRef
74 {
75 get => this.Fields[(int)NetFxNativeImageSymbolFields.ApplicationBaseDirectoryRef].AsString();
76 set => this.Set((int)NetFxNativeImageSymbolFields.ApplicationBaseDirectoryRef, value);
77 }
78 }
79 }