Export (0) Print
Expand All

SelectInstance Method

Gets the instance where a HealthVault account should be created for the specified account location.

Namespace: Microsoft.Health
Assembly: Microsoft.Health (in Microsoft.Health.dll) Version: 2.1.0.0 (1.15.1003.9505)

public HealthServiceInstance SelectInstance(
	Location preferredLocation
)

Parameters

preferredLocation
Type: Microsoft.Health..::..Location
A user's preferred geographical location, used to select the best instance in which to create a new HealthVault account. If there is a location associated with the credential that will be used to log into the account, that location should be used.

Return Value

A HealthServiceInstance object represents the selected instance, or null if no suitable instance exists.

If no suitable instance can be found, a null value is returned. This can happen, for example, if the account location is not supported by HealthVault. Currently the returned instance IDs all parse to integers, but that is not guaranteed and should not be relied upon.

ExceptionCondition
Microsoft.Health..::..HealthServiceException The HealthVault service returned an error.
System..::..ArgumentException If preferredLocation is null.
Show:
© 2014 Microsoft