Search Results for

    Show / Hide Table of Contents

    Class UnitDefinition

    Defines units to be recognized, with optional type to indicate interchangeability during autosubtitution etc.

    Inheritance
    System.Object
    UnitDefinition
    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 UnitDefinition

    Constructors

    UnitDefinition()

    Declaration
    public UnitDefinition()

    Properties

    UnitKey

    A well-known key identifying the type of the unit e.g. "Mm", "Mkg", "BISin"

    Declaration
    public string UnitKey { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    These values are mostly string versions of values in the enum Sdl.LanguagePlatform.Core.Tokenization.Unit but can include other values for units not defined by that enum. When converted to Sdl.LanguagePlatform.Core.Tokenization.CustomUnitDefinition, if UnitKey corresponds to an enum value, the CustomUnitDefinition.Unit property will be set to that value. Otherwise, it will be set to Unit.NoUnit, and the CustomUnitDefinition.CategoryName property will be set to the value of UnitKey

    UnitType

    If not null, a value indicating what other units it can be interchanged with during translation, e.g. 'Length', 'Area' (as for values migrated from the enum Sdl.LanguagePlatform.Core.Tokenization.Unit) or an arbitrary identifier such as '4' (as for migrated 'anonymous' types like mmol, umol ..)

    Declaration
    public string UnitType { get; set; }
    Property Value
    Type Description
    System.String

    On this page

    Back to top Generated by DocFX