From 60d7baefb4e87bf0ddaae58a653faee0be0429f6 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Mon, 1 Jan 2018 10:30:42 -0800 Subject: Initial code commit --- src/wixext/Tuples/NetFxNativeImageTuple.cs | 65 ++++++++++++++++++++++++++++++ src/wixext/Tuples/NetfxTupleDefinitions.cs | 27 +++++++++++++ 2 files changed, 92 insertions(+) create mode 100644 src/wixext/Tuples/NetFxNativeImageTuple.cs create mode 100644 src/wixext/Tuples/NetfxTupleDefinitions.cs (limited to 'src/wixext/Tuples') diff --git a/src/wixext/Tuples/NetFxNativeImageTuple.cs b/src/wixext/Tuples/NetFxNativeImageTuple.cs new file mode 100644 index 00000000..af507137 --- /dev/null +++ b/src/wixext/Tuples/NetFxNativeImageTuple.cs @@ -0,0 +1,65 @@ +// 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.Netfx.Tuples +{ + using WixToolset.Data; + + public enum NetFxNativeImageTupleFields + { + NetFxNativeImage, + File_, + Priority, + Attributes, + File_Application, + Directory_ApplicationBase, + } + + public class NetFxNativeImageTuple : IntermediateTuple + { + public NetFxNativeImageTuple() : base(NetfxTupleDefinitions.NetFxNativeImage, null, null) + { + } + + public NetFxNativeImageTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(NetfxTupleDefinitions.NetFxNativeImage, sourceLineNumber, id) + { + } + + public IntermediateField this[NetFxNativeImageTupleFields index] => this.Fields[(int)index]; + + public string NetFxNativeImage + { + get => this.Fields[(int)NetFxNativeImageTupleFields.NetFxNativeImage].AsString(); + set => this.Set((int)NetFxNativeImageTupleFields.NetFxNativeImage, value); + } + + public string File_ + { + get => this.Fields[(int)NetFxNativeImageTupleFields.File_].AsString(); + set => this.Set((int)NetFxNativeImageTupleFields.File_, value); + } + + public int Priority + { + get => this.Fields[(int)NetFxNativeImageTupleFields.Priority].AsNumber(); + set => this.Set((int)NetFxNativeImageTupleFields.Priority, value); + } + + public int Attributes + { + get => this.Fields[(int)NetFxNativeImageTupleFields.Attributes].AsNumber(); + set => this.Set((int)NetFxNativeImageTupleFields.Attributes, value); + } + + public string File_Application + { + get => this.Fields[(int)NetFxNativeImageTupleFields.File_Application].AsString(); + set => this.Set((int)NetFxNativeImageTupleFields.File_Application, value); + } + + public string Directory_ApplicationBase + { + get => this.Fields[(int)NetFxNativeImageTupleFields.Directory_ApplicationBase].AsString(); + set => this.Set((int)NetFxNativeImageTupleFields.Directory_ApplicationBase, value); + } + } +} \ No newline at end of file diff --git a/src/wixext/Tuples/NetfxTupleDefinitions.cs b/src/wixext/Tuples/NetfxTupleDefinitions.cs new file mode 100644 index 00000000..aa584b38 --- /dev/null +++ b/src/wixext/Tuples/NetfxTupleDefinitions.cs @@ -0,0 +1,27 @@ +// 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.Netfx.Tuples +{ + using WixToolset.Data; + + public static class NetfxTupleDefinitionNames + { + public static string NetFxNativeImage { get; } = "NetFxNativeImage"; + } + + public static class NetfxTupleDefinitions + { + public static readonly IntermediateTupleDefinition NetFxNativeImage = new IntermediateTupleDefinition( + NetfxTupleDefinitionNames.NetFxNativeImage, + new[] + { + new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.NetFxNativeImage), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.File_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.Priority), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.Attributes), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.File_Application), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.Directory_ApplicationBase), IntermediateFieldType.String), + }, + typeof(NetFxNativeImageTuple)); + } +} -- cgit v1.2.3-55-g6feb