public static Drop ( |
||
rkey | ||
Résultat | void |
public void DeleteKey(RegistryKey rkey, string keyname, bool throw_if_missing) { KeyHandler self = KeyHandler.Lookup(rkey, true); if (self == null) { // key is marked for deletion if (!throw_if_missing) { return; } throw new ArgumentException("the given value does not exist"); } string dir = Path.Combine(self.Dir, ToUnix(keyname)); if (Directory.Exists(dir)) { Directory.Delete(dir, true); KeyHandler.Drop(dir); } else if (throw_if_missing) { throw new ArgumentException("the given value does not exist"); } }
public void DeleteKey(RegistryKey rkey, string keyname, bool throw_if_missing) { KeyHandler keyHandler = KeyHandler.Lookup(rkey, true); if (keyHandler != null) { string text = Path.Combine(keyHandler.Dir, UnixRegistryApi.ToUnix(keyname)); if (Directory.Exists(text)) { Directory.Delete(text, true); KeyHandler.Drop(text); } else if (throw_if_missing) { throw new ArgumentException("the given value does not exist"); } return; } if (!throw_if_missing) { return; } throw new ArgumentException("the given value does not exist"); }
public void Close(RegistryKey rkey) { KeyHandler.Drop(rkey); }