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/WixFileRow.cs | 163 +++++++++++++++++++++ 1 file changed, 163 insertions(+) create mode 100644 src/WixToolset.Data/WindowsInstaller/Rows/WixFileRow.cs (limited to 'src/WixToolset.Data/WindowsInstaller/Rows/WixFileRow.cs') 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; } + } + } +} -- cgit v1.2.3-55-g6feb