Example #1
0
        public void DeleteNodesAsyncNull()
        {
            var response = new DeleteNodesResponse();
            var channel  = new TestRequestChannel(response);

            channel.Invoking(c => c.DeleteNodesAsync(null))
            .Should().Throw <ArgumentNullException>();
        }
        public static DeleteNodesResponse Unmarshall(UnmarshallerContext context)
        {
            DeleteNodesResponse deleteNodesResponse = new DeleteNodesResponse();

            deleteNodesResponse.HttpResponse = context.HttpResponse;
            deleteNodesResponse.RequestId    = context.StringValue("DeleteNodes.RequestId");

            return(deleteNodesResponse);
        }
        public static DeleteNodesResponse Unmarshall(UnmarshallerContext _ctx)
        {
            DeleteNodesResponse deleteNodesResponse = new DeleteNodesResponse();

            deleteNodesResponse.HttpResponse = _ctx.HttpResponse;
            deleteNodesResponse.RequestId    = _ctx.StringValue("DeleteNodes.RequestId");
            deleteNodesResponse.TaskId       = _ctx.StringValue("DeleteNodes.TaskId");

            return(deleteNodesResponse);
        }
Example #4
0
        public async Task DeleteNodesAsync()
        {
            var response = new DeleteNodesResponse();
            var request  = new DeleteNodesRequest();
            var channel  = new TestRequestChannel(response);

            var ret = await channel.DeleteNodesAsync(request);

            ret
            .Should().BeSameAs(response);

            channel.Request
            .Should().BeSameAs(request);
        }
Example #5
0
        /// <summary>
        /// Invokes the DeleteNodes service.
        /// </summary>
        public IServiceResponse DeleteNodes(IServiceRequest incoming)
        {
            DeleteNodesResponse response = null;

            DeleteNodesRequest request = (DeleteNodesRequest)incoming;

            StatusCodeCollection results = null;
            DiagnosticInfoCollection diagnosticInfos = null;

            response = new DeleteNodesResponse();

            response.ResponseHeader = ServerInstance.DeleteNodes(
               request.RequestHeader,
               request.NodesToDelete,
               out results,
               out diagnosticInfos);

            response.Results         = results;
            response.DiagnosticInfos = diagnosticInfos;

            return response;
        }
Example #6
0
        /// <summary>
        /// Initializes the message with a service fault.
        /// </summary>
        public DeleteNodesResponseMessage(ServiceFault ServiceFault)
        {
            this.DeleteNodesResponse = new DeleteNodesResponse();

            if (ServiceFault != null)
            {
                this.DeleteNodesResponse.ResponseHeader = ServiceFault.ResponseHeader;
            }
        }
Example #7
0
 /// <summary>
 /// Initializes the message with the body.
 /// </summary>
 public DeleteNodesResponseMessage(DeleteNodesResponse DeleteNodesResponse)
 {
     this.DeleteNodesResponse = DeleteNodesResponse;
 }
Example #8
0
        /// <summary cref="IServiceMessage.CreateResponse" />
        public object CreateResponse(IServiceResponse response)
        {
            DeleteNodesResponse body = response as DeleteNodesResponse;

            if (body == null)
            {
                body = new DeleteNodesResponse();
                body.ResponseHeader = ((ServiceFault)response).ResponseHeader;
            }

            return new DeleteNodesResponseMessage(body);
        }