3 implementations of IHubActivator
Microsoft.AspNetCore.SignalR.Core (1)
Internal\DefaultHubActivator.cs (1)
10internal sealed class DefaultHubActivator<[DynamicallyAccessedMembers(Hub.DynamicallyAccessedMembers)] THub> : IHubActivator<THub> where THub : Hub
Microsoft.AspNetCore.SignalR.Tests (2)
AddSignalRTests.cs (1)
230public class CustomHubActivator<THub> : IHubActivator<THub> where THub : Hub
HubConnectionHandlerTests.cs (1)
5361private class CustomHubActivator<THub> : IHubActivator<THub> where THub : Hub
27 references to IHubActivator
Microsoft.AspNetCore.SignalR.Core (10)
Internal\DefaultHubDispatcher.cs (9)
87var hubActivator = scope.ServiceProvider.GetRequiredService<IHubActivator<THub>>(); 123var hubActivator = scope.ServiceProvider.GetRequiredService<IHubActivator<THub>>(); 326IHubActivator<THub>? hubActivator = null; 330hubActivator = scope.ServiceProvider.GetRequiredService<IHubActivator<THub>>(); 390IHubActivator<THub> hubActivator, 492private static ValueTask CleanupInvocation(HubConnectionContext connection, HubMethodInvocationMessage hubMessage, IHubActivator<THub>? hubActivator, 512IHubActivator<THub> hubActivator, THub hub, CancellationTokenSource? streamCts, HubMethodInvocationMessage hubMethodInvocationMessage, HubMethodDescriptor descriptor)
SignalRDependencyInjectionExtensions.cs (1)
32services.TryAddScoped(typeof(IHubActivator<>), typeof(DefaultHubActivator<>));
Microsoft.AspNetCore.SignalR.Tests (17)
AddSignalRTests.cs (4)
32serviceCollection.AddScoped(typeof(IHubActivator<>), typeof(CustomHubActivator<>)); 43Assert.IsType<CustomHubActivator<CustomHub>>(serviceProvider.GetRequiredService<IHubActivator<CustomHub>>()); 60serviceCollection.AddScoped(typeof(IHubActivator<>), typeof(CustomHubActivator<>)); 68Assert.IsType<CustomHubActivator<CustomHub>>(serviceProvider.GetRequiredService<IHubActivator<CustomHub>>());
HubConnectionHandlerTests.cs (13)
696var mockHubActivator = new Mock<IHubActivator<Hub>>(); 3216builder.AddSingleton(typeof(IHubActivator<>), typeof(CustomHubActivator<>)); 3232var hubActivator = serviceProvider.GetService<IHubActivator<StreamingHub>>() as CustomHubActivator<StreamingHub>; 3251builder.AddSingleton(typeof(IHubActivator<>), typeof(CustomHubActivator<>)); 3267var hubActivator = serviceProvider.GetService<IHubActivator<StreamingHub>>() as CustomHubActivator<StreamingHub>; 3286builder.AddSingleton(typeof(IHubActivator<>), typeof(CustomHubActivator<>)); 3303var hubActivator = serviceProvider.GetService<IHubActivator<StreamingHub>>() as CustomHubActivator<StreamingHub>; 3505builder.AddSingleton(typeof(IHubActivator<>), typeof(CustomHubActivator<>)); 3532var hubActivator = serviceProvider.GetService<IHubActivator<LongRunningHub>>() as CustomHubActivator<LongRunningHub>; 4054builder.AddSingleton(typeof(IHubActivator<>), typeof(CustomHubActivator<>)); 4072var hubActivator = serviceProvider.GetService<IHubActivator<MethodHub>>() as CustomHubActivator<MethodHub>; 4092builder.AddSingleton(typeof(IHubActivator<>), typeof(CustomHubActivator<>)); 4100var hubActivator = serviceProvider.GetService<IHubActivator<MethodHub>>() as CustomHubActivator<MethodHub>;