aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Data/WindowsInstaller/Rows/WixBundlePatchTargetCodeRow.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/WixToolset.Data/WindowsInstaller/Rows/WixBundlePatchTargetCodeRow.cs')
-rw-r--r--src/WixToolset.Data/WindowsInstaller/Rows/WixBundlePatchTargetCodeRow.cs79
1 files changed, 79 insertions, 0 deletions
diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/WixBundlePatchTargetCodeRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/WixBundlePatchTargetCodeRow.cs
new file mode 100644
index 00000000..6e05e4b7
--- /dev/null
+++ b/src/WixToolset.Data/WindowsInstaller/Rows/WixBundlePatchTargetCodeRow.cs
@@ -0,0 +1,79 @@
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
3namespace WixToolset.Data.WindowsInstaller.Rows
4{
5 using System;
6
7 /// <summary>
8 /// Attributes for the PatchTargetCode table.
9 /// </summary>
10 [Flags]
11 public enum WixBundlePatchTargetCodeAttributes : int
12 {
13 None = 0,
14
15 /// <summary>
16 /// The transform targets a specific ProductCode.
17 /// </summary>
18 TargetsProductCode = 1,
19
20 /// <summary>
21 /// The transform targets a specific UpgradeCode.
22 /// </summary>
23 TargetsUpgradeCode = 2,
24 }
25
26 /// <summary>
27 /// Specialization of a row for the PatchTargetCode table.
28 /// </summary>
29 public class WixBundlePatchTargetCodeRow : Row
30 {
31 /// <summary>
32 /// Creates a PatchTargetCodeRow row that does not belong to a table.
33 /// </summary>
34 /// <param name="sourceLineNumbers">Original source lines for this row.</param>
35 /// <param name="tableDef">TableDefinition this PatchTargetCode row belongs to and should get its column definitions from.</param>
36 public WixBundlePatchTargetCodeRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) :
37 base(sourceLineNumbers, tableDef)
38 {
39 }
40
41 /// <summary>
42 /// Creates a PatchTargetCodeRow row that belongs to a table.
43 /// </summary>
44 /// <param name="sourceLineNumbers">Original source lines for this row.</param>
45 /// <param name="table">Table this PatchTargetCode row belongs to and should get its column definitions from.</param>
46 public WixBundlePatchTargetCodeRow(SourceLineNumber sourceLineNumbers, Table table) :
47 base(sourceLineNumbers, table)
48 {
49 }
50
51 public string MspPackageId
52 {
53 get { return (string)this.Fields[0].Data; }
54 set { this.Fields[0].Data = value; }
55 }
56
57 public string TargetCode
58 {
59 get { return (string)this.Fields[1].Data; }
60 set { this.Fields[1].Data = value; }
61 }
62
63 public WixBundlePatchTargetCodeAttributes Attributes
64 {
65 get { return (WixBundlePatchTargetCodeAttributes)this.Fields[2].Data; }
66 set { this.Fields[2].Data = (int)value; }
67 }
68
69 public bool TargetsProductCode
70 {
71 get { return 0 != (WixBundlePatchTargetCodeAttributes.TargetsProductCode & this.Attributes); }
72 }
73
74 public bool TargetsUpgradeCode
75 {
76 get { return 0 != (WixBundlePatchTargetCodeAttributes.TargetsUpgradeCode & this.Attributes); }
77 }
78 }
79}