internal async Task <IList <WriteResult> > CommitAsync(ByteString transactionId, CancellationToken cancellationToken) { var request = new CommitRequest { Database = _db.RootPath, Writes = { Writes }, Transaction = transactionId }; var response = await _db.Client.CommitAsync(request, CallSettings.FromCancellationToken(cancellationToken)).ConfigureAwait(false); return(response.WriteResults .Select(wr => WriteResult.FromProto(wr, response.CommitTime)) .ToList()); }
internal async Task <IList <WriteResult> > CommitAsync(ByteString transactionId, CancellationToken cancellationToken) { var request = new CommitRequest { Database = _db.RootPath, Writes = { Elements.Select(e => e.Write) }, Transaction = transactionId }; var response = await _db.Client.CommitAsync(request, CallSettings.FromCancellationToken(cancellationToken)).ConfigureAwait(false); return(response.WriteResults // Only include write results from appropriate elements .Where((wr, index) => Elements[index].IncludeInWriteResults) .Select(wr => WriteResult.FromProto(wr, response.CommitTime)) .ToList()); }