예제 #1
0
파일: Cache.cs 프로젝트: zhuxuland/c-sharp
        public Level1CacheClass(IEqualityComparer <TKey> keyComparer)
            : base(keyComparer)
        {
#if !SILVERLIGHT
            _GC2Count = GC.CollectionCount(2);
#else
            _GC2Count = (int)(System.DateTime.Now.Ticks / 100000000L); //10 second intervals
#endif
            MaintenanceWorker.Register(this);
        }
예제 #2
0
 public InternalWeakDictionary(KeyComparer <TStrongKey> keyComparer)
     : base(keyComparer)
 {
     _comparer = keyComparer;
     MaintenanceWorker.Register(this);
 }
예제 #3
0
 public InternalWeakDictionary(int concurrencyLevel, int capacity, KeyComparer <TStrongKey> keyComparer)
     : base(concurrencyLevel, capacity, keyComparer)
 {
     _comparer = keyComparer;
     MaintenanceWorker.Register(this);
 }