コード例 #1
0
        public override void GetContent(HandleContentDelegate handleContentDelegate)
        {
            CheckNotDisposed();
            CacheHashMap keyToInstanceMap = new CacheHashMap(CacheMapEntryTypeProvider);
            Lock         writeLock        = this.WriteLock;

            writeLock.Lock();
            try
            {
                foreach (CacheMapEntry entry in keyToCacheValueDict)
                {
                    Object cacheValue = GetCacheValueFromReference(entry.GetValue());
                    if (cacheValue == null)
                    {
                        continue;
                    }
                    keyToInstanceMap.Put(entry.EntityType, entry.IdIndex, entry.Id, cacheValue);
                }
                foreach (CacheMapEntry entry in keyToInstanceMap)
                {
                    sbyte idIndex = entry.IdIndex;
                    if (idIndex == ObjRef.PRIMARY_KEY_INDEX)
                    {
                        handleContentDelegate(entry.EntityType, idIndex, entry.Id, entry.GetValue());
                    }
                }
            }
            finally
            {
                writeLock.Unlock();
            }
        }
コード例 #2
0
ファイル: CacheMock.cs プロジェクト: vogelb/ambeth
 public void GetContent(HandleContentDelegate handleContentDelegate)
 {
     throw new NotImplementedException();
 }
コード例 #3
0
 public void RegisterContentType(string type, HandleContentDelegate handler)
 {
     m_contentTypes[type] = handler;
 }