- Timestamp:
- 12/18/08 14:37:37 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/CachedDataAdapter.cs
r1021 r1026 26 26 using HeuristicLab.Hive.Contracts.BusinessObjects; 27 27 using System.Runtime.CompilerServices; 28 using System.Data; 28 29 29 30 namespace HeuristicLab.Hive.Server.ADODataAccess { … … 37 38 protected CacheT cache = 38 39 new CacheT(); 40 41 protected IDictionary<RowT, DataTable> parentTable = 42 new Dictionary<RowT, DataTable>(); 39 43 40 44 protected ICollection<ICachedDataAdapter> parentAdapters = … … 128 132 129 133 protected virtual void RemoveRowFromCache(RowT row) { 134 if (parentTable.ContainsKey(row)) { 135 parentTable[row].Rows.Add(row); 136 parentTable.Remove(row); 137 } 138 130 139 cache.Rows.Remove(row); 131 140 } … … 169 178 !PutInCache(obj)) { 170 179 //remove from cache 180 RemoveRowFromCache(row); 171 181 UpdateRow(row); 172 RemoveRowFromCache(row);173 182 } else if (!IsCached(row) && 174 183 PutInCache(obj)) { 175 184 //add to cache 185 if (row.Table != null) { 186 parentTable[row] = row.Table; 187 row.Table.Rows.Remove(row); 188 } 176 189 cache.Rows.Add(row); 177 190 }
Note: See TracChangeset
for help on using the changeset viewer.