/// <summary> /// This method will go through all sample data from the testDevice. /// </summary> /// <param name="dataProc"></param> /// <param name="tempProc"></param> private static void ShowAllData(DataProcessor dataProc, TemperatureProcessor tempProc) { try { Console.WriteLine("Press [ESC] to exit."); do { var data = dataProc.Read(); tempProc.PrintTemperature(data); } while (Console.ReadKey(true).Key != ConsoleKey.Escape); } catch (Exception e) { Console.WriteLine($"{e.Message}\r\n{e.StackTrace}"); } }