public string Map(MethodInfo method) { WampRpcMethodAttribute rpcMethodAttribute = method.GetCustomAttribute <WampRpcMethodAttribute>(true); if (rpcMethodAttribute == null) { throw new ArgumentException("Method doesn't have WampRpcMethodAttribute", "method"); } return(rpcMethodAttribute.ProcUri); }
private string GetProcUri(MethodInfo method, string baseUri) { WampRpcMethodAttribute wampRpcMethodAttribute = method.GetCustomAttribute <WampRpcMethodAttribute>(true); string attributeUri = wampRpcMethodAttribute.ProcUri; if (baseUri == null || !wampRpcMethodAttribute.IsRelative) { return(attributeUri); } else { string result = baseUri + attributeUri; return(result); } }