CookComputing.XmlRpc.XmlRpcServiceInfo.GetMethodName C# (CSharp) Method

GetMethodName() public method

public GetMethodName ( string XmlRpcMethodName ) : string
XmlRpcMethodName string
return string
        public string GetMethodName(string XmlRpcMethodName)
        {
            foreach (XmlRpcMethodInfo methodInfo in methodInfos)
              {
            if (methodInfo.XmlRpcName == XmlRpcMethodName)
              return methodInfo.MiName;
              }
              return null;
        }

Usage Example

Esempio n. 1
0
        Header[] GetChannelHeaders(
            ITransportHeaders requestHeaders,
            XmlRpcRequest xmlRpcReq,
            Type svcType)
        {
            string            requestUri = (string)requestHeaders["__RequestUri"];
            XmlRpcServiceInfo svcInfo    = XmlRpcServiceInfo.CreateServiceInfo(svcType);
            ArrayList         hdrList    = new ArrayList();

            hdrList.Add(new Header("__Uri", requestUri));
            hdrList.Add(new Header("__TypeName", svcType.AssemblyQualifiedName));
            hdrList.Add(new Header("__MethodName",
                                   svcInfo.GetMethodName(xmlRpcReq.method)));
            hdrList.Add(new Header("__Args", xmlRpcReq.args));
            return((Header[])hdrList.ToArray(typeof(Header)));
        }