Probe() public method

public Probe ( RegistryKey rkey, string extra, bool writable ) : RegistryKey
rkey RegistryKey
extra string
writable bool
return RegistryKey
        public RegistryKey OpenSubKey(RegistryKey rkey, string keyname, bool writable)
        {
            KeyHandler keyHandler = KeyHandler.Lookup(rkey, true);

            if (keyHandler == null)
            {
                return(null);
            }
            RegistryKey registryKey = keyHandler.Probe(rkey, UnixRegistryApi.ToUnix(keyname), writable);

            if (registryKey == null && UnixRegistryApi.IsWellKnownKey(rkey.Name, keyname))
            {
                registryKey = this.CreateSubKey(rkey, keyname, writable);
            }
            return(registryKey);
        }
Example #2
0
        public RegistryKey OpenSubKey(RegistryKey rkey, string keyname, bool writable)
        {
            KeyHandler self = KeyHandler.Lookup(rkey, true);

            if (self == null)
            {
                // return null if parent is marked for deletion
                return(null);
            }

            RegistryKey result = self.Probe(rkey, ToUnix(keyname), writable);

            if (result == null && IsWellKnownKey(rkey.Name, keyname))
            {
                // create the subkey even if its parent was opened read-only
                result = CreateSubKey(rkey, keyname, writable);
            }

            return(result);
        }