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