OnProfilerStatusChecking() защищенный Метод

protected OnProfilerStatusChecking ( ProfilerLocation profLoc ) : void
profLoc ProfilerLocation
Результат void
Пример #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);
        }
Пример #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;
        }