Exemplo n.º 1
0
        public void PublishEvents()
        {
            if (this.Events == null || this.Events.Count == 0)
            {
                return;
            }
            IEventManagerStrategy eventStrategyManager = IoC.Container.Resolve <IEventManagerStrategy>();

            foreach (BaseEvent ev in this.Events.OrderByDescending(item => item.Priority))
            {
                eventStrategyManager.Publish(ev);
            }
        }
        protected void Publish <TEvent>(TEvent ev) where TEvent : IEvent
        {
            IEventManagerStrategy eventStrategyManager = IoC.Container.Resolve <IEventManagerStrategy>();

            eventStrategyManager.Publish(ev);
        }