예제 #1
0
 public static void Remove(WrappedRegistryKey key)
 {
     if (key != null)
     {
         _keys.Remove(key);
     }
 }
예제 #2
0
 public static WrappedRegistryKey OpenSubKey(WrappedRegistryKey key, string name, bool writable)
 {
     if (key == null)
     {
         return(null);
     }
     return(key.OpenSubKey(name, writable));
 }
예제 #3
0
 public static WrappedRegistryKey Add(WrappedRegistryKey key)
 {
     if (key == null)
     {
         return(null);
     }
     _keys.Add(key);
     return(key);
 }
예제 #4
0
 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)) },
     };
 }