diff options
Diffstat (limited to 'src/WixToolset.Data/WindowsInstaller/Rows/WixPropertyRow.cs')
-rw-r--r-- | src/WixToolset.Data/WindowsInstaller/Rows/WixPropertyRow.cs | 123 |
1 files changed, 0 insertions, 123 deletions
diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/WixPropertyRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/WixPropertyRow.cs deleted file mode 100644 index 8a54d36e..00000000 --- a/src/WixToolset.Data/WindowsInstaller/Rows/WixPropertyRow.cs +++ /dev/null | |||
@@ -1,123 +0,0 @@ | |||
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.WindowsInstaller.Rows | ||
4 | { | ||
5 | using System; | ||
6 | using System.Globalization; | ||
7 | |||
8 | /// <summary> | ||
9 | /// Specialization of a row for the WixProperty table. | ||
10 | /// </summary> | ||
11 | public sealed class WixPropertyRow : Row | ||
12 | { | ||
13 | /// <summary>Creates a WixProperty row that belongs to a table.</summary> | ||
14 | /// <param name="sourceLineNumbers">Original source lines for this row.</param> | ||
15 | /// <param name="table">Table this WixProperty row belongs to and should get its column definitions from.</param> | ||
16 | public WixPropertyRow(SourceLineNumber sourceLineNumbers, Table table) : | ||
17 | base(sourceLineNumbers, table) | ||
18 | { | ||
19 | } | ||
20 | |||
21 | public WixPropertyRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDefinition) : | ||
22 | base(sourceLineNumbers, tableDefinition) | ||
23 | { | ||
24 | } | ||
25 | |||
26 | /// <summary> | ||
27 | /// Gets and sets the id for this property row. | ||
28 | /// </summary> | ||
29 | /// <value>Id for the property.</value> | ||
30 | public string Id | ||
31 | { | ||
32 | get { return (string)this.Fields[0].Data; } | ||
33 | set { this.Fields[0].Data = value; } | ||
34 | } | ||
35 | |||
36 | /// <summary> | ||
37 | /// Gets and sets if this is an admin property row. | ||
38 | /// </summary> | ||
39 | /// <value>Flag if this is an admin property.</value> | ||
40 | public bool Admin | ||
41 | { | ||
42 | get | ||
43 | { | ||
44 | return (0x1 == (Convert.ToInt32(this.Fields[1].Data, CultureInfo.InvariantCulture) & 0x1)); | ||
45 | } | ||
46 | |||
47 | set | ||
48 | { | ||
49 | if (null == this.Fields[1].Data) | ||
50 | { | ||
51 | this.Fields[1].Data = 0; | ||
52 | } | ||
53 | |||
54 | if (value) | ||
55 | { | ||
56 | this.Fields[1].Data = (int)this.Fields[1].Data | 0x1; | ||
57 | } | ||
58 | else | ||
59 | { | ||
60 | this.Fields[1].Data = (int)this.Fields[1].Data & ~0x1; | ||
61 | } | ||
62 | } | ||
63 | } | ||
64 | |||
65 | /// <summary> | ||
66 | /// Gets and sets if this is a hidden property row. | ||
67 | /// </summary> | ||
68 | /// <value>Flag if this is a hidden property.</value> | ||
69 | public bool Hidden | ||
70 | { | ||
71 | get | ||
72 | { | ||
73 | return (0x2 == (Convert.ToInt32(this.Fields[1].Data, CultureInfo.InvariantCulture) & 0x2)); | ||
74 | } | ||
75 | |||
76 | set | ||
77 | { | ||
78 | if (null == this.Fields[1].Data) | ||
79 | { | ||
80 | this.Fields[1].Data = 0; | ||
81 | } | ||
82 | |||
83 | if (value) | ||
84 | { | ||
85 | this.Fields[1].Data = (int)this.Fields[1].Data | 0x2; | ||
86 | } | ||
87 | else | ||
88 | { | ||
89 | this.Fields[1].Data = (int)this.Fields[1].Data & ~0x2; | ||
90 | } | ||
91 | } | ||
92 | } | ||
93 | |||
94 | /// <summary> | ||
95 | /// Gets and sets if this is a secure property row. | ||
96 | /// </summary> | ||
97 | /// <value>Flag if this is a secure property.</value> | ||
98 | public bool Secure | ||
99 | { | ||
100 | get | ||
101 | { | ||
102 | return (0x4 == (Convert.ToInt32(this.Fields[1].Data, CultureInfo.InvariantCulture) & 0x4)); | ||
103 | } | ||
104 | |||
105 | set | ||
106 | { | ||
107 | if (null == this.Fields[1].Data) | ||
108 | { | ||
109 | this.Fields[1].Data = 0; | ||
110 | } | ||
111 | |||
112 | if (value) | ||
113 | { | ||
114 | this.Fields[1].Data = (int)this.Fields[1].Data | 0x4; | ||
115 | } | ||
116 | else | ||
117 | { | ||
118 | this.Fields[1].Data = (int)this.Fields[1].Data & ~0x4; | ||
119 | } | ||
120 | } | ||
121 | } | ||
122 | } | ||
123 | } | ||