예제 #1
0
		/// <summary>
		/// Returns key's of founded entries
		/// 
		/// WARNING. We can't return all CacheEntryInfo entity because after search in becomes invalid :(
		/// </summary>
		/// <param name="predicate"></param>
		/// <returns></returns>
		public static string[] Search( Predicate<CacheEntryInfo> predicate )
		{
			string[] ret = null;
			using (var searcher = new CacheSearcher( predicate ))
			{
				_cacheService.Instance.VisitEntries( searcher );
				ret = searcher.GetResult();
			}
			return ret;
		}
 /// <summary>
 /// Returns key's of founded entries
 ///
 /// WARNING. We can't return all CacheEntryInfo entity because after search in becomes invalid :(
 /// </summary>
 /// <param name="predicate"></param>
 /// <returns></returns>
 public static string[] Search(Predicate <CacheEntryInfo> predicate)
 {
     string[] ret = null;
     using (var searcher = new CacheSearcher(predicate))
     {
         _cacheService.Instance.VisitEntries(searcher);
         ret = searcher.GetResult();
     }
     return(ret);
 }