TeamFoundationServerFactory.GetServer Method (Uri, ICredentialsProvider)
Gets the TeamFoundationServer object that is associated with the specified URI and credentials provider.
Namespace: Microsoft.TeamFoundation.Client
Assembly: Microsoft.TeamFoundation.Client (in Microsoft.TeamFoundation.Client.dll)
Syntax
'Declaration
Public Shared Function GetServer ( _
uri As Uri, _
fallbackCredentialsProvider As ICredentialsProvider _
) As TeamFoundationServer
public static TeamFoundationServer GetServer(
Uri uri,
ICredentialsProvider fallbackCredentialsProvider
)
public:
static TeamFoundationServer^ GetServer(
Uri^ uri,
ICredentialsProvider^ fallbackCredentialsProvider
)
static member GetServer :
uri:Uri *
fallbackCredentialsProvider:ICredentialsProvider -> TeamFoundationServer
public static function GetServer(
uri : Uri,
fallbackCredentialsProvider : ICredentialsProvider
) : TeamFoundationServer
Parameters
uri
Type: System.UriThe URI of 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 specified URI.
Remarks
If a TeamFoundationServer object that has the specified URL exists in the cache, it is returned. If not, a new TeamFoundation Server object is created by using a credentials provider, if any, that is appropriate for the environment. The created TeamFoundationServer object is placed in the cache and associated with the URL that is resolved for the name.
.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.