Share via


TeamFoundationTracingExtensionMethods.TraceBlock 方法 (TeamFoundationRequestContext, Int32, Int32, Int32, String, String, String, Action)

将使用 TraceEnter 和 TraceLeave 方法的事件。 当也是与异常它 TraceException。

命名空间:  Microsoft.TeamFoundation.Framework.Server
程序集:  Microsoft.TeamFoundation.Framework.Server(在 Microsoft.TeamFoundation.Framework.Server.dll 中)

语法

声明
<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
)

参数

使用说明

在 Visual Basic 和 C# 中,可以在 TeamFoundationRequestContext 类型的任何对象上将此方法作为实例方法来调用。当使用实例方法语法调用此方法时,请省略第一个参数。有关详细信息,请参阅扩展方法 (Visual Basic)扩展方法(C# 编程指南)

.NET Framework 安全性

请参阅

参考

TeamFoundationTracingExtensionMethods 类

TraceBlock 重载

Microsoft.TeamFoundation.Framework.Server 命名空间