Class MengeneinheitExtenion
Extension Methods for Mengeneinheit.
Inheritance
System.Object
MengeneinheitExtenion
Namespace: BO4E.Extensions.ENUM
Assembly: BO4E-dotnet.Extensions.dll
Syntax
public static class MengeneinheitExtenion : object
Fields
| Improve this Doc View SourceDIMENSION_SETS
This set contains sets of Mengeneinheiten that share the same dimension (e.g. time, power, work, volume) Einheiten in the same subset are considered convertible amongst each other.
Declaration
public static readonly ISet<ISet<Mengeneinheit>> DIMENSION_SETS
Field Value
Type | Description |
---|---|
ISet<ISet<Mengeneinheit>> |
Methods
| Improve this Doc View SourceAreConvertible(Mengeneinheit, Mengeneinheit)
Tests if two Mengeneinheit are convertible into each other / do have the same kind.
Declaration
public static bool AreConvertible(Mengeneinheit me1, Mengeneinheit me2)
Parameters
Type | Name | Description |
---|---|---|
Mengeneinheit | me1 | |
Mengeneinheit | me2 |
Returns
Type | Description |
---|---|
System.Boolean | true iff convertible |
GetConversionFactor(Mengeneinheit, Mengeneinheit)
returns the factor that is needed to convert an amount in unit me1
to an equivalent amount in unit me2
.
Declaration
public static decimal GetConversionFactor(this Mengeneinheit me1, Mengeneinheit me2)
Parameters
Type | Name | Description |
---|---|---|
Mengeneinheit | me1 | source unit |
Mengeneinheit | me2 | target unit |
Returns
Type | Description |
---|---|
System.Decimal |
IsConvertibleTo(Mengeneinheit, Mengeneinheit)
Similar to AreConvertible but as extension method for me1
Declaration
public static bool IsConvertibleTo(this Mengeneinheit me1, Mengeneinheit me2)
Parameters
Type | Name | Description |
---|---|---|
Mengeneinheit | me1 | |
Mengeneinheit | me2 |
Returns
Type | Description |
---|---|
System.Boolean |
IsExtensive(Mengeneinheit)
is the Mengeneinheit extensive?
Declaration
public static bool IsExtensive(this Mengeneinheit me)
Parameters
Type | Name | Description |
---|---|---|
Mengeneinheit | me |
Returns
Type | Description |
---|---|
System.Boolean | true iff extensive |
IsIntensive(Mengeneinheit)
Is the Mengeneinheit intensive?
Declaration
public static bool IsIntensive(this Mengeneinheit me)
Parameters
Type | Name | Description |
---|---|---|
Mengeneinheit | me |
Returns
Type | Description |
---|---|
System.Boolean | true iff not extensive |