public void QueryNextAsyncNull() { var response = new QueryNextResponse(); var channel = new TestRequestChannel(response); channel.Invoking(c => c.QueryNextAsync(null)) .Should().Throw <ArgumentNullException>(); }
public async Task QueryNextAsync() { var response = new QueryNextResponse(); var request = new QueryNextRequest(); var channel = new TestRequestChannel(response); var ret = await channel.QueryNextAsync(request); ret .Should().BeSameAs(response); channel.Request .Should().BeSameAs(request); }
/// <summary> /// Invokes the QueryNext service. /// </summary> public IServiceResponse QueryNext(IServiceRequest incoming) { QueryNextResponse response = null; QueryNextRequest request = (QueryNextRequest)incoming; QueryDataSetCollection queryDataSets = null; byte[] revisedContinuationPoint = null; response = new QueryNextResponse(); response.ResponseHeader = ServerInstance.QueryNext( request.RequestHeader, request.ReleaseContinuationPoint, request.ContinuationPoint, out queryDataSets, out revisedContinuationPoint); response.QueryDataSets = queryDataSets; response.RevisedContinuationPoint = revisedContinuationPoint; return response; }
/// <summary> /// Initializes the message with a service fault. /// </summary> public QueryNextResponseMessage(ServiceFault ServiceFault) { this.QueryNextResponse = new QueryNextResponse(); if (ServiceFault != null) { this.QueryNextResponse.ResponseHeader = ServiceFault.ResponseHeader; } }
/// <summary> /// Initializes the message with the body. /// </summary> public QueryNextResponseMessage(QueryNextResponse QueryNextResponse) { this.QueryNextResponse = QueryNextResponse; }
/// <summary cref="IServiceMessage.CreateResponse" /> public object CreateResponse(IServiceResponse response) { QueryNextResponse body = response as QueryNextResponse; if (body == null) { body = new QueryNextResponse(); body.ResponseHeader = ((ServiceFault)response).ResponseHeader; } return new QueryNextResponseMessage(body); }