private void execute(XmlRpcValue parms, XmlRpcValue result) { if (parms[0].Type != XmlRpcValue.ValueType.TypeString) { throw new XmlRpcException(METHOD_HELP + ": Invalid argument type"); } XmlRpcServerMethod m = server.FindMethod(parms[0].GetString()); if (m == null) { throw new XmlRpcException(METHOD_HELP + ": Unknown method name"); } result.Set(m.Help()); }
// 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.Valid) { result.Set(""); } return(true); }