コード例 #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);
 }