Clean up GroupManager (#542)

This commit is contained in:
Mikael Mengistu 2017-06-08 17:06:41 -07:00 committed by GitHub
parent 05dd8c7386
commit 27979d835f
3 changed files with 3 additions and 5 deletions

View File

@ -113,7 +113,7 @@ namespace ChatSample
hub.Clients = _hubContext.Clients;
hub.Context = new HubCallerContext(connection);
hub.Groups = new GroupManager<THub>(connection, this);
hub.Groups = new GroupManager<THub>(this);
try
{

View File

@ -312,7 +312,7 @@ namespace Microsoft.AspNetCore.SignalR
{
hub.Clients = _hubContext.Clients;
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)

View File

@ -75,12 +75,10 @@ namespace Microsoft.AspNetCore.SignalR
public class GroupManager<THub> : IGroupManager
{
private readonly ConnectionContext _connection;
private readonly HubLifetimeManager<THub> _lifetimeManager;
public GroupManager(ConnectionContext connection, HubLifetimeManager<THub> lifetimeManager)
public GroupManager(HubLifetimeManager<THub> lifetimeManager)
{
_connection = connection;
_lifetimeManager = lifetimeManager;
}