Bagikan melalui


TfsConfigurationServer Constructor (RegisteredConfigurationServer)

Initializes a new instance of the TfsConfigurationServer object by using the registration information on the local computer.

Namespace:  Microsoft.TeamFoundation.Client
Assembly:  Microsoft.TeamFoundation.Client (in Microsoft.TeamFoundation.Client.dll)

Syntax

'Declaration
Public Sub New ( _
    application As RegisteredConfigurationServer _
)
public TfsConfigurationServer(
    RegisteredConfigurationServer application
)
public:
TfsConfigurationServer(
    RegisteredConfigurationServer^ application
)
new : 
        application:RegisteredConfigurationServer -> TfsConfigurationServer
public function TfsConfigurationServer(
    application : RegisteredConfigurationServer
)

Parameters

Remarks

You can get the registered configuration servers by using RegisteredTfsConnections.GetConfigurationServers.

// Get the servers registered on this computer
RegisteredConfigurationServer[] servers = RegisteredTfsConnections.GetConfigurationServers();

// Connect to the first one in the array
TfsConfigurationServer tfs = new TfsConfigurationServer(servers[0]);

.NET Framework Security

See Also

Reference

TfsConfigurationServer Class

TfsConfigurationServer Overload

Microsoft.TeamFoundation.Client Namespace

Other Resources

Connect to Team Foundation Server from a Console Application