aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Data/Symbols/EventMappingSymbol.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/WixToolset.Data/Symbols/EventMappingSymbol.cs')
-rw-r--r--src/WixToolset.Data/Symbols/EventMappingSymbol.cs68
1 files changed, 68 insertions, 0 deletions
diff --git a/src/WixToolset.Data/Symbols/EventMappingSymbol.cs b/src/WixToolset.Data/Symbols/EventMappingSymbol.cs
new file mode 100644
index 00000000..fec7be3b
--- /dev/null
+++ b/src/WixToolset.Data/Symbols/EventMappingSymbol.cs
@@ -0,0 +1,68 @@
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.Data
4{
5 using WixToolset.Data.Symbols;
6
7 public static partial class SymbolDefinitions
8 {
9 public static readonly IntermediateSymbolDefinition EventMapping = new IntermediateSymbolDefinition(
10 SymbolDefinitionType.EventMapping,
11 new[]
12 {
13 new IntermediateFieldDefinition(nameof(EventMappingSymbolFields.DialogRef), IntermediateFieldType.String),
14 new IntermediateFieldDefinition(nameof(EventMappingSymbolFields.ControlRef), IntermediateFieldType.String),
15 new IntermediateFieldDefinition(nameof(EventMappingSymbolFields.Event), IntermediateFieldType.String),
16 new IntermediateFieldDefinition(nameof(EventMappingSymbolFields.Attribute), IntermediateFieldType.String),
17 },
18 typeof(EventMappingSymbol));
19 }
20}
21
22namespace WixToolset.Data.Symbols
23{
24 public enum EventMappingSymbolFields
25 {
26 DialogRef,
27 ControlRef,
28 Event,
29 Attribute,
30 }
31
32 public class EventMappingSymbol : IntermediateSymbol
33 {
34 public EventMappingSymbol() : base(SymbolDefinitions.EventMapping, null, null)
35 {
36 }
37
38 public EventMappingSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.EventMapping, sourceLineNumber, id)
39 {
40 }
41
42 public IntermediateField this[EventMappingSymbolFields index] => this.Fields[(int)index];
43
44 public string DialogRef
45 {
46 get => (string)this.Fields[(int)EventMappingSymbolFields.DialogRef];
47 set => this.Set((int)EventMappingSymbolFields.DialogRef, value);
48 }
49
50 public string ControlRef
51 {
52 get => (string)this.Fields[(int)EventMappingSymbolFields.ControlRef];
53 set => this.Set((int)EventMappingSymbolFields.ControlRef, value);
54 }
55
56 public string Event
57 {
58 get => (string)this.Fields[(int)EventMappingSymbolFields.Event];
59 set => this.Set((int)EventMappingSymbolFields.Event, value);
60 }
61
62 public string Attribute
63 {
64 get => (string)this.Fields[(int)EventMappingSymbolFields.Attribute];
65 set => this.Set((int)EventMappingSymbolFields.Attribute, value);
66 }
67 }
68} \ No newline at end of file