It gets the types of the hubs via:
IAssemblyLocator
, which returns the relevant assemblies.
SignalR than interrogates the assemblies for all types that passes:
private static bool IsHubType(Type type)
{
try
{
return typeof (IHub).IsAssignableFrom(type) && !type.IsAbstract
&& (type.Attributes.HasFlag((Enum) TypeAttributes.Public)
|| type.Attributes.HasFlag((Enum) TypeAttributes.NestedPublic));
}
catch
{
return false;
}
}
The types that pass the condition above are then used to create IHubDescriptors
, whose type property are then resolved via the dependency resolver.