PostSharpAPI ReferencePost­Sharp.​Patterns.​Diagnostics.​Backends.​ConsoleConsole­Log­Record­Builder
Open sandboxFocus

ConsoleLogRecordBuilder Class

Inheritance
ConsoleLogRecordBuilder
Namespace: PostSharp.Patterns.Diagnostics.Backends.Console
Assembly: PostSharp.Patterns.Diagnostics.dll
Syntax
public class ConsoleLogRecordBuilder : TextLogRecordBuilder, ICustomLogRecordBuilder

Constructors

Name Description
ConsoleLogRecordBuilder(ConsoleLoggingBackend)

Initializes a new ConsoleLogRecordBuilder.

Properties

Name Description
BackendOptions

Gets the back-end options.

Methods

Name Description
AppendDelimiter()

Appends a Delimiter to the current StringBuilder.

AppendProlog()

Appends the indent string, context description, and the record kind to the current StringBuilder.

AppendSemanticParameter(SemanticParameterKind, String, String, String, Int32)

Appends a parameter of System.String type to the current StringBuilder. Back-ends that support semantic logging may store the parameter value semantically instead of appending it to the StringBuilder.

AppendSemanticParameter<T>(SemanticParameterKind, ArraySegment<Char>, T, IFormatter<T>, String, Int32)

Appends a parameter to the current StringBuilder, where the name is given as a ArraySegment<T>, and uses a specific formatter. Back-ends that support semantic logging may store the parameter value semantically instead of appending it to the StringBuilder.

AppendSemanticParameter<T>(SemanticParameterKind, String, T, IFormatter<T>, String, Int32)

Appends a parameter to the current StringBuilder, where the name is given as a System.String, and uses a specific formatter. Back-ends that support semantic logging may store the parameter value semantically instead of appending it to the StringBuilder. This method overload is strongly typed.

BeginThemedText(ConsoleThemeItem)

Sets the theme item for the next characters appended to the StringBuilder.

Dispose()

Finishes the logging of the current record. Calling this method does not actually make the current LogRecordBuilder unusable, but it makes it usable for a next record in the same thread.

EmitRecord()

Emits the record. Invoked by the Complete() method.

EndThemedText()

Resets the current theme to Text.

Reset()

Resets all fields and properties of the current LogRecordBuilder to their initial value. Invoked by the Complete() method.

Write()

Write the current log record to the console.

Write(UnsafeString)

Writes the final message to the back-end.