Render() 공개 추상적인 메소드

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.
리턴 void
예제 #1
0
 void RenderOutputToken(Palette palette, MessageTemplateToken outputToken, IReadOnlyDictionary<string, LogEventPropertyValue> outputProperties, TextWriter output)
 {
     SetBaseColors(palette);
     outputToken.Render(outputProperties, output, _formatProvider);
 }
예제 #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);
     }
 }