// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Collections.Generic; namespace Microsoft.AspNetCore.SignalR.Internal { internal class HubClients : IHubClients where THub : Hub { private readonly HubLifetimeManager _lifetimeManager; public HubClients(HubLifetimeManager lifetimeManager) { _lifetimeManager = lifetimeManager; All = new AllClientProxy(_lifetimeManager); } public IClientProxy All { get; } public IClientProxy AllExcept(IReadOnlyList excludedIds) { return new AllClientsExceptProxy(_lifetimeManager, excludedIds); } public IClientProxy Client(string connectionId) { return new SingleClientProxy(_lifetimeManager, connectionId); } public IClientProxy Group(string groupName) { return new GroupProxy(_lifetimeManager, groupName); } public IClientProxy GroupExcept(string groupName, IReadOnlyList excludeIds) { return new GroupExceptProxy(_lifetimeManager, groupName, excludeIds); } public IClientProxy Clients(IReadOnlyList connectionIds) { return new MultipleClientProxy(_lifetimeManager, connectionIds); } public IClientProxy Groups(IReadOnlyList groupNames) { return new MultipleGroupProxy(_lifetimeManager, groupNames); } public IClientProxy User(string userId) { return new UserProxy(_lifetimeManager, userId); } public IClientProxy Users(IReadOnlyList userIds) { return new MultipleUserProxy(_lifetimeManager, userIds); } } }