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); }
public void TestFireEvents() { this.Sel += this.ActionPlus1; this.Sel += this.ActionPlus2; this.Sel.FireEvents(); Assert.AreEqual(this.Id, 3); }
private SortedEventList GetOrCreateEventList(Type eventType) { SortedEventList eventList; if (!eventHandlers.TryGetValue(eventType, out eventList)) { eventList = new SortedEventList(); eventHandlers.Add(eventType, eventList); } return(eventList); }
public void Setup() { this.Id = 0; this.Sel = new SortedEventList <ActionCallback>(Priority.MEDIUM); }