This documentation is archived and is not being maintained.
ITeamFoundationContextManager2::SetContext Method (TfsTeamProjectCollection, String, Guid, Boolean, ActiveContextChangeReason, Boolean)
Visual Studio 2013
Creates and sets the new ITeamFoundationContext for the Team Explorer window.
Namespace: Microsoft.TeamFoundation.Client
Assembly: Microsoft.TeamFoundation.Client (in Microsoft.TeamFoundation.Client.dll)
void SetContext( TfsTeamProjectCollection^ teamProjectCollection, String^ project, Guid teamId, bool connectAsynchronously, ActiveContextChangeReason reason, bool promptOnError )
Parameters
- teamProjectCollection
- Type: Microsoft.TeamFoundation.Client::TfsTeamProjectCollection
The team project collection, can be null.
- 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
- reason
- Type: Microsoft.TeamFoundation.Client::ActiveContextChangeReason
specify the reason for the context change
- promptOnError
- Type: System::Boolean
set to false to avoid prompting the user about an error
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
Show: