// 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; using System.Threading.Tasks; namespace Microsoft.AspNetCore.SignalR { public abstract class HubLifetimeManager where THub : Hub { public abstract Task OnConnectedAsync(HubConnectionContext connection); public abstract Task OnDisconnectedAsync(HubConnectionContext connection); public abstract Task SendAllAsync(string methodName, object[] args); public abstract Task SendAllExceptAsync(string methodName, object[] args, IReadOnlyList excludedIds); public abstract Task SendConnectionAsync(string connectionId, string methodName, object[] args); public abstract Task SendConnectionsAsync(IReadOnlyList connectionIds, string methodName, object[] args); public abstract Task SendGroupAsync(string groupName, string methodName, object[] args); public abstract Task SendGroupsAsync(IReadOnlyList groupNames, string methodName, object[] args); public abstract Task SendGroupExceptAsync(string groupName, string methodName, object[] args, IReadOnlyList excludedIds); public abstract Task SendUserAsync(string userId, string methodName, object[] args); public abstract Task SendUsersAsync(IReadOnlyList userIds, string methodName, object[] args); public abstract Task AddGroupAsync(string connectionId, string groupName); public abstract Task RemoveGroupAsync(string connectionId, string groupName); } }