コード例 #1
0
ファイル: TestSharpEventList.cs プロジェクト: STB1019/JAM2018
        public void TestFireEventsWithPriority4()
        {
            this.Sel += Pair <Priority, ActionCallback> .Build(Priority.HIGH, this.ActionPlus1);

            this.Sel += this.ActionTimes2;
            this.Sel.FireEvents();
            Assert.AreEqual(this.Id, 2);
        }
コード例 #2
0
ファイル: TestSharpEventList.cs プロジェクト: STB1019/JAM2018
        public void TestFireEvents()
        {
            this.Sel += this.ActionPlus1;
            this.Sel += this.ActionPlus2;

            this.Sel.FireEvents();

            Assert.AreEqual(this.Id, 3);
        }
コード例 #3
0
        private SortedEventList GetOrCreateEventList(Type eventType)
        {
            SortedEventList eventList;

            if (!eventHandlers.TryGetValue(eventType, out eventList))
            {
                eventList = new SortedEventList();
                eventHandlers.Add(eventType, eventList);
            }

            return(eventList);
        }
コード例 #4
0
ファイル: TestSharpEventList.cs プロジェクト: STB1019/JAM2018
 public void Setup()
 {
     this.Id  = 0;
     this.Sel = new SortedEventList <ActionCallback>(Priority.MEDIUM);
 }