public void AddNodesAsyncNull() { var response = new AddNodesResponse(); var channel = new TestRequestChannel(response); channel.Invoking(c => c.AddNodesAsync(null)) .Should().Throw <ArgumentNullException>(); }
public async Task AddNodesAsync() { var response = new AddNodesResponse(); var request = new AddNodesRequest(); var channel = new TestRequestChannel(response); var ret = await channel.AddNodesAsync(request); ret .Should().BeSameAs(response); channel.Request .Should().BeSameAs(request); }
public static AddNodesResponse Unmarshall(UnmarshallerContext context) { AddNodesResponse addNodesResponse = new AddNodesResponse(); addNodesResponse.HttpResponse = context.HttpResponse; addNodesResponse.RequestId = context.StringValue("AddNodes.RequestId"); List <string> addNodesResponse_instanceIds = new List <string>(); for (int i = 0; i < context.Length("AddNodes.InstanceIds.Length"); i++) { addNodesResponse_instanceIds.Add(context.StringValue("AddNodes.InstanceIds[" + i + "]")); } addNodesResponse.InstanceIds = addNodesResponse_instanceIds; return(addNodesResponse); }
/// <summary> /// Invokes the AddNodes service. /// </summary> public IServiceResponse AddNodes(IServiceRequest incoming) { AddNodesResponse response = null; AddNodesRequest request = (AddNodesRequest)incoming; AddNodesResultCollection results = null; DiagnosticInfoCollection diagnosticInfos = null; response = new AddNodesResponse(); response.ResponseHeader = ServerInstance.AddNodes( request.RequestHeader, request.NodesToAdd, out results, out diagnosticInfos); response.Results = results; response.DiagnosticInfos = diagnosticInfos; return response; }
/// <summary> /// Initializes the message with a service fault. /// </summary> public AddNodesResponseMessage(ServiceFault ServiceFault) { this.AddNodesResponse = new AddNodesResponse(); if (ServiceFault != null) { this.AddNodesResponse.ResponseHeader = ServiceFault.ResponseHeader; } }
/// <summary> /// Initializes the message with the body. /// </summary> public AddNodesResponseMessage(AddNodesResponse AddNodesResponse) { this.AddNodesResponse = AddNodesResponse; }
/// <summary cref="IServiceMessage.CreateResponse" /> public object CreateResponse(IServiceResponse response) { AddNodesResponse body = response as AddNodesResponse; if (body == null) { body = new AddNodesResponse(); body.ResponseHeader = ((ServiceFault)response).ResponseHeader; } return new AddNodesResponseMessage(body); }