Exemplo n.º 1
0
        /**
         * Removes the XML-RPC service as a Brunet Rpc handler.
         * @param handler_name the namespace used to register the handler with
         * RpcManager.
         * @param uri the URI at which the XML-RPC service could be accessed.
         */
        public void RemoveXRHandler(string handler_name, string uri)
        {
            string expected_uri = _registered_xmlrpc[handler_name] as string;

            if (string.IsNullOrEmpty(expected_uri))
            {
                throw new Exception("There is no xmlrpc proxy with the specified handler name already in RpcManager");
            }
            else if (!expected_uri.Equals(uri))
            {
                throw new Exception("Uri doesn't match with the proxy already registered");
            }
            _rpc.RemoveHandler(handler_name);
            _registered_xmlrpc.Remove(handler_name);
        }