Beispiel #1
0
        public override IRegistryKey DoOpenSubKey(string name)
        {
            CheckOpen();

            MockRegistryKey subKey = subKeys.ContainsKey(name) ? subKeys[name] : null;

            requests.Add("key: " + name + " - " + subKey);
            if (subKey != null)
            {
                subKey.SetOpen();
            }

            return(subKey);
        }
Beispiel #2
0
 public void AddSubKey(String name, MockRegistryKey subKey)
 {
     subKeys.Add(name, subKey);
 }
Beispiel #3
0
 public MockRegistryAccessor(MockRegistryKey currentUser, MockRegistryKey localMachine)
 {
     this.currentUser  = currentUser;
     this.localMachine = localMachine;
 }