PostSharpAPI ReferencePost­Sharp.​Patterns.​Diagnostics.​Adapters.​Diagnostic­SourceIDiagnostic­Source­Activity­Filter
Open sandboxFocus

IDiagnosticSourceActivityFilter Interface

Determines how activities from a DiagnosticListener are translated into a PostSharp Logging activity.

Namespace: PostSharp.Patterns.Diagnostics.Adapters.DiagnosticSource
Assembly: PostSharp.Patterns.Diagnostics.Adapters.DiagnosticSource.dll
Syntax
public interface IDiagnosticSourceActivityFilter

Methods

Name Description
CloseActivity(ILogActivity, Object)

Method called by DiagnosticSourceCollectingListener when a message suffixed .Start is captured. Should close the activity.

OpenActivity(LogLevelSource, String, ref CallerInfo, Object)

Method called by DiagnosticSourceCollectingListener when a message suffixed .Start is captured. Should open an activity and return it.

TryGetCorrelationKey(Object, out Object)

Method called by DiagnosticSourceCollectingListener when a message suffixed .Start or .Stop is captured. The implementation must return the correlation object, i.e. a property of the message that is identical for both the start and the stop messages. This correlation key allows to pair the messages as a single activity. When the implementation returns null, no activity is created.