PostSharp.ILAPI ReferencePost­Sharp.​Patterns.​DiagnosticsILog­Activity
Open sandboxFocus

ILogActivity Interface

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

Namespace: PostSharp.Patterns.Diagnostics
Assembly: PostSharp.Patterns.Common.dll
Syntax
public interface ILogActivity

Properties

Name Description
Context

Gets the ILoggingContext corresponding to the current activity.

Methods

Name Description
Resume()

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.

Resume(ref CallerInfo)
SetException(Exception, in CloseActivityOptions)

Closes the activity with an System.Exception.

SetException(Exception, in CloseActivityOptions, ref CallerInfo)
SetOutcome<TMessage>(LogLevel, in TMessage, Exception, in CloseActivityOptions)

Closes the activity and sets its outcome.

SetOutcome<TMessage>(LogLevel, in TMessage, Exception, in CloseActivityOptions, ref CallerInfo)
SetResult<TResult>(TResult, in CloseActivityOptions)

Closes the activity with success and sets includes a result in the outcome message.

SetResult<TResult>(TResult, in CloseActivityOptions, ref CallerInfo)
SetSuccess(in CloseActivityOptions)

Closes the activity with success and sets no other outcome message than Succeeded.

SetSuccess(in CloseActivityOptions, ref CallerInfo)
Suspend()

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.

Suspend(ref CallerInfo)