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); }
// ------ 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)); }
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; }