PostSharp6.6//API Reference/Post­Sharp.​Patterns.​Diagnostics Namespace/ILog­Activity Interface

ILogActivity Interface

Exposes the public API of the generic value type LogActivity<TActivityDescription>.

Namespace:  PostSharp.Patterns.Diagnostics
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 6.6.10.0 (6.6.10.0)
Syntax
C#
public interface ILogActivity : IDisposable

The ILogActivity type exposes the following members.

Properties
  NameDescription
Public propertyContext
Gets the ILoggingContext corresponding to the current activity.
Methods
  NameDescription
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
Closes the activity with an Exception.
Public methodSetOutcome<TMessage>
Closes the activity and sets its outcome.
Public methodSetResult<TResult>
Closes the activity with success and sets includes a result in the outcome message.
Public methodSetSuccess
Closes the activity with success and sets no other outcome message than Succeeded.
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