DD.WellWorkover.Cloud/AsbCloudWebApi/SignalR/BaseHub.cs
Olga Nemt f043253cf2 1. Типизация клиентских методов signal-R
2. Документирование  клиентских методов signal-R при помощи SignalRSwaggerGen
2023-10-30 12:13:38 +05:00

19 lines
466 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);
}
public abstract class BaseHub2 : Hub
{
}