// 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.
using WixToolset.Data.Tuples;
namespace WixToolset.Data.Rows
{
///
/// 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; }
}
}
}