internal static string GetHubAttributeName(this Type type) { if (!typeof(IHub).GetTypeInfo().IsAssignableFrom(type.GetTypeInfo())) { return(null); } // We can still return null if there is no attribute name return(ReflectionHelper.GetAttributeValue <HubNameAttribute, string>(type.GetTypeInfo(), attr => attr.HubName)); }
private static string GetMethodAttributeName(MethodInfo method) { return(ReflectionHelper.GetAttributeValue <HubMethodNameAttribute, string>(method, a => a.MethodName)); }