xiazcy commented on code in PR #3403:
URL: https://github.com/apache/tinkerpop/pull/3403#discussion_r3185087285
##########
gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary4/ResponseMessageSerializer.cs:
##########
@@ -23,46 +23,57 @@
using System.Collections.Generic;
using System.IO;
+using System.Runtime.CompilerServices;
using System.Threading;
-using System.Threading.Tasks;
using Gremlin.Net.Driver.Exceptions;
-using Gremlin.Net.Driver.Messages;
using Gremlin.Net.Process.Traversal;
namespace Gremlin.Net.Structure.IO.GraphBinary4
{
/// <summary>
- /// Deserializes a <see cref="ResponseMessage{T}"/> from the
GraphBinary 4.0 streaming format.
+ /// Deserializes a streaming GraphBinary 4.0 response, yielding each
result object
+ /// as it is deserialized from the stream. After the Marker, reads the
status
+ /// footer and throws <see cref="ResponseException"/> if the status
code is not 200.
/// </summary>
public class ResponseMessageSerializer
{
/// <summary>
- /// Reads a response message from the stream in the 4.0 format:
- /// version byte + bulked flag + result data + marker + status
footer.
+ /// Reads a streaming GraphBinary 4.0 response, yielding each
result object
+ /// as it is deserialized from the stream. After the Marker, reads
the status
+ /// footer and throws <see cref="ResponseException"/> if the
status code is not 200.
/// </summary>
- /// <param name="stream">The GraphBinary data to parse.</param>
+ /// <param name="stream">The stream to read the GraphBinary response
from.</param>
/// <param name="reader">A <see cref="GraphBinaryReader"/> that can be
used to read nested values.</param>
/// <param name="cancellationToken">The token to cancel the operation.
The default value is None.</param>
- /// <returns>The read response message.</returns>
- public async Task<ResponseMessage<List<object>>>
ReadValueAsync(MemoryStream stream,
- GraphBinaryReader reader, CancellationToken cancellationToken =
default)
+ /// <returns>An async enumerable of deserialized result
objects.</returns>
+ public async IAsyncEnumerable<object> ReadStreamingAsync(Stream stream,
Review Comment:
No, `ResponseMessage` was deleted. I'll update naming & stuff for this one.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]