// 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 Shortcut = new IntermediateTupleDefinition( TupleDefinitionType.Shortcut, new[] { new IntermediateFieldDefinition(nameof(ShortcutTupleFields.DirectoryRef), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(ShortcutTupleFields.Name), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(ShortcutTupleFields.ShortName), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(ShortcutTupleFields.ComponentRef), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(ShortcutTupleFields.Target), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(ShortcutTupleFields.Arguments), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(ShortcutTupleFields.Description), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(ShortcutTupleFields.Hotkey), IntermediateFieldType.Number), new IntermediateFieldDefinition(nameof(ShortcutTupleFields.IconRef), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(ShortcutTupleFields.IconIndex), IntermediateFieldType.Number), new IntermediateFieldDefinition(nameof(ShortcutTupleFields.Show), IntermediateFieldType.Number), new IntermediateFieldDefinition(nameof(ShortcutTupleFields.WkDir), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(ShortcutTupleFields.DisplayResourceDLL), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(ShortcutTupleFields.DisplayResourceId), IntermediateFieldType.Number), new IntermediateFieldDefinition(nameof(ShortcutTupleFields.DescriptionResourceDLL), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(ShortcutTupleFields.DescriptionResourceId), IntermediateFieldType.Number), }, typeof(ShortcutTuple)); } } namespace WixToolset.Data.Tuples { public enum ShortcutTupleFields { DirectoryRef, Name, ShortName, ComponentRef, Target, Arguments, Description, Hotkey, IconRef, IconIndex, Show, WkDir, DisplayResourceDLL, DisplayResourceId, DescriptionResourceDLL, DescriptionResourceId, } public enum ShortcutShowType { Normal = 1, Maximized = 3, Minimized = 7 } public class ShortcutTuple : IntermediateTuple { public ShortcutTuple() : base(TupleDefinitions.Shortcut, null, null) { } public ShortcutTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.Shortcut, sourceLineNumber, id) { } public IntermediateField this[ShortcutTupleFields index] => this.Fields[(int)index]; public string DirectoryRef { get => (string)this.Fields[(int)ShortcutTupleFields.DirectoryRef]; set => this.Set((int)ShortcutTupleFields.DirectoryRef, value); } public string Name { get => (string)this.Fields[(int)ShortcutTupleFields.Name]; set => this.Set((int)ShortcutTupleFields.Name, value); } public string ShortName { get => (string)this.Fields[(int)ShortcutTupleFields.ShortName]; set => this.Set((int)ShortcutTupleFields.ShortName, value); } public string ComponentRef { get => (string)this.Fields[(int)ShortcutTupleFields.ComponentRef]; set => this.Set((int)ShortcutTupleFields.ComponentRef, value); } public string Target { get => (string)this.Fields[(int)ShortcutTupleFields.Target]; set => this.Set((int)ShortcutTupleFields.Target, value); } public string Arguments { get => (string)this.Fields[(int)ShortcutTupleFields.Arguments]; set => this.Set((int)ShortcutTupleFields.Arguments, value); } public string Description { get => (string)this.Fields[(int)ShortcutTupleFields.Description]; set => this.Set((int)ShortcutTupleFields.Description, value); } public int? Hotkey { get => this.Fields[(int)ShortcutTupleFields.Hotkey].AsNullableNumber(); set => this.Set((int)ShortcutTupleFields.Hotkey, value); } public string IconRef { get => (string)this.Fields[(int)ShortcutTupleFields.IconRef]; set => this.Set((int)ShortcutTupleFields.IconRef, value); } public int? IconIndex { get => this.Fields[(int)ShortcutTupleFields.IconIndex].AsNullableNumber(); set => this.Set((int)ShortcutTupleFields.IconIndex, value); } public ShortcutShowType? Show { get => (ShortcutShowType?)this.Fields[(int)ShortcutTupleFields.Show].AsNullableNumber(); set => this.Set((int)ShortcutTupleFields.Show, (int?)value); } public string WorkingDirectory { get => (string)this.Fields[(int)ShortcutTupleFields.WkDir]; set => this.Set((int)ShortcutTupleFields.WkDir, value); } public string DisplayResourceDll { get => (string)this.Fields[(int)ShortcutTupleFields.DisplayResourceDLL]; set => this.Set((int)ShortcutTupleFields.DisplayResourceDLL, value); } public int? DisplayResourceId { get => this.Fields[(int)ShortcutTupleFields.DisplayResourceId].AsNullableNumber(); set => this.Set((int)ShortcutTupleFields.DisplayResourceId, value); } public string DescriptionResourceDll { get => (string)this.Fields[(int)ShortcutTupleFields.DescriptionResourceDLL]; set => this.Set((int)ShortcutTupleFields.DescriptionResourceDLL, value); } public int? DescriptionResourceId { get => this.Fields[(int)ShortcutTupleFields.DescriptionResourceId].AsNullableNumber(); set => this.Set((int)ShortcutTupleFields.DescriptionResourceId, value); } } }