通过使用提供的服务器统一资源标识符 (URI)、项目名称和测试运行 ID 初始化 TcmContext 类的新实例。
命名空间:  Microsoft.VisualStudio.TestTools.Common
程序集:  Microsoft.VisualStudio.QualityTools.Common(在 Microsoft.VisualStudio.QualityTools.Common.dll 中)
语法
声明
Public Sub New ( _
    teamFoundationServerUri As Uri, _
    teamProjectName As String, _
    testRunId As Integer _
)
public TcmContext(
    Uri teamFoundationServerUri,
    string teamProjectName,
    int testRunId
)
public:
TcmContext(
    Uri^ teamFoundationServerUri, 
    String^ teamProjectName, 
    int testRunId
)
new : 
        teamFoundationServerUri:Uri * 
        teamProjectName:string * 
        testRunId:int -> TcmContext
public function TcmContext(
    teamFoundationServerUri : Uri, 
    teamProjectName : String, 
    testRunId : int
)
参数
- teamFoundationServerUri
 类型:System.Uri
 Team Foundation Server 的 URI。
- teamProjectName
 类型:System.String
 团队项目的名称。
- testRunId
 类型:System.Int32
 测试运行的数字 ID。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。