TeamFoundationTracingExtensionMethods.TraceBlock Method (TeamFoundationRequestContext, Int32, Int32, String, String, String)
Calls requestContext.TraceEnter method and returns an IDisposable instance for the requestContext.TraceLeave call. This method call must be wrapped with a using statement. IDisposable.Dispose method is not thread safe. The caller needs to do synchronization if it wants to share IDisposable isntance with other threads.
Namespace: Microsoft.TeamFoundation.Framework.Server
Assembly: Microsoft.TeamFoundation.Framework.Server (in Microsoft.TeamFoundation.Framework.Server.dll)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function TraceBlock ( _
requestContext As TeamFoundationRequestContext, _
startTracepoint As Integer, _
endTracepoint As Integer, _
area As String, _
layer As String, _
methodName As String _
) As IDisposable
public static IDisposable TraceBlock(
this TeamFoundationRequestContext requestContext,
int startTracepoint,
int endTracepoint,
string area,
string layer,
string methodName
)
[ExtensionAttribute]
public:
static IDisposable^ TraceBlock(
TeamFoundationRequestContext^ requestContext,
int startTracepoint,
int endTracepoint,
String^ area,
String^ layer,
String^ methodName
)
static member TraceBlock :
requestContext:TeamFoundationRequestContext *
startTracepoint:int *
endTracepoint:int *
area:string *
layer:string *
methodName:string -> IDisposable
public static function TraceBlock(
requestContext : TeamFoundationRequestContext,
startTracepoint : int,
endTracepoint : int,
area : String,
layer : String,
methodName : String
) : IDisposable
Parameters
- requestContext
Type: Microsoft.TeamFoundation.Framework.Server.TeamFoundationRequestContext
- startTracepoint
Type: System.Int32
- endTracepoint
Type: System.Int32
- area
Type: System.String
- layer
Type: System.String
- methodName
Type: System.String
Return Value
Type: System.IDisposable
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.