Exemple #1
0
 private static void PrintWantedData(List <HardwareComponent> hardware, List <HardwareComponent> dumpedHardware, List <string> input)
 {
     if (input[0] == "Analyze")
     {
         SystemServise.PrintAnalyze(hardware);
     }
     else
     {
         SystemServise.DumpAnalyze(dumpedHardware);
     }
 }
Exemple #2
0
    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);
    }