DD.WellWorkover.Cloud/AsbCloudWebApi/SignalR/TelemetryHub.cs
Фролов 0b1f9683b9 fix jsonSerializer settings;
reafctor TelemetryHub;
Add wellDepth into TelemetryMessage
2021-09-17 16:24:01 +05:00

21 lines
651 B
C#

using AsbCloudApp.Data;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.SignalR;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace AsbCloudWebApi.SignalR
{
// SignalR manual:
// https://docs.microsoft.com/ru-ru/aspnet/core/signalr/introduction?view=aspnetcore-5.0
[Authorize]
public class TelemetryHub : Hub
{
public Task AddToGroup(string groupName)
=> Groups.AddToGroupAsync(Context.ConnectionId, groupName.ToString());
public Task RemoveFromGroup(string groupName)
=> Groups.RemoveFromGroupAsync(Context.ConnectionId, groupName);
}
}