Beispiel #1
0
        public void UnSubscribe <E, EH>()
            where E : IntegrationEvent
            where EH : IIntegrationEventHandler <E>
        {
            eventBusSubscribeManager.RemoveSubscribe <E, EH>();

            var eventName = eventBusSubscribeManager.GetEventKey <E>();

            if (!eventBusSubscribeManager.HasSubscribeForEvent(eventName))
            {
                if (!redisConnection.IsConnected)
                {
                    redisConnection.TryConnect();
                }

                var         multiplexer = redisConnection.GetInstance();
                ISubscriber sub         = multiplexer.GetSubscriber();
                sub.Unsubscribe(eventName);
            }
        }
 public void UnSubscribe <E, EH>()
     where E : IntegrationEvent
     where EH : IIntegrationEventHandler <E>
 {
     eventBusSubscribeManager.RemoveSubscribe <E, EH>();
 }