Esempio n. 1
0
		internal DeltaBaseCache GetDeltaBaseCache()
		{
			if (baseCache == null)
			{
				baseCache = new DeltaBaseCache();
			}
			return baseCache;
		}
Esempio n. 2
0
		/// <summary>Release the current window cursor.</summary>
		/// <remarks>Release the current window cursor.</remarks>
		public override void Release()
		{
			window = null;
			baseCache = null;
			try
			{
				InflaterCache.Release(inf);
			}
			finally
			{
				inf = null;
			}
		}
Esempio n. 3
0
		private static void Unlink(DeltaBaseCache.Slot e)
		{
			DeltaBaseCache.Slot prev = e.lruPrev;
			DeltaBaseCache.Slot next = e.lruNext;
			if (prev != null)
			{
				prev.lruNext = next;
			}
			if (next != null)
			{
				next.lruPrev = prev;
			}
		}
Esempio n. 4
0
		private static void ClearEntry(DeltaBaseCache.Slot e)
		{
			openByteCount -= e.sz;
			e.provider = null;
			e.data = DEAD;
			e.sz = 0;
		}
Esempio n. 5
0
		private static void MoveToHead(DeltaBaseCache.Slot e)
		{
			Unlink(e);
			e.lruPrev = null;
			e.lruNext = lruHead;
			if (lruHead != null)
			{
				lruHead.lruPrev = e;
			}
			else
			{
				lruTail = e;
			}
			lruHead = e;
		}