PostSharp6.3/API Reference/Post­Sharp.​Patterns.​Diagnostics.​Record­Builders Namespace/Log­Record­Builder Class/Log­Record­Builder Methods

LogRecordBuilder Methods

The LogRecordBuilder type exposes the following members.

Methods
  NameDescription
Public methodBeginCustomRecord
Initializes the current LogRecordBuilder to emit a custom record.
Public methodBeginRecord
Initializes the current LogRecordBuilder to emit a standard (i.e. non-custom) record for a given context and method.
Public methodBeginWriteItem
Public methodComplete
Emits the record and resets the current LogRecordBuilder. This method invoked after all SetThis<T>(T), SetParameter<T>(Int32, String, ParameterKind, String, T) and similar methods have been called.
Public methodDispose
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.
Protected methodEmitRecord
Emits the record. Invoked by the Complete() method.
Public methodEndWriteItem
Ends building a specified item.
Public methodForEachProperty(LoggingPropertyVisitor<Object>)
Invokes a delegate for each property defined in the current log record.
Public methodForEachProperty<T>(LoggingPropertyVisitor<T>, T)
Invokes a delegate for each property defined in the current log record.
Protected methodReset
Resets all fields and properties of the current LogRecordBuilder to their initial value. Invoked by the Complete() method.
Public methodSetException
Sets the exception for the method or activity.
Public methodSetExecutionTime
Sets the method or activity execution time.
Public methodSetMethodGenericParameter<T>
Not implemented.
Public methodSetParameter<T>(Int32, String, ParameterKind, String, T)
Sets the value of a given parameter and uses the default formatter.
Public methodSetParameter<T>(Int32, String, ParameterKind, String, T, IFormatter<T>)
Sets the value of a given parameter and specifies the Formatter<T>.
Public methodSetReturnValue<T>(Int32, String, String, T)
Sets a given return value (there can be several return values in C# 7.0) and uses the default formatter.
Public methodSetReturnValue<T>(Int32, String, String, T, IFormatter<T>)
Sets a given return value (there can be several return values in C# 7.0) and uses a given formatter.
Public methodSetThis<T>(T)
Sets the this (instance) value and uses the default formatter. This method is only invoked if the IncludeThisValue property is true.
Public methodSetThis<T>(T, IFormatter<T>)
Sets the this (instance) value and uses a given formatter.
Public methodSetTypeGenericParameter<T>
Not implemented.
Public methodWriteCustomParameter<T>(Int32, ArraySegment<Char>, T)
Writes a custom parameter (passed as an ArraySegment<char>) and uses the default formatter.
Public methodWriteCustomParameter<T>(Int32, CharSpan, T, CustomLogParameterOptions)
Writes a custom parameter (passed as an CharSpan) and uses the default formatter.
Public methodWriteCustomParameter<T>(Int32, ArraySegment<Char>, T, IFormatter<T>)
Writes a custom parameter (passed as an ArraySegment<char>) and uses a given formatter.
Public methodWriteCustomParameter<T>(Int32, CharSpan, T, CustomLogParameterOptions, IFormatter<T>)
Public methodWriteCustomString(ArraySegment<Char>)
Write a custom string passed as an ArraySegment<char>.
Public methodWriteCustomString(CharSpan)
See Also