public void allowAwaken() { string devices = @"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class"; var reg = new registry(); RegistryKey adapters = reg.find(devices, "Network adapters"); try { String adapter = adapters.OpenSubKey(index.PadLeft(4, '0')).ToString(); Registry.SetValue(adapter, "PnPCapabilities", 0); } catch (Exception err) { } /*adapter power management setting, * "0" mean "ALL ON" * "8" mean "ALL OFF" * "18" mean "for saving power turn device power off" "ON"*/ //restart adapter for enable //disable(interfaceName); //enable(interfaceName); }
=> (GetPartitionKey(registry, repo), tag);
AssertEquals(registry.lookup(Dog.class).getClass(), DogConverter.class);
public traffic(int size) { Registry = new registry(size); KeyCache = new keyCache(size); status = false; }
AssertEquals(registry.lookup(Cat.class).getClass(), CatConverter.class);