Share via


ILocationService.LocationForCurrentConnection Method (ServiceDefinition)

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.VisualStudio.Services.Location
Assembly:  Microsoft.VisualStudio.Services.Client (in Microsoft.VisualStudio.Services.Client.dll)

Syntax

'Declaration
Function LocationForCurrentConnection ( _
    serviceDefinition As ServiceDefinition _
) As String
string LocationForCurrentConnection(
    ServiceDefinition serviceDefinition
)
String^ LocationForCurrentConnection(
    ServiceDefinition^ serviceDefinition
)
abstract LocationForCurrentConnection : 
        serviceDefinition:ServiceDefinition -> string
function LocationForCurrentConnection(
    serviceDefinition : ServiceDefinition
) : String

Parameters

Return Value

Type: System.String
The location for the given ServiceDefinition that should be used based on the current connection.

.NET Framework Security

See Also

Reference

ILocationService Interface

LocationForCurrentConnection Overload

Microsoft.VisualStudio.Services.Location Namespace