void IGrammarVisitor.EmbeddedSection(EmbeddedSection section, IStep step) { grammarTag.AddClasses(GrammarConstants.EMBEDDED, GrammarConstants.SECTION) .MetaData(GrammarConstants.LEAF_NAME, section.LeafName) .MetaData(GrammarConstants.FIXTURE, section.Fixture.Name) .MetaData(GrammarConstants.AUTO_SELECT_KEY, section.Fixture.Policies.AutoSelectGrammarKey) .MetaData(GrammarConstants.SELECTION_MODE, section.Fixture.Policies.SelectionMode.ToString()); var header = new HeaderTag(); if (section.IsTitled()) { header.Titled(section.Title); } grammarTag.Child(header); grammarTag.Child(new HolderTag(section.Fixture)); if (section.Fixture.Policies.SelectionMode == SelectionMode.MandatoryAutoSelect) return; HtmlTag selector = new GrammarSelector(section.Fixture).Build(); grammarTag.Child(selector); }
void IGrammarVisitor.Paragraph(Paragraph paragraph, IStep step) { grammarTag.AddClasses(GrammarConstants.PARAGRAPH, paragraph.Style.ToString()); var header = new HeaderTag(); grammarTag.Child(header); if (paragraph.Style == EmbedStyle.TitledAndIndented) { header.Titled(paragraph.Title); } paragraph.ForEachGrammar(g => { var tag = new GrammarTag(g); grammarTag.Child(tag); _grammarTags.Do(tag, () => g.AcceptVisitor(this, new Step())); }); }