aboutsummaryrefslogtreecommitdiff
path: root/src/api/wix/WixToolset.Data/Symbols/WixCustomTableSymbol.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/wix/WixToolset.Data/Symbols/WixCustomTableSymbol.cs')
-rw-r--r--src/api/wix/WixToolset.Data/Symbols/WixCustomTableSymbol.cs56
1 files changed, 56 insertions, 0 deletions
diff --git a/src/api/wix/WixToolset.Data/Symbols/WixCustomTableSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/WixCustomTableSymbol.cs
new file mode 100644
index 00000000..af731443
--- /dev/null
+++ b/src/api/wix/WixToolset.Data/Symbols/WixCustomTableSymbol.cs
@@ -0,0 +1,56 @@
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 WixCustomTable = new IntermediateSymbolDefinition(
10 SymbolDefinitionType.WixCustomTable,
11 new[]
12 {
13 new IntermediateFieldDefinition(nameof(WixCustomTableSymbolFields.ColumnNames), IntermediateFieldType.String),
14 new IntermediateFieldDefinition(nameof(WixCustomTableSymbolFields.Unreal), IntermediateFieldType.Bool),
15 },
16 typeof(WixCustomTableSymbol));
17 }
18}
19
20namespace WixToolset.Data.Symbols
21{
22 public enum WixCustomTableSymbolFields
23 {
24 ColumnNames,
25 Unreal,
26 }
27
28 public class WixCustomTableSymbol : IntermediateSymbol
29 {
30 public const char ColumnNamesSeparator = '\x85';
31
32 public WixCustomTableSymbol() : base(SymbolDefinitions.WixCustomTable, null, null)
33 {
34 }
35
36 public WixCustomTableSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.WixCustomTable, sourceLineNumber, id)
37 {
38 }
39
40 public IntermediateField this[WixCustomTableSymbolFields index] => this.Fields[(int)index];
41
42 public string ColumnNames
43 {
44 get => (string)this.Fields[(int)WixCustomTableSymbolFields.ColumnNames];
45 set => this.Set((int)WixCustomTableSymbolFields.ColumnNames, value);
46 }
47
48 public bool Unreal
49 {
50 get => (bool)this.Fields[(int)WixCustomTableSymbolFields.Unreal];
51 set => this.Set((int)WixCustomTableSymbolFields.Unreal, value);
52 }
53
54 public string[] ColumnNamesSeparated => this.ColumnNames.Split(ColumnNamesSeparator);
55 }
56}