This documentation is archived and is not being maintained.

ITeamFoundationContextManager2::SetContext Method (String, 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(
	String^ teamProjectCollectionUri, 
	String^ project, 
	Guid teamId, 
	bool connectAsynchronously, 
	ActiveContextChangeReason reason, 
	bool promptOnError
)

Parameters

teamProjectCollectionUri
Type: System::String
project
Type: System::String
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

Show: