aboutsummaryrefslogtreecommitdiff
path: root/src/WixTestTools/BundleRegistration.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-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}