Пример #1
0
        public void HistoryUpdateAsyncNull()
        {
            var response = new HistoryUpdateResponse();
            var channel  = new TestRequestChannel(response);

            channel.Invoking(c => c.HistoryUpdateAsync(null))
            .Should().Throw <ArgumentNullException>();
        }
Пример #2
0
        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);
        }
Пример #3
0
        /// <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;
        }
Пример #4
0
        /// <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;
            }
        }
Пример #5
0
 /// <summary>
 /// Initializes the message with the body.
 /// </summary>
 public HistoryUpdateResponseMessage(HistoryUpdateResponse HistoryUpdateResponse)
 {
     this.HistoryUpdateResponse = HistoryUpdateResponse;
 }
Пример #6
0
        /// <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);
        }