aboutsummaryrefslogtreecommitdiff
path: root/src/WixTestTools
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2021-03-11 17:54:30 -0600
committerSean Hall <r.sean.hall@gmail.com>2021-03-11 21:17:20 -0600
commit81908a5ec1647d76b45f50e4a18c37e1544818be (patch)
tree131b6d1e52f7bdbf701cf7026c4d7b7ea9b356fa /src/WixTestTools
parent99d7440134d0f33683d1150a770a2bc594be41de (diff)
downloadwix-81908a5ec1647d76b45f50e4a18c37e1544818be.tar.gz
wix-81908a5ec1647d76b45f50e4a18c37e1544818be.tar.bz2
wix-81908a5ec1647d76b45f50e4a18c37e1544818be.zip
Port forward compatible tests from old repo.
Diffstat (limited to 'src/WixTestTools')
-rw-r--r--src/WixTestTools/BundleRegistration.cs26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/WixTestTools/BundleRegistration.cs b/src/WixTestTools/BundleRegistration.cs
index 1a066232..bf9e2903 100644
--- a/src/WixTestTools/BundleRegistration.cs
+++ b/src/WixTestTools/BundleRegistration.cs
@@ -151,5 +151,31 @@ namespace WixTestTools
151 151
152 return registration; 152 return registration;
153 } 153 }
154
155 public static bool TryGetDependencyProviderValue(string providerId, string name, out string value)
156 {
157 value = null;
158
159 string key = String.Format(@"Installer\Dependencies\{0}", providerId);
160 using (RegistryKey providerKey = Registry.ClassesRoot.OpenSubKey(key))
161 {
162 if (null == providerKey)
163 {
164 return false;
165 }
166
167 value = providerKey.GetValue(name) as string;
168 return value != null;
169 }
170 }
171
172 public static bool DependencyDependentExists(string providerId, string dependentId)
173 {
174 string key = String.Format(@"Installer\Dependencies\{0}\Dependents\{1}", providerId, dependentId);
175 using (RegistryKey dependentKey = Registry.ClassesRoot.OpenSubKey(key))
176 {
177 return null != dependentKey;
178 }
179 }
154 } 180 }
155} 181}