Microsoft.AspNetCore.SignalR.Hubs.HubTypeExtensions.GetHubAttributeName C# (CSharp) Method

GetHubAttributeName() static private method

static private GetHubAttributeName ( this type ) : string
type this
return string
        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);
        }