From 27979d835ff92db94f0e0c1a78fb8c94cfe09b83 Mon Sep 17 00:00:00 2001 From: Mikael Mengistu Date: Thu, 8 Jun 2017 17:06:41 -0700 Subject: [PATCH] Clean up GroupManager (#542) --- samples/ChatSample/PresenceHubLifetimeManager.cs | 2 +- src/Microsoft.AspNetCore.SignalR/HubEndPoint.cs | 2 +- src/Microsoft.AspNetCore.SignalR/Proxies.cs | 4 +--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/samples/ChatSample/PresenceHubLifetimeManager.cs b/samples/ChatSample/PresenceHubLifetimeManager.cs index 7ce90ede21..c45a59e1e7 100644 --- a/samples/ChatSample/PresenceHubLifetimeManager.cs +++ b/samples/ChatSample/PresenceHubLifetimeManager.cs @@ -113,7 +113,7 @@ namespace ChatSample hub.Clients = _hubContext.Clients; hub.Context = new HubCallerContext(connection); - hub.Groups = new GroupManager(connection, this); + hub.Groups = new GroupManager(this); try { diff --git a/src/Microsoft.AspNetCore.SignalR/HubEndPoint.cs b/src/Microsoft.AspNetCore.SignalR/HubEndPoint.cs index cf46cc503d..15a3942b89 100644 --- a/src/Microsoft.AspNetCore.SignalR/HubEndPoint.cs +++ b/src/Microsoft.AspNetCore.SignalR/HubEndPoint.cs @@ -312,7 +312,7 @@ namespace Microsoft.AspNetCore.SignalR { hub.Clients = _hubContext.Clients; hub.Context = new HubCallerContext(connection); - hub.Groups = new GroupManager(connection, _lifetimeManager); + hub.Groups = new GroupManager(_lifetimeManager); } private bool IsChannel(Type type, out Type payloadType) diff --git a/src/Microsoft.AspNetCore.SignalR/Proxies.cs b/src/Microsoft.AspNetCore.SignalR/Proxies.cs index b221e9f5d5..bf4359cdbd 100644 --- a/src/Microsoft.AspNetCore.SignalR/Proxies.cs +++ b/src/Microsoft.AspNetCore.SignalR/Proxies.cs @@ -75,12 +75,10 @@ namespace Microsoft.AspNetCore.SignalR public class GroupManager : IGroupManager { - private readonly ConnectionContext _connection; private readonly HubLifetimeManager _lifetimeManager; - public GroupManager(ConnectionContext connection, HubLifetimeManager lifetimeManager) + public GroupManager(HubLifetimeManager lifetimeManager) { - _connection = connection; _lifetimeManager = lifetimeManager; }