Exemplo n.º 1
0
 public static void Dump(List <HardwareComponents> dump, List <HardwareComponents> computer, string hardwareName)
 {
     if (computer.Any(c => c.Name == hardwareName))
     {
         HardwareComponents hardware = computer.FirstOrDefault(h => h.Name == hardwareName);
         computer.Remove(hardware);
         dump.Add(hardware);
     }
 }
Exemplo n.º 2
0
 public static void Restore(List <HardwareComponents> dump, List <HardwareComponents> computer,
                            string hardwareName)
 {
     if (dump.Any(d => d.Name == hardwareName))
     {
         HardwareComponents hardware = dump.FirstOrDefault(d => d.Name == hardwareName);
         dump.Remove(hardware);
         computer.Add(hardware);
     }
 }