From 221da62c05ef2b515eb507c77655514cd0ec32a4 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Thu, 7 Dec 2017 14:17:39 -0800 Subject: Reintegrate MSI constructs into WxToolset.Data.WindowsInstaller namespace --- .../WindowsInstaller/Rows/BBControlRow.cs | 113 ++++ .../WindowsInstaller/Rows/ComponentRow.cs | 244 ++++++++ .../WindowsInstaller/Rows/ContainerType.cs | 13 + .../WindowsInstaller/Rows/ControlRow.cs | 143 +++++ .../WindowsInstaller/Rows/FileRow.cs | 640 +++++++++++++++++++++ .../WindowsInstaller/Rows/MediaRow.cs | 80 +++ .../WindowsInstaller/Rows/PropertyRow.cs | 40 ++ .../Rows/SummaryInfoRowCollection.cs | 41 ++ .../WindowsInstaller/Rows/UpgradeRow.cs | 90 +++ .../WindowsInstaller/Rows/WixActionRow.cs | 118 ++++ .../Rows/WixApprovedExeForElevationRow.cs | 78 +++ .../WindowsInstaller/Rows/WixBundleCatalogRow.cs | 50 ++ .../WindowsInstaller/Rows/WixBundleContainerRow.cs | 78 +++ .../Rows/WixBundleExePackageRow.cs | 103 ++++ .../Rows/WixBundleMsiFeatureRow.cs | 93 +++ .../Rows/WixBundleMsiPackageRow.cs | 138 +++++ .../Rows/WixBundleMsiPropertyRow.cs | 58 ++ .../Rows/WixBundleMspPackageRow.cs | 101 ++++ .../Rows/WixBundleMsuPackageRow.cs | 57 ++ .../Rows/WixBundlePackageCommandLineRow.cs | 80 +++ .../Rows/WixBundlePackageExitCodeRow.cs | 53 ++ .../WindowsInstaller/Rows/WixBundlePackageRow.cs | 228 ++++++++ .../Rows/WixBundlePatchTargetCodeRow.cs | 79 +++ .../WindowsInstaller/Rows/WixBundlePayloadRow.cs | 185 ++++++ .../Rows/WixBundleRelatedPackageRow.cs | 87 +++ .../Rows/WixBundleRollbackBoundaryRow.cs | 59 ++ .../WindowsInstaller/Rows/WixBundleRow.cs | 228 ++++++++ .../Rows/WixBundleSlipstreamMspRow.cs | 48 ++ .../WindowsInstaller/Rows/WixBundleUpdateRow.cs | 36 ++ .../WindowsInstaller/Rows/WixBundleVariableRow.cs | 80 +++ .../WindowsInstaller/Rows/WixChainItemRow.cs | 39 ++ .../WindowsInstaller/Rows/WixChainRow.cs | 65 +++ .../Rows/WixComplexReferenceRow.cs | 202 +++++++ .../WindowsInstaller/Rows/WixDeltaPatchFileRow.cs | 142 +++++ .../Rows/WixDeltaPatchSymbolPathsRow.cs | 60 ++ .../WindowsInstaller/Rows/WixFileRow.cs | 163 ++++++ .../WindowsInstaller/Rows/WixGroupRow.cs | 62 ++ .../WindowsInstaller/Rows/WixMediaRow.cs | 60 ++ .../WindowsInstaller/Rows/WixMediaTemplateRow.cs | 81 +++ .../WindowsInstaller/Rows/WixMergeRow.cs | 147 +++++ .../Rows/WixPayloadPropertiesRow.cs | 72 +++ .../WindowsInstaller/Rows/WixPropertyRow.cs | 118 ++++ .../WindowsInstaller/Rows/WixRelatedBundleRow.cs | 52 ++ .../WindowsInstaller/Rows/WixSimpleReferenceRow.cs | 61 ++ .../Rows/WixUpdateRegistrationRow.cs | 62 ++ 45 files changed, 4827 insertions(+) create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/BBControlRow.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/ComponentRow.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/ContainerType.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/ControlRow.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/FileRow.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/MediaRow.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/PropertyRow.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/SummaryInfoRowCollection.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/UpgradeRow.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/WixActionRow.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/WixApprovedExeForElevationRow.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/WixBundleCatalogRow.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/WixBundleContainerRow.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/WixBundleExePackageRow.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/WixBundleMsiFeatureRow.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/WixBundleMsiPackageRow.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/WixBundleMsiPropertyRow.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/WixBundleMspPackageRow.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/WixBundleMsuPackageRow.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/WixBundlePackageCommandLineRow.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/WixBundlePackageExitCodeRow.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/WixBundlePackageRow.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/WixBundlePatchTargetCodeRow.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/WixBundlePayloadRow.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/WixBundleRelatedPackageRow.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/WixBundleRollbackBoundaryRow.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/WixBundleRow.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/WixBundleSlipstreamMspRow.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/WixBundleUpdateRow.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/WixBundleVariableRow.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/WixChainItemRow.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/WixChainRow.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/WixComplexReferenceRow.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/WixDeltaPatchFileRow.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/WixDeltaPatchSymbolPathsRow.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/WixFileRow.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/WixGroupRow.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/WixMediaRow.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/WixMediaTemplateRow.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/WixMergeRow.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/WixPayloadPropertiesRow.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/WixPropertyRow.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/WixRelatedBundleRow.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/WixSimpleReferenceRow.cs create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/WixUpdateRegistrationRow.cs (limited to 'src/WixToolset.Data/WindowsInstaller/Rows') diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/BBControlRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/BBControlRow.cs new file mode 100644 index 00000000..bf962e73 --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/BBControlRow.cs @@ -0,0 +1,113 @@ +// 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.WindowsInstaller.Rows +{ + using System.Diagnostics.CodeAnalysis; + + /// + /// Specialization of a row for the Control table. + /// + public sealed class BBControlRow : Row + { + /// + /// Creates a Control row that belongs to a table. + /// + /// Original source lines for this row. + /// Table this Control row belongs to and should get its column definitions from. + public BBControlRow(SourceLineNumber sourceLineNumbers, Table table) : + base(sourceLineNumbers, table) + { + } + + /// + /// Gets or sets the dialog of the Control row. + /// + /// Primary key of the Control row. + public string Billboard + { + get { return (string)this.Fields[0].Data; } + set { this.Fields[0].Data = value; } + } + + /// + /// Gets or sets the identifier for this Control row. + /// + /// Identifier for this Control row. + public string BBControl + { + get { return (string)this.Fields[1].Data; } + set { this.Fields[1].Data = value; } + } + + /// + /// Gets or sets the type of the BBControl. + /// + /// Name of the BBControl. + [SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods")] + public string Type + { + get { return this.Fields[2].AsString(); } + set { this.Fields[2].Data = value; } + } + + /// + /// Gets or sets the X location of the BBControl. + /// + /// X location of the BBControl. + public string X + { + get { return this.Fields[3].AsString(); } + set { this.Fields[3].Data = value; } + } + + /// + /// Gets or sets the Y location of the BBControl. + /// + /// Y location of the BBControl. + public string Y + { + get { return this.Fields[4].AsString(); } + set { this.Fields[4].Data = value; } + } + + /// + /// Gets or sets the width of the BBControl. + /// + /// Width of the BBControl. + public string Width + { + get { return this.Fields[5].AsString(); } + set { this.Fields[5].Data = value; } + } + + /// + /// Gets or sets the height of the BBControl. + /// + /// Height of the BBControl. + public string Height + { + get { return this.Fields[6].AsString(); } + set { this.Fields[6].Data = value; } + } + + /// + /// Gets or sets the attributes for the BBControl. + /// + /// Attributes for the BBControl. + public int Attributes + { + get { return (int)this.Fields[7].Data; } + set { this.Fields[7].Data = value; } + } + + /// + /// Gets or sets the text of the BBControl. + /// + /// Text of the BBControl. + public string Text + { + get { return (string)this.Fields[8].Data; } + set { this.Fields[8].Data = value; } + } + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/ComponentRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/ComponentRow.cs new file mode 100644 index 00000000..50ef5313 --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/ComponentRow.cs @@ -0,0 +1,244 @@ +// 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.WindowsInstaller.Rows +{ + using WixToolset.Data.Msi; + + /// + /// Specialization of a row for the Component table. + /// + public sealed class ComponentRow : Row + { + private string sourceFile; + + /// + /// Creates a Control row that belongs to a table. + /// + /// Original source lines for this row. + /// Table this Component row belongs to and should get its column definitions from. + public ComponentRow(SourceLineNumber sourceLineNumbers, Table table) : + base(sourceLineNumbers, table) + { + } + + /// + /// Gets or sets the identifier for this Component row. + /// + /// Identifier for this Component row. + public string Component + { + get { return (string)this.Fields[0].Data; } + set { this.Fields[0].Data = value; } + } + + /// + /// Gets or sets the ComponentId for this Component row. + /// + /// guid for this Component row. + public string Guid + { + get { return (string)this.Fields[1].Data; } + set { this.Fields[1].Data = value; } + } + + /// + /// Gets or sets the Directory_ of the Component. + /// + /// Directory of the Component. + public string Directory + { + get { return (string)this.Fields[2].Data; } + set { this.Fields[2].Data = value; } + } + + /// + /// Gets or sets the local only attribute of the Component. + /// + /// Local only attribute of the component. + public bool IsLocalOnly + { + get { return MsiInterop.MsidbComponentAttributesLocalOnly == ((int)this.Fields[3].Data & MsiInterop.MsidbComponentAttributesLocalOnly); } + set + { + if (value) + { + this.Fields[3].Data = (int)this.Fields[3].Data | MsiInterop.MsidbComponentAttributesLocalOnly; + } + else + { + this.Fields[3].Data = (int)this.Fields[3].Data & ~MsiInterop.MsidbComponentAttributesLocalOnly; + } + } + } + + /// + /// Gets or sets the source only attribute of the Component. + /// + /// Source only attribute of the component. + public bool IsSourceOnly + { + get { return MsiInterop.MsidbComponentAttributesSourceOnly == ((int)this.Fields[3].Data & MsiInterop.MsidbComponentAttributesSourceOnly); } + set + { + if (value) + { + this.Fields[3].Data = (int)this.Fields[3].Data | MsiInterop.MsidbComponentAttributesSourceOnly; + } + else + { + this.Fields[3].Data = (int)this.Fields[3].Data & ~MsiInterop.MsidbComponentAttributesSourceOnly; + } + } + } + + /// + /// Gets or sets the optional attribute of the Component. + /// + /// Optional attribute of the component. + public bool IsOptional + { + get { return MsiInterop.MsidbComponentAttributesOptional == ((int)this.Fields[3].Data & MsiInterop.MsidbComponentAttributesOptional); } + set + { + if (value) + { + this.Fields[3].Data = (int)this.Fields[3].Data | MsiInterop.MsidbComponentAttributesOptional; + } + else + { + this.Fields[3].Data = (int)this.Fields[3].Data & ~MsiInterop.MsidbComponentAttributesOptional; + } + } + } + + /// + /// Gets or sets the registry key path attribute of the Component. + /// + /// Registry key path attribute of the component. + public bool IsRegistryKeyPath + { + get { return MsiInterop.MsidbComponentAttributesRegistryKeyPath == ((int)this.Fields[3].Data & MsiInterop.MsidbComponentAttributesRegistryKeyPath); } + set + { + if (value) + { + this.Fields[3].Data = (int)this.Fields[3].Data | MsiInterop.MsidbComponentAttributesRegistryKeyPath; + } + else + { + this.Fields[3].Data = (int)this.Fields[3].Data & ~MsiInterop.MsidbComponentAttributesRegistryKeyPath; + } + } + } + + /// + /// Gets or sets the shared dll ref count attribute of the Component. + /// + /// Shared dll ref countattribute of the component. + public bool IsSharedDll + { + get { return MsiInterop.MsidbComponentAttributesSharedDllRefCount == ((int)this.Fields[3].Data & MsiInterop.MsidbComponentAttributesSharedDllRefCount); } + set + { + if (value) + { + this.Fields[3].Data = (int)this.Fields[3].Data | MsiInterop.MsidbComponentAttributesSharedDllRefCount; + } + else + { + this.Fields[3].Data = (int)this.Fields[3].Data & ~MsiInterop.MsidbComponentAttributesSharedDllRefCount; + } + } + } + + /// + /// Gets or sets the permanent attribute of the Component. + /// + /// Permanent attribute of the component. + public bool IsPermanent + { + get { return MsiInterop.MsidbComponentAttributesPermanent == ((int)this.Fields[3].Data & MsiInterop.MsidbComponentAttributesPermanent); } + set + { + if (value) + { + this.Fields[3].Data = (int)this.Fields[3].Data | MsiInterop.MsidbComponentAttributesPermanent; + } + else + { + this.Fields[3].Data = (int)this.Fields[3].Data & ~MsiInterop.MsidbComponentAttributesPermanent; + } + } + } + + /// + /// Gets or sets the ODBC data source key path attribute of the Component. + /// + /// ODBC data source key path attribute of the component. + public bool IsOdbcDataSourceKeyPath + { + get { return MsiInterop.MsidbComponentAttributesODBCDataSource == ((int)this.Fields[3].Data & MsiInterop.MsidbComponentAttributesODBCDataSource); } + set + { + if (value) + { + this.Fields[3].Data = (int)this.Fields[3].Data | MsiInterop.MsidbComponentAttributesODBCDataSource; + } + else + { + this.Fields[3].Data = (int)this.Fields[3].Data & ~MsiInterop.MsidbComponentAttributesODBCDataSource; + } + } + } + + /// + /// Gets or sets the 64 bit attribute of the Component. + /// + /// 64-bitness of the component. + public bool Is64Bit + { + get { return MsiInterop.MsidbComponentAttributes64bit == ((int)this.Fields[3].Data & MsiInterop.MsidbComponentAttributes64bit); } + set + { + if (value) + { + this.Fields[3].Data = (int)this.Fields[3].Data | MsiInterop.MsidbComponentAttributes64bit; + } + else + { + this.Fields[3].Data = (int)this.Fields[3].Data & ~MsiInterop.MsidbComponentAttributes64bit; + } + } + } + + /// + /// Gets or sets the condition of the Component. + /// + /// Condition of the Component. + public string Condition + { + get { return (string)this.Fields[4].Data; } + set { this.Fields[4].Data = value; } + } + + /// + /// Gets or sets the key path of the Component. + /// + /// Key path of the Component. + public string KeyPath + { + get { return (string)this.Fields[5].Data; } + set { this.Fields[5].Data = value; } + } + + /// + /// Gets or sets the source location to the file to fill in the Text of the control. + /// + /// Source location to the file to fill in the Text of the control. + public string SourceFile + { + get { return this.sourceFile; } + set { this.sourceFile = value; } + } + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/ContainerType.cs b/src/WixToolset.Data/WindowsInstaller/Rows/ContainerType.cs new file mode 100644 index 00000000..b983c2a6 --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/ContainerType.cs @@ -0,0 +1,13 @@ +// 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.WindowsInstaller.Rows +{ + /// + /// Types of bundle packages. + /// + public enum ContainerType + { + Attached, + Detached, + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/ControlRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/ControlRow.cs new file mode 100644 index 00000000..95289dea --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/ControlRow.cs @@ -0,0 +1,143 @@ +// 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.WindowsInstaller.Rows +{ + using System.Diagnostics.CodeAnalysis; + + /// + /// Specialization of a row for the Control table. + /// + public sealed class ControlRow : Row + { + /// + /// Creates a Control row that belongs to a table. + /// + /// Original source lines for this row. + /// Table this Control row belongs to and should get its column definitions from. + public ControlRow(SourceLineNumber sourceLineNumbers, Table table) : + base(sourceLineNumbers, table) + { + } + + /// + /// Gets or sets the dialog of the Control row. + /// + /// Primary key of the Control row. + public string Dialog + { + get { return (string)this.Fields[0].Data; } + set { this.Fields[0].Data = value; } + } + + /// + /// Gets or sets the identifier for this Control row. + /// + /// Identifier for this Control row. + public string Control + { + get { return (string)this.Fields[1].Data; } + set { this.Fields[1].Data = value; } + } + + /// + /// Gets or sets the type of the control. + /// + /// Name of the control. + [SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods")] + public string Type + { + get { return (string)this.Fields[2].Data; } + set { this.Fields[2].Data = value; } + } + + /// + /// Gets or sets the X location of the control. + /// + /// X location of the control. + public string X + { + get { return this.Fields[3].AsString(); } + set { this.Fields[3].Data = value; } + } + + /// + /// Gets or sets the Y location of the control. + /// + /// Y location of the control. + public string Y + { + get { return this.Fields[4].AsString(); } + set { this.Fields[4].Data = value; } + } + + /// + /// Gets or sets the width of the control. + /// + /// Width of the control. + public string Width + { + get { return this.Fields[5].AsString(); } + set { this.Fields[5].Data = value; } + } + + /// + /// Gets or sets the height of the control. + /// + /// Height of the control. + public string Height + { + get { return this.Fields[6].AsString(); } + set { this.Fields[6].Data = value; } + } + + /// + /// Gets or sets the attributes for the control. + /// + /// Attributes for the control. + public int Attributes + { + get { return (int)this.Fields[7].Data; } + set { this.Fields[7].Data = value; } + } + + /// + /// Gets or sets the Property associated with the control. + /// + /// Property associated with the control. + public string Property + { + get { return (string)this.Fields[8].Data; } + set { this.Fields[8].Data = value; } + } + + /// + /// Gets or sets the text of the control. + /// + /// Text of the control. + public string Text + { + get { return (string)this.Fields[9].Data; } + set { this.Fields[9].Data = value; } + } + + /// + /// Gets or sets the next control. + /// + /// Next control. + public string Next + { + get { return (string)this.Fields[10].Data; } + set { this.Fields[10].Data = value; } + } + + /// + /// Gets or sets the help for the control. + /// + /// Help for the control. + public string Help + { + get { return (string)this.Fields[11].Data; } + set { this.Fields[11].Data = value; } + } + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/FileRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/FileRow.cs new file mode 100644 index 00000000..7fc34b3d --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/FileRow.cs @@ -0,0 +1,640 @@ +// 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.WindowsInstaller.Rows +{ + using System; + using System.Diagnostics; + using System.Globalization; + using WixToolset.Data.Msi; + + /// + /// Specialization of a row for the file table. + /// + public sealed class FileRow : Row //, IComparable + { + //private string assemblyApplication; + //private string assemblyManifest; + //private FileAssemblyType assemblyType; + //private string directory; + //private int diskId; + //private bool fromModule; + //private bool isGeneratedShortFileName; + //private int patchGroup; + //private string processorArchitecture; + //private string source; + //private Row hashRow; + //private List assemblyNameRows; + //private string[] previousSource; + //private string symbols; + //private string[] previousSymbols; + //private PatchAttributeType patchAttributes; + //private string retainOffsets; + //private string retainLengths; + //private string ignoreOffsets; + //private string ignoreLengths; + //private string[] previousRetainOffsets; + //private string[] previousRetainLengths; + //private string[] previousIgnoreOffsets; + //private string[] previousIgnoreLengths; + //private string patch; + + /// + /// Creates a File row that belongs to a table. + /// + /// Original source lines for this row. + /// Table this File row belongs to and should get its column definitions from. + public FileRow(SourceLineNumber sourceLineNumbers, Table table) + : base(sourceLineNumbers, table) + { + //this.assemblyType = FileAssemblyType.NotAnAssembly; + //this.previousSource = new string[1]; + //this.previousSymbols = new string[1]; + //this.previousRetainOffsets = new string[1]; + //this.previousRetainLengths = new string[1]; + //this.previousIgnoreOffsets = new string[1]; + //this.previousIgnoreLengths = new string[1]; + } + + /// + /// Creates a File row that does not belong to a table. + /// + /// Original source lines for this row. + /// TableDefinition this Media row belongs to and should get its column definitions from. + public FileRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDefinition) + : base(sourceLineNumbers, tableDefinition) + { + //this.assemblyType = FileAssemblyType.NotAnAssembly; + //this.previousSource = new string[1]; + //this.previousSymbols = new string[1]; + //this.previousRetainOffsets = new string[1]; + //this.previousRetainLengths = new string[1]; + //this.previousIgnoreOffsets = new string[1]; + //this.previousIgnoreLengths = new string[1]; + } + + /// + /// Gets or sets the primary key of the file row. + /// + /// Primary key of the file row. + public string File + { + get { return (string)this.Fields[0].Data; } + set { this.Fields[0].Data = value; } + } + + /// + /// Gets or sets the component this file row belongs to. + /// + /// Component this file row belongs to. + public string Component + { + get { return (string)this.Fields[1].Data; } + set { this.Fields[1].Data = value; } + } + + /// + /// Gets or sets the name of the file. + /// + /// Name of the file. + public string FileName + { + get { return (string)this.Fields[2].Data; } + set { this.Fields[2].Data = value; } + } + + /// + /// Gets or sets the real filesystem name of the file (without a pipe). This is typically the long name of the file. + /// However, if no long name is available, falls back to the short name. + /// + /// Long Name of the file - or if no long name is available, falls back to the short name. + public string LongFileName + { + get + { + string fileName = this.FileName; + int index = fileName.IndexOf('|'); + + // If it doesn't contain a pipe, just return the whole string + if (-1 == index) + { + return fileName; + } + else // otherwise, extract the part of the string after the pipe + { + return fileName.Substring(index + 1); + } + } + } + + /// + /// Gets or sets the size of the file. + /// + /// Size of the file. + public int FileSize + { + get { return (int)this.Fields[3].Data; } + set { this.Fields[3].Data = value; } + } + + /// + /// Gets or sets the version of the file. + /// + /// Version of the file. + public string Version + { + get { return (string)this.Fields[4].Data; } + set { this.Fields[4].Data = value; } + } + + /// + /// Gets or sets the LCID of the file. + /// + /// LCID of the file. + public string Language + { + get { return (string)this.Fields[5].Data; } + set { this.Fields[5].Data = value; } + } + + /// + /// Gets or sets the attributes on a file. + /// + /// Attributes on a file. + public int Attributes + { + get { return Convert.ToInt32(this.Fields[6].Data, CultureInfo.InvariantCulture); } + set { this.Fields[6].Data = value; } + } + + /// + /// Gets or sets whether this file should be compressed. + /// + /// Whether this file should be compressed. + public YesNoType Compressed + { + get + { + bool compressedFlag = (0 < (this.Attributes & MsiInterop.MsidbFileAttributesCompressed)); + bool noncompressedFlag = (0 < (this.Attributes & MsiInterop.MsidbFileAttributesNoncompressed)); + + if (compressedFlag && noncompressedFlag) + { + throw new WixException(WixDataErrors.IllegalFileCompressionAttributes(this.SourceLineNumbers)); + } + else if (compressedFlag) + { + return YesNoType.Yes; + } + else if (noncompressedFlag) + { + return YesNoType.No; + } + else + { + return YesNoType.NotSet; + } + } + + set + { + if (YesNoType.Yes == value) + { + // these are mutually exclusive + this.Attributes |= MsiInterop.MsidbFileAttributesCompressed; + this.Attributes &= ~MsiInterop.MsidbFileAttributesNoncompressed; + } + else if (YesNoType.No == value) + { + // these are mutually exclusive + this.Attributes |= MsiInterop.MsidbFileAttributesNoncompressed; + this.Attributes &= ~MsiInterop.MsidbFileAttributesCompressed; + } + else // not specified + { + Debug.Assert(YesNoType.NotSet == value); + + // clear any compression bits + this.Attributes &= ~MsiInterop.MsidbFileAttributesCompressed; + this.Attributes &= ~MsiInterop.MsidbFileAttributesNoncompressed; + } + } + } + + /// + /// Gets or sets the sequence of the file row. + /// + /// Sequence of the file row. + public int Sequence + { + get { return (int)this.Fields[7].Data; } + set { this.Fields[7].Data = value; } + } + + /////// + /////// Gets or sets the type of assembly of file row. + /////// + /////// Assembly type for file row. + ////public FileAssemblyType AssemblyType + ////{ + //// get { return this.assemblyType; } + //// set { this.assemblyType = value; } + ////} + + /////// + /////// Gets or sets the identifier for the assembly application. + /////// + /////// Identifier for the assembly application. + ////public string AssemblyApplication + ////{ + //// get { return this.assemblyApplication; } + //// set { this.assemblyApplication = value; } + ////} + + /////// + /////// Gets or sets the identifier for the assembly manifest. + /////// + /////// Identifier for the assembly manifest. + ////public string AssemblyManifest + ////{ + //// get { return this.assemblyManifest; } + //// set { this.assemblyManifest = value; } + ////} + + /////// + /////// Gets or sets the directory of the file. + /////// + /////// Directory of the file. + ////public string Directory + ////{ + //// get { return this.directory; } + //// set { this.directory = value; } + ////} + + /////// + /////// Gets or sets the disk id for this file. + /////// + /////// Disk id for the file. + ////public int DiskId + ////{ + //// get { return this.diskId; } + //// set { this.diskId = value; } + ////} + + /////// + /////// Gets or sets the source location to the file. + /////// + /////// Source location to the file. + ////public string Source + ////{ + //// get { return this.source; } + //// set { this.source = value; } + ////} + + /////// + /////// Gets or sets the source location to the previous file. + /////// + /////// Source location to the previous file. + ////public string PreviousSource + ////{ + //// get { return this.previousSource[0]; } + //// set { this.previousSource[0] = value; } + ////} + + /////// + /////// Gets the source location to the previous files. + /////// + /////// Source location to the previous files. + ////[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")] + ////public string[] PreviousSourceArray + ////{ + //// get { return this.previousSource; } + ////} + + /////// + /////// Gets or sets the architecture the file executes on. + /////// + /////// Architecture the file executes on. + ////public string ProcessorArchitecture + ////{ + //// get { return this.processorArchitecture; } + //// set { this.processorArchitecture = value; } + ////} + + /////// + /////// Gets of sets the patch group of a patch-added file. + /////// + /////// The patch group of a patch-added file. + ////public int PatchGroup + ////{ + //// get { return this.patchGroup; } + //// set { this.patchGroup = value; } + ////} + + /////// + /////// Gets or sets the patch header of the file. + /////// + /////// Patch header of the file. + ////public string Patch + ////{ + //// get { return this.patch; } + //// set { this.patch = value; } + ////} + + /////// + /////// Gets or sets the locations to find the file's symbols. + /////// + /////// Symbol paths for the file. + ////public string Symbols + ////{ + //// get { return this.symbols; } + //// set { this.symbols = value; } + ////} + + /////// + /////// Gets or sets the locations to find the file's previous symbols. + /////// + /////// Symbol paths for the previous file. + ////public string PreviousSymbols + ////{ + //// get { return this.previousSymbols[0]; } + //// set { this.previousSymbols[0] = value; } + ////} + + /////// + /////// Gets the locations to find the files' previous symbols. + /////// + /////// Symbol paths for the previous files. + ////[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")] + ////public string[] PreviousSymbolsArray + ////{ + //// get { return this.previousSymbols; } + ////} + + /////// + /////// Gets or sets the generated short file name attribute. + /////// + /////// The generated short file name attribute. + ////public bool IsGeneratedShortFileName + ////{ + //// get { return this.isGeneratedShortFileName; } + + //// set { this.isGeneratedShortFileName = value; } + ////} + + /////// + /////// Gets or sets whether this row came from a merge module. + /////// + /////// Whether this row came from a merge module. + ////public bool FromModule + ////{ + //// get { return this.fromModule; } + //// set { this.fromModule = value; } + ////} + + /////// + /////// Gets or sets the MsiFileHash row created for this FileRow. + /////// + /////// Row for MsiFileHash table. + ////public Row HashRow + ////{ + //// get { return this.hashRow; } + //// set { this.hashRow = value; } + ////} + + /////// + /////// Gets or sets the set of MsiAssemblyName rows created for this FileRow. + /////// + /////// RowCollection of MsiAssemblyName table. + ////[SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + ////public List AssemblyNameRows + ////{ + //// get { return this.assemblyNameRows; } + //// set { this.assemblyNameRows = value; } + ////} + + /////// + /////// Gets or sets the patching attributes to the file. + /////// + /////// Patching attributes of the file. + ////public PatchAttributeType PatchAttributes + ////{ + //// get { return this.patchAttributes; } + //// set { this.patchAttributes = value; } + ////} + + /////// + /////// Gets or sets the delta patch retain-length list for the file. + /////// + /////// RetainLength list for the file. + ////public string RetainLengths + ////{ + //// get { return this.retainLengths; } + //// set { this.retainLengths = value; } + ////} + + /////// + /////// Gets or sets the delta patch ignore-offset list for the file. + /////// + /////// IgnoreOffset list for the file. + ////public string IgnoreOffsets + ////{ + //// get { return this.ignoreOffsets; } + //// set { this.ignoreOffsets = value; } + ////} + + /////// + /////// Gets or sets the delta patch ignore-length list for the file. + /////// + /////// IgnoreLength list for the file. + ////public string IgnoreLengths + ////{ + //// get { return this.ignoreLengths; } + //// set { this.ignoreLengths = value; } + ////} + + /////// + /////// Gets or sets the delta patch retain-offset list for the file. + /////// + /////// RetainOffset list for the file. + ////public string RetainOffsets + ////{ + //// get { return this.retainOffsets; } + //// set { this.retainOffsets = value; } + ////} + + /////// + /////// Gets or sets the delta patch retain-length list for the previous file. + /////// + /////// RetainLength list for the previous file. + ////public string PreviousRetainLengths + ////{ + //// get { return this.previousRetainLengths[0]; } + //// set { this.previousRetainLengths[0] = value; } + ////} + + /////// + /////// Gets the delta patch retain-length list for the previous files. + /////// + /////// RetainLength list for the previous files. + ////[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")] + ////public string[] PreviousRetainLengthsArray + ////{ + //// get { return this.previousRetainLengths; } + ////} + + /////// + /////// Gets or sets the delta patch ignore-offset list for the previous file. + /////// + /////// IgnoreOffset list for the previous file. + ////public string PreviousIgnoreOffsets + ////{ + //// get { return this.previousIgnoreOffsets[0]; } + //// set { this.previousIgnoreOffsets[0] = value; } + ////} + + /////// + /////// Gets the delta patch ignore-offset list for the previous files. + /////// + /////// IgnoreOffset list for the previous files. + ////[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")] + ////public string[] PreviousIgnoreOffsetsArray + ////{ + //// get { return this.previousIgnoreOffsets; } + ////} + + /////// + /////// Gets or sets the delta patch ignore-length list for the previous file. + /////// + /////// IgnoreLength list for the previous file. + ////public string PreviousIgnoreLengths + ////{ + //// get { return this.previousIgnoreLengths[0]; } + //// set { this.previousIgnoreLengths[0] = value; } + ////} + + /////// + /////// Gets the delta patch ignore-length list for the previous files. + /////// + /////// IgnoreLength list for the previous files. + ////[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")] + ////public string[] PreviousIgnoreLengthsArray + ////{ + //// get { return this.previousIgnoreLengths; } + ////} + + /////// + /////// Gets or sets the delta patch retain-offset list for the previous file. + /////// + /////// RetainOffset list for the previous file. + ////public string PreviousRetainOffsets + ////{ + //// get { return this.previousRetainOffsets[0]; } + //// set { this.previousRetainOffsets[0] = value; } + ////} + + /////// + /////// Gets the delta patch retain-offset list for the previous files. + /////// + /////// RetainOffset list for the previous files. + ////[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")] + ////public string[] PreviousRetainOffsetsArray + ////{ + //// get { return this.previousRetainOffsets; } + ////} + + /////// + /////// Compares the current FileRow with another object of the same type. + /////// + /////// An object to compare with this instance. + /////// An integer that indicates the relative order of the comparands. + ////[SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters", MessageId = "System.ArgumentException.#ctor(System.String)")] + ////[SuppressMessage("Microsoft.Globalization", "CA1309:UseOrdinalStringComparison")] + ////public int CompareTo(object obj) + ////{ + //// if (this == obj) + //// { + //// return 0; + //// } + + //// FileRow fileRow = obj as FileRow; + //// if (null == fileRow) + //// { + //// throw new ArgumentException(WixDataStrings.EXP_OtherObjectIsNotFileRow); + //// } + + //// int compared = this.DiskId - fileRow.DiskId; + //// if (0 == compared) + //// { + //// compared = this.patchGroup - fileRow.patchGroup; + + //// if (0 == compared) + //// { + //// compared = String.Compare(this.File, fileRow.File, StringComparison.InvariantCulture); + //// } + //// } + + //// return compared; + ////} + + /////// + /////// Copies data from another FileRow object. + /////// + /////// An row to get data from. + ////public void CopyFrom(FileRow src) + ////{ + //// for (int i = 0; i < src.Fields.Length; i++) + //// { + //// this[i] = src[i]; + //// } + //// this.assemblyManifest = src.assemblyManifest; + //// this.assemblyType = src.assemblyType; + //// this.directory = src.directory; + //// this.diskId = src.diskId; + //// this.fromModule = src.fromModule; + //// this.isGeneratedShortFileName = src.isGeneratedShortFileName; + //// this.patchGroup = src.patchGroup; + //// this.processorArchitecture = src.processorArchitecture; + //// this.source = src.source; + //// this.PreviousSource = src.PreviousSource; + //// this.Operation = src.Operation; + //// this.symbols = src.symbols; + //// this.PreviousSymbols = src.PreviousSymbols; + //// this.patchAttributes = src.patchAttributes; + //// this.retainOffsets = src.retainOffsets; + //// this.retainLengths = src.retainLengths; + //// this.ignoreOffsets = src.ignoreOffsets; + //// this.ignoreLengths = src.ignoreLengths; + //// this.PreviousRetainOffsets = src.PreviousRetainOffsets; + //// this.PreviousRetainLengths = src.PreviousRetainLengths; + //// this.PreviousIgnoreOffsets = src.PreviousIgnoreOffsets; + //// this.PreviousIgnoreLengths = src.PreviousIgnoreLengths; + ////} + + /////// + /////// Appends previous data from another FileRow object. + /////// + /////// An row to get data from. + ////public void AppendPreviousDataFrom(FileRow src) + ////{ + //// AppendStringToArray(ref this.previousSource, src.previousSource[0]); + //// AppendStringToArray(ref this.previousSymbols, src.previousSymbols[0]); + //// AppendStringToArray(ref this.previousRetainOffsets, src.previousRetainOffsets[0]); + //// AppendStringToArray(ref this.previousRetainLengths, src.previousRetainLengths[0]); + //// AppendStringToArray(ref this.previousIgnoreOffsets, src.previousIgnoreOffsets[0]); + //// AppendStringToArray(ref this.previousIgnoreLengths, src.previousIgnoreLengths[0]); + ////} + + /////// + /////// Helper method for AppendPreviousDataFrom. + /////// + /////// Destination array. + /////// Source string. + ////private static void AppendStringToArray(ref string[] destination, string source) + ////{ + //// string[] result = new string[destination.Length + 1]; + //// destination.CopyTo(result, 0); + //// result[destination.Length] = source; + //// destination = result; + ////} + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/MediaRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/MediaRow.cs new file mode 100644 index 00000000..b931632f --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/MediaRow.cs @@ -0,0 +1,80 @@ +// 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.WindowsInstaller.Rows +{ + /// + /// Specialization of a row for the Media table. + /// + public sealed class MediaRow : Row + { + /// + /// Creates a Media row that belongs to a table. + /// + /// Original source lines for this row. + /// Table this Media row belongs to and should get its column definitions from. + public MediaRow(SourceLineNumber sourceLineNumbers, Table table) + : base(sourceLineNumbers, table) + { + } + + /// + /// Gets or sets the disk id for this media row. + /// + /// Disk id. + public int DiskId + { + get { return (int)this.Fields[0].Data; } + set { this.Fields[0].Data = value; } + } + + /// + /// Gets or sets the last sequence number for this media row. + /// + /// Last sequence number. + public int LastSequence + { + get { return (int)this.Fields[1].Data; } + set { this.Fields[1].Data = value; } + } + + /// + /// Gets or sets the disk prompt for this media row. + /// + /// Disk prompt. + public string DiskPrompt + { + get { return (string)this.Fields[2].Data; } + set { this.Fields[2].Data = value; } + } + + /// + /// Gets or sets the cabinet name for this media row. + /// + /// Cabinet name. + public string Cabinet + { + get { return (string)this.Fields[3].Data; } + set { this.Fields[3].Data = value; } + } + + /// + /// Gets or sets the volume label for this media row. + /// + /// Volume label. + public string VolumeLabel + { + get { return (string)this.Fields[4].Data; } + set { this.Fields[4].Data = value; } + } + + /// + /// Gets or sets the source for this media row. + /// + /// Source. + public string Source + { + get { return (string)this.Fields[5].Data; } + set { this.Fields[5].Data = value; } + } + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/PropertyRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/PropertyRow.cs new file mode 100644 index 00000000..ad5197d9 --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/PropertyRow.cs @@ -0,0 +1,40 @@ +// 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.WindowsInstaller.Rows +{ + /// + /// Specialization of a row for the upgrade table. + /// + public sealed class PropertyRow : Row + { + /// + /// Creates an Upgrade row that belongs to a table. + /// + /// Original source lines for this row. + /// Table this Upgrade row belongs to and should get its column definitions from. + public PropertyRow(SourceLineNumber sourceLineNumbers, Table table) : + base(sourceLineNumbers, table) + { + } + + /// + /// Gets and sets the upgrade code for the row. + /// + /// Property identifier for the row. + public string Property + { + get { return (string)this.Fields[0].Data; } + set { this.Fields[0].Data = value; } + } + + /// + /// Gets and sets the value for the row. + /// + /// Property value for the row. + public string Value + { + get { return (string)this.Fields[1].Data; } + set { this.Fields[1].Data = value; } + } + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/SummaryInfoRowCollection.cs b/src/WixToolset.Data/WindowsInstaller/Rows/SummaryInfoRowCollection.cs new file mode 100644 index 00000000..fc0410e9 --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/SummaryInfoRowCollection.cs @@ -0,0 +1,41 @@ +// 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.WindowsInstaller.Rows +{ + using System; + using System.Collections.ObjectModel; + + /// + /// Indexed container class for summary information rows. + /// + public sealed class SummaryInfoRowCollection : KeyedCollection + { + /// + /// Creates the keyed collection from existing rows in a table. + /// + /// The summary information table to index. + public SummaryInfoRowCollection(Table table) + { + if (0 != String.CompareOrdinal("_SummaryInformation", table.Name)) + { + string message = string.Format(WixDataStrings.EXP_UnsupportedTable, table.Name); + throw new ArgumentException(message, "table"); + } + + foreach (Row row in table.Rows) + { + this.Add(row); + } + } + + /// + /// Gets the summary property ID for the . + /// + /// The row to index. + /// The summary property ID for the . + protected override int GetKeyForItem(Row row) + { + return (int)row[0]; + } + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/UpgradeRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/UpgradeRow.cs new file mode 100644 index 00000000..d757c8d3 --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/UpgradeRow.cs @@ -0,0 +1,90 @@ +// 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.WindowsInstaller.Rows +{ + /// + /// Specialization of a row for the upgrade table. + /// + public sealed class UpgradeRow : Row + { + /// + /// Creates an Upgrade row that belongs to a table. + /// + /// Original source lines for this row. + /// Table this Upgrade row belongs to and should get its column definitions from. + public UpgradeRow(SourceLineNumber sourceLineNumbers, Table table) : + base(sourceLineNumbers, table) + { + } + + /// + /// Gets and sets the upgrade code for the row. + /// + /// Upgrade code for the row. + public string UpgradeCode + { + get { return (string)this.Fields[0].Data; } + set { this.Fields[0].Data = value; } + } + + /// + /// Gets and sets the version minimum for the row. + /// + /// Version minimum for the row. + public string VersionMin + { + get { return (string)this.Fields[1].Data; } + set { this.Fields[1].Data = value; } + } + + /// + /// Gets and sets the version maximum for the row. + /// + /// Version maximum for the row. + public string VersionMax + { + get { return (string)this.Fields[2].Data; } + set { this.Fields[2].Data = value; } + } + + /// + /// Gets and sets the language for the row. + /// + /// Language for the row. + public string Language + { + get { return (string)this.Fields[3].Data; } + set { this.Fields[3].Data = value; } + } + + /// + /// Gets and sets the attributes for the row. + /// + /// Attributes for the row. + public int Attributes + { + get { return (int)this.Fields[4].Data; } + set { this.Fields[4].Data = value; } + } + + /// + /// Gets and sets the remove code for the row. + /// + /// Remove code for the row. + public string Remove + { + get { return (string)this.Fields[5].Data; } + set { this.Fields[5].Data = value; } + } + + /// + /// Gets and sets the action property for the row. + /// + /// Action property for the row. + public string ActionProperty + { + get { return (string)this.Fields[6].Data; } + set { this.Fields[6].Data = value; } + } + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/WixActionRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/WixActionRow.cs new file mode 100644 index 00000000..f7bc784d --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/WixActionRow.cs @@ -0,0 +1,118 @@ +// 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.WindowsInstaller.Rows +{ + using System; + using System.Diagnostics; + using System.Globalization; + using System.Xml; + using WixToolset.Data.Tuples; + + /// + /// Specialization of a row for the sequence tables. + /// + public sealed class WixActionRow : Row, IComparable + { + /// + /// Instantiates an ActionRow that belongs to a table. + /// + /// Original source lines for this row. + /// Table this Action row belongs to and should get its column definitions from. + public WixActionRow(SourceLineNumber sourceLineNumbers, Table table) : + base(sourceLineNumbers, table) + { + } + + /// + /// Instantiates an ActionRow by copying data from another ActionRow. + /// + /// The row the data is copied from. + /// The previous and next action collections are not copied. + private WixActionRow(WixActionRow source) + : base(source) + { + } + + /// + /// Gets or sets the name of the action. + /// + /// The name of the action. + public string Action + { + get { return (string)this.Fields[1].Data; } + set { this.Fields[1].Data = value; } + } + + /// + /// Gets the name of the action this action should be scheduled after. + /// + /// The name of the action this action should be scheduled after. + public string After + { + get { return (string)this.Fields[5].Data; } + set { this.Fields[5].Data = value; } + } + + /// + /// Gets the name of the action this action should be scheduled before. + /// + /// The name of the action this action should be scheduled before. + public string Before + { + get { return (string)this.Fields[4].Data; } + set { this.Fields[4].Data = value; } + } + + /// + /// Gets or sets the condition of the action. + /// + /// The condition of the action. + public string Condition + { + get { return (string)this.Fields[2].Data; } + set { this.Fields[2].Data = value; } + } + + /// + /// Gets or sets whether this action is overridable. + /// + /// Whether this action is overridable. + public bool Overridable + { + get { return (1 == Convert.ToInt32(this.Fields[6].Data, CultureInfo.InvariantCulture)); } + set { this.Fields[6].Data = (value ? 1 : 0); } + } + + /// + /// Gets or sets the sequence number of this action. + /// + /// The sequence number of this action. + public int Sequence + { + get { return Convert.ToInt32(this.Fields[3].Data, CultureInfo.InvariantCulture); } + set { this.Fields[3].Data = value; } + } + + /// + /// Gets of sets the sequence table of this action. + /// + /// The sequence table of this action. + public SequenceTable SequenceTable + { + get { return (SequenceTable)Enum.Parse(typeof(SequenceTable), (string)this.Fields[0].Data); } + set { this.Fields[0].Data = value.ToString(); } + } + + /// + /// Compares the current instance with another object of the same type. + /// + /// Other reference to compare this one to. + /// Returns less than 0 for less than, 0 for equals, and greater than 0 for greater. + public int CompareTo(object obj) + { + WixActionRow otherActionRow = (WixActionRow)obj; + + return this.Sequence.CompareTo(otherActionRow.Sequence); + } + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/WixApprovedExeForElevationRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/WixApprovedExeForElevationRow.cs new file mode 100644 index 00000000..b3d85c8a --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/WixApprovedExeForElevationRow.cs @@ -0,0 +1,78 @@ +// 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.WindowsInstaller.Rows +{ + /// + /// Specialization of a row for the WixApprovedExeForElevation table. + /// + public class WixApprovedExeForElevationRow : Row + { + /// + /// Creates an ApprovedExeForElevation row that does not belong to a table. + /// + /// Original source lines for this row. + /// TableDefinition this ApprovedExeForElevation row belongs to and should get its column definitions from. + public WixApprovedExeForElevationRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : + base(sourceLineNumbers, tableDef) + { + } + + /// + /// Creates an ApprovedExeForElevation row that belongs to a table. + /// + /// Original source lines for this row. + /// Table this ApprovedExeForElevation row belongs to and should get its column definitions from. + public WixApprovedExeForElevationRow(SourceLineNumber sourceLineNumbers, Table table) + : base(sourceLineNumbers, table) + { + } + + /// + /// Gets or sets the ApprovedExeForElevation identifier. + /// + /// The ApprovedExeForElevation identifier. + public string Id + { + get { return (string)this.Fields[0].Data; } + set { this.Fields[0].Data = value; } + } + + /// + /// Gets or sets the Key path. + /// + /// The Key path. + public string Key + { + get { return (string)this.Fields[1].Data; } + set { this.Fields[1].Data = value; } + } + + /// + /// Gets or sets the Value name. + /// + /// The Value name. + public string ValueName + { + get { return (string)this.Fields[2].Data; } + set { this.Fields[2].Data = value; } + } + + /// + /// Gets or sets the attibutes. + /// + /// The BundleApprovedExeForElevationAttributes. + public BundleApprovedExeForElevationAttributes Attributes + { + get { return (BundleApprovedExeForElevationAttributes)this.Fields[3].Data; } + set { this.Fields[3].Data = (int)value; } + } + + /// + /// Gets whether this row is 64-bit. + /// + public bool Win64 + { + get { return BundleApprovedExeForElevationAttributes.Win64 == (this.Attributes & BundleApprovedExeForElevationAttributes.Win64); } + } + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/WixBundleCatalogRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/WixBundleCatalogRow.cs new file mode 100644 index 00000000..0bebb5f3 --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/WixBundleCatalogRow.cs @@ -0,0 +1,50 @@ +// 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.WindowsInstaller.Rows +{ + /// + /// Specialization of a row for the WixCatalog table. + /// + public sealed class WixBundleCatalogRow : Row + { + /// + /// Creates a Catalog row that does not belong to a table. + /// + /// Original source lines for this row. + /// TableDefinition this Catalog row belongs to and should get its column definitions from. + public WixBundleCatalogRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : + base(sourceLineNumbers, tableDef) + { + } + + /// + /// Creates a Catalog row that belongs to a table. + /// + /// Original source lines for this row. + /// Table this Catalog row belongs to and should get its column definitions from. + public WixBundleCatalogRow(SourceLineNumber sourceLineNumbers, Table table) + : base(sourceLineNumbers, table) + { + } + + /// + /// Gets or sets the catalog identifier. + /// + /// The catalog identifier. + public string Id + { + get { return (string)this.Fields[0].Data; } + set { this.Fields[0].Data = value; } + } + + /// + /// Gets or sets the payload identifier. + /// + /// The payload identifier. + public string Payload + { + get { return (string)this.Fields[1].Data; } + set { this.Fields[1].Data = value; } + } + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/WixBundleContainerRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/WixBundleContainerRow.cs new file mode 100644 index 00000000..1c138190 --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/WixBundleContainerRow.cs @@ -0,0 +1,78 @@ +// 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.WindowsInstaller.Rows +{ + /// + /// Specialization of a row for the Container table. + /// + public class WixBundleContainerRow : Row + { + /// + /// Creates a ContainerRow row that does not belong to a table. + /// + /// Original source lines for this row. + /// TableDefinition this Media row belongs to and should get its column definitions from. + public WixBundleContainerRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : + base(sourceLineNumbers, tableDef) + { + } + + /// + /// Creates a ContainerRow row that belongs to a table. + /// + /// Original source lines for this row. + /// Table this Media row belongs to and should get its column definitions from. + public WixBundleContainerRow(SourceLineNumber sourceLineNumbers, Table table) : + base(sourceLineNumbers, table) + { + } + + public string Id + { + get { return (string)this.Fields[0].Data; } + set { this.Fields[0].Data = value; } + } + + public string Name + { + get { return (string)this.Fields[1].Data; } + set { this.Fields[1].Data = value; } + } + + public ContainerType Type + { + get { return (ContainerType)this.Fields[2].Data; } + set { this.Fields[2].Data = (int)value; } + } + + public string DownloadUrl + { + get { return (string)this.Fields[3].Data; } + set { this.Fields[3].Data = value; } + } + + public long Size + { + get { return (long)this.Fields[4].Data; } + set { this.Fields[4].Data = value; } + } + + public string Hash + { + get { return (string)this.Fields[5].Data; } + set { this.Fields[5].Data = value; } + } + + public int AttachedContainerIndex + { + get { return (null == this.Fields[6].Data) ? -1 : (int)this.Fields[6].Data; } + set { this.Fields[6].Data = value; } + } + + public string WorkingPath + { + get { return (string)this.Fields[7].Data; } + set { this.Fields[7].Data = value; } + } + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/WixBundleExePackageRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/WixBundleExePackageRow.cs new file mode 100644 index 00000000..95fc0f54 --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/WixBundleExePackageRow.cs @@ -0,0 +1,103 @@ +// 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.WindowsInstaller.Rows +{ + using WixToolset.Data.Tuples; + + /// + /// Specialization of a row for the WixBundleExePackage table. + /// + public sealed class WixBundleExePackageRow : Row + { + /// + /// Creates a WixBundleExePackage row that does not belong to a table. + /// + /// Original source lines for this row. + /// TableDefinition this row belongs to and should get its column definitions from. + public WixBundleExePackageRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : + base(sourceLineNumbers, tableDef) + { + } + + /// + /// Creates a WixBundleExePackageRow row that belongs to a table. + /// + /// Original source lines for this row. + /// Table this row belongs to and should get its column definitions from. + public WixBundleExePackageRow(SourceLineNumber sourceLineNumbers, Table table) : + base(sourceLineNumbers, table) + { + } + + /// + /// Gets or sets the foreign key identifier to the ChainPackage row. + /// + public string ChainPackageId + { + get { return (string)this.Fields[0].Data; } + set { this.Fields[0].Data = value; } + } + + /// + /// Gets or sets the raw Exe attributes of a patch. + /// + public WixBundleExePackageAttributes Attributes + { + get { return (WixBundleExePackageAttributes)this.Fields[1].Data; } + set { this.Fields[1].Data = value; } + } + + /// + /// Gets or sets the protcol for the executable package. + /// + public string DetectCondition + { + get { return (string)this.Fields[2].Data; } + set { this.Fields[2].Data = value; } + } + + /// + /// Gets or sets the install command for the executable package. + /// + public string InstallCommand + { + get { return (string)this.Fields[3].Data; } + set { this.Fields[3].Data = value; } + } + + /// + /// Gets or sets the repair command for the executable package. + /// + public string RepairCommand + { + get { return (string)this.Fields[4].Data; } + set { this.Fields[4].Data = value; } + } + + /// + /// Gets or sets the uninstall command for the executable package. + /// + public string UninstallCommand + { + get { return (string)this.Fields[5].Data; } + set { this.Fields[5].Data = value; } + } + + /// + /// Gets or sets the protcol for the executable package. + /// + public string ExeProtocol + { + get { return (string)this.Fields[6].Data; } + set { this.Fields[6].Data = value; } + } + + /// + /// Gets whether the executable package is repairable. + /// + public bool Repairable + { + get { return 0 != (this.Attributes & WixBundleExePackageAttributes.Repairable); } + } + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/WixBundleMsiFeatureRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/WixBundleMsiFeatureRow.cs new file mode 100644 index 00000000..6230a20c --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/WixBundleMsiFeatureRow.cs @@ -0,0 +1,93 @@ +// 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.WindowsInstaller.Rows +{ + /// + /// Specialization of a row for the MsiFeature table. + /// + public class WixBundleMsiFeatureRow : Row + { + /// + /// Creates a MsiFeatureRow row that does not belong to a table. + /// + /// Original source lines for this row. + /// TableDefinition this Media row belongs to and should get its column definitions from. + public WixBundleMsiFeatureRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : + base(sourceLineNumbers, tableDef) + { + } + + /// + /// Creates a MsiFeatureRow row that belongs to a table. + /// + /// Original source lines for this row. + /// Table this Media row belongs to and should get its column definitions from. + public WixBundleMsiFeatureRow(SourceLineNumber sourceLineNumbers, Table table) : + base(sourceLineNumbers, table) + { + } + + /// + /// Gets or sets the foreign key identifier to the ChainPackage row. + /// + public string ChainPackageId + { + get { return (string)this.Fields[0].Data; } + set { this.Fields[0].Data = value; } + } + + public string Name + { + get { return (string)this.Fields[1].Data; } + set { this.Fields[1].Data = value; } + } + + public long Size + { + get { return (long)this.Fields[2].Data; } + set { this.Fields[2].Data = value; } + } + + public string Parent + { + get { return (string)this.Fields[3].Data; } + set { this.Fields[3].Data = value; } + } + + public string Title + { + get { return (string)this.Fields[4].Data; } + set { this.Fields[4].Data = value; } + } + + public string Description + { + get { return (string)this.Fields[5].Data; } + set { this.Fields[5].Data = value; } + } + + public int Display + { + get { return (int)this.Fields[6].Data; } + set { this.Fields[6].Data = value; } + } + + public int Level + { + get { return (int)this.Fields[7].Data; } + set { this.Fields[7].Data = value; } + } + + public string Directory + { + get { return (string)this.Fields[8].Data; } + set { this.Fields[8].Data = value; } + } + + public int Attributes + { + get { return (int)this.Fields[9].Data; } + set { this.Fields[9].Data = value; } + } + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/WixBundleMsiPackageRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/WixBundleMsiPackageRow.cs new file mode 100644 index 00000000..fdd2b6cf --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/WixBundleMsiPackageRow.cs @@ -0,0 +1,138 @@ +// 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.WindowsInstaller.Rows +{ + using System; + using System.Globalization; + using WixToolset.Data.Tuples; + + /// + /// Specialization of a row for the WixBundleMsiPackage table. + /// + public sealed class WixBundleMsiPackageRow : Row + { + /// + /// Creates a WixBundleMsiPackage row that does not belong to a table. + /// + /// Original source lines for this row. + /// TableDefinition this row belongs to and should get its column definitions from. + public WixBundleMsiPackageRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : + base(sourceLineNumbers, tableDef) + { + } + + /// + /// Creates a WixBundleMsiPackageRow row that belongs to a table. + /// + /// Original source lines for this row. + /// Table this row belongs to and should get its column definitions from. + public WixBundleMsiPackageRow(SourceLineNumber sourceLineNumbers, Table table) : + base(sourceLineNumbers, table) + { + } + + /// + /// Gets or sets the foreign key identifier to the ChainPackage row. + /// + public string ChainPackageId + { + get { return (string)this.Fields[0].Data; } + set { this.Fields[0].Data = value; } + } + + /// + /// Gets or sets the raw MSI attributes of a package. + /// + public WixBundleMsiPackageAttributes Attributes + { + get { return (WixBundleMsiPackageAttributes)this.Fields[1].Data; } + set { this.Fields[1].Data = value; } + } + + /// + /// Gets or sets the MSI package's product code. + /// + public string ProductCode + { + get { return (string)this.Fields[2].Data; } + set { this.Fields[2].Data = value; } + } + + /// + /// Gets or sets the MSI package's upgrade code. + /// + public string UpgradeCode + { + get { return (string)this.Fields[3].Data; } + set { this.Fields[3].Data = value; } + } + + /// + /// Gets or sets the product version of the MSI package. + /// + public string ProductVersion + { + get { return (string)this.Fields[4].Data; } + set { this.Fields[4].Data = value; } + } + + /// + /// Gets or sets the language of the MSI package. + /// + public int ProductLanguage + { + get { return Convert.ToInt32(this.Fields[5].Data, CultureInfo.InvariantCulture); } + set { this.Fields[5].Data = value; } + } + + /// + /// Gets or sets the product name of the MSI package. + /// + public string ProductName + { + get { return (string)this.Fields[6].Data; } + set { this.Fields[6].Data = value; } + } + + /// + /// Gets or sets the MSI package's manufacturer. + /// + public string Manufacturer + { + get { return (string)this.Fields[7].Data; } + set { this.Fields[7].Data = value; } + } + + /// + /// Gets the display internal UI of a package. + /// + public bool DisplayInternalUI + { + get { return 0 != (this.Attributes & WixBundleMsiPackageAttributes.DisplayInternalUI); } + } + + /// + /// Gets the display internal UI of a package. + /// + public bool EnableFeatureSelection + { + get { return 0 != (this.Attributes & WixBundleMsiPackageAttributes.EnableFeatureSelection); } + } + + /// + /// Gets the display internal UI of a package. + /// + public bool ForcePerMachine + { + get { return 0 != (this.Attributes & WixBundleMsiPackageAttributes.ForcePerMachine); } + } + + /// + /// Gets the suppress loose file payload generation of a package. + /// + public bool SuppressLooseFilePayloadGeneration + { + get { return 0 != (this.Attributes & WixBundleMsiPackageAttributes.SuppressLooseFilePayloadGeneration); } + } + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/WixBundleMsiPropertyRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/WixBundleMsiPropertyRow.cs new file mode 100644 index 00000000..baa58f73 --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/WixBundleMsiPropertyRow.cs @@ -0,0 +1,58 @@ +// 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.WindowsInstaller.Rows +{ + /// + /// Specialization of a row for the WixBundleMsiProperty table. + /// + public sealed class WixBundleMsiPropertyRow : Row + { + /// + /// Creates an WixBundleMsiProperty row that belongs to a table. + /// + /// Original source lines for this row. + /// Table this WixBundleMsiProperty row belongs to and should get its column definitions from. + public WixBundleMsiPropertyRow(SourceLineNumber sourceLineNumbers, Table table) : + base(sourceLineNumbers, table) + { + } + + /// + /// Gets or sets the foreign key identifier to the ChainPackage row. + /// + public string ChainPackageId + { + get { return (string)this.Fields[0].Data; } + set { this.Fields[0].Data = value; } + } + + /// + /// Gets and sets the property identity. + /// + public string Name + { + get { return (string)this.Fields[1].Data; } + set { this.Fields[1].Data = value; } + } + + /// + /// Gets and sets the value for the row. + /// + /// MsiProperty value for the row. + public string Value + { + get { return (string)this.Fields[2].Data; } + set { this.Fields[2].Data = value; } + } + + /// + /// Gets and sets the condition for the row. + /// + /// MsiProperty condition for the row. + public string Condition + { + get { return (string)this.Fields[3].Data; } + set { this.Fields[3].Data = value; } + } + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/WixBundleMspPackageRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/WixBundleMspPackageRow.cs new file mode 100644 index 00000000..23c331fd --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/WixBundleMspPackageRow.cs @@ -0,0 +1,101 @@ +// 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.WindowsInstaller.Rows +{ + using WixToolset.Data.Tuples; + + /// + /// Specialization of a row for the ChainMspPackage table. + /// + public sealed class WixBundleMspPackageRow : Row + { + /// + /// Creates a ChainMspPackage row that does not belong to a table. + /// + /// Original source lines for this row. + /// TableDefinition this row belongs to and should get its column definitions from. + public WixBundleMspPackageRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : + base(sourceLineNumbers, tableDef) + { + } + + /// + /// Creates a WixBundleMspPackage row that belongs to a table. + /// + /// Original source lines for this row. + /// Table this row belongs to and should get its column definitions from. + public WixBundleMspPackageRow(SourceLineNumber sourceLineNumbers, Table table) : + base(sourceLineNumbers, table) + { + } + + /// + /// Gets or sets the foreign key identifier to the ChainPackage row. + /// + public string ChainPackageId + { + get { return (string)this.Fields[0].Data; } + set { this.Fields[0].Data = value; } + } + + /// + /// Gets or sets the raw MSP attributes of a patch. + /// + public WixBundleMspPackageAttributes Attributes + { + get { return (WixBundleMspPackageAttributes)this.Fields[1].Data; } + set { this.Fields[1].Data = value; } + } + + /// + /// Gets or sets the patch code. + /// + public string PatchCode + { + get { return (string)this.Fields[2].Data; } + set { this.Fields[2].Data = value; } + } + + /// + /// Gets or sets the patch's manufacturer. + /// + public string Manufacturer + { + get { return (string)this.Fields[3].Data; } + set { this.Fields[3].Data = value; } + } + + /// + /// Gets or sets the patch's xml. + /// + public string PatchXml + { + get { return (string)this.Fields[4].Data; } + set { this.Fields[4].Data = value; } + } + + /// + /// Gets the display internal UI of a patch. + /// + public bool DisplayInternalUI + { + get { return 0 != (this.Attributes & WixBundleMspPackageAttributes.DisplayInternalUI); } + } + + /// + /// Gets whether to slipstream the patch. + /// + public bool Slipstream + { + get { return 0 != (this.Attributes & WixBundleMspPackageAttributes.Slipstream); } + } + + /// + /// Gets whether the patch targets an unspecified number of packages. + /// + public bool TargetUnspecified + { + get { return 0 != (this.Attributes & WixBundleMspPackageAttributes.TargetUnspecified); } + } + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/WixBundleMsuPackageRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/WixBundleMsuPackageRow.cs new file mode 100644 index 00000000..2a858d07 --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/WixBundleMsuPackageRow.cs @@ -0,0 +1,57 @@ +// 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.WindowsInstaller.Rows +{ + /// + /// Specialization of a row for the WixBundleMsuPackage table. + /// + public sealed class WixBundleMsuPackageRow : Row + { + /// + /// Creates a WixBundleMsuPackage row that does not belong to a table. + /// + /// Original source lines for this row. + /// TableDefinition this row belongs to and should get its column definitions from. + public WixBundleMsuPackageRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : + base(sourceLineNumbers, tableDef) + { + } + + /// + /// Creates a WixBundleMsuPackage row that belongs to a table. + /// + /// Original source lines for this row. + /// Table this row belongs to and should get its column definitions from. + public WixBundleMsuPackageRow(SourceLineNumber sourceLineNumbers, Table table) : + base(sourceLineNumbers, table) + { + } + + /// + /// Gets or sets the foreign key identifier to the ChainPackage row. + /// + public string ChainPackageId + { + get { return (string)this.Fields[0].Data; } + set { this.Fields[0].Data = value; } + } + + /// + /// Gets or sets the detection condition the package. + /// + public string DetectCondition + { + get { return (string)this.Fields[1].Data; } + set { this.Fields[1].Data = value; } + } + + /// + /// Gets or sets the KB of the package. + /// + public string MsuKB + { + get { return (string)this.Fields[2].Data; } + set { this.Fields[2].Data = value; } + } + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/WixBundlePackageCommandLineRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/WixBundlePackageCommandLineRow.cs new file mode 100644 index 00000000..3f23c82c --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/WixBundlePackageCommandLineRow.cs @@ -0,0 +1,80 @@ +// 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.WindowsInstaller.Rows +{ + /// + /// Specialization of a row for the WixBundlePackageCommandLine table. + /// + public class WixBundlePackageCommandLineRow : Row + { + /// + /// Creates a WixBundlePackageCommandLineRow row that does not belong to a table. + /// + /// Original source lines for this row. + /// TableDefinition this WixBundlePackageCommandLineRow row belongs to and should get its column definitions from. + public WixBundlePackageCommandLineRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : + base(sourceLineNumbers, tableDef) + { + } + + /// + /// Creates an WixBundlePackageCommandLineRow row that belongs to a table. + /// + /// Original source lines for this row. + /// Table this WixBundlePackageCommandLineRow row belongs to and should get its column definitions from. + public WixBundlePackageCommandLineRow(SourceLineNumber sourceLineNumbers, Table table) + : base(sourceLineNumbers, table) + { + } + + /// + /// Gets or sets the package identifier. + /// + /// The package identifier. + public string ChainPackageId + { + get { return (string)this.Fields[0].Data; } + set { this.Fields[0].Data = value; } + } + + /// + /// Gets or sets the command-line argument for installation. + /// + /// The command-line argument. + public string InstallArgument + { + get { return (string)this.Fields[1].Data; } + set { this.Fields[1].Data = value; } + } + + /// + /// Gets or sets the command-line argument for uninstallation. + /// + /// The command-line argument. + public string UninstallArgument + { + get { return (string)this.Fields[2].Data; } + set { this.Fields[2].Data = value; } + } + + /// + /// Gets or sets the command-line argument for repair. + /// + /// The command-line argument. + public string RepairArgument + { + get { return (string)this.Fields[3].Data; } + set { this.Fields[3].Data = value; } + } + + /// + /// Gets or sets the condition. + /// + /// The condition. + public string Condition + { + get { return (string)this.Fields[4].Data; } + set { this.Fields[4].Data = value; } + } + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/WixBundlePackageExitCodeRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/WixBundlePackageExitCodeRow.cs new file mode 100644 index 00000000..2de40eb2 --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/WixBundlePackageExitCodeRow.cs @@ -0,0 +1,53 @@ +// 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.WindowsInstaller.Rows +{ + using WixToolset.Data.Tuples; + + /// + /// Specialization of a row for the ExitCode table. + /// + public class WixBundlePackageExitCodeRow : Row + { + /// + /// Creates a ExitCodeRow row that does not belong to a table. + /// + /// Original source lines for this row. + /// TableDefinition this Media row belongs to and should get its column definitions from. + public WixBundlePackageExitCodeRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : + base(sourceLineNumbers, tableDef) + { + } + + /// + /// Creates a ExitCodeRow row that belongs to a table. + /// + /// Original source lines for this row. + /// Table this Media row belongs to and should get its column definitions from. + public WixBundlePackageExitCodeRow(SourceLineNumber sourceLineNumbers, Table table) : + base(sourceLineNumbers, table) + { + } + + /// + /// Gets or sets the foreign key identifier to the ChainPackage row. + /// + public string ChainPackageId + { + get { return (string)this.Fields[0].Data; } + set { this.Fields[0].Data = value; } + } + + public int? Code + { + get { return (null == this.Fields[1].Data) ? (int?)null : (int?)this.Fields[1].Data; } + set { this.Fields[1].Data = value; } + } + + public ExitCodeBehaviorType Behavior + { + get { return (ExitCodeBehaviorType)this.Fields[2].Data; } + set { this.Fields[2].Data = (int)value; } + } + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/WixBundlePackageRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/WixBundlePackageRow.cs new file mode 100644 index 00000000..8a1f438e --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/WixBundlePackageRow.cs @@ -0,0 +1,228 @@ +// 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.WindowsInstaller.Rows +{ + using WixToolset.Data.Tuples; + + /// + /// Specialization of a row for the WixBundlePackage table. + /// + public sealed class WixBundlePackageRow : Row + { + /// + /// Creates a WixBundlePackage row that does not belong to a table. + /// + /// Original source lines for this row. + /// TableDefinition this row belongs to and should get its column definitions from. + public WixBundlePackageRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : + base(sourceLineNumbers, tableDef) + { + } + + /// + /// Creates a WixBundlePackage row that belongs to a table. + /// + /// Original source lines for this row. + /// Table this row belongs to and should get its column definitions from. + public WixBundlePackageRow(SourceLineNumber sourceLineNumbers, Table table) : + base(sourceLineNumbers, table) + { + } + + /// + /// Gets or sets the foreign key to the WixChainItem. + /// + public string WixChainItemId + { + get { return (string)this.Fields[0].Data; } + set { this.Fields[0].Data = value; } + } + + /// + /// Gets or sets the item type. + /// + public WixBundlePackageType Type + { + get { return (WixBundlePackageType)this.Fields[1].Data; } + set { this.Fields[1].Data = (int)value; } + } + + /// + /// Gets or sets the indentifier of the package's payload. + /// + public string PackagePayload + { + get { return (string)this.Fields[2].Data; } + set { this.Fields[2].Data = value; } + } + + /// + /// Gets or sets the raw attributes of a package. + /// + public WixBundlePackageAttributes Attributes + { + get { return (WixBundlePackageAttributes)this.Fields[3].Data; } + set { this.Fields[3].Data = value; } + } + + /// + /// Gets or sets the install condition of the package. + /// + public string InstallCondition + { + get { return (string)this.Fields[4].Data; } + set { this.Fields[4].Data = value; } + } + + /// + /// Gets or sets the language of the package. + /// + public YesNoAlwaysType Cache + { + get { return (null == this.Fields[5].Data) ? YesNoAlwaysType.NotSet : (YesNoAlwaysType)this.Fields[5].Data; } + set { this.Fields[5].Data = (int)value; } + } + + /// + /// Gets or sets the indentifier of the package's cache. + /// + public string CacheId + { + get { return (string)this.Fields[6].Data; } + set { this.Fields[6].Data = value; } + } + + /// + /// Gets or sets whether the package is vital. + /// + public YesNoType Vital + { + get { return (null == this.Fields[7].Data) ? YesNoType.NotSet : (YesNoType)this.Fields[7].Data; } + set { this.Fields[7].Data = (int)value; } + } + + /// + /// Gets or sets whether the package is per-machine. + /// + public YesNoDefaultType PerMachine + { + get { return (null == this.Fields[8].Data) ? YesNoDefaultType.NotSet : (YesNoDefaultType)this.Fields[8].Data; } + set { this.Fields[8].Data = (int)value; } + } + + /// + /// Gets or sets the variable that points to the log for the package. + /// + public string LogPathVariable + { + get { return (string)this.Fields[9].Data; } + set { this.Fields[9].Data = value; } + } + + /// + /// Gets or sets the variable that points to the rollback log for the package. + /// + public string RollbackLogPathVariable + { + get { return (string)this.Fields[10].Data; } + set { this.Fields[10].Data = value; } + } + + /// + /// Gets or sets the size of the package. + /// + public long Size + { + get { return (long)this.Fields[11].Data; } + set { this.Fields[11].Data = value; } + } + + /// + /// Gets or sets the install size of the package. + /// + public long? InstallSize + { + get { return (long?)this.Fields[12].Data; } + set { this.Fields[12].Data = value; } + } + + /// + /// Gets or sets the version of the package. + /// + public string Version + { + get { return (string)this.Fields[13].Data; } + set { this.Fields[13].Data = value; } + } + + /// + /// Gets or sets the language of the package. + /// + public int Language + { + get { return (int)this.Fields[14].Data; } + set { this.Fields[14].Data = value; } + } + + /// + /// Gets or sets the display name of the package. + /// + public string DisplayName + { + get { return (string)this.Fields[15].Data; } + set { this.Fields[15].Data = value; } + } + + /// + /// Gets or sets the description of the package. + /// + public string Description + { + get { return (string)this.Fields[16].Data; } + set { this.Fields[16].Data = value; } + } + + /// + /// Gets or sets the rollback boundary identifier for the package. + /// + public string RollbackBoundary + { + get { return (string)this.Fields[17].Data; } + set { this.Fields[17].Data = value; } + } + + /// + /// Gets or sets the backward rollback boundary identifier for the package. + /// + public string RollbackBoundaryBackward + { + get { return (string)this.Fields[18].Data; } + set { this.Fields[18].Data = value; } + } + + /// + /// Gets or sets whether the package is x64. + /// + public YesNoType x64 + { + get { return (null == this.Fields[19].Data) ? YesNoType.NotSet : (YesNoType)this.Fields[19].Data; } + set { this.Fields[19].Data = (int)value; } + } + + /// + /// Gets whether the package is permanent. + /// + public bool Permanent + { + get { return 0 != (this.Attributes & WixBundlePackageAttributes.Permanent); } + } + + /// + /// Gets whether the package is visible. + /// + public bool Visible + { + get { return 0 != (this.Attributes & WixBundlePackageAttributes.Visible); } + } + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/WixBundlePatchTargetCodeRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/WixBundlePatchTargetCodeRow.cs new file mode 100644 index 00000000..6e05e4b7 --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/WixBundlePatchTargetCodeRow.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.WindowsInstaller.Rows +{ + using System; + + /// + /// Attributes for the PatchTargetCode table. + /// + [Flags] + public enum WixBundlePatchTargetCodeAttributes : int + { + None = 0, + + /// + /// The transform targets a specific ProductCode. + /// + TargetsProductCode = 1, + + /// + /// The transform targets a specific UpgradeCode. + /// + TargetsUpgradeCode = 2, + } + + /// + /// Specialization of a row for the PatchTargetCode table. + /// + public class WixBundlePatchTargetCodeRow : Row + { + /// + /// Creates a PatchTargetCodeRow row that does not belong to a table. + /// + /// Original source lines for this row. + /// TableDefinition this PatchTargetCode row belongs to and should get its column definitions from. + public WixBundlePatchTargetCodeRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : + base(sourceLineNumbers, tableDef) + { + } + + /// + /// Creates a PatchTargetCodeRow row that belongs to a table. + /// + /// Original source lines for this row. + /// Table this PatchTargetCode row belongs to and should get its column definitions from. + public WixBundlePatchTargetCodeRow(SourceLineNumber sourceLineNumbers, Table table) : + base(sourceLineNumbers, table) + { + } + + public string MspPackageId + { + get { return (string)this.Fields[0].Data; } + set { this.Fields[0].Data = value; } + } + + public string TargetCode + { + get { return (string)this.Fields[1].Data; } + set { this.Fields[1].Data = value; } + } + + public WixBundlePatchTargetCodeAttributes Attributes + { + get { return (WixBundlePatchTargetCodeAttributes)this.Fields[2].Data; } + set { this.Fields[2].Data = (int)value; } + } + + public bool TargetsProductCode + { + get { return 0 != (WixBundlePatchTargetCodeAttributes.TargetsProductCode & this.Attributes); } + } + + public bool TargetsUpgradeCode + { + get { return 0 != (WixBundlePatchTargetCodeAttributes.TargetsUpgradeCode & this.Attributes); } + } + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/WixBundlePayloadRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/WixBundlePayloadRow.cs new file mode 100644 index 00000000..ca4d35cc --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/WixBundlePayloadRow.cs @@ -0,0 +1,185 @@ +// 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.WindowsInstaller.Rows +{ + using System; + using System.IO; + + /// + /// Specialization of a row for the PayloadInfo table. + /// + public class WixBundlePayloadRow : Row + { + /// + /// Creates a PayloadRow row that does not belong to a table. + /// + /// Original source lines for this row. + /// TableDefinition this Media row belongs to and should get its column definitions from. + public WixBundlePayloadRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : + base(sourceLineNumbers, tableDef) + { + } + + /// + /// Creates a PayloadRow row that belongs to a table. + /// + /// Original source lines for this row. + /// Table this Media row belongs to and should get its column definitions from. + public WixBundlePayloadRow(SourceLineNumber sourceLineNumbers, Table table) : + base(sourceLineNumbers, table) + { + } + + public string Id + { + get { return (string)this.Fields[0].Data; } + set { this.Fields[0].Data = value; } + } + + public string Name + { + get { return (string)this.Fields[1].Data; } + set { this.Fields[1].Data = value; } + } + + public string SourceFile + { + get { return (string)this.Fields[2].Data; } + set { this.Fields[2].Data = value; } + } + + public string DownloadUrl + { + get { return (string)this.Fields[3].Data; } + set { this.Fields[3].Data = value; } + } + + public YesNoDefaultType Compressed + { + get { return (YesNoDefaultType)this.Fields[4].Data; } + set { this.Fields[4].Data = (int)value; } + } + + public string UnresolvedSourceFile + { + get { return (string)this.Fields[5].Data; } + set { this.Fields[5].Data = value; } + } + + public string DisplayName + { + get { return (string)this.Fields[6].Data; } + set { this.Fields[6].Data = value; } + } + + public string Description + { + get { return (string)this.Fields[7].Data; } + set { this.Fields[7].Data = value; } + } + + public bool EnableSignatureValidation + { + get { return (null != this.Fields[8].Data) && (1 == (int)this.Fields[8].Data); } + set { this.Fields[8].Data = value ? 1 : 0; } + } + + public int FileSize + { + get { return (int)this.Fields[9].Data; } + set { this.Fields[9].Data = value; } + } + + public string Version + { + get { return (string)this.Fields[10].Data; } + set { this.Fields[10].Data = value; } + } + + public string Hash + { + get { return (string)this.Fields[11].Data; } + set { this.Fields[11].Data = value; } + } + + public string PublicKey + { + get { return (string)this.Fields[12].Data; } + set { this.Fields[12].Data = value; } + } + + public string Thumbprint + { + get { return (string)this.Fields[13].Data; } + set { this.Fields[13].Data = value; } + } + + public string Catalog + { + get { return (string)this.Fields[14].Data; } + set { this.Fields[14].Data = value; } + } + + public string Container + { + get { return (string)this.Fields[15].Data; } + set { this.Fields[15].Data = value; } + } + + public string Package + { + get { return (string)this.Fields[16].Data; } + set { this.Fields[16].Data = value; } + } + + public bool ContentFile + { + get { return (null != this.Fields[17].Data) && (1 == (int)this.Fields[17].Data); } + set { this.Fields[17].Data = value ? 1 : 0; } + } + + public string EmbeddedId + { + get { return (string)this.Fields[18].Data; } + set { this.Fields[18].Data = value; } + } + + public bool LayoutOnly + { + get { return (null != this.Fields[19].Data) && (1 == (int)this.Fields[19].Data); } + set { this.Fields[19].Data = value ? 1 : 0; } + } + + public PackagingType Packaging + { + get + { + object data = this.Fields[20].Data; + return (null == data) ? PackagingType.Unknown : (PackagingType)data; + } + + set + { + if (PackagingType.Unknown == value) + { + this.Fields[20].Data = null; + } + else + { + this.Fields[20].Data = (int)value; + } + } + } + + public string ParentPackagePayload + { + get { return (string)this.Fields[21].Data; } + set { this.Fields[21].Data = value; } + } + + public string FullFileName + { + get { return String.IsNullOrEmpty(this.SourceFile) ? String.Empty : Path.GetFullPath(this.SourceFile); } + } + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/WixBundleRelatedPackageRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/WixBundleRelatedPackageRow.cs new file mode 100644 index 00000000..5b0d2a18 --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/WixBundleRelatedPackageRow.cs @@ -0,0 +1,87 @@ +// 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.WindowsInstaller.Rows +{ + /// + /// Specialization of a row for the RelatedPackage table. + /// + public class WixBundleRelatedPackageRow : Row + { + /// + /// Creates a RelatedPackageRow row that does not belong to a table. + /// + /// Original source lines for this row. + /// TableDefinition this Media row belongs to and should get its column definitions from. + public WixBundleRelatedPackageRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : + base(sourceLineNumbers, tableDef) + { + } + + /// + /// Creates a RelatedPackageRow row that belongs to a table. + /// + /// Original source lines for this row. + /// Table this Media row belongs to and should get its column definitions from. + public WixBundleRelatedPackageRow(SourceLineNumber sourceLineNumbers, Table table) : + base(sourceLineNumbers, table) + { + } + + /// + /// Gets or sets the foreign key identifier to the ChainPackage row. + /// + public string ChainPackageId + { + get { return (string)this.Fields[0].Data; } + set { this.Fields[0].Data = value; } + } + + public string Id + { + get { return (string)this.Fields[1].Data; } + set { this.Fields[1].Data = value; } + } + + public string MinVersion + { + get { return (string)this.Fields[2].Data; } + set { this.Fields[2].Data = value; } + } + + public string MaxVersion + { + get { return (string)this.Fields[3].Data; } + set { this.Fields[3].Data = value; } + } + + public string Languages + { + get { return (string)this.Fields[4].Data; } + set { this.Fields[4].Data = value; } + } + + public bool MinInclusive + { + get { return 1 == (int)this.Fields[5].Data; } + set { this.Fields[5].Data = value ? 1 : 0; } + } + + public bool MaxInclusive + { + get { return 1 == (int)this.Fields[6].Data; } + set { this.Fields[6].Data = value ? 1 : 0; } + } + + public bool LangInclusive + { + get { return 1 == (int)this.Fields[7].Data; } + set { this.Fields[7].Data = value ? 1 : 0; } + } + + public bool OnlyDetect + { + get { return 1 == (int)this.Fields[8].Data; } + set { this.Fields[8].Data = value ? 1 : 0; } + } + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/WixBundleRollbackBoundaryRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/WixBundleRollbackBoundaryRow.cs new file mode 100644 index 00000000..434a19e3 --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/WixBundleRollbackBoundaryRow.cs @@ -0,0 +1,59 @@ +// 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.WindowsInstaller.Rows +{ + /// + /// Specialization of a row for the WixBundleRollbackBoundary table. + /// + public sealed class WixBundleRollbackBoundaryRow : Row + { + /// + /// Creates a WixBundleRollbackBoundary row that does not belong to a table. + /// + /// Original source lines for this row. + /// TableDefinition this row belongs to and should get its column definitions from. + public WixBundleRollbackBoundaryRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : + base(sourceLineNumbers, tableDef) + { + } + + /// + /// Creates a RollbackBoundaryRow row that belongs to a table. + /// + /// Original source lines for this row. + /// Table this row belongs to and should get its column definitions from. + public WixBundleRollbackBoundaryRow(SourceLineNumber sourceLineNumbers, Table table) : + base(sourceLineNumbers, table) + { + } + + /// + /// Gets or sets the foreign key identifier to the ChainPackage row. + /// + public string ChainPackageId + { + get { return (string)this.Fields[0].Data; } + set { this.Fields[0].Data = value; } + } + + /// + /// Gets or sets whether the package is vital. + /// + /// Vitality of the package. + public YesNoType Vital + { + get { return (null == this.Fields[1].Data) ? YesNoType.NotSet : (YesNoType)this.Fields[1].Data; } + set { this.Fields[1].Data = (int)value; } + } + + /// + /// Gets or sets whether the rollback-boundary should be installed as an MSI transaction. + /// + /// Vitality of the package. + public YesNoType Transaction + { + get { return (null == this.Fields[2].Data) ? YesNoType.NotSet : (YesNoType)this.Fields[2].Data; } + set { this.Fields[2].Data = (int)value; } + } + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/WixBundleRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/WixBundleRow.cs new file mode 100644 index 00000000..22538606 --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/WixBundleRow.cs @@ -0,0 +1,228 @@ +// 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.WindowsInstaller.Rows +{ + using System; + + /// + /// Bundle info for binding Bundles. + /// + public class WixBundleRow : Row + { + /// + /// Creates a WixBundleRow row that does not belong to a table. + /// + /// Original source lines for this row. + /// TableDefinition this WixBundleRow row belongs to and should get its column definitions from. + public WixBundleRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : + base(sourceLineNumbers, tableDef) + { + } + + /// + /// Creates a WixBundleRow row that belongs to a table. + /// + /// Original source lines for this row. + /// Table this WixBundleRow row belongs to and should get its column definitions from. + public WixBundleRow(SourceLineNumber sourceLineNumbers, Table table) : + base(sourceLineNumbers, table) + { + } + + public string Version + { + get { return (string)this.Fields[0].Data; } + set { this.Fields[0].Data = value; } + } + + public string Copyright + { + get { return (string)this.Fields[1].Data; } + set { this.Fields[1].Data = value; } + } + + public string Name + { + get { return (string)this.Fields[2].Data; } + set { this.Fields[2].Data = value; } + } + + public string AboutUrl + { + get { return (string)this.Fields[3].Data; } + set { this.Fields[3].Data = value; } + } + + public int DisableModify + { + get { return (null == this.Fields[4].Data) ? 0 : (int)this.Fields[4].Data; } + set { this.Fields[4].Data = value; } + } + + public bool DisableRemove + { + get { return (null != this.Fields[5].Data && 0 != (int)this.Fields[5].Data); } + set { this.Fields[5].Data = value ? 1 : 0; } + } + + // There is no 6. It used to be DisableRepair. + + public string HelpTelephone + { + get { return (string)this.Fields[7].Data; } + set { this.Fields[7].Data = value; } + } + + public string HelpLink + { + get { return (string)this.Fields[8].Data; } + set { this.Fields[8].Data = value; } + } + + public string Publisher + { + get { return (string)this.Fields[9].Data; } + set { this.Fields[9].Data = value; } + } + + public string UpdateUrl + { + get { return (string)this.Fields[10].Data; } + set { this.Fields[10].Data = value; } + } + + public YesNoDefaultType Compressed + { + get { return (null == this.Fields[11].Data) ? YesNoDefaultType.Default : (0 == (int)this.Fields[11].Data) ? YesNoDefaultType.No : YesNoDefaultType.Yes; } + set { this.Fields[11].Data = (int)value; } + } + + public PackagingType DefaultPackagingType + { + get { return (YesNoDefaultType.No == this.Compressed) ? PackagingType.External : PackagingType.Embedded; } + } + + public string LogPathPrefixExtension + { + get { return (string)this.Fields[12].Data ?? String.Empty; } + set { this.Fields[12].Data = value; } + } + + public string LogPathVariable + { + get + { + string[] logVariableAndPrefixExtension = this.LogPathPrefixExtension.Split(':'); + return logVariableAndPrefixExtension[0]; + } + } + + public string LogPrefix + { + get + { + string[] logVariableAndPrefixExtension = this.LogPathPrefixExtension.Split(':'); + if (2 > logVariableAndPrefixExtension.Length) + { + return String.Empty; + } + string logPrefixAndExtension = logVariableAndPrefixExtension[1]; + int extensionIndex = logPrefixAndExtension.LastIndexOf('.'); + return logPrefixAndExtension.Substring(0, extensionIndex); + } + } + + public string LogExtension + { + get + { + string[] logVariableAndPrefixExtension = this.LogPathPrefixExtension.Split(':'); + if (2 > logVariableAndPrefixExtension.Length) + { + return String.Empty; + } + string logPrefixAndExtension = logVariableAndPrefixExtension[1]; + int extensionIndex = logPrefixAndExtension.LastIndexOf('.'); + return logPrefixAndExtension.Substring(extensionIndex + 1); + } + } + + public string IconPath + { + get { return (string)this.Fields[13].Data; } + set { this.Fields[13].Data = value; } + } + + public string SplashScreenBitmapPath + { + get { return (string)this.Fields[14].Data; } + set { this.Fields[14].Data = value; } + } + + public string Condition + { + get { return (string)this.Fields[15].Data; } + set { this.Fields[15].Data = value; } + } + + public string Tag + { + get { return (string)this.Fields[16].Data; } + set { this.Fields[16].Data = value; } + } + + public Platform Platform + { + get { return (Platform)Enum.Parse(typeof(Platform), (string)this.Fields[17].Data); } + set { this.Fields[17].Data = value.ToString(); } + } + + public string ParentName + { + get { return (string)this.Fields[18].Data; } + set { this.Fields[18].Data = value; } + } + + public string UpgradeCode + { + get { return (string)this.Fields[19].Data; } + set { this.Fields[19].Data = value; } + } + + public Guid BundleId + { + get + { + if (null == this.Fields[20].Data) + { + this.Fields[20].Data = Guid.NewGuid().ToString("B"); + } + + return new Guid((string)this.Fields[20].Data); + } + + set { this.Fields[20].Data = value.ToString(); } + } + + public string ProviderKey + { + get + { + if (null == this.Fields[21].Data) + { + this.Fields[21].Data = this.BundleId.ToString("B"); + } + + return (string)this.Fields[21].Data; + } + + set { this.Fields[21].Data = value; } + } + + public bool PerMachine + { + get { return (null != this.Fields[22].Data && 0 != (int)this.Fields[22].Data); } + set { this.Fields[22].Data = value ? 1 : 0; } + } + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/WixBundleSlipstreamMspRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/WixBundleSlipstreamMspRow.cs new file mode 100644 index 00000000..0fea725f --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/WixBundleSlipstreamMspRow.cs @@ -0,0 +1,48 @@ +// 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.WindowsInstaller.Rows +{ + /// + /// Specialization of a row for the SlipstreamMsp table. + /// + public class WixBundleSlipstreamMspRow : Row + { + /// + /// Creates a SlipstreamMspRow row that does not belong to a table. + /// + /// Original source lines for this row. + /// TableDefinition this Media row belongs to and should get its column definitions from. + public WixBundleSlipstreamMspRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : + base(sourceLineNumbers, tableDef) + { + } + + /// + /// Creates a SlipstreamMspRow row that belongs to a table. + /// + /// Original source lines for this row. + /// Table this Media row belongs to and should get its column definitions from. + public WixBundleSlipstreamMspRow(SourceLineNumber sourceLineNumbers, Table table) : + base(sourceLineNumbers, table) + { + } + + /// + /// Gets or sets the foreign key identifier to the ChainPackage row. + /// + public string ChainPackageId + { + get { return (string)this.Fields[0].Data; } + set { this.Fields[0].Data = value; } + } + + /// + /// Gets or sets the foreign key identifier to the ChainPackage row for the MSP package. + /// + public string MspPackageId + { + get { return (string)this.Fields[1].Data; } + set { this.Fields[1].Data = value; } + } + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/WixBundleUpdateRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/WixBundleUpdateRow.cs new file mode 100644 index 00000000..68360ae9 --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/WixBundleUpdateRow.cs @@ -0,0 +1,36 @@ +// 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.WindowsInstaller.Rows +{ + /// + /// Bundle update info for binding Bundles. + /// + public class WixBundleUpdateRow : Row + { + /// + /// Creates a WixBundleUpdateRow row that does not belong to a table. + /// + /// Original source lines for this row. + /// TableDefinition this WixBundleUpdateRow row belongs to and should get its column definitions from. + public WixBundleUpdateRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : + base(sourceLineNumbers, tableDef) + { + } + + /// + /// Creates a WixBundleUpdateRow row that belongs to a table. + /// + /// Original source lines for this row. + /// Table this WixBundleUpdateRow row belongs to and should get its column definitions from. + public WixBundleUpdateRow(SourceLineNumber sourceLineNumbers, Table table) : + base(sourceLineNumbers, table) + { + } + + public string Location + { + get { return (string)this.Fields[0].Data; } + set { this.Fields[0].Data = value; } + } + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/WixBundleVariableRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/WixBundleVariableRow.cs new file mode 100644 index 00000000..64fa0336 --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/WixBundleVariableRow.cs @@ -0,0 +1,80 @@ +// 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.WindowsInstaller.Rows +{ + /// + /// Specialization of a row for the Variable table. + /// + public sealed class WixBundleVariableRow : Row + { + /// + /// Creates a Variable row that does not belong to a table. + /// + /// Original source lines for this row. + /// TableDefinition this Media row belongs to and should get its column definitions from. + public WixBundleVariableRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : + base(sourceLineNumbers, tableDef) + { + } + + /// + /// Creates a Variable row that belongs to a table. + /// + /// Original source lines for this row. + /// Table this Media row belongs to and should get its column definitions from. + public WixBundleVariableRow(SourceLineNumber sourceLineNumbers, Table table) + : base(sourceLineNumbers, table) + { + } + + /// + /// Gets or sets the variable identifier. + /// + /// The variable identifier. + public string Id + { + get { return (string)this.Fields[0].Data; } + set { this.Fields[0].Data = value; } + } + + /// + /// Gets or sets the variable's value. + /// + /// The variable's value. + public string Value + { + get { return (string)this.Fields[1].Data; } + set { this.Fields[1].Data = value; } + } + + /// + /// Gets or sets the variable's type. + /// + /// The variable's type. + public string Type + { + get { return (string)this.Fields[2].Data; } + set { this.Fields[2].Data = value; } + } + + /// + /// Gets or sets whether this variable is hidden. + /// + /// Whether this variable is hidden. + public bool Hidden + { + get { return (null == this.Fields[3].Data || 0 == ((int)this.Fields[3].Data)) ? false : true; } + set { this.Fields[3].Data = value ? 1 : 0; } + } + + /// + /// Gets or sets whether this variable is persisted. + /// + /// Whether this variable is persisted. + public bool Persisted + { + get { return (null == this.Fields[4].Data || 0 == ((int)this.Fields[4].Data)) ? false : true; } + set { this.Fields[4].Data = value ? 1 : 0; } + } + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/WixChainItemRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/WixChainItemRow.cs new file mode 100644 index 00000000..8e08d613 --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/WixChainItemRow.cs @@ -0,0 +1,39 @@ +// 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.WindowsInstaller.Rows +{ + /// + /// Specialization of a row for the WixChainItem table. + /// + public sealed class WixChainItemRow : Row + { + /// + /// Creates a WixChainItem row that does not belong to a table. + /// + /// Original source lines for this row. + /// TableDefinition this ChainItem row belongs to and should get its column definitions from. + public WixChainItemRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : + base(sourceLineNumbers, tableDef) + { + } + + /// + /// Creates a WixChainItem row that belongs to a table. + /// + /// Original source lines for this row. + /// Table this ChainItem row belongs to and should get its column definitions from. + public WixChainItemRow(SourceLineNumber sourceLineNumbers, Table table) + : base(sourceLineNumbers, table) + { + } + + /// + /// Gets or sets the WixChainItem identifier. + /// + public string Id + { + get { return (string)this.Fields[0].Data; } + set { this.Fields[0].Data = value; } + } + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/WixChainRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/WixChainRow.cs new file mode 100644 index 00000000..78ba9766 --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/WixChainRow.cs @@ -0,0 +1,65 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data.WindowsInstaller.Rows +{ + using WixToolset.Data.Tuples; + + /// + /// Specialization of a row for the WixChain table. + /// + public sealed class WixChainRow : Row + { + /// + /// Creates a WixChain row that does not belong to a table. + /// + /// Original source lines for this row. + /// TableDefinition this row belongs to and should get its column definitions from. + public WixChainRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : + base(sourceLineNumbers, tableDef) + { + } + + /// + /// Creates a WixChainRow row that belongs to a table. + /// + /// Original source lines for this row. + /// Table this row belongs to and should get its column definitions from. + public WixChainRow(SourceLineNumber sourceLineNumbers, Table table) : + base(sourceLineNumbers, table) + { + } + + /// + /// Gets or sets the raw chain attributes. + /// + public WixChainAttributes Attributes + { + get { return (WixChainAttributes)this.Fields[0].Data; } + set { this.Fields[0].Data = value; } + } + + /// + /// Gets the disable rollback state of a chain. + /// + public bool DisableRollback + { + get { return 0 != (this.Attributes & WixChainAttributes.DisableRollback); } + } + + /// + /// Gets disable system restore state of a chain. + /// + public bool DisableSystemRestore + { + get { return 0 != (this.Attributes & WixChainAttributes.DisableSystemRestore); } + } + + /// + /// Gets parallel cache of a chain. + /// + public bool ParallelCache + { + get { return 0 != (this.Attributes & WixChainAttributes.ParallelCache); } + } + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/WixComplexReferenceRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/WixComplexReferenceRow.cs new file mode 100644 index 00000000..2abd7656 --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/WixComplexReferenceRow.cs @@ -0,0 +1,202 @@ +// 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.WindowsInstaller.Rows +{ + using System; + using System.Diagnostics.CodeAnalysis; + + /// + /// Specialization of a row for the WixComplexReference table. + /// + public sealed class WixComplexReferenceRow : Row, IComparable + { + /// + /// Creates a WixComplexReferenceRow row that belongs to a table. + /// + /// Original source lines for this row. + /// Table this row belongs to and should get its column definitions from. + public WixComplexReferenceRow(SourceLineNumber sourceLineNumbers, Table table) + : base(sourceLineNumbers, table) + { + } + + /// + /// Gets the parent type of the complex reference. + /// + /// Parent type of the complex reference. + public ComplexReferenceParentType ParentType + { + get { return (ComplexReferenceParentType)Enum.ToObject(typeof(ComplexReferenceParentType), (int)this.Fields[1].Data); } + set { this.Fields[1].Data = (int)value; } + } + + /// + /// Gets or sets the parent identifier of the complex reference. + /// + /// Parent identifier of the complex reference. + public string ParentId + { + get { return (string)this.Fields[0].Data; } + set { this.Fields[0].Data = value; } + } + + /// + /// Gets the parent language of the complex reference. + /// + /// Parent language of the complex reference. + public string ParentLanguage + { + get { return (string)this.Fields[2].Data; } + set { this.Fields[2].Data = value; } + } + + /// + /// Gets the child type of the complex reference. + /// + /// Child type of the complex reference. + public ComplexReferenceChildType ChildType + { + get { return (ComplexReferenceChildType)Enum.ToObject(typeof(ComplexReferenceChildType), (int)this.Fields[4].Data); } + set { this.Fields[4].Data = (int)value; } + } + + /// + /// Gets the child identifier of the complex reference. + /// + /// Child identifier of the complex reference. + public string ChildId + { + get { return (string)this.Fields[3].Data; } + set { this.Fields[3].Data = value; } + } + + /// + /// Gets if this is the primary complex reference. + /// + /// true if primary complex reference. + public bool IsPrimary + { + get + { + return (0x1 == ((int)this.Fields[5].Data & 0x1)); + } + + set + { + if (null == this.Fields[5].Data) + { + this.Fields[5].Data = 0; + } + + if (value) + { + this.Fields[5].Data = (int)this.Fields[5].Data | 0x1; + } + else + { + this.Fields[5].Data = (int)this.Fields[5].Data & ~0x1; + } + } + } + + /// + /// Determines if two complex references are equivalent. + /// + /// Complex reference to compare. + /// True if complex references are equivalent. + public override bool Equals(object obj) + { + return 0 == this.CompareTo(obj); + } + + /// + /// Gets the hash code for the complex reference. + /// + /// Hash code for the complex reference. + public override int GetHashCode() + { + return this.ChildType.GetHashCode() ^ this.ChildId.GetHashCode() ^ this.ParentType.GetHashCode() ^ this.ParentLanguage.GetHashCode() ^ this.ParentId.GetHashCode() ^ this.IsPrimary.GetHashCode(); + } + + /// + /// Compares two complex references. + /// + /// Complex reference to compare to. + /// Zero if the objects are equivalent, negative number if the provided object is less, positive if greater. + public int CompareTo(object obj) + { + int comparison = this.CompareToWithoutConsideringPrimary(obj); + if (0 == comparison) + { + comparison = ((WixComplexReferenceRow)obj).IsPrimary.CompareTo(this.IsPrimary); // Note: the order of these is purposely switched to ensure that "Yes" is lower than "No" and "NotSet" + } + return comparison; + } + + /// + /// Compares two complex references without considering the primary bit. + /// + /// Complex reference to compare to. + /// Zero if the objects are equivalent, negative number if the provided object is less, positive if greater. + [SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters", MessageId = "System.ArgumentException.#ctor(System.String,System.String)")] + public int CompareToWithoutConsideringPrimary(object obj) + { + var other = obj as WixComplexReferenceRow ?? throw new ArgumentNullException(nameof(obj)); + + int comparison = this.ChildType - other.ChildType; + if (0 == comparison) + { + comparison = String.Compare(this.ChildId, other.ChildId, StringComparison.Ordinal); + if (0 == comparison) + { + comparison = this.ParentType - other.ParentType; + if (0 == comparison) + { + string thisParentLanguage = null == this.ParentLanguage ? String.Empty : this.ParentLanguage; + string otherParentLanguage = null == other.ParentLanguage ? String.Empty : other.ParentLanguage; + comparison = String.Compare(thisParentLanguage, otherParentLanguage, StringComparison.Ordinal); + if (0 == comparison) + { + comparison = String.Compare(this.ParentId, other.ParentId, StringComparison.Ordinal); + } + } + } + } + + return comparison; + } + + /// + /// Creates a shallow copy of the ComplexReference. + /// + /// A shallow copy of the ComplexReference. + public WixComplexReferenceRow Clone() + { + WixComplexReferenceRow wixComplexReferenceRow = new WixComplexReferenceRow(this.SourceLineNumbers, this.Table); + wixComplexReferenceRow.ParentType = this.ParentType; + wixComplexReferenceRow.ParentId = this.ParentId; + wixComplexReferenceRow.ParentLanguage = this.ParentLanguage; + wixComplexReferenceRow.ChildType = this.ChildType; + wixComplexReferenceRow.ChildId = this.ChildId; + wixComplexReferenceRow.IsPrimary = this.IsPrimary; + + return wixComplexReferenceRow; + } + + /// + /// Changes all of the parent references to point to the passed in parent reference. + /// + /// New parent complex reference. + public void Reparent(WixComplexReferenceRow parent) + { + this.ParentId = parent.ParentId; + this.ParentLanguage = parent.ParentLanguage; + this.ParentType = parent.ParentType; + + if (!this.IsPrimary) + { + this.IsPrimary = parent.IsPrimary; + } + } + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/WixDeltaPatchFileRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/WixDeltaPatchFileRow.cs new file mode 100644 index 00000000..9edcea92 --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/WixDeltaPatchFileRow.cs @@ -0,0 +1,142 @@ +// 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.WindowsInstaller.Rows +{ + /// + /// Specialization of a row for the WixDeltaPatchFile table. + /// + public sealed class WixDeltaPatchFileRow : Row + { + /// + /// Creates a WixDeltaPatchFile row that does not belong to a table. + /// + /// Original source lines for this row. + /// TableDefinition this Media row belongs to and should get its column definitions from. + public WixDeltaPatchFileRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : + base(sourceLineNumbers, tableDef) + { + } + + /// + /// Creates a WixDeltaPatchFile row that belongs to a table. + /// + /// Original source lines for this row. + /// Table this File row belongs to and should get its column definitions from. + public WixDeltaPatchFileRow(SourceLineNumber sourceLineNumbers, Table table) : + base(sourceLineNumbers, table) + { + } + + /// + /// Gets or sets the primary key of the file row. + /// + /// Primary key of the file row. + public string File + { + get { return (string)this.Fields[0].Data; } + set { this.Fields[0].Data = value; } + } + + /// + /// Gets or sets the delta patch retain-length list for the file. + /// + /// RetainLength list for the file. + public string RetainLengths + { + get { return (string)this.Fields[1].Data; } + set { this.Fields[1].Data = value; } + } + + /// + /// Gets or sets the previous delta patch retain-length list for the file. + /// + /// Previous RetainLength list for the file. + public string PreviousRetainLengths + { + get { return this.Fields[1].PreviousData; } + set { this.Fields[1].PreviousData = value; } + } + + /// + /// Gets or sets the delta patch ignore-offset list for the file. + /// + /// IgnoreOffset list for the file. + public string IgnoreOffsets + { + get { return (string)this.Fields[2].Data; } + set { this.Fields[2].Data = value; } + } + + /// + /// Gets or sets the previous delta patch ignore-offset list for the file. + /// + /// Previous IgnoreOffset list for the file. + public string PreviousIgnoreOffsets + { + get { return this.Fields[2].PreviousData; } + set { this.Fields[2].PreviousData = value; } + } + + /// + /// Gets or sets the delta patch ignore-length list for the file. + /// + /// IgnoreLength list for the file. + public string IgnoreLengths + { + get { return (string)this.Fields[3].Data; } + set { this.Fields[3].Data = value; } + } + + /// + /// Gets or sets the previous delta patch ignore-length list for the file. + /// + /// Previous IgnoreLength list for the file. + public string PreviousIgnoreLengths + { + get { return this.Fields[3].PreviousData; } + set { this.Fields[3].PreviousData = value; } + } + + /// + /// Gets or sets the delta patch retain-offset list for the file. + /// + /// RetainOffset list for the file. + public string RetainOffsets + { + get { return (string)this.Fields[4].Data; } + set { this.Fields[4].Data = value; } + } + + /// + /// Gets or sets the previous delta patch retain-offset list for the file. + /// + /// PreviousRetainOffset list for the file. + public string PreviousRetainOffsets + { + get { return this.Fields[4].PreviousData; } + set { this.Fields[4].PreviousData = value; } + } + + /// + /// Gets or sets the symbol paths for the file. + /// + /// SymbolPath list for the file. + /// This is set during binding. + public string Symbols + { + get { return (string)this.Fields[5].Data; } + set { this.Fields[5].Data = value; } + } + + /// + /// Gets or sets the previous symbol paths for the file. + /// + /// PreviousSymbolPath list for the file. + /// This is set during binding. + public string PreviousSymbols + { + get { return (string)this.Fields[5].PreviousData; } + set { this.Fields[5].PreviousData = value; } + } + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/WixDeltaPatchSymbolPathsRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/WixDeltaPatchSymbolPathsRow.cs new file mode 100644 index 00000000..13899bd0 --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/WixDeltaPatchSymbolPathsRow.cs @@ -0,0 +1,60 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data.WindowsInstaller.Rows +{ + using WixToolset.Data.Tuples; + + /// + /// Specialization of a row for the WixDeltaPatchSymbolPaths table. + /// + public sealed class WixDeltaPatchSymbolPathsRow : Row + { + /// + /// Creates a WixDeltaPatchSymbolPaths row that does not belong to a table. + /// + /// Original source lines for this row. + /// TableDefinition this row belongs to and should get its column definitions from. + public WixDeltaPatchSymbolPathsRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : + base(sourceLineNumbers, tableDef) + { + } + + /// + /// Creates a WixDeltaPatchSymbolPaths row that belongs to a table. + /// + /// Original source lines for this row. + /// Table this row belongs to and should get its column definitions from. + public WixDeltaPatchSymbolPathsRow(SourceLineNumber sourceLineNumbers, Table table) : + base(sourceLineNumbers, table) + { + } + + /// + /// Gets or sets the identifier the symbol paths apply to. + /// + /// RetainLength list for the file. + public string Id + { + get { return (string)this.Fields[0].Data; } + set { this.Fields[0].Data = value; } + } + + /// + /// Gets or sets the type of the identifier. + /// + public SymbolPathType Type + { + get { return (SymbolPathType)this.Fields[1].AsInteger(); } + set { this.Fields[1].Data = value; } + } + + /// + /// Gets or sets the delta patch symbol paths. + /// + public string SymbolPaths + { + get { return (string)this.Fields[2].Data; } + set { this.Fields[2].Data = value; } + } + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/WixFileRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/WixFileRow.cs new file mode 100644 index 00000000..302272c4 --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/WixFileRow.cs @@ -0,0 +1,163 @@ +// 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.WindowsInstaller.Rows +{ + using WixToolset.Data.Tuples; + + /// + /// Specialization of a row for the WixFile table. + /// + public sealed class WixFileRow : Row + { + /// + /// Creates a WixFile row that does not belong to a table. + /// + /// Original source lines for this row. + /// TableDefinition this row belongs to and should get its column definitions from. + public WixFileRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : + base(sourceLineNumbers, tableDef) + { + } + + /// + /// Creates a WixFile row that belongs to a table. + /// + /// Original source lines for this row. + /// Table this row belongs to and should get its column definitions from. + public WixFileRow(SourceLineNumber sourceLineNumbers, Table table) : + base(sourceLineNumbers, table) + { + } + + /// + /// Gets or sets the primary key of the file row. + /// + /// Primary key of the file row. + public string File + { + get { return (string)this.Fields[0].Data; } + set { this.Fields[0].Data = value; } + } + + /// + /// Gets or sets the assembly type of the file row. + /// + /// Assembly type of the file row. + public FileAssemblyType AssemblyType + { + get { return (null == this.Fields[1]) ? FileAssemblyType.NotAnAssembly : (FileAssemblyType)this.Fields[1].AsInteger(); } + set { this.Fields[1].Data = (int)value; } + } + + /// + /// Gets or sets the identifier for the assembly manifest. + /// + /// Identifier for the assembly manifest. + public string AssemblyManifest + { + get { return (string)this.Fields[2].Data; } + set { this.Fields[2].Data = value; } + } + + /// + /// Gets or sets the application for the assembly. + /// + /// Application for the assembly. + public string AssemblyApplication + { + get { return (string)this.Fields[3].Data; } + set { this.Fields[3].Data = value; } + } + + /// + /// Gets or sets the directory of the file. + /// + /// Directory of the file. + public string Directory + { + get { return (string)this.Fields[4].Data; } + set { this.Fields[4].Data = value; } + } + + /// + /// Gets or sets the disk id for this file. + /// + /// Disk id for the file. + public int DiskId + { + get { return (int)this.Fields[5].Data; } + set { this.Fields[5].Data = value; } + } + + /// + /// Gets or sets the source location to the file. + /// + /// Source location to the file. + public string Source + { + get { return (string)this.Fields[6].Data; } + set { this.Fields[6].Data = value; } + } + + /// + /// Gets or sets the source location to the file. + /// + /// Source location to the file. + public string PreviousSource + { + get { return (string)this.Fields[6].PreviousData; } + set { this.Fields[6].PreviousData = value; } + } + + /// + /// Gets or sets the architecture the file executes on. + /// + /// Architecture the file executes on. + public string ProcessorArchitecture + { + get { return (string)this.Fields[7].Data; } + set { this.Fields[7].Data = value; } + } + + /// + /// Gets or sets the patch group of a patch-added file. + /// + /// The patch group of a patch-added file. + public int PatchGroup + { + get { return (null == this.Fields[8].Data) ? 0 : (int)this.Fields[8].Data; } + set { this.Fields[8].Data = value; } + } + + /// + /// Gets or sets the attributes on a file. + /// + /// Attributes on a file. + public int Attributes + { + get { return (int)this.Fields[9].Data; } + set { this.Fields[9].Data = value; } + } + + /// + /// Gets or sets the patching attributes to the file. + /// + /// Patching attributes of the file. + public PatchAttributeType PatchAttributes + { + get { return (PatchAttributeType)this.Fields[10].AsInteger(); } + set { this.Fields[10].Data = (int)value; } + } + + /// + /// Gets or sets the path to the delta patch header. + /// + /// Patch header path. + /// Set by the binder only when doing delta patching. + public string DeltaPatchHeaderSource + { + get { return (string)this.Fields[11].Data; } + set { this.Fields[11].Data = value; } + } + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/WixGroupRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/WixGroupRow.cs new file mode 100644 index 00000000..e59df729 --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/WixGroupRow.cs @@ -0,0 +1,62 @@ +// 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.WindowsInstaller.Rows +{ + using System; + + /// + /// Specialization of a row for the WixGroup table. + /// + public sealed class WixGroupRow : Row + { + /// + /// Creates a WixGroupRow row that belongs to a table. + /// + /// Original source lines for this row. + /// Table this row belongs to and should get its column definitions from. + public WixGroupRow(SourceLineNumber sourceLineNumbers, Table table) + : base(sourceLineNumbers, table) + { + } + + /// + /// Gets or sets the parent identifier of the complex reference. + /// + /// Parent identifier of the complex reference. + public string ParentId + { + get { return (string)this.Fields[0].Data; } + set { this.Fields[0].Data = value; } + } + + /// + /// Gets the parent type of the complex reference. + /// + /// Parent type of the complex reference. + public ComplexReferenceParentType ParentType + { + get { return (ComplexReferenceParentType)Enum.Parse(typeof(ComplexReferenceParentType), (string)this.Fields[1].Data); } + set { this.Fields[1].Data = value.ToString(); } + } + + /// + /// Gets the child identifier of the complex reference. + /// + /// Child identifier of the complex reference. + public string ChildId + { + get { return (string)this.Fields[2].Data; } + set { this.Fields[2].Data = value; } + } + + /// + /// Gets the child type of the complex reference. + /// + /// Child type of the complex reference. + public ComplexReferenceChildType ChildType + { + get { return (ComplexReferenceChildType)Enum.Parse(typeof(ComplexReferenceChildType), (string)this.Fields[3].Data); } + set { this.Fields[3].Data = value.ToString(); } + } + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/WixMediaRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/WixMediaRow.cs new file mode 100644 index 00000000..dfe40c35 --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/WixMediaRow.cs @@ -0,0 +1,60 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data.WindowsInstaller.Rows +{ + /// + /// Specialization of a row for the WixMedia table. + /// + public sealed class WixMediaRow : Row + { + /// + /// Creates a WixMedia row that does not belong to a table. + /// + /// Original source lines for this row. + /// TableDefinition this Media row belongs to and should get its column definitions from. + public WixMediaRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : + base(sourceLineNumbers, tableDef) + { + } + + /// + /// Creates a WixMedia row that belongs to a table. + /// + /// Original source lines for this row. + /// Table this Media row belongs to and should get its column definitions from. + public WixMediaRow(SourceLineNumber sourceLineNumbers, Table table) : + base(sourceLineNumbers, table) + { + } + + /// + /// Gets or sets the disk id for this media. + /// + /// Disk id for the media. + public int DiskId + { + get { return (int)this.Fields[0].Data; } + set { this.Fields[0].Data = value; } + } + + /// + /// Gets or sets the compression level for this media row. + /// + /// Compression level. + public CompressionLevel? CompressionLevel + { + get { return (CompressionLevel?)this.Fields[1].AsNullableInteger(); } + set { this.Fields[1].Data = value; } + } + + /// + /// Gets or sets the layout location for this media row. + /// + /// Layout location to the root of the media. + public string Layout + { + get { return (string)this.Fields[2].Data; } + set { this.Fields[2].Data = value; } + } + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/WixMediaTemplateRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/WixMediaTemplateRow.cs new file mode 100644 index 00000000..b2a64356 --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/WixMediaTemplateRow.cs @@ -0,0 +1,81 @@ +// 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.WindowsInstaller.Rows +{ + /// + /// Specialization of a row for the MediaTemplate table. + /// + public sealed class WixMediaTemplateRow : Row + { + /// + /// Creates a MediaTemplate row that belongs to a table. + /// + /// Original source lines for this row. + /// Table this MediaTeplate row belongs to and should get its column definitions from. + public WixMediaTemplateRow(SourceLineNumber sourceLineNumbers, Table table) + : base(sourceLineNumbers, table) + { + } + + /// + /// Gets or sets the cabinet template name for this media template row. + /// + /// Cabinet name. + public string CabinetTemplate + { + get { return (string)this.Fields[0].Data; } + set { this.Fields[0].Data = value; } + } + + /// + /// Gets or sets the compression level for this media template row. + /// + /// Compression level. + public CompressionLevel? CompressionLevel + { + get { return (CompressionLevel?)this.Fields[1].AsNullableInteger(); } + set { this.Fields[1].Data = value; } + } + + /// + /// Gets or sets the disk prompt for this media template row. + /// + /// Disk prompt. + public string DiskPrompt + { + get { return (string)this.Fields[2].Data; } + set { this.Fields[2].Data = value; } + } + + + /// + /// Gets or sets the volume label for this media template row. + /// + /// Volume label. + public string VolumeLabel + { + get { return (string)this.Fields[3].Data; } + set { this.Fields[3].Data = value; } + } + + /// + /// Gets or sets the maximum uncompressed media size for this media template row. + /// + /// Disk id. + public int MaximumUncompressedMediaSize + { + get { return (int)this.Fields[4].Data; } + set { this.Fields[4].Data = value; } + } + + /// + /// Gets or sets the Maximum Cabinet Size For Large File Splitting for this media template row. + /// + /// Disk id. + public int MaximumCabinetSizeForLargeFileSplitting + { + get { return (int)this.Fields[5].Data; } + set { this.Fields[5].Data = value; } + } + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/WixMergeRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/WixMergeRow.cs new file mode 100644 index 00000000..ac60452e --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/WixMergeRow.cs @@ -0,0 +1,147 @@ +// 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.WindowsInstaller.Rows +{ + using System; + using System.Globalization; + + /// + /// Specialization of a row for tracking merge statements. + /// + public sealed class WixMergeRow : Row + { + /// + /// Creates a Merge row that does not belong to a table. + /// + /// Original source lines for this row. + /// TableDefinition this Merge row belongs to and should get its column definitions from. + public WixMergeRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : + base(sourceLineNumbers, tableDef) + { + } + + /// Creates a Merge row that belongs to a table. + /// Original source lines for this row. + /// Table this Merge row belongs to and should get its column definitions from. + public WixMergeRow(SourceLineNumber sourceLineNumbers, Table table) : + base(sourceLineNumbers, table) + { + } + + /// + /// Gets and sets the id for a merge row. + /// + /// Id for the row. + public string Id + { + get { return (string)this.Fields[0].Data; } + set { this.Fields[0].Data = value; } + } + + /// + /// Gets and sets the language for a merge row. + /// + /// Language for the row. + public string Language + { + get { return (string)this.Fields[1].Data; } + set { this.Fields[1].Data = value; } + } + + /// + /// Gets and sets the directory for a merge row. + /// + /// Direcotory for the row. + public string Directory + { + get { return (string)this.Fields[2].Data; } + set { this.Fields[2].Data = value; } + } + + /// + /// Gets and sets the path to the merge module for a merge row. + /// + /// Source path for the row. + public string SourceFile + { + get { return (string)this.Fields[3].Data; } + set { this.Fields[3].Data = value; } + } + + /// + /// Gets and sets the disk id the merge module should be placed on for a merge row. + /// + /// Disk identifier for row. + public int DiskId + { + get { return (int)this.Fields[4].Data; } + set { this.Fields[4].Data = value; } + } + + /// + /// Gets and sets the compression value for a merge row. + /// + /// Compression for a merge row. + public YesNoType FileCompression + { + get + { + if (null == this.Fields[5].Data) + { + return YesNoType.NotSet; + } + else if (1 == (int)this.Fields[5].Data) + { + return YesNoType.Yes; + } + else if (0 == (int)this.Fields[5].Data) + { + return YesNoType.No; + } + else + { + throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixDataStrings.EXP_MergeTableFileCompressionColumnContainsInvalidValue, this.Fields[5].Data)); + } + } + set + { + if (YesNoType.Yes == value) + { + this.Fields[5].Data = 1; + } + else if (YesNoType.No == value) + { + this.Fields[5].Data = 0; + } + else if (YesNoType.NotSet == value) + { + this.Fields[5].Data = null; + } + else + { + throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixDataStrings.EXP_CannotSetMergeTableFileCompressionColumnToInvalidValue, value)); + } + } + } + + /// + /// Gets and sets the configuration data for a merge row. + /// + /// Comma delimited string of "name=value" pairs. + public string ConfigurationData + { + get { return (string)this.Fields[6].Data; } + set { this.Fields[6].Data = value; } + } + + /// + /// Gets and sets the primary feature for a merge row. + /// + /// The primary feature for a merge row. + public string Feature + { + get { return (string)this.Fields[7].Data; } + set { this.Fields[7].Data = value; } + } + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/WixPayloadPropertiesRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/WixPayloadPropertiesRow.cs new file mode 100644 index 00000000..8bb9ef31 --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/WixPayloadPropertiesRow.cs @@ -0,0 +1,72 @@ +// 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.WindowsInstaller.Rows +{ + /// + /// Specialization of a row for the WixPayloadProperties table. + /// + public class WixPayloadPropertiesRow : Row + { + /// + /// Creates a WixPayloadProperties row that does not belong to a table. + /// + /// Original source lines for this row. + /// TableDefinition this WixPayloadProperties row belongs to and should get its column definitions from. + public WixPayloadPropertiesRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : + base(sourceLineNumbers, tableDef) + { + } + + /// + /// Creates a WixPayloadProperties row that belongs to a table. + /// + /// Original source lines for this row. + /// Table this WixPayloadProperties row belongs to and should get its column definitions from. + public WixPayloadPropertiesRow(SourceLineNumber sourceLineNumbers, Table table) : + base(sourceLineNumbers, table) + { + } + + public string Id + { + get { return (string)this.Fields[0].Data; } + set { this.Fields[0].Data = value; } + } + + public string Package + { + get { return (string)this.Fields[1].Data; } + set { this.Fields[1].Data = value; } + } + + public string Container + { + get { return (string)this.Fields[2].Data; } + set { this.Fields[2].Data = value; } + } + + public string Name + { + get { return (string)this.Fields[3].Data; } + set { this.Fields[3].Data = value; } + } + + public string Size + { + get { return (string)this.Fields[4].Data; } + set { this.Fields[4].Data = value; } + } + + public string DownloadUrl + { + get { return (string)this.Fields[5].Data; } + set { this.Fields[5].Data = value; } + } + + public string LayoutOnly + { + get { return (string)this.Fields[6].Data; } + set { this.Fields[6].Data = value; } + } + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/WixPropertyRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/WixPropertyRow.cs new file mode 100644 index 00000000..2f356b71 --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/WixPropertyRow.cs @@ -0,0 +1,118 @@ +// 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.WindowsInstaller.Rows +{ + using System; + using System.Globalization; + + /// + /// Specialization of a row for the WixProperty table. + /// + public sealed class WixPropertyRow : Row + { + /// Creates a WixProperty row that belongs to a table. + /// Original source lines for this row. + /// Table this WixProperty row belongs to and should get its column definitions from. + public WixPropertyRow(SourceLineNumber sourceLineNumbers, Table table) : + base(sourceLineNumbers, table) + { + } + + /// + /// Gets and sets the id for this property row. + /// + /// Id for the property. + public string Id + { + get { return (string)this.Fields[0].Data; } + set { this.Fields[0].Data = value; } + } + + /// + /// Gets and sets if this is an admin property row. + /// + /// Flag if this is an admin property. + public bool Admin + { + get + { + return (0x1 == (Convert.ToInt32(this.Fields[1].Data, CultureInfo.InvariantCulture) & 0x1)); + } + + set + { + if (null == this.Fields[1].Data) + { + this.Fields[1].Data = 0; + } + + if (value) + { + this.Fields[1].Data = (int)this.Fields[1].Data | 0x1; + } + else + { + this.Fields[1].Data = (int)this.Fields[1].Data & ~0x1; + } + } + } + + /// + /// Gets and sets if this is a hidden property row. + /// + /// Flag if this is a hidden property. + public bool Hidden + { + get + { + return (0x2 == (Convert.ToInt32(this.Fields[1].Data, CultureInfo.InvariantCulture) & 0x2)); + } + + set + { + if (null == this.Fields[1].Data) + { + this.Fields[1].Data = 0; + } + + if (value) + { + this.Fields[1].Data = (int)this.Fields[1].Data | 0x2; + } + else + { + this.Fields[1].Data = (int)this.Fields[1].Data & ~0x2; + } + } + } + + /// + /// Gets and sets if this is a secure property row. + /// + /// Flag if this is a secure property. + public bool Secure + { + get + { + return (0x4 == (Convert.ToInt32(this.Fields[1].Data, CultureInfo.InvariantCulture) & 0x4)); + } + + set + { + if (null == this.Fields[1].Data) + { + this.Fields[1].Data = 0; + } + + if (value) + { + this.Fields[1].Data = (int)this.Fields[1].Data | 0x4; + } + else + { + this.Fields[1].Data = (int)this.Fields[1].Data & ~0x4; + } + } + } + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/WixRelatedBundleRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/WixRelatedBundleRow.cs new file mode 100644 index 00000000..d06429c5 --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/WixRelatedBundleRow.cs @@ -0,0 +1,52 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data.WindowsInstaller.Rows +{ + using Serialize = WixToolset.Data.Serialize; + + /// + /// Specialization of a row for the RelatedBundle table. + /// + public sealed class WixRelatedBundleRow : Row + { + /// + /// Creates a RelatedBundle row that does not belong to a table. + /// + /// Original source lines for this row. + /// TableDefinition this RelatedBundle row belongs to and should get its column definitions from. + public WixRelatedBundleRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : + base(sourceLineNumbers, tableDef) + { + } + + /// + /// Creates a RelatedBundle row that belongs to a table. + /// + /// Original source lines for this row. + /// Table this RelatedBundle row belongs to and should get its column definitions from. + public WixRelatedBundleRow(SourceLineNumber sourceLineNumbers, Table table) + : base(sourceLineNumbers, table) + { + } + + /// + /// Gets or sets the related bundle identifier. + /// + /// The related bundle identifier. + public string Id + { + get { return (string)this.Fields[0].Data; } + set { this.Fields[0].Data = value; } + } + + /// + /// Gets or sets the related bundle action. + /// + /// The related bundle action. + public Serialize.RelatedBundle.ActionType Action + { + get { return (Serialize.RelatedBundle.ActionType)this.Fields[1].Data; } + set { this.Fields[1].Data = (int)value; } + } + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/WixSimpleReferenceRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/WixSimpleReferenceRow.cs new file mode 100644 index 00000000..bf7dfb0e --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/WixSimpleReferenceRow.cs @@ -0,0 +1,61 @@ +// 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.WindowsInstaller.Rows +{ + using System; + + /// + /// Specialization of a row for the WixSimpleReference table. + /// + public sealed class WixSimpleReferenceRow : Row + { + /// + /// Creates a WixSimpleReferenceRow that belongs to a table. + /// + /// Original source lines for this row. + /// Table this row belongs to and should get its column definitions from. + public WixSimpleReferenceRow(SourceLineNumber sourceLineNumbers, Table table) + : base(sourceLineNumbers, table) + { + } + + /// + /// Creates a WixSimpleReferenceRow that belongs to a table. + /// + /// Original source lines for this row. + /// Table definitions for this row. + public WixSimpleReferenceRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDefinitions) + : base(sourceLineNumbers, tableDefinitions) + { + } + + /// + /// Gets or sets the primary keys of the simple reference. + /// + /// The primary keys of the simple reference. + public string PrimaryKeys + { + get { return (string)this.Fields[1].Data; } + set { this.Fields[1].Data = value; } + } + + /// + /// Gets the symbolic name. + /// + /// Symbolic name. + public string SymbolicName + { + get { return String.Concat(this.TableName, ":", this.PrimaryKeys); } + } + + /// + /// Gets or sets the table name of the simple reference. + /// + /// The table name of the simple reference. + public string TableName + { + get { return (string)this.Fields[0].Data; } + set { this.Fields[0].Data = value; } + } + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/WixUpdateRegistrationRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/WixUpdateRegistrationRow.cs new file mode 100644 index 00000000..8602d502 --- /dev/null +++ b/src/WixToolset.Data/WindowsInstaller/Rows/WixUpdateRegistrationRow.cs @@ -0,0 +1,62 @@ +// 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.WindowsInstaller.Rows +{ + using System; + + /// + /// Update registration information for Binding. + /// + public class WixUpdateRegistrationRow : Row + { + /// + /// Creates a WixUpdateRegistrationRow row that does not belong to a table. + /// + /// Original source lines for this row. + /// TableDefinition this WixUpdateRegistrationRow row belongs to and should get its column definitions from. + public WixUpdateRegistrationRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : + base(sourceLineNumbers, tableDef) + { + } + + /// + /// Creates a WixUpdateRegistrationRow row that belongs to a table. + /// + /// Original source lines for this row. + /// Table this WixUpdateRegistrationRow row belongs to and should get its column definitions from. + public WixUpdateRegistrationRow(SourceLineNumber sourceLineNumbers, Table table) : + base(sourceLineNumbers, table) + { + } + + public string Manufacturer + { + get { return (string)this.Fields[0].Data; } + set { this.Fields[0].Data = value; } + } + + public string Department + { + get { return (string)this.Fields[1].Data; } + set { this.Fields[1].Data = value; } + } + + public string ProductFamily + { + get { return (string)this.Fields[2].Data; } + set { this.Fields[2].Data = value; } + } + + public string Name + { + get { return (string)this.Fields[3].Data; } + set { this.Fields[3].Data = value; } + } + + public string Classification + { + get { return (string)this.Fields[4].Data; } + set { this.Fields[4].Data = value; } + } + } +} -- cgit v1.2.3-55-g6feb