Пример #1
0
        /// <summary>
        /// Constructor expecting MinCapacity & MaxCapacity
        /// </summary>
        /// <param name="minCapacity"></param>
        /// <param name="maxCapacity"></param>
        /// <param name="comparer"> </param>
        public MruManager(int minCapacity, int maxCapacity, IComparer <object> comparer)
        {
            mruManager      = new InternalMruManager(minCapacity, maxCapacity);
            CacheCollection = new Collections.Generic.SortedDictionary <object, object>(comparer);
            //CacheManagers.Add(this);

            //RecycledObjects = new List<IInternalPersistent>(maxCapacity);
        }
Пример #2
0
 internal MruManager(MruManager source)
 {
     mruManager      = new InternalMruManager(source.mruManager);
     CacheCollection = new Collections.Generic.SortedDictionary <object, object>(source.CacheCollection.Comparer);
     foreach (var item in source.CacheCollection)
     {
         addInTail(((MruItem)item.Value).Key, ((MruItem)item.Value).Value, ((MruItem)item.Value).Transaction);
     }
 }
Пример #3
0
 public Iterator(InternalMruManager collection)
 {
     if (collection == null)
     {
         throw new ArgumentNullException("collection");
     }
     this._collection = collection;
     Current          = collection._head;
 }
Пример #4
0
 /// <summary>
 /// Constructor expecting MinCapacity & MaxCapacity
 /// </summary>
 /// <param name="minCapacity"></param>
 /// <param name="maxCapacity"></param>
 /// <param name="comparer"> </param>
 public MruManager(int minCapacity, int maxCapacity, IComparer <object> comparer)
 {
     mruManager      = new InternalMruManager(minCapacity, maxCapacity);
     CacheCollection = new Collections.Generic.SortedDictionary <object, object>(comparer);
 }
Пример #5
0
 public void Dispose()
 {
     Current     = null;
     _collection = null;
 }