PostSharp6.1/API Reference/Post­Sharp.​Patterns.​Diagnostics Namespace/Log­Activity(TActivity­Description) Structure

LogActivity<TActivityDescription> Structure

Represents a logged custom activity, i.e. something that has a beginning and an end with a specific outcome. This class is instantiated by the new API of the LogSource class.

Namespace:  PostSharp.Patterns.Diagnostics
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 6.1.23.0 (6.1.23.0)
Syntax
C#
public readonly struct LogActivity<TActivityDescription> : ILogActivity, 
	IDisposable
where TActivityDescription : IMessage

Type Parameters

TActivityDescription

The LogActivity<TActivityDescription> type exposes the following members.

Properties
  NameDescription
Public propertyContext
Gets the ILoggingContext corresponding to the current activity.
Methods
  NameDescription
Public methodDispose
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Public methodResume
Resumes the current async activity after it has been suspended by a call to Suspend(). There is typically no need to invoke this method in user code because all async methods that use the Logger class are automatically instrumented.
Public methodSetException
Public methodSetOutcome<TMessage>
Public methodSetResult<TResult>
Public methodSetSuccess
Public methodSuspend
Suspends the current async activity. The activity must than be resumed by a call of the Resume() method. There is typically no need to invoke this method in user code because all async methods that use the Logger class are automatically instrumented.
See Also