#pragma warning restore CS0168 // Variable is declared but never used private void StreamReaderThread() { while (true) { ValidateConnection(); try { var lines = ReadLines(); foreach (var line in lines) { System.Diagnostics.Debug.WriteLine(line); LineRead?.Invoke(line); } Thread.Sleep(10); } // As far as i can tell there isn't a way to handle the socket exception without a try catch. // it might just be that valve f****d it up on their end. catch (Exception) { return; } } }
private void OnOutputDataReceived(object sender, DataReceivedEventArgs e) { LineRead?.Invoke(sender, new LineReadEventArgs(e.Data)); }
private void RaiseReadLine(string logLine) { LineRead?.Invoke(logLine); }
public static void LineRed(string s) { LineRead?.Invoke(s); }