public ReadOnlyPropertiesDictionary(ReadOnlyPropertiesDictionary propertiesDictionary) { foreach (DictionaryEntry entry in propertiesDictionary) { InnerHashtable.Add(entry.Key, entry.Value); } }
/// <summary> /// 对嵌套属性字典的压平操作 /// </summary> /// <returns></returns> public PropertiesDictionary Flatten() { if (m_flattened == null) { m_flattened = new PropertiesDictionary(); for (int i = m_nestedProperties.Count; --i >= 0;) { ReadOnlyPropertiesDictionary cur = m_nestedProperties[i]; foreach (DictionaryEntry entry in cur) { m_flattened[(string)entry.Key] = entry.Value; } } } return(m_flattened); }
public void Add(ReadOnlyPropertiesDictionary properties) { m_flattened = null; m_nestedProperties.Add(properties); }
public PropertiesDictionary(ReadOnlyPropertiesDictionary propertiesDictionary) : base(propertiesDictionary) { }