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