void HandleOnLeave(IEventSubscription sub) { var info = sub.GetInfo(); RemoveSubscriptionFromRedis(info); NotifyChannel(sub.Channel, "cmd.onLeave", sub.Meta); }
void HandleOnUpdate(IEventSubscription sub) { using (var redis = clientsManager.GetClient()) { StoreSubscriptionInfo(redis, sub.GetInfo()); } NotifyChannels(sub.Channels, "cmd.onUpdate", sub.Meta); }
public void Register(IEventSubscription sub, Dictionary <string, string> connectArgs = null) { if (sub == null) { throw new ArgumentNullException("subscription"); } var info = sub.GetInfo(); using (var redis = clientsManager.GetClient()) { StoreSubscriptionInfo(redis, info); } if (connectArgs != null) { sub.Publish("cmd.onConnect", connectArgs.ToJson()); } local.Register(sub); }
public void Register(IEventSubscription sub, Dictionary<string, string> connectArgs = null) { if (sub == null) throw new ArgumentNullException("subscription"); var info = sub.GetInfo(); using (var redis = clientsManager.GetClient()) { StoreSubscriptionInfo(redis, info); } if (connectArgs != null) sub.Publish("cmd.onConnect", connectArgs.ToJson()); local.Register(sub); }
void HandleOnLeave(IEventSubscription sub) { var info = sub.GetInfo(); RemoveSubscriptionFromRedis(info); NotifyChannels(sub.Channels, "cmd.onLeave", sub.Meta); }