DD.WellWorkover.Cloud/AsbCloudWebApi/SignalR/BaseHub.cs

15 lines
424 B
C#

using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.SignalR;
namespace AsbCloudWebApi.SignalR;
public abstract class BaseHub<T> : Hub<T> where T : class
{
public virtual Task AddToGroup(string groupName) =>
Groups.AddToGroupAsync(Context.ConnectionId, groupName);
public virtual Task RemoveFromGroup(string groupName) =>
Groups.RemoveFromGroupAsync(Context.ConnectionId, groupName);
}