public void WriteTag(StringBuilder sb, ref int tabLevel, string tag) { PreferenceCache.StartBlock(sb, ref tabLevel, tag, GetType().FullName); foreach (string key in this.Keys) { KeyValuePairPreference kvp = new KeyValuePairPreference(key, this[key]); PreferenceCache.SavePreference(sb, ref tabLevel, "Key", kvp); } PreferenceCache.EndBlock(sb, ref tabLevel, tag); }
public IPreference FromXmlNode(System.Xml.XmlNode node) { int Capacity = node.ChildNodes.Count; for (int idx = 0; idx < node.ChildNodes.Count; idx++) { KeyValuePairPreference kvp = PreferenceCache.LoadPreference(node.ChildNodes[idx]) as KeyValuePairPreference; this.Add(kvp.Key, kvp.Value); } return(this); }
public static KeyValuePairPreference Clone(KeyValuePairPreference kvp) { return(new KeyValuePairPreference(kvp)); }
public KeyValuePairPreference(KeyValuePairPreference kvp) { this.Key = kvp.Key; this.Value = kvp.Value; }