Class MeasureToken
A Token representing a measurement.
Implements
Inherited Members
Namespace: Sdl.Core.Bcm.BcmModel.Tokenization.Tokens
Assembly: Sdl.Core.Bcm.BcmModel.dll
Syntax
[DataContract]
public class MeasureToken : NumberToken, ICloneable<Token>
Remarks
A measurement is defined as a combination of a number followed by a unit.
Constructors
MeasureToken()
Initializes a new instance of the MeasureToken class.
Declaration
public MeasureToken()
MeasureToken(string, NumberToken, Unit, string, char)
Initializes a new instance with the specified values. This constructor is for internal purposes only and should not be used directly.
Declaration
public MeasureToken(string text, NumberToken numericPart, Unit unit, string unitString, char unitSeparator)
Parameters
| Type | Name | Description |
|---|---|---|
| string | text | |
| NumberToken | numericPart | |
| Unit | unit | |
| string | unitString | |
| char | unitSeparator |
Properties
Type
Gets the type of Token.
Declaration
[DataMember(Name = "type")]
protected override string Type { get; }
Property Value
| Type | Description |
|---|---|
| string | The type. |
Overrides
Unit
Gets or sets the unit.
Declaration
[DataMember(Name = "unit")]
public Unit Unit { get; set; }
Property Value
| Type | Description |
|---|---|
| Unit |
UnitSeparator
Gets or sets the unit separator.
Declaration
[DataMember(Name = "unitSeparator")]
public char UnitSeparator { get; set; }
Property Value
| Type | Description |
|---|---|
| char |
UnitString
Gets or sets the unit string, in case the unit is unknown.
Declaration
[DataMember(Name = "unitString")]
public string UnitString { get; set; }
Property Value
| Type | Description |
|---|---|
| string |