Ejemplo n.º 1
0
        private DataObject CalcValue(int column, long row, ICellCache cache)
        {
            crResolver.SetId = (int)row;
            if (groupResolver != null)
            {
                groupResolver.SetUpGroupForRow((int)row);
            }
            Expression expr = expList[column];
            DataObject cell = expr.Evaluate(groupResolver, crResolver, context);

            if (cache != null)
            {
                cache.Set(uniqueId, row, column, cell);
            }
            return(cell);
        }
Ejemplo n.º 2
0
        // ------ Methods that are implemented for Table interface ------

        public override DataObject GetValue(int column, long row)
        {
            // [ FUNCTION TABLE CACHING NOW USES THE GLOBAL CELL CACHING MECHANISM ]
            // Check if in the cache,
            ICellCache cache = Database.CellCache;

            // Is the column worth caching, and is caching enabled?
            if (expInfo[column] == 0 && cache != null)
            {
                DataObject cell = cache.Get(uniqueId, row, column);
                if (cell != null)
                {
                    // In the cache so return the cell.
                    return(cell);
                }

                // Not in the cache so calculate the value and WriteByte it in the cache.
                cell = CalcValue(column, row, cache);
                return(cell);
            }

            // Caching is not enabled
            return(CalcValue(column, row, null));
        }
Ejemplo n.º 3
0
 private DataObject CalcValue(int column, long row, ICellCache cache)
 {
     crResolver.SetId = (int)row;
     if (groupResolver != null) {
         groupResolver.SetUpGroupForRow((int)row);
     }
     Expression expr = expList[column];
     DataObject cell = expr.Evaluate(groupResolver, crResolver, context);
     if (cache != null) {
         cache.Set(uniqueId, row, column, cell);
     }
     return cell;
 }