private void Subscribe(SubscriptionMessage.Subscription message) { var context = RequestContext.Current; context.Server.SubscriptionManager.Add(new ServerSubscription { ConnectionId = context.ConnectionId, SubscriptionId = message.SubscriptionId, EventName = message.EventName, EventFilter = message.EventFilter, }); }
private void Unsubscribe(SubscriptionMessage.Subscription message) { var context = RequestContext.Current; context.Server.SubscriptionManager.Remove(message.EventName, context.ConnectionId, message.SubscriptionId); }