protected override void Visit(ParentLiteralChunk chunk) { Debug.Assert(chunk.Children.Count > 1); if (Context.Host.DesignTimeMode) { // Skip generating the chunk if we're in design time or if the chunk is empty. return; } var text = chunk.GetText(); if (Context.Host.EnableInstrumentation) { var start = chunk.Start.AbsoluteIndex; Writer.WriteStartInstrumentationContext(Context, start, text.Length, isLiteral: true); } RenderStartWriteLiteral(text); if (Context.Host.EnableInstrumentation) { Writer.WriteEndInstrumentationContext(Context); } }
protected override void Visit(ParentLiteralChunk chunk) { var text = chunk.GetText(); if (string.IsNullOrEmpty(text)) { return; } var renderHtml = new RenderHtml { Html = text, DocumentLocation = CreateMappingLocation(chunk.Start, chunk.Children.Sum(child => child.Association?.Length ?? 0)), }; _context.Builder.Add(renderHtml); }
protected virtual void Visit(ParentLiteralChunk chunk) { }
protected override void Visit(ParentLiteralChunk chunk) { RenderCode(chunk.GetText(), chunk.Start); }
protected override void Visit(ParentLiteralChunk chunk) { }
protected abstract void Visit(ParentLiteralChunk chunk);