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