Inheritance: System.MarshalByRefObject, IRpcHandler
コード例 #1
0
        /// <summary>
        /// The overloaded method for now is used to allow RpcManager to be replaced
        /// by MockRpcManager in unit tests.
        /// </summary>
        /// <param name="node"></param>
        /// <param name="rpc"></param>
        /// <param name="uri"></param>
        internal void Add(Node node, RpcManager rpc, string uri)
        {
            var xrm = new XmlRpcManager(node, rpc);

            lock (_sync_root) {
                // throw an exception if this mapping exists...
                _xrm_mappings.Add(node, xrm);
                RemotingServices.Marshal(xrm, uri);
                CheckAndSetDefaultManager();
            }
            rpc.AddHandler("xmlrpc", xrm);
        }
コード例 #2
0
        /// <summary>
        /// Allows nodes to be registered by whatever URI the user provides
        /// </summary>
        /// <param name="node"></param>
        /// <param name="uri"></param>
        public void Add(Node node, string uri)
        {
            var xrm = new XmlRpcManager(node, node.Rpc, uri);

            lock (_sync_root) {
                // throw an exception if this mapping exists...
                _xrm_mappings.Add(node, xrm);
                RemotingServices.Marshal(xrm, uri);
                CheckAndSetDefaultManager();
            }
            // We only add this if there is no exception above...
            node.Rpc.AddHandler("xmlrpc", xrm);
        }
コード例 #3
0
ファイル: XmlRpcManager.cs プロジェクト: pstjuste/brunet
 /// <summary>
 /// The overloaded method for now is used to allow RpcManager to be replaced
 /// by MockRpcManager in unit tests.
 /// </summary>
 /// <param name="node"></param>
 /// <param name="rpc"></param>
 /// <param name="uri"></param>
 internal void Add(Node node, RpcManager rpc, string uri) {
   var xrm = new XmlRpcManager(node, rpc);
   lock (_sync_root) {
     // throw an exception if this mapping exists...
     _xrm_mappings.Add(node, xrm);
     RemotingServices.Marshal(xrm, uri);
     CheckAndSetDefaultManager();
   }
   rpc.AddHandler("xmlrpc", xrm);
 }
コード例 #4
0
ファイル: XmlRpcManager.cs プロジェクト: pstjuste/brunet
 /// <summary>
 /// Allows nodes to be registered by whatever URI the user provides
 /// </summary>
 /// <param name="node"></param>
 /// <param name="uri"></param>
 public void Add(Node node, string uri) {
   var xrm = new XmlRpcManager(node, node.Rpc, uri);
   lock (_sync_root) {
     // throw an exception if this mapping exists...
     _xrm_mappings.Add(node, xrm);
     RemotingServices.Marshal(xrm, uri);
     CheckAndSetDefaultManager();
   }
   // We only add this if there is no exception above...
   node.Rpc.AddHandler("xmlrpc", xrm);
 }