前台填写问卷时将社区修改成输入关键字进行搜索后进行选择。

幢列表修改成输入关键字进行搜索后进行选择。
This commit is contained in:
范露尧
2023-07-10 18:31:49 +08:00
parent 1f278407c8
commit fbbabeb690
12 changed files with 209 additions and 63 deletions

View File

@@ -109,17 +109,18 @@ namespace Ewide.Core
public List<string> GetAllKeys()
{
const BindingFlags flags = BindingFlags.Instance | BindingFlags.NonPublic;
var entries = _memoryCache.GetType().GetField("_entries", flags).GetValue(_memoryCache);
var cacheItems = entries.GetType().GetProperty("Keys").GetValue(entries) as ICollection<object>; //entries as IDictionary;
var keys = new List<string>();
if (cacheItems == null) return keys;
return cacheItems.Select(u => u.ToString()).ToList();
//foreach (DictionaryEntry cacheItem in cacheItems)
//{
// keys.Add(cacheItem.Key.ToString());
//}
//return keys;
//const BindingFlags flags = BindingFlags.Instance | BindingFlags.NonPublic;
//var entries = _memoryCache.GetType().GetField("_entries", flags).GetValue(_memoryCache);
//var cacheItems = entries.GetType().GetProperty("Keys").GetValue(entries) as ICollection<object>; //entries as IDictionary;
//var keys = new List<string>();
//if (cacheItems == null) return keys;
//return cacheItems.Select(u => u.ToString()).ToList();
////foreach (DictionaryEntry cacheItem in cacheItems)
////{
//// keys.Add(cacheItem.Key.ToString());
////}
////return keys;
return new List<string>();
}
}