Weight​Value Class

Definition

Represents a weight value and display.

public class WeightValue : Microsoft.Health.ItemTypes.Measurement<double>
Inheritance

Inherited Members

Microsoft.Health.ItemTypes.Measurement`1

Remarks

In HealthVault, weights have values and display values. All values are stored in a base unit of kilograms. An application can take a length value using any scale the application chooses and can store the user- entered value as the display value, but the length value must be converted to kilograms to be stored in HealthVault.

Constructors

Weight​Value()

Creates a new instance of the WeightValue class with empty values.

Weight​Value(​Double)

Creates a new instance of the WeightValue class with the specified value in kilograms.

Weight​Value(​Double, ​Display​Value)

Creates a new instance of the WeightValue class with the specified value in kilograms and the specified display value.

Properties

Kilograms

Gets or sets the value of the weight in kilograms.

Methods

Assert​Measurement​Value(​Double)

Verifies the value is a legal weight value in kilograms (kg).

Get​Value​String(​Double)

Gets a string representation of the weight in the base units.

Parse​Value​Xml(​XPath​Navigator)

Populates the data for the weight from the XML.

Write​Value​Xml(​Xml​Writer)

Writes the weight to the specified XML writer.

Operators

op_​Subtraction(​Weight​Value, ​Weight​Value)

Creates a new instance of the WeightValue class by subtracting the operand from this weight value.