public static IContainer InstantiateSignalRHubs(this IContainer container) { var hubTypes = HubTypeHelper.GetHubTypes(); foreach (var hubType in hubTypes) { container.Resolve(hubType); } return(container); }
public static ContainerBuilder RegisterWithSignalR(this ContainerBuilder builder) { //builder.RegisterHubs(AssemblyHelper.GetReferencedAssemblies().ToArray()); // it creates a new instance on each request var hubTypes = HubTypeHelper.GetHubTypes(); foreach (var hubType in hubTypes) { RegisterSignalRHub(builder, hubType); } return(builder); }