aboutsummaryrefslogtreecommitdiff
path: root/src/wixext/DifxAppCompiler.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/wixext/DifxAppCompiler.cs')
-rw-r--r--src/wixext/DifxAppCompiler.cs27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/wixext/DifxAppCompiler.cs b/src/wixext/DifxAppCompiler.cs
index 98f36b3f..4d0b8ec9 100644
--- a/src/wixext/DifxAppCompiler.cs
+++ b/src/wixext/DifxAppCompiler.cs
@@ -37,9 +37,9 @@ namespace WixToolset.DifxApp
37 switch (parentElement.Name.LocalName) 37 switch (parentElement.Name.LocalName)
38 { 38 {
39 case "Component": 39 case "Component":
40 string componentId = context["ComponentId"]; 40 var componentId = context["ComponentId"];
41 string directoryId = context["DirectoryId"]; 41 var directoryId = context["DirectoryId"];
42 bool componentWin64 = Boolean.Parse(context["Win64"]); 42 var componentWin64 = Boolean.Parse(context["Win64"]);
43 43
44 switch (element.Name.LocalName) 44 switch (element.Name.LocalName)
45 { 45 {
@@ -64,9 +64,9 @@ namespace WixToolset.DifxApp
64 /// <param name="componentId">Identifier for parent component.</param> 64 /// <param name="componentId">Identifier for parent component.</param>
65 private void ParseDriverElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentId, bool win64) 65 private void ParseDriverElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentId, bool win64)
66 { 66 {
67 SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); 67 var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node);
68 int attributes = 0; 68 int attributes = 0;
69 int sequence = CompilerConstants.IntegerNotSet; 69 var sequence = CompilerConstants.IntegerNotSet;
70 70
71 // check the number of times a Driver element has been nested under this Component element 71 // check the number of times a Driver element has been nested under this Component element
72 if (null != componentId) 72 if (null != componentId)
@@ -81,7 +81,7 @@ namespace WixToolset.DifxApp
81 } 81 }
82 } 82 }
83 83
84 foreach (XAttribute attrib in node.Attributes()) 84 foreach (var attrib in node.Attributes())
85 { 85 {
86 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) 86 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
87 { 87 {
@@ -138,10 +138,10 @@ namespace WixToolset.DifxApp
138 switch (this.Context.Platform) 138 switch (this.Context.Platform)
139 { 139 {
140 case Platform.X86: 140 case Platform.X86:
141 this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "MsiProcessDrivers"); 141 this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.CustomAction, "MsiProcessDrivers");
142 break; 142 break;
143 case Platform.X64: 143 case Platform.X64:
144 this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "MsiProcessDrivers_x64"); 144 this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.CustomAction, "MsiProcessDrivers_x64");
145 break; 145 break;
146 case Platform.IA64: 146 case Platform.IA64:
147 case Platform.ARM: 147 case Platform.ARM:
@@ -149,12 +149,15 @@ namespace WixToolset.DifxApp
149 break; 149 break;
150 } 150 }
151 151
152 var row = (MsiDriverPackagesTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "MsiDriverPackages"); 152 var tuple = section.AddTuple(new MsiDriverPackagesTuple(sourceLineNumbers)
153 row.Set(0, componentId); 153 {
154 row.Set(1, attributes); 154 ComponentRef = componentId,
155 Flags = attributes,
156 });
157
155 if (CompilerConstants.IntegerNotSet != sequence) 158 if (CompilerConstants.IntegerNotSet != sequence)
156 { 159 {
157 row.Set(2, sequence); 160 tuple.Sequence = sequence;
158 } 161 }
159 } 162 }
160 } 163 }