diff options
Diffstat (limited to 'src/WixToolset.Data.WindowsInstaller/Rows/WixBundleVariableRow.cs')
-rw-r--r-- | src/WixToolset.Data.WindowsInstaller/Rows/WixBundleVariableRow.cs | 80 |
1 files changed, 80 insertions, 0 deletions
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 @@ | |||
1 | // 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. | ||
2 | |||
3 | namespace WixToolset.Data.Rows | ||
4 | { | ||
5 | /// <summary> | ||
6 | /// Specialization of a row for the Variable table. | ||
7 | /// </summary> | ||
8 | public sealed class WixBundleVariableRow : Row | ||
9 | { | ||
10 | /// <summary> | ||
11 | /// Creates a Variable row that does not belong to a table. | ||
12 | /// </summary> | ||
13 | /// <param name="sourceLineNumbers">Original source lines for this row.</param> | ||
14 | /// <param name="tableDef">TableDefinition this Media row belongs to and should get its column definitions from.</param> | ||
15 | public WixBundleVariableRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : | ||
16 | base(sourceLineNumbers, tableDef) | ||
17 | { | ||
18 | } | ||
19 | |||
20 | /// <summary> | ||
21 | /// Creates a Variable row that belongs to a table. | ||
22 | /// </summary> | ||
23 | /// <param name="sourceLineNumbers">Original source lines for this row.</param> | ||
24 | /// <param name="table">Table this Media row belongs to and should get its column definitions from.</param> | ||
25 | public WixBundleVariableRow(SourceLineNumber sourceLineNumbers, Table table) | ||
26 | : base(sourceLineNumbers, table) | ||
27 | { | ||
28 | } | ||
29 | |||
30 | /// <summary> | ||
31 | /// Gets or sets the variable identifier. | ||
32 | /// </summary> | ||
33 | /// <value>The variable identifier.</value> | ||
34 | public string Id | ||
35 | { | ||
36 | get { return (string)this.Fields[0].Data; } | ||
37 | set { this.Fields[0].Data = value; } | ||
38 | } | ||
39 | |||
40 | /// <summary> | ||
41 | /// Gets or sets the variable's value. | ||
42 | /// </summary> | ||
43 | /// <value>The variable's value.</value> | ||
44 | public string Value | ||
45 | { | ||
46 | get { return (string)this.Fields[1].Data; } | ||
47 | set { this.Fields[1].Data = value; } | ||
48 | } | ||
49 | |||
50 | /// <summary> | ||
51 | /// Gets or sets the variable's type. | ||
52 | /// </summary> | ||
53 | /// <value>The variable's type.</value> | ||
54 | public string Type | ||
55 | { | ||
56 | get { return (string)this.Fields[2].Data; } | ||
57 | set { this.Fields[2].Data = value; } | ||
58 | } | ||
59 | |||
60 | /// <summary> | ||
61 | /// Gets or sets whether this variable is hidden. | ||
62 | /// </summary> | ||
63 | /// <value>Whether this variable is hidden.</value> | ||
64 | public bool Hidden | ||
65 | { | ||
66 | get { return (null == this.Fields[3].Data || 0 == ((int)this.Fields[3].Data)) ? false : true; } | ||
67 | set { this.Fields[3].Data = value ? 1 : 0; } | ||
68 | } | ||
69 | |||
70 | /// <summary> | ||
71 | /// Gets or sets whether this variable is persisted. | ||
72 | /// </summary> | ||
73 | /// <value>Whether this variable is persisted.</value> | ||
74 | public bool Persisted | ||
75 | { | ||
76 | get { return (null == this.Fields[4].Data || 0 == ((int)this.Fields[4].Data)) ? false : true; } | ||
77 | set { this.Fields[4].Data = value ? 1 : 0; } | ||
78 | } | ||
79 | } | ||
80 | } | ||