示例#1
0
 public void RemoveMethod(XmlRpcServerMethod method)
 {
     foreach (var rec in methods)
     {
         if (method == rec.Value)
         {
             methods.Remove(rec.Key);
             break;
         }
     }
 }
示例#2
0
        // Execute a named method with the specified params.
        public bool ExecuteMethod(string methodName, XmlRpcValue parms, XmlRpcValue result)
        {
            XmlRpcServerMethod method = FindMethod(methodName);

            if (method == null)
            {
                return(false);
            }

            method.Execute(parms, result);

            // Ensure a valid result value
            if (!result.IsEmpty)
            {
                result.Set("");
            }

            return(true);
        }
示例#3
0
 public void AddMethod(XmlRpcServerMethod method)
 {
     methods.Add(method.Name, method);
 }
示例#4
0
 public XmlRpcServer()
 {
     methodListMethods = new ListMethodsMethod(this);
     methodHelp        = new HelpMethod(this);
 }