Share via


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

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

Namespace:  Microsoft.VisualStudio.Services.Integration
Assembly:  Microsoft.VisualStudio.Services.Integration (in Microsoft.VisualStudio.Services.Integration.dll)

Syntax

'Declaration
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
)
public:
virtual void SetContext(
    TfsTeamProjectCollection^ teamProjectCollection, 
    String^ project, 
    Guid teamId, 
    bool connectAsynchronously, 
    ActiveContextChangeReason reason, 
    bool promptOnError
) sealed
abstract SetContext : 
        teamProjectCollection:TfsTeamProjectCollection * 
        project:string * 
        teamId:Guid * 
        connectAsynchronously:bool * 
        reason:ActiveContextChangeReason * 
        promptOnError:bool -> unit  
override SetContext : 
        teamProjectCollection:TfsTeamProjectCollection * 
        project:string * 
        teamId:Guid * 
        connectAsynchronously:bool * 
        reason:ActiveContextChangeReason * 
        promptOnError:bool -> unit
public final 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 team, can be Guid.Empty.

Implements

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

.NET Framework Security

See Also

Reference

ContextManager Class

SetContext Overload

Microsoft.VisualStudio.Services.Integration Namespace