public RegistryKeyItem(RegistryKeyItem parent, string text)
     : base(parent)
 {
     _root = parent.Root;
     Text = text;
     Path = string.Concat(parent.Path, parent.Path != null ? "\\" : string.Empty, text);
 }
Esempio n. 2
0
 public RegistryKeyItem CreateNewKey(string name)
 {
     using (var key = _root.CreateSubKey(string.Format("{0}\\{1}", Path, name))) {
         var newitem = new RegistryKeyItem(this, name);
         SubItems.Add(newitem);
         return(newitem);
     }
 }
Esempio n. 3
0
        public static ICollection<RegistryKeyItemBase> LoadKeys(Stream stm)
        {
            var reader = new BinaryReader(stm);
            int count = reader.ReadInt32();
            var keys = new List<RegistryKeyItemBase>(count);

            for(int i = 0; i < count; i++) {
                var key = new RegistryKeyItem(reader.ReadString(), reader.ReadString());
                keys.Add(key);
            }
            return keys;
        }
 public RegistryKeyItem CreateNewKey(string name)
 {
     using(var key = _root.CreateSubKey(string.Format("{0}\\{1}", Path, name))) {
         var newitem = new RegistryKeyItem(this, name);
         SubItems.Add(newitem);
         return newitem;
     }
 }
Esempio n. 5
0
 public RegistryValue(RegistryKeyItem key)
 {
     Debug.Assert(key != null);
     _key = key;
 }
Esempio n. 6
0
 public RegistryValue(RegistryKeyItem key)
 {
     Debug.Assert(key != null);
     _key = key;
 }
Esempio n. 7
0
 public RegistryKeyItem(RegistryKeyItem parent, string text) : base(parent)
 {
     _root = parent.Root;
     Text  = text;
     Path  = string.Concat(parent.Path, parent.Path != null ? "\\" : string.Empty, text);
 }