Ejemplo n.º 1
0
        public void DeleteSubscriptionsAsyncNull()
        {
            var response = new DeleteSubscriptionsResponse();
            var channel  = new TestRequestChannel(response);

            channel.Invoking(c => c.DeleteSubscriptionsAsync(null))
            .Should().Throw <ArgumentNullException>();
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        /// <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;
        }
Ejemplo n.º 4
0
        /// <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;
            }
        }
Ejemplo n.º 5
0
 /// <summary>
 /// Initializes the message with the body.
 /// </summary>
 public DeleteSubscriptionsResponseMessage(DeleteSubscriptionsResponse DeleteSubscriptionsResponse)
 {
     this.DeleteSubscriptionsResponse = DeleteSubscriptionsResponse;
 }
Ejemplo n.º 6
0
        /// <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);
        }