예제 #1
0
        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);
        }
예제 #2
0
 => (GetPartitionKey(registry, repo), tag);
예제 #3
0
 AssertEquals(registry.lookup(Dog.class).getClass(), DogConverter.class);
예제 #4
0
 public traffic(int size)
 {
     Registry = new registry(size);
     KeyCache = new keyCache(size);
     status   = false;
 }
예제 #5
0
 AssertEquals(registry.lookup(Cat.class).getClass(), CatConverter.class);