public override void VisitBlock(Block block) { if (block.Length > 0) { var contentPart = content.Substring(block.Start.AbsoluteIndex, block.Length); var type = block.Type; VisitEnter(block, contentPart); currentBlockType = type; switch (type) { case BlockType.Markup: if (this.RootNode == null) { this.RootNode = new RootNode(block, contentPart); this.Push(this.RootNode); } else { var markupNode = new MarkupBlockNode(block, contentPart); AddPush(markupNode); } break; case BlockType.Comment: var commentNode = new CommentNode(block, contentPart); AddPush(commentNode); break; case BlockType.Statement: break; case BlockType.Expression: if (contentPart == "@model") { enterAtModel = true; } else { enterExpression = true; } break; case BlockType.Section: var name = ((SectionCodeGenerator)block.CodeGenerator).SectionName; SectionNode sectionNode; if (name == "CustomScripts") { sectionNode = new CustomScriptsSectionNode(block, contentPart, name); enterScriptsSection = true; } else { sectionNode = new SectionNode(block, contentPart, name); } AddPush(sectionNode); break; case BlockType.Directive: break; default: DebugUtils.Break(); break; } } base.VisitBlock(block); }
public virtual void VisitMarkupBlock(MarkupBlockNode markupBlockNode) { this.ThrowIfCanceled(); VisitChildren(markupBlockNode); }
public override void VisitMarkupBlock(MarkupBlockNode markupBlockNode) { base.VisitMarkupBlock(markupBlockNode); }