示例#1
0
 public bool Insert(K k, CCacheItem_WuQi <K, T> item, ref ICacheStorage_WuQi <K, T> container)
 {
     if (!container.Contains(k))
     {
         container.Add(k, item);
     }
     return(true);
 }
示例#2
0
 public int SynchronousAllObject(List <CCacheItem_WuQi <K, T> > litem, ref ICacheStorage_WuQi <K, T> container)
 {
     container.Clear();
     foreach (CCacheItem_WuQi <K, T> item in litem)
     {
         container.Add(item.key, item);
     }
     return(container.Count);
 }
示例#3
0
        public int Insert(List <CCacheItem_WuQi <K, T> > listitem, ref ICacheStorage_WuQi <K, T> container)
        {
            int result = 0;

            foreach (CCacheItem_WuQi <K, T> item in listitem)
            {
                if (!container.Contains(item.key))
                {
                    container.Add(item.key, item);
                }
                result++;
            }
            return(result);
        }