From 2bb37beda887d120a0ddabf874ad25357101faa1 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Wed, 1 Nov 2017 10:59:45 -0700 Subject: Update to WiX Intermediate Representation --- .../Rows/WixBundleVariableRow.cs | 80 ++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 src/WixToolset.Data.WindowsInstaller/Rows/WixBundleVariableRow.cs (limited to 'src/WixToolset.Data.WindowsInstaller/Rows/WixBundleVariableRow.cs') diff --git a/src/WixToolset.Data.WindowsInstaller/Rows/WixBundleVariableRow.cs b/src/WixToolset.Data.WindowsInstaller/Rows/WixBundleVariableRow.cs new file mode 100644 index 00000000..e7ff1a4d --- /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.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; } + } + } +} -- cgit v1.2.3-55-g6feb