Render() public abstract method

Render the token to the output.
public abstract Render ( LogEventPropertyValue>.IReadOnlyDictionary properties, TextWriter output, IFormatProvider formatProvider = null ) : void
properties LogEventPropertyValue>.IReadOnlyDictionary Properties that may be represented by the token.
output System.IO.TextWriter Output for the rendered string.
formatProvider IFormatProvider Supplies culture-specific formatting information, or null.
return void
Exemplo n.º 1
0
 void RenderOutputToken(Palette palette, MessageTemplateToken outputToken, IReadOnlyDictionary<string, LogEventPropertyValue> outputProperties, TextWriter output)
 {
     SetBaseColors(palette);
     outputToken.Render(outputProperties, output, _formatProvider);
 }
Exemplo n.º 2
0
 void RenderExceptionToken(Palette palette, MessageTemplateToken outputToken, IReadOnlyDictionary<string, LogEventPropertyValue> outputProperties, TextWriter output)
 {
     var sw = new StringWriter();
     outputToken.Render(outputProperties, sw, _formatProvider);
     var lines = new StringReader(sw.ToString());
     string nextLine;
     while ((nextLine = lines.ReadLine()) != null)
     {
         if (nextLine.StartsWith(StackFrameLinePrefix))
             SetBaseColors(palette);
         else
             SetHighlightColors(palette);
         output.WriteLine(nextLine);
     }
 }