public EventTable[] Index(IList <EventBean> pollResult, bool isActiveCache, StatementContext statementContext) { if (!isActiveCache) { return(new EventTable[] { new UnindexedEventTableList(pollResult, _streamNum) }); } PropertySortedEventTableFactory tableFactory; if (_coercionType == null) { tableFactory = new PropertySortedEventTableFactory(_streamNum, _eventType, _propertyName); } else { tableFactory = new PropertySortedEventTableCoercedFactory(_streamNum, _eventType, _propertyName, _coercionType); } EventTable[] tables = tableFactory.MakeEventTables(new EventTableFactoryTableIdentStmt(statementContext)); foreach (EventTable table in tables) { table.Add(pollResult.ToArray()); } return(tables); }
public void Init() { factory = new PropertySortedEventTableFactory(StreamNum, PropertyName, ValueGetter, ValueType); }