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 hub, string method, object message, string to, string from = null) { hub?.Clients.Group(to).SendAsync(Methods.ServerToClient, method, message.ToJson(true), to, from); } } }