共用方式為


TeamFoundationTracingExtensionMethods.TraceBlock<T> 方法 (TeamFoundationRequestContext, Int32, Int32, Int32, String, String, String, Func<T>)

命名空間:  Microsoft.TeamFoundation.Framework.Server
組件:  Microsoft.TeamFoundation.Framework.Server (在 Microsoft.TeamFoundation.Framework.Server.dll 中)

語法

'宣告
<ExtensionAttribute> _
Public Shared Function TraceBlock(Of T) ( _
    requestContext As TeamFoundationRequestContext, _
    enterTracepoint As Integer, _
    leaveTracepoint As Integer, _
    exceptionTracepoint As Integer, _
    area As String, _
    layer As String, _
    methodName As String, _
    action As Func(Of T) _
) As T
public static T TraceBlock<T>(
    this TeamFoundationRequestContext requestContext,
    int enterTracepoint,
    int leaveTracepoint,
    int exceptionTracepoint,
    string area,
    string layer,
    string methodName,
    Func<T> action
)

類型參數

  • T

參數

傳回值

類型:T

使用注意事項

在 Visual Basic 和 C# 中,您可以在任何 TeamFoundationRequestContext 類型物件中呼叫這個方法以做為執行個體。使用執行個體方法語法呼叫這個方法時,請省略第一個參數。如需詳細資訊,請參閱 擴充方法 (Visual Basic)擴充方法 (C# 程式設計手冊)

.NET Framework 安全性

請參閱

參考

TeamFoundationTracingExtensionMethods 類別

TraceBlock 多載

Microsoft.TeamFoundation.Framework.Server 命名空間