private static void PrintWantedData(List <HardwareComponent> hardware, List <HardwareComponent> dumpedHardware, List <string> input) { if (input[0] == "Analyze") { SystemServise.PrintAnalyze(hardware); } else { SystemServise.DumpAnalyze(dumpedHardware); } }
public static void ExecuteCommands(SystemState systemState) { var hardware = systemState.Hardware; var dumpedHardware = systemState.DumpedHardware; while (true) { var input = Console.ReadLine().Split(new char[] { ' ', ',', '(', ')' }, StringSplitOptions.RemoveEmptyEntries).ToList(); if (input[0] == "System") { break; } ExecuteCurrentCommand(hardware, dumpedHardware, input); } SystemServise.PrintFinalResult(hardware); }