summaryrefslogtreecommitdiff
path: root/src/test/burn/WixTestTools/BundleVerifier.cs
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2022-06-09 15:30:48 -0500
committerSean Hall <r.sean.hall@gmail.com>2022-06-13 09:28:49 -0500
commit6f6e4ced9f398ff37a44b91fdba62479cde29d06 (patch)
tree8cef5b123df7ff11cdc9be79d2e981d9d567d65d /src/test/burn/WixTestTools/BundleVerifier.cs
parent68ec803fc7f48bb0e0463dc45f6ce40e1f07dbf5 (diff)
downloadwix-6f6e4ced9f398ff37a44b91fdba62479cde29d06.tar.gz
wix-6f6e4ced9f398ff37a44b91fdba62479cde29d06.tar.bz2
wix-6f6e4ced9f398ff37a44b91fdba62479cde29d06.zip
Implement ArpEntry flavored ExePackage.
6772
Diffstat (limited to 'src/test/burn/WixTestTools/BundleVerifier.cs')
-rw-r--r--src/test/burn/WixTestTools/BundleVerifier.cs23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/test/burn/WixTestTools/BundleVerifier.cs b/src/test/burn/WixTestTools/BundleVerifier.cs
index 103171cd..ff45a291 100644
--- a/src/test/burn/WixTestTools/BundleVerifier.cs
+++ b/src/test/burn/WixTestTools/BundleVerifier.cs
@@ -80,6 +80,29 @@ namespace WixTestTools
80 File.Delete(expectedCachePath); 80 File.Delete(expectedCachePath);
81 } 81 }
82 82
83 public bool TryGetArpEntryExePackageConfiguration(string packageId, out string arpId, out string arpVersion, out bool arpWin64, out bool perMachine)
84 {
85 using var wixOutput = WixOutput.Read(this.BundlePdb);
86 var intermediate = Intermediate.Load(wixOutput);
87 var section = intermediate.Sections.Single();
88 var packageSymbol = section.Symbols.OfType<WixBundlePackageSymbol>().SingleOrDefault(p => p.Id.Id == packageId);
89 var exePackageSymbol = section.Symbols.OfType<WixBundleExePackageSymbol>().SingleOrDefault(p => p.Id.Id == packageId);
90 if (packageSymbol == null || exePackageSymbol == null || exePackageSymbol.DetectionType != WixBundleExePackageDetectionType.Arp)
91 {
92 arpId = null;
93 arpVersion = null;
94 arpWin64 = false;
95 perMachine = false;
96 return false;
97 }
98
99 arpId = exePackageSymbol.ArpId;
100 arpVersion = exePackageSymbol.ArpDisplayVersion;
101 arpWin64 = exePackageSymbol.ArpWin64;
102 perMachine = packageSymbol.PerMachine == true;
103 return true;
104 }
105
83 public bool TryGetRegistration(out BundleRegistration registration) 106 public bool TryGetRegistration(out BundleRegistration registration)
84 { 107 {
85 var bundleSymbol = this.GetBundleSymbol(); 108 var bundleSymbol = this.GetBundleSymbol();