Esempio n. 1
0
        private static string GetBaseKeyName(RegistrySection section)
        {
            switch (section)
            {
            case RegistrySection.Windows32OnWindows64:
                return(SoftwareWowKeyName);

            case RegistrySection.Native:
            default:
                return(SoftwareNativeKeyName);
            }
        }
Esempio n. 2
0
        public static HashSet <string> LoadStrongNameExclusions(RegistrySection section)
        {
            HashSet <string> results = new HashSet <string>(StringComparer.OrdinalIgnoreCase);

            using (RegistryKey key = OpenReadOnlyVerificationRegistryKey(section))
            {
                if (key != null)
                {
                    foreach (var subKey in key.GetSubKeyNames())
                    {
                        results.Add(subKey);
                    }
                }
            }

            return(results);
        }
Esempio n. 3
0
 public static RegistryKey CreateWritableVerificationRegistryKey(RegistrySection section)
 {
     return(CreateWriteableRegistryKey(GetBaseKeyName(section), VerificationSubKeyName));
 }
Esempio n. 4
0
        private static RegistryKey OpenReadOnlyVerificationRegistryKey(RegistrySection section)
        {
            string keyName = GetBaseKeyName(section) + '\\' + VerificationSubKeyName;

            return(OpenReadOnlyRegistryKey(keyName));
        }