This documentation is archived and is not being maintained.

ServiceDefinition::AddLocationMapping Method

Adds a LocationMapping for the provided AccessMapping and location to the ServiceDefinition. Note that if a LocationMapping already exists for the provided AccessMapping, it will be overwritten. Also, this method should only be called on ServiceDefinitions that are FullyQualified.

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

public:
void AddLocationMapping(
	AccessMapping^ accessMapping, 
	String^ location
)

Parameters

accessMapping
Type: Microsoft.TeamFoundation.Framework.Client::AccessMapping

The AccessMapping this LocationMapping corresponds to. This AccessMapping must already be registered in the location service.

location
Type: System::String

The location that is associated with the provided AccessMapping. This value must not be null.

ExceptionCondition
InvalidOperationException

Throw if this ServiceDefinition does not have a RelativeToSetting of FullyQualified.

Show: