// 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; }
}
}
}