PostSharpAPI ReferencePost­Sharp.​Patterns.​Diagnostics.​CustomLog­Level­SourceOpen­Activity
Open sandboxFocus

LogLevelSource.OpenActivity Method

OpenActivity<T>(in T, in OpenActivityOptions)

Opens an activity.

Declaration
public LogActivity<T> OpenActivity<T>(in T description, in OpenActivityOptions options = null)
where T : IMessage
Parameters
Type Name Description
T description

The activity description, typically created using the SemanticMessageBuilder or FormattedMessageBuilder class.

OpenActivityOptions options

Options.

Returns
Type Description
LogActivity<T>

A Logger representing the new activity.

Type Parameters
Name Description
T
Remarks

The activity must be closed using SetSuccess(String), SetFailure(String) or SetException(Exception).

OpenActivity<T>(in T, in OpenActivityOptions, ref CallerInfo)

Declaration
public LogActivity<T> OpenActivity<T>(in T description, in OpenActivityOptions options, ref CallerInfo callerInfo)
where T : IMessage
Parameters
Type Name Description
T description
OpenActivityOptions options
CallerInfo callerInfo
Returns
Type Description
LogActivity<T>
Type Parameters
Name Description
T