This documentation is archived and is not being maintained.

ITeamFoundationConnectionManager Interface

Visual Studio 2013

Use this service to connect to the default TF context, to prompt the user for context info, to check the status of the connection, cancel the connection, or respond to connection events.

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

[GuidAttribute(L"E0E7F8CE-55C6-46A0-99A9-2F51EE1E60E0")]
public interface class ITeamFoundationConnectionManager

The ITeamFoundationConnectionManager type exposes the following members.

  NameDescription
Public propertyIsConnectingReturns true if an async connection is still running in the background.
Top

  NameDescription
Public methodCancelConnectingCancels the async connection going on in the background.
Public methodClearDefaultConnectionUse this method to clear the cache of the last connected server. This will cause Team Explorer to show as disconnected.
Public methodConnect()Loads and connects to the last TF Context used in Visual Studio. (Does nothing if VS is already connected.)
Public methodConnect(TeamProjectPickerMode, Boolean)Prompts the user to select the TF Context they want to connect to. The mode parameter determines at what level the context is needed (TP, collection, etc). Make sure to pass true for async so that the actual connection and authentication will be done in the background and not block VS.
Top

  NameDescription
Public eventConnectionCompletedThis event fires whenever the TF Context changes and a connection to a new server is completed.
Public eventConnectionStartingThis event fires whenever the TF Context changes and a connection to a new server is starting.
Top
Show: