Clean up GroupManager (#542)
This commit is contained in:
parent
05dd8c7386
commit
27979d835f
|
|
@ -113,7 +113,7 @@ namespace ChatSample
|
||||||
|
|
||||||
hub.Clients = _hubContext.Clients;
|
hub.Clients = _hubContext.Clients;
|
||||||
hub.Context = new HubCallerContext(connection);
|
hub.Context = new HubCallerContext(connection);
|
||||||
hub.Groups = new GroupManager<THub>(connection, this);
|
hub.Groups = new GroupManager<THub>(this);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -312,7 +312,7 @@ namespace Microsoft.AspNetCore.SignalR
|
||||||
{
|
{
|
||||||
hub.Clients = _hubContext.Clients;
|
hub.Clients = _hubContext.Clients;
|
||||||
hub.Context = new HubCallerContext(connection);
|
hub.Context = new HubCallerContext(connection);
|
||||||
hub.Groups = new GroupManager<THub>(connection, _lifetimeManager);
|
hub.Groups = new GroupManager<THub>(_lifetimeManager);
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool IsChannel(Type type, out Type payloadType)
|
private bool IsChannel(Type type, out Type payloadType)
|
||||||
|
|
|
||||||
|
|
@ -75,12 +75,10 @@ namespace Microsoft.AspNetCore.SignalR
|
||||||
|
|
||||||
public class GroupManager<THub> : IGroupManager
|
public class GroupManager<THub> : IGroupManager
|
||||||
{
|
{
|
||||||
private readonly ConnectionContext _connection;
|
|
||||||
private readonly HubLifetimeManager<THub> _lifetimeManager;
|
private readonly HubLifetimeManager<THub> _lifetimeManager;
|
||||||
|
|
||||||
public GroupManager(ConnectionContext connection, HubLifetimeManager<THub> lifetimeManager)
|
public GroupManager(HubLifetimeManager<THub> lifetimeManager)
|
||||||
{
|
{
|
||||||
_connection = connection;
|
|
||||||
_lifetimeManager = lifetimeManager;
|
_lifetimeManager = lifetimeManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue