OnProfilerStatusChecking() protected method

protected OnProfilerStatusChecking ( ProfilerLocation profLoc ) : void
profLoc ProfilerLocation
return void
Example #1
0
        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);
        }
Example #2
0
        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;
        }