public async Task PublishAsync(BaseSubscription subscription, BaseMethod method) { await _hubContext .Clients .Group(subscription.GetSubscriptionString()) .SendCoreAsync(method.GetName(), method.GetArgs()); }
public async Task UnsubscribeAsync(string connectionId, BaseSubscription subscription) { await _hubContext.Groups.RemoveFromGroupAsync(connectionId, subscription.GetSubscriptionString()); }