/// <summary>
        /// 获取匹配数据
        /// </summary>
        /// <param name="key">关键字</param>
        /// <param name="dictionaryKey">字典关键字</param>
        /// <param name="nullValue">失败返回值</param>
        /// <returns>匹配数据</returns>
        public valueType Get(keyType key, dictionaryKeyType dictionaryKey, valueType nullValue)
        {
            GetTask task = new GetTask(this, key, dictionaryKey);

            counter.SqlTable.AddQueue(task);
            return(task.Wait() ?? nullValue);
        }
 /// <summary>
 /// 缓存数据集合
 /// </summary>
 /// <param name="key">关键字</param>
 /// <returns>缓存数据集合</returns>
 public LeftArray <valueType> this[keyType key]
 {
     get
     {
         memberCacheType node = getTarget(key);
         if (node != null)
         {
             GetTask task = new GetTask(this, node, key);
             sqlTable.AddQueue(task);
             return(task.Wait());
         }
         return(default(LeftArray <valueType>));
     }
 }
Beispiel #3
0
 /// <summary>
 /// 缓存数据
 /// </summary>
 /// <param name="key">关键字</param>
 /// <returns>缓存数据</returns>
 public cacheValueType this[keyType key]
 {
     get
     {
         memberCacheType node = getTarget(key);
         if (node != null)
         {
             GetTask task = new GetTask(this, node, key);
             sqlTable.AddQueue(task);
             return(task.Wait());
         }
         return(null);
     }
 }