internal void MonitorDependencyChanges() { // need to protect against the item being closed CacheDependency dependency = _dependency; if (dependency != null && State == EntryState.AddedToCache) { if (!dependency.Use()) { throw new InvalidOperationException(SR.Cache_dependency_used_more_that_once); } dependency.AddCacheEntryNotify(this); } }