/// <summary> /// Clear history cache /// </summary> internal static void ClearHistory() { try { if (historySerial != null) { historySerial.Clear(); } } catch (Exception ex) { if (Program.logWriter != null) { Program.logWriter.WriteLine("Failed to clear history " + ex.Message); } } }
/// <summary> /// Clear history buffer /// </summary> public void ClearConsoleHistory() { try { lock (this) { if (cmdhistory != null) { // call internal method to clear history cmdhistory.Clear(); } } } catch (Exception ex) { Console.WriteLine("Failed to clear history for WCSCLI console: " + ex); } }