PostSharp 6.8 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Diagnostics.​Contexts Namespace / Suspendable­Logging­Context Class / Suspendable­Logging­Context Methods

SuspendableLoggingContext Methods

The SuspendableLoggingContext type exposes the following members.

Methods
  NameDescription
Public methodCreateCorrelationCookie
Creates a cookie that can be used to correlate, using the SetCorrelation(CorrelationCookie) method, another context to the current context.
(Inherited from LoggingContext.)
Public methodDispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
(Inherited from LoggingContext.)
Protected methodDispose(Boolean)
Disposes the current object.
(Overrides LoggingContext.Dispose(Boolean).)
Public methodForEachProperty(LoggingPropertyVisitor<Object>, Boolean) Obsolete.
Invokes a delegate for each property defined in the current logging context and optionally in its ancestor contexts.
(Inherited from LoggingContext.)
Public methodForEachProperty<T>(LoggingPropertyVisitor<T>, T, Boolean) Obsolete.
Invokes a delegate for each property defined in the current logging context and optionally in its ancestor contexts, and specifies passes a state object to the delegate.
(Inherited from LoggingContext.)
Public methodGetCustomRecordBuilder
Gets a LogRecordBuilder for the current context to build a custom record.
(Inherited from LoggingContext.)
Protected methodGetExecutionContextData
Returns a new layer for the async stack that has this LoggingContext as the associated activity and current as the Parent, if a new layer is required.
(Inherited from LoggingContext.)
Public methodGetRecordBuilder
Gets a LogRecordBuilder for the current context to build a standard record for a given method.
(Inherited from LoggingContext.)
Public methodMakeSharable
Allows the current context to be shared beyond its normal lifecycle by preventing it from being returned to the pool.
(Inherited from LoggingContext.)
Public methodResume
Resumes the current context. Typically called when the state machine resumes execution, when the wait dependency is satisfied (in case of async methods) or when the MoveNext() method is called (in case of iterators).
Public methodResumeConditional
Resume the current context, but only if it is currently suspended.
Public methodSetCorrelation
Associates the current context with another context.
(Inherited from LoggingContext.)
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.
(Inherited from LoggingContext.)
Public methodSuspend
Suspends the current context. Typically called when starting to wait for a wait dependency (the operand of the await operator in case of async methods), or after the MoveNext() method (in case of iterators).
Public methodToString()
Returns a string that represents the current object.
(Inherited from LoggingContext.)
Protected methodToString(StringBuilder)
Formats a description of the current LoggingContext into a given StringBuilder.
(Overrides LoggingContext.ToString(StringBuilder).)
Public methodVisitProperties(Action<String, Object>, Boolean)
Invokes a delegate each property on the current context, and, optionally, for inherited properties in ancestor contexts. This offers a simple way to visit properties, but it has a performance overhead compared to VisitProperties<TState>(ILoggingPropertyVisitor<TState>, TState, LoggingPropertyVisitorOptions) because it is weakly typed and cause the allocation of a closure class to build the action. It also does not expose the LoggingPropertyOptions.
(Inherited from LoggingContext.)
Public methodVisitProperties<TState>(ILoggingPropertyVisitor<TState>, TState, LoggingPropertyVisitorOptions)
Invokes the Visit<TValue>(String, TValue, LoggingPropertyOptions, TState) method of an interface implementation for each property on the current context, and, optionally, for inherited properties in ancestor contexts.
(Inherited from LoggingContext.)
See Also