main
cs 68 lines 2.5 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.Data
4 {
5 using WixToolset.Data.Symbols;
6
7 public static partial class SymbolDefinitions
8 {
9 public static readonly IntermediateSymbolDefinition ModuleSubstitution = new IntermediateSymbolDefinition(
10 SymbolDefinitionType.ModuleSubstitution,
11 new[]
12 {
13 new IntermediateFieldDefinition(nameof(ModuleSubstitutionSymbolFields.Table), IntermediateFieldType.String),
14 new IntermediateFieldDefinition(nameof(ModuleSubstitutionSymbolFields.Row), IntermediateFieldType.String),
15 new IntermediateFieldDefinition(nameof(ModuleSubstitutionSymbolFields.Column), IntermediateFieldType.String),
16 new IntermediateFieldDefinition(nameof(ModuleSubstitutionSymbolFields.Value), IntermediateFieldType.String),
17 },
18 typeof(ModuleSubstitutionSymbol));
19 }
20 }
21
22 namespace WixToolset.Data.Symbols
23 {
24 public enum ModuleSubstitutionSymbolFields
25 {
26 Table,
27 Row,
28 Column,
29 Value,
30 }
31
32 public class ModuleSubstitutionSymbol : IntermediateSymbol
33 {
34 public ModuleSubstitutionSymbol() : base(SymbolDefinitions.ModuleSubstitution, null, null)
35 {
36 }
37
38 public ModuleSubstitutionSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.ModuleSubstitution, sourceLineNumber, id)
39 {
40 }
41
42 public IntermediateField this[ModuleSubstitutionSymbolFields index] => this.Fields[(int)index];
43
44 public string Table
45 {
46 get => (string)this.Fields[(int)ModuleSubstitutionSymbolFields.Table];
47 set => this.Set((int)ModuleSubstitutionSymbolFields.Table, value);
48 }
49
50 public string Row
51 {
52 get => (string)this.Fields[(int)ModuleSubstitutionSymbolFields.Row];
53 set => this.Set((int)ModuleSubstitutionSymbolFields.Row, value);
54 }
55
56 public string Column
57 {
58 get => (string)this.Fields[(int)ModuleSubstitutionSymbolFields.Column];
59 set => this.Set((int)ModuleSubstitutionSymbolFields.Column, value);
60 }
61
62 public string Value
63 {
64 get => (string)this.Fields[(int)ModuleSubstitutionSymbolFields.Value];
65 set => this.Set((int)ModuleSubstitutionSymbolFields.Value, value);
66 }
67 }
68 }