public void HistoryUpdateAsyncNull() { var response = new HistoryUpdateResponse(); var channel = new TestRequestChannel(response); channel.Invoking(c => c.HistoryUpdateAsync(null)) .Should().Throw <ArgumentNullException>(); }
public async Task HistoryUpdateAsync() { var response = new HistoryUpdateResponse(); var request = new HistoryUpdateRequest(); var channel = new TestRequestChannel(response); var ret = await channel.HistoryUpdateAsync(request); ret .Should().BeSameAs(response); channel.Request .Should().BeSameAs(request); }
/// <summary> /// Invokes the HistoryUpdate service. /// </summary> public IServiceResponse HistoryUpdate(IServiceRequest incoming) { HistoryUpdateResponse response = null; HistoryUpdateRequest request = (HistoryUpdateRequest)incoming; HistoryUpdateResultCollection results = null; DiagnosticInfoCollection diagnosticInfos = null; response = new HistoryUpdateResponse(); response.ResponseHeader = ServerInstance.HistoryUpdate( request.RequestHeader, request.HistoryUpdateDetails, out results, out diagnosticInfos); response.Results = results; response.DiagnosticInfos = diagnosticInfos; return response; }
/// <summary> /// Initializes the message with a service fault. /// </summary> public HistoryUpdateResponseMessage(ServiceFault ServiceFault) { this.HistoryUpdateResponse = new HistoryUpdateResponse(); if (ServiceFault != null) { this.HistoryUpdateResponse.ResponseHeader = ServiceFault.ResponseHeader; } }
/// <summary> /// Initializes the message with the body. /// </summary> public HistoryUpdateResponseMessage(HistoryUpdateResponse HistoryUpdateResponse) { this.HistoryUpdateResponse = HistoryUpdateResponse; }
/// <summary cref="IServiceMessage.CreateResponse" /> public object CreateResponse(IServiceResponse response) { HistoryUpdateResponse body = response as HistoryUpdateResponse; if (body == null) { body = new HistoryUpdateResponse(); body.ResponseHeader = ((ServiceFault)response).ResponseHeader; } return new HistoryUpdateResponseMessage(body); }