Esempio n. 1
0
        public Array System__Method__Signature___(string MethodName)
        {
            XmlRpcServiceInfo svcInfo  = XmlRpcServiceInfo.CreateServiceInfo(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");
            }
            var alist = new ArrayList {
                XmlRpcServiceInfo.GetXmlRpcTypeString(mthdInfo.ReturnType)
            };

            foreach (XmlRpcParameterInfo paramInfo in mthdInfo.Parameters)
            {
                alist.Add(XmlRpcServiceInfo.GetXmlRpcTypeString(paramInfo.Type));
            }
            var types    = (string[])alist.ToArray(typeof(string));
            var retalist = new ArrayList {
                types
            };
            Array retarray = retalist.ToArray(typeof(string[]));

            return(retarray);
        }
Esempio n. 2
0
        public string System__Method__Help___(string MethodName)
        {
            XmlRpcServiceInfo svcInfo  = XmlRpcServiceInfo.CreateServiceInfo(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);
        }