///<inheritdoc /> public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state) { ThrowIfDisposed(); if (_memoryStatus == MemoryFlag.AutoOverFlowToDisk && _isInMemory && count + UnderlyingStream.Position > _threshholdSize) { OverflowToPersistentStream(); } return(UnderlyingStream.BeginWrite(buffer, offset, count, callback, state)); }