Logger.OpenActivity Method (LogActivityOptions, String, Object[]) |
Opens a custom activity with an array of parameters. The activity must be synchronous, i.e. must fully execute on the same thread and must not be
interrupted by an await or yield return operator.
Namespace: PostSharp.Patterns.Diagnostics
Assembly: PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 5.0.55.0 (5.0.55.0)
C#
public LogActivity OpenActivity( LogActivityOptions options, string text, params Object[] args )
Parameters
- options
- Type: PostSharp.Patterns.Diagnostics.LogActivityOptions
- text
- Type: System.String
The description of the activity, including parameters (e.g. Writing {LineCount} line(s) in file {Path}.) - args
- Type: System.Object[]
An array of parameters.
Return Value
Type: LogActivityA Logger representing the new activity.
The activity must be closed using [!:SetSuccess(string)], [!:SetFailure(String)] or [!:SetException(Exception)].