public void TransferSubscriptionsAsyncNull() { var response = new TransferSubscriptionsResponse(); var channel = new TestRequestChannel(response); channel.Invoking(c => c.TransferSubscriptionsAsync(null)) .Should().Throw <ArgumentNullException>(); }
public async Task TransferSubscriptionsAsync() { var response = new TransferSubscriptionsResponse(); var request = new TransferSubscriptionsRequest(); var channel = new TestRequestChannel(response); var ret = await channel.TransferSubscriptionsAsync(request); ret .Should().BeSameAs(response); channel.Request .Should().BeSameAs(request); }
/// <summary> /// Invokes the TransferSubscriptions service. /// </summary> public IServiceResponse TransferSubscriptions(IServiceRequest incoming) { TransferSubscriptionsResponse response = null; TransferSubscriptionsRequest request = (TransferSubscriptionsRequest)incoming; TransferResultCollection results = null; DiagnosticInfoCollection diagnosticInfos = null; response = new TransferSubscriptionsResponse(); response.ResponseHeader = ServerInstance.TransferSubscriptions( request.RequestHeader, request.SubscriptionIds, request.SendInitialValues, out results, out diagnosticInfos); response.Results = results; response.DiagnosticInfos = diagnosticInfos; return response; }
/// <summary> /// Initializes the message with a service fault. /// </summary> public TransferSubscriptionsResponseMessage(ServiceFault ServiceFault) { this.TransferSubscriptionsResponse = new TransferSubscriptionsResponse(); if (ServiceFault != null) { this.TransferSubscriptionsResponse.ResponseHeader = ServiceFault.ResponseHeader; } }
/// <summary> /// Initializes the message with the body. /// </summary> public TransferSubscriptionsResponseMessage(TransferSubscriptionsResponse TransferSubscriptionsResponse) { this.TransferSubscriptionsResponse = TransferSubscriptionsResponse; }
/// <summary cref="IServiceMessage.CreateResponse" /> public object CreateResponse(IServiceResponse response) { TransferSubscriptionsResponse body = response as TransferSubscriptionsResponse; if (body == null) { body = new TransferSubscriptionsResponse(); body.ResponseHeader = ((ServiceFault)response).ResponseHeader; } return new TransferSubscriptionsResponseMessage(body); }