public void WriteTag(StringBuilder sb, ref int tabLevel, string tag) { PreferenceCache.StartBlock(sb, ref tabLevel, tag, GetType().FullName); PreferenceCache.SavePreference(sb, ref tabLevel, "Key", Key); PreferenceCache.SavePreference(sb, ref tabLevel, "Value", Value); PreferenceCache.EndBlock(sb, ref tabLevel, tag); }
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 void WriteTag(StringBuilder sb, ref int tabLevel, string tag) { string t = string.Format("{0} ColumnCount=\"{1}\"", tag, Count); PreferenceCache.StartBlock(sb, ref tabLevel, t, GetType().FullName); for (int idx = 0; idx < Count; idx++) { PreferenceCache.SavePreference(sb, ref tabLevel, "ColumnSettings", this[idx]); } PreferenceCache.EndBlock(sb, ref tabLevel, tag); }
public void WriteTag(StringBuilder sb, ref int tabLevel, string tag) { string t = string.Format("{0} maxCapacity=\"{1}\"", tag, _maxCapacity); PreferenceCache.StartBlock(sb, ref tabLevel, t, GetType().FullName); for (int idx = 0; idx < _maxCapacity; idx++) { PreferenceCache.SavePreference(sb, ref tabLevel, tag, items[idx]); } PreferenceCache.EndBlock(sb, ref tabLevel, tag); }