コード例 #1
0
ファイル: EventAggregator.cs プロジェクト: soshimozi/RedTail
        public static void Subscribe(int type, EventAggregatorDelgate handler)
        {
            if(!Subscribers.ContainsKey(type))
            {
                Subscribers.Add(type, new List<EventSubscriber>());
            }

            Subscribers[type].Add(new EventSubscriber { HandleAggregateEvent = handler });
        }
コード例 #2
0
ファイル: EventAggregator.cs プロジェクト: soshimozi/RedTail
        public static void Subscribe(int type, EventAggregatorDelgate handler)
        {
            if (!Subscribers.ContainsKey(type))
            {
                Subscribers.Add(type, new List <EventSubscriber>());
            }

            Subscribers[type].Add(new EventSubscriber {
                HandleAggregateEvent = handler
            });
        }