Class LabelValueSet
Holds 1 or more possible labels for the unit. If LabelValueConditions contains more than 1 object, labels in the set are the different plural variations for the same label, e.g. "millimeter", "millimeters". Alternative labels or spellings (not plural variations) should be in a separate set, e.g. "millimetre", "millimetres"
Inheritance
System.Object
LabelValueSet
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Sdl.Core.Globalization.UnitMetadata
Assembly: Sdl.Core.Globalization.dll
Syntax
public class LabelValueSet
Constructors
LabelValueSet()
Declaration
public LabelValueSet()
Properties
LabelValueConditions
Either a single number-invariant label, or multiple labels with different plurality conditions
Declaration
public List<LabelValueCondition> LabelValueConditions { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<LabelValueCondition> |
Preferred
If true, this set contains the preferred label(s) for this unit in the given language
Declaration
public bool Preferred { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
ContainsLabel(String)
Returns true if the set contains the label specified
Declaration
public bool ContainsLabel(string label)
Parameters
Type | Name | Description |
---|---|---|
System.String | label |
Returns
Type | Description |
---|---|
System.Boolean |
GetLabel(Double)
Returns the label from this set to use for the given double value
Declaration
public string GetLabel(double value)
Parameters
Type | Name | Description |
---|---|---|
System.Double | value |
Returns
Type | Description |
---|---|
System.String |
GetLabel(Int32)
Returns the label from this set to use for the given integer value
Declaration
public string GetLabel(int value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | value |
Returns
Type | Description |
---|---|
System.String |