diff options
Diffstat (limited to 'src/WixToolset.Data/WindowsInstaller/Rows/WixMergeRow.cs')
-rw-r--r-- | src/WixToolset.Data/WindowsInstaller/Rows/WixMergeRow.cs | 147 |
1 files changed, 0 insertions, 147 deletions
diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/WixMergeRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/WixMergeRow.cs deleted file mode 100644 index ac60452e..00000000 --- a/src/WixToolset.Data/WindowsInstaller/Rows/WixMergeRow.cs +++ /dev/null | |||
@@ -1,147 +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 tracking merge statements. | ||
10 | /// </summary> | ||
11 | public sealed class WixMergeRow : Row | ||
12 | { | ||
13 | /// <summary> | ||
14 | /// Creates a Merge row that does not belong to a table. | ||
15 | /// </summary> | ||
16 | /// <param name="sourceLineNumbers">Original source lines for this row.</param> | ||
17 | /// <param name="tableDef">TableDefinition this Merge row belongs to and should get its column definitions from.</param> | ||
18 | public WixMergeRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : | ||
19 | base(sourceLineNumbers, tableDef) | ||
20 | { | ||
21 | } | ||
22 | |||
23 | /// <summary>Creates a Merge row that belongs to a table.</summary> | ||
24 | /// <param name="sourceLineNumbers">Original source lines for this row.</param> | ||
25 | /// <param name="table">Table this Merge row belongs to and should get its column definitions from.</param> | ||
26 | public WixMergeRow(SourceLineNumber sourceLineNumbers, Table table) : | ||
27 | base(sourceLineNumbers, table) | ||
28 | { | ||
29 | } | ||
30 | |||
31 | /// <summary> | ||
32 | /// Gets and sets the id for a merge row. | ||
33 | /// </summary> | ||
34 | /// <value>Id for the row.</value> | ||
35 | public string Id | ||
36 | { | ||
37 | get { return (string)this.Fields[0].Data; } | ||
38 | set { this.Fields[0].Data = value; } | ||
39 | } | ||
40 | |||
41 | /// <summary> | ||
42 | /// Gets and sets the language for a merge row. | ||
43 | /// </summary> | ||
44 | /// <value>Language for the row.</value> | ||
45 | public string Language | ||
46 | { | ||
47 | get { return (string)this.Fields[1].Data; } | ||
48 | set { this.Fields[1].Data = value; } | ||
49 | } | ||
50 | |||
51 | /// <summary> | ||
52 | /// Gets and sets the directory for a merge row. | ||
53 | /// </summary> | ||
54 | /// <value>Direcotory for the row.</value> | ||
55 | public string Directory | ||
56 | { | ||
57 | get { return (string)this.Fields[2].Data; } | ||
58 | set { this.Fields[2].Data = value; } | ||
59 | } | ||
60 | |||
61 | /// <summary> | ||
62 | /// Gets and sets the path to the merge module for a merge row. | ||
63 | /// </summary> | ||
64 | /// <value>Source path for the row.</value> | ||
65 | public string SourceFile | ||
66 | { | ||
67 | get { return (string)this.Fields[3].Data; } | ||
68 | set { this.Fields[3].Data = value; } | ||
69 | } | ||
70 | |||
71 | /// <summary> | ||
72 | /// Gets and sets the disk id the merge module should be placed on for a merge row. | ||
73 | /// </summary> | ||
74 | /// <value>Disk identifier for row.</value> | ||
75 | public int DiskId | ||
76 | { | ||
77 | get { return (int)this.Fields[4].Data; } | ||
78 | set { this.Fields[4].Data = value; } | ||
79 | } | ||
80 | |||
81 | /// <summary> | ||
82 | /// Gets and sets the compression value for a merge row. | ||
83 | /// </summary> | ||
84 | /// <value>Compression for a merge row.</value> | ||
85 | public YesNoType FileCompression | ||
86 | { | ||
87 | get | ||
88 | { | ||
89 | if (null == this.Fields[5].Data) | ||
90 | { | ||
91 | return YesNoType.NotSet; | ||
92 | } | ||
93 | else if (1 == (int)this.Fields[5].Data) | ||
94 | { | ||
95 | return YesNoType.Yes; | ||
96 | } | ||
97 | else if (0 == (int)this.Fields[5].Data) | ||
98 | { | ||
99 | return YesNoType.No; | ||
100 | } | ||
101 | else | ||
102 | { | ||
103 | throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixDataStrings.EXP_MergeTableFileCompressionColumnContainsInvalidValue, this.Fields[5].Data)); | ||
104 | } | ||
105 | } | ||
106 | set | ||
107 | { | ||
108 | if (YesNoType.Yes == value) | ||
109 | { | ||
110 | this.Fields[5].Data = 1; | ||
111 | } | ||
112 | else if (YesNoType.No == value) | ||
113 | { | ||
114 | this.Fields[5].Data = 0; | ||
115 | } | ||
116 | else if (YesNoType.NotSet == value) | ||
117 | { | ||
118 | this.Fields[5].Data = null; | ||
119 | } | ||
120 | else | ||
121 | { | ||
122 | throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixDataStrings.EXP_CannotSetMergeTableFileCompressionColumnToInvalidValue, value)); | ||
123 | } | ||
124 | } | ||
125 | } | ||
126 | |||
127 | /// <summary> | ||
128 | /// Gets and sets the configuration data for a merge row. | ||
129 | /// </summary> | ||
130 | /// <value>Comma delimited string of "name=value" pairs.</value> | ||
131 | public string ConfigurationData | ||
132 | { | ||
133 | get { return (string)this.Fields[6].Data; } | ||
134 | set { this.Fields[6].Data = value; } | ||
135 | } | ||
136 | |||
137 | /// <summary> | ||
138 | /// Gets and sets the primary feature for a merge row. | ||
139 | /// </summary> | ||
140 | /// <value>The primary feature for a merge row.</value> | ||
141 | public string Feature | ||
142 | { | ||
143 | get { return (string)this.Fields[7].Data; } | ||
144 | set { this.Fields[7].Data = value; } | ||
145 | } | ||
146 | } | ||
147 | } | ||