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