ITeamFoundationConnectionManager Interface

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)

Syntax

'Declaration
<GuidAttribute("E0E7F8CE-55C6-46A0-99A9-2F51EE1E60E0")> _
Public Interface ITeamFoundationConnectionManager
[GuidAttribute("E0E7F8CE-55C6-46A0-99A9-2F51EE1E60E0")]
public interface ITeamFoundationConnectionManager
[GuidAttribute(L"E0E7F8CE-55C6-46A0-99A9-2F51EE1E60E0")]
public interface class ITeamFoundationConnectionManager
[<GuidAttribute("E0E7F8CE-55C6-46A0-99A9-2F51EE1E60E0")>]
type ITeamFoundationConnectionManager =  interface end
public interface ITeamFoundationConnectionManager

The ITeamFoundationConnectionManager type exposes the following members.

Properties

  Name Description
Public property IsConnecting Returns true if an async connection is still running in the background.

Top

Methods

  Name Description
Public method CancelConnecting Cancels the async connection going on in the background.
Public method ClearDefaultConnection Use this method to clear the cache of the last connected server. This will cause Team Explorer to show as disconnected.
Public method Connect() Loads and connects to the last TF Context used in Visual Studio. (Does nothing if VS is already connected.)
Public method Connect(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

Events

  Name Description
Public event ConnectionCompleted This event fires whenever the TF Context changes and a connection to a new server is completed.
Public event ConnectionStarting This event fires whenever the TF Context changes and a connection to a new server is starting.

Top

See Also

Reference

Microsoft.VisualStudio.Services.Integration Namespace