ITeamFoundationContextManager2.SetContext Method (String, 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 ( _
teamProjectCollectionUri As String, _
project As String, _
teamId As Guid, _
connectAsynchronously As Boolean, _
reason As ActiveContextChangeReason, _
promptOnError As Boolean _
)
void SetContext(
string teamProjectCollectionUri,
string project,
Guid teamId,
bool connectAsynchronously,
ActiveContextChangeReason reason,
bool promptOnError
)
void SetContext(
String^ teamProjectCollectionUri,
String^ project,
Guid teamId,
bool connectAsynchronously,
ActiveContextChangeReason reason,
bool promptOnError
)
abstract SetContext :
teamProjectCollectionUri:string *
project:string *
teamId:Guid *
connectAsynchronously:bool *
reason:ActiveContextChangeReason *
promptOnError:bool -> unit
function SetContext(
teamProjectCollectionUri : String,
project : String,
teamId : Guid,
connectAsynchronously : boolean,
reason : ActiveContextChangeReason,
promptOnError : boolean
)
Parameters
- teamProjectCollectionUri
Type: System.String
- project
Type: System.String
teamId
Type: System.GuidThe id of the TeamFoundationTeam object to set as the current team, can be Guid.Empty.
connectAsynchronously
Type: System.Booleanset to false if you want to wait for the connection to finish
reason
Type: Microsoft.TeamFoundation.Client.ActiveContextChangeReasonspecify the reason for the context change
promptOnError
Type: System.Booleanset to false to avoid prompting the user about an error
.NET Framework Security
- 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.