// Token: 0x06007154 RID: 29012 RVA: 0x00206EB8 File Offset: 0x002050B8 private PageCacheChange UpdateEntry(int index, PageCacheEntry newEntry) { if (index >= this._cache.Count || index < 0) { throw new ArgumentOutOfRangeException("index"); } Invariant.Assert(newEntry.PageSize != Size.Empty, "Updated entry newEntry has Empty PageSize."); if (newEntry.PageSize != this._cache[index].PageSize || newEntry.Dirty != this._cache[index].Dirty) { this._cache[index] = newEntry; return(new PageCacheChange(index, 1, PageCacheChangeType.Update)); } return(null); }
/// <summary> /// Updates the cache entry at the specified index with a new entry. /// </summary> /// <param name="index"></param> /// <param name="newEntry"></param> private PageCacheChange UpdateEntry(int index, PageCacheEntry newEntry) { //Make sure we're in range. if (index >= _cache.Count || index < 0) { throw new ArgumentOutOfRangeException("index"); } Invariant.Assert(newEntry.PageSize != Size.Empty, "Updated entry newEntry has Empty PageSize."); //Check to see if the entry has changed. if (newEntry.PageSize != _cache[index].PageSize || newEntry.Dirty != _cache[index].Dirty) { //Update the cache entry _cache[index] = newEntry; return(new PageCacheChange(index, 1, PageCacheChangeType.Update)); } return(null); }
/// <summary> /// Updates the cache entry at the specified index with a new entry. /// </summary> /// <param name="index"></param> /// <param name="newEntry"></param> private PageCacheChange UpdateEntry(int index, PageCacheEntry newEntry) { //Make sure we're in range. if (index >= _cache.Count || index < 0) { throw new ArgumentOutOfRangeException("index"); } Invariant.Assert(newEntry.PageSize != Size.Empty, "Updated entry newEntry has Empty PageSize."); //Check to see if the entry has changed. if (newEntry.PageSize != _cache[index].PageSize || newEntry.Dirty != _cache[index].Dirty) { //Update the cache entry _cache[index] = newEntry; return new PageCacheChange(index, 1, PageCacheChangeType.Update); } return null; }