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/FeatureComponentsSymbol.cs | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 src/WixToolset.Data/Symbols/FeatureComponentsSymbol.cs (limited to 'src/WixToolset.Data/Symbols/FeatureComponentsSymbol.cs') diff --git a/src/WixToolset.Data/Symbols/FeatureComponentsSymbol.cs b/src/WixToolset.Data/Symbols/FeatureComponentsSymbol.cs new file mode 100644 index 00000000..af51daed --- /dev/null +++ b/src/WixToolset.Data/Symbols/FeatureComponentsSymbol.cs @@ -0,0 +1,52 @@ +// 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 FeatureComponents = new IntermediateSymbolDefinition( + SymbolDefinitionType.FeatureComponents, + new[] + { + new IntermediateFieldDefinition(nameof(FeatureComponentsSymbolFields.FeatureRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(FeatureComponentsSymbolFields.ComponentRef), IntermediateFieldType.String), + }, + typeof(FeatureComponentsSymbol)); + } +} + +namespace WixToolset.Data.Symbols +{ + public enum FeatureComponentsSymbolFields + { + FeatureRef, + ComponentRef, + } + + public class FeatureComponentsSymbol : IntermediateSymbol + { + public FeatureComponentsSymbol() : base(SymbolDefinitions.FeatureComponents, null, null) + { + } + + public FeatureComponentsSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.FeatureComponents, sourceLineNumber, id) + { + } + + public IntermediateField this[FeatureComponentsSymbolFields index] => this.Fields[(int)index]; + + public string FeatureRef + { + get => (string)this.Fields[(int)FeatureComponentsSymbolFields.FeatureRef]; + set => this.Set((int)FeatureComponentsSymbolFields.FeatureRef, value); + } + + public string ComponentRef + { + get => (string)this.Fields[(int)FeatureComponentsSymbolFields.ComponentRef]; + set => this.Set((int)FeatureComponentsSymbolFields.ComponentRef, value); + } + } +} \ No newline at end of file -- cgit v1.2.3-55-g6feb