Beispiel #1
0
        private RegistryKey GetRegistryKey(RegistryHive hive)
        {
            // Return the actual RegistryKey object for the given hive
            if (!_registryHives.ContainsKey(hive))
            {
                throw new ArgumentException("Invalid Hive: {0}".FormatWith(hive));
            }

            return(_registryHives[hive]);
        }
Beispiel #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="RegistryAnalyzer"/> class.
        /// </summary>
        /// <param name="hive">The hive.</param>
        /// <param name="subTree">The sub tree.</param>
        public RegistryAnalyzer(RegistryHive hive, string subTree)
        {
            if (string.IsNullOrEmpty(subTree))
            {
                throw new ArgumentNullException("subTree");
            }

            _targetHive   = hive;
            _registryPath = subTree;
            LogErrors     = false;
        }
Beispiel #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RegistrySnapshot"/> class.
 /// </summary>
 /// <param name="hive">The hive.</param>
 public RegistrySnapshot(RegistryHive hive)
     : base()
 {
     _hive = hive;
 }