private void EndCurrentScope(ScopeCache scopeCache) { var scopes = GetCurrentScopes(); if (scopes.Peek() != scopeCache) { throw new InvalidOperationException( "The scope is not current. Did you forget to end a child scope?"); } scopeCache.Dispose(); scopes.Pop(); }
public void Dispose() { _cacheItem.Dispose(); }