Exemple #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();
            }
        }
Exemple #2
0
 public void GetContent(HandleContentDelegate handleContentDelegate)
 {
     throw new NotImplementedException();
 }
 public void RegisterContentType(string type, HandleContentDelegate handler)
 {
     m_contentTypes[type] = handler;
 }