protected void AddEvent(EventBean theEvent) { _array = null; if (!RefSet.TryGetValue(theEvent, out var value)) { RefSet.Put(theEvent, 1); return; } value++; RefSet.Put(theEvent, value); }
protected void RemoveEvent(EventBean theEvent) { _array = null; if (!RefSet.TryGetValue(theEvent, out var value)) return; if (value == 1) { RefSet.Remove(theEvent); return; } value--; RefSet.Put(theEvent, value); }