public GetMethod ( String methodName ) : CookComputing.XmlRpc.XmlRpcMethodInfo | ||
methodName | String | |
Результат | CookComputing.XmlRpc.XmlRpcMethodInfo |
public Array System__Method__Signature___(string MethodName) { //TODO: support overloaded methods XmlRpcServiceInfo svcInfo = XmlRpcServiceInfo.CreateServiceInfo( this.GetType()); XmlRpcMethodInfo mthdInfo = svcInfo.GetMethod(MethodName); if (mthdInfo == null) { throw new XmlRpcFaultException("880", "Request for information on unsupported method"); } if (mthdInfo.IsHidden) { throw new XmlRpcFaultException("881", "Information not available on this method"); } //XmlRpcTypes.CheckIsXmlRpcMethod(mi); ArrayList alist = new ArrayList(); alist.Add(XmlRpcServiceInfo.GetXmlRpcTypeString(mthdInfo.ReturnType)); foreach (XmlRpcParameterInfo paramInfo in mthdInfo.Parameters) { alist.Add(XmlRpcServiceInfo.GetXmlRpcTypeString(paramInfo.Type)); } string[] types = (string[])alist.ToArray(typeof(string)); ArrayList retalist = new ArrayList(); retalist.Add(types); Array retarray = retalist.ToArray(typeof(string[])); return(retarray); }
public string System__Method__Help___(string MethodName) { //TODO: support overloaded methods? XmlRpcServiceInfo svcInfo = XmlRpcServiceInfo.CreateServiceInfo( this.GetType()); XmlRpcMethodInfo mthdInfo = svcInfo.GetMethod(MethodName); if (mthdInfo == null) { throw new XmlRpcFaultException("880", "Request for information on unsupported method"); } if (mthdInfo.IsHidden) { throw new XmlRpcFaultException("881", "Information not available for this method"); } return(mthdInfo.Doc); }