public Section(string name, Section inheritedFrom, Dictionary<string, KeyValue> pairs, params string[] notes) { if (notes != null) { var list = new List<string>(notes.Length); foreach (var note in notes) { list.Add(note); } this._notes = list; } this.Name = name; this._base = inheritedFrom; this.Pairs = pairs; }
public string WriteSection(Section section) { // Write header + inheritance return string.Format("{0}{1}{2}", settings.SectionStartChar, (section.Base != null) ? section.ToString() + settings.InheritanceChar + section.Base.ToString() : section.ToString(), settings.SectionEndChar); }
public Section(string name, Section inheritedFrom, Dictionary<string, KeyValue> pairs) : this(name, inheritedFrom, pairs, null) { }