Exemple #1
0
        public void TransferSubscriptionsAsyncNull()
        {
            var response = new TransferSubscriptionsResponse();
            var channel  = new TestRequestChannel(response);

            channel.Invoking(c => c.TransferSubscriptionsAsync(null))
            .Should().Throw <ArgumentNullException>();
        }
Exemple #2
0
        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);
        }
Exemple #3
0
        /// <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;
        }
Exemple #4
0
        /// <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;
            }
        }
Exemple #5
0
 /// <summary>
 /// Initializes the message with the body.
 /// </summary>
 public TransferSubscriptionsResponseMessage(TransferSubscriptionsResponse TransferSubscriptionsResponse)
 {
     this.TransferSubscriptionsResponse = TransferSubscriptionsResponse;
 }
Exemple #6
0
        /// <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);
        }