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);
}