Example #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);
        }
Example #2
0
        public string[] System__List__Methods___()
        {
            XmlRpcServiceInfo svcInfo = XmlRpcServiceInfo.CreateServiceInfo(GetType());
            var alist = new ArrayList();

            foreach (XmlRpcMethodInfo mthdInfo in svcInfo.Methods)
            {
                if (!mthdInfo.IsHidden)
                {
                    alist.Add(mthdInfo.XmlRpcName);
                }
            }
            return((String[])alist.ToArray(typeof(string)));
        }
Example #3
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);
        }