From 69b15d96cebdbb7201b1849b4f62786633d70b8d Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Wed, 1 Nov 2017 10:56:09 -0700 Subject: Introduce WiX Intermediate Representation --- .../Tuples/WixBundlePatchTargetCodeTuple.cs | 60 ++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 src/WixToolset.Data/Tuples/WixBundlePatchTargetCodeTuple.cs (limited to 'src/WixToolset.Data/Tuples/WixBundlePatchTargetCodeTuple.cs') diff --git a/src/WixToolset.Data/Tuples/WixBundlePatchTargetCodeTuple.cs b/src/WixToolset.Data/Tuples/WixBundlePatchTargetCodeTuple.cs new file mode 100644 index 00000000..d34c0d2a --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixBundlePatchTargetCodeTuple.cs @@ -0,0 +1,60 @@ +// 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.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixBundlePatchTargetCode = new IntermediateTupleDefinition( + TupleDefinitionType.WixBundlePatchTargetCode, + new[] + { + new IntermediateFieldDefinition(nameof(WixBundlePatchTargetCodeTupleFields.PackageId), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundlePatchTargetCodeTupleFields.TargetCode), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundlePatchTargetCodeTupleFields.Attributes), IntermediateFieldType.Number), + }, + typeof(WixBundlePatchTargetCodeTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixBundlePatchTargetCodeTupleFields + { + PackageId, + TargetCode, + Attributes, + } + + public class WixBundlePatchTargetCodeTuple : IntermediateTuple + { + public WixBundlePatchTargetCodeTuple() : base(TupleDefinitions.WixBundlePatchTargetCode, null, null) + { + } + + public WixBundlePatchTargetCodeTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixBundlePatchTargetCode, sourceLineNumber, id) + { + } + + public IntermediateField this[WixBundlePatchTargetCodeTupleFields index] => this.Fields[(int)index]; + + public string PackageId + { + get => (string)this.Fields[(int)WixBundlePatchTargetCodeTupleFields.PackageId]?.Value; + set => this.Set((int)WixBundlePatchTargetCodeTupleFields.PackageId, value); + } + + public string TargetCode + { + get => (string)this.Fields[(int)WixBundlePatchTargetCodeTupleFields.TargetCode]?.Value; + set => this.Set((int)WixBundlePatchTargetCodeTupleFields.TargetCode, value); + } + + public int Attributes + { + get => (int)this.Fields[(int)WixBundlePatchTargetCodeTupleFields.Attributes]?.Value; + set => this.Set((int)WixBundlePatchTargetCodeTupleFields.Attributes, value); + } + } +} \ No newline at end of file -- cgit v1.2.3-55-g6feb