Table of Contents

Class DisplayMeasurementProfileDetailsHelper

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

false Class to track Diagnostic to DisplayUnitOfMeasure for a given DisplayMeasurementProfile.

public class DisplayMeasurementProfileDetailsHelper : Entity, IEntity, IComparable, IIdentifiable
Inheritance
DisplayMeasurementProfileDetailsHelper
Implements
Inherited Members

Constructors

DisplayMeasurementProfileDetailsHelper()

Initializes a new instance of the DisplayMeasurementProfileDetailsHelper class. (Empty)

public DisplayMeasurementProfileDetailsHelper()

DisplayMeasurementProfileDetailsHelper(Id?, Dictionary<Id, DisplayMeasurementProfileDetail>?)

Initializes a new instance of the DisplayMeasurementProfileDetailsHelper class.

public DisplayMeasurementProfileDetailsHelper(Id? profileId, Dictionary<Id, DisplayMeasurementProfileDetail>? displayUnitOfMeasureLookup)

Parameters

profileId Id

The id of the profile.

displayUnitOfMeasureLookup Dictionary<Id, DisplayMeasurementProfileDetail>

A dictionary to lookup the appropriate DisplayMeasurementProfileDetail from the Diagnostic Id.

Properties

DisplayDetails

Gets or sets the list to lookup the relevant DisplayMeasurementProfileDetail according to the base diagnostic Id.

public DisplayMeasurementProfileDetail[] DisplayDetails { get; set; }

Property Value

DisplayMeasurementProfileDetail[]

DisplayDetails.

KnownIdLookup

Gets the KnownIds for DisplayMeasurementProfiles.

public static HashSet<Id> KnownIdLookup { get; }

Property Value

HashSet<Id>

KnownIdLookup

ProfileId

Gets or sets the Identifier of the related profile.

public Id? ProfileId { get; set; }

Property Value

Id

ProfileId

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.

GetDisplayUnit(Diagnostic)

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

public string GetDisplayUnit(Diagnostic diagnostic)

Parameters

diagnostic Diagnostic

The diagnostic whose unit of measure to look up.

Returns

string

The display unit.

Exceptions

ArgumentException

Division by zero is not allowed for inversion operations.

GetDisplayValue(Diagnostic, double)

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

public double GetDisplayValue(Diagnostic diagnostic, double value)

Parameters

diagnostic Diagnostic

The diagnostic to lookup display unit.

value double

The original value to be converted.

Returns

double

The value in the display unit.

Exceptions

ArgumentException

Division by zero is not allowed for inversion operations.

GetOriginalValue(Diagnostic, double)

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

public double GetOriginalValue(Diagnostic diagnostic, double value)

Parameters

diagnostic Diagnostic

The diagnostic to lookup display unit.

value double

The display unit value to be converted.

Returns

double

The value in the original unit.

Exceptions

ArgumentException

Division by zero is not allowed for inversion operations.

IsSystemEntity()

Returns true if the class is a system entity, false otherwise.

public override bool IsSystemEntity()

Returns

bool

true if the entity is a system entity; otherwise, false.

TryGetDisplayValue(Id, out DisplayMeasurementProfileDetail)

Get DisplayDetail efficiently through dictionary.

public bool TryGetDisplayValue(Id diagnosticId, out DisplayMeasurementProfileDetail value)

Parameters

diagnosticId Id

The Id of the dictionary to lookup display detail.

value DisplayMeasurementProfileDetail

The display detail to be gotten.

Returns

bool

A boolean whether or not the value exist and the value in the display unit.