You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
iot/projects/IoT.Shared/Services/IoTCenter/IoTCenterHubExtensions.cs

14 lines
460 B

using Application.Models;
using Infrastructure.Extensions;
using Microsoft.AspNetCore.SignalR;
namespace IoTCenter.Services
{
public static class IoTCenterHubExtensions
{
public static void ServerToClient(this IHubContext<IoTCenterHub> hub, string method, object message, string to, string from = null)
{
hub?.Clients.Group(to).SendAsync(Methods.ServerToClient, method, message.ToJson(true), to, from);
}
}
}