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
- requestContext
Type: Microsoft.TeamFoundation.Framework.Server.TeamFoundationRequestContext
- enterTracepoint
Type: System.Int32
- leaveTracepoint
Type: System.Int32
- exceptionTracepoint
Type: System.Int32
- area
Type: System.String
- layer
Type: System.String
- methodName
Type: System.String
- action
Type: System.Action
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.