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)
Syntax
'Declaration
Function LocationForCurrentConnection ( _
serviceType As String, _
serviceIdentifier As Guid _
) As String
string LocationForCurrentConnection(
string serviceType,
Guid serviceIdentifier
)
String^ LocationForCurrentConnection(
String^ serviceType,
Guid serviceIdentifier
)
abstract LocationForCurrentConnection :
serviceType:string *
serviceIdentifier:Guid -> string
function LocationForCurrentConnection(
serviceType : String,
serviceIdentifier : Guid
) : String
Parameters
serviceType
Type: System.StringThe service type of the ServiceDefinition to find the ___location for.
serviceIdentifier
Type: System.GuidThe 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.
Exceptions
Exception | Condition |
---|---|
InvalidServiceDefinitionException | The associated ServiceDefinition is not valid and no ___location can be found. |
.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.