UserUnitProvider Class

A IUnitProvider based on a specified set of unit definitions.

If a quantity ID is not provided when adding a user units, it will match on the eumItem value only.

Definition

Namespace: DHI.Mike1D.Generic
Assembly: DHI.Mike1D.Generic (in DHI.Mike1D.Generic.dll) Version: 24.0.0.0 (11.1.1.1111)
C#
public class UserUnitProvider : IUnitProvider
Inheritance
Object    UserUnitProvider
Implements
IUnitProvider

Constructors

UserUnitProviderInitializes a new instance of the UserUnitProvider class

Properties

BaseProvider Provider to try, if no match is found in this instance. Null (not used) by default

Methods

Add(UserUnitInfo) Add user unit to unit provider
Add(eumItem, eumUnit) Add user unit to unit provider, based on eumItem type
Add(UserUnitProviderUnitSearchType, UserUnitInfo) Add user unit to unit provider, with the given search type
Add(String, eumItem, eumUnit) Add user unit to unit provider, based on Id of quantity
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
GetUserUnit(eumItem) Return user unit for EUM item type
GetUserUnit(String, eumItem) Return user unit
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
ToStringReturns a string that represents the current object.
(Inherited from Object)
Update(UserUnitInfo) Update existing unit.
Update(UserUnitInfo, UserUnitProviderUnitSearchType) 

Fields

_itemMap Find by eumItem
_quantityMap Find by quantity id
_unitSearchers Find by search pattern

Extension Methods

AsString Return value as a string, in proper unit
(Defined by Util)
GetUnitConversionFactor Get a unit conversion factor for EUM quantity
(Defined by Util)
GetUnitConversionFactor Get a unit conversion factor for EUM quantity
(Defined by Util)
GetUserUnitOrDefault Get a unit conversion factor for EUM quantity
(Defined by Util)
UpdateQuantityUserUnit Update quantity with user unit, if user unit is available
(Defined by Util)
UserUnitToString Return a unit as a string
(Defined by Util)
ValueInUserUnit Convert a value to user unit and return as a string
(Defined by Util)
ValueInUserUnit Convert a value to user unit and return as a string
(Defined by Util)
ValueInUserUnitToString Convert a value to user unit and return as a string
(Defined by Util)
ValueInUserUnitToString Convert a value to user unit and return as a string
(Defined by Util)
ValueInUserUnitToStringWithUnit Convert a value to user unit and return as a string
(Defined by Util)
ValueInUserUnitToStringWithUnit Convert a value to user unit and return as a string
(Defined by Util)

See Also