public void Enter(EventBean theEvent, AnyMap parent) { var mk = EventBeanUtility.GetMultiKey(theEvent, _propertyGetters, _keyCoercionTypes); var innerIndex = (AnyMap)parent.Get(mk); if (innerIndex == null) { innerIndex = new OrderedDictionary <Object, Object>(); parent.Put(mk, innerIndex); } _next.Enter(theEvent, innerIndex); }
public void Enter(EventBean theEvent, AnyMap parent) { Object sortable = _propertyGetter.Get(theEvent); if (sortable == null) { if (_nullKeys == null) { _nullKeys = new HashSet <EventBean>(); } _nullKeys.Add(theEvent); return; } sortable = EventBeanUtility.Coerce(sortable, _coercionType); // if this is a leaf, enter event if (_next == null) { var eventMap = parent; var events = eventMap.Get(sortable) as ICollection <EventBean>; if (events == null) { events = new HashSet <EventBean>(); eventMap.Put(sortable, events); } events.Add(theEvent); } else { AnyMap innerIndex = (AnyMap)parent.Get(sortable); if (innerIndex == null) { innerIndex = new OrderedDictionary <object, object>(); parent.Put(sortable, innerIndex); } _next.Enter(theEvent, innerIndex); } }