共用方式為


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

建立和設定 Team 總管視窗的新 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
    Team 專案名稱或完整 URI,則為空的。
  • teamId
    類型:System.Guid
    小組的 ID,可能是 Guid.Empty。

實作

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

.NET Framework 安全性

請參閱

參考

ContextManager 類別

SetContext 多載

Microsoft.VisualStudio.Services.Integration 命名空間