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/Platform/Services/IoTCenterHubExtensions.cs

15 lines
471 B

using Infrastructure.Extensions;
using IoT.Shared.Application.Models;
using Microsoft.AspNetCore.SignalR;
namespace Platform.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);
}
}
}