Exemple #1
0
        public bool Bind(string functionName, XmlRpcFunc callback)
        {
            lock (gate)
            {
                if (functions.ContainsKey(functionName))
                {
                    return(false);
                }

                var method = new XmlRpcServerMethod(server, functionName, callback);
                functions.Add(functionName, method);
                server.AddMethod(method);
            }

            return(true);
        }
Exemple #2
0
        public bool Bind(string functionName, XmlRpcFunc callback)
        {
            //lock( functionsGate )
            //{
            if (functions.ContainsKey(functionName))
            {
                return(false);
            }

            var method = new XmlRpcServerMethod(server, functionName, callback);

            functions[functionName] = method;
            server.AddMethod(method);
            //    }
            return(true);
        }
Exemple #3
0
 public XmlRpcManager()
 {
     this.server = new XmlRpcServer();
     this.getPid = (parms, result) => ResponseInt(1, "", Process.GetCurrentProcess().Id)(result);
 }
 public XmlRpcServerMethod(XmlRpcServer server, string functionName, XmlRpcFunc func = null)
 {
     this.Name   = functionName;
     this.Server = server;
     this.Func   = func ?? Execute;
 }