Beispiel #1
0
        public void GetRegistryHiveTest()
        {
            const string regHklm = "HKEY_LOCAL_MACHINE";

            var registryHive = Registryy.GetRegistryHive(regHklm);

            Assert.AreEqual(RegistryHive.LocalMachine, registryHive);
        }
Beispiel #2
0
        public RegistryKeyInfo(string pathToKey)
        {
            var aKeyParts = pathToKey.Split(new[] { '\\' }, 2);

            if (aKeyParts.Length != 2)
            {
                throw new ArgumentException("Try to open invalid registry key: " + pathToKey);
            }

            Hive      = Registryy.GetRegistryHive(aKeyParts[0]);
            PathToKey = aKeyParts[1];
        }