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