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.
Assembly: Microsoft.TeamFoundation.Client (in Microsoft.TeamFoundation.Client.dll)
string LocationForCurrentConnection( string serviceType, Guid serviceIdentifier )
- Type: System.String
The service type of the ServiceDefinition to find the location for.
- Type: System.Guid
The service identifier of the ServiceDefinition to find the location for.
Return ValueType: System.String
The location for the ServiceDefinition with the provided service type and identifier that should be used based on the current connection.
The associated ServiceDefinition 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.