/// <summary> /// Adds the element. /// </summary> public void addRawElement(TraceElement newElement) { if (newElement == null) { debugError("TraceRawElementTable.addRawElement() - New element is null !!! ---"); return; } if (newElement.Type == TraceType.UNKNOWN) { debugError("TraceRawElementTable.addRawElement() - New element type is unknown !!! ---"); return; } if (newElement.FileName == null) { debugError("TraceRawElementTable.addRawElement() - New elements filename is null !!! ---"); return; } if (newElement.FileName.Length == 0) { debugError("TraceRawElementTable.addRawElement() - New elementfilename length is 0 !!! ---"); return; } lock (_qeueLock) { rawElementQeue.Enqueue(newElement); } }
/// <summary> /// Gets the next. /// </summary> /// <returns></returns> public TraceElement getNext() { TraceElement element = new TraceElement(); lock (_qeueLock) { if (rawElementQeue.Count > 0) { element = rawElementQeue.Dequeue(); } } return(element); }