This documentation is archived and is not being maintained.
ILocationService.LocationForCurrentConnection Method (ServiceDefinition)
Visual Studio 2013
Returns the location for the ServiceDefintion that should be used based on the current connection. This method will never return null or empty. If it succeeds it will return a targetable location for the provided ServiceDefinition. 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)
Parameters
- serviceDefinition
- Type: Microsoft.TeamFoundation.Framework.Client.ServiceDefinition
The ServiceDefinition to find the location for.
Return Value
Type: System.StringThe location for the given ServiceDefinition that should be used based on the current connection.
| Exception | Condition |
|---|---|
| InvalidServiceDefinitionException | The ServiceDefinition passed in is not valid and no location can be found. |
- 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.
Show: