コード例 #1
0
        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);
        }
コード例 #2
0
 public void Init()
 {
     factory = new PropertySortedEventTableFactory(StreamNum, PropertyName, ValueGetter, ValueType);
 }