public static void Remove(WrappedRegistryKey key) { if (key != null) { _keys.Remove(key); } }
public static WrappedRegistryKey OpenSubKey(WrappedRegistryKey key, string name, bool writable) { if (key == null) { return(null); } return(key.OpenSubKey(name, writable)); }
public static WrappedRegistryKey Add(WrappedRegistryKey key) { if (key == null) { return(null); } _keys.Add(key); return(key); }
public static void Clear() { foreach (var key in _keys.ToList()) { key.Dispose(); } _keys.Clear(); _specialKeys = new Dictionary <string, Lazy <WrappedRegistryKey> > { { "CurrentUser", new Lazy <WrappedRegistryKey>(() => WrappedRegistryKey.Create(Registry.CurrentUser)) }, { "LocalMachine", new Lazy <WrappedRegistryKey>(() => WrappedRegistryKey.Create(Registry.LocalMachine)) }, { "Users", new Lazy <WrappedRegistryKey>(() => WrappedRegistryKey.Create(Registry.Users)) }, }; }