Example #1
0
        public RegistryKeyMonitor(
            RegistryHive hive,
            string key,
            RegistryNotifyFilter filter,
            RegistryKeyWatch watch,
            KeyChangedDelegate keyChanged,
            ExceptionRaisedDelegate exceptionRaised)
        {
            if (keyChanged == null)
            {
                throw new ArgumentNullException(nameof(keyChanged));
            }

            if (exceptionRaised == null)
            {
                throw new ArgumentNullException(nameof(exceptionRaised));
            }

            RegistryHive         = hive;
            Key                  = key;
            Filter               = filter;
            WatchSubTree         = watch == RegistryKeyWatch.KeyAndSubKeys;
            this.keyChanged      = keyChanged;
            this.exceptionRaised = exceptionRaised;

            StartMonitor();
        }
Example #2
0
        public RegistryKeyMonitor(
            RegistryHive hive,
            string key,
            RegistryNotifyFilter filter,
            RegistryKeyWatch watch,
            KeyChangedDelegate keyChanged,
            ExceptionRaisedDelegate exceptionRaised)
        {
            if (keyChanged == null)
            {
                throw new ArgumentNullException(nameof(keyChanged));
            }

            if (exceptionRaised == null)
            {
                throw new ArgumentNullException(nameof(exceptionRaised));
            }

            RegistryHive = hive;
            Key = key;
            Filter = filter;
            WatchSubTree = watch == RegistryKeyWatch.KeyAndSubKeys;
            this.keyChanged = keyChanged;
            this.exceptionRaised = exceptionRaised;

            StartMonitor();
        }
Example #3
0
 public RegistryKeyMonitor(
     RegistryHive hive,
     string key,
     KeyChangedDelegate keyChanged,
     ExceptionRaisedDelegate exceptionRaised)
     : this(hive, key, ALL_FILTERS, keyChanged, exceptionRaised)
 {
 }
Example #4
0
 public RegistryKeyMonitor(
     RegistryHive hive,
     string key,
     KeyChangedDelegate keyChanged,
     ExceptionRaisedDelegate exceptionRaised)
     : this(hive, key, ALL_FILTERS, keyChanged, exceptionRaised)
 {
 }
Example #5
0
 public RegistryKeyMonitor(
     RegistryHive hive,
     string key,
     RegistryNotifyFilter filter,
     KeyChangedDelegate keyChanged,
     ExceptionRaisedDelegate exceptionRaised)
     : this(hive, key, filter, RegistryKeyWatch.KeyAndSubKeys, keyChanged, exceptionRaised)
 {
 }
Example #6
0
 public RegistryKeyMonitor(
     RegistryHive hive,
     string key,
     RegistryNotifyFilter filter,
     KeyChangedDelegate keyChanged,
     ExceptionRaisedDelegate exceptionRaised)
     : this(hive, key, filter, RegistryKeyWatch.KeyAndSubKeys, keyChanged, exceptionRaised)
 {
 }