PostSharp6.1/API Reference/Post­Sharp.​Patterns.​Diagnostics.​Contexts Namespace/Logging­Context Class/Logging­Context Methods

LoggingContext Methods

The LoggingContext type exposes the following members.

Public methodCreateCorrelationCookie
Creates a cookie that can be used to correlate, using the SetCorrelation(CorrelationCookie) method, another context to the current context.
Public methodDispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Protected methodDispose(Boolean)
Disposes the current object.
Public methodForEachProperty(LoggingPropertyVisitor<Object>, Boolean)
Invokes a delegate for each property defined in the current logging context and optionally in its ancestor contexts.
Public methodForEachProperty<T>(LoggingPropertyVisitor<T>, T, Boolean)
Public methodGetCustomRecordBuilder
Gets a LogRecordBuilder for the current context to build a custom record.
Public methodGetRecordBuilder
Gets a LogRecordBuilder for the current context to build a standard record for a given method.
Public methodMakeSharable
Allows the current context to be shared beyond its normal lifecycle by preventing it from being returned to the pool.
Public methodSetCorrelation
Associates the current context with another context.
Public methodSetWaitDependency
Sets the wait dependency for the current context, i.e. sets a representation of what the current context is waiting for. This operation is available only in custom contexts.
Public methodToString()
Returns a string that represents the current object.
(Overrides Object.ToString().)
Protected methodToString(StringBuilder)
Formats a description of the current LoggingContext into a given StringBuilder.
See Also