/// <summary> /// Invokes the RegisterServer2 service. /// </summary> public IServiceResponse RegisterServer2(IServiceRequest incoming) { RegisterServer2Response response = null; try { // OnRequestReceived(incoming); RegisterServer2Request request = (RegisterServer2Request)incoming; StatusCodeCollection configurationResults = null; DiagnosticInfoCollection diagnosticInfos = null; response = new RegisterServer2Response(); response.ResponseHeader = ServerInstance.RegisterServer2( request.RequestHeader, request.Server, request.DiscoveryConfiguration, out configurationResults, out diagnosticInfos); response.ConfigurationResults = configurationResults; response.DiagnosticInfos = diagnosticInfos; } finally { // OnResponseSent(response); } return response; }
/// <summary> /// Initializes the message with the body. /// </summary> public RegisterServer2ResponseMessage(RegisterServer2Response RegisterServer2Response) { this.RegisterServer2Response = RegisterServer2Response; }
/// <summary> /// Initializes the message with a service fault. /// </summary> public RegisterServer2ResponseMessage(ServiceFault ServiceFault) { this.RegisterServer2Response = new RegisterServer2Response(); if (ServiceFault != null) { this.RegisterServer2Response.ResponseHeader = ServiceFault.ResponseHeader; } }
/// <summary cref="IServiceMessage.CreateResponse" /> public object CreateResponse(IServiceResponse response) { RegisterServer2Response body = response as RegisterServer2Response; if (body == null) { body = new RegisterServer2Response(); body.ResponseHeader = ((ServiceFault)response).ResponseHeader; } return new RegisterServer2ResponseMessage(body); }