private WriteAsync ( byte buffer, int offset, int count, |
||
buffer | byte | |
offset | int | |
count | int | |
cancellationToken | ||
Résultat | Task |
public sealed override async Task WriteAsync(
byte[] buffer, int offset, int count, CancellationToken cancellationToken)
{
var writeBuffer = this.WriteBuffer;
var pastEnd = offset + count;
while ((offset < pastEnd) && ((writeBuffer.Count < writeBuffer.Capacity) ||
await writeBuffer.FlushAsync(cancellationToken)))
{
offset = this.WriteByte(buffer, offset, writeBuffer);
}
this.TotalCount += count;
}