aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Data.WindowsInstaller/Rows/WixFileRow.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/WixToolset.Data.WindowsInstaller/Rows/WixFileRow.cs')
-rw-r--r--src/WixToolset.Data.WindowsInstaller/Rows/WixFileRow.cs163
1 files changed, 163 insertions, 0 deletions
diff --git a/src/WixToolset.Data.WindowsInstaller/Rows/WixFileRow.cs b/src/WixToolset.Data.WindowsInstaller/Rows/WixFileRow.cs
new file mode 100644
index 00000000..c006355a
--- /dev/null
+++ b/src/WixToolset.Data.WindowsInstaller/Rows/WixFileRow.cs
@@ -0,0 +1,163 @@
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
3using WixToolset.Data.Tuples;
4
5namespace WixToolset.Data.Rows
6{
7 /// <summary>
8 /// Specialization of a row for the WixFile table.
9 /// </summary>
10 public sealed class WixFileRow : Row
11 {
12 /// <summary>
13 /// Creates a WixFile row that does not belong to a table.
14 /// </summary>
15 /// <param name="sourceLineNumbers">Original source lines for this row.</param>
16 /// <param name="tableDef">TableDefinition this row belongs to and should get its column definitions from.</param>
17 public WixFileRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) :
18 base(sourceLineNumbers, tableDef)
19 {
20 }
21
22 /// <summary>
23 /// Creates a WixFile row that belongs to a table.
24 /// </summary>
25 /// <param name="sourceLineNumbers">Original source lines for this row.</param>
26 /// <param name="table">Table this row belongs to and should get its column definitions from.</param>
27 public WixFileRow(SourceLineNumber sourceLineNumbers, Table table) :
28 base(sourceLineNumbers, table)
29 {
30 }
31
32 /// <summary>
33 /// Gets or sets the primary key of the file row.
34 /// </summary>
35 /// <value>Primary key of the file row.</value>
36 public string File
37 {
38 get { return (string)this.Fields[0].Data; }
39 set { this.Fields[0].Data = value; }
40 }
41
42 /// <summary>
43 /// Gets or sets the assembly type of the file row.
44 /// </summary>
45 /// <value>Assembly type of the file row.</value>
46 public FileAssemblyType AssemblyType
47 {
48 get { return (null == this.Fields[1]) ? FileAssemblyType.NotAnAssembly : (FileAssemblyType)this.Fields[1].AsInteger(); }
49 set { this.Fields[1].Data = (int)value; }
50 }
51
52 /// <summary>
53 /// Gets or sets the identifier for the assembly manifest.
54 /// </summary>
55 /// <value>Identifier for the assembly manifest.</value>
56 public string AssemblyManifest
57 {
58 get { return (string)this.Fields[2].Data; }
59 set { this.Fields[2].Data = value; }
60 }
61
62 /// <summary>
63 /// Gets or sets the application for the assembly.
64 /// </summary>
65 /// <value>Application for the assembly.</value>
66 public string AssemblyApplication
67 {
68 get { return (string)this.Fields[3].Data; }
69 set { this.Fields[3].Data = value; }
70 }
71
72 /// <summary>
73 /// Gets or sets the directory of the file.
74 /// </summary>
75 /// <value>Directory of the file.</value>
76 public string Directory
77 {
78 get { return (string)this.Fields[4].Data; }
79 set { this.Fields[4].Data = value; }
80 }
81
82 /// <summary>
83 /// Gets or sets the disk id for this file.
84 /// </summary>
85 /// <value>Disk id for the file.</value>
86 public int DiskId
87 {
88 get { return (int)this.Fields[5].Data; }
89 set { this.Fields[5].Data = value; }
90 }
91
92 /// <summary>
93 /// Gets or sets the source location to the file.
94 /// </summary>
95 /// <value>Source location to the file.</value>
96 public string Source
97 {
98 get { return (string)this.Fields[6].Data; }
99 set { this.Fields[6].Data = value; }
100 }
101
102 /// <summary>
103 /// Gets or sets the source location to the file.
104 /// </summary>
105 /// <value>Source location to the file.</value>
106 public string PreviousSource
107 {
108 get { return (string)this.Fields[6].PreviousData; }
109 set { this.Fields[6].PreviousData = value; }
110 }
111
112 /// <summary>
113 /// Gets or sets the architecture the file executes on.
114 /// </summary>
115 /// <value>Architecture the file executes on.</value>
116 public string ProcessorArchitecture
117 {
118 get { return (string)this.Fields[7].Data; }
119 set { this.Fields[7].Data = value; }
120 }
121
122 /// <summary>
123 /// Gets or sets the patch group of a patch-added file.
124 /// </summary>
125 /// <value>The patch group of a patch-added file.</value>
126 public int PatchGroup
127 {
128 get { return (null == this.Fields[8].Data) ? 0 : (int)this.Fields[8].Data; }
129 set { this.Fields[8].Data = value; }
130 }
131
132 /// <summary>
133 /// Gets or sets the attributes on a file.
134 /// </summary>
135 /// <value>Attributes on a file.</value>
136 public int Attributes
137 {
138 get { return (int)this.Fields[9].Data; }
139 set { this.Fields[9].Data = value; }
140 }
141
142 /// <summary>
143 /// Gets or sets the patching attributes to the file.
144 /// </summary>
145 /// <value>Patching attributes of the file.</value>
146 public PatchAttributeType PatchAttributes
147 {
148 get { return (PatchAttributeType)this.Fields[10].AsInteger(); }
149 set { this.Fields[10].Data = (int)value; }
150 }
151
152 /// <summary>
153 /// Gets or sets the path to the delta patch header.
154 /// </summary>
155 /// <value>Patch header path.</value>
156 /// <remarks>Set by the binder only when doing delta patching.</remarks>
157 public string DeltaPatchHeaderSource
158 {
159 get { return (string)this.Fields[11].Data; }
160 set { this.Fields[11].Data = value; }
161 }
162 }
163}