void processLog() { Task.Run(() => { while (true) { if (_storeText.Count > 0) { string message; if (_storeText.TryDequeue(out message) && !string.IsNullOrEmpty(message)) { httpBroadCast(message); } } if (_storeLog.Count > 0) { oLOG log = null; if (_storeLog.TryDequeue(out log) && log != null) { string json = JsonConvert.SerializeObject(log); httpBroadCast(json); } } Thread.Sleep(100); } }); }
public JobLogPrintOut(oLOG log) { this._log = log; }