protected override async Task AppendInternal(bool async, CancellationToken cancellationToken) { if (_buffer.Length > 0) { _buffer.Position = 0; await _fileClient.AppendInternal( content : _buffer, offset : _writeIndex, options : new DataLakeFileAppendOptions { TransactionalHashingOptions = _hashingOptions, ProgressHandler = _progressHandler, LeaseId = _conditions?.LeaseId }, async : async, cancellationToken : cancellationToken) .ConfigureAwait(false); _writeIndex += _buffer.Length; _buffer.Clear(); } }