public async override System.Threading.Tasks.Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
{
int result = 0;
int buffPostion = offset;
while (count > 0)
{
int bytesRead = await _currentStream.ReadAsync(buffer, buffPostion, count, cancellationToken);
result += bytesRead;
buffPostion += bytesRead;
_postion += bytesRead;
if (bytesRead <= count)
count -= bytesRead;
if (count > 0)
{
if (_currentStreamIndex >= _streams.Count)
break;
_currentStream = _streams[_currentStreamIndex++];
}
}
return result;
}