public override void Write(byte[] buffer, int offset, int count)
{
var bytesToWriteTotal = count;
while (bytesToWriteTotal > 0)
{
// If we do not have enough space in the cloud, we'll reserve more
var capacity = GetCurrentCapacity();
var delta = Position + bytesToWriteTotal - capacity;
if (delta > 0)
{
Resize(2 * (capacity + delta));
}
...
richtige Weg ist es, sicherzustellen, dass ich genügend Platz haben, oder sollte ich offset
wie folgt hinzu:
var delta = Position + offset + bytesToWriteTotal - capacity;
Wie reserviere ich mehr Platz mit Stream.Write?
http://referencesource.microsoft.com/#mscorlib/system/io/memorystream.cs,a27df287b28d9a2a –