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

Creates and sets the new ITeamFoundationContext for the Team Explorer window.

Namespace:  Microsoft.TeamFoundation.Client
Assembly:  Microsoft.TeamFoundation.Client (in Microsoft.TeamFoundation.Client.dll)

Syntax

'Declaration
Sub SetContext ( _
    teamProjectCollection As TfsTeamProjectCollection, _
    project As String, _
    teamId As Guid, _
    connectAsynchronously As Boolean, _
    reason As ActiveContextChangeReason, _
    promptOnError As Boolean _
)
void SetContext(
    TfsTeamProjectCollection teamProjectCollection,
    string project,
    Guid teamId,
    bool connectAsynchronously,
    ActiveContextChangeReason reason,
    bool promptOnError
)
void SetContext(
    TfsTeamProjectCollection^ teamProjectCollection, 
    String^ project, 
    Guid teamId, 
    bool connectAsynchronously, 
    ActiveContextChangeReason reason, 
    bool promptOnError
)
abstract SetContext : 
        teamProjectCollection:TfsTeamProjectCollection * 
        project:string * 
        teamId:Guid * 
        connectAsynchronously:bool * 
        reason:ActiveContextChangeReason * 
        promptOnError:bool -> unit
function SetContext(
    teamProjectCollection : TfsTeamProjectCollection, 
    project : String, 
    teamId : Guid, 
    connectAsynchronously : boolean, 
    reason : ActiveContextChangeReason, 
    promptOnError : boolean
)

Parameters

  • project
    Type: System.String

    The team project name or fully qualified Uri, can be null.

  • teamId
    Type: System.Guid

    The id of the TeamFoundationTeam object to set as the current team, can be Guid.Empty.

  • connectAsynchronously
    Type: System.Boolean

    set to false if you want to wait for the connection to finish

  • promptOnError
    Type: System.Boolean

    set to false to avoid prompting the user about an error

.NET Framework Security

See Also

Reference

ITeamFoundationContextManager2 Interface

SetContext Overload

Microsoft.TeamFoundation.Client Namespace