public override async Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) { await _tcs.Task; await base.WriteAsync(buffer, offset, count, cancellationToken); }