C# Class NLog.Internal.StringBuilderExt

Helpers for StringBuilder, which is used in e.g. layout renderers.
Exibir arquivo Open project: NLog/NLog

Public Methods

Method Description
Append ( this builder, object o, LogEventInfo logEvent, LoggingConfiguration configuration ) : void

Append a value and use formatProvider of logEvent or configuration to convert to string.

AppendInvariant ( this builder, int value ) : void

Appends int without using culture, and most importantly without garbage

AppendInvariant ( this builder, uint value ) : void

Appends uint without using culture, and most importantly without garbage Credits Gavin Pugh - http://www.gavpugh.com/2010/04/01/xnac-avoiding-garbage-when-working-with-stringbuilder/

ClearBuilder ( this builder ) : void

Clears the provider StringBuilder

Method Details

Append() public static method

Append a value and use formatProvider of logEvent or configuration to convert to string.
public static Append ( this builder, object o, LogEventInfo logEvent, LoggingConfiguration configuration ) : void
builder this
o object value to append.
logEvent LogEventInfo current logEvent for FormatProvider.
configuration NLog.Config.LoggingConfiguration Configuration for DefaultCultureInfo
return void

AppendInvariant() public static method

Appends int without using culture, and most importantly without garbage
public static AppendInvariant ( this builder, int value ) : void
builder this
value int value to append
return void

AppendInvariant() public static method

Appends uint without using culture, and most importantly without garbage Credits Gavin Pugh - http://www.gavpugh.com/2010/04/01/xnac-avoiding-garbage-when-working-with-stringbuilder/
public static AppendInvariant ( this builder, uint value ) : void
builder this
value uint value to append
return void

ClearBuilder() public static method

Clears the provider StringBuilder
public static ClearBuilder ( this builder ) : void
builder this
return void