protected OnProfilerStatusChecking ( ProfilerLocation profLoc ) : void | ||
profLoc | ProfilerLocation | |
return | void |
public bool HasBeenInstalled(MachinePrerequisite machinePreq) { if (machinePreq == null) { throw new ArgumentNullException("machinePreq"); } var profLocs = EnvironmentRepository.GetProfilerLocations(); if (profLocs == null || profLocs.Length == 0) { return(false); } foreach (var profLoc in profLocs) { using (var classesRootKey = EnvironmentRepository.OpenRegistryBaseKey(RegistryHive.ClassesRoot, profLoc.RegistryView)) using (var inprocServer32Key = EnvironmentRepository.OpenRegistrySubKey(classesRootKey, ProfilerLocation.InprocServer32Path)) { machinePreq.OnProfilerStatusChecking(profLoc); if (!IsProfilerInstalled(inprocServer32Key, ProfilerLocation.GetExpectedFileDescription(machinePreq.PackageVersion))) { return(false); } } } return(true); }
public bool HasBeenInstalled(MachinePrerequisite machinePreq) { if (machinePreq == null) throw new ArgumentNullException("machinePreq"); var profLocs = EnvironmentRepository.GetProfilerLocations(); if (profLocs == null || profLocs.Length == 0) return false; foreach (var profLoc in profLocs) { using (var classesRootKey = EnvironmentRepository.OpenRegistryBaseKey(RegistryHive.ClassesRoot, profLoc.RegistryView)) using (var inprocServer32Key = EnvironmentRepository.OpenRegistrySubKey(classesRootKey, ProfilerLocation.InprocServer32Path)) { machinePreq.OnProfilerStatusChecking(profLoc); if (!IsProfilerInstalled(inprocServer32Key, ProfilerLocation.GetExpectedFileDescription(machinePreq.PackageVersion))) return false; } } return true; }