main
cs 55 lines 1.86 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.Util
4 {
5 using WixToolset.Data;
6 using WixToolset.Util.Symbols;
7
8 public static partial class UtilSymbolDefinitions
9 {
10 public static readonly IntermediateSymbolDefinition EventManifest = new IntermediateSymbolDefinition(
11 UtilSymbolDefinitionType.EventManifest.ToString(),
12 new[]
13 {
14 new IntermediateFieldDefinition(nameof(EventManifestSymbolFields.ComponentRef), IntermediateFieldType.String),
15 new IntermediateFieldDefinition(nameof(EventManifestSymbolFields.File), IntermediateFieldType.String),
16 },
17 typeof(EventManifestSymbol));
18 }
19 }
20
21 namespace WixToolset.Util.Symbols
22 {
23 using WixToolset.Data;
24
25 public enum EventManifestSymbolFields
26 {
27 ComponentRef,
28 File,
29 }
30
31 public class EventManifestSymbol : IntermediateSymbol
32 {
33 public EventManifestSymbol() : base(UtilSymbolDefinitions.EventManifest, null, null)
34 {
35 }
36
37 public EventManifestSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(UtilSymbolDefinitions.EventManifest, sourceLineNumber, id)
38 {
39 }
40
41 public IntermediateField this[EventManifestSymbolFields index] => this.Fields[(int)index];
42
43 public string ComponentRef
44 {
45 get => this.Fields[(int)EventManifestSymbolFields.ComponentRef].AsString();
46 set => this.Set((int)EventManifestSymbolFields.ComponentRef, value);
47 }
48
49 public string File
50 {
51 get => this.Fields[(int)EventManifestSymbolFields.File].AsString();
52 set => this.Set((int)EventManifestSymbolFields.File, value);
53 }
54 }
55 }