Class DisplayMeasurementProfileDetailsHelper
- Namespace
- Geotab.Checkmate.ObjectModel.Engine.DisplayDiagnostic
- Assembly
- Geotab.Checkmate.ObjectModel.dll
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
profileIdIdThe id of the profile.
displayUnitOfMeasureLookupDictionary<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
ProfileId
Gets or sets the Identifier of the related profile.
public Id? ProfileId { get; set; }
Property Value
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
diagnosticDiagnosticThe 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
diagnosticDiagnosticThe diagnostic to lookup display unit.
valuedoubleThe 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
diagnosticDiagnosticThe diagnostic to lookup display unit.
valuedoubleThe 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
TryGetDisplayValue(Id, out DisplayMeasurementProfileDetail)
Get DisplayDetail efficiently through dictionary.
public bool TryGetDisplayValue(Id diagnosticId, out DisplayMeasurementProfileDetail value)
Parameters
diagnosticIdIdThe Id of the dictionary to lookup display detail.
valueDisplayMeasurementProfileDetailThe display detail to be gotten.
Returns
- bool
A boolean whether or not the value exist and the value in the display unit.