TeamFoundationServerFactory.GetServer Method (RegisteredProjectCollection, ICredentialsProvider)
Gets the TeamFoundationServer object that is associated with the specified RegisteredProjectCollection object.
Namespace: Microsoft.TeamFoundation.Client
Assembly: Microsoft.TeamFoundation.Client (in Microsoft.TeamFoundation.Client.dll)
Syntax
'Declaration
Public Shared Function GetServer ( _
projectCollection As RegisteredProjectCollection, _
fallbackCredentialsProvider As ICredentialsProvider _
) As TeamFoundationServer
public static TeamFoundationServer GetServer(
RegisteredProjectCollection projectCollection,
ICredentialsProvider fallbackCredentialsProvider
)
public:
static TeamFoundationServer^ GetServer(
RegisteredProjectCollection^ projectCollection,
ICredentialsProvider^ fallbackCredentialsProvider
)
static member GetServer :
projectCollection:RegisteredProjectCollection *
fallbackCredentialsProvider:ICredentialsProvider -> TeamFoundationServer
public static function GetServer(
projectCollection : RegisteredProjectCollection,
fallbackCredentialsProvider : ICredentialsProvider
) : TeamFoundationServer
Parameters
projectCollection
Type: Microsoft.TeamFoundation.Client.RegisteredProjectCollectionThe RegisteredProjectCollection instance that contains information about the server.
fallbackCredentialsProvider
Type: Microsoft.TeamFoundation.Client.ICredentialsProviderThe credentials provider to use if the environment does not already supply one.
Return Value
Type: Microsoft.TeamFoundation.Client.TeamFoundationServer
The TeamFoundationServer object that is associated with the server that is described in the specified RegisteredProjectCollection.
.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.