Beispiel #1
0
 public static string ToDisplayString(this VolumeUnit volumeUnit)
 {
     try
     {
         return(FactoryUnits.GetDisplayString(UnitsType.Volume, (int)volumeUnit));
     }
     catch (InvalidOperationException)
     {
         throw new ArgumentOutOfRangeException(/*MSG0*/ "volumeUnit");
     }
 }
Beispiel #2
0
 public static string ToDisplayString(this LengthUnit lengthUnit)
 {
     try
     {
         return(FactoryUnits.GetDisplayString(UnitsType.Length, (int)lengthUnit));
     }
     catch (InvalidOperationException)
     {
         throw new ArgumentOutOfRangeException(/*MSG0*/ "lengthUnit");
     }
 }
Beispiel #3
0
 public static string ToDisplayString(this AngularityUnit angularityUnit)
 {
     try
     {
         return(FactoryUnits.GetDisplayString(UnitsType.Angularity, (int)angularityUnit));
     }
     catch (InvalidOperationException)
     {
         throw new ArgumentOutOfRangeException(/*MSG0*/ "angularityUnit");
     }
 }
Beispiel #4
0
 public static string ToDisplayString(this EnergyConsumptionRateUnit consumptionRateUnit)
 {
     try
     {
         return(FactoryUnits.GetDisplayString(UnitsType.EnergyConsumptionRate, (int)consumptionRateUnit));
     }
     catch (InvalidOperationException)
     {
         throw new ArgumentOutOfRangeException(/*MSG0*/ "consumptionRateUnit");
     }
 }