我有一个coherence缓存对象,其中包含一个键值对,使键值对如下所示
Key
- Value[Hash dictionary which has a key value pair as below]
- Key
- Value
我的问题是我如何获得C#中的所有键和值。
代码:
string parent = ((Tangosol.Util.ConverterCollections.AbstractConverterCacheEntry)(cacheItem)).Key.ToString();
object child = (((Tangosol.Util.ConverterCollections.AbstractConverterCacheEntry)(cacheItem)).Value);
object i = (((Tangosol.Util.Collections.HashDictionary)(((Tangosol.Util.ConverterCollections.AbstractConverterCacheEntry)(cacheItem)).Value)));
答案 0 :(得分:0)
string root_str = ((ConverterCollections.AbstractConverterCacheEntry) (cacheItem)).Key.ToString();
string parent_str = ((DictionaryEntry)(a)).Key.ToString();
string child_str = ((object[])(((DictionaryEntry)(a)).Value))[0].ToString();