Beispiel #1
0
        internal static IDisposable EnterScope(MemoryCacheEntry entry)
        {
            var scopes = GetOrCreateScopes();

            var scopeLease = new ScopeLease(scopes);

            Scopes = scopes.Push(entry);

            return(scopeLease);
        }
Beispiel #2
0
        private CacheEntryStack(CacheEntryStack previous, MemoryCacheEntry entry)
        {
            if (previous == null)
            {
                throw new ArgumentNullException(nameof(previous));
            }

            _previous = previous;
            _entry    = entry;
        }
Beispiel #3
0
 public CacheEntryStack Push(MemoryCacheEntry c)
 {
     return(new CacheEntryStack(this, c));
 }