ILocationService Interface

The service responsible for providing a connection to a Team Foundation Server as well as the locations of other services that are available on it.

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

Syntax

'Declaration
Public Interface ILocationService
public interface ILocationService
public interface class ILocationService
type ILocationService =  interface end
public interface ILocationService

The ILocationService type exposes the following members.

Properties

  Name Description
Public property ClientAccessMapping The AccessMapping for the current connection to the server. Note, it is possible that the current ClientAccessMapping is not a member of the ConfiguredAccessMappings if the access point this client used to connect to the server has not been configured on it. This will never be null.
Public property ConfiguredAccessMappings All of the AccessMappings that this location service knows about. Because a given location service can inherit AccessMappings from its parent these AccessMappings may exist on this location service or its parent.
Public property DefaultAccessMapping The default AccessMapping for this location service. This will never be null.

Top

Methods

  Name Description
Public method ConfigureAccessMapping Configures the AccessMapping with the provided moniker to have the provided display name and access point. This function also allows for this AccessMapping to be made the default AccessMapping.
Public method FindServiceDefinition Finds the ServiceDefinition with the specified service type and service identifier. If no matching ServiceDefinition exists, null is returned.
Public method FindServiceDefinitions Finds the ServiceDefinitions for all of the services with the specified service type. If no ServiceDefinitions of this type exist, an empty enumeration will be returned.
Public method FindServiceDefinitionsByToolType Finds the ServiceDefinitions for all of the services with the specified tool type. If no services exist for this tool type, an empty enumeration will be returned.
Public method GetAccessMapping Gets the AccessMapping with the specified moniker. Returns null if an AccessMapping with the supplied moniker does not exist.
Public method LocationForAccessMapping(ServiceDefinition, AccessMapping) Returns the location for the ServiceDefinition for the provided AccessMapping. If this ServiceDefinition is FullyQualified and no LocationMapping exists for this AccessMapping then null will be returned.
Public method LocationForAccessMapping(String, Guid, AccessMapping) Returns the location for the ServiceDefinition that has the specified service type and service identifier for the provided AccessMapping. If this ServiceDefinition is FullyQualified and no LocationMapping exists for this AccessMapping then null will be returned.
Public method LocationForCurrentConnection(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.
Public method LocationForCurrentConnection(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.
Public method RemoveAccessMapping Removes an AccessMapping and all of the locations that are mapped to it within ServiceDefinitions.
Public method RemoveServiceDefinition(ServiceDefinition) Removes the specified ServiceDefinition from the location service.
Public method RemoveServiceDefinition(String, Guid) Removes the ServiceDefinition with the specified service type and service identifier from the location serivce.
Public method RemoveServiceDefinitions Removes the specified ServiceDefinitions from the location service.
Public method SaveServiceDefinition Saves the provided ServiceDefinition within the location service. This operation will assign the Identifier property on the ServiceDefinition object if one is not already assigned. Any AccessMappings referenced in the LocationMappings property must already be configured with the location service.
Public method SaveServiceDefinitions Saves the provided ServiceDefinitions within the location service. This operation will assign the Identifier property on the ServiceDefinition objects if one is not already assigned. Any AccessMappings referenced in the LocationMappings property must already be configured with the location service.
Public method SetDefaultAccessMapping Sets the default AccessMapping to the AccessMapping passed in.

Top

See Also

Reference

Microsoft.TeamFoundation.Framework.Client Namespace