Freigeben über


TeamFoundationTracingExtensionMethods.TraceBlock Method (TeamFoundationRequestContext, Int32, Int32, Int32, String, String, String, Action)

Wraps an action with TraceEnter and TraceLeave methods. When there is an exception it TraceException too.

Namespace:  Microsoft.TeamFoundation.Framework.Server
Assembly:  Microsoft.TeamFoundation.Framework.Server (in Microsoft.TeamFoundation.Framework.Server.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Sub TraceBlock ( _
    requestContext As TeamFoundationRequestContext, _
    enterTracepoint As Integer, _
    leaveTracepoint As Integer, _
    exceptionTracepoint As Integer, _
    area As String, _
    layer As String, _
    methodName As String, _
    action As Action _
)
public static void TraceBlock(
    this TeamFoundationRequestContext requestContext,
    int enterTracepoint,
    int leaveTracepoint,
    int exceptionTracepoint,
    string area,
    string layer,
    string methodName,
    Action action
)
[ExtensionAttribute]
public:
static void TraceBlock(
    TeamFoundationRequestContext^ requestContext, 
    int enterTracepoint, 
    int leaveTracepoint, 
    int exceptionTracepoint, 
    String^ area, 
    String^ layer, 
    String^ methodName, 
    Action^ action
)
static member TraceBlock : 
        requestContext:TeamFoundationRequestContext * 
        enterTracepoint:int * 
        leaveTracepoint:int * 
        exceptionTracepoint:int * 
        area:string * 
        layer:string * 
        methodName:string * 
        action:Action -> unit
public static function TraceBlock(
    requestContext : TeamFoundationRequestContext, 
    enterTracepoint : int, 
    leaveTracepoint : int, 
    exceptionTracepoint : int, 
    area : String, 
    layer : String, 
    methodName : String, 
    action : Action
)

Parameters

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type TeamFoundationRequestContext. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

.NET Framework Security

See Also

Reference

TeamFoundationTracingExtensionMethods Class

TraceBlock Overload

Microsoft.TeamFoundation.Framework.Server Namespace