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