Table of Contents

Class DisplayUnitOfMeasure

Namespace
Geotab.Checkmate.ObjectModel.Engine.DisplayDiagnostic
Assembly
Geotab.Checkmate.ObjectModel.dll

false Contains the conversion between the base UnitOfMeasure to the DisplayUnitOfMeasure.

public class DisplayUnitOfMeasure : NameEntityWithVersion, IEntity, IComparable, IIdentifiable, IVersion
Inheritance
DisplayUnitOfMeasure
Implements
Inherited Members

Constructors

DisplayUnitOfMeasure()

Initializes a new instance of the DisplayUnitOfMeasure class.

public DisplayUnitOfMeasure()

DisplayUnitOfMeasure(Id, long?, Id, double, double, bool, string?)

Initializes a new instance of the DisplayUnitOfMeasure class.

public DisplayUnitOfMeasure(Id identity, long? version, Id baseId, double factor, double offset, bool inversion, string? name)

Parameters

identity Id

The identifier.

version long?

The version.

baseId Id

The identifier for the base unit of measure.

factor double

The conversion factor from base UnitOfMeasure to DisplayUnitOfMeasure.

offset double

The conversion offset from base UnitOfMeasure to DisplayUnitOfMeasure.

inversion bool

Indicates whether there is an inversion relation from base UnitOfMeasure to DisplayUnitOfMeasure.

name string

The description of the unit of measure.

Properties

BaseId

Gets or sets the Identifier of the base unit of measure.

public Id BaseId { get; set; }

Property Value

Id

BaseId

FactorFromBase

Gets or sets the conversion factor from base units to the current unit.

public double FactorFromBase { get; set; }

Property Value

double

FactorFromBase

InversionOperation

Gets or sets a value indicating whether gets or sets whether or not an inversion operation is performed on unit conversion.

public bool InversionOperation { get; set; }

Property Value

bool

InversionOperation

OffsetFromBase

Gets or sets the offset to convert from base unit to current unit.

public double OffsetFromBase { get; set; }

Property Value

double

OffsetFromBase

Methods

Clone()

Creates a new object that is a copy of the current instance.

public override IEntity Clone()

Returns

IEntity

A new object that is a copy of this instance.

Convert(double)

Converts number from representation in base unit of measure to display unit of measure.

public double Convert(double original)

Parameters

original double

The original value to be converted.

Returns

double

The converted display unit.

Exceptions

ArgumentException

Division by zero is not allowed for inversion operations.

Convert(int)

Converts number from representation in base unit of measure to display unit of measure.

public int Convert(int original)

Parameters

original int

The original value to be converted.

Returns

int

The converted display unit.

Exceptions

ArgumentException

Inversion operations not allowed for integer values.

InverseConvert(double)

Converts number from representation in display unit of measure to base unit of measure.

public double InverseConvert(double original)

Parameters

original double

The original value to be converted.

Returns

double

The value in base unit.

Exceptions

ArgumentException

Inversion operations not allowed for zero original value.

InverseConvert(int)

Converts number from representation in display unit of measure to base unit of measure.

public int InverseConvert(int original)

Parameters

original int

The original value to be converted.

Returns

int

The value in base unit.

Exceptions

ArgumentException

Inversion operations not allowed for integer values.

IsSystemEntity()

Denotes whether an instance is user created or system supported.

public override bool IsSystemEntity()

Returns

bool

true for all display units of measure.