Export (0) Print
Expand All

ILocationService.LocationForCurrentConnection Method (String, Guid)

Returns the location for the ServiceDefintion associated with the ServiceType and ServiceIdentifier that should be used based on the current connection. If a ServiceDefinition with the ServiceType and ServiceIdentifier does not exist then null will be returned. If a ServiceDefinition with the ServiceType and ServiceIdentifier is found then a location will be returned if the ServiceDefinition is well formed (otherwise an exception will be thrown). When determining what location to return for the ServiceDefinition and current connection the following rules will be applied: 1. Try to find a location for the ClientAccessMapping. 2. Try to find a location for the DefaultAccessMapping. 3. Use the first location in the LocationMappings list.

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

string LocationForCurrentConnection(
	string serviceType,
	Guid serviceIdentifier
)

Parameters

serviceType
Type: System.String

The service type of the ServiceDefinition to find the location for.

serviceIdentifier
Type: System.Guid

The service identifier of the ServiceDefinition to find the location for.

Return Value

Type: System.String
The location for the ServiceDefinition with the provided service type and identifier that should be used based on the current connection.

ExceptionCondition
InvalidServiceDefinitionException

The associated ServiceDefinition is not valid and no location can be found.

Show:
© 2015 Microsoft