From 54541ef517190f37d0625627b028834f0871a959 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Wed, 22 May 2019 00:19:41 -0700 Subject: Implement many more strong tuples Also fixes several warnings. --- src/WixToolset.Data/CompressionLevel.cs | 4 +- src/WixToolset.Data/ErrorMessages.cs | 6 ++ src/WixToolset.Data/IntermediateFieldExtensions.cs | 7 +- .../IntermediateFieldValueExtensions.cs | 9 +- src/WixToolset.Data/Tuples/BillboardTuple.cs | 8 -- src/WixToolset.Data/Tuples/BinaryTuple.cs | 8 -- src/WixToolset.Data/Tuples/BindImageTuple.cs | 52 --------- src/WixToolset.Data/Tuples/CCPSearchTuple.cs | 12 +-- src/WixToolset.Data/Tuples/ComponentTuple.cs | 8 -- src/WixToolset.Data/Tuples/DirectoryTuple.cs | 20 ++-- src/WixToolset.Data/Tuples/DuplicateFileTuple.cs | 8 -- src/WixToolset.Data/Tuples/FileTuple.cs | 32 ++++-- src/WixToolset.Data/Tuples/FontTuple.cs | 52 --------- src/WixToolset.Data/Tuples/IconTuple.cs | 8 -- src/WixToolset.Data/Tuples/ImageFamiliesTuple.cs | 4 +- .../Tuples/IsolatedComponentTuple.cs | 2 +- src/WixToolset.Data/Tuples/MediaTuple.cs | 18 +++- .../Tuples/ModuleIgnoreTableTuple.cs | 14 +-- src/WixToolset.Data/Tuples/MoveFileTuple.cs | 20 ++-- src/WixToolset.Data/Tuples/MsiAssemblyTuple.cs | 6 +- .../Tuples/MsiLockPermissionsExTuple.cs | 8 -- .../Tuples/MsiShortcutPropertyTuple.cs | 8 -- src/WixToolset.Data/Tuples/ODBCDataSourceTuple.cs | 10 +- src/WixToolset.Data/Tuples/ODBCDriverTuple.cs | 10 +- src/WixToolset.Data/Tuples/ODBCTranslatorTuple.cs | 10 +- src/WixToolset.Data/Tuples/ProgIdTuple.cs | 4 +- src/WixToolset.Data/Tuples/PropertyTuple.cs | 10 +- src/WixToolset.Data/Tuples/RegLocatorTuple.cs | 37 ++++--- src/WixToolset.Data/Tuples/RemoveFileTuple.cs | 26 ++--- src/WixToolset.Data/Tuples/ReserveCostTuple.cs | 10 +- src/WixToolset.Data/Tuples/SelfRegTuple.cs | 52 --------- .../Tuples/SummaryInformationTuple.cs | 71 +++++++++++++ src/WixToolset.Data/Tuples/TargetImagesTuple.cs | 6 +- src/WixToolset.Data/Tuples/TransformsFlags.cs | 79 ++++++++++++++ src/WixToolset.Data/Tuples/TupleDefinitions.cs | 40 +------ src/WixToolset.Data/Tuples/TypeLibTuple.cs | 12 +-- src/WixToolset.Data/Tuples/UITextTuple.cs | 10 +- .../Tuples/UpgradedFiles_OptionalDataTuple.cs | 14 +-- src/WixToolset.Data/Tuples/WixActionTuple.cs | 12 +-- .../Tuples/WixApprovedExeForElevationTuple.cs | 14 +-- .../Tuples/WixBootstrapperApplicationTuple.cs | 16 +-- .../Tuples/WixBundleContainerTuple.cs | 20 ++-- .../Tuples/WixBundlePropertiesTuple.cs | 10 +- .../Tuples/WixBundleRelatedPackageTuple.cs | 18 +--- .../Tuples/WixBundleVariableTuple.cs | 10 +- src/WixToolset.Data/Tuples/WixChainItemTuple.cs | 12 +-- src/WixToolset.Data/Tuples/WixCustomTableTuple.cs | 14 +-- .../Tuples/WixDeltaPatchFileTuple.cs | 8 -- .../Tuples/WixDeltaPatchSymbolPathsTuple.cs | 22 ++-- src/WixToolset.Data/Tuples/WixDirectoryTuple.cs | 52 --------- src/WixToolset.Data/Tuples/WixFileTuple.cs | 14 +-- .../Tuples/WixInstanceTransformsTuple.cs | 10 +- .../Tuples/WixMediaTemplateTuple.cs | 19 ++-- src/WixToolset.Data/Tuples/WixMediaTuple.cs | 62 ----------- src/WixToolset.Data/Tuples/WixMergeTuple.cs | 10 +- src/WixToolset.Data/Tuples/WixOrderingTuple.cs | 16 +-- .../Tuples/WixPatchBaselineTuple.cs | 16 +-- .../Tuples/WixSuppressModularizationTuple.cs | 12 +-- src/WixToolset.Data/Tuples/WixUITuple.cs | 16 +-- src/WixToolset.Data/Tuples/WixVariableTuple.cs | 10 +- src/WixToolset.Data/Tuples/_StreamsTuple.cs | 52 --------- .../Tuples/_SummaryInformationTuple.cs | 52 --------- src/WixToolset.Data/Tuples/_TransformViewTuple.cs | 76 -------------- src/WixToolset.Data/Tuples/_ValidationTuple.cs | 116 --------------------- .../WindowsInstaller/WindowsInstallerStandard.cs | 28 ++--- .../WixToolsetTest.Data/TupleDefinitionFixture.cs | 6 +- 66 files changed, 391 insertions(+), 1047 deletions(-) delete mode 100644 src/WixToolset.Data/Tuples/BindImageTuple.cs delete mode 100644 src/WixToolset.Data/Tuples/FontTuple.cs delete mode 100644 src/WixToolset.Data/Tuples/SelfRegTuple.cs create mode 100644 src/WixToolset.Data/Tuples/SummaryInformationTuple.cs create mode 100644 src/WixToolset.Data/Tuples/TransformsFlags.cs delete mode 100644 src/WixToolset.Data/Tuples/WixDirectoryTuple.cs delete mode 100644 src/WixToolset.Data/Tuples/WixMediaTuple.cs delete mode 100644 src/WixToolset.Data/Tuples/_StreamsTuple.cs delete mode 100644 src/WixToolset.Data/Tuples/_SummaryInformationTuple.cs delete mode 100644 src/WixToolset.Data/Tuples/_TransformViewTuple.cs delete mode 100644 src/WixToolset.Data/Tuples/_ValidationTuple.cs (limited to 'src') diff --git a/src/WixToolset.Data/CompressionLevel.cs b/src/WixToolset.Data/CompressionLevel.cs index c98eb9e1..05aa3816 100644 --- a/src/WixToolset.Data/CompressionLevel.cs +++ b/src/WixToolset.Data/CompressionLevel.cs @@ -1,4 +1,4 @@ -// 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. +// 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 { @@ -22,4 +22,4 @@ namespace WixToolset.Data /// Use ms-zip compression. Mszip } -} \ No newline at end of file +} diff --git a/src/WixToolset.Data/ErrorMessages.cs b/src/WixToolset.Data/ErrorMessages.cs index 48c1b44b..33cccdd2 100644 --- a/src/WixToolset.Data/ErrorMessages.cs +++ b/src/WixToolset.Data/ErrorMessages.cs @@ -1954,6 +1954,11 @@ namespace WixToolset.Data return Message(null, Ids.UnableToGetAuthenticodeCertOfFileDownlevelOS, "Unable to get the authenticode certificate of '{0}'. The cryptography API has limitations on Windows XP and Windows Server 2003. More information: {1}", filePath, moreInformation); } + public static Message UnableToConvertFieldToNumber(string value) + { + return Message(null, Ids.UnableToConvertFieldToNumber, "Unable to convert intermediate tuple field value '{0}' to a number. This means the intermediate is corrupt or of an unsupported version.", value); + } + public static Message UnableToOpenModule(SourceLineNumber sourceLineNumbers, string modulePath, string message) { return Message(sourceLineNumbers, Ids.UnableToOpenModule, "Unable to open merge module '{0}'. Check to make sure the module language is correct. '{1}'", modulePath, message); @@ -2634,6 +2639,7 @@ namespace WixToolset.Data MsiTransactionX86BeforeX64 = 390, NoSourceFiles = 391, WixiplSourceFileIsExclusive = 392, + UnableToConvertFieldToNumber = 393, } } } diff --git a/src/WixToolset.Data/IntermediateFieldExtensions.cs b/src/WixToolset.Data/IntermediateFieldExtensions.cs index 6bc82b37..2f8aec1d 100644 --- a/src/WixToolset.Data/IntermediateFieldExtensions.cs +++ b/src/WixToolset.Data/IntermediateFieldExtensions.cs @@ -1,4 +1,4 @@ -// 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. +// 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 { @@ -151,6 +151,11 @@ namespace WixToolset.Data } } + public static object AsObject(this IntermediateField field) + { + return field?.Value.Data; + } + public static IntermediateField Set(this IntermediateField field, bool value) { object data; diff --git a/src/WixToolset.Data/IntermediateFieldValueExtensions.cs b/src/WixToolset.Data/IntermediateFieldValueExtensions.cs index 25a40ee6..f9322e09 100644 --- a/src/WixToolset.Data/IntermediateFieldValueExtensions.cs +++ b/src/WixToolset.Data/IntermediateFieldValueExtensions.cs @@ -71,7 +71,14 @@ namespace WixToolset.Data } else if (value.Data is string s) { - return Convert.ToInt32(s); + try + { + return Convert.ToInt32(s); + } + catch (FormatException) + { + throw new WixException(ErrorMessages.UnableToConvertFieldToNumber(s)); + } } return (int)value.Data; diff --git a/src/WixToolset.Data/Tuples/BillboardTuple.cs b/src/WixToolset.Data/Tuples/BillboardTuple.cs index 43a05a71..dc5c5769 100644 --- a/src/WixToolset.Data/Tuples/BillboardTuple.cs +++ b/src/WixToolset.Data/Tuples/BillboardTuple.cs @@ -10,7 +10,6 @@ namespace WixToolset.Data TupleDefinitionType.Billboard, new[] { - new IntermediateFieldDefinition(nameof(BillboardTupleFields.Billboard), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(BillboardTupleFields.Feature_), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(BillboardTupleFields.Action), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(BillboardTupleFields.Ordering), IntermediateFieldType.Number), @@ -23,7 +22,6 @@ namespace WixToolset.Data.Tuples { public enum BillboardTupleFields { - Billboard, Feature_, Action, Ordering, @@ -41,12 +39,6 @@ namespace WixToolset.Data.Tuples public IntermediateField this[BillboardTupleFields index] => this.Fields[(int)index]; - public string Billboard - { - get => (string)this.Fields[(int)BillboardTupleFields.Billboard]; - set => this.Set((int)BillboardTupleFields.Billboard, value); - } - public string Feature_ { get => (string)this.Fields[(int)BillboardTupleFields.Feature_]; diff --git a/src/WixToolset.Data/Tuples/BinaryTuple.cs b/src/WixToolset.Data/Tuples/BinaryTuple.cs index 061f6f71..9e8df73d 100644 --- a/src/WixToolset.Data/Tuples/BinaryTuple.cs +++ b/src/WixToolset.Data/Tuples/BinaryTuple.cs @@ -10,7 +10,6 @@ namespace WixToolset.Data TupleDefinitionType.Binary, new[] { - new IntermediateFieldDefinition(nameof(BinaryTupleFields.Name), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(BinaryTupleFields.Data), IntermediateFieldType.Path), }, typeof(BinaryTuple)); @@ -21,7 +20,6 @@ namespace WixToolset.Data.Tuples { public enum BinaryTupleFields { - Name, Data, } @@ -37,12 +35,6 @@ namespace WixToolset.Data.Tuples public IntermediateField this[BinaryTupleFields index] => this.Fields[(int)index]; - public string Name - { - get => (string)this.Fields[(int)BinaryTupleFields.Name]; - set => this.Set((int)BinaryTupleFields.Name, value); - } - public string Data { get => (string)this.Fields[(int)BinaryTupleFields.Data]; diff --git a/src/WixToolset.Data/Tuples/BindImageTuple.cs b/src/WixToolset.Data/Tuples/BindImageTuple.cs deleted file mode 100644 index 14622238..00000000 --- a/src/WixToolset.Data/Tuples/BindImageTuple.cs +++ /dev/null @@ -1,52 +0,0 @@ -// 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 BindImage = new IntermediateTupleDefinition( - TupleDefinitionType.BindImage, - new[] - { - new IntermediateFieldDefinition(nameof(BindImageTupleFields.File_), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(BindImageTupleFields.Path), IntermediateFieldType.String), - }, - typeof(BindImageTuple)); - } -} - -namespace WixToolset.Data.Tuples -{ - public enum BindImageTupleFields - { - File_, - Path, - } - - public class BindImageTuple : IntermediateTuple - { - public BindImageTuple() : base(TupleDefinitions.BindImage, null, null) - { - } - - public BindImageTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.BindImage, sourceLineNumber, id) - { - } - - public IntermediateField this[BindImageTupleFields index] => this.Fields[(int)index]; - - public string File_ - { - get => (string)this.Fields[(int)BindImageTupleFields.File_]; - set => this.Set((int)BindImageTupleFields.File_, value); - } - - public string Path - { - get => (string)this.Fields[(int)BindImageTupleFields.Path]; - set => this.Set((int)BindImageTupleFields.Path, value); - } - } -} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/CCPSearchTuple.cs b/src/WixToolset.Data/Tuples/CCPSearchTuple.cs index 3d849128..bdc64907 100644 --- a/src/WixToolset.Data/Tuples/CCPSearchTuple.cs +++ b/src/WixToolset.Data/Tuples/CCPSearchTuple.cs @@ -8,10 +8,7 @@ namespace WixToolset.Data { public static readonly IntermediateTupleDefinition CCPSearch = new IntermediateTupleDefinition( TupleDefinitionType.CCPSearch, - new[] - { - new IntermediateFieldDefinition(nameof(CCPSearchTupleFields.Signature_), IntermediateFieldType.String), - }, + new IntermediateFieldDefinition[0], typeof(CCPSearchTuple)); } } @@ -20,7 +17,6 @@ namespace WixToolset.Data.Tuples { public enum CCPSearchTupleFields { - Signature_, } public class CCPSearchTuple : IntermediateTuple @@ -34,11 +30,5 @@ namespace WixToolset.Data.Tuples } public IntermediateField this[CCPSearchTupleFields index] => this.Fields[(int)index]; - - public string Signature_ - { - get => (string)this.Fields[(int)CCPSearchTupleFields.Signature_]; - set => this.Set((int)CCPSearchTupleFields.Signature_, value); - } } } \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/ComponentTuple.cs b/src/WixToolset.Data/Tuples/ComponentTuple.cs index f573818e..67cb7042 100644 --- a/src/WixToolset.Data/Tuples/ComponentTuple.cs +++ b/src/WixToolset.Data/Tuples/ComponentTuple.cs @@ -10,7 +10,6 @@ namespace WixToolset.Data TupleDefinitionType.Component, new[] { - new IntermediateFieldDefinition(nameof(ComponentTupleFields.Component), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(ComponentTupleFields.ComponentId), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(ComponentTupleFields.Directory_), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(ComponentTupleFields.Location), IntermediateFieldType.Number), @@ -34,7 +33,6 @@ namespace WixToolset.Data.Tuples { public enum ComponentTupleFields { - Component, ComponentId, Directory_, Location, @@ -70,12 +68,6 @@ namespace WixToolset.Data.Tuples public IntermediateField this[ComponentTupleFields index] => this.Fields[(int)index]; - public string Component - { - get => (string)this.Fields[(int)ComponentTupleFields.Component]; - set => this.Set((int)ComponentTupleFields.Component, value); - } - public string ComponentId { get => (string)this.Fields[(int)ComponentTupleFields.ComponentId]; diff --git a/src/WixToolset.Data/Tuples/DirectoryTuple.cs b/src/WixToolset.Data/Tuples/DirectoryTuple.cs index b36345c7..e36d6796 100644 --- a/src/WixToolset.Data/Tuples/DirectoryTuple.cs +++ b/src/WixToolset.Data/Tuples/DirectoryTuple.cs @@ -10,9 +10,9 @@ namespace WixToolset.Data TupleDefinitionType.Directory, new[] { - new IntermediateFieldDefinition(nameof(DirectoryTupleFields.Directory), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(DirectoryTupleFields.Directory_Parent), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(DirectoryTupleFields.DefaultDir), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(DirectoryTupleFields.ComponentGuidGenerationSeed), IntermediateFieldType.String), }, typeof(DirectoryTuple)); } @@ -22,9 +22,9 @@ namespace WixToolset.Data.Tuples { public enum DirectoryTupleFields { - Directory, Directory_Parent, DefaultDir, + ComponentGuidGenerationSeed, } public class DirectoryTuple : IntermediateTuple @@ -39,22 +39,22 @@ namespace WixToolset.Data.Tuples public IntermediateField this[DirectoryTupleFields index] => this.Fields[(int)index]; - public string Directory - { - get => (string)this.Fields[(int)DirectoryTupleFields.Directory]?.Value; - set => this.Set((int)DirectoryTupleFields.Directory, value); - } - public string Directory_Parent { - get => (string)this.Fields[(int)DirectoryTupleFields.Directory_Parent]?.Value; + get => (string)this.Fields[(int)DirectoryTupleFields.Directory_Parent]; set => this.Set((int)DirectoryTupleFields.Directory_Parent, value); } public string DefaultDir { - get => (string)this.Fields[(int)DirectoryTupleFields.DefaultDir]?.Value; + get => (string)this.Fields[(int)DirectoryTupleFields.DefaultDir]; set => this.Set((int)DirectoryTupleFields.DefaultDir, value); } + + public string ComponentGuidGenerationSeed + { + get => (string)this.Fields[(int)DirectoryTupleFields.ComponentGuidGenerationSeed]; + set => this.Set((int)DirectoryTupleFields.ComponentGuidGenerationSeed, value); + } } } \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/DuplicateFileTuple.cs b/src/WixToolset.Data/Tuples/DuplicateFileTuple.cs index 07a3b66d..08720383 100644 --- a/src/WixToolset.Data/Tuples/DuplicateFileTuple.cs +++ b/src/WixToolset.Data/Tuples/DuplicateFileTuple.cs @@ -10,7 +10,6 @@ namespace WixToolset.Data TupleDefinitionType.DuplicateFile, new[] { - new IntermediateFieldDefinition(nameof(DuplicateFileTupleFields.FileKey), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(DuplicateFileTupleFields.Component_), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(DuplicateFileTupleFields.File_), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(DuplicateFileTupleFields.DestName), IntermediateFieldType.String), @@ -24,7 +23,6 @@ namespace WixToolset.Data.Tuples { public enum DuplicateFileTupleFields { - FileKey, Component_, File_, DestName, @@ -43,12 +41,6 @@ namespace WixToolset.Data.Tuples public IntermediateField this[DuplicateFileTupleFields index] => this.Fields[(int)index]; - public string FileKey - { - get => (string)this.Fields[(int)DuplicateFileTupleFields.FileKey]; - set => this.Set((int)DuplicateFileTupleFields.FileKey, value); - } - public string Component_ { get => (string)this.Fields[(int)DuplicateFileTupleFields.Component_]; diff --git a/src/WixToolset.Data/Tuples/FileTuple.cs b/src/WixToolset.Data/Tuples/FileTuple.cs index 1271ad55..eab29dfa 100644 --- a/src/WixToolset.Data/Tuples/FileTuple.cs +++ b/src/WixToolset.Data/Tuples/FileTuple.cs @@ -10,7 +10,6 @@ namespace WixToolset.Data TupleDefinitionType.File, new[] { - new IntermediateFieldDefinition(nameof(FileTupleFields.File), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(FileTupleFields.Component_), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(FileTupleFields.ShortFileName), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(FileTupleFields.LongFileName), IntermediateFieldType.String), @@ -23,6 +22,9 @@ namespace WixToolset.Data new IntermediateFieldDefinition(nameof(FileTupleFields.Vital), IntermediateFieldType.Bool), new IntermediateFieldDefinition(nameof(FileTupleFields.Checksum), IntermediateFieldType.Bool), new IntermediateFieldDefinition(nameof(FileTupleFields.Compressed), IntermediateFieldType.Bool), + new IntermediateFieldDefinition(nameof(FileTupleFields.FontTitle), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(FileTupleFields.SelfRegCost), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(FileTupleFields.BindPath), IntermediateFieldType.String), }, typeof(FileTuple)); } @@ -32,7 +34,6 @@ namespace WixToolset.Data.Tuples { public enum FileTupleFields { - File, Component_, ShortFileName, LongFileName, @@ -45,6 +46,9 @@ namespace WixToolset.Data.Tuples Vital, Checksum, Compressed, + FontTitle, + SelfRegCost, + BindPath, } public class FileTuple : IntermediateTuple @@ -59,12 +63,6 @@ namespace WixToolset.Data.Tuples public IntermediateField this[FileTupleFields index] => this.Fields[(int)index]; - public string File - { - get => (string)this.Fields[(int)FileTupleFields.File]; - set => this.Set((int)FileTupleFields.File, value); - } - public string Component_ { get => (string)this.Fields[(int)FileTupleFields.Component_]; @@ -136,5 +134,23 @@ namespace WixToolset.Data.Tuples get => (bool?)this.Fields[(int)FileTupleFields.Compressed]; set => this.Set((int)FileTupleFields.Compressed, value); } + + public string FontTitle + { + get => (string)this.Fields[(int)FileTupleFields.FontTitle]; + set => this.Set((int)FileTupleFields.FontTitle, value); + } + + public int? SelfRegCost + { + get => (int?)this.Fields[(int)FileTupleFields.SelfRegCost]; + set => this.Set((int)FileTupleFields.SelfRegCost, value); + } + + public string BindPath + { + get => (string)this.Fields[(int)FileTupleFields.BindPath]; + set => this.Set((int)FileTupleFields.BindPath, value); + } } } diff --git a/src/WixToolset.Data/Tuples/FontTuple.cs b/src/WixToolset.Data/Tuples/FontTuple.cs deleted file mode 100644 index 12f41321..00000000 --- a/src/WixToolset.Data/Tuples/FontTuple.cs +++ /dev/null @@ -1,52 +0,0 @@ -// 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 Font = new IntermediateTupleDefinition( - TupleDefinitionType.Font, - new[] - { - new IntermediateFieldDefinition(nameof(FontTupleFields.File_), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(FontTupleFields.FontTitle), IntermediateFieldType.String), - }, - typeof(FontTuple)); - } -} - -namespace WixToolset.Data.Tuples -{ - public enum FontTupleFields - { - File_, - FontTitle, - } - - public class FontTuple : IntermediateTuple - { - public FontTuple() : base(TupleDefinitions.Font, null, null) - { - } - - public FontTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.Font, sourceLineNumber, id) - { - } - - public IntermediateField this[FontTupleFields index] => this.Fields[(int)index]; - - public string File_ - { - get => (string)this.Fields[(int)FontTupleFields.File_]; - set => this.Set((int)FontTupleFields.File_, value); - } - - public string FontTitle - { - get => (string)this.Fields[(int)FontTupleFields.FontTitle]; - set => this.Set((int)FontTupleFields.FontTitle, value); - } - } -} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/IconTuple.cs b/src/WixToolset.Data/Tuples/IconTuple.cs index 0644f47d..0e8c9fd7 100644 --- a/src/WixToolset.Data/Tuples/IconTuple.cs +++ b/src/WixToolset.Data/Tuples/IconTuple.cs @@ -10,7 +10,6 @@ namespace WixToolset.Data TupleDefinitionType.Icon, new[] { - new IntermediateFieldDefinition(nameof(IconTupleFields.Name), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(IconTupleFields.Data), IntermediateFieldType.Path), }, typeof(IconTuple)); @@ -21,7 +20,6 @@ namespace WixToolset.Data.Tuples { public enum IconTupleFields { - Name, Data, } @@ -37,12 +35,6 @@ namespace WixToolset.Data.Tuples public IntermediateField this[IconTupleFields index] => this.Fields[(int)index]; - public string Name - { - get => (string)this.Fields[(int)IconTupleFields.Name]; - set => this.Set((int)IconTupleFields.Name, value); - } - public string Data { get => (string)this.Fields[(int)IconTupleFields.Data]; diff --git a/src/WixToolset.Data/Tuples/ImageFamiliesTuple.cs b/src/WixToolset.Data/Tuples/ImageFamiliesTuple.cs index d06302a6..b7052ee3 100644 --- a/src/WixToolset.Data/Tuples/ImageFamiliesTuple.cs +++ b/src/WixToolset.Data/Tuples/ImageFamiliesTuple.cs @@ -63,9 +63,9 @@ namespace WixToolset.Data.Tuples set => this.Set((int)ImageFamiliesTupleFields.MediaDiskId, value); } - public int FileSequenceStart + public int? FileSequenceStart { - get => (int)this.Fields[(int)ImageFamiliesTupleFields.FileSequenceStart]; + get => (int?)this.Fields[(int)ImageFamiliesTupleFields.FileSequenceStart]; set => this.Set((int)ImageFamiliesTupleFields.FileSequenceStart, value); } diff --git a/src/WixToolset.Data/Tuples/IsolatedComponentTuple.cs b/src/WixToolset.Data/Tuples/IsolatedComponentTuple.cs index 3f037005..325416e6 100644 --- a/src/WixToolset.Data/Tuples/IsolatedComponentTuple.cs +++ b/src/WixToolset.Data/Tuples/IsolatedComponentTuple.cs @@ -49,4 +49,4 @@ namespace WixToolset.Data.Tuples set => this.Set((int)IsolatedComponentTupleFields.Component_Application, value); } } -} \ No newline at end of file +} diff --git a/src/WixToolset.Data/Tuples/MediaTuple.cs b/src/WixToolset.Data/Tuples/MediaTuple.cs index a78f56de..009a588f 100644 --- a/src/WixToolset.Data/Tuples/MediaTuple.cs +++ b/src/WixToolset.Data/Tuples/MediaTuple.cs @@ -16,6 +16,8 @@ namespace WixToolset.Data new IntermediateFieldDefinition(nameof(MediaTupleFields.Cabinet), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(MediaTupleFields.VolumeLabel), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(MediaTupleFields.Source), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MediaTupleFields.CompressionLevel), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(MediaTupleFields.Layout), IntermediateFieldType.String), }, typeof(MediaTuple)); } @@ -31,6 +33,8 @@ namespace WixToolset.Data.Tuples Cabinet, VolumeLabel, Source, + CompressionLevel, + Layout, } public class MediaTuple : IntermediateTuple @@ -80,5 +84,17 @@ namespace WixToolset.Data.Tuples get => (string)this.Fields[(int)MediaTupleFields.Source]; set => this.Set((int)MediaTupleFields.Source, value); } + + public CompressionLevel? CompressionLevel + { + get => (CompressionLevel?)this.Fields[(int)MediaTupleFields.CompressionLevel].AsNullableNumber(); + set => this.Set((int)MediaTupleFields.CompressionLevel, (int?)value); + } + + public string Layout + { + get => (string)this.Fields[(int)MediaTupleFields.Layout]; + set => this.Set((int)MediaTupleFields.Layout, value); + } } -} \ No newline at end of file +} diff --git a/src/WixToolset.Data/Tuples/ModuleIgnoreTableTuple.cs b/src/WixToolset.Data/Tuples/ModuleIgnoreTableTuple.cs index d4262448..efcf0f79 100644 --- a/src/WixToolset.Data/Tuples/ModuleIgnoreTableTuple.cs +++ b/src/WixToolset.Data/Tuples/ModuleIgnoreTableTuple.cs @@ -8,10 +8,7 @@ namespace WixToolset.Data { public static readonly IntermediateTupleDefinition ModuleIgnoreTable = new IntermediateTupleDefinition( TupleDefinitionType.ModuleIgnoreTable, - new[] - { - new IntermediateFieldDefinition(nameof(ModuleIgnoreTableTupleFields.Table), IntermediateFieldType.String), - }, + new IntermediateFieldDefinition[0], typeof(ModuleIgnoreTableTuple)); } } @@ -20,7 +17,6 @@ namespace WixToolset.Data.Tuples { public enum ModuleIgnoreTableTupleFields { - Table, } public class ModuleIgnoreTableTuple : IntermediateTuple @@ -34,11 +30,5 @@ namespace WixToolset.Data.Tuples } public IntermediateField this[ModuleIgnoreTableTupleFields index] => this.Fields[(int)index]; - - public string Table - { - get => (string)this.Fields[(int)ModuleIgnoreTableTupleFields.Table]; - set => this.Set((int)ModuleIgnoreTableTupleFields.Table, value); - } - } + } } \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/MoveFileTuple.cs b/src/WixToolset.Data/Tuples/MoveFileTuple.cs index 7a0ff120..ea93faea 100644 --- a/src/WixToolset.Data/Tuples/MoveFileTuple.cs +++ b/src/WixToolset.Data/Tuples/MoveFileTuple.cs @@ -10,13 +10,12 @@ namespace WixToolset.Data TupleDefinitionType.MoveFile, new[] { - new IntermediateFieldDefinition(nameof(MoveFileTupleFields.FileKey), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(MoveFileTupleFields.Component_), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(MoveFileTupleFields.SourceName), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(MoveFileTupleFields.DestName), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(MoveFileTupleFields.SourceFolder), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(MoveFileTupleFields.DestFolder), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(MoveFileTupleFields.Options), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(MoveFileTupleFields.Delete), IntermediateFieldType.Bool), }, typeof(MoveFileTuple)); } @@ -26,13 +25,12 @@ namespace WixToolset.Data.Tuples { public enum MoveFileTupleFields { - FileKey, Component_, SourceName, DestName, SourceFolder, DestFolder, - Options, + Delete, } public class MoveFileTuple : IntermediateTuple @@ -47,12 +45,6 @@ namespace WixToolset.Data.Tuples public IntermediateField this[MoveFileTupleFields index] => this.Fields[(int)index]; - public string FileKey - { - get => (string)this.Fields[(int)MoveFileTupleFields.FileKey]; - set => this.Set((int)MoveFileTupleFields.FileKey, value); - } - public string Component_ { get => (string)this.Fields[(int)MoveFileTupleFields.Component_]; @@ -83,10 +75,10 @@ namespace WixToolset.Data.Tuples set => this.Set((int)MoveFileTupleFields.DestFolder, value); } - public int Options + public bool Delete { - get => (int)this.Fields[(int)MoveFileTupleFields.Options]; - set => this.Set((int)MoveFileTupleFields.Options, value); + get => (bool)this.Fields[(int)MoveFileTupleFields.Delete]; + set => this.Set((int)MoveFileTupleFields.Delete, value); } } -} \ No newline at end of file +} diff --git a/src/WixToolset.Data/Tuples/MsiAssemblyTuple.cs b/src/WixToolset.Data/Tuples/MsiAssemblyTuple.cs index 9a2c2c0d..70926557 100644 --- a/src/WixToolset.Data/Tuples/MsiAssemblyTuple.cs +++ b/src/WixToolset.Data/Tuples/MsiAssemblyTuple.cs @@ -67,10 +67,10 @@ namespace WixToolset.Data.Tuples set => this.Set((int)MsiAssemblyTupleFields.File_Application, value); } - public int Attributes + public FileAssemblyType Type { - get => (int)this.Fields[(int)MsiAssemblyTupleFields.Attributes]; - set => this.Set((int)MsiAssemblyTupleFields.Attributes, value); + get => (FileAssemblyType)this.Fields[(int)MsiAssemblyTupleFields.Attributes].AsNumber(); + set => this.Set((int)MsiAssemblyTupleFields.Attributes, (int)value); } } } \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/MsiLockPermissionsExTuple.cs b/src/WixToolset.Data/Tuples/MsiLockPermissionsExTuple.cs index 5b648c05..dfc39763 100644 --- a/src/WixToolset.Data/Tuples/MsiLockPermissionsExTuple.cs +++ b/src/WixToolset.Data/Tuples/MsiLockPermissionsExTuple.cs @@ -10,7 +10,6 @@ namespace WixToolset.Data TupleDefinitionType.MsiLockPermissionsEx, new[] { - new IntermediateFieldDefinition(nameof(MsiLockPermissionsExTupleFields.MsiLockPermissionsEx), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(MsiLockPermissionsExTupleFields.LockObject), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(MsiLockPermissionsExTupleFields.Table), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(MsiLockPermissionsExTupleFields.SDDLText), IntermediateFieldType.String), @@ -24,7 +23,6 @@ namespace WixToolset.Data.Tuples { public enum MsiLockPermissionsExTupleFields { - MsiLockPermissionsEx, LockObject, Table, SDDLText, @@ -43,12 +41,6 @@ namespace WixToolset.Data.Tuples public IntermediateField this[MsiLockPermissionsExTupleFields index] => this.Fields[(int)index]; - public string MsiLockPermissionsEx - { - get => (string)this.Fields[(int)MsiLockPermissionsExTupleFields.MsiLockPermissionsEx]; - set => this.Set((int)MsiLockPermissionsExTupleFields.MsiLockPermissionsEx, value); - } - public string LockObject { get => (string)this.Fields[(int)MsiLockPermissionsExTupleFields.LockObject]; diff --git a/src/WixToolset.Data/Tuples/MsiShortcutPropertyTuple.cs b/src/WixToolset.Data/Tuples/MsiShortcutPropertyTuple.cs index 26ddbf4f..66567eb9 100644 --- a/src/WixToolset.Data/Tuples/MsiShortcutPropertyTuple.cs +++ b/src/WixToolset.Data/Tuples/MsiShortcutPropertyTuple.cs @@ -10,7 +10,6 @@ namespace WixToolset.Data TupleDefinitionType.MsiShortcutProperty, new[] { - new IntermediateFieldDefinition(nameof(MsiShortcutPropertyTupleFields.MsiShortcutProperty), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(MsiShortcutPropertyTupleFields.Shortcut_), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(MsiShortcutPropertyTupleFields.PropertyKey), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(MsiShortcutPropertyTupleFields.PropVariantValue), IntermediateFieldType.String), @@ -23,7 +22,6 @@ namespace WixToolset.Data.Tuples { public enum MsiShortcutPropertyTupleFields { - MsiShortcutProperty, Shortcut_, PropertyKey, PropVariantValue, @@ -41,12 +39,6 @@ namespace WixToolset.Data.Tuples public IntermediateField this[MsiShortcutPropertyTupleFields index] => this.Fields[(int)index]; - public string MsiShortcutProperty - { - get => (string)this.Fields[(int)MsiShortcutPropertyTupleFields.MsiShortcutProperty]; - set => this.Set((int)MsiShortcutPropertyTupleFields.MsiShortcutProperty, value); - } - public string Shortcut_ { get => (string)this.Fields[(int)MsiShortcutPropertyTupleFields.Shortcut_]; diff --git a/src/WixToolset.Data/Tuples/ODBCDataSourceTuple.cs b/src/WixToolset.Data/Tuples/ODBCDataSourceTuple.cs index ebf35895..7eee0b38 100644 --- a/src/WixToolset.Data/Tuples/ODBCDataSourceTuple.cs +++ b/src/WixToolset.Data/Tuples/ODBCDataSourceTuple.cs @@ -10,7 +10,6 @@ namespace WixToolset.Data TupleDefinitionType.ODBCDataSource, new[] { - new IntermediateFieldDefinition(nameof(ODBCDataSourceTupleFields.DataSource), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(ODBCDataSourceTupleFields.Component_), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(ODBCDataSourceTupleFields.Description), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(ODBCDataSourceTupleFields.DriverDescription), IntermediateFieldType.String), @@ -24,7 +23,6 @@ namespace WixToolset.Data.Tuples { public enum ODBCDataSourceTupleFields { - DataSource, Component_, Description, DriverDescription, @@ -43,12 +41,6 @@ namespace WixToolset.Data.Tuples public IntermediateField this[ODBCDataSourceTupleFields index] => this.Fields[(int)index]; - public string DataSource - { - get => (string)this.Fields[(int)ODBCDataSourceTupleFields.DataSource]; - set => this.Set((int)ODBCDataSourceTupleFields.DataSource, value); - } - public string Component_ { get => (string)this.Fields[(int)ODBCDataSourceTupleFields.Component_]; @@ -73,4 +65,4 @@ namespace WixToolset.Data.Tuples set => this.Set((int)ODBCDataSourceTupleFields.Registration, value); } } -} \ No newline at end of file +} diff --git a/src/WixToolset.Data/Tuples/ODBCDriverTuple.cs b/src/WixToolset.Data/Tuples/ODBCDriverTuple.cs index a35d62f4..508a4933 100644 --- a/src/WixToolset.Data/Tuples/ODBCDriverTuple.cs +++ b/src/WixToolset.Data/Tuples/ODBCDriverTuple.cs @@ -10,7 +10,6 @@ namespace WixToolset.Data TupleDefinitionType.ODBCDriver, new[] { - new IntermediateFieldDefinition(nameof(ODBCDriverTupleFields.Driver), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(ODBCDriverTupleFields.Component_), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(ODBCDriverTupleFields.Description), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(ODBCDriverTupleFields.File_), IntermediateFieldType.String), @@ -24,7 +23,6 @@ namespace WixToolset.Data.Tuples { public enum ODBCDriverTupleFields { - Driver, Component_, Description, File_, @@ -43,12 +41,6 @@ namespace WixToolset.Data.Tuples public IntermediateField this[ODBCDriverTupleFields index] => this.Fields[(int)index]; - public string Driver - { - get => (string)this.Fields[(int)ODBCDriverTupleFields.Driver]; - set => this.Set((int)ODBCDriverTupleFields.Driver, value); - } - public string Component_ { get => (string)this.Fields[(int)ODBCDriverTupleFields.Component_]; @@ -73,4 +65,4 @@ namespace WixToolset.Data.Tuples set => this.Set((int)ODBCDriverTupleFields.File_Setup, value); } } -} \ No newline at end of file +} diff --git a/src/WixToolset.Data/Tuples/ODBCTranslatorTuple.cs b/src/WixToolset.Data/Tuples/ODBCTranslatorTuple.cs index 678bac57..e3c0e963 100644 --- a/src/WixToolset.Data/Tuples/ODBCTranslatorTuple.cs +++ b/src/WixToolset.Data/Tuples/ODBCTranslatorTuple.cs @@ -10,7 +10,6 @@ namespace WixToolset.Data TupleDefinitionType.ODBCTranslator, new[] { - new IntermediateFieldDefinition(nameof(ODBCTranslatorTupleFields.Translator), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(ODBCTranslatorTupleFields.Component_), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(ODBCTranslatorTupleFields.Description), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(ODBCTranslatorTupleFields.File_), IntermediateFieldType.String), @@ -24,7 +23,6 @@ namespace WixToolset.Data.Tuples { public enum ODBCTranslatorTupleFields { - Translator, Component_, Description, File_, @@ -43,12 +41,6 @@ namespace WixToolset.Data.Tuples public IntermediateField this[ODBCTranslatorTupleFields index] => this.Fields[(int)index]; - public string Translator - { - get => (string)this.Fields[(int)ODBCTranslatorTupleFields.Translator]; - set => this.Set((int)ODBCTranslatorTupleFields.Translator, value); - } - public string Component_ { get => (string)this.Fields[(int)ODBCTranslatorTupleFields.Component_]; @@ -73,4 +65,4 @@ namespace WixToolset.Data.Tuples set => this.Set((int)ODBCTranslatorTupleFields.File_Setup, value); } } -} \ No newline at end of file +} diff --git a/src/WixToolset.Data/Tuples/ProgIdTuple.cs b/src/WixToolset.Data/Tuples/ProgIdTuple.cs index 9275e6aa..8a6df5cb 100644 --- a/src/WixToolset.Data/Tuples/ProgIdTuple.cs +++ b/src/WixToolset.Data/Tuples/ProgIdTuple.cs @@ -75,9 +75,9 @@ namespace WixToolset.Data.Tuples set => this.Set((int)ProgIdTupleFields.Icon_, value); } - public int IconIndex + public int? IconIndex { - get => (int)this.Fields[(int)ProgIdTupleFields.IconIndex]; + get => (int?)this.Fields[(int)ProgIdTupleFields.IconIndex]; set => this.Set((int)ProgIdTupleFields.IconIndex, value); } } diff --git a/src/WixToolset.Data/Tuples/PropertyTuple.cs b/src/WixToolset.Data/Tuples/PropertyTuple.cs index 120b01fb..e6a5ceae 100644 --- a/src/WixToolset.Data/Tuples/PropertyTuple.cs +++ b/src/WixToolset.Data/Tuples/PropertyTuple.cs @@ -10,7 +10,6 @@ namespace WixToolset.Data TupleDefinitionType.Property, new[] { - new IntermediateFieldDefinition(nameof(PropertyTupleFields.Property), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(PropertyTupleFields.Value), IntermediateFieldType.String), }, typeof(PropertyTuple)); @@ -21,7 +20,6 @@ namespace WixToolset.Data.Tuples { public enum PropertyTupleFields { - Property, Value, } @@ -37,15 +35,9 @@ namespace WixToolset.Data.Tuples public IntermediateField this[PropertyTupleFields index] => this.Fields[(int)index]; - public string Property - { - get => (string)this.Fields[(int)PropertyTupleFields.Property]?.Value; - set => this.Set((int)PropertyTupleFields.Property, value); - } - public string Value { - get => (string)this.Fields[(int)PropertyTupleFields.Value]?.Value; + get => (string)this.Fields[(int)PropertyTupleFields.Value]; set => this.Set((int)PropertyTupleFields.Value, value); } } diff --git a/src/WixToolset.Data/Tuples/RegLocatorTuple.cs b/src/WixToolset.Data/Tuples/RegLocatorTuple.cs index f8edad95..8f358051 100644 --- a/src/WixToolset.Data/Tuples/RegLocatorTuple.cs +++ b/src/WixToolset.Data/Tuples/RegLocatorTuple.cs @@ -10,11 +10,11 @@ namespace WixToolset.Data TupleDefinitionType.RegLocator, new[] { - new IntermediateFieldDefinition(nameof(RegLocatorTupleFields.Signature_), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(RegLocatorTupleFields.Root), IntermediateFieldType.Number), new IntermediateFieldDefinition(nameof(RegLocatorTupleFields.Key), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(RegLocatorTupleFields.Name), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(RegLocatorTupleFields.Type), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(RegLocatorTupleFields.Win64), IntermediateFieldType.Bool), }, typeof(RegLocatorTuple)); } @@ -24,13 +24,20 @@ namespace WixToolset.Data.Tuples { public enum RegLocatorTupleFields { - Signature_, Root, Key, Name, Type, + Win64, } + public enum RegLocatorType + { + Directory, + FileName, + Raw + }; + public class RegLocatorTuple : IntermediateTuple { public RegLocatorTuple() : base(TupleDefinitions.RegLocator, null, null) @@ -43,16 +50,10 @@ namespace WixToolset.Data.Tuples public IntermediateField this[RegLocatorTupleFields index] => this.Fields[(int)index]; - public string Signature_ - { - get => (string)this.Fields[(int)RegLocatorTupleFields.Signature_]; - set => this.Set((int)RegLocatorTupleFields.Signature_, value); - } - - public int Root + public RegistryRootType Root { - get => (int)this.Fields[(int)RegLocatorTupleFields.Root]; - set => this.Set((int)RegLocatorTupleFields.Root, value); + get => (RegistryRootType)this.Fields[(int)RegLocatorTupleFields.Root].AsNumber(); + set => this.Set((int)RegLocatorTupleFields.Root, (int)value); } public string Key @@ -67,10 +68,16 @@ namespace WixToolset.Data.Tuples set => this.Set((int)RegLocatorTupleFields.Name, value); } - public int Type + public RegLocatorType Type { - get => (int)this.Fields[(int)RegLocatorTupleFields.Type]; - set => this.Set((int)RegLocatorTupleFields.Type, value); + get => (RegLocatorType)this.Fields[(int)RegLocatorTupleFields.Type].AsNumber(); + set => this.Set((int)RegLocatorTupleFields.Type, (int)value); + } + + public bool Win64 + { + get => this.Fields[(int)RegLocatorTupleFields.Win64].AsBool(); + set => this.Set((int)RegLocatorTupleFields.Win64, value); } } -} \ No newline at end of file +} diff --git a/src/WixToolset.Data/Tuples/RemoveFileTuple.cs b/src/WixToolset.Data/Tuples/RemoveFileTuple.cs index 1f370ae9..e66306de 100644 --- a/src/WixToolset.Data/Tuples/RemoveFileTuple.cs +++ b/src/WixToolset.Data/Tuples/RemoveFileTuple.cs @@ -10,11 +10,11 @@ namespace WixToolset.Data TupleDefinitionType.RemoveFile, new[] { - new IntermediateFieldDefinition(nameof(RemoveFileTupleFields.FileKey), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(RemoveFileTupleFields.Component_), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(RemoveFileTupleFields.FileName), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(RemoveFileTupleFields.DirProperty), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(RemoveFileTupleFields.InstallMode), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(RemoveFileTupleFields.OnInstall), IntermediateFieldType.Bool), + new IntermediateFieldDefinition(nameof(RemoveFileTupleFields.OnUninstall), IntermediateFieldType.Bool), }, typeof(RemoveFileTuple)); } @@ -24,11 +24,11 @@ namespace WixToolset.Data.Tuples { public enum RemoveFileTupleFields { - FileKey, Component_, FileName, DirProperty, - InstallMode, + OnInstall, + OnUninstall, } public class RemoveFileTuple : IntermediateTuple @@ -43,12 +43,6 @@ namespace WixToolset.Data.Tuples public IntermediateField this[RemoveFileTupleFields index] => this.Fields[(int)index]; - public string FileKey - { - get => (string)this.Fields[(int)RemoveFileTupleFields.FileKey]; - set => this.Set((int)RemoveFileTupleFields.FileKey, value); - } - public string Component_ { get => (string)this.Fields[(int)RemoveFileTupleFields.Component_]; @@ -67,10 +61,16 @@ namespace WixToolset.Data.Tuples set => this.Set((int)RemoveFileTupleFields.DirProperty, value); } - public int InstallMode + public bool? OnInstall + { + get => (bool?)this.Fields[(int)RemoveFileTupleFields.OnInstall]; + set => this.Set((int)RemoveFileTupleFields.OnInstall, value); + } + + public bool? OnUninstall { - get => (int)this.Fields[(int)RemoveFileTupleFields.InstallMode]; - set => this.Set((int)RemoveFileTupleFields.InstallMode, value); + get => (bool?)this.Fields[(int)RemoveFileTupleFields.OnUninstall]; + set => this.Set((int)RemoveFileTupleFields.OnUninstall, value); } } } \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/ReserveCostTuple.cs b/src/WixToolset.Data/Tuples/ReserveCostTuple.cs index 8804cf3c..46b850f7 100644 --- a/src/WixToolset.Data/Tuples/ReserveCostTuple.cs +++ b/src/WixToolset.Data/Tuples/ReserveCostTuple.cs @@ -10,7 +10,6 @@ namespace WixToolset.Data TupleDefinitionType.ReserveCost, new[] { - new IntermediateFieldDefinition(nameof(ReserveCostTupleFields.ReserveKey), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(ReserveCostTupleFields.Component_), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(ReserveCostTupleFields.ReserveFolder), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(ReserveCostTupleFields.ReserveLocal), IntermediateFieldType.Number), @@ -24,7 +23,6 @@ namespace WixToolset.Data.Tuples { public enum ReserveCostTupleFields { - ReserveKey, Component_, ReserveFolder, ReserveLocal, @@ -43,12 +41,6 @@ namespace WixToolset.Data.Tuples public IntermediateField this[ReserveCostTupleFields index] => this.Fields[(int)index]; - public string ReserveKey - { - get => (string)this.Fields[(int)ReserveCostTupleFields.ReserveKey]; - set => this.Set((int)ReserveCostTupleFields.ReserveKey, value); - } - public string Component_ { get => (string)this.Fields[(int)ReserveCostTupleFields.Component_]; @@ -73,4 +65,4 @@ namespace WixToolset.Data.Tuples set => this.Set((int)ReserveCostTupleFields.ReserveSource, value); } } -} \ No newline at end of file +} diff --git a/src/WixToolset.Data/Tuples/SelfRegTuple.cs b/src/WixToolset.Data/Tuples/SelfRegTuple.cs deleted file mode 100644 index 0ea1eeac..00000000 --- a/src/WixToolset.Data/Tuples/SelfRegTuple.cs +++ /dev/null @@ -1,52 +0,0 @@ -// 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 SelfReg = new IntermediateTupleDefinition( - TupleDefinitionType.SelfReg, - new[] - { - new IntermediateFieldDefinition(nameof(SelfRegTupleFields.File_), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(SelfRegTupleFields.Cost), IntermediateFieldType.Number), - }, - typeof(SelfRegTuple)); - } -} - -namespace WixToolset.Data.Tuples -{ - public enum SelfRegTupleFields - { - File_, - Cost, - } - - public class SelfRegTuple : IntermediateTuple - { - public SelfRegTuple() : base(TupleDefinitions.SelfReg, null, null) - { - } - - public SelfRegTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.SelfReg, sourceLineNumber, id) - { - } - - public IntermediateField this[SelfRegTupleFields index] => this.Fields[(int)index]; - - public string File_ - { - get => (string)this.Fields[(int)SelfRegTupleFields.File_]; - set => this.Set((int)SelfRegTupleFields.File_, value); - } - - public int Cost - { - get => (int)this.Fields[(int)SelfRegTupleFields.Cost]; - set => this.Set((int)SelfRegTupleFields.Cost, value); - } - } -} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/SummaryInformationTuple.cs b/src/WixToolset.Data/Tuples/SummaryInformationTuple.cs new file mode 100644 index 00000000..a67f1985 --- /dev/null +++ b/src/WixToolset.Data/Tuples/SummaryInformationTuple.cs @@ -0,0 +1,71 @@ +// 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 SummaryInformation = new IntermediateTupleDefinition( + TupleDefinitionType.SummaryInformation, + new[] + { + new IntermediateFieldDefinition(nameof(SummaryInformationTupleFields.PropertyId), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(SummaryInformationTupleFields.Value), IntermediateFieldType.String), + }, + typeof(SummaryInformationTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum SummaryInformationTupleFields + { + PropertyId, + Value, + } + + public enum SumaryInformationType + { + Codepage = 1, + Title, + Subject, + Author, + Keywords, + Comments, + PlatformAndLanguage, + TransformPlatformAndLanguageOrStorageNames, + PackageCode, + Created = 12, + LastSaved, + WindowsInstallerVersion, + WordCount, + CreatingApplication = 18, + Security + } + + public class SummaryInformationTuple : IntermediateTuple + { + public SummaryInformationTuple() : base(TupleDefinitions.SummaryInformation, null, null) + { + } + + public SummaryInformationTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.SummaryInformation, sourceLineNumber, id) + { + } + + public IntermediateField this[SummaryInformationTupleFields index] => this.Fields[(int)index]; + + public SumaryInformationType PropertyId + { + get => (SumaryInformationType)this.Fields[(int)SummaryInformationTupleFields.PropertyId].AsNumber(); + set => this.Set((int)SummaryInformationTupleFields.PropertyId, (int)value); + } + + public string Value + { + get => (string)this.Fields[(int)SummaryInformationTupleFields.Value]; + set => this.Set((int)SummaryInformationTupleFields.Value, value); + } + } +} diff --git a/src/WixToolset.Data/Tuples/TargetImagesTuple.cs b/src/WixToolset.Data/Tuples/TargetImagesTuple.cs index 0dc1d4de..21920208 100644 --- a/src/WixToolset.Data/Tuples/TargetImagesTuple.cs +++ b/src/WixToolset.Data/Tuples/TargetImagesTuple.cs @@ -16,7 +16,7 @@ namespace WixToolset.Data new IntermediateFieldDefinition(nameof(TargetImagesTupleFields.Upgraded), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(TargetImagesTupleFields.Order), IntermediateFieldType.Number), new IntermediateFieldDefinition(nameof(TargetImagesTupleFields.ProductValidateFlags), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(TargetImagesTupleFields.IgnoreMissingSrcFiles), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(TargetImagesTupleFields.IgnoreMissingSrcFiles), IntermediateFieldType.Bool), }, typeof(TargetImagesTuple)); } @@ -83,9 +83,9 @@ namespace WixToolset.Data.Tuples set => this.Set((int)TargetImagesTupleFields.ProductValidateFlags, value); } - public int IgnoreMissingSrcFiles + public bool IgnoreMissingSrcFiles { - get => (int)this.Fields[(int)TargetImagesTupleFields.IgnoreMissingSrcFiles]; + get => (bool)this.Fields[(int)TargetImagesTupleFields.IgnoreMissingSrcFiles]; set => this.Set((int)TargetImagesTupleFields.IgnoreMissingSrcFiles, value); } } diff --git a/src/WixToolset.Data/Tuples/TransformsFlags.cs b/src/WixToolset.Data/Tuples/TransformsFlags.cs new file mode 100644 index 00000000..d3a6187c --- /dev/null +++ b/src/WixToolset.Data/Tuples/TransformsFlags.cs @@ -0,0 +1,79 @@ +// 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.Tuples +{ + using System; + + /// + /// Summary information values for the CharCount property in transforms. + /// + [Flags] + public enum TransformFlags + { + /// Ignore error when adding a row that exists. + ErrorAddExistingRow = 0x1, + + /// Ignore error when deleting a row that does not exist. + ErrorDeleteMissingRow = 0x2, + + /// Ignore error when adding a table that exists. + ErrorAddExistingTable = 0x4, + + /// Ignore error when deleting a table that does not exist. + ErrorDeleteMissingTable = 0x8, + + /// Ignore error when updating a row that does not exist. + ErrorUpdateMissingRow = 0x10, + + /// Ignore error when transform and database code pages do not match, and their code pages are neutral. + ErrorChangeCodePage = 0x20, + + /// Default language must match base database. + ValidateLanguage = 0x10000, + + /// Product must match base database. + ValidateProduct = 0x20000, + + /// Check major version only. + ValidateMajorVersion = 0x80000, + + /// Check major and minor versions only. + ValidateMinorVersion = 0x100000, + + /// Check major, minor, and update versions. + ValidateUpdateVersion = 0x200000, + + /// Installed version lt base version. + ValidateNewLessBaseVersion = 0x400000, + + /// Installed version lte base version. + ValidateNewLessEqualBaseVersion = 0x800000, + + /// Installed version eq base version. + ValidateNewEqualBaseVersion = 0x1000000, + + /// Installed version gte base version. + ValidateNewGreaterEqualBaseVersion = 0x2000000, + + /// Installed version gt base version. + ValidateNewGreaterBaseVersion = 0x4000000, + + /// UpgradeCode must match base database. + ValidateUpgradeCode = 0x8000000, + + /// Masks all version checks on ProductVersion. + ProductVersionMask = ValidateMajorVersion | ValidateMinorVersion | ValidateUpdateVersion, + + /// Masks all operations on ProductVersion. + ProductVersionOperatorMask = ValidateNewLessBaseVersion | ValidateNewLessEqualBaseVersion | ValidateNewEqualBaseVersion | ValidateNewGreaterEqualBaseVersion | ValidateNewGreaterBaseVersion, + + /// Default value for instance transforms. + InstanceTransformDefault = ErrorAddExistingRow | ErrorDeleteMissingRow | ErrorAddExistingTable | ErrorDeleteMissingTable | ErrorUpdateMissingRow | ErrorChangeCodePage | ValidateProduct | ValidateUpdateVersion | ValidateNewGreaterEqualBaseVersion, + + /// Default value for language transforms. + LanguageTransformDefault = ErrorAddExistingRow | ErrorDeleteMissingRow | ErrorAddExistingTable | ErrorDeleteMissingTable | ErrorUpdateMissingRow | ErrorChangeCodePage | ValidateProduct, + + /// Default value for patch transforms. + PatchTransformDefault = ErrorAddExistingRow | ErrorDeleteMissingRow | ErrorAddExistingTable | ErrorDeleteMissingTable | ErrorUpdateMissingRow | ValidateProduct | ValidateUpdateVersion | ValidateNewEqualBaseVersion | ValidateUpgradeCode, + } +} diff --git a/src/WixToolset.Data/Tuples/TupleDefinitions.cs b/src/WixToolset.Data/Tuples/TupleDefinitions.cs index 173b4371..8c0c932a 100644 --- a/src/WixToolset.Data/Tuples/TupleDefinitions.cs +++ b/src/WixToolset.Data/Tuples/TupleDefinitions.cs @@ -3,14 +3,11 @@ namespace WixToolset.Data { using System; - using WixToolset.Data.Tuples; public enum TupleDefinitionType { - _Streams, - _SummaryInformation, - _TransformView, - _Validation, + SummaryInformation, + Validation, ActionText, AdminExecuteSequence, AdminUISequence, @@ -20,7 +17,6 @@ namespace WixToolset.Data BBControl, Billboard, Binary, - BindImage, CCPSearch, CheckBox, Class, @@ -48,7 +44,6 @@ namespace WixToolset.Data FeatureComponents, File, FileSFPCatalog, - Font, Icon, ImageFamilies, IniFile, @@ -113,7 +108,6 @@ namespace WixToolset.Data RemoveIniFile, RemoveRegistry, ReserveCost, - SelfReg, ServiceControl, ServiceInstall, SFPCatalog, @@ -165,7 +159,6 @@ namespace WixToolset.Data WixCustomTable, WixDeltaPatchFile, WixDeltaPatchSymbolPaths, - WixDirectory, WixEnsureTable, WixFeatureGroup, WixFeatureModules, @@ -175,7 +168,6 @@ namespace WixToolset.Data WixGroup, WixInstanceComponent, WixInstanceTransforms, - WixMedia, WixMediaTemplate, WixMerge, WixOrdering, @@ -221,17 +213,8 @@ namespace WixToolset.Data { switch (type) { - case TupleDefinitionType._Streams: - return TupleDefinitions._Streams; - - case TupleDefinitionType._SummaryInformation: - return TupleDefinitions._SummaryInformation; - - case TupleDefinitionType._TransformView: - return TupleDefinitions._TransformView; - - case TupleDefinitionType._Validation: - return TupleDefinitions._Validation; + case TupleDefinitionType.SummaryInformation: + return TupleDefinitions.SummaryInformation; case TupleDefinitionType.ActionText: return TupleDefinitions.ActionText; @@ -260,9 +243,6 @@ namespace WixToolset.Data case TupleDefinitionType.Binary: return TupleDefinitions.Binary; - case TupleDefinitionType.BindImage: - return TupleDefinitions.BindImage; - case TupleDefinitionType.CCPSearch: return TupleDefinitions.CCPSearch; @@ -344,9 +324,6 @@ namespace WixToolset.Data case TupleDefinitionType.FileSFPCatalog: return TupleDefinitions.FileSFPCatalog; - case TupleDefinitionType.Font: - return TupleDefinitions.Font; - case TupleDefinitionType.Icon: return TupleDefinitions.Icon; @@ -539,9 +516,6 @@ namespace WixToolset.Data case TupleDefinitionType.ReserveCost: return TupleDefinitions.ReserveCost; - case TupleDefinitionType.SelfReg: - return TupleDefinitions.SelfReg; - case TupleDefinitionType.ServiceControl: return TupleDefinitions.ServiceControl; @@ -695,9 +669,6 @@ namespace WixToolset.Data case TupleDefinitionType.WixDeltaPatchSymbolPaths: return TupleDefinitions.WixDeltaPatchSymbolPaths; - case TupleDefinitionType.WixDirectory: - return TupleDefinitions.WixDirectory; - case TupleDefinitionType.WixEnsureTable: return TupleDefinitions.WixEnsureTable; @@ -725,9 +696,6 @@ namespace WixToolset.Data case TupleDefinitionType.WixInstanceTransforms: return TupleDefinitions.WixInstanceTransforms; - case TupleDefinitionType.WixMedia: - return TupleDefinitions.WixMedia; - case TupleDefinitionType.WixMediaTemplate: return TupleDefinitions.WixMediaTemplate; diff --git a/src/WixToolset.Data/Tuples/TypeLibTuple.cs b/src/WixToolset.Data/Tuples/TypeLibTuple.cs index de2a8823..72169a60 100644 --- a/src/WixToolset.Data/Tuples/TypeLibTuple.cs +++ b/src/WixToolset.Data/Tuples/TypeLibTuple.cs @@ -10,7 +10,7 @@ namespace WixToolset.Data TupleDefinitionType.TypeLib, new[] { - new IntermediateFieldDefinition(nameof(TypeLibTupleFields.LibID), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(TypeLibTupleFields.LibId), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(TypeLibTupleFields.Language), IntermediateFieldType.Number), new IntermediateFieldDefinition(nameof(TypeLibTupleFields.Component_), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(TypeLibTupleFields.Version), IntermediateFieldType.Number), @@ -27,7 +27,7 @@ namespace WixToolset.Data.Tuples { public enum TypeLibTupleFields { - LibID, + LibId, Language, Component_, Version, @@ -49,10 +49,10 @@ namespace WixToolset.Data.Tuples public IntermediateField this[TypeLibTupleFields index] => this.Fields[(int)index]; - public string LibID + public string LibId { - get => (string)this.Fields[(int)TypeLibTupleFields.LibID]; - set => this.Set((int)TypeLibTupleFields.LibID, value); + get => (string)this.Fields[(int)TypeLibTupleFields.LibId]; + set => this.Set((int)TypeLibTupleFields.LibId, value); } public int Language @@ -97,4 +97,4 @@ namespace WixToolset.Data.Tuples set => this.Set((int)TypeLibTupleFields.Cost, value); } } -} \ No newline at end of file +} diff --git a/src/WixToolset.Data/Tuples/UITextTuple.cs b/src/WixToolset.Data/Tuples/UITextTuple.cs index b6356b99..fee04597 100644 --- a/src/WixToolset.Data/Tuples/UITextTuple.cs +++ b/src/WixToolset.Data/Tuples/UITextTuple.cs @@ -10,7 +10,6 @@ namespace WixToolset.Data TupleDefinitionType.UIText, new[] { - new IntermediateFieldDefinition(nameof(UITextTupleFields.Key), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(UITextTupleFields.Text), IntermediateFieldType.String), }, typeof(UITextTuple)); @@ -21,7 +20,6 @@ namespace WixToolset.Data.Tuples { public enum UITextTupleFields { - Key, Text, } @@ -37,16 +35,10 @@ namespace WixToolset.Data.Tuples public IntermediateField this[UITextTupleFields index] => this.Fields[(int)index]; - public string Key - { - get => (string)this.Fields[(int)UITextTupleFields.Key]; - set => this.Set((int)UITextTupleFields.Key, value); - } - public string Text { get => (string)this.Fields[(int)UITextTupleFields.Text]; set => this.Set((int)UITextTupleFields.Text, value); } } -} \ No newline at end of file +} diff --git a/src/WixToolset.Data/Tuples/UpgradedFiles_OptionalDataTuple.cs b/src/WixToolset.Data/Tuples/UpgradedFiles_OptionalDataTuple.cs index 9e764adf..7099021e 100644 --- a/src/WixToolset.Data/Tuples/UpgradedFiles_OptionalDataTuple.cs +++ b/src/WixToolset.Data/Tuples/UpgradedFiles_OptionalDataTuple.cs @@ -13,8 +13,8 @@ namespace WixToolset.Data new IntermediateFieldDefinition(nameof(UpgradedFiles_OptionalDataTupleFields.Upgraded), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(UpgradedFiles_OptionalDataTupleFields.FTK), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(UpgradedFiles_OptionalDataTupleFields.SymbolPaths), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(UpgradedFiles_OptionalDataTupleFields.AllowIgnoreOnPatchError), IntermediateFieldType.Number), - new IntermediateFieldDefinition(nameof(UpgradedFiles_OptionalDataTupleFields.IncludeWholeFile), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(UpgradedFiles_OptionalDataTupleFields.AllowIgnoreOnPatchError), IntermediateFieldType.Bool), + new IntermediateFieldDefinition(nameof(UpgradedFiles_OptionalDataTupleFields.IncludeWholeFile), IntermediateFieldType.Bool), }, typeof(UpgradedFiles_OptionalDataTuple)); } @@ -61,16 +61,16 @@ namespace WixToolset.Data.Tuples set => this.Set((int)UpgradedFiles_OptionalDataTupleFields.SymbolPaths, value); } - public int AllowIgnoreOnPatchError + public bool AllowIgnoreOnPatchError { - get => (int)this.Fields[(int)UpgradedFiles_OptionalDataTupleFields.AllowIgnoreOnPatchError]; + get => (bool)this.Fields[(int)UpgradedFiles_OptionalDataTupleFields.AllowIgnoreOnPatchError]; set => this.Set((int)UpgradedFiles_OptionalDataTupleFields.AllowIgnoreOnPatchError, value); } - public int IncludeWholeFile + public bool IncludeWholeFile { - get => (int)this.Fields[(int)UpgradedFiles_OptionalDataTupleFields.IncludeWholeFile]; + get => (bool)this.Fields[(int)UpgradedFiles_OptionalDataTupleFields.IncludeWholeFile]; set => this.Set((int)UpgradedFiles_OptionalDataTupleFields.IncludeWholeFile, value); } } -} \ No newline at end of file +} diff --git a/src/WixToolset.Data/Tuples/WixActionTuple.cs b/src/WixToolset.Data/Tuples/WixActionTuple.cs index 148f28d9..716fd46b 100644 --- a/src/WixToolset.Data/Tuples/WixActionTuple.cs +++ b/src/WixToolset.Data/Tuples/WixActionTuple.cs @@ -10,7 +10,7 @@ namespace WixToolset.Data TupleDefinitionType.WixAction, new[] { - new IntermediateFieldDefinition(nameof(WixActionTupleFields.SequenceTable), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixActionTupleFields.SequenceTable), IntermediateFieldType.Number), new IntermediateFieldDefinition(nameof(WixActionTupleFields.Action), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixActionTupleFields.Condition), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixActionTupleFields.Sequence), IntermediateFieldType.Number), @@ -41,7 +41,7 @@ namespace WixToolset.Data.Tuples { AdminUISequence, AdminExecuteSequence, - AdvtExecuteSequence, + AdvertiseExecuteSequence, InstallUISequence, InstallExecuteSequence } @@ -60,8 +60,8 @@ namespace WixToolset.Data.Tuples public SequenceTable SequenceTable { - get => (SequenceTable)Enum.Parse(typeof(SequenceTable), (string)this.Fields[(int)WixActionTupleFields.SequenceTable]); - set => this.Set((int)WixActionTupleFields.SequenceTable, value.ToString()); + get => (SequenceTable)this.Fields[(int)WixActionTupleFields.SequenceTable].AsNumber(); + set => this.Set((int)WixActionTupleFields.SequenceTable, (int)value); } public string Action @@ -76,9 +76,9 @@ namespace WixToolset.Data.Tuples set => this.Set((int)WixActionTupleFields.Condition, value); } - public int Sequence + public int? Sequence { - get => (int)this.Fields[(int)WixActionTupleFields.Sequence]; + get => (int?)this.Fields[(int)WixActionTupleFields.Sequence]; set => this.Set((int)WixActionTupleFields.Sequence, value); } diff --git a/src/WixToolset.Data/Tuples/WixApprovedExeForElevationTuple.cs b/src/WixToolset.Data/Tuples/WixApprovedExeForElevationTuple.cs index 8916cdfc..e2326697 100644 --- a/src/WixToolset.Data/Tuples/WixApprovedExeForElevationTuple.cs +++ b/src/WixToolset.Data/Tuples/WixApprovedExeForElevationTuple.cs @@ -10,7 +10,6 @@ namespace WixToolset.Data TupleDefinitionType.WixApprovedExeForElevation, new[] { - new IntermediateFieldDefinition(nameof(WixApprovedExeForElevationTupleFields.Id), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixApprovedExeForElevationTupleFields.Key), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixApprovedExeForElevationTupleFields.Value), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixApprovedExeForElevationTupleFields.Attributes), IntermediateFieldType.Number), @@ -23,7 +22,6 @@ namespace WixToolset.Data.Tuples { public enum WixApprovedExeForElevationTupleFields { - Id, Key, Value, Attributes, @@ -41,12 +39,6 @@ namespace WixToolset.Data.Tuples public IntermediateField this[WixApprovedExeForElevationTupleFields index] => this.Fields[(int)index]; - public string Id - { - get => (string)this.Fields[(int)WixApprovedExeForElevationTupleFields.Id]; - set => this.Set((int)WixApprovedExeForElevationTupleFields.Id, value); - } - public string Key { get => (string)this.Fields[(int)WixApprovedExeForElevationTupleFields.Key]; @@ -59,10 +51,10 @@ namespace WixToolset.Data.Tuples set => this.Set((int)WixApprovedExeForElevationTupleFields.Value, value); } - public int Attributes + public BundleApprovedExeForElevationAttributes Attributes { - get => (int)this.Fields[(int)WixApprovedExeForElevationTupleFields.Attributes]; - set => this.Set((int)WixApprovedExeForElevationTupleFields.Attributes, value); + get => (BundleApprovedExeForElevationAttributes)this.Fields[(int)WixApprovedExeForElevationTupleFields.Attributes].AsNumber(); + set => this.Set((int)WixApprovedExeForElevationTupleFields.Attributes, (int)value); } } } \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixBootstrapperApplicationTuple.cs b/src/WixToolset.Data/Tuples/WixBootstrapperApplicationTuple.cs index e80d6321..e3c1490f 100644 --- a/src/WixToolset.Data/Tuples/WixBootstrapperApplicationTuple.cs +++ b/src/WixToolset.Data/Tuples/WixBootstrapperApplicationTuple.cs @@ -8,10 +8,7 @@ namespace WixToolset.Data { public static readonly IntermediateTupleDefinition WixBootstrapperApplication = new IntermediateTupleDefinition( TupleDefinitionType.WixBootstrapperApplication, - new[] - { - new IntermediateFieldDefinition(nameof(WixBootstrapperApplicationTupleFields.Id), IntermediateFieldType.String), - }, + new IntermediateFieldDefinition[0], typeof(WixBootstrapperApplicationTuple)); } } @@ -20,7 +17,6 @@ namespace WixToolset.Data.Tuples { public enum WixBootstrapperApplicationTupleFields { - Id, } public class WixBootstrapperApplicationTuple : IntermediateTuple @@ -34,11 +30,5 @@ namespace WixToolset.Data.Tuples } public IntermediateField this[WixBootstrapperApplicationTupleFields index] => this.Fields[(int)index]; - - public string Id - { - get => (string)this.Fields[(int)WixBootstrapperApplicationTupleFields.Id]; - set => this.Set((int)WixBootstrapperApplicationTupleFields.Id, value); - } - } -} \ No newline at end of file + } +} diff --git a/src/WixToolset.Data/Tuples/WixBundleContainerTuple.cs b/src/WixToolset.Data/Tuples/WixBundleContainerTuple.cs index c9d8e12f..ed12a804 100644 --- a/src/WixToolset.Data/Tuples/WixBundleContainerTuple.cs +++ b/src/WixToolset.Data/Tuples/WixBundleContainerTuple.cs @@ -10,11 +10,10 @@ namespace WixToolset.Data TupleDefinitionType.WixBundleContainer, new[] { - new IntermediateFieldDefinition(nameof(WixBundleContainerTupleFields.WixBundleContainer), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixBundleContainerTupleFields.Name), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixBundleContainerTupleFields.Type), IntermediateFieldType.Number), new IntermediateFieldDefinition(nameof(WixBundleContainerTupleFields.DownloadUrl), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(WixBundleContainerTupleFields.Size), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixBundleContainerTupleFields.Size), IntermediateFieldType.LargeNumber), new IntermediateFieldDefinition(nameof(WixBundleContainerTupleFields.Hash), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixBundleContainerTupleFields.AttachedContainerIndex), IntermediateFieldType.Number), new IntermediateFieldDefinition(nameof(WixBundleContainerTupleFields.WorkingPath), IntermediateFieldType.String), @@ -29,7 +28,6 @@ namespace WixToolset.Data.Tuples public enum WixBundleContainerTupleFields { - WixBundleContainer, Name, Type, DownloadUrl, @@ -60,12 +58,6 @@ namespace WixToolset.Data.Tuples public IntermediateField this[WixBundleContainerTupleFields index] => this.Fields[(int)index]; - public string WixBundleContainer - { - get => (string)this.Fields[(int)WixBundleContainerTupleFields.WixBundleContainer]; - set => this.Set((int)WixBundleContainerTupleFields.WixBundleContainer, value); - } - public string Name { get => (string)this.Fields[(int)WixBundleContainerTupleFields.Name]; @@ -74,8 +66,8 @@ namespace WixToolset.Data.Tuples public ContainerType Type { - get => (ContainerType)Enum.Parse(typeof(ContainerType), (string)this.Fields[(int)WixBundleContainerTupleFields.Type], true); - set => this.Set((int)WixBundleContainerTupleFields.Type, value.ToString()); + get => (ContainerType)this.Fields[(int)WixBundleContainerTupleFields.Type].AsNumber(); + set => this.Set((int)WixBundleContainerTupleFields.Type, (int)value); } public string DownloadUrl @@ -84,9 +76,9 @@ namespace WixToolset.Data.Tuples set => this.Set((int)WixBundleContainerTupleFields.DownloadUrl, value); } - public int Size + public long Size { - get => (int)this.Fields[(int)WixBundleContainerTupleFields.Size]; + get => (long)this.Fields[(int)WixBundleContainerTupleFields.Size]; set => this.Set((int)WixBundleContainerTupleFields.Size, value); } @@ -108,4 +100,4 @@ namespace WixToolset.Data.Tuples set => this.Set((int)WixBundleContainerTupleFields.WorkingPath, value); } } -} \ No newline at end of file +} diff --git a/src/WixToolset.Data/Tuples/WixBundlePropertiesTuple.cs b/src/WixToolset.Data/Tuples/WixBundlePropertiesTuple.cs index fef0c997..ae610aac 100644 --- a/src/WixToolset.Data/Tuples/WixBundlePropertiesTuple.cs +++ b/src/WixToolset.Data/Tuples/WixBundlePropertiesTuple.cs @@ -13,7 +13,7 @@ namespace WixToolset.Data new IntermediateFieldDefinition(nameof(WixBundlePropertiesTupleFields.DisplayName), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixBundlePropertiesTupleFields.LogPathVariable), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixBundlePropertiesTupleFields.Compressed), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(WixBundlePropertiesTupleFields.Id), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundlePropertiesTupleFields.BundleId), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixBundlePropertiesTupleFields.UpgradeCode), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixBundlePropertiesTupleFields.PerMachine), IntermediateFieldType.String), }, @@ -28,7 +28,7 @@ namespace WixToolset.Data.Tuples DisplayName, LogPathVariable, Compressed, - Id, + BundleId, UpgradeCode, PerMachine, } @@ -63,10 +63,10 @@ namespace WixToolset.Data.Tuples set => this.Set((int)WixBundlePropertiesTupleFields.Compressed, value); } - public string Id + public string BundleId { - get => (string)this.Fields[(int)WixBundlePropertiesTupleFields.Id]; - set => this.Set((int)WixBundlePropertiesTupleFields.Id, value); + get => (string)this.Fields[(int)WixBundlePropertiesTupleFields.BundleId]; + set => this.Set((int)WixBundlePropertiesTupleFields.BundleId, value); } public string UpgradeCode diff --git a/src/WixToolset.Data/Tuples/WixBundleRelatedPackageTuple.cs b/src/WixToolset.Data/Tuples/WixBundleRelatedPackageTuple.cs index 7b1bed66..ef620b26 100644 --- a/src/WixToolset.Data/Tuples/WixBundleRelatedPackageTuple.cs +++ b/src/WixToolset.Data/Tuples/WixBundleRelatedPackageTuple.cs @@ -10,8 +10,7 @@ namespace WixToolset.Data TupleDefinitionType.WixBundleRelatedPackage, new[] { - new IntermediateFieldDefinition(nameof(WixBundleRelatedPackageTupleFields.WixBundlePackage_), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(WixBundleRelatedPackageTupleFields.Id), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleRelatedPackageTupleFields.RelatedId), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixBundleRelatedPackageTupleFields.MinVersion), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixBundleRelatedPackageTupleFields.MaxVersion), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixBundleRelatedPackageTupleFields.Languages), IntermediateFieldType.String), @@ -28,8 +27,7 @@ namespace WixToolset.Data.Tuples { public enum WixBundleRelatedPackageTupleFields { - WixBundlePackage_, - Id, + RelatedId, MinVersion, MaxVersion, Languages, @@ -51,16 +49,10 @@ namespace WixToolset.Data.Tuples public IntermediateField this[WixBundleRelatedPackageTupleFields index] => this.Fields[(int)index]; - public string WixBundlePackage_ + public string RelatedId { - get => (string)this.Fields[(int)WixBundleRelatedPackageTupleFields.WixBundlePackage_]; - set => this.Set((int)WixBundleRelatedPackageTupleFields.WixBundlePackage_, value); - } - - public string Id - { - get => (string)this.Fields[(int)WixBundleRelatedPackageTupleFields.Id]; - set => this.Set((int)WixBundleRelatedPackageTupleFields.Id, value); + get => (string)this.Fields[(int)WixBundleRelatedPackageTupleFields.RelatedId]; + set => this.Set((int)WixBundleRelatedPackageTupleFields.RelatedId, value); } public string MinVersion diff --git a/src/WixToolset.Data/Tuples/WixBundleVariableTuple.cs b/src/WixToolset.Data/Tuples/WixBundleVariableTuple.cs index b71f20e1..d7d74657 100644 --- a/src/WixToolset.Data/Tuples/WixBundleVariableTuple.cs +++ b/src/WixToolset.Data/Tuples/WixBundleVariableTuple.cs @@ -10,7 +10,6 @@ namespace WixToolset.Data TupleDefinitionType.WixBundleVariable, new[] { - new IntermediateFieldDefinition(nameof(WixBundleVariableTupleFields.WixBundleVariable), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixBundleVariableTupleFields.Value), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixBundleVariableTupleFields.Type), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixBundleVariableTupleFields.Hidden), IntermediateFieldType.Bool), @@ -24,7 +23,6 @@ namespace WixToolset.Data.Tuples { public enum WixBundleVariableTupleFields { - WixBundleVariable, Value, Type, Hidden, @@ -43,12 +41,6 @@ namespace WixToolset.Data.Tuples public IntermediateField this[WixBundleVariableTupleFields index] => this.Fields[(int)index]; - public string WixBundleVariable - { - get => (string)this.Fields[(int)WixBundleVariableTupleFields.WixBundleVariable]; - set => this.Set((int)WixBundleVariableTupleFields.WixBundleVariable, value); - } - public string Value { get => (string)this.Fields[(int)WixBundleVariableTupleFields.Value]; @@ -73,4 +65,4 @@ namespace WixToolset.Data.Tuples set => this.Set((int)WixBundleVariableTupleFields.Persisted, value); } } -} \ No newline at end of file +} diff --git a/src/WixToolset.Data/Tuples/WixChainItemTuple.cs b/src/WixToolset.Data/Tuples/WixChainItemTuple.cs index 12383f53..a6541c43 100644 --- a/src/WixToolset.Data/Tuples/WixChainItemTuple.cs +++ b/src/WixToolset.Data/Tuples/WixChainItemTuple.cs @@ -8,10 +8,7 @@ namespace WixToolset.Data { public static readonly IntermediateTupleDefinition WixChainItem = new IntermediateTupleDefinition( TupleDefinitionType.WixChainItem, - new[] - { - new IntermediateFieldDefinition(nameof(WixChainItemTupleFields.Id), IntermediateFieldType.String), - }, + new IntermediateFieldDefinition[0], typeof(WixChainItemTuple)); } } @@ -20,7 +17,6 @@ namespace WixToolset.Data.Tuples { public enum WixChainItemTupleFields { - Id, } public class WixChainItemTuple : IntermediateTuple @@ -34,11 +30,5 @@ namespace WixToolset.Data.Tuples } public IntermediateField this[WixChainItemTupleFields index] => this.Fields[(int)index]; - - public string Id - { - get => (string)this.Fields[(int)WixChainItemTupleFields.Id]; - set => this.Set((int)WixChainItemTupleFields.Id, value); - } } } \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixCustomTableTuple.cs b/src/WixToolset.Data/Tuples/WixCustomTableTuple.cs index fd21fe2d..cf4e60db 100644 --- a/src/WixToolset.Data/Tuples/WixCustomTableTuple.cs +++ b/src/WixToolset.Data/Tuples/WixCustomTableTuple.cs @@ -10,7 +10,6 @@ namespace WixToolset.Data TupleDefinitionType.WixCustomTable, new[] { - new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.Table), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.ColumnCount), IntermediateFieldType.Number), new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.ColumnNames), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.ColumnTypes), IntermediateFieldType.String), @@ -33,7 +32,6 @@ namespace WixToolset.Data.Tuples { public enum WixCustomTableTupleFields { - Table, ColumnCount, ColumnNames, ColumnTypes, @@ -61,12 +59,6 @@ namespace WixToolset.Data.Tuples public IntermediateField this[WixCustomTableTupleFields index] => this.Fields[(int)index]; - public string Table - { - get => (string)this.Fields[(int)WixCustomTableTupleFields.Table]; - set => this.Set((int)WixCustomTableTupleFields.Table, value); - } - public int ColumnCount { get => (int)this.Fields[(int)WixCustomTableTupleFields.ColumnCount]; @@ -139,10 +131,10 @@ namespace WixToolset.Data.Tuples set => this.Set((int)WixCustomTableTupleFields.Modularizations, value); } - public int BootstrapperApplicationData + public bool BootstrapperApplicationData { - get => (int)this.Fields[(int)WixCustomTableTupleFields.BootstrapperApplicationData]; + get => (bool)this.Fields[(int)WixCustomTableTupleFields.BootstrapperApplicationData]; set => this.Set((int)WixCustomTableTupleFields.BootstrapperApplicationData, value); } } -} \ No newline at end of file +} diff --git a/src/WixToolset.Data/Tuples/WixDeltaPatchFileTuple.cs b/src/WixToolset.Data/Tuples/WixDeltaPatchFileTuple.cs index a8e191df..48d0a96c 100644 --- a/src/WixToolset.Data/Tuples/WixDeltaPatchFileTuple.cs +++ b/src/WixToolset.Data/Tuples/WixDeltaPatchFileTuple.cs @@ -10,7 +10,6 @@ namespace WixToolset.Data TupleDefinitionType.WixDeltaPatchFile, new[] { - new IntermediateFieldDefinition(nameof(WixDeltaPatchFileTupleFields.File_), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixDeltaPatchFileTupleFields.RetainLengths), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixDeltaPatchFileTupleFields.IgnoreOffsets), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixDeltaPatchFileTupleFields.IgnoreLengths), IntermediateFieldType.String), @@ -25,7 +24,6 @@ namespace WixToolset.Data.Tuples { public enum WixDeltaPatchFileTupleFields { - File_, RetainLengths, IgnoreOffsets, IgnoreLengths, @@ -45,12 +43,6 @@ namespace WixToolset.Data.Tuples public IntermediateField this[WixDeltaPatchFileTupleFields index] => this.Fields[(int)index]; - public string File_ - { - get => (string)this.Fields[(int)WixDeltaPatchFileTupleFields.File_]; - set => this.Set((int)WixDeltaPatchFileTupleFields.File_, value); - } - public string RetainLengths { get => (string)this.Fields[(int)WixDeltaPatchFileTupleFields.RetainLengths]; diff --git a/src/WixToolset.Data/Tuples/WixDeltaPatchSymbolPathsTuple.cs b/src/WixToolset.Data/Tuples/WixDeltaPatchSymbolPathsTuple.cs index 9537db3a..13a2e1c9 100644 --- a/src/WixToolset.Data/Tuples/WixDeltaPatchSymbolPathsTuple.cs +++ b/src/WixToolset.Data/Tuples/WixDeltaPatchSymbolPathsTuple.cs @@ -12,8 +12,8 @@ namespace WixToolset.Data TupleDefinitionType.WixDeltaPatchSymbolPaths, new[] { - new IntermediateFieldDefinition(nameof(WixDeltaPatchSymbolPathsTupleFields.Id), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(WixDeltaPatchSymbolPathsTupleFields.Type), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixDeltaPatchSymbolPathsTupleFields.SymbolType), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixDeltaPatchSymbolPathsTupleFields.SymbolId), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixDeltaPatchSymbolPathsTupleFields.SymbolPaths), IntermediateFieldType.String), }, typeof(WixDeltaPatchSymbolPathsTuple)); @@ -24,8 +24,8 @@ namespace WixToolset.Data.Tuples { public enum WixDeltaPatchSymbolPathsTupleFields { - Id, - Type, + SymbolType, + SymbolId, SymbolPaths, } @@ -48,22 +48,22 @@ namespace WixToolset.Data.Tuples { } - public WixDeltaPatchSymbolPathsTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixDeltaPatchSymbolPaths, sourceLineNumber, id) + public WixDeltaPatchSymbolPathsTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixDeltaPatchSymbolPaths, sourceLineNumber, null) { } public IntermediateField this[WixDeltaPatchSymbolPathsTupleFields index] => this.Fields[(int)index]; - public string Id + public SymbolPathType SymbolType { - get => (string)this.Fields[(int)WixDeltaPatchSymbolPathsTupleFields.Id]; - set => this.Set((int)WixDeltaPatchSymbolPathsTupleFields.Id, value); + get => (SymbolPathType)this.Fields[(int)WixDeltaPatchSymbolPathsTupleFields.SymbolType].AsNumber(); + set => this.Set((int)WixDeltaPatchSymbolPathsTupleFields.SymbolType, (int)value); } - public SymbolPathType Type + public string SymbolId { - get => (SymbolPathType)Enum.Parse(typeof(SymbolPathType), (string)this.Fields[(int)WixDeltaPatchSymbolPathsTupleFields.Type], true); - set => this.Set((int)WixDeltaPatchSymbolPathsTupleFields.Type, value.ToString()); + get => (string)this.Fields[(int)WixDeltaPatchSymbolPathsTupleFields.SymbolId]; + set => this.Set((int)WixDeltaPatchSymbolPathsTupleFields.SymbolId, value); } public string SymbolPaths diff --git a/src/WixToolset.Data/Tuples/WixDirectoryTuple.cs b/src/WixToolset.Data/Tuples/WixDirectoryTuple.cs deleted file mode 100644 index ce706dc4..00000000 --- a/src/WixToolset.Data/Tuples/WixDirectoryTuple.cs +++ /dev/null @@ -1,52 +0,0 @@ -// 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 WixDirectory = new IntermediateTupleDefinition( - TupleDefinitionType.WixDirectory, - new[] - { - new IntermediateFieldDefinition(nameof(WixDirectoryTupleFields.Directory_), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(WixDirectoryTupleFields.ComponentGuidGenerationSeed), IntermediateFieldType.String), - }, - typeof(WixDirectoryTuple)); - } -} - -namespace WixToolset.Data.Tuples -{ - public enum WixDirectoryTupleFields - { - Directory_, - ComponentGuidGenerationSeed, - } - - public class WixDirectoryTuple : IntermediateTuple - { - public WixDirectoryTuple() : base(TupleDefinitions.WixDirectory, null, null) - { - } - - public WixDirectoryTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixDirectory, sourceLineNumber, id) - { - } - - public IntermediateField this[WixDirectoryTupleFields index] => this.Fields[(int)index]; - - public string Directory_ - { - get => (string)this.Fields[(int)WixDirectoryTupleFields.Directory_]?.Value; - set => this.Set((int)WixDirectoryTupleFields.Directory_, value); - } - - public string ComponentGuidGenerationSeed - { - get => (string)this.Fields[(int)WixDirectoryTupleFields.ComponentGuidGenerationSeed]?.Value; - set => this.Set((int)WixDirectoryTupleFields.ComponentGuidGenerationSeed, value); - } - } -} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixFileTuple.cs b/src/WixToolset.Data/Tuples/WixFileTuple.cs index 077622b7..34493796 100644 --- a/src/WixToolset.Data/Tuples/WixFileTuple.cs +++ b/src/WixToolset.Data/Tuples/WixFileTuple.cs @@ -10,7 +10,6 @@ namespace WixToolset.Data TupleDefinitionType.WixFile, new[] { - new IntermediateFieldDefinition(nameof(WixFileTupleFields.File_), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixFileTupleFields.AssemblyType), IntermediateFieldType.Number), new IntermediateFieldDefinition(nameof(WixFileTupleFields.File_AssemblyManifest), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixFileTupleFields.File_AssemblyApplication), IntermediateFieldType.String), @@ -33,7 +32,6 @@ namespace WixToolset.Data.Tuples public enum WixFileTupleFields { - File_, AssemblyType, File_AssemblyManifest, File_AssemblyApplication, @@ -95,12 +93,6 @@ namespace WixToolset.Data.Tuples public IntermediateField this[WixFileTupleFields index] => this.Fields[(int)index]; - public string File_ - { - get => (string)this.Fields[(int)WixFileTupleFields.File_]; - set => this.Set((int)WixFileTupleFields.File_, value); - } - public FileAssemblyType AssemblyType { get => (FileAssemblyType)(int)this.Fields[(int)WixFileTupleFields.AssemblyType]; @@ -155,10 +147,10 @@ namespace WixToolset.Data.Tuples set => this.Set((int)WixFileTupleFields.Attributes, value); } - public PatchAttributeType PatchAttributes + public PatchAttributeType? PatchAttributes { - get => (PatchAttributeType)(int)this.Fields[(int)WixFileTupleFields.PatchAttributes]; - set => this.Set((int)WixFileTupleFields.PatchAttributes, (int)value); + get => (PatchAttributeType?)this.Fields[(int)WixFileTupleFields.PatchAttributes].AsNullableNumber(); + set => this.Set((int)WixFileTupleFields.PatchAttributes, (int?)value); } public string DeltaPatchHeaderSource diff --git a/src/WixToolset.Data/Tuples/WixInstanceTransformsTuple.cs b/src/WixToolset.Data/Tuples/WixInstanceTransformsTuple.cs index a72bad0f..efcaa7b9 100644 --- a/src/WixToolset.Data/Tuples/WixInstanceTransformsTuple.cs +++ b/src/WixToolset.Data/Tuples/WixInstanceTransformsTuple.cs @@ -10,7 +10,6 @@ namespace WixToolset.Data TupleDefinitionType.WixInstanceTransforms, new[] { - new IntermediateFieldDefinition(nameof(WixInstanceTransformsTupleFields.Id), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixInstanceTransformsTupleFields.PropertyId), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixInstanceTransformsTupleFields.ProductCode), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixInstanceTransformsTupleFields.ProductName), IntermediateFieldType.String), @@ -24,7 +23,6 @@ namespace WixToolset.Data.Tuples { public enum WixInstanceTransformsTupleFields { - Id, PropertyId, ProductCode, ProductName, @@ -43,12 +41,6 @@ namespace WixToolset.Data.Tuples public IntermediateField this[WixInstanceTransformsTupleFields index] => this.Fields[(int)index]; - public string Id - { - get => (string)this.Fields[(int)WixInstanceTransformsTupleFields.Id]; - set => this.Set((int)WixInstanceTransformsTupleFields.Id, value); - } - public string PropertyId { get => (string)this.Fields[(int)WixInstanceTransformsTupleFields.PropertyId]; @@ -73,4 +65,4 @@ namespace WixToolset.Data.Tuples set => this.Set((int)WixInstanceTransformsTupleFields.UpgradeCode, value); } } -} \ No newline at end of file +} diff --git a/src/WixToolset.Data/Tuples/WixMediaTemplateTuple.cs b/src/WixToolset.Data/Tuples/WixMediaTemplateTuple.cs index 4e71be2d..c0cc13ac 100644 --- a/src/WixToolset.Data/Tuples/WixMediaTemplateTuple.cs +++ b/src/WixToolset.Data/Tuples/WixMediaTemplateTuple.cs @@ -11,7 +11,7 @@ namespace WixToolset.Data new[] { new IntermediateFieldDefinition(nameof(WixMediaTemplateTupleFields.CabinetTemplate), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(WixMediaTemplateTupleFields.CompressionLevel), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixMediaTemplateTupleFields.CompressionLevel), IntermediateFieldType.Number), new IntermediateFieldDefinition(nameof(WixMediaTemplateTupleFields.DiskPrompt), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixMediaTemplateTupleFields.VolumeLabel), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixMediaTemplateTupleFields.MaximumUncompressedMediaSize), IntermediateFieldType.Number), @@ -55,13 +55,8 @@ namespace WixToolset.Data.Tuples public CompressionLevel? CompressionLevel { - get - { - var value = (string)this.Fields[(int)WixMediaTupleFields.CompressionLevel]; - return String.IsNullOrEmpty(value) ? null : (CompressionLevel?)Enum.Parse(typeof(CompressionLevel), value, true); - } - - set => this.Set((int)WixMediaTupleFields.CompressionLevel, value?.ToString()); + get => (CompressionLevel?)this.Fields[(int)WixMediaTemplateTupleFields.CompressionLevel].AsNullableNumber(); + set => this.Set((int)WixMediaTemplateTupleFields.CompressionLevel, (int?)value); } public string DiskPrompt @@ -76,15 +71,15 @@ namespace WixToolset.Data.Tuples set => this.Set((int)WixMediaTemplateTupleFields.VolumeLabel, value); } - public int MaximumUncompressedMediaSize + public int? MaximumUncompressedMediaSize { - get => (int)this.Fields[(int)WixMediaTemplateTupleFields.MaximumUncompressedMediaSize]; + get => (int?)this.Fields[(int)WixMediaTemplateTupleFields.MaximumUncompressedMediaSize]; set => this.Set((int)WixMediaTemplateTupleFields.MaximumUncompressedMediaSize, value); } - public int MaximumCabinetSizeForLargeFileSplitting + public int? MaximumCabinetSizeForLargeFileSplitting { - get => (int)this.Fields[(int)WixMediaTemplateTupleFields.MaximumCabinetSizeForLargeFileSplitting]; + get => (int?)this.Fields[(int)WixMediaTemplateTupleFields.MaximumCabinetSizeForLargeFileSplitting]; set => this.Set((int)WixMediaTemplateTupleFields.MaximumCabinetSizeForLargeFileSplitting, value); } } diff --git a/src/WixToolset.Data/Tuples/WixMediaTuple.cs b/src/WixToolset.Data/Tuples/WixMediaTuple.cs deleted file mode 100644 index a705a4a2..00000000 --- a/src/WixToolset.Data/Tuples/WixMediaTuple.cs +++ /dev/null @@ -1,62 +0,0 @@ -// 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 WixMedia = new IntermediateTupleDefinition( - TupleDefinitionType.WixMedia, - new[] - { - new IntermediateFieldDefinition(nameof(WixMediaTupleFields.DiskId_), IntermediateFieldType.Number), - new IntermediateFieldDefinition(nameof(WixMediaTupleFields.CompressionLevel), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(WixMediaTupleFields.Layout), IntermediateFieldType.String), - }, - typeof(WixMediaTuple)); - } -} - -namespace WixToolset.Data.Tuples -{ - using System; - - public enum WixMediaTupleFields - { - DiskId_, - CompressionLevel, - Layout, - } - - public class WixMediaTuple : IntermediateTuple - { - public WixMediaTuple() : base(TupleDefinitions.WixMedia, null, null) - { - } - - public WixMediaTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixMedia, sourceLineNumber, id) - { - } - - public IntermediateField this[WixMediaTupleFields index] => this.Fields[(int)index]; - - public int DiskId_ - { - get => (int)this.Fields[(int)WixMediaTupleFields.DiskId_]; - set => this.Set((int)WixMediaTupleFields.DiskId_, value); - } - - public CompressionLevel? CompressionLevel - { - get => Enum.TryParse((string)this.Fields[(int)WixMediaTupleFields.CompressionLevel], true, out CompressionLevel value) ? value : (CompressionLevel?)null; - set => this.Set((int)WixMediaTupleFields.CompressionLevel, value?.ToString()); - } - - public string Layout - { - get => (string)this.Fields[(int)WixMediaTupleFields.Layout]; - set => this.Set((int)WixMediaTupleFields.Layout, value); - } - } -} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixMergeTuple.cs b/src/WixToolset.Data/Tuples/WixMergeTuple.cs index 6c5120b5..51c55a85 100644 --- a/src/WixToolset.Data/Tuples/WixMergeTuple.cs +++ b/src/WixToolset.Data/Tuples/WixMergeTuple.cs @@ -10,7 +10,6 @@ namespace WixToolset.Data TupleDefinitionType.WixMerge, new[] { - new IntermediateFieldDefinition(nameof(WixMergeTupleFields.WixMerge), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixMergeTupleFields.Language), IntermediateFieldType.Number), new IntermediateFieldDefinition(nameof(WixMergeTupleFields.Directory_), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixMergeTupleFields.SourceFile), IntermediateFieldType.Path), @@ -27,7 +26,6 @@ namespace WixToolset.Data.Tuples { public enum WixMergeTupleFields { - WixMerge, Language, Directory_, SourceFile, @@ -49,12 +47,6 @@ namespace WixToolset.Data.Tuples public IntermediateField this[WixMergeTupleFields index] => this.Fields[(int)index]; - public string WixMerge - { - get => (string)this.Fields[(int)WixMergeTupleFields.WixMerge]; - set => this.Set((int)WixMergeTupleFields.WixMerge, value); - } - public int Language { get => (int)this.Fields[(int)WixMergeTupleFields.Language]; @@ -97,4 +89,4 @@ namespace WixToolset.Data.Tuples set => this.Set((int)WixMergeTupleFields.Feature_, value); } } -} \ No newline at end of file +} diff --git a/src/WixToolset.Data/Tuples/WixOrderingTuple.cs b/src/WixToolset.Data/Tuples/WixOrderingTuple.cs index fde295c1..20f719a2 100644 --- a/src/WixToolset.Data/Tuples/WixOrderingTuple.cs +++ b/src/WixToolset.Data/Tuples/WixOrderingTuple.cs @@ -41,27 +41,27 @@ namespace WixToolset.Data.Tuples public IntermediateField this[WixOrderingTupleFields index] => this.Fields[(int)index]; - public string ItemType + public ComplexReferenceChildType ItemType { - get => (string)this.Fields[(int)WixOrderingTupleFields.ItemType]?.Value; - set => this.Set((int)WixOrderingTupleFields.ItemType, value); + get => (ComplexReferenceChildType)this.Fields[(int)WixOrderingTupleFields.ItemType].AsNumber(); + set => this.Set((int)WixOrderingTupleFields.ItemType, (int)value); } public string ItemId_ { - get => (string)this.Fields[(int)WixOrderingTupleFields.ItemId_]?.Value; + get => (string)this.Fields[(int)WixOrderingTupleFields.ItemId_]; set => this.Set((int)WixOrderingTupleFields.ItemId_, value); } - public string DependsOnType + public ComplexReferenceChildType DependsOnType { - get => (string)this.Fields[(int)WixOrderingTupleFields.DependsOnType]?.Value; - set => this.Set((int)WixOrderingTupleFields.DependsOnType, value); + get => (ComplexReferenceChildType)this.Fields[(int)WixOrderingTupleFields.DependsOnType].AsNumber(); + set => this.Set((int)WixOrderingTupleFields.DependsOnType, (int)value); } public string DependsOnId_ { - get => (string)this.Fields[(int)WixOrderingTupleFields.DependsOnId_]?.Value; + get => (string)this.Fields[(int)WixOrderingTupleFields.DependsOnId_]; set => this.Set((int)WixOrderingTupleFields.DependsOnId_, value); } } diff --git a/src/WixToolset.Data/Tuples/WixPatchBaselineTuple.cs b/src/WixToolset.Data/Tuples/WixPatchBaselineTuple.cs index 6a456d4b..f5b6dba0 100644 --- a/src/WixToolset.Data/Tuples/WixPatchBaselineTuple.cs +++ b/src/WixToolset.Data/Tuples/WixPatchBaselineTuple.cs @@ -10,7 +10,6 @@ namespace WixToolset.Data TupleDefinitionType.WixPatchBaseline, new[] { - new IntermediateFieldDefinition(nameof(WixPatchBaselineTupleFields.WixPatchBaseline), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixPatchBaselineTupleFields.DiskId), IntermediateFieldType.Number), new IntermediateFieldDefinition(nameof(WixPatchBaselineTupleFields.ValidationFlags), IntermediateFieldType.Number), }, @@ -22,7 +21,6 @@ namespace WixToolset.Data.Tuples { public enum WixPatchBaselineTupleFields { - WixPatchBaseline, DiskId, ValidationFlags, } @@ -39,22 +37,16 @@ namespace WixToolset.Data.Tuples public IntermediateField this[WixPatchBaselineTupleFields index] => this.Fields[(int)index]; - public string WixPatchBaseline - { - get => (string)this.Fields[(int)WixPatchBaselineTupleFields.WixPatchBaseline]; - set => this.Set((int)WixPatchBaselineTupleFields.WixPatchBaseline, value); - } - public int DiskId { get => (int)this.Fields[(int)WixPatchBaselineTupleFields.DiskId]; set => this.Set((int)WixPatchBaselineTupleFields.DiskId, value); } - public int ValidationFlags + public TransformFlags ValidationFlags { - get => (int)this.Fields[(int)WixPatchBaselineTupleFields.ValidationFlags]; - set => this.Set((int)WixPatchBaselineTupleFields.ValidationFlags, value); + get => (TransformFlags)this.Fields[(int)WixPatchBaselineTupleFields.ValidationFlags].AsNumber(); + set => this.Set((int)WixPatchBaselineTupleFields.ValidationFlags, (int)value); } } -} \ No newline at end of file +} diff --git a/src/WixToolset.Data/Tuples/WixSuppressModularizationTuple.cs b/src/WixToolset.Data/Tuples/WixSuppressModularizationTuple.cs index e591c19b..ab1a1a4c 100644 --- a/src/WixToolset.Data/Tuples/WixSuppressModularizationTuple.cs +++ b/src/WixToolset.Data/Tuples/WixSuppressModularizationTuple.cs @@ -8,10 +8,7 @@ namespace WixToolset.Data { public static readonly IntermediateTupleDefinition WixSuppressModularization = new IntermediateTupleDefinition( TupleDefinitionType.WixSuppressModularization, - new[] - { - new IntermediateFieldDefinition(nameof(WixSuppressModularizationTupleFields.WixSuppressModularization), IntermediateFieldType.String), - }, + new IntermediateFieldDefinition[0], typeof(WixSuppressModularizationTuple)); } } @@ -20,7 +17,6 @@ namespace WixToolset.Data.Tuples { public enum WixSuppressModularizationTupleFields { - WixSuppressModularization, } public class WixSuppressModularizationTuple : IntermediateTuple @@ -34,11 +30,5 @@ namespace WixToolset.Data.Tuples } public IntermediateField this[WixSuppressModularizationTupleFields index] => this.Fields[(int)index]; - - public string WixSuppressModularization - { - get => (string)this.Fields[(int)WixSuppressModularizationTupleFields.WixSuppressModularization]; - set => this.Set((int)WixSuppressModularizationTupleFields.WixSuppressModularization, value); - } } } \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixUITuple.cs b/src/WixToolset.Data/Tuples/WixUITuple.cs index 99e19300..89205850 100644 --- a/src/WixToolset.Data/Tuples/WixUITuple.cs +++ b/src/WixToolset.Data/Tuples/WixUITuple.cs @@ -8,10 +8,7 @@ namespace WixToolset.Data { public static readonly IntermediateTupleDefinition WixUI = new IntermediateTupleDefinition( TupleDefinitionType.WixUI, - new[] - { - new IntermediateFieldDefinition(nameof(WixUITupleFields.WixUI), IntermediateFieldType.String), - }, + new IntermediateFieldDefinition[0], typeof(WixUITuple)); } } @@ -20,7 +17,6 @@ namespace WixToolset.Data.Tuples { public enum WixUITupleFields { - WixUI, } public class WixUITuple : IntermediateTuple @@ -34,11 +30,5 @@ namespace WixToolset.Data.Tuples } public IntermediateField this[WixUITupleFields index] => this.Fields[(int)index]; - - public string WixUI - { - get => (string)this.Fields[(int)WixUITupleFields.WixUI]?.Value; - set => this.Set((int)WixUITupleFields.WixUI, value); - } - } -} \ No newline at end of file + } +} diff --git a/src/WixToolset.Data/Tuples/WixVariableTuple.cs b/src/WixToolset.Data/Tuples/WixVariableTuple.cs index 4af8a5ff..08508d08 100644 --- a/src/WixToolset.Data/Tuples/WixVariableTuple.cs +++ b/src/WixToolset.Data/Tuples/WixVariableTuple.cs @@ -10,7 +10,6 @@ namespace WixToolset.Data TupleDefinitionType.WixVariable, new[] { - new IntermediateFieldDefinition(nameof(WixVariableTupleFields.WixVariable), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixVariableTupleFields.Value), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixVariableTupleFields.Overridable), IntermediateFieldType.Bool), }, @@ -22,7 +21,6 @@ namespace WixToolset.Data.Tuples { public enum WixVariableTupleFields { - WixVariable, Value, Overridable, } @@ -39,12 +37,6 @@ namespace WixToolset.Data.Tuples public IntermediateField this[WixVariableTupleFields index] => this.Fields[(int)index]; - public string WixVariable - { - get => (string)this.Fields[(int)WixVariableTupleFields.WixVariable]; - set => this.Set((int)WixVariableTupleFields.WixVariable, value); - } - public string Value { get => (string)this.Fields[(int)WixVariableTupleFields.Value]; @@ -57,4 +49,4 @@ namespace WixToolset.Data.Tuples set => this.Set((int)WixVariableTupleFields.Overridable, value); } } -} \ No newline at end of file +} diff --git a/src/WixToolset.Data/Tuples/_StreamsTuple.cs b/src/WixToolset.Data/Tuples/_StreamsTuple.cs deleted file mode 100644 index c581d11a..00000000 --- a/src/WixToolset.Data/Tuples/_StreamsTuple.cs +++ /dev/null @@ -1,52 +0,0 @@ -// 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 _Streams = new IntermediateTupleDefinition( - TupleDefinitionType._Streams, - new[] - { - new IntermediateFieldDefinition(nameof(_StreamsTupleFields.Name), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(_StreamsTupleFields.Data), IntermediateFieldType.Path), - }, - typeof(_StreamsTuple)); - } -} - -namespace WixToolset.Data.Tuples -{ - public enum _StreamsTupleFields - { - Name, - Data, - } - - public class _StreamsTuple : IntermediateTuple - { - public _StreamsTuple() : base(TupleDefinitions._Streams, null, null) - { - } - - public _StreamsTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions._Streams, sourceLineNumber, id) - { - } - - public IntermediateField this[_StreamsTupleFields index] => this.Fields[(int)index]; - - public string Name - { - get => (string)this.Fields[(int)_StreamsTupleFields.Name]; - set => this.Set((int)_StreamsTupleFields.Name, value); - } - - public string Data - { - get => (string)this.Fields[(int)_StreamsTupleFields.Data]; - set => this.Set((int)_StreamsTupleFields.Data, value); - } - } -} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/_SummaryInformationTuple.cs b/src/WixToolset.Data/Tuples/_SummaryInformationTuple.cs deleted file mode 100644 index 249afe84..00000000 --- a/src/WixToolset.Data/Tuples/_SummaryInformationTuple.cs +++ /dev/null @@ -1,52 +0,0 @@ -// 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 _SummaryInformation = new IntermediateTupleDefinition( - TupleDefinitionType._SummaryInformation, - new[] - { - new IntermediateFieldDefinition(nameof(_SummaryInformationTupleFields.PropertyId), IntermediateFieldType.Number), - new IntermediateFieldDefinition(nameof(_SummaryInformationTupleFields.Value), IntermediateFieldType.String), - }, - typeof(_SummaryInformationTuple)); - } -} - -namespace WixToolset.Data.Tuples -{ - public enum _SummaryInformationTupleFields - { - PropertyId, - Value, - } - - public class _SummaryInformationTuple : IntermediateTuple - { - public _SummaryInformationTuple() : base(TupleDefinitions._SummaryInformation, null, null) - { - } - - public _SummaryInformationTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions._SummaryInformation, sourceLineNumber, id) - { - } - - public IntermediateField this[_SummaryInformationTupleFields index] => this.Fields[(int)index]; - - public int PropertyId - { - get => (int)this.Fields[(int)_SummaryInformationTupleFields.PropertyId]; - set => this.Set((int)_SummaryInformationTupleFields.PropertyId, value); - } - - public string Value - { - get => (string)this.Fields[(int)_SummaryInformationTupleFields.Value]; - set => this.Set((int)_SummaryInformationTupleFields.Value, value); - } - } -} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/_TransformViewTuple.cs b/src/WixToolset.Data/Tuples/_TransformViewTuple.cs deleted file mode 100644 index 8a750dfb..00000000 --- a/src/WixToolset.Data/Tuples/_TransformViewTuple.cs +++ /dev/null @@ -1,76 +0,0 @@ -// 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 _TransformView = new IntermediateTupleDefinition( - TupleDefinitionType._TransformView, - new[] - { - new IntermediateFieldDefinition(nameof(_TransformViewTupleFields.Table), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(_TransformViewTupleFields.Column), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(_TransformViewTupleFields.Row), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(_TransformViewTupleFields.Data), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(_TransformViewTupleFields.Current), IntermediateFieldType.String), - }, - typeof(_TransformViewTuple)); - } -} - -namespace WixToolset.Data.Tuples -{ - public enum _TransformViewTupleFields - { - Table, - Column, - Row, - Data, - Current, - } - - public class _TransformViewTuple : IntermediateTuple - { - public _TransformViewTuple() : base(TupleDefinitions._TransformView, null, null) - { - } - - public _TransformViewTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions._TransformView, sourceLineNumber, id) - { - } - - public IntermediateField this[_TransformViewTupleFields index] => this.Fields[(int)index]; - - public string Table - { - get => (string)this.Fields[(int)_TransformViewTupleFields.Table]; - set => this.Set((int)_TransformViewTupleFields.Table, value); - } - - public string Column - { - get => (string)this.Fields[(int)_TransformViewTupleFields.Column]; - set => this.Set((int)_TransformViewTupleFields.Column, value); - } - - public string Row - { - get => (string)this.Fields[(int)_TransformViewTupleFields.Row]; - set => this.Set((int)_TransformViewTupleFields.Row, value); - } - - public string Data - { - get => (string)this.Fields[(int)_TransformViewTupleFields.Data]; - set => this.Set((int)_TransformViewTupleFields.Data, value); - } - - public string Current - { - get => (string)this.Fields[(int)_TransformViewTupleFields.Current]; - set => this.Set((int)_TransformViewTupleFields.Current, value); - } - } -} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/_ValidationTuple.cs b/src/WixToolset.Data/Tuples/_ValidationTuple.cs deleted file mode 100644 index 869b19d8..00000000 --- a/src/WixToolset.Data/Tuples/_ValidationTuple.cs +++ /dev/null @@ -1,116 +0,0 @@ -// 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 _Validation = new IntermediateTupleDefinition( - TupleDefinitionType._Validation, - new[] - { - new IntermediateFieldDefinition(nameof(_ValidationTupleFields.Table), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(_ValidationTupleFields.Column), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(_ValidationTupleFields.Nullable), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(_ValidationTupleFields.MinValue), IntermediateFieldType.Number), - new IntermediateFieldDefinition(nameof(_ValidationTupleFields.MaxValue), IntermediateFieldType.Number), - new IntermediateFieldDefinition(nameof(_ValidationTupleFields.KeyTable), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(_ValidationTupleFields.KeyColumn), IntermediateFieldType.Number), - new IntermediateFieldDefinition(nameof(_ValidationTupleFields.Category), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(_ValidationTupleFields.Set), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(_ValidationTupleFields.Description), IntermediateFieldType.String), - }, - typeof(_ValidationTuple)); - } -} - -namespace WixToolset.Data.Tuples -{ - public enum _ValidationTupleFields - { - Table, - Column, - Nullable, - MinValue, - MaxValue, - KeyTable, - KeyColumn, - Category, - Set, - Description, - } - - public class _ValidationTuple : IntermediateTuple - { - public _ValidationTuple() : base(TupleDefinitions._Validation, null, null) - { - } - - public _ValidationTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions._Validation, sourceLineNumber, id) - { - } - - public IntermediateField this[_ValidationTupleFields index] => this.Fields[(int)index]; - - public string Table - { - get => (string)this.Fields[(int)_ValidationTupleFields.Table]; - set => this.Set((int)_ValidationTupleFields.Table, value); - } - - public string Column - { - get => (string)this.Fields[(int)_ValidationTupleFields.Column]; - set => this.Set((int)_ValidationTupleFields.Column, value); - } - - public string Nullable - { - get => (string)this.Fields[(int)_ValidationTupleFields.Nullable]; - set => this.Set((int)_ValidationTupleFields.Nullable, value); - } - - public int MinValue - { - get => (int)this.Fields[(int)_ValidationTupleFields.MinValue]; - set => this.Set((int)_ValidationTupleFields.MinValue, value); - } - - public int MaxValue - { - get => (int)this.Fields[(int)_ValidationTupleFields.MaxValue]; - set => this.Set((int)_ValidationTupleFields.MaxValue, value); - } - - public string KeyTable - { - get => (string)this.Fields[(int)_ValidationTupleFields.KeyTable]; - set => this.Set((int)_ValidationTupleFields.KeyTable, value); - } - - public int KeyColumn - { - get => (int)this.Fields[(int)_ValidationTupleFields.KeyColumn]; - set => this.Set((int)_ValidationTupleFields.KeyColumn, value); - } - - public string Category - { - get => (string)this.Fields[(int)_ValidationTupleFields.Category]; - set => this.Set((int)_ValidationTupleFields.Category, value); - } - - public string Set - { - get => (string)this.Fields[(int)_ValidationTupleFields.Set]; - set => this.Set((int)_ValidationTupleFields.Set, value); - } - - public string Description - { - get => (string)this.Fields[(int)_ValidationTupleFields.Description]; - set => this.Set((int)_ValidationTupleFields.Description, value); - } - } -} \ No newline at end of file diff --git a/src/WixToolset.Data/WindowsInstaller/WindowsInstallerStandard.cs b/src/WixToolset.Data/WindowsInstaller/WindowsInstallerStandard.cs index 96fbe659..e6c7e337 100644 --- a/src/WixToolset.Data/WindowsInstaller/WindowsInstallerStandard.cs +++ b/src/WixToolset.Data/WindowsInstaller/WindowsInstallerStandard.cs @@ -90,7 +90,7 @@ namespace WixToolset.Data.WindowsInstaller private static readonly WixActionTuple[] standardActions = new[] { new WixActionTuple(null, new Identifier("AdminExecuteSequence/InstallInitialize", AccessModifier.Public)) { Action="InstallInitialize", Sequence=1500, SequenceTable=SequenceTable.AdminExecuteSequence }, - new WixActionTuple(null, new Identifier("AdvtExecuteSequence/InstallInitialize", AccessModifier.Public)) { Action="InstallInitialize", Sequence=1500, SequenceTable=SequenceTable.AdvtExecuteSequence }, + new WixActionTuple(null, new Identifier("AdvtExecuteSequence/InstallInitialize", AccessModifier.Public)) { Action="InstallInitialize", Sequence=1500, SequenceTable=SequenceTable.AdvertiseExecuteSequence }, new WixActionTuple(null, new Identifier("InstallExecuteSequence/InstallInitialize", AccessModifier.Public)) { Action="InstallInitialize", Sequence=1500, SequenceTable=SequenceTable.InstallExecuteSequence }, new WixActionTuple(null, new Identifier("InstallExecuteSequence/InstallExecute", AccessModifier.Public)) { Action="InstallExecute", Sequence=6500, SequenceTable=SequenceTable.InstallExecuteSequence, Condition="NOT Installed" }, @@ -98,7 +98,7 @@ namespace WixToolset.Data.WindowsInstaller new WixActionTuple(null, new Identifier("InstallExecuteSequence/InstallExecuteAgain", AccessModifier.Public)) { Action="InstallExecuteAgain", Sequence=6550, SequenceTable=SequenceTable.InstallExecuteSequence, Condition="NOT Installed" }, new WixActionTuple(null, new Identifier("AdminExecuteSequence/InstallFinalize", AccessModifier.Public)) { Action="InstallFinalize", Sequence=6600, SequenceTable=SequenceTable.AdminExecuteSequence }, - new WixActionTuple(null, new Identifier("AdvtExecuteSequence/InstallFinalize", AccessModifier.Public)) { Action="InstallFinalize", Sequence=6600, SequenceTable=SequenceTable.AdvtExecuteSequence }, + new WixActionTuple(null, new Identifier("AdvtExecuteSequence/InstallFinalize", AccessModifier.Public)) { Action="InstallFinalize", Sequence=6600, SequenceTable=SequenceTable.AdvertiseExecuteSequence }, new WixActionTuple(null, new Identifier("InstallExecuteSequence/InstallFinalize", AccessModifier.Public)) { Action="InstallFinalize", Sequence=6600, SequenceTable=SequenceTable.InstallExecuteSequence }, new WixActionTuple(null, new Identifier("AdminExecuteSequence/InstallFiles", AccessModifier.Public)) { Action="InstallFiles", Sequence=4000, SequenceTable=SequenceTable.AdminExecuteSequence }, @@ -113,48 +113,48 @@ namespace WixToolset.Data.WindowsInstaller new WixActionTuple(null, new Identifier("AdminExecuteSequence/CostInitialize", AccessModifier.Public)) { Action="CostInitialize", Sequence=800, SequenceTable=SequenceTable.AdminExecuteSequence }, new WixActionTuple(null, new Identifier("AdminUISequence/CostInitialize", AccessModifier.Public)) { Action="CostInitialize", Sequence=800, SequenceTable=SequenceTable.AdminUISequence }, - new WixActionTuple(null, new Identifier("AdvtExecuteSequence/CostInitialize", AccessModifier.Public)) { Action="CostInitialize", Sequence=800, SequenceTable=SequenceTable.AdvtExecuteSequence }, + new WixActionTuple(null, new Identifier("AdvtExecuteSequence/CostInitialize", AccessModifier.Public)) { Action="CostInitialize", Sequence=800, SequenceTable=SequenceTable.AdvertiseExecuteSequence }, new WixActionTuple(null, new Identifier("InstallExecuteSequence/CostInitialize", AccessModifier.Public)) { Action="CostInitialize", Sequence=800, SequenceTable=SequenceTable.InstallExecuteSequence }, new WixActionTuple(null, new Identifier("InstallUISequence/CostInitialize", AccessModifier.Public)) { Action="CostInitialize", Sequence=800, SequenceTable=SequenceTable.InstallUISequence }, new WixActionTuple(null, new Identifier("AdminExecuteSequence/CostFinalize", AccessModifier.Public)) { Action="CostFinalize", Sequence=1000, SequenceTable=SequenceTable.AdminExecuteSequence }, new WixActionTuple(null, new Identifier("AdminUISequence/CostFinalize", AccessModifier.Public)) { Action="CostFinalize", Sequence=1000, SequenceTable=SequenceTable.AdminUISequence }, - new WixActionTuple(null, new Identifier("AdvtExecuteSequence/CostFinalize", AccessModifier.Public)) { Action="CostFinalize", Sequence=1000, SequenceTable=SequenceTable.AdvtExecuteSequence }, + new WixActionTuple(null, new Identifier("AdvtExecuteSequence/CostFinalize", AccessModifier.Public)) { Action="CostFinalize", Sequence=1000, SequenceTable=SequenceTable.AdvertiseExecuteSequence }, new WixActionTuple(null, new Identifier("InstallExecuteSequence/CostFinalize", AccessModifier.Public)) { Action="CostFinalize", Sequence=1000, SequenceTable=SequenceTable.InstallExecuteSequence }, new WixActionTuple(null, new Identifier("InstallUISequence/CostFinalize", AccessModifier.Public)) { Action="CostFinalize", Sequence=1000, SequenceTable=SequenceTable.InstallUISequence }, new WixActionTuple(null, new Identifier("AdminExecuteSequence/InstallValidate", AccessModifier.Public)) { Action="InstallValidate", Sequence=1400, SequenceTable=SequenceTable.AdminExecuteSequence }, - new WixActionTuple(null, new Identifier("AdvtExecuteSequence/InstallValidate", AccessModifier.Public)) { Action="InstallValidate", Sequence=1400, SequenceTable=SequenceTable.AdvtExecuteSequence }, + new WixActionTuple(null, new Identifier("AdvtExecuteSequence/InstallValidate", AccessModifier.Public)) { Action="InstallValidate", Sequence=1400, SequenceTable=SequenceTable.AdvertiseExecuteSequence }, new WixActionTuple(null, new Identifier("InstallExecuteSequence/InstallValidate", AccessModifier.Public)) { Action="InstallValidate", Sequence=1400, SequenceTable=SequenceTable.InstallExecuteSequence }, new WixActionTuple(null, new Identifier("AdminUISequence/ExecuteAction", AccessModifier.Public)) { Action="ExecuteAction", Sequence=1300, SequenceTable=SequenceTable.AdminUISequence }, new WixActionTuple(null, new Identifier("InstallUISequence/ExecuteAction", AccessModifier.Public)) { Action="ExecuteAction", Sequence=1300, SequenceTable=SequenceTable.InstallUISequence }, - new WixActionTuple(null, new Identifier("AdvtExecuteSequence/CreateShortcuts", AccessModifier.Public)) { Action="CreateShortcuts", Sequence=4500, SequenceTable=SequenceTable.AdvtExecuteSequence }, + new WixActionTuple(null, new Identifier("AdvtExecuteSequence/CreateShortcuts", AccessModifier.Public)) { Action="CreateShortcuts", Sequence=4500, SequenceTable=SequenceTable.AdvertiseExecuteSequence }, new WixActionTuple(null, new Identifier("InstallExecuteSequence/CreateShortcuts", AccessModifier.Public)) { Action="CreateShortcuts", Sequence=4500, SequenceTable=SequenceTable.InstallExecuteSequence }, - new WixActionTuple(null, new Identifier("AdvtExecuteSequence/MsiPublishAssemblies", AccessModifier.Public)) { Action="MsiPublishAssemblies", Sequence=6250, SequenceTable=SequenceTable.AdvtExecuteSequence }, + new WixActionTuple(null, new Identifier("AdvtExecuteSequence/MsiPublishAssemblies", AccessModifier.Public)) { Action="MsiPublishAssemblies", Sequence=6250, SequenceTable=SequenceTable.AdvertiseExecuteSequence }, new WixActionTuple(null, new Identifier("InstallExecuteSequence/MsiPublishAssemblies", AccessModifier.Public)) { Action="MsiPublishAssemblies", Sequence=6250, SequenceTable=SequenceTable.InstallExecuteSequence }, - new WixActionTuple(null, new Identifier("AdvtExecuteSequence/PublishComponents", AccessModifier.Public)) { Action="PublishComponents", Sequence=6200, SequenceTable=SequenceTable.AdvtExecuteSequence }, + new WixActionTuple(null, new Identifier("AdvtExecuteSequence/PublishComponents", AccessModifier.Public)) { Action="PublishComponents", Sequence=6200, SequenceTable=SequenceTable.AdvertiseExecuteSequence }, new WixActionTuple(null, new Identifier("InstallExecuteSequence/PublishComponents", AccessModifier.Public)) { Action="PublishComponents", Sequence=6200, SequenceTable=SequenceTable.InstallExecuteSequence }, - new WixActionTuple(null, new Identifier("AdvtExecuteSequence/PublishFeatures", AccessModifier.Public)) { Action="PublishFeatures", Sequence=6300, SequenceTable=SequenceTable.AdvtExecuteSequence }, + new WixActionTuple(null, new Identifier("AdvtExecuteSequence/PublishFeatures", AccessModifier.Public)) { Action="PublishFeatures", Sequence=6300, SequenceTable=SequenceTable.AdvertiseExecuteSequence }, new WixActionTuple(null, new Identifier("InstallExecuteSequence/PublishFeatures", AccessModifier.Public)) { Action="PublishFeatures", Sequence=6300, SequenceTable=SequenceTable.InstallExecuteSequence }, - new WixActionTuple(null, new Identifier("AdvtExecuteSequence/PublishProduct", AccessModifier.Public)) { Action="PublishProduct", Sequence=6400, SequenceTable=SequenceTable.AdvtExecuteSequence }, + new WixActionTuple(null, new Identifier("AdvtExecuteSequence/PublishProduct", AccessModifier.Public)) { Action="PublishProduct", Sequence=6400, SequenceTable=SequenceTable.AdvertiseExecuteSequence }, new WixActionTuple(null, new Identifier("InstallExecuteSequence/PublishProduct", AccessModifier.Public)) { Action="PublishProduct", Sequence=6400, SequenceTable=SequenceTable.InstallExecuteSequence }, - new WixActionTuple(null, new Identifier("AdvtExecuteSequence/RegisterClassInfo", AccessModifier.Public)) { Action="RegisterClassInfo", Sequence=4600, SequenceTable=SequenceTable.AdvtExecuteSequence }, + new WixActionTuple(null, new Identifier("AdvtExecuteSequence/RegisterClassInfo", AccessModifier.Public)) { Action="RegisterClassInfo", Sequence=4600, SequenceTable=SequenceTable.AdvertiseExecuteSequence }, new WixActionTuple(null, new Identifier("InstallExecuteSequence/RegisterClassInfo", AccessModifier.Public)) { Action="RegisterClassInfo", Sequence=4600, SequenceTable=SequenceTable.InstallExecuteSequence }, - new WixActionTuple(null, new Identifier("AdvtExecuteSequence/RegisterExtensionInfo", AccessModifier.Public)) { Action="RegisterExtensionInfo", Sequence=4700, SequenceTable=SequenceTable.AdvtExecuteSequence }, + new WixActionTuple(null, new Identifier("AdvtExecuteSequence/RegisterExtensionInfo", AccessModifier.Public)) { Action="RegisterExtensionInfo", Sequence=4700, SequenceTable=SequenceTable.AdvertiseExecuteSequence }, new WixActionTuple(null, new Identifier("InstallExecuteSequence/RegisterExtensionInfo", AccessModifier.Public)) { Action="RegisterExtensionInfo", Sequence=4700, SequenceTable=SequenceTable.InstallExecuteSequence }, - new WixActionTuple(null, new Identifier("AdvtExecuteSequence/RegisterMIMEInfo", AccessModifier.Public)) { Action="RegisterMIMEInfo", Sequence=4900, SequenceTable=SequenceTable.AdvtExecuteSequence }, + new WixActionTuple(null, new Identifier("AdvtExecuteSequence/RegisterMIMEInfo", AccessModifier.Public)) { Action="RegisterMIMEInfo", Sequence=4900, SequenceTable=SequenceTable.AdvertiseExecuteSequence }, new WixActionTuple(null, new Identifier("InstallExecuteSequence/RegisterMIMEInfo", AccessModifier.Public)) { Action="RegisterMIMEInfo", Sequence=4900, SequenceTable=SequenceTable.InstallExecuteSequence }, - new WixActionTuple(null, new Identifier("AdvtExecuteSequence/RegisterProgIdInfo", AccessModifier.Public)) { Action="RegisterProgIdInfo", Sequence=4800, SequenceTable=SequenceTable.AdvtExecuteSequence }, + new WixActionTuple(null, new Identifier("AdvtExecuteSequence/RegisterProgIdInfo", AccessModifier.Public)) { Action="RegisterProgIdInfo", Sequence=4800, SequenceTable=SequenceTable.AdvertiseExecuteSequence }, new WixActionTuple(null, new Identifier("InstallExecuteSequence/RegisterProgIdInfo", AccessModifier.Public)) { Action="RegisterProgIdInfo", Sequence=4800, SequenceTable=SequenceTable.InstallExecuteSequence }, new WixActionTuple(null, new Identifier("InstallExecuteSequence/AllocateRegistrySpace", AccessModifier.Public)) { Action="AllocateRegistrySpace", Sequence=1550, SequenceTable=SequenceTable.InstallExecuteSequence }, diff --git a/src/test/WixToolsetTest.Data/TupleDefinitionFixture.cs b/src/test/WixToolsetTest.Data/TupleDefinitionFixture.cs index 53aa2196..ffb8e495 100644 --- a/src/test/WixToolsetTest.Data/TupleDefinitionFixture.cs +++ b/src/test/WixToolsetTest.Data/TupleDefinitionFixture.cs @@ -43,11 +43,11 @@ namespace WixToolsetTest.Data public void CanCheckNameofField() { var fileTuple = new FileTuple(); - Assert.Equal("Component_", fileTuple.Definition.FieldDefinitions[1].Name); + Assert.Equal("Component_", fileTuple.Definition.FieldDefinitions[0].Name); Assert.Null(fileTuple.Fields[0]); fileTuple.Component_ = "Foo"; - Assert.Equal("Component_", fileTuple.Fields[1].Name); - Assert.Same(fileTuple.Definition.FieldDefinitions[1].Name, fileTuple.Fields[1].Name); + Assert.Equal("Component_", fileTuple.Fields[0].Name); + Assert.Same(fileTuple.Definition.FieldDefinitions[0].Name, fileTuple.Fields[0].Name); } [Fact] -- cgit v1.2.3-55-g6feb