public void Pend(TraceMessage tm) { if (pendingQueue.Count >= maxBufferedTraces) { return; } pendingQueue.Enqueue(tm); }
public void Pend(TraceMessage tm) { if (pendingQueue.Count >= 100000) { return; } pendingQueue.Enqueue(tm); }
int GetTraceMessageSize(TraceMessage tm) { return(Newtonsoft.Json.JsonConvert.SerializeObject(tm).Length);//not the most time saving way, but the simplest. And this step yields no sigificant overhead to performance. }