From d87492c97b5ac6eec1c86c4cc8b2b45e9f8ad165 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Wed, 24 Jun 2020 14:41:52 -0700 Subject: The Great Tuple to Symbol File Rename (tm) --- .../Symbols/ModuleSubstitutionSymbol.cs | 68 ++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 src/WixToolset.Data/Symbols/ModuleSubstitutionSymbol.cs (limited to 'src/WixToolset.Data/Symbols/ModuleSubstitutionSymbol.cs') diff --git a/src/WixToolset.Data/Symbols/ModuleSubstitutionSymbol.cs b/src/WixToolset.Data/Symbols/ModuleSubstitutionSymbol.cs new file mode 100644 index 00000000..50d615b0 --- /dev/null +++ b/src/WixToolset.Data/Symbols/ModuleSubstitutionSymbol.cs @@ -0,0 +1,68 @@ +// 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. + +namespace WixToolset.Data +{ + using WixToolset.Data.Symbols; + + public static partial class SymbolDefinitions + { + public static readonly IntermediateSymbolDefinition ModuleSubstitution = new IntermediateSymbolDefinition( + SymbolDefinitionType.ModuleSubstitution, + new[] + { + new IntermediateFieldDefinition(nameof(ModuleSubstitutionSymbolFields.Table), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ModuleSubstitutionSymbolFields.Row), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ModuleSubstitutionSymbolFields.Column), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ModuleSubstitutionSymbolFields.Value), IntermediateFieldType.String), + }, + typeof(ModuleSubstitutionSymbol)); + } +} + +namespace WixToolset.Data.Symbols +{ + public enum ModuleSubstitutionSymbolFields + { + Table, + Row, + Column, + Value, + } + + public class ModuleSubstitutionSymbol : IntermediateSymbol + { + public ModuleSubstitutionSymbol() : base(SymbolDefinitions.ModuleSubstitution, null, null) + { + } + + public ModuleSubstitutionSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.ModuleSubstitution, sourceLineNumber, id) + { + } + + public IntermediateField this[ModuleSubstitutionSymbolFields index] => this.Fields[(int)index]; + + public string Table + { + get => (string)this.Fields[(int)ModuleSubstitutionSymbolFields.Table]; + set => this.Set((int)ModuleSubstitutionSymbolFields.Table, value); + } + + public string Row + { + get => (string)this.Fields[(int)ModuleSubstitutionSymbolFields.Row]; + set => this.Set((int)ModuleSubstitutionSymbolFields.Row, value); + } + + public string Column + { + get => (string)this.Fields[(int)ModuleSubstitutionSymbolFields.Column]; + set => this.Set((int)ModuleSubstitutionSymbolFields.Column, value); + } + + public string Value + { + get => (string)this.Fields[(int)ModuleSubstitutionSymbolFields.Value]; + set => this.Set((int)ModuleSubstitutionSymbolFields.Value, value); + } + } +} \ No newline at end of file -- cgit v1.2.3-55-g6feb