public FlightRecordBatchStreamingCall GetStream(FlightTicket ticket, Metadata headers = null) { var stream = _client.DoGet(ticket.ToProtocol(), headers); var responseStream = new FlightClientRecordBatchStreamReader(stream.ResponseStream); return(new FlightRecordBatchStreamingCall(responseStream, stream.ResponseHeadersAsync, stream.GetStatus, stream.GetTrailers, stream.Dispose)); }
internal FlightRecordBatchStreamingCall( FlightClientRecordBatchStreamReader recordBatchStreamReader, Task <Metadata> responseHeadersAsync, Func <Status> getStatusFunc, Func <Metadata> getTrailersFunc, Action disposeAction) { ResponseStream = recordBatchStreamReader; ResponseHeadersAsync = responseHeadersAsync; _getStatusFunc = getStatusFunc; _getTrailersFunc = getTrailersFunc; _disposeAction = disposeAction; }