/// <summary> /// Gets if the specified file is being. /// MUST be called from a synchronized context. /// </summary> /// <param name="sortedTree"></param> /// <returns></returns> private bool InternalIsFileBeingUsed(SortedTreeTable <TKey, TValue> sortedTree) { return(m_allSnapshots.Select(snapshot => snapshot.Tables) .Where(tables => tables != null) .Any(tables => tables .Any(summary => summary != null && summary.SortedTreeTable == sortedTree))); }
/// <summary> /// Executes a collection cycle of the pages that are unused. /// </summary> /// <returns></returns> public int DoCollection(CollectionEventArgs e) { lock (m_syncRoot) { if (m_disposed) { return(0); } HashSet <int> pages = new HashSet <int>(m_arrayIndexLocks.Select(pageLock => pageLock.CurrentPageIndex)); return(m_pageList.DoCollection(1, pages, e)); } }