ContextManager.SetContext 方法 (TfsTeamProjectCollection, String, Guid, Boolean, ActiveContextChangeReason, Boolean)

创建一个并设置团队资源管理器窗口的新 ITeamFoundationContext。

命名空间:  Microsoft.VisualStudio.Services.Integration
程序集:  Microsoft.VisualStudio.Services.Integration(在 Microsoft.VisualStudio.Services.Integration.dll 中)

语法

声明
Public Sub SetContext ( _
    teamProjectCollection As TfsTeamProjectCollection, _
    project As String, _
    teamId As Guid, _
    connectAsynchronously As Boolean, _
    reason As ActiveContextChangeReason, _
    promptOnError As Boolean _
)
public void SetContext(
    TfsTeamProjectCollection teamProjectCollection,
    string project,
    Guid teamId,
    bool connectAsynchronously,
    ActiveContextChangeReason reason,
    bool promptOnError
)

参数

  • project
    类型:System.String
    团队项目名称或完全限定的 URI,可以为空。
  • teamId
    类型:System.Guid
    团队的 ID,可以是 Guid.Empty。

实现

ITeamFoundationContextManager2.SetContext(TfsTeamProjectCollection, String, Guid, Boolean, ActiveContextChangeReason, Boolean)

.NET Framework 安全性

请参阅

参考

ContextManager 类

SetContext 重载

Microsoft.VisualStudio.Services.Integration 命名空间