aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Data/Symbols/ListViewSymbol.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/WixToolset.Data/Symbols/ListViewSymbol.cs')
-rw-r--r--src/WixToolset.Data/Symbols/ListViewSymbol.cs76
1 files changed, 76 insertions, 0 deletions
diff --git a/src/WixToolset.Data/Symbols/ListViewSymbol.cs b/src/WixToolset.Data/Symbols/ListViewSymbol.cs
new file mode 100644
index 00000000..09543ab1
--- /dev/null
+++ b/src/WixToolset.Data/Symbols/ListViewSymbol.cs
@@ -0,0 +1,76 @@
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 ListView = new IntermediateSymbolDefinition(
10 SymbolDefinitionType.ListView,
11 new[]
12 {
13 new IntermediateFieldDefinition(nameof(ListViewSymbolFields.Property), IntermediateFieldType.String),
14 new IntermediateFieldDefinition(nameof(ListViewSymbolFields.Order), IntermediateFieldType.Number),
15 new IntermediateFieldDefinition(nameof(ListViewSymbolFields.Value), IntermediateFieldType.String),
16 new IntermediateFieldDefinition(nameof(ListViewSymbolFields.Text), IntermediateFieldType.String),
17 new IntermediateFieldDefinition(nameof(ListViewSymbolFields.BinaryRef), IntermediateFieldType.String),
18 },
19 typeof(ListViewSymbol));
20 }
21}
22
23namespace WixToolset.Data.Symbols
24{
25 public enum ListViewSymbolFields
26 {
27 Property,
28 Order,
29 Value,
30 Text,
31 BinaryRef,
32 }
33
34 public class ListViewSymbol : IntermediateSymbol
35 {
36 public ListViewSymbol() : base(SymbolDefinitions.ListView, null, null)
37 {
38 }
39
40 public ListViewSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.ListView, sourceLineNumber, id)
41 {
42 }
43
44 public IntermediateField this[ListViewSymbolFields index] => this.Fields[(int)index];
45
46 public string Property
47 {
48 get => (string)this.Fields[(int)ListViewSymbolFields.Property];
49 set => this.Set((int)ListViewSymbolFields.Property, value);
50 }
51
52 public int Order
53 {
54 get => (int)this.Fields[(int)ListViewSymbolFields.Order];
55 set => this.Set((int)ListViewSymbolFields.Order, value);
56 }
57
58 public string Value
59 {
60 get => (string)this.Fields[(int)ListViewSymbolFields.Value];
61 set => this.Set((int)ListViewSymbolFields.Value, value);
62 }
63
64 public string Text
65 {
66 get => (string)this.Fields[(int)ListViewSymbolFields.Text];
67 set => this.Set((int)ListViewSymbolFields.Text, value);
68 }
69
70 public string BinaryRef
71 {
72 get => (string)this.Fields[(int)ListViewSymbolFields.BinaryRef];
73 set => this.Set((int)ListViewSymbolFields.BinaryRef, value);
74 }
75 }
76} \ No newline at end of file