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