private static string GetXmlRpcMethodName(MethodInfo mi) { Attribute attr = Attribute.GetCustomAttribute(mi, typeof(XmlRpcMethodAttribute)); if (attr == null) { return(null); } XmlRpcMethodAttribute xrmAttr = attr as XmlRpcMethodAttribute; string rpcMethod = xrmAttr.Method; if (String.IsNullOrEmpty(rpcMethod)) { rpcMethod = mi.Name; } return(rpcMethod); }
private static string GetRpcMethodName(MethodInfo mi) { string rpcMethod; Attribute attr = Attribute.GetCustomAttribute(mi, typeof(XmlRpcMethodAttribute)); if (attr == null) { throw new XmlRpcException("missing method attribute"); } XmlRpcMethodAttribute xrmAttr = attr as XmlRpcMethodAttribute; rpcMethod = xrmAttr.Method; if (String.IsNullOrEmpty(rpcMethod)) { rpcMethod = mi.Name; } return(rpcMethod); }