예제 #1
0
        /// <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;
        }
예제 #2
0
 /// <summary>
 /// Initializes the message with the body.
 /// </summary>
 public RegisterServer2ResponseMessage(RegisterServer2Response RegisterServer2Response)
 {
     this.RegisterServer2Response = RegisterServer2Response;
 }
예제 #3
0
        /// <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;
            }
        }
예제 #4
0
        /// <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);
        }