コード例 #1
0
ファイル: ContextPool.cs プロジェクト: g82tt/xcore
        //---------------------------------------------------

        private static Object getFromContext(String key)
        {
            Object obj = ContextCache.Get(key);

            if (obj != null)
            {
                logger.Debug("ctx_cache_get=>" + key);
            }
            return(obj);
        }
コード例 #2
0
ファイル: ContextPool.cs プロジェクト: g82tt/xcore
 private void addList(String key, IList objList)
 {
     if (objList == null)
     {
         return;
     }
     addToContext(key, objList);
     foreach (IEntity obj in objList)
     {
         ContextCache.Put(CacheKey.getObject(obj.GetType(), obj.Id), obj);
     }
     CacheTime.updateList(key);
 }
コード例 #3
0
ファイル: ContextPool.cs プロジェクト: guojianbin/xcore
        //---------------------------------------------------

        private static Object getFromContext(String key)
        {
            Object obj = null;

            try
            {
                obj = ContextCache.Get(key);
            }
            catch { }
            if (obj != null)
            {
                logger.Info("ctx_cache_get=>" + key);
            }
            return(obj);
        }
コード例 #4
0
ファイル: ContextPool.cs プロジェクト: g82tt/xcore
        //---------------------------------------------------

        private void addToContext(String key, Object val)
        {
            ContextCache.Put(key, val);
            logger.Debug("ctx_cache_+=>" + key);
        }
コード例 #5
0
ファイル: ContextPool.cs プロジェクト: g82tt/xcore
 public void Delete(Type t, int id)
 {
     ContextCache.Remove(t.FullName, id);
 }
コード例 #6
0
ファイル: ContextPool.cs プロジェクト: g82tt/xcore
 public IList FindBySql(String sql, Type t)
 {
     return(ContextCache.Get(sql) as IList);
 }