public SectionPackage(string classIdentifier, SectionPackage[] childs) : base(classIdentifier) { this.childs = new List<SectionPackage>(childs); }
private SectionPackage[] MakeMultiSection(string sectionName) { SectionPackage[] babies1_1 = new SectionPackage[] { MakeSection("section", "A", "男", new SectionPackage[] {}), MakeSection("section", "B", "山", new SectionPackage[] {}), MakeSection("section", "C", "皮", new SectionPackage[] {}) }; SectionPackage[] babies2_1 = new SectionPackage[] { MakeSection("section", "D", "ひげ", new SectionPackage[] {}) }; SectionPackage[] childs1 = new SectionPackage[] { MakeSection("section", "a", "hoge", babies1_1), MakeSection("section", "b", "puyo", new SectionPackage[] {}), MakeSection("section", "c", "moe", new SectionPackage[] {}) }; SectionPackage[] childs2 = new SectionPackage[] { MakeSection("section", "d", "age", babies2_1), MakeSection("section", "e", "dofu", new SectionPackage[] {}), MakeSection("section", "f", "mobu", new SectionPackage[] {}) }; SectionPackage[] sections = new SectionPackage[] { MakeSection("section", "1", "あ", childs1), MakeSection("section", "2", "い", childs2), MakeSection("section", "3", "う", new SectionPackage[] {}) }; return sections; }
private SectionPackage MakeSection(string sectionName, string title, string caption, SectionPackage[] childs) { SectionPackage pack = new SectionPackage(sectionName, childs); pack["Title"] = title; pack["Caption"] = caption; return pack; }
public void PartSectionHowto1() { SectionPackage[] sections = new SectionPackage[] { MakeSection("section", "1", "あ", new SectionPackage[] {}), MakeSection("section", "2", "い", new SectionPackage[] {}), MakeSection("section", "3", "う", new SectionPackage[] {}) }; PartPackage part = MakePart("howto", "はうつー"); string result = StandardPart.RenderSection(part, sections); Console.WriteLine(result); }