internal static ISet <EventBean> Handle( EventBean[] eventsPerStream, IDictionary <object, object> sortedMapOne, IDictionary <object, object> sortedMapTwo, ISet <EventBean> result, CompositeIndexQuery next) { if (next == null) { if (result == null) { result = new HashSet <EventBean>(); } AddResults( sortedMapOne != null ? sortedMapOne.Select(entry => new KeyValuePair <object, ICollection <EventBean> >(entry.Key, entry.Value as ICollection <EventBean>)) : null, sortedMapTwo != null ? sortedMapTwo.Select(entry => new KeyValuePair <object, ICollection <EventBean> >(entry.Key, entry.Value as ICollection <EventBean>)) : null, result); return(result); } else { if (result == null) { result = new HashSet <EventBean>(); } var map = sortedMapOne; foreach (var entry in map) { next.Add(eventsPerStream, (Map)entry.Value, result); } if (sortedMapTwo != null) { map = sortedMapTwo; foreach (var entry in map) { next.Add(eventsPerStream, (Map)entry.Value, result); } } return(result); } }
protected internal static ICollection <EventBean> Handle( EventBean[] eventsPerStream, IDictionary <object, object> sortedMapOne, IDictionary <object, object> sortedMapTwo, ICollection <EventBean> result, CompositeIndexQuery next, CompositeIndexQueryResultPostProcessor postProcessor) { if (next == null) { if (result == null) { result = new HashSet <EventBean>(); } AddResults( sortedMapOne != null ? sortedMapOne.Select(entry => new KeyValuePair <object, ICollection <EventBean> >(entry.Key, entry.Value as ICollection <EventBean>)) : null, sortedMapTwo != null ? sortedMapTwo.Select(entry => new KeyValuePair <object, ICollection <EventBean> >(entry.Key, entry.Value as ICollection <EventBean>)) : null, result, postProcessor); return(result); } else { if (result == null) { result = new HashSet <EventBean>(); } foreach (var entry in sortedMapOne) { next.Add(eventsPerStream, entry.Value as IDictionary <object, object>, result, postProcessor); } if (sortedMapTwo != null) { foreach (var entry in sortedMapTwo) { next.Add(eventsPerStream, entry.Value as IDictionary <object, object>, result, postProcessor); } } return(result); } }
internal static ISet <EventBean> Handle( EventBean theEvent, IDictionary <object, object> sortedMapOne, IDictionary <object, object> sortedMapTwo, ISet <EventBean> result, CompositeIndexQuery next) { if (next == null) { if (result == null) { result = new HashSet <EventBean>(); } AddResults( sortedMapOne != null ? sortedMapOne.Select(entry => new KeyValuePair <object, ICollection <EventBean> >(entry.Key, entry.Value as ICollection <EventBean>)) : null, sortedMapTwo != null ? sortedMapTwo.Select(entry => new KeyValuePair <object, ICollection <EventBean> >(entry.Key, entry.Value as ICollection <EventBean>)) : null, result); return(result); } else { if (result == null) { result = new HashSet <EventBean>(); } foreach (var entry in sortedMapOne) { next.Add(theEvent, entry.Value as Map, result); } if (sortedMapTwo != null) { foreach (var entry in sortedMapTwo) { next.Add(theEvent, entry.Value as Map, result); } } return(result); } }
protected internal static ICollection<EventBean> Handle( EventBean[] eventsPerStream, IDictionary<object, CompositeIndexEntry> sortedMapOne, IDictionary<object, CompositeIndexEntry> sortedMapTwo, ICollection<EventBean> result, CompositeIndexQuery next, CompositeIndexQueryResultPostProcessor postProcessor) { if (next == null) { if (result == null) { result = new HashSet<EventBean>(); } AddResults(sortedMapOne, sortedMapTwo, result, postProcessor); return result; } else { if (result == null) { result = new HashSet<EventBean>(); } var map = sortedMapOne; foreach (var entry in map) { next.Add(eventsPerStream, entry.Value.AssertIndex(), result, postProcessor); } if (sortedMapTwo != null) { map = sortedMapTwo; foreach (var entry in map) { next.Add(eventsPerStream, entry.Value.AssertIndex(), result, postProcessor); } } return result; } }