ITraceWriterExtensions.TraceBeginEnd Method (ITraceWriter, HttpRequestMessage, String, TraceLevel, String, String, Action<TraceRecord>, Action, Action<TraceRecord>, Action<TraceRecord>)


Traces both a begin and an end trace around a specified operation.

Namespace:   System.Web.Http.Tracing
Assembly:  System.Web.Http (in System.Web.Http.dll)


public static void TraceBeginEnd(
    this ITraceWriter traceWriter,
    HttpRequestMessage request,
    string category,
    TraceLevel level,
    string operatorName,
    string operationName,
    Action<TraceRecord> beginTrace,
    Action execute,
    Action<TraceRecord> endTrace,
    Action<TraceRecord> errorTrace
static void TraceBeginEnd(
    ITraceWriter^ traceWriter,
    HttpRequestMessage^ request,
    String^ category,
    TraceLevel level,
    String^ operatorName,
    String^ operationName,
    Action<TraceRecord^>^ beginTrace,
    Action^ execute,
    Action<TraceRecord^>^ endTrace,
    Action<TraceRecord^>^ errorTrace
static member TraceBeginEnd : 
        traceWriter:ITraceWriter *
        request:HttpRequestMessage *
        category:string *
        level:TraceLevel *
        operatorName:string *
        operationName:string *
        beginTrace:Action<TraceRecord> *
        execute:Action *
        endTrace:Action<TraceRecord> *
        errorTrace:Action<TraceRecord> -> unit
Public Shared Sub TraceBeginEnd (
    traceWriter As ITraceWriter,
    request As HttpRequestMessage,
    category As String,
    level As TraceLevel,
    operatorName As String,
    operationName As String,
    beginTrace As Action(Of TraceRecord),
    execute As Action,
    endTrace As Action(Of TraceRecord),
    errorTrace As Action(Of TraceRecord)


  • category
    Type: System.String

    The logical category of the trace.

  • operatorName
    Type: System.String

    The name of the object performing the operation. It may be null.

  • operationName
    Type: System.String

    The name of the operation being performed. It may be null.

  • execute
    Type: System.Action

    An <see cref="T:System.Func`1" /> that returns the Task that will perform the operation.

See Also

ITraceWriterExtensions Class
System.Web.Http.Tracing Namespace

Return to top