protected void TriggerBufferUpdateEvent(IBufferInternal ReadBuffer) { if (BufferUpdatedHandler != null) { BufferUpdatedHandler(this, ReadBuffer.ToString()); } }
public string ReadAll(double Timespan) { StringBuilder last_read_buffer = new StringBuilder(255); DateTime start_time = DateTime.Now; if (Timespan == -1) { do { last_read_buffer.Append(ReadAll()); } while (true); } else { do { last_read_buffer.Append(ReadAll()); } while (((DateTime.Now - start_time).TotalSeconds < Timespan)); } ((IBufferInternal)read_buffer).Copy(last_read_buffer); return(read_buffer.ToString()); }