diff --git a/UnitsNet.Tests/CustomCode/EnergyTests.cs b/UnitsNet.Tests/CustomCode/EnergyTests.cs index c2f15f5ad1..df9a7a241b 100644 --- a/UnitsNet.Tests/CustomCode/EnergyTests.cs +++ b/UnitsNet.Tests/CustomCode/EnergyTests.cs @@ -28,8 +28,12 @@ public class EnergyTests : EnergyTestsBase protected override double JoulesInOneJoule => 1; + protected override double KilobritishThermalUnitsInOneJoule => 9.4781339449889105832843629746176e-7; + protected override double KilojoulesInOneJoule => 1E-3; + protected override double MegabritishThermalUnitsInOneJoule => 9.4781339449889105832843629746176e-10; + protected override double MegajoulesInOneJoule => 1E-6; protected override double BritishThermalUnitsInOneJoule => 0.00094781712; @@ -50,6 +54,8 @@ public class EnergyTests : EnergyTestsBase protected override double FootPoundsInOneJoule => 0.737562149; + protected override double GigabritishThermalUnitsInOneJoule => 9.4781339449889105832843629746176e-13; + protected override double GigawattHoursInOneJoule => 2.77777778e-13; protected override double KilocaloriesInOneJoule => 0.00023900573614; diff --git a/UnitsNet.Tests/CustomCode/FlowTests.cs b/UnitsNet.Tests/CustomCode/FlowTests.cs index 0108d3d62a..b96787ec35 100644 --- a/UnitsNet.Tests/CustomCode/FlowTests.cs +++ b/UnitsNet.Tests/CustomCode/FlowTests.cs @@ -27,6 +27,8 @@ public class FlowTests : FlowTestsBase protected override double CubicDecimetersPerMinuteInOneCubicMeterPerSecond => 60000.00000; + protected override double CubicFeetPerHourInOneCubicMeterPerSecond => 1.2713300937959091422759633856933e+5; + protected override double CubicFeetPerSecondInOneCubicMeterPerSecond => 35.314666213; protected override double MillionUsGallonsPerDayInOneCubicMeterPerSecond => 22.824465227; diff --git a/UnitsNet.Tests/CustomCode/MassFlowTests.cs b/UnitsNet.Tests/CustomCode/MassFlowTests.cs index 6a100aa900..26fbf96c3e 100644 --- a/UnitsNet.Tests/CustomCode/MassFlowTests.cs +++ b/UnitsNet.Tests/CustomCode/MassFlowTests.cs @@ -36,6 +36,8 @@ public class MassFlowTests : MassFlowTestsBase protected override double KilogramsPerSecondInOneGramPerSecond => 1E-3; + protected override double MegapoundsPerHourInOneGramPerSecond => 7.93664e-6; + protected override double DecigramsPerSecondInOneGramPerSecond => 1E1; protected override double CentigramsPerSecondInOneGramPerSecond => 1E2; @@ -46,6 +48,8 @@ public class MassFlowTests : MassFlowTestsBase protected override double NanogramsPerSecondInOneGramPerSecond => 1E9; + protected override double ShortTonsPerHourInOneGramPerSecond => 3.96832e-3; + protected override double TonnesPerDayInOneGramPerSecond => 60.0*60*24/1E6; protected override double PoundsPerHourInOneGramPerSecond => 7.93664; diff --git a/UnitsNet.Tests/CustomCode/MassTests.cs b/UnitsNet.Tests/CustomCode/MassTests.cs index 82dadc63a6..82cec0a3d4 100644 --- a/UnitsNet.Tests/CustomCode/MassTests.cs +++ b/UnitsNet.Tests/CustomCode/MassTests.cs @@ -38,10 +38,14 @@ public class MassTests : MassTestsBase protected override double KilogramsInOneKilogram => 1; + protected override double KilopoundsInOneKilogram => 2.2046226218487757e-3; + protected override double KilotonnesInOneKilogram => 1E-6; protected override double LongTonsInOneKilogram => 0.000984207; + protected override double MegapoundsInOneKilogram => 2.2046226218487757e-6; + protected override double MegatonnesInOneKilogram => 1E-6; protected override double MicrogramsInOneKilogram => 1E9; diff --git a/UnitsNet.Tests/CustomCode/PowerTests.cs b/UnitsNet.Tests/CustomCode/PowerTests.cs index f27e8c9742..07e7ab82f3 100644 --- a/UnitsNet.Tests/CustomCode/PowerTests.cs +++ b/UnitsNet.Tests/CustomCode/PowerTests.cs @@ -38,6 +38,8 @@ public class PowerTests : PowerTestsBase protected override double WattsInOneWatt => 1; + protected override double KilobritishThermalUnitsPerHourInOneWatt => 3.412141633e-3; + protected override double KilowattsInOneWatt => 1e-3; protected override double MegawattsInOneWatt => 1e-6; @@ -49,6 +51,7 @@ public class PowerTests : PowerTestsBase protected override double PetawattsInOneWatt => 1e-15; protected override double BoilerHorsepowerInOneWatt => 1.0191082802547770700636942675159e-4; + protected override double BritishThermalUnitsPerHourInOneWatt => 3.412141633; protected override double ElectricalHorsepowerInOneWatt => 0.00134048257372654155495978552279; diff --git a/UnitsNet.Tests/CustomCode/VolumeTests.cs b/UnitsNet.Tests/CustomCode/VolumeTests.cs index 8827d3e135..930a392e0d 100644 --- a/UnitsNet.Tests/CustomCode/VolumeTests.cs +++ b/UnitsNet.Tests/CustomCode/VolumeTests.cs @@ -48,6 +48,8 @@ public class VolumeTests : VolumeTestsBase protected override double CubicYardsInOneCubicMeter => 1.30795062; protected override double DecilitersInOneCubicMeter => 1E4; + protected override double HectocubicFeetInOneCubicMeter => 3.531472e-1; + protected override double HectocubicMetersInOneCubicMeter => 0.01; protected override double HectolitersInOneCubicMeter => 1E1; @@ -55,7 +57,15 @@ public class VolumeTests : VolumeTestsBase protected override double ImperialOuncesInOneCubicMeter => 35195.07972; + protected override double KilocubicFeetInOneCubicMeter => 3.531472e-2; + protected override double KilocubicMetersInOneCubicMeter => 0.001; + protected override double KiloimperialGallonsInOneCubicMeter => 2.1996924e-1; + protected override double KilousGallonsInOneCubicMeter => 2.6417217e-1; + protected override double LitersInOneCubicMeter => 1E3; + protected override double MegacubicFeetInOneCubicMeter => 3.531472e-5; + protected override double MegaimperialGallonsInOneCubicMeter => 2.1996924e-4; + protected override double MegausGallonsInOneCubicMeter => 2.6417217e-4; protected override double MicrolitersInOneCubicMeter => 1E9; diff --git a/UnitsNet.Tests/GeneratedCode/EnergyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/EnergyTestsBase.g.cs index 89f1eefe60..4876a65ebe 100644 --- a/UnitsNet.Tests/GeneratedCode/EnergyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/EnergyTestsBase.g.cs @@ -60,11 +60,14 @@ public abstract partial class EnergyTestsBase protected abstract double ElectronVoltsInOneJoule { get; } protected abstract double ErgsInOneJoule { get; } protected abstract double FootPoundsInOneJoule { get; } + protected abstract double GigabritishThermalUnitsInOneJoule { get; } protected abstract double GigawattHoursInOneJoule { get; } protected abstract double JoulesInOneJoule { get; } + protected abstract double KilobritishThermalUnitsInOneJoule { get; } protected abstract double KilocaloriesInOneJoule { get; } protected abstract double KilojoulesInOneJoule { get; } protected abstract double KilowattHoursInOneJoule { get; } + protected abstract double MegabritishThermalUnitsInOneJoule { get; } protected abstract double MegajoulesInOneJoule { get; } protected abstract double MegawattHoursInOneJoule { get; } protected abstract double ThermsEcInOneJoule { get; } @@ -81,11 +84,14 @@ public abstract partial class EnergyTestsBase protected virtual double ElectronVoltsTolerance { get { return 1e-5; } } protected virtual double ErgsTolerance { get { return 1e-5; } } protected virtual double FootPoundsTolerance { get { return 1e-5; } } + protected virtual double GigabritishThermalUnitsTolerance { get { return 1e-5; } } protected virtual double GigawattHoursTolerance { get { return 1e-5; } } protected virtual double JoulesTolerance { get { return 1e-5; } } + protected virtual double KilobritishThermalUnitsTolerance { get { return 1e-5; } } protected virtual double KilocaloriesTolerance { get { return 1e-5; } } protected virtual double KilojoulesTolerance { get { return 1e-5; } } protected virtual double KilowattHoursTolerance { get { return 1e-5; } } + protected virtual double MegabritishThermalUnitsTolerance { get { return 1e-5; } } protected virtual double MegajoulesTolerance { get { return 1e-5; } } protected virtual double MegawattHoursTolerance { get { return 1e-5; } } protected virtual double ThermsEcTolerance { get { return 1e-5; } } @@ -106,11 +112,14 @@ public void JouleToEnergyUnits() AssertEx.EqualTolerance(ElectronVoltsInOneJoule, joule.ElectronVolts, ElectronVoltsTolerance); AssertEx.EqualTolerance(ErgsInOneJoule, joule.Ergs, ErgsTolerance); AssertEx.EqualTolerance(FootPoundsInOneJoule, joule.FootPounds, FootPoundsTolerance); + AssertEx.EqualTolerance(GigabritishThermalUnitsInOneJoule, joule.GigabritishThermalUnits, GigabritishThermalUnitsTolerance); AssertEx.EqualTolerance(GigawattHoursInOneJoule, joule.GigawattHours, GigawattHoursTolerance); AssertEx.EqualTolerance(JoulesInOneJoule, joule.Joules, JoulesTolerance); + AssertEx.EqualTolerance(KilobritishThermalUnitsInOneJoule, joule.KilobritishThermalUnits, KilobritishThermalUnitsTolerance); AssertEx.EqualTolerance(KilocaloriesInOneJoule, joule.Kilocalories, KilocaloriesTolerance); AssertEx.EqualTolerance(KilojoulesInOneJoule, joule.Kilojoules, KilojoulesTolerance); AssertEx.EqualTolerance(KilowattHoursInOneJoule, joule.KilowattHours, KilowattHoursTolerance); + AssertEx.EqualTolerance(MegabritishThermalUnitsInOneJoule, joule.MegabritishThermalUnits, MegabritishThermalUnitsTolerance); AssertEx.EqualTolerance(MegajoulesInOneJoule, joule.Megajoules, MegajoulesTolerance); AssertEx.EqualTolerance(MegawattHoursInOneJoule, joule.MegawattHours, MegawattHoursTolerance); AssertEx.EqualTolerance(ThermsEcInOneJoule, joule.ThermsEc, ThermsEcTolerance); @@ -130,11 +139,14 @@ public void FromValueAndUnit() AssertEx.EqualTolerance(1, Energy.From(1, EnergyUnit.ElectronVolt).ElectronVolts, ElectronVoltsTolerance); AssertEx.EqualTolerance(1, Energy.From(1, EnergyUnit.Erg).Ergs, ErgsTolerance); AssertEx.EqualTolerance(1, Energy.From(1, EnergyUnit.FootPound).FootPounds, FootPoundsTolerance); + AssertEx.EqualTolerance(1, Energy.From(1, EnergyUnit.GigabritishThermalUnit).GigabritishThermalUnits, GigabritishThermalUnitsTolerance); AssertEx.EqualTolerance(1, Energy.From(1, EnergyUnit.GigawattHour).GigawattHours, GigawattHoursTolerance); AssertEx.EqualTolerance(1, Energy.From(1, EnergyUnit.Joule).Joules, JoulesTolerance); + AssertEx.EqualTolerance(1, Energy.From(1, EnergyUnit.KilobritishThermalUnit).KilobritishThermalUnits, KilobritishThermalUnitsTolerance); AssertEx.EqualTolerance(1, Energy.From(1, EnergyUnit.Kilocalorie).Kilocalories, KilocaloriesTolerance); AssertEx.EqualTolerance(1, Energy.From(1, EnergyUnit.Kilojoule).Kilojoules, KilojoulesTolerance); AssertEx.EqualTolerance(1, Energy.From(1, EnergyUnit.KilowattHour).KilowattHours, KilowattHoursTolerance); + AssertEx.EqualTolerance(1, Energy.From(1, EnergyUnit.MegabritishThermalUnit).MegabritishThermalUnits, MegabritishThermalUnitsTolerance); AssertEx.EqualTolerance(1, Energy.From(1, EnergyUnit.Megajoule).Megajoules, MegajoulesTolerance); AssertEx.EqualTolerance(1, Energy.From(1, EnergyUnit.MegawattHour).MegawattHours, MegawattHoursTolerance); AssertEx.EqualTolerance(1, Energy.From(1, EnergyUnit.ThermEc).ThermsEc, ThermsEcTolerance); @@ -155,11 +167,14 @@ public void As() AssertEx.EqualTolerance(ElectronVoltsInOneJoule, joule.As(EnergyUnit.ElectronVolt), ElectronVoltsTolerance); AssertEx.EqualTolerance(ErgsInOneJoule, joule.As(EnergyUnit.Erg), ErgsTolerance); AssertEx.EqualTolerance(FootPoundsInOneJoule, joule.As(EnergyUnit.FootPound), FootPoundsTolerance); + AssertEx.EqualTolerance(GigabritishThermalUnitsInOneJoule, joule.As(EnergyUnit.GigabritishThermalUnit), GigabritishThermalUnitsTolerance); AssertEx.EqualTolerance(GigawattHoursInOneJoule, joule.As(EnergyUnit.GigawattHour), GigawattHoursTolerance); AssertEx.EqualTolerance(JoulesInOneJoule, joule.As(EnergyUnit.Joule), JoulesTolerance); + AssertEx.EqualTolerance(KilobritishThermalUnitsInOneJoule, joule.As(EnergyUnit.KilobritishThermalUnit), KilobritishThermalUnitsTolerance); AssertEx.EqualTolerance(KilocaloriesInOneJoule, joule.As(EnergyUnit.Kilocalorie), KilocaloriesTolerance); AssertEx.EqualTolerance(KilojoulesInOneJoule, joule.As(EnergyUnit.Kilojoule), KilojoulesTolerance); AssertEx.EqualTolerance(KilowattHoursInOneJoule, joule.As(EnergyUnit.KilowattHour), KilowattHoursTolerance); + AssertEx.EqualTolerance(MegabritishThermalUnitsInOneJoule, joule.As(EnergyUnit.MegabritishThermalUnit), MegabritishThermalUnitsTolerance); AssertEx.EqualTolerance(MegajoulesInOneJoule, joule.As(EnergyUnit.Megajoule), MegajoulesTolerance); AssertEx.EqualTolerance(MegawattHoursInOneJoule, joule.As(EnergyUnit.MegawattHour), MegawattHoursTolerance); AssertEx.EqualTolerance(ThermsEcInOneJoule, joule.As(EnergyUnit.ThermEc), ThermsEcTolerance); @@ -180,11 +195,14 @@ public void ConversionRoundTrip() AssertEx.EqualTolerance(1, Energy.FromElectronVolts(joule.ElectronVolts).Joules, ElectronVoltsTolerance); AssertEx.EqualTolerance(1, Energy.FromErgs(joule.Ergs).Joules, ErgsTolerance); AssertEx.EqualTolerance(1, Energy.FromFootPounds(joule.FootPounds).Joules, FootPoundsTolerance); + AssertEx.EqualTolerance(1, Energy.FromGigabritishThermalUnits(joule.GigabritishThermalUnits).Joules, GigabritishThermalUnitsTolerance); AssertEx.EqualTolerance(1, Energy.FromGigawattHours(joule.GigawattHours).Joules, GigawattHoursTolerance); AssertEx.EqualTolerance(1, Energy.FromJoules(joule.Joules).Joules, JoulesTolerance); + AssertEx.EqualTolerance(1, Energy.FromKilobritishThermalUnits(joule.KilobritishThermalUnits).Joules, KilobritishThermalUnitsTolerance); AssertEx.EqualTolerance(1, Energy.FromKilocalories(joule.Kilocalories).Joules, KilocaloriesTolerance); AssertEx.EqualTolerance(1, Energy.FromKilojoules(joule.Kilojoules).Joules, KilojoulesTolerance); AssertEx.EqualTolerance(1, Energy.FromKilowattHours(joule.KilowattHours).Joules, KilowattHoursTolerance); + AssertEx.EqualTolerance(1, Energy.FromMegabritishThermalUnits(joule.MegabritishThermalUnits).Joules, MegabritishThermalUnitsTolerance); AssertEx.EqualTolerance(1, Energy.FromMegajoules(joule.Megajoules).Joules, MegajoulesTolerance); AssertEx.EqualTolerance(1, Energy.FromMegawattHours(joule.MegawattHours).Joules, MegawattHoursTolerance); AssertEx.EqualTolerance(1, Energy.FromThermsEc(joule.ThermsEc).Joules, ThermsEcTolerance); diff --git a/UnitsNet.Tests/GeneratedCode/FlowTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/FlowTestsBase.g.cs index 3abbbf7385..bdfccc969a 100644 --- a/UnitsNet.Tests/GeneratedCode/FlowTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/FlowTestsBase.g.cs @@ -54,6 +54,7 @@ public abstract partial class FlowTestsBase { protected abstract double CentilitersPerMinuteInOneCubicMeterPerSecond { get; } protected abstract double CubicDecimetersPerMinuteInOneCubicMeterPerSecond { get; } + protected abstract double CubicFeetPerHourInOneCubicMeterPerSecond { get; } protected abstract double CubicFeetPerSecondInOneCubicMeterPerSecond { get; } protected abstract double CubicMetersPerHourInOneCubicMeterPerSecond { get; } protected abstract double CubicMetersPerSecondInOneCubicMeterPerSecond { get; } @@ -72,6 +73,7 @@ public abstract partial class FlowTestsBase // ReSharper disable VirtualMemberNeverOverriden.Global protected virtual double CentilitersPerMinuteTolerance { get { return 1e-5; } } protected virtual double CubicDecimetersPerMinuteTolerance { get { return 1e-5; } } + protected virtual double CubicFeetPerHourTolerance { get { return 1e-5; } } protected virtual double CubicFeetPerSecondTolerance { get { return 1e-5; } } protected virtual double CubicMetersPerHourTolerance { get { return 1e-5; } } protected virtual double CubicMetersPerSecondTolerance { get { return 1e-5; } } @@ -94,6 +96,7 @@ public void CubicMeterPerSecondToFlowUnits() Flow cubicmeterpersecond = Flow.FromCubicMetersPerSecond(1); AssertEx.EqualTolerance(CentilitersPerMinuteInOneCubicMeterPerSecond, cubicmeterpersecond.CentilitersPerMinute, CentilitersPerMinuteTolerance); AssertEx.EqualTolerance(CubicDecimetersPerMinuteInOneCubicMeterPerSecond, cubicmeterpersecond.CubicDecimetersPerMinute, CubicDecimetersPerMinuteTolerance); + AssertEx.EqualTolerance(CubicFeetPerHourInOneCubicMeterPerSecond, cubicmeterpersecond.CubicFeetPerHour, CubicFeetPerHourTolerance); AssertEx.EqualTolerance(CubicFeetPerSecondInOneCubicMeterPerSecond, cubicmeterpersecond.CubicFeetPerSecond, CubicFeetPerSecondTolerance); AssertEx.EqualTolerance(CubicMetersPerHourInOneCubicMeterPerSecond, cubicmeterpersecond.CubicMetersPerHour, CubicMetersPerHourTolerance); AssertEx.EqualTolerance(CubicMetersPerSecondInOneCubicMeterPerSecond, cubicmeterpersecond.CubicMetersPerSecond, CubicMetersPerSecondTolerance); @@ -115,6 +118,7 @@ public void FromValueAndUnit() { AssertEx.EqualTolerance(1, Flow.From(1, FlowUnit.CentilitersPerMinute).CentilitersPerMinute, CentilitersPerMinuteTolerance); AssertEx.EqualTolerance(1, Flow.From(1, FlowUnit.CubicDecimeterPerMinute).CubicDecimetersPerMinute, CubicDecimetersPerMinuteTolerance); + AssertEx.EqualTolerance(1, Flow.From(1, FlowUnit.CubicFootPerHour).CubicFeetPerHour, CubicFeetPerHourTolerance); AssertEx.EqualTolerance(1, Flow.From(1, FlowUnit.CubicFootPerSecond).CubicFeetPerSecond, CubicFeetPerSecondTolerance); AssertEx.EqualTolerance(1, Flow.From(1, FlowUnit.CubicMeterPerHour).CubicMetersPerHour, CubicMetersPerHourTolerance); AssertEx.EqualTolerance(1, Flow.From(1, FlowUnit.CubicMeterPerSecond).CubicMetersPerSecond, CubicMetersPerSecondTolerance); @@ -137,6 +141,7 @@ public void As() var cubicmeterpersecond = Flow.FromCubicMetersPerSecond(1); AssertEx.EqualTolerance(CentilitersPerMinuteInOneCubicMeterPerSecond, cubicmeterpersecond.As(FlowUnit.CentilitersPerMinute), CentilitersPerMinuteTolerance); AssertEx.EqualTolerance(CubicDecimetersPerMinuteInOneCubicMeterPerSecond, cubicmeterpersecond.As(FlowUnit.CubicDecimeterPerMinute), CubicDecimetersPerMinuteTolerance); + AssertEx.EqualTolerance(CubicFeetPerHourInOneCubicMeterPerSecond, cubicmeterpersecond.As(FlowUnit.CubicFootPerHour), CubicFeetPerHourTolerance); AssertEx.EqualTolerance(CubicFeetPerSecondInOneCubicMeterPerSecond, cubicmeterpersecond.As(FlowUnit.CubicFootPerSecond), CubicFeetPerSecondTolerance); AssertEx.EqualTolerance(CubicMetersPerHourInOneCubicMeterPerSecond, cubicmeterpersecond.As(FlowUnit.CubicMeterPerHour), CubicMetersPerHourTolerance); AssertEx.EqualTolerance(CubicMetersPerSecondInOneCubicMeterPerSecond, cubicmeterpersecond.As(FlowUnit.CubicMeterPerSecond), CubicMetersPerSecondTolerance); @@ -159,6 +164,7 @@ public void ConversionRoundTrip() Flow cubicmeterpersecond = Flow.FromCubicMetersPerSecond(1); AssertEx.EqualTolerance(1, Flow.FromCentilitersPerMinute(cubicmeterpersecond.CentilitersPerMinute).CubicMetersPerSecond, CentilitersPerMinuteTolerance); AssertEx.EqualTolerance(1, Flow.FromCubicDecimetersPerMinute(cubicmeterpersecond.CubicDecimetersPerMinute).CubicMetersPerSecond, CubicDecimetersPerMinuteTolerance); + AssertEx.EqualTolerance(1, Flow.FromCubicFeetPerHour(cubicmeterpersecond.CubicFeetPerHour).CubicMetersPerSecond, CubicFeetPerHourTolerance); AssertEx.EqualTolerance(1, Flow.FromCubicFeetPerSecond(cubicmeterpersecond.CubicFeetPerSecond).CubicMetersPerSecond, CubicFeetPerSecondTolerance); AssertEx.EqualTolerance(1, Flow.FromCubicMetersPerHour(cubicmeterpersecond.CubicMetersPerHour).CubicMetersPerSecond, CubicMetersPerHourTolerance); AssertEx.EqualTolerance(1, Flow.FromCubicMetersPerSecond(cubicmeterpersecond.CubicMetersPerSecond).CubicMetersPerSecond, CubicMetersPerSecondTolerance); diff --git a/UnitsNet.Tests/GeneratedCode/MassFlowTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/MassFlowTestsBase.g.cs index cfc5ecb4dd..22e9b5dba4 100644 --- a/UnitsNet.Tests/GeneratedCode/MassFlowTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/MassFlowTestsBase.g.cs @@ -59,10 +59,12 @@ public abstract partial class MassFlowTestsBase protected abstract double HectogramsPerSecondInOneGramPerSecond { get; } protected abstract double KilogramsPerHourInOneGramPerSecond { get; } protected abstract double KilogramsPerSecondInOneGramPerSecond { get; } + protected abstract double MegapoundsPerHourInOneGramPerSecond { get; } protected abstract double MicrogramsPerSecondInOneGramPerSecond { get; } protected abstract double MilligramsPerSecondInOneGramPerSecond { get; } protected abstract double NanogramsPerSecondInOneGramPerSecond { get; } protected abstract double PoundsPerHourInOneGramPerSecond { get; } + protected abstract double ShortTonsPerHourInOneGramPerSecond { get; } protected abstract double TonnesPerDayInOneGramPerSecond { get; } // ReSharper disable VirtualMemberNeverOverriden.Global @@ -73,10 +75,12 @@ public abstract partial class MassFlowTestsBase protected virtual double HectogramsPerSecondTolerance { get { return 1e-5; } } protected virtual double KilogramsPerHourTolerance { get { return 1e-5; } } protected virtual double KilogramsPerSecondTolerance { get { return 1e-5; } } + protected virtual double MegapoundsPerHourTolerance { get { return 1e-5; } } protected virtual double MicrogramsPerSecondTolerance { get { return 1e-5; } } protected virtual double MilligramsPerSecondTolerance { get { return 1e-5; } } protected virtual double NanogramsPerSecondTolerance { get { return 1e-5; } } protected virtual double PoundsPerHourTolerance { get { return 1e-5; } } + protected virtual double ShortTonsPerHourTolerance { get { return 1e-5; } } protected virtual double TonnesPerDayTolerance { get { return 1e-5; } } // ReSharper restore VirtualMemberNeverOverriden.Global @@ -91,10 +95,12 @@ public void GramPerSecondToMassFlowUnits() AssertEx.EqualTolerance(HectogramsPerSecondInOneGramPerSecond, grampersecond.HectogramsPerSecond, HectogramsPerSecondTolerance); AssertEx.EqualTolerance(KilogramsPerHourInOneGramPerSecond, grampersecond.KilogramsPerHour, KilogramsPerHourTolerance); AssertEx.EqualTolerance(KilogramsPerSecondInOneGramPerSecond, grampersecond.KilogramsPerSecond, KilogramsPerSecondTolerance); + AssertEx.EqualTolerance(MegapoundsPerHourInOneGramPerSecond, grampersecond.MegapoundsPerHour, MegapoundsPerHourTolerance); AssertEx.EqualTolerance(MicrogramsPerSecondInOneGramPerSecond, grampersecond.MicrogramsPerSecond, MicrogramsPerSecondTolerance); AssertEx.EqualTolerance(MilligramsPerSecondInOneGramPerSecond, grampersecond.MilligramsPerSecond, MilligramsPerSecondTolerance); AssertEx.EqualTolerance(NanogramsPerSecondInOneGramPerSecond, grampersecond.NanogramsPerSecond, NanogramsPerSecondTolerance); AssertEx.EqualTolerance(PoundsPerHourInOneGramPerSecond, grampersecond.PoundsPerHour, PoundsPerHourTolerance); + AssertEx.EqualTolerance(ShortTonsPerHourInOneGramPerSecond, grampersecond.ShortTonsPerHour, ShortTonsPerHourTolerance); AssertEx.EqualTolerance(TonnesPerDayInOneGramPerSecond, grampersecond.TonnesPerDay, TonnesPerDayTolerance); } @@ -108,10 +114,12 @@ public void FromValueAndUnit() AssertEx.EqualTolerance(1, MassFlow.From(1, MassFlowUnit.HectogramPerSecond).HectogramsPerSecond, HectogramsPerSecondTolerance); AssertEx.EqualTolerance(1, MassFlow.From(1, MassFlowUnit.KilogramPerHour).KilogramsPerHour, KilogramsPerHourTolerance); AssertEx.EqualTolerance(1, MassFlow.From(1, MassFlowUnit.KilogramPerSecond).KilogramsPerSecond, KilogramsPerSecondTolerance); + AssertEx.EqualTolerance(1, MassFlow.From(1, MassFlowUnit.MegapoundPerHour).MegapoundsPerHour, MegapoundsPerHourTolerance); AssertEx.EqualTolerance(1, MassFlow.From(1, MassFlowUnit.MicrogramPerSecond).MicrogramsPerSecond, MicrogramsPerSecondTolerance); AssertEx.EqualTolerance(1, MassFlow.From(1, MassFlowUnit.MilligramPerSecond).MilligramsPerSecond, MilligramsPerSecondTolerance); AssertEx.EqualTolerance(1, MassFlow.From(1, MassFlowUnit.NanogramPerSecond).NanogramsPerSecond, NanogramsPerSecondTolerance); AssertEx.EqualTolerance(1, MassFlow.From(1, MassFlowUnit.PoundPerHour).PoundsPerHour, PoundsPerHourTolerance); + AssertEx.EqualTolerance(1, MassFlow.From(1, MassFlowUnit.ShortTonPerHour).ShortTonsPerHour, ShortTonsPerHourTolerance); AssertEx.EqualTolerance(1, MassFlow.From(1, MassFlowUnit.TonnePerDay).TonnesPerDay, TonnesPerDayTolerance); } @@ -126,10 +134,12 @@ public void As() AssertEx.EqualTolerance(HectogramsPerSecondInOneGramPerSecond, grampersecond.As(MassFlowUnit.HectogramPerSecond), HectogramsPerSecondTolerance); AssertEx.EqualTolerance(KilogramsPerHourInOneGramPerSecond, grampersecond.As(MassFlowUnit.KilogramPerHour), KilogramsPerHourTolerance); AssertEx.EqualTolerance(KilogramsPerSecondInOneGramPerSecond, grampersecond.As(MassFlowUnit.KilogramPerSecond), KilogramsPerSecondTolerance); + AssertEx.EqualTolerance(MegapoundsPerHourInOneGramPerSecond, grampersecond.As(MassFlowUnit.MegapoundPerHour), MegapoundsPerHourTolerance); AssertEx.EqualTolerance(MicrogramsPerSecondInOneGramPerSecond, grampersecond.As(MassFlowUnit.MicrogramPerSecond), MicrogramsPerSecondTolerance); AssertEx.EqualTolerance(MilligramsPerSecondInOneGramPerSecond, grampersecond.As(MassFlowUnit.MilligramPerSecond), MilligramsPerSecondTolerance); AssertEx.EqualTolerance(NanogramsPerSecondInOneGramPerSecond, grampersecond.As(MassFlowUnit.NanogramPerSecond), NanogramsPerSecondTolerance); AssertEx.EqualTolerance(PoundsPerHourInOneGramPerSecond, grampersecond.As(MassFlowUnit.PoundPerHour), PoundsPerHourTolerance); + AssertEx.EqualTolerance(ShortTonsPerHourInOneGramPerSecond, grampersecond.As(MassFlowUnit.ShortTonPerHour), ShortTonsPerHourTolerance); AssertEx.EqualTolerance(TonnesPerDayInOneGramPerSecond, grampersecond.As(MassFlowUnit.TonnePerDay), TonnesPerDayTolerance); } @@ -144,10 +154,12 @@ public void ConversionRoundTrip() AssertEx.EqualTolerance(1, MassFlow.FromHectogramsPerSecond(grampersecond.HectogramsPerSecond).GramsPerSecond, HectogramsPerSecondTolerance); AssertEx.EqualTolerance(1, MassFlow.FromKilogramsPerHour(grampersecond.KilogramsPerHour).GramsPerSecond, KilogramsPerHourTolerance); AssertEx.EqualTolerance(1, MassFlow.FromKilogramsPerSecond(grampersecond.KilogramsPerSecond).GramsPerSecond, KilogramsPerSecondTolerance); + AssertEx.EqualTolerance(1, MassFlow.FromMegapoundsPerHour(grampersecond.MegapoundsPerHour).GramsPerSecond, MegapoundsPerHourTolerance); AssertEx.EqualTolerance(1, MassFlow.FromMicrogramsPerSecond(grampersecond.MicrogramsPerSecond).GramsPerSecond, MicrogramsPerSecondTolerance); AssertEx.EqualTolerance(1, MassFlow.FromMilligramsPerSecond(grampersecond.MilligramsPerSecond).GramsPerSecond, MilligramsPerSecondTolerance); AssertEx.EqualTolerance(1, MassFlow.FromNanogramsPerSecond(grampersecond.NanogramsPerSecond).GramsPerSecond, NanogramsPerSecondTolerance); AssertEx.EqualTolerance(1, MassFlow.FromPoundsPerHour(grampersecond.PoundsPerHour).GramsPerSecond, PoundsPerHourTolerance); + AssertEx.EqualTolerance(1, MassFlow.FromShortTonsPerHour(grampersecond.ShortTonsPerHour).GramsPerSecond, ShortTonsPerHourTolerance); AssertEx.EqualTolerance(1, MassFlow.FromTonnesPerDay(grampersecond.TonnesPerDay).GramsPerSecond, TonnesPerDayTolerance); } diff --git a/UnitsNet.Tests/GeneratedCode/MassTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/MassTestsBase.g.cs index 9586645a80..d72452d518 100644 --- a/UnitsNet.Tests/GeneratedCode/MassTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/MassTestsBase.g.cs @@ -58,9 +58,11 @@ public abstract partial class MassTestsBase protected abstract double GramsInOneKilogram { get; } protected abstract double HectogramsInOneKilogram { get; } protected abstract double KilogramsInOneKilogram { get; } + protected abstract double KilopoundsInOneKilogram { get; } protected abstract double KilotonnesInOneKilogram { get; } protected abstract double LongHundredweightInOneKilogram { get; } protected abstract double LongTonsInOneKilogram { get; } + protected abstract double MegapoundsInOneKilogram { get; } protected abstract double MegatonnesInOneKilogram { get; } protected abstract double MicrogramsInOneKilogram { get; } protected abstract double MilligramsInOneKilogram { get; } @@ -79,9 +81,11 @@ public abstract partial class MassTestsBase protected virtual double GramsTolerance { get { return 1e-5; } } protected virtual double HectogramsTolerance { get { return 1e-5; } } protected virtual double KilogramsTolerance { get { return 1e-5; } } + protected virtual double KilopoundsTolerance { get { return 1e-5; } } protected virtual double KilotonnesTolerance { get { return 1e-5; } } protected virtual double LongHundredweightTolerance { get { return 1e-5; } } protected virtual double LongTonsTolerance { get { return 1e-5; } } + protected virtual double MegapoundsTolerance { get { return 1e-5; } } protected virtual double MegatonnesTolerance { get { return 1e-5; } } protected virtual double MicrogramsTolerance { get { return 1e-5; } } protected virtual double MilligramsTolerance { get { return 1e-5; } } @@ -104,9 +108,11 @@ public void KilogramToMassUnits() AssertEx.EqualTolerance(GramsInOneKilogram, kilogram.Grams, GramsTolerance); AssertEx.EqualTolerance(HectogramsInOneKilogram, kilogram.Hectograms, HectogramsTolerance); AssertEx.EqualTolerance(KilogramsInOneKilogram, kilogram.Kilograms, KilogramsTolerance); + AssertEx.EqualTolerance(KilopoundsInOneKilogram, kilogram.Kilopounds, KilopoundsTolerance); AssertEx.EqualTolerance(KilotonnesInOneKilogram, kilogram.Kilotonnes, KilotonnesTolerance); AssertEx.EqualTolerance(LongHundredweightInOneKilogram, kilogram.LongHundredweight, LongHundredweightTolerance); AssertEx.EqualTolerance(LongTonsInOneKilogram, kilogram.LongTons, LongTonsTolerance); + AssertEx.EqualTolerance(MegapoundsInOneKilogram, kilogram.Megapounds, MegapoundsTolerance); AssertEx.EqualTolerance(MegatonnesInOneKilogram, kilogram.Megatonnes, MegatonnesTolerance); AssertEx.EqualTolerance(MicrogramsInOneKilogram, kilogram.Micrograms, MicrogramsTolerance); AssertEx.EqualTolerance(MilligramsInOneKilogram, kilogram.Milligrams, MilligramsTolerance); @@ -128,9 +134,11 @@ public void FromValueAndUnit() AssertEx.EqualTolerance(1, Mass.From(1, MassUnit.Gram).Grams, GramsTolerance); AssertEx.EqualTolerance(1, Mass.From(1, MassUnit.Hectogram).Hectograms, HectogramsTolerance); AssertEx.EqualTolerance(1, Mass.From(1, MassUnit.Kilogram).Kilograms, KilogramsTolerance); + AssertEx.EqualTolerance(1, Mass.From(1, MassUnit.Kilopound).Kilopounds, KilopoundsTolerance); AssertEx.EqualTolerance(1, Mass.From(1, MassUnit.Kilotonne).Kilotonnes, KilotonnesTolerance); AssertEx.EqualTolerance(1, Mass.From(1, MassUnit.LongHundredweight).LongHundredweight, LongHundredweightTolerance); AssertEx.EqualTolerance(1, Mass.From(1, MassUnit.LongTon).LongTons, LongTonsTolerance); + AssertEx.EqualTolerance(1, Mass.From(1, MassUnit.Megapound).Megapounds, MegapoundsTolerance); AssertEx.EqualTolerance(1, Mass.From(1, MassUnit.Megatonne).Megatonnes, MegatonnesTolerance); AssertEx.EqualTolerance(1, Mass.From(1, MassUnit.Microgram).Micrograms, MicrogramsTolerance); AssertEx.EqualTolerance(1, Mass.From(1, MassUnit.Milligram).Milligrams, MilligramsTolerance); @@ -153,9 +161,11 @@ public void As() AssertEx.EqualTolerance(GramsInOneKilogram, kilogram.As(MassUnit.Gram), GramsTolerance); AssertEx.EqualTolerance(HectogramsInOneKilogram, kilogram.As(MassUnit.Hectogram), HectogramsTolerance); AssertEx.EqualTolerance(KilogramsInOneKilogram, kilogram.As(MassUnit.Kilogram), KilogramsTolerance); + AssertEx.EqualTolerance(KilopoundsInOneKilogram, kilogram.As(MassUnit.Kilopound), KilopoundsTolerance); AssertEx.EqualTolerance(KilotonnesInOneKilogram, kilogram.As(MassUnit.Kilotonne), KilotonnesTolerance); AssertEx.EqualTolerance(LongHundredweightInOneKilogram, kilogram.As(MassUnit.LongHundredweight), LongHundredweightTolerance); AssertEx.EqualTolerance(LongTonsInOneKilogram, kilogram.As(MassUnit.LongTon), LongTonsTolerance); + AssertEx.EqualTolerance(MegapoundsInOneKilogram, kilogram.As(MassUnit.Megapound), MegapoundsTolerance); AssertEx.EqualTolerance(MegatonnesInOneKilogram, kilogram.As(MassUnit.Megatonne), MegatonnesTolerance); AssertEx.EqualTolerance(MicrogramsInOneKilogram, kilogram.As(MassUnit.Microgram), MicrogramsTolerance); AssertEx.EqualTolerance(MilligramsInOneKilogram, kilogram.As(MassUnit.Milligram), MilligramsTolerance); @@ -178,9 +188,11 @@ public void ConversionRoundTrip() AssertEx.EqualTolerance(1, Mass.FromGrams(kilogram.Grams).Kilograms, GramsTolerance); AssertEx.EqualTolerance(1, Mass.FromHectograms(kilogram.Hectograms).Kilograms, HectogramsTolerance); AssertEx.EqualTolerance(1, Mass.FromKilograms(kilogram.Kilograms).Kilograms, KilogramsTolerance); + AssertEx.EqualTolerance(1, Mass.FromKilopounds(kilogram.Kilopounds).Kilograms, KilopoundsTolerance); AssertEx.EqualTolerance(1, Mass.FromKilotonnes(kilogram.Kilotonnes).Kilograms, KilotonnesTolerance); AssertEx.EqualTolerance(1, Mass.FromLongHundredweight(kilogram.LongHundredweight).Kilograms, LongHundredweightTolerance); AssertEx.EqualTolerance(1, Mass.FromLongTons(kilogram.LongTons).Kilograms, LongTonsTolerance); + AssertEx.EqualTolerance(1, Mass.FromMegapounds(kilogram.Megapounds).Kilograms, MegapoundsTolerance); AssertEx.EqualTolerance(1, Mass.FromMegatonnes(kilogram.Megatonnes).Kilograms, MegatonnesTolerance); AssertEx.EqualTolerance(1, Mass.FromMicrograms(kilogram.Micrograms).Kilograms, MicrogramsTolerance); AssertEx.EqualTolerance(1, Mass.FromMilligrams(kilogram.Milligrams).Kilograms, MilligramsTolerance); diff --git a/UnitsNet.Tests/GeneratedCode/PowerTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/PowerTestsBase.g.cs index e24aa974d6..2b86bf5d59 100644 --- a/UnitsNet.Tests/GeneratedCode/PowerTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/PowerTestsBase.g.cs @@ -53,10 +53,12 @@ namespace UnitsNet.Tests public abstract partial class PowerTestsBase { protected abstract double BoilerHorsepowerInOneWatt { get; } + protected abstract double BritishThermalUnitsPerHourInOneWatt { get; } protected abstract double ElectricalHorsepowerInOneWatt { get; } protected abstract double FemtowattsInOneWatt { get; } protected abstract double GigawattsInOneWatt { get; } protected abstract double HydraulicHorsepowerInOneWatt { get; } + protected abstract double KilobritishThermalUnitsPerHourInOneWatt { get; } protected abstract double KilowattsInOneWatt { get; } protected abstract double MechanicalHorsepowerInOneWatt { get; } protected abstract double MegawattsInOneWatt { get; } @@ -71,10 +73,12 @@ public abstract partial class PowerTestsBase // ReSharper disable VirtualMemberNeverOverriden.Global protected virtual double BoilerHorsepowerTolerance { get { return 1e-5; } } + protected virtual double BritishThermalUnitsPerHourTolerance { get { return 1e-5; } } protected virtual double ElectricalHorsepowerTolerance { get { return 1e-5; } } protected virtual double FemtowattsTolerance { get { return 1e-5; } } protected virtual double GigawattsTolerance { get { return 1e-5; } } protected virtual double HydraulicHorsepowerTolerance { get { return 1e-5; } } + protected virtual double KilobritishThermalUnitsPerHourTolerance { get { return 1e-5; } } protected virtual double KilowattsTolerance { get { return 1e-5; } } protected virtual double MechanicalHorsepowerTolerance { get { return 1e-5; } } protected virtual double MegawattsTolerance { get { return 1e-5; } } @@ -93,10 +97,12 @@ public void WattToPowerUnits() { Power watt = Power.FromWatts(1); AssertEx.EqualTolerance(BoilerHorsepowerInOneWatt, watt.BoilerHorsepower, BoilerHorsepowerTolerance); + AssertEx.EqualTolerance(BritishThermalUnitsPerHourInOneWatt, watt.BritishThermalUnitsPerHour, BritishThermalUnitsPerHourTolerance); AssertEx.EqualTolerance(ElectricalHorsepowerInOneWatt, watt.ElectricalHorsepower, ElectricalHorsepowerTolerance); AssertEx.EqualTolerance(FemtowattsInOneWatt, watt.Femtowatts, FemtowattsTolerance); AssertEx.EqualTolerance(GigawattsInOneWatt, watt.Gigawatts, GigawattsTolerance); AssertEx.EqualTolerance(HydraulicHorsepowerInOneWatt, watt.HydraulicHorsepower, HydraulicHorsepowerTolerance); + AssertEx.EqualTolerance(KilobritishThermalUnitsPerHourInOneWatt, watt.KilobritishThermalUnitsPerHour, KilobritishThermalUnitsPerHourTolerance); AssertEx.EqualTolerance(KilowattsInOneWatt, watt.Kilowatts, KilowattsTolerance); AssertEx.EqualTolerance(MechanicalHorsepowerInOneWatt, watt.MechanicalHorsepower, MechanicalHorsepowerTolerance); AssertEx.EqualTolerance(MegawattsInOneWatt, watt.Megawatts, MegawattsTolerance); @@ -114,10 +120,12 @@ public void WattToPowerUnits() public void FromValueAndUnit() { AssertEx.EqualTolerance(1, Power.From(1, PowerUnit.BoilerHorsepower).BoilerHorsepower, BoilerHorsepowerTolerance); + AssertEx.EqualTolerance(1, Power.From(1, PowerUnit.BritishThermalUnitPerHour).BritishThermalUnitsPerHour, BritishThermalUnitsPerHourTolerance); AssertEx.EqualTolerance(1, Power.From(1, PowerUnit.ElectricalHorsepower).ElectricalHorsepower, ElectricalHorsepowerTolerance); AssertEx.EqualTolerance(1, Power.From(1, PowerUnit.Femtowatt).Femtowatts, FemtowattsTolerance); AssertEx.EqualTolerance(1, Power.From(1, PowerUnit.Gigawatt).Gigawatts, GigawattsTolerance); AssertEx.EqualTolerance(1, Power.From(1, PowerUnit.HydraulicHorsepower).HydraulicHorsepower, HydraulicHorsepowerTolerance); + AssertEx.EqualTolerance(1, Power.From(1, PowerUnit.KilobritishThermalUnitPerHour).KilobritishThermalUnitsPerHour, KilobritishThermalUnitsPerHourTolerance); AssertEx.EqualTolerance(1, Power.From(1, PowerUnit.Kilowatt).Kilowatts, KilowattsTolerance); AssertEx.EqualTolerance(1, Power.From(1, PowerUnit.MechanicalHorsepower).MechanicalHorsepower, MechanicalHorsepowerTolerance); AssertEx.EqualTolerance(1, Power.From(1, PowerUnit.Megawatt).Megawatts, MegawattsTolerance); @@ -136,10 +144,12 @@ public void As() { var watt = Power.FromWatts(1); AssertEx.EqualTolerance(BoilerHorsepowerInOneWatt, watt.As(PowerUnit.BoilerHorsepower), BoilerHorsepowerTolerance); + AssertEx.EqualTolerance(BritishThermalUnitsPerHourInOneWatt, watt.As(PowerUnit.BritishThermalUnitPerHour), BritishThermalUnitsPerHourTolerance); AssertEx.EqualTolerance(ElectricalHorsepowerInOneWatt, watt.As(PowerUnit.ElectricalHorsepower), ElectricalHorsepowerTolerance); AssertEx.EqualTolerance(FemtowattsInOneWatt, watt.As(PowerUnit.Femtowatt), FemtowattsTolerance); AssertEx.EqualTolerance(GigawattsInOneWatt, watt.As(PowerUnit.Gigawatt), GigawattsTolerance); AssertEx.EqualTolerance(HydraulicHorsepowerInOneWatt, watt.As(PowerUnit.HydraulicHorsepower), HydraulicHorsepowerTolerance); + AssertEx.EqualTolerance(KilobritishThermalUnitsPerHourInOneWatt, watt.As(PowerUnit.KilobritishThermalUnitPerHour), KilobritishThermalUnitsPerHourTolerance); AssertEx.EqualTolerance(KilowattsInOneWatt, watt.As(PowerUnit.Kilowatt), KilowattsTolerance); AssertEx.EqualTolerance(MechanicalHorsepowerInOneWatt, watt.As(PowerUnit.MechanicalHorsepower), MechanicalHorsepowerTolerance); AssertEx.EqualTolerance(MegawattsInOneWatt, watt.As(PowerUnit.Megawatt), MegawattsTolerance); @@ -158,10 +168,12 @@ public void ConversionRoundTrip() { Power watt = Power.FromWatts(1); AssertEx.EqualTolerance(1, Power.FromBoilerHorsepower(watt.BoilerHorsepower).Watts, BoilerHorsepowerTolerance); + AssertEx.EqualTolerance(1, Power.FromBritishThermalUnitsPerHour(watt.BritishThermalUnitsPerHour).Watts, BritishThermalUnitsPerHourTolerance); AssertEx.EqualTolerance(1, Power.FromElectricalHorsepower(watt.ElectricalHorsepower).Watts, ElectricalHorsepowerTolerance); AssertEx.EqualTolerance(1, Power.FromFemtowatts(watt.Femtowatts).Watts, FemtowattsTolerance); AssertEx.EqualTolerance(1, Power.FromGigawatts(watt.Gigawatts).Watts, GigawattsTolerance); AssertEx.EqualTolerance(1, Power.FromHydraulicHorsepower(watt.HydraulicHorsepower).Watts, HydraulicHorsepowerTolerance); + AssertEx.EqualTolerance(1, Power.FromKilobritishThermalUnitsPerHour(watt.KilobritishThermalUnitsPerHour).Watts, KilobritishThermalUnitsPerHourTolerance); AssertEx.EqualTolerance(1, Power.FromKilowatts(watt.Kilowatts).Watts, KilowattsTolerance); AssertEx.EqualTolerance(1, Power.FromMechanicalHorsepower(watt.MechanicalHorsepower).Watts, MechanicalHorsepowerTolerance); AssertEx.EqualTolerance(1, Power.FromMegawatts(watt.Megawatts).Watts, MegawattsTolerance); diff --git a/UnitsNet.Tests/GeneratedCode/VolumeTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/VolumeTestsBase.g.cs index 193312910b..94ae0df9c0 100644 --- a/UnitsNet.Tests/GeneratedCode/VolumeTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/VolumeTestsBase.g.cs @@ -65,11 +65,20 @@ public abstract partial class VolumeTestsBase protected abstract double CubicMillimetersInOneCubicMeter { get; } protected abstract double CubicYardsInOneCubicMeter { get; } protected abstract double DecilitersInOneCubicMeter { get; } + protected abstract double HectocubicFeetInOneCubicMeter { get; } + protected abstract double HectocubicMetersInOneCubicMeter { get; } protected abstract double HectolitersInOneCubicMeter { get; } protected abstract double ImperialBeerBarrelsInOneCubicMeter { get; } protected abstract double ImperialGallonsInOneCubicMeter { get; } protected abstract double ImperialOuncesInOneCubicMeter { get; } + protected abstract double KilocubicFeetInOneCubicMeter { get; } + protected abstract double KilocubicMetersInOneCubicMeter { get; } + protected abstract double KiloimperialGallonsInOneCubicMeter { get; } + protected abstract double KilousGallonsInOneCubicMeter { get; } protected abstract double LitersInOneCubicMeter { get; } + protected abstract double MegacubicFeetInOneCubicMeter { get; } + protected abstract double MegaimperialGallonsInOneCubicMeter { get; } + protected abstract double MegausGallonsInOneCubicMeter { get; } protected abstract double MetricCupsInOneCubicMeter { get; } protected abstract double MetricTeaspoonsInOneCubicMeter { get; } protected abstract double MicrolitersInOneCubicMeter { get; } @@ -100,11 +109,20 @@ public abstract partial class VolumeTestsBase protected virtual double CubicMillimetersTolerance { get { return 1e-5; } } protected virtual double CubicYardsTolerance { get { return 1e-5; } } protected virtual double DecilitersTolerance { get { return 1e-5; } } + protected virtual double HectocubicFeetTolerance { get { return 1e-5; } } + protected virtual double HectocubicMetersTolerance { get { return 1e-5; } } protected virtual double HectolitersTolerance { get { return 1e-5; } } protected virtual double ImperialBeerBarrelsTolerance { get { return 1e-5; } } protected virtual double ImperialGallonsTolerance { get { return 1e-5; } } protected virtual double ImperialOuncesTolerance { get { return 1e-5; } } + protected virtual double KilocubicFeetTolerance { get { return 1e-5; } } + protected virtual double KilocubicMetersTolerance { get { return 1e-5; } } + protected virtual double KiloimperialGallonsTolerance { get { return 1e-5; } } + protected virtual double KilousGallonsTolerance { get { return 1e-5; } } protected virtual double LitersTolerance { get { return 1e-5; } } + protected virtual double MegacubicFeetTolerance { get { return 1e-5; } } + protected virtual double MegaimperialGallonsTolerance { get { return 1e-5; } } + protected virtual double MegausGallonsTolerance { get { return 1e-5; } } protected virtual double MetricCupsTolerance { get { return 1e-5; } } protected virtual double MetricTeaspoonsTolerance { get { return 1e-5; } } protected virtual double MicrolitersTolerance { get { return 1e-5; } } @@ -139,11 +157,20 @@ public void CubicMeterToVolumeUnits() AssertEx.EqualTolerance(CubicMillimetersInOneCubicMeter, cubicmeter.CubicMillimeters, CubicMillimetersTolerance); AssertEx.EqualTolerance(CubicYardsInOneCubicMeter, cubicmeter.CubicYards, CubicYardsTolerance); AssertEx.EqualTolerance(DecilitersInOneCubicMeter, cubicmeter.Deciliters, DecilitersTolerance); + AssertEx.EqualTolerance(HectocubicFeetInOneCubicMeter, cubicmeter.HectocubicFeet, HectocubicFeetTolerance); + AssertEx.EqualTolerance(HectocubicMetersInOneCubicMeter, cubicmeter.HectocubicMeters, HectocubicMetersTolerance); AssertEx.EqualTolerance(HectolitersInOneCubicMeter, cubicmeter.Hectoliters, HectolitersTolerance); AssertEx.EqualTolerance(ImperialBeerBarrelsInOneCubicMeter, cubicmeter.ImperialBeerBarrels, ImperialBeerBarrelsTolerance); AssertEx.EqualTolerance(ImperialGallonsInOneCubicMeter, cubicmeter.ImperialGallons, ImperialGallonsTolerance); AssertEx.EqualTolerance(ImperialOuncesInOneCubicMeter, cubicmeter.ImperialOunces, ImperialOuncesTolerance); + AssertEx.EqualTolerance(KilocubicFeetInOneCubicMeter, cubicmeter.KilocubicFeet, KilocubicFeetTolerance); + AssertEx.EqualTolerance(KilocubicMetersInOneCubicMeter, cubicmeter.KilocubicMeters, KilocubicMetersTolerance); + AssertEx.EqualTolerance(KiloimperialGallonsInOneCubicMeter, cubicmeter.KiloimperialGallons, KiloimperialGallonsTolerance); + AssertEx.EqualTolerance(KilousGallonsInOneCubicMeter, cubicmeter.KilousGallons, KilousGallonsTolerance); AssertEx.EqualTolerance(LitersInOneCubicMeter, cubicmeter.Liters, LitersTolerance); + AssertEx.EqualTolerance(MegacubicFeetInOneCubicMeter, cubicmeter.MegacubicFeet, MegacubicFeetTolerance); + AssertEx.EqualTolerance(MegaimperialGallonsInOneCubicMeter, cubicmeter.MegaimperialGallons, MegaimperialGallonsTolerance); + AssertEx.EqualTolerance(MegausGallonsInOneCubicMeter, cubicmeter.MegausGallons, MegausGallonsTolerance); AssertEx.EqualTolerance(MetricCupsInOneCubicMeter, cubicmeter.MetricCups, MetricCupsTolerance); AssertEx.EqualTolerance(MetricTeaspoonsInOneCubicMeter, cubicmeter.MetricTeaspoons, MetricTeaspoonsTolerance); AssertEx.EqualTolerance(MicrolitersInOneCubicMeter, cubicmeter.Microliters, MicrolitersTolerance); @@ -177,11 +204,20 @@ public void FromValueAndUnit() AssertEx.EqualTolerance(1, Volume.From(1, VolumeUnit.CubicMillimeter).CubicMillimeters, CubicMillimetersTolerance); AssertEx.EqualTolerance(1, Volume.From(1, VolumeUnit.CubicYard).CubicYards, CubicYardsTolerance); AssertEx.EqualTolerance(1, Volume.From(1, VolumeUnit.Deciliter).Deciliters, DecilitersTolerance); + AssertEx.EqualTolerance(1, Volume.From(1, VolumeUnit.HectocubicFoot).HectocubicFeet, HectocubicFeetTolerance); + AssertEx.EqualTolerance(1, Volume.From(1, VolumeUnit.HectocubicMeter).HectocubicMeters, HectocubicMetersTolerance); AssertEx.EqualTolerance(1, Volume.From(1, VolumeUnit.Hectoliter).Hectoliters, HectolitersTolerance); AssertEx.EqualTolerance(1, Volume.From(1, VolumeUnit.ImperialBeerBarrel).ImperialBeerBarrels, ImperialBeerBarrelsTolerance); AssertEx.EqualTolerance(1, Volume.From(1, VolumeUnit.ImperialGallon).ImperialGallons, ImperialGallonsTolerance); AssertEx.EqualTolerance(1, Volume.From(1, VolumeUnit.ImperialOunce).ImperialOunces, ImperialOuncesTolerance); + AssertEx.EqualTolerance(1, Volume.From(1, VolumeUnit.KilocubicFoot).KilocubicFeet, KilocubicFeetTolerance); + AssertEx.EqualTolerance(1, Volume.From(1, VolumeUnit.KilocubicMeter).KilocubicMeters, KilocubicMetersTolerance); + AssertEx.EqualTolerance(1, Volume.From(1, VolumeUnit.KiloimperialGallon).KiloimperialGallons, KiloimperialGallonsTolerance); + AssertEx.EqualTolerance(1, Volume.From(1, VolumeUnit.KilousGallon).KilousGallons, KilousGallonsTolerance); AssertEx.EqualTolerance(1, Volume.From(1, VolumeUnit.Liter).Liters, LitersTolerance); + AssertEx.EqualTolerance(1, Volume.From(1, VolumeUnit.MegacubicFoot).MegacubicFeet, MegacubicFeetTolerance); + AssertEx.EqualTolerance(1, Volume.From(1, VolumeUnit.MegaimperialGallon).MegaimperialGallons, MegaimperialGallonsTolerance); + AssertEx.EqualTolerance(1, Volume.From(1, VolumeUnit.MegausGallon).MegausGallons, MegausGallonsTolerance); AssertEx.EqualTolerance(1, Volume.From(1, VolumeUnit.MetricCup).MetricCups, MetricCupsTolerance); AssertEx.EqualTolerance(1, Volume.From(1, VolumeUnit.MetricTeaspoon).MetricTeaspoons, MetricTeaspoonsTolerance); AssertEx.EqualTolerance(1, Volume.From(1, VolumeUnit.Microliter).Microliters, MicrolitersTolerance); @@ -216,11 +252,20 @@ public void As() AssertEx.EqualTolerance(CubicMillimetersInOneCubicMeter, cubicmeter.As(VolumeUnit.CubicMillimeter), CubicMillimetersTolerance); AssertEx.EqualTolerance(CubicYardsInOneCubicMeter, cubicmeter.As(VolumeUnit.CubicYard), CubicYardsTolerance); AssertEx.EqualTolerance(DecilitersInOneCubicMeter, cubicmeter.As(VolumeUnit.Deciliter), DecilitersTolerance); + AssertEx.EqualTolerance(HectocubicFeetInOneCubicMeter, cubicmeter.As(VolumeUnit.HectocubicFoot), HectocubicFeetTolerance); + AssertEx.EqualTolerance(HectocubicMetersInOneCubicMeter, cubicmeter.As(VolumeUnit.HectocubicMeter), HectocubicMetersTolerance); AssertEx.EqualTolerance(HectolitersInOneCubicMeter, cubicmeter.As(VolumeUnit.Hectoliter), HectolitersTolerance); AssertEx.EqualTolerance(ImperialBeerBarrelsInOneCubicMeter, cubicmeter.As(VolumeUnit.ImperialBeerBarrel), ImperialBeerBarrelsTolerance); AssertEx.EqualTolerance(ImperialGallonsInOneCubicMeter, cubicmeter.As(VolumeUnit.ImperialGallon), ImperialGallonsTolerance); AssertEx.EqualTolerance(ImperialOuncesInOneCubicMeter, cubicmeter.As(VolumeUnit.ImperialOunce), ImperialOuncesTolerance); + AssertEx.EqualTolerance(KilocubicFeetInOneCubicMeter, cubicmeter.As(VolumeUnit.KilocubicFoot), KilocubicFeetTolerance); + AssertEx.EqualTolerance(KilocubicMetersInOneCubicMeter, cubicmeter.As(VolumeUnit.KilocubicMeter), KilocubicMetersTolerance); + AssertEx.EqualTolerance(KiloimperialGallonsInOneCubicMeter, cubicmeter.As(VolumeUnit.KiloimperialGallon), KiloimperialGallonsTolerance); + AssertEx.EqualTolerance(KilousGallonsInOneCubicMeter, cubicmeter.As(VolumeUnit.KilousGallon), KilousGallonsTolerance); AssertEx.EqualTolerance(LitersInOneCubicMeter, cubicmeter.As(VolumeUnit.Liter), LitersTolerance); + AssertEx.EqualTolerance(MegacubicFeetInOneCubicMeter, cubicmeter.As(VolumeUnit.MegacubicFoot), MegacubicFeetTolerance); + AssertEx.EqualTolerance(MegaimperialGallonsInOneCubicMeter, cubicmeter.As(VolumeUnit.MegaimperialGallon), MegaimperialGallonsTolerance); + AssertEx.EqualTolerance(MegausGallonsInOneCubicMeter, cubicmeter.As(VolumeUnit.MegausGallon), MegausGallonsTolerance); AssertEx.EqualTolerance(MetricCupsInOneCubicMeter, cubicmeter.As(VolumeUnit.MetricCup), MetricCupsTolerance); AssertEx.EqualTolerance(MetricTeaspoonsInOneCubicMeter, cubicmeter.As(VolumeUnit.MetricTeaspoon), MetricTeaspoonsTolerance); AssertEx.EqualTolerance(MicrolitersInOneCubicMeter, cubicmeter.As(VolumeUnit.Microliter), MicrolitersTolerance); @@ -255,11 +300,20 @@ public void ConversionRoundTrip() AssertEx.EqualTolerance(1, Volume.FromCubicMillimeters(cubicmeter.CubicMillimeters).CubicMeters, CubicMillimetersTolerance); AssertEx.EqualTolerance(1, Volume.FromCubicYards(cubicmeter.CubicYards).CubicMeters, CubicYardsTolerance); AssertEx.EqualTolerance(1, Volume.FromDeciliters(cubicmeter.Deciliters).CubicMeters, DecilitersTolerance); + AssertEx.EqualTolerance(1, Volume.FromHectocubicFeet(cubicmeter.HectocubicFeet).CubicMeters, HectocubicFeetTolerance); + AssertEx.EqualTolerance(1, Volume.FromHectocubicMeters(cubicmeter.HectocubicMeters).CubicMeters, HectocubicMetersTolerance); AssertEx.EqualTolerance(1, Volume.FromHectoliters(cubicmeter.Hectoliters).CubicMeters, HectolitersTolerance); AssertEx.EqualTolerance(1, Volume.FromImperialBeerBarrels(cubicmeter.ImperialBeerBarrels).CubicMeters, ImperialBeerBarrelsTolerance); AssertEx.EqualTolerance(1, Volume.FromImperialGallons(cubicmeter.ImperialGallons).CubicMeters, ImperialGallonsTolerance); AssertEx.EqualTolerance(1, Volume.FromImperialOunces(cubicmeter.ImperialOunces).CubicMeters, ImperialOuncesTolerance); + AssertEx.EqualTolerance(1, Volume.FromKilocubicFeet(cubicmeter.KilocubicFeet).CubicMeters, KilocubicFeetTolerance); + AssertEx.EqualTolerance(1, Volume.FromKilocubicMeters(cubicmeter.KilocubicMeters).CubicMeters, KilocubicMetersTolerance); + AssertEx.EqualTolerance(1, Volume.FromKiloimperialGallons(cubicmeter.KiloimperialGallons).CubicMeters, KiloimperialGallonsTolerance); + AssertEx.EqualTolerance(1, Volume.FromKilousGallons(cubicmeter.KilousGallons).CubicMeters, KilousGallonsTolerance); AssertEx.EqualTolerance(1, Volume.FromLiters(cubicmeter.Liters).CubicMeters, LitersTolerance); + AssertEx.EqualTolerance(1, Volume.FromMegacubicFeet(cubicmeter.MegacubicFeet).CubicMeters, MegacubicFeetTolerance); + AssertEx.EqualTolerance(1, Volume.FromMegaimperialGallons(cubicmeter.MegaimperialGallons).CubicMeters, MegaimperialGallonsTolerance); + AssertEx.EqualTolerance(1, Volume.FromMegausGallons(cubicmeter.MegausGallons).CubicMeters, MegausGallonsTolerance); AssertEx.EqualTolerance(1, Volume.FromMetricCups(cubicmeter.MetricCups).CubicMeters, MetricCupsTolerance); AssertEx.EqualTolerance(1, Volume.FromMetricTeaspoons(cubicmeter.MetricTeaspoons).CubicMeters, MetricTeaspoonsTolerance); AssertEx.EqualTolerance(1, Volume.FromMicroliters(cubicmeter.Microliters).CubicMeters, MicrolitersTolerance); diff --git a/UnitsNet/GeneratedCode/Enums/EnergyUnit.g.cs b/UnitsNet/GeneratedCode/Enums/EnergyUnit.g.cs index 9d3d5e169d..4d211d68f3 100644 --- a/UnitsNet/GeneratedCode/Enums/EnergyUnit.g.cs +++ b/UnitsNet/GeneratedCode/Enums/EnergyUnit.g.cs @@ -50,11 +50,14 @@ public enum EnergyUnit ElectronVolt, Erg, FootPound, + GigabritishThermalUnit, GigawattHour, Joule, + KilobritishThermalUnit, Kilocalorie, Kilojoule, KilowattHour, + MegabritishThermalUnit, Megajoule, MegawattHour, ThermEc, diff --git a/UnitsNet/GeneratedCode/Enums/FlowUnit.g.cs b/UnitsNet/GeneratedCode/Enums/FlowUnit.g.cs index c969384aac..267dc88704 100644 --- a/UnitsNet/GeneratedCode/Enums/FlowUnit.g.cs +++ b/UnitsNet/GeneratedCode/Enums/FlowUnit.g.cs @@ -44,6 +44,7 @@ public enum FlowUnit Undefined = 0, CentilitersPerMinute, CubicDecimeterPerMinute, + CubicFootPerHour, CubicFootPerSecond, CubicMeterPerHour, CubicMeterPerSecond, diff --git a/UnitsNet/GeneratedCode/Enums/MassFlowUnit.g.cs b/UnitsNet/GeneratedCode/Enums/MassFlowUnit.g.cs index fedc384e8d..fa48be3556 100644 --- a/UnitsNet/GeneratedCode/Enums/MassFlowUnit.g.cs +++ b/UnitsNet/GeneratedCode/Enums/MassFlowUnit.g.cs @@ -49,10 +49,12 @@ public enum MassFlowUnit HectogramPerSecond, KilogramPerHour, KilogramPerSecond, + MegapoundPerHour, MicrogramPerSecond, MilligramPerSecond, NanogramPerSecond, PoundPerHour, + ShortTonPerHour, TonnePerDay, } } diff --git a/UnitsNet/GeneratedCode/Enums/MassUnit.g.cs b/UnitsNet/GeneratedCode/Enums/MassUnit.g.cs index acfa54d5cd..b5393c3fe1 100644 --- a/UnitsNet/GeneratedCode/Enums/MassUnit.g.cs +++ b/UnitsNet/GeneratedCode/Enums/MassUnit.g.cs @@ -48,6 +48,7 @@ public enum MassUnit Gram, Hectogram, Kilogram, + Kilopound, Kilotonne, /// @@ -61,6 +62,7 @@ public enum MassUnit /// /// http://en.wikipedia.org/wiki/Long_ton LongTon, + Megapound, Megatonne, Microgram, Milligram, diff --git a/UnitsNet/GeneratedCode/Enums/PowerUnit.g.cs b/UnitsNet/GeneratedCode/Enums/PowerUnit.g.cs index dcd707cd65..2d1267b654 100644 --- a/UnitsNet/GeneratedCode/Enums/PowerUnit.g.cs +++ b/UnitsNet/GeneratedCode/Enums/PowerUnit.g.cs @@ -43,10 +43,12 @@ public enum PowerUnit { Undefined = 0, BoilerHorsepower, + BritishThermalUnitPerHour, ElectricalHorsepower, Femtowatt, Gigawatt, HydraulicHorsepower, + KilobritishThermalUnitPerHour, Kilowatt, MechanicalHorsepower, Megawatt, diff --git a/UnitsNet/GeneratedCode/Enums/VolumeUnit.g.cs b/UnitsNet/GeneratedCode/Enums/VolumeUnit.g.cs index b94e2c846b..e95d034961 100644 --- a/UnitsNet/GeneratedCode/Enums/VolumeUnit.g.cs +++ b/UnitsNet/GeneratedCode/Enums/VolumeUnit.g.cs @@ -55,11 +55,20 @@ public enum VolumeUnit CubicMillimeter, CubicYard, Deciliter, + HectocubicFoot, + HectocubicMeter, Hectoliter, ImperialBeerBarrel, ImperialGallon, ImperialOunce, + KilocubicFoot, + KilocubicMeter, + KiloimperialGallon, + KilousGallon, Liter, + MegacubicFoot, + MegaimperialGallon, + MegausGallon, MetricCup, MetricTeaspoon, Microliter, diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToEnergyExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToEnergyExtensions.g.cs index 1c8e7347c3..f7a2b98f35 100644 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToEnergyExtensions.g.cs +++ b/UnitsNet/GeneratedCode/Extensions/Number/NumberToEnergyExtensions.g.cs @@ -316,6 +316,40 @@ public static class NumberToEnergyExtensions #endregion + #region GigabritishThermalUnit + + /// + public static Energy GigabritishThermalUnits(this int value) => Energy.FromGigabritishThermalUnits(value); + + /// + public static Energy? GigabritishThermalUnits(this int? value) => Energy.FromGigabritishThermalUnits(value); + + /// + public static Energy GigabritishThermalUnits(this long value) => Energy.FromGigabritishThermalUnits(value); + + /// + public static Energy? GigabritishThermalUnits(this long? value) => Energy.FromGigabritishThermalUnits(value); + + /// + public static Energy GigabritishThermalUnits(this double value) => Energy.FromGigabritishThermalUnits(value); + + /// + public static Energy? GigabritishThermalUnits(this double? value) => Energy.FromGigabritishThermalUnits(value); + + /// + public static Energy GigabritishThermalUnits(this float value) => Energy.FromGigabritishThermalUnits(value); + + /// + public static Energy? GigabritishThermalUnits(this float? value) => Energy.FromGigabritishThermalUnits(value); + + /// + public static Energy GigabritishThermalUnits(this decimal value) => Energy.FromGigabritishThermalUnits(Convert.ToDouble(value)); + + /// + public static Energy? GigabritishThermalUnits(this decimal? value) => Energy.FromGigabritishThermalUnits(value == null ? (double?)null : Convert.ToDouble(value.Value)); + + #endregion + #region GigawattHour /// @@ -384,6 +418,40 @@ public static class NumberToEnergyExtensions #endregion + #region KilobritishThermalUnit + + /// + public static Energy KilobritishThermalUnits(this int value) => Energy.FromKilobritishThermalUnits(value); + + /// + public static Energy? KilobritishThermalUnits(this int? value) => Energy.FromKilobritishThermalUnits(value); + + /// + public static Energy KilobritishThermalUnits(this long value) => Energy.FromKilobritishThermalUnits(value); + + /// + public static Energy? KilobritishThermalUnits(this long? value) => Energy.FromKilobritishThermalUnits(value); + + /// + public static Energy KilobritishThermalUnits(this double value) => Energy.FromKilobritishThermalUnits(value); + + /// + public static Energy? KilobritishThermalUnits(this double? value) => Energy.FromKilobritishThermalUnits(value); + + /// + public static Energy KilobritishThermalUnits(this float value) => Energy.FromKilobritishThermalUnits(value); + + /// + public static Energy? KilobritishThermalUnits(this float? value) => Energy.FromKilobritishThermalUnits(value); + + /// + public static Energy KilobritishThermalUnits(this decimal value) => Energy.FromKilobritishThermalUnits(Convert.ToDouble(value)); + + /// + public static Energy? KilobritishThermalUnits(this decimal? value) => Energy.FromKilobritishThermalUnits(value == null ? (double?)null : Convert.ToDouble(value.Value)); + + #endregion + #region Kilocalorie /// @@ -486,6 +554,40 @@ public static class NumberToEnergyExtensions #endregion + #region MegabritishThermalUnit + + /// + public static Energy MegabritishThermalUnits(this int value) => Energy.FromMegabritishThermalUnits(value); + + /// + public static Energy? MegabritishThermalUnits(this int? value) => Energy.FromMegabritishThermalUnits(value); + + /// + public static Energy MegabritishThermalUnits(this long value) => Energy.FromMegabritishThermalUnits(value); + + /// + public static Energy? MegabritishThermalUnits(this long? value) => Energy.FromMegabritishThermalUnits(value); + + /// + public static Energy MegabritishThermalUnits(this double value) => Energy.FromMegabritishThermalUnits(value); + + /// + public static Energy? MegabritishThermalUnits(this double? value) => Energy.FromMegabritishThermalUnits(value); + + /// + public static Energy MegabritishThermalUnits(this float value) => Energy.FromMegabritishThermalUnits(value); + + /// + public static Energy? MegabritishThermalUnits(this float? value) => Energy.FromMegabritishThermalUnits(value); + + /// + public static Energy MegabritishThermalUnits(this decimal value) => Energy.FromMegabritishThermalUnits(Convert.ToDouble(value)); + + /// + public static Energy? MegabritishThermalUnits(this decimal? value) => Energy.FromMegabritishThermalUnits(value == null ? (double?)null : Convert.ToDouble(value.Value)); + + #endregion + #region Megajoule /// diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToFlowExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToFlowExtensions.g.cs index c92e12875e..340198626c 100644 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToFlowExtensions.g.cs +++ b/UnitsNet/GeneratedCode/Extensions/Number/NumberToFlowExtensions.g.cs @@ -112,6 +112,40 @@ public static class NumberToFlowExtensions #endregion + #region CubicFootPerHour + + /// + public static Flow CubicFeetPerHour(this int value) => Flow.FromCubicFeetPerHour(value); + + /// + public static Flow? CubicFeetPerHour(this int? value) => Flow.FromCubicFeetPerHour(value); + + /// + public static Flow CubicFeetPerHour(this long value) => Flow.FromCubicFeetPerHour(value); + + /// + public static Flow? CubicFeetPerHour(this long? value) => Flow.FromCubicFeetPerHour(value); + + /// + public static Flow CubicFeetPerHour(this double value) => Flow.FromCubicFeetPerHour(value); + + /// + public static Flow? CubicFeetPerHour(this double? value) => Flow.FromCubicFeetPerHour(value); + + /// + public static Flow CubicFeetPerHour(this float value) => Flow.FromCubicFeetPerHour(value); + + /// + public static Flow? CubicFeetPerHour(this float? value) => Flow.FromCubicFeetPerHour(value); + + /// + public static Flow CubicFeetPerHour(this decimal value) => Flow.FromCubicFeetPerHour(Convert.ToDouble(value)); + + /// + public static Flow? CubicFeetPerHour(this decimal? value) => Flow.FromCubicFeetPerHour(value == null ? (double?)null : Convert.ToDouble(value.Value)); + + #endregion + #region CubicFootPerSecond /// diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToMassExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToMassExtensions.g.cs index 407f5ba641..12c7584b4f 100644 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToMassExtensions.g.cs +++ b/UnitsNet/GeneratedCode/Extensions/Number/NumberToMassExtensions.g.cs @@ -248,6 +248,40 @@ public static class NumberToMassExtensions #endregion + #region Kilopound + + /// + public static Mass Kilopounds(this int value) => Mass.FromKilopounds(value); + + /// + public static Mass? Kilopounds(this int? value) => Mass.FromKilopounds(value); + + /// + public static Mass Kilopounds(this long value) => Mass.FromKilopounds(value); + + /// + public static Mass? Kilopounds(this long? value) => Mass.FromKilopounds(value); + + /// + public static Mass Kilopounds(this double value) => Mass.FromKilopounds(value); + + /// + public static Mass? Kilopounds(this double? value) => Mass.FromKilopounds(value); + + /// + public static Mass Kilopounds(this float value) => Mass.FromKilopounds(value); + + /// + public static Mass? Kilopounds(this float? value) => Mass.FromKilopounds(value); + + /// + public static Mass Kilopounds(this decimal value) => Mass.FromKilopounds(Convert.ToDouble(value)); + + /// + public static Mass? Kilopounds(this decimal? value) => Mass.FromKilopounds(value == null ? (double?)null : Convert.ToDouble(value.Value)); + + #endregion + #region Kilotonne /// @@ -350,6 +384,40 @@ public static class NumberToMassExtensions #endregion + #region Megapound + + /// + public static Mass Megapounds(this int value) => Mass.FromMegapounds(value); + + /// + public static Mass? Megapounds(this int? value) => Mass.FromMegapounds(value); + + /// + public static Mass Megapounds(this long value) => Mass.FromMegapounds(value); + + /// + public static Mass? Megapounds(this long? value) => Mass.FromMegapounds(value); + + /// + public static Mass Megapounds(this double value) => Mass.FromMegapounds(value); + + /// + public static Mass? Megapounds(this double? value) => Mass.FromMegapounds(value); + + /// + public static Mass Megapounds(this float value) => Mass.FromMegapounds(value); + + /// + public static Mass? Megapounds(this float? value) => Mass.FromMegapounds(value); + + /// + public static Mass Megapounds(this decimal value) => Mass.FromMegapounds(Convert.ToDouble(value)); + + /// + public static Mass? Megapounds(this decimal? value) => Mass.FromMegapounds(value == null ? (double?)null : Convert.ToDouble(value.Value)); + + #endregion + #region Megatonne /// diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToMassFlowExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToMassFlowExtensions.g.cs index cc83ea45b7..de380db9f0 100644 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToMassFlowExtensions.g.cs +++ b/UnitsNet/GeneratedCode/Extensions/Number/NumberToMassFlowExtensions.g.cs @@ -282,6 +282,40 @@ public static class NumberToMassFlowExtensions #endregion + #region MegapoundPerHour + + /// + public static MassFlow MegapoundsPerHour(this int value) => MassFlow.FromMegapoundsPerHour(value); + + /// + public static MassFlow? MegapoundsPerHour(this int? value) => MassFlow.FromMegapoundsPerHour(value); + + /// + public static MassFlow MegapoundsPerHour(this long value) => MassFlow.FromMegapoundsPerHour(value); + + /// + public static MassFlow? MegapoundsPerHour(this long? value) => MassFlow.FromMegapoundsPerHour(value); + + /// + public static MassFlow MegapoundsPerHour(this double value) => MassFlow.FromMegapoundsPerHour(value); + + /// + public static MassFlow? MegapoundsPerHour(this double? value) => MassFlow.FromMegapoundsPerHour(value); + + /// + public static MassFlow MegapoundsPerHour(this float value) => MassFlow.FromMegapoundsPerHour(value); + + /// + public static MassFlow? MegapoundsPerHour(this float? value) => MassFlow.FromMegapoundsPerHour(value); + + /// + public static MassFlow MegapoundsPerHour(this decimal value) => MassFlow.FromMegapoundsPerHour(Convert.ToDouble(value)); + + /// + public static MassFlow? MegapoundsPerHour(this decimal? value) => MassFlow.FromMegapoundsPerHour(value == null ? (double?)null : Convert.ToDouble(value.Value)); + + #endregion + #region MicrogramPerSecond /// @@ -418,6 +452,40 @@ public static class NumberToMassFlowExtensions #endregion + #region ShortTonPerHour + + /// + public static MassFlow ShortTonsPerHour(this int value) => MassFlow.FromShortTonsPerHour(value); + + /// + public static MassFlow? ShortTonsPerHour(this int? value) => MassFlow.FromShortTonsPerHour(value); + + /// + public static MassFlow ShortTonsPerHour(this long value) => MassFlow.FromShortTonsPerHour(value); + + /// + public static MassFlow? ShortTonsPerHour(this long? value) => MassFlow.FromShortTonsPerHour(value); + + /// + public static MassFlow ShortTonsPerHour(this double value) => MassFlow.FromShortTonsPerHour(value); + + /// + public static MassFlow? ShortTonsPerHour(this double? value) => MassFlow.FromShortTonsPerHour(value); + + /// + public static MassFlow ShortTonsPerHour(this float value) => MassFlow.FromShortTonsPerHour(value); + + /// + public static MassFlow? ShortTonsPerHour(this float? value) => MassFlow.FromShortTonsPerHour(value); + + /// + public static MassFlow ShortTonsPerHour(this decimal value) => MassFlow.FromShortTonsPerHour(Convert.ToDouble(value)); + + /// + public static MassFlow? ShortTonsPerHour(this decimal? value) => MassFlow.FromShortTonsPerHour(value == null ? (double?)null : Convert.ToDouble(value.Value)); + + #endregion + #region TonnePerDay /// diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToPowerExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToPowerExtensions.g.cs index f17f1392bd..68fcc9ea12 100644 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToPowerExtensions.g.cs +++ b/UnitsNet/GeneratedCode/Extensions/Number/NumberToPowerExtensions.g.cs @@ -78,6 +78,40 @@ public static class NumberToPowerExtensions #endregion + #region BritishThermalUnitPerHour + + /// + public static Power BritishThermalUnitsPerHour(this int value) => Power.FromBritishThermalUnitsPerHour(value); + + /// + public static Power? BritishThermalUnitsPerHour(this int? value) => Power.FromBritishThermalUnitsPerHour(value); + + /// + public static Power BritishThermalUnitsPerHour(this long value) => Power.FromBritishThermalUnitsPerHour(value); + + /// + public static Power? BritishThermalUnitsPerHour(this long? value) => Power.FromBritishThermalUnitsPerHour(value); + + /// + public static Power BritishThermalUnitsPerHour(this double value) => Power.FromBritishThermalUnitsPerHour(value); + + /// + public static Power? BritishThermalUnitsPerHour(this double? value) => Power.FromBritishThermalUnitsPerHour(value); + + /// + public static Power BritishThermalUnitsPerHour(this float value) => Power.FromBritishThermalUnitsPerHour(value); + + /// + public static Power? BritishThermalUnitsPerHour(this float? value) => Power.FromBritishThermalUnitsPerHour(value); + + /// + public static Power BritishThermalUnitsPerHour(this decimal value) => Power.FromBritishThermalUnitsPerHour(Convert.ToDouble(value)); + + /// + public static Power? BritishThermalUnitsPerHour(this decimal? value) => Power.FromBritishThermalUnitsPerHour(value == null ? (double?)null : Convert.ToDouble(value.Value)); + + #endregion + #region ElectricalHorsepower /// @@ -214,6 +248,40 @@ public static class NumberToPowerExtensions #endregion + #region KilobritishThermalUnitPerHour + + /// + public static Power KilobritishThermalUnitsPerHour(this int value) => Power.FromKilobritishThermalUnitsPerHour(value); + + /// + public static Power? KilobritishThermalUnitsPerHour(this int? value) => Power.FromKilobritishThermalUnitsPerHour(value); + + /// + public static Power KilobritishThermalUnitsPerHour(this long value) => Power.FromKilobritishThermalUnitsPerHour(value); + + /// + public static Power? KilobritishThermalUnitsPerHour(this long? value) => Power.FromKilobritishThermalUnitsPerHour(value); + + /// + public static Power KilobritishThermalUnitsPerHour(this double value) => Power.FromKilobritishThermalUnitsPerHour(value); + + /// + public static Power? KilobritishThermalUnitsPerHour(this double? value) => Power.FromKilobritishThermalUnitsPerHour(value); + + /// + public static Power KilobritishThermalUnitsPerHour(this float value) => Power.FromKilobritishThermalUnitsPerHour(value); + + /// + public static Power? KilobritishThermalUnitsPerHour(this float? value) => Power.FromKilobritishThermalUnitsPerHour(value); + + /// + public static Power KilobritishThermalUnitsPerHour(this decimal value) => Power.FromKilobritishThermalUnitsPerHour(Convert.ToDouble(value)); + + /// + public static Power? KilobritishThermalUnitsPerHour(this decimal? value) => Power.FromKilobritishThermalUnitsPerHour(value == null ? (double?)null : Convert.ToDouble(value.Value)); + + #endregion + #region Kilowatt /// diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToVolumeExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToVolumeExtensions.g.cs index 43b94862c0..8c838fdeb7 100644 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToVolumeExtensions.g.cs +++ b/UnitsNet/GeneratedCode/Extensions/Number/NumberToVolumeExtensions.g.cs @@ -486,6 +486,74 @@ public static class NumberToVolumeExtensions #endregion + #region HectocubicFoot + + /// + public static Volume HectocubicFeet(this int value) => Volume.FromHectocubicFeet(value); + + /// + public static Volume? HectocubicFeet(this int? value) => Volume.FromHectocubicFeet(value); + + /// + public static Volume HectocubicFeet(this long value) => Volume.FromHectocubicFeet(value); + + /// + public static Volume? HectocubicFeet(this long? value) => Volume.FromHectocubicFeet(value); + + /// + public static Volume HectocubicFeet(this double value) => Volume.FromHectocubicFeet(value); + + /// + public static Volume? HectocubicFeet(this double? value) => Volume.FromHectocubicFeet(value); + + /// + public static Volume HectocubicFeet(this float value) => Volume.FromHectocubicFeet(value); + + /// + public static Volume? HectocubicFeet(this float? value) => Volume.FromHectocubicFeet(value); + + /// + public static Volume HectocubicFeet(this decimal value) => Volume.FromHectocubicFeet(Convert.ToDouble(value)); + + /// + public static Volume? HectocubicFeet(this decimal? value) => Volume.FromHectocubicFeet(value == null ? (double?)null : Convert.ToDouble(value.Value)); + + #endregion + + #region HectocubicMeter + + /// + public static Volume HectocubicMeters(this int value) => Volume.FromHectocubicMeters(value); + + /// + public static Volume? HectocubicMeters(this int? value) => Volume.FromHectocubicMeters(value); + + /// + public static Volume HectocubicMeters(this long value) => Volume.FromHectocubicMeters(value); + + /// + public static Volume? HectocubicMeters(this long? value) => Volume.FromHectocubicMeters(value); + + /// + public static Volume HectocubicMeters(this double value) => Volume.FromHectocubicMeters(value); + + /// + public static Volume? HectocubicMeters(this double? value) => Volume.FromHectocubicMeters(value); + + /// + public static Volume HectocubicMeters(this float value) => Volume.FromHectocubicMeters(value); + + /// + public static Volume? HectocubicMeters(this float? value) => Volume.FromHectocubicMeters(value); + + /// + public static Volume HectocubicMeters(this decimal value) => Volume.FromHectocubicMeters(Convert.ToDouble(value)); + + /// + public static Volume? HectocubicMeters(this decimal? value) => Volume.FromHectocubicMeters(value == null ? (double?)null : Convert.ToDouble(value.Value)); + + #endregion + #region Hectoliter /// @@ -622,6 +690,142 @@ public static class NumberToVolumeExtensions #endregion + #region KilocubicFoot + + /// + public static Volume KilocubicFeet(this int value) => Volume.FromKilocubicFeet(value); + + /// + public static Volume? KilocubicFeet(this int? value) => Volume.FromKilocubicFeet(value); + + /// + public static Volume KilocubicFeet(this long value) => Volume.FromKilocubicFeet(value); + + /// + public static Volume? KilocubicFeet(this long? value) => Volume.FromKilocubicFeet(value); + + /// + public static Volume KilocubicFeet(this double value) => Volume.FromKilocubicFeet(value); + + /// + public static Volume? KilocubicFeet(this double? value) => Volume.FromKilocubicFeet(value); + + /// + public static Volume KilocubicFeet(this float value) => Volume.FromKilocubicFeet(value); + + /// + public static Volume? KilocubicFeet(this float? value) => Volume.FromKilocubicFeet(value); + + /// + public static Volume KilocubicFeet(this decimal value) => Volume.FromKilocubicFeet(Convert.ToDouble(value)); + + /// + public static Volume? KilocubicFeet(this decimal? value) => Volume.FromKilocubicFeet(value == null ? (double?)null : Convert.ToDouble(value.Value)); + + #endregion + + #region KilocubicMeter + + /// + public static Volume KilocubicMeters(this int value) => Volume.FromKilocubicMeters(value); + + /// + public static Volume? KilocubicMeters(this int? value) => Volume.FromKilocubicMeters(value); + + /// + public static Volume KilocubicMeters(this long value) => Volume.FromKilocubicMeters(value); + + /// + public static Volume? KilocubicMeters(this long? value) => Volume.FromKilocubicMeters(value); + + /// + public static Volume KilocubicMeters(this double value) => Volume.FromKilocubicMeters(value); + + /// + public static Volume? KilocubicMeters(this double? value) => Volume.FromKilocubicMeters(value); + + /// + public static Volume KilocubicMeters(this float value) => Volume.FromKilocubicMeters(value); + + /// + public static Volume? KilocubicMeters(this float? value) => Volume.FromKilocubicMeters(value); + + /// + public static Volume KilocubicMeters(this decimal value) => Volume.FromKilocubicMeters(Convert.ToDouble(value)); + + /// + public static Volume? KilocubicMeters(this decimal? value) => Volume.FromKilocubicMeters(value == null ? (double?)null : Convert.ToDouble(value.Value)); + + #endregion + + #region KiloimperialGallon + + /// + public static Volume KiloimperialGallons(this int value) => Volume.FromKiloimperialGallons(value); + + /// + public static Volume? KiloimperialGallons(this int? value) => Volume.FromKiloimperialGallons(value); + + /// + public static Volume KiloimperialGallons(this long value) => Volume.FromKiloimperialGallons(value); + + /// + public static Volume? KiloimperialGallons(this long? value) => Volume.FromKiloimperialGallons(value); + + /// + public static Volume KiloimperialGallons(this double value) => Volume.FromKiloimperialGallons(value); + + /// + public static Volume? KiloimperialGallons(this double? value) => Volume.FromKiloimperialGallons(value); + + /// + public static Volume KiloimperialGallons(this float value) => Volume.FromKiloimperialGallons(value); + + /// + public static Volume? KiloimperialGallons(this float? value) => Volume.FromKiloimperialGallons(value); + + /// + public static Volume KiloimperialGallons(this decimal value) => Volume.FromKiloimperialGallons(Convert.ToDouble(value)); + + /// + public static Volume? KiloimperialGallons(this decimal? value) => Volume.FromKiloimperialGallons(value == null ? (double?)null : Convert.ToDouble(value.Value)); + + #endregion + + #region KilousGallon + + /// + public static Volume KilousGallons(this int value) => Volume.FromKilousGallons(value); + + /// + public static Volume? KilousGallons(this int? value) => Volume.FromKilousGallons(value); + + /// + public static Volume KilousGallons(this long value) => Volume.FromKilousGallons(value); + + /// + public static Volume? KilousGallons(this long? value) => Volume.FromKilousGallons(value); + + /// + public static Volume KilousGallons(this double value) => Volume.FromKilousGallons(value); + + /// + public static Volume? KilousGallons(this double? value) => Volume.FromKilousGallons(value); + + /// + public static Volume KilousGallons(this float value) => Volume.FromKilousGallons(value); + + /// + public static Volume? KilousGallons(this float? value) => Volume.FromKilousGallons(value); + + /// + public static Volume KilousGallons(this decimal value) => Volume.FromKilousGallons(Convert.ToDouble(value)); + + /// + public static Volume? KilousGallons(this decimal? value) => Volume.FromKilousGallons(value == null ? (double?)null : Convert.ToDouble(value.Value)); + + #endregion + #region Liter /// @@ -656,6 +860,108 @@ public static class NumberToVolumeExtensions #endregion + #region MegacubicFoot + + /// + public static Volume MegacubicFeet(this int value) => Volume.FromMegacubicFeet(value); + + /// + public static Volume? MegacubicFeet(this int? value) => Volume.FromMegacubicFeet(value); + + /// + public static Volume MegacubicFeet(this long value) => Volume.FromMegacubicFeet(value); + + /// + public static Volume? MegacubicFeet(this long? value) => Volume.FromMegacubicFeet(value); + + /// + public static Volume MegacubicFeet(this double value) => Volume.FromMegacubicFeet(value); + + /// + public static Volume? MegacubicFeet(this double? value) => Volume.FromMegacubicFeet(value); + + /// + public static Volume MegacubicFeet(this float value) => Volume.FromMegacubicFeet(value); + + /// + public static Volume? MegacubicFeet(this float? value) => Volume.FromMegacubicFeet(value); + + /// + public static Volume MegacubicFeet(this decimal value) => Volume.FromMegacubicFeet(Convert.ToDouble(value)); + + /// + public static Volume? MegacubicFeet(this decimal? value) => Volume.FromMegacubicFeet(value == null ? (double?)null : Convert.ToDouble(value.Value)); + + #endregion + + #region MegaimperialGallon + + /// + public static Volume MegaimperialGallons(this int value) => Volume.FromMegaimperialGallons(value); + + /// + public static Volume? MegaimperialGallons(this int? value) => Volume.FromMegaimperialGallons(value); + + /// + public static Volume MegaimperialGallons(this long value) => Volume.FromMegaimperialGallons(value); + + /// + public static Volume? MegaimperialGallons(this long? value) => Volume.FromMegaimperialGallons(value); + + /// + public static Volume MegaimperialGallons(this double value) => Volume.FromMegaimperialGallons(value); + + /// + public static Volume? MegaimperialGallons(this double? value) => Volume.FromMegaimperialGallons(value); + + /// + public static Volume MegaimperialGallons(this float value) => Volume.FromMegaimperialGallons(value); + + /// + public static Volume? MegaimperialGallons(this float? value) => Volume.FromMegaimperialGallons(value); + + /// + public static Volume MegaimperialGallons(this decimal value) => Volume.FromMegaimperialGallons(Convert.ToDouble(value)); + + /// + public static Volume? MegaimperialGallons(this decimal? value) => Volume.FromMegaimperialGallons(value == null ? (double?)null : Convert.ToDouble(value.Value)); + + #endregion + + #region MegausGallon + + /// + public static Volume MegausGallons(this int value) => Volume.FromMegausGallons(value); + + /// + public static Volume? MegausGallons(this int? value) => Volume.FromMegausGallons(value); + + /// + public static Volume MegausGallons(this long value) => Volume.FromMegausGallons(value); + + /// + public static Volume? MegausGallons(this long? value) => Volume.FromMegausGallons(value); + + /// + public static Volume MegausGallons(this double value) => Volume.FromMegausGallons(value); + + /// + public static Volume? MegausGallons(this double? value) => Volume.FromMegausGallons(value); + + /// + public static Volume MegausGallons(this float value) => Volume.FromMegausGallons(value); + + /// + public static Volume? MegausGallons(this float? value) => Volume.FromMegausGallons(value); + + /// + public static Volume MegausGallons(this decimal value) => Volume.FromMegausGallons(Convert.ToDouble(value)); + + /// + public static Volume? MegausGallons(this decimal? value) => Volume.FromMegausGallons(value == null ? (double?)null : Convert.ToDouble(value.Value)); + + #endregion + #region MetricCup /// diff --git a/UnitsNet/GeneratedCode/UnitClasses/Energy.g.cs b/UnitsNet/GeneratedCode/UnitClasses/Energy.g.cs index 3e2f3c261a..31eb6a9fc1 100644 --- a/UnitsNet/GeneratedCode/UnitClasses/Energy.g.cs +++ b/UnitsNet/GeneratedCode/UnitClasses/Energy.g.cs @@ -193,6 +193,14 @@ public double FootPounds get { return _joules/1.355817948; } } + /// + /// Get Energy in GigabritishThermalUnits. + /// + public double GigabritishThermalUnits + { + get { return (_joules/1055.05585262) / 1e9d; } + } + /// /// Get Energy in GigawattHours. /// @@ -209,6 +217,14 @@ public double Joules get { return _joules; } } + /// + /// Get Energy in KilobritishThermalUnits. + /// + public double KilobritishThermalUnits + { + get { return (_joules/1055.05585262) / 1e3d; } + } + /// /// Get Energy in Kilocalories. /// @@ -233,6 +249,14 @@ public double KilowattHours get { return (_joules/3600d) / 1e3d; } } + /// + /// Get Energy in MegabritishThermalUnits. + /// + public double MegabritishThermalUnits + { + get { return (_joules/1055.05585262) / 1e6d; } + } + /// /// Get Energy in Megajoules. /// @@ -354,6 +378,14 @@ public static Energy FromFootPounds(double footpounds) return new Energy(footpounds*1.355817948); } + /// + /// Get Energy from GigabritishThermalUnits. + /// + public static Energy FromGigabritishThermalUnits(double gigabritishthermalunits) + { + return new Energy((gigabritishthermalunits*1055.05585262) * 1e9d); + } + /// /// Get Energy from GigawattHours. /// @@ -370,6 +402,14 @@ public static Energy FromJoules(double joules) return new Energy(joules); } + /// + /// Get Energy from KilobritishThermalUnits. + /// + public static Energy FromKilobritishThermalUnits(double kilobritishthermalunits) + { + return new Energy((kilobritishthermalunits*1055.05585262) * 1e3d); + } + /// /// Get Energy from Kilocalories. /// @@ -394,6 +434,14 @@ public static Energy FromKilowattHours(double kilowatthours) return new Energy((kilowatthours*3600d) * 1e3d); } + /// + /// Get Energy from MegabritishThermalUnits. + /// + public static Energy FromMegabritishThermalUnits(double megabritishthermalunits) + { + return new Energy((megabritishthermalunits*1055.05585262) * 1e6d); + } + /// /// Get Energy from Megajoules. /// @@ -564,6 +612,21 @@ public static Energy FromWattHours(double watthours) } } + /// + /// Get nullable Energy from nullable GigabritishThermalUnits. + /// + public static Energy? FromGigabritishThermalUnits(double? gigabritishthermalunits) + { + if (gigabritishthermalunits.HasValue) + { + return FromGigabritishThermalUnits(gigabritishthermalunits.Value); + } + else + { + return null; + } + } + /// /// Get nullable Energy from nullable GigawattHours. /// @@ -594,6 +657,21 @@ public static Energy FromWattHours(double watthours) } } + /// + /// Get nullable Energy from nullable KilobritishThermalUnits. + /// + public static Energy? FromKilobritishThermalUnits(double? kilobritishthermalunits) + { + if (kilobritishthermalunits.HasValue) + { + return FromKilobritishThermalUnits(kilobritishthermalunits.Value); + } + else + { + return null; + } + } + /// /// Get nullable Energy from nullable Kilocalories. /// @@ -639,6 +717,21 @@ public static Energy FromWattHours(double watthours) } } + /// + /// Get nullable Energy from nullable MegabritishThermalUnits. + /// + public static Energy? FromMegabritishThermalUnits(double? megabritishthermalunits) + { + if (megabritishthermalunits.HasValue) + { + return FromMegabritishThermalUnits(megabritishthermalunits.Value); + } + else + { + return null; + } + } + /// /// Get nullable Energy from nullable Megajoules. /// @@ -757,16 +850,22 @@ public static Energy From(double val, EnergyUnit fromUnit) return FromErgs(val); case EnergyUnit.FootPound: return FromFootPounds(val); + case EnergyUnit.GigabritishThermalUnit: + return FromGigabritishThermalUnits(val); case EnergyUnit.GigawattHour: return FromGigawattHours(val); case EnergyUnit.Joule: return FromJoules(val); + case EnergyUnit.KilobritishThermalUnit: + return FromKilobritishThermalUnits(val); case EnergyUnit.Kilocalorie: return FromKilocalories(val); case EnergyUnit.Kilojoule: return FromKilojoules(val); case EnergyUnit.KilowattHour: return FromKilowattHours(val); + case EnergyUnit.MegabritishThermalUnit: + return FromMegabritishThermalUnits(val); case EnergyUnit.Megajoule: return FromMegajoules(val); case EnergyUnit.MegawattHour: @@ -817,16 +916,22 @@ public static Energy From(double val, EnergyUnit fromUnit) return FromErgs(value.Value); case EnergyUnit.FootPound: return FromFootPounds(value.Value); + case EnergyUnit.GigabritishThermalUnit: + return FromGigabritishThermalUnits(value.Value); case EnergyUnit.GigawattHour: return FromGigawattHours(value.Value); case EnergyUnit.Joule: return FromJoules(value.Value); + case EnergyUnit.KilobritishThermalUnit: + return FromKilobritishThermalUnits(value.Value); case EnergyUnit.Kilocalorie: return FromKilocalories(value.Value); case EnergyUnit.Kilojoule: return FromKilojoules(value.Value); case EnergyUnit.KilowattHour: return FromKilowattHours(value.Value); + case EnergyUnit.MegabritishThermalUnit: + return FromMegabritishThermalUnits(value.Value); case EnergyUnit.Megajoule: return FromMegajoules(value.Value); case EnergyUnit.MegawattHour: @@ -1012,16 +1117,22 @@ public double As(EnergyUnit unit) return Ergs; case EnergyUnit.FootPound: return FootPounds; + case EnergyUnit.GigabritishThermalUnit: + return GigabritishThermalUnits; case EnergyUnit.GigawattHour: return GigawattHours; case EnergyUnit.Joule: return Joules; + case EnergyUnit.KilobritishThermalUnit: + return KilobritishThermalUnits; case EnergyUnit.Kilocalorie: return Kilocalories; case EnergyUnit.Kilojoule: return Kilojoules; case EnergyUnit.KilowattHour: return KilowattHours; + case EnergyUnit.MegabritishThermalUnit: + return MegabritishThermalUnits; case EnergyUnit.Megajoule: return Megajoules; case EnergyUnit.MegawattHour: diff --git a/UnitsNet/GeneratedCode/UnitClasses/Flow.g.cs b/UnitsNet/GeneratedCode/UnitClasses/Flow.g.cs index b17950763f..2bac616b4a 100644 --- a/UnitsNet/GeneratedCode/UnitClasses/Flow.g.cs +++ b/UnitsNet/GeneratedCode/UnitClasses/Flow.g.cs @@ -145,6 +145,14 @@ public double CubicDecimetersPerMinute get { return _cubicMetersPerSecond*60000.00000; } } + /// + /// Get Flow in CubicFeetPerHour. + /// + public double CubicFeetPerHour + { + get { return _cubicMetersPerSecond/7.8657777777777777777777777777778e-6; } + } + /// /// Get Flow in CubicFeetPerSecond. /// @@ -282,6 +290,14 @@ public static Flow FromCubicDecimetersPerMinute(double cubicdecimetersperminute) return new Flow(cubicdecimetersperminute/60000.00000); } + /// + /// Get Flow from CubicFeetPerHour. + /// + public static Flow FromCubicFeetPerHour(double cubicfeetperhour) + { + return new Flow(cubicfeetperhour*7.8657777777777777777777777777778e-6); + } + /// /// Get Flow from CubicFeetPerSecond. /// @@ -426,6 +442,21 @@ public static Flow FromUsGallonsPerMinute(double usgallonsperminute) } } + /// + /// Get nullable Flow from nullable CubicFeetPerHour. + /// + public static Flow? FromCubicFeetPerHour(double? cubicfeetperhour) + { + if (cubicfeetperhour.HasValue) + { + return FromCubicFeetPerHour(cubicfeetperhour.Value); + } + else + { + return null; + } + } + /// /// Get nullable Flow from nullable CubicFeetPerSecond. /// @@ -652,6 +683,8 @@ public static Flow From(double val, FlowUnit fromUnit) return FromCentilitersPerMinute(val); case FlowUnit.CubicDecimeterPerMinute: return FromCubicDecimetersPerMinute(val); + case FlowUnit.CubicFootPerHour: + return FromCubicFeetPerHour(val); case FlowUnit.CubicFootPerSecond: return FromCubicFeetPerSecond(val); case FlowUnit.CubicMeterPerHour: @@ -706,6 +739,8 @@ public static Flow From(double val, FlowUnit fromUnit) return FromCentilitersPerMinute(value.Value); case FlowUnit.CubicDecimeterPerMinute: return FromCubicDecimetersPerMinute(value.Value); + case FlowUnit.CubicFootPerHour: + return FromCubicFeetPerHour(value.Value); case FlowUnit.CubicFootPerSecond: return FromCubicFeetPerSecond(value.Value); case FlowUnit.CubicMeterPerHour: @@ -895,6 +930,8 @@ public double As(FlowUnit unit) return CentilitersPerMinute; case FlowUnit.CubicDecimeterPerMinute: return CubicDecimetersPerMinute; + case FlowUnit.CubicFootPerHour: + return CubicFeetPerHour; case FlowUnit.CubicFootPerSecond: return CubicFeetPerSecond; case FlowUnit.CubicMeterPerHour: diff --git a/UnitsNet/GeneratedCode/UnitClasses/Mass.g.cs b/UnitsNet/GeneratedCode/UnitClasses/Mass.g.cs index ef07db1062..6654192920 100644 --- a/UnitsNet/GeneratedCode/UnitClasses/Mass.g.cs +++ b/UnitsNet/GeneratedCode/UnitClasses/Mass.g.cs @@ -177,6 +177,14 @@ public double Kilograms get { return (_kilograms*1e3) / 1e3d; } } + /// + /// Get Mass in Kilopounds. + /// + public double Kilopounds + { + get { return (_kilograms/0.45359237) / 1e3d; } + } + /// /// Get Mass in Kilotonnes. /// @@ -201,6 +209,14 @@ public double LongTons get { return _kilograms/1016.0469088; } } + /// + /// Get Mass in Megapounds. + /// + public double Megapounds + { + get { return (_kilograms/0.45359237) / 1e6d; } + } + /// /// Get Mass in Megatonnes. /// @@ -338,6 +354,14 @@ public static Mass FromKilograms(double kilograms) return new Mass((kilograms/1e3) * 1e3d); } + /// + /// Get Mass from Kilopounds. + /// + public static Mass FromKilopounds(double kilopounds) + { + return new Mass((kilopounds*0.45359237) * 1e3d); + } + /// /// Get Mass from Kilotonnes. /// @@ -362,6 +386,14 @@ public static Mass FromLongTons(double longtons) return new Mass(longtons*1016.0469088); } + /// + /// Get Mass from Megapounds. + /// + public static Mass FromMegapounds(double megapounds) + { + return new Mass((megapounds*0.45359237) * 1e6d); + } + /// /// Get Mass from Megatonnes. /// @@ -534,6 +566,21 @@ public static Mass FromTonnes(double tonnes) } } + /// + /// Get nullable Mass from nullable Kilopounds. + /// + public static Mass? FromKilopounds(double? kilopounds) + { + if (kilopounds.HasValue) + { + return FromKilopounds(kilopounds.Value); + } + else + { + return null; + } + } + /// /// Get nullable Mass from nullable Kilotonnes. /// @@ -579,6 +626,21 @@ public static Mass FromTonnes(double tonnes) } } + /// + /// Get nullable Mass from nullable Megapounds. + /// + public static Mass? FromMegapounds(double? megapounds) + { + if (megapounds.HasValue) + { + return FromMegapounds(megapounds.Value); + } + else + { + return null; + } + } + /// /// Get nullable Mass from nullable Megatonnes. /// @@ -753,12 +815,16 @@ public static Mass From(double val, MassUnit fromUnit) return FromHectograms(val); case MassUnit.Kilogram: return FromKilograms(val); + case MassUnit.Kilopound: + return FromKilopounds(val); case MassUnit.Kilotonne: return FromKilotonnes(val); case MassUnit.LongHundredweight: return FromLongHundredweight(val); case MassUnit.LongTon: return FromLongTons(val); + case MassUnit.Megapound: + return FromMegapounds(val); case MassUnit.Megatonne: return FromMegatonnes(val); case MassUnit.Microgram: @@ -813,12 +879,16 @@ public static Mass From(double val, MassUnit fromUnit) return FromHectograms(value.Value); case MassUnit.Kilogram: return FromKilograms(value.Value); + case MassUnit.Kilopound: + return FromKilopounds(value.Value); case MassUnit.Kilotonne: return FromKilotonnes(value.Value); case MassUnit.LongHundredweight: return FromLongHundredweight(value.Value); case MassUnit.LongTon: return FromLongTons(value.Value); + case MassUnit.Megapound: + return FromMegapounds(value.Value); case MassUnit.Megatonne: return FromMegatonnes(value.Value); case MassUnit.Microgram: @@ -1008,12 +1078,16 @@ public double As(MassUnit unit) return Hectograms; case MassUnit.Kilogram: return Kilograms; + case MassUnit.Kilopound: + return Kilopounds; case MassUnit.Kilotonne: return Kilotonnes; case MassUnit.LongHundredweight: return LongHundredweight; case MassUnit.LongTon: return LongTons; + case MassUnit.Megapound: + return Megapounds; case MassUnit.Megatonne: return Megatonnes; case MassUnit.Microgram: diff --git a/UnitsNet/GeneratedCode/UnitClasses/MassFlow.g.cs b/UnitsNet/GeneratedCode/UnitClasses/MassFlow.g.cs index 7f6d0d73f6..1e01c0795a 100644 --- a/UnitsNet/GeneratedCode/UnitClasses/MassFlow.g.cs +++ b/UnitsNet/GeneratedCode/UnitClasses/MassFlow.g.cs @@ -185,6 +185,14 @@ public double KilogramsPerSecond get { return (_gramsPerSecond) / 1e3d; } } + /// + /// Get MassFlow in MegapoundsPerHour. + /// + public double MegapoundsPerHour + { + get { return (_gramsPerSecond*7.93664) / 1e6d; } + } + /// /// Get MassFlow in MicrogramsPerSecond. /// @@ -217,6 +225,14 @@ public double PoundsPerHour get { return _gramsPerSecond*7.93664; } } + /// + /// Get MassFlow in ShortTonsPerHour. + /// + public double ShortTonsPerHour + { + get { return _gramsPerSecond/251.9957611; } + } + /// /// Get MassFlow in TonnesPerDay. /// @@ -290,6 +306,14 @@ public static MassFlow FromKilogramsPerSecond(double kilogramspersecond) return new MassFlow((kilogramspersecond) * 1e3d); } + /// + /// Get MassFlow from MegapoundsPerHour. + /// + public static MassFlow FromMegapoundsPerHour(double megapoundsperhour) + { + return new MassFlow((megapoundsperhour/7.93664) * 1e6d); + } + /// /// Get MassFlow from MicrogramsPerSecond. /// @@ -322,6 +346,14 @@ public static MassFlow FromPoundsPerHour(double poundsperhour) return new MassFlow(poundsperhour/7.93664); } + /// + /// Get MassFlow from ShortTonsPerHour. + /// + public static MassFlow FromShortTonsPerHour(double shorttonsperhour) + { + return new MassFlow(shorttonsperhour*251.9957611); + } + /// /// Get MassFlow from TonnesPerDay. /// @@ -437,6 +469,21 @@ public static MassFlow FromTonnesPerDay(double tonnesperday) } } + /// + /// Get nullable MassFlow from nullable MegapoundsPerHour. + /// + public static MassFlow? FromMegapoundsPerHour(double? megapoundsperhour) + { + if (megapoundsperhour.HasValue) + { + return FromMegapoundsPerHour(megapoundsperhour.Value); + } + else + { + return null; + } + } + /// /// Get nullable MassFlow from nullable MicrogramsPerSecond. /// @@ -497,6 +544,21 @@ public static MassFlow FromTonnesPerDay(double tonnesperday) } } + /// + /// Get nullable MassFlow from nullable ShortTonsPerHour. + /// + public static MassFlow? FromShortTonsPerHour(double? shorttonsperhour) + { + if (shorttonsperhour.HasValue) + { + return FromShortTonsPerHour(shorttonsperhour.Value); + } + else + { + return null; + } + } + /// /// Get nullable MassFlow from nullable TonnesPerDay. /// @@ -538,6 +600,8 @@ public static MassFlow From(double val, MassFlowUnit fromUnit) return FromKilogramsPerHour(val); case MassFlowUnit.KilogramPerSecond: return FromKilogramsPerSecond(val); + case MassFlowUnit.MegapoundPerHour: + return FromMegapoundsPerHour(val); case MassFlowUnit.MicrogramPerSecond: return FromMicrogramsPerSecond(val); case MassFlowUnit.MilligramPerSecond: @@ -546,6 +610,8 @@ public static MassFlow From(double val, MassFlowUnit fromUnit) return FromNanogramsPerSecond(val); case MassFlowUnit.PoundPerHour: return FromPoundsPerHour(val); + case MassFlowUnit.ShortTonPerHour: + return FromShortTonsPerHour(val); case MassFlowUnit.TonnePerDay: return FromTonnesPerDay(val); @@ -584,6 +650,8 @@ public static MassFlow From(double val, MassFlowUnit fromUnit) return FromKilogramsPerHour(value.Value); case MassFlowUnit.KilogramPerSecond: return FromKilogramsPerSecond(value.Value); + case MassFlowUnit.MegapoundPerHour: + return FromMegapoundsPerHour(value.Value); case MassFlowUnit.MicrogramPerSecond: return FromMicrogramsPerSecond(value.Value); case MassFlowUnit.MilligramPerSecond: @@ -592,6 +660,8 @@ public static MassFlow From(double val, MassFlowUnit fromUnit) return FromNanogramsPerSecond(value.Value); case MassFlowUnit.PoundPerHour: return FromPoundsPerHour(value.Value); + case MassFlowUnit.ShortTonPerHour: + return FromShortTonsPerHour(value.Value); case MassFlowUnit.TonnePerDay: return FromTonnesPerDay(value.Value); @@ -765,6 +835,8 @@ public double As(MassFlowUnit unit) return KilogramsPerHour; case MassFlowUnit.KilogramPerSecond: return KilogramsPerSecond; + case MassFlowUnit.MegapoundPerHour: + return MegapoundsPerHour; case MassFlowUnit.MicrogramPerSecond: return MicrogramsPerSecond; case MassFlowUnit.MilligramPerSecond: @@ -773,6 +845,8 @@ public double As(MassFlowUnit unit) return NanogramsPerSecond; case MassFlowUnit.PoundPerHour: return PoundsPerHour; + case MassFlowUnit.ShortTonPerHour: + return ShortTonsPerHour; case MassFlowUnit.TonnePerDay: return TonnesPerDay; diff --git a/UnitsNet/GeneratedCode/UnitClasses/Power.g.cs b/UnitsNet/GeneratedCode/UnitClasses/Power.g.cs index cb8f394b2b..1089b98265 100644 --- a/UnitsNet/GeneratedCode/UnitClasses/Power.g.cs +++ b/UnitsNet/GeneratedCode/UnitClasses/Power.g.cs @@ -137,6 +137,14 @@ public double BoilerHorsepower get { return Convert.ToDouble(_watts/9812.5m); } } + /// + /// Get Power in BritishThermalUnitsPerHour. + /// + public double BritishThermalUnitsPerHour + { + get { return Convert.ToDouble(_watts/0.293071m); } + } + /// /// Get Power in ElectricalHorsepower. /// @@ -169,6 +177,14 @@ public double HydraulicHorsepower get { return Convert.ToDouble(_watts/745.69988145m); } } + /// + /// Get Power in KilobritishThermalUnitsPerHour. + /// + public double KilobritishThermalUnitsPerHour + { + get { return Convert.ToDouble((_watts/0.293071m) / 1e3m); } + } + /// /// Get Power in Kilowatts. /// @@ -274,6 +290,14 @@ public static Power FromBoilerHorsepower(double boilerhorsepower) return new Power(Convert.ToDecimal(boilerhorsepower*9812.5d)); } + /// + /// Get Power from BritishThermalUnitsPerHour. + /// + public static Power FromBritishThermalUnitsPerHour(double britishthermalunitsperhour) + { + return new Power(Convert.ToDecimal(britishthermalunitsperhour*0.293071d)); + } + /// /// Get Power from ElectricalHorsepower. /// @@ -306,6 +330,14 @@ public static Power FromHydraulicHorsepower(double hydraulichorsepower) return new Power(Convert.ToDecimal(hydraulichorsepower*745.69988145d)); } + /// + /// Get Power from KilobritishThermalUnitsPerHour. + /// + public static Power FromKilobritishThermalUnitsPerHour(double kilobritishthermalunitsperhour) + { + return new Power(Convert.ToDecimal((kilobritishthermalunitsperhour*0.293071d) * 1e3d)); + } + /// /// Get Power from Kilowatts. /// @@ -411,6 +443,21 @@ public static Power FromWatts(double watts) } } + /// + /// Get nullable Power from nullable BritishThermalUnitsPerHour. + /// + public static Power? FromBritishThermalUnitsPerHour(double? britishthermalunitsperhour) + { + if (britishthermalunitsperhour.HasValue) + { + return FromBritishThermalUnitsPerHour(britishthermalunitsperhour.Value); + } + else + { + return null; + } + } + /// /// Get nullable Power from nullable ElectricalHorsepower. /// @@ -471,6 +518,21 @@ public static Power FromWatts(double watts) } } + /// + /// Get nullable Power from nullable KilobritishThermalUnitsPerHour. + /// + public static Power? FromKilobritishThermalUnitsPerHour(double? kilobritishthermalunitsperhour) + { + if (kilobritishthermalunitsperhour.HasValue) + { + return FromKilobritishThermalUnitsPerHour(kilobritishthermalunitsperhour.Value); + } + else + { + return null; + } + } + /// /// Get nullable Power from nullable Kilowatts. /// @@ -650,6 +712,8 @@ public static Power From(double val, PowerUnit fromUnit) { case PowerUnit.BoilerHorsepower: return FromBoilerHorsepower(val); + case PowerUnit.BritishThermalUnitPerHour: + return FromBritishThermalUnitsPerHour(val); case PowerUnit.ElectricalHorsepower: return FromElectricalHorsepower(val); case PowerUnit.Femtowatt: @@ -658,6 +722,8 @@ public static Power From(double val, PowerUnit fromUnit) return FromGigawatts(val); case PowerUnit.HydraulicHorsepower: return FromHydraulicHorsepower(val); + case PowerUnit.KilobritishThermalUnitPerHour: + return FromKilobritishThermalUnitsPerHour(val); case PowerUnit.Kilowatt: return FromKilowatts(val); case PowerUnit.MechanicalHorsepower: @@ -704,6 +770,8 @@ public static Power From(double val, PowerUnit fromUnit) { case PowerUnit.BoilerHorsepower: return FromBoilerHorsepower(value.Value); + case PowerUnit.BritishThermalUnitPerHour: + return FromBritishThermalUnitsPerHour(value.Value); case PowerUnit.ElectricalHorsepower: return FromElectricalHorsepower(value.Value); case PowerUnit.Femtowatt: @@ -712,6 +780,8 @@ public static Power From(double val, PowerUnit fromUnit) return FromGigawatts(value.Value); case PowerUnit.HydraulicHorsepower: return FromHydraulicHorsepower(value.Value); + case PowerUnit.KilobritishThermalUnitPerHour: + return FromKilobritishThermalUnitsPerHour(value.Value); case PowerUnit.Kilowatt: return FromKilowatts(value.Value); case PowerUnit.MechanicalHorsepower: @@ -893,6 +963,8 @@ public double As(PowerUnit unit) { case PowerUnit.BoilerHorsepower: return BoilerHorsepower; + case PowerUnit.BritishThermalUnitPerHour: + return BritishThermalUnitsPerHour; case PowerUnit.ElectricalHorsepower: return ElectricalHorsepower; case PowerUnit.Femtowatt: @@ -901,6 +973,8 @@ public double As(PowerUnit unit) return Gigawatts; case PowerUnit.HydraulicHorsepower: return HydraulicHorsepower; + case PowerUnit.KilobritishThermalUnitPerHour: + return KilobritishThermalUnitsPerHour; case PowerUnit.Kilowatt: return Kilowatts; case PowerUnit.MechanicalHorsepower: diff --git a/UnitsNet/GeneratedCode/UnitClasses/Volume.g.cs b/UnitsNet/GeneratedCode/UnitClasses/Volume.g.cs index 1a6c688b9c..be9e825184 100644 --- a/UnitsNet/GeneratedCode/UnitClasses/Volume.g.cs +++ b/UnitsNet/GeneratedCode/UnitClasses/Volume.g.cs @@ -233,6 +233,22 @@ public double Deciliters get { return (_cubicMeters*1e3) / 1e-1d; } } + /// + /// Get Volume in HectocubicFeet. + /// + public double HectocubicFeet + { + get { return (_cubicMeters/0.0283168) / 1e2d; } + } + + /// + /// Get Volume in HectocubicMeters. + /// + public double HectocubicMeters + { + get { return (_cubicMeters) / 1e2d; } + } + /// /// Get Volume in Hectoliters. /// @@ -265,6 +281,38 @@ public double ImperialOunces get { return _cubicMeters/2.8413062499962901241875439064617e-5; } } + /// + /// Get Volume in KilocubicFeet. + /// + public double KilocubicFeet + { + get { return (_cubicMeters/0.0283168) / 1e3d; } + } + + /// + /// Get Volume in KilocubicMeters. + /// + public double KilocubicMeters + { + get { return (_cubicMeters) / 1e3d; } + } + + /// + /// Get Volume in KiloimperialGallons. + /// + public double KiloimperialGallons + { + get { return (_cubicMeters/0.00454609000000181429905810072407) / 1e3d; } + } + + /// + /// Get Volume in KilousGallons. + /// + public double KilousGallons + { + get { return (_cubicMeters/0.00378541) / 1e3d; } + } + /// /// Get Volume in Liters. /// @@ -273,6 +321,30 @@ public double Liters get { return _cubicMeters*1e3; } } + /// + /// Get Volume in MegacubicFeet. + /// + public double MegacubicFeet + { + get { return (_cubicMeters/0.0283168) / 1e6d; } + } + + /// + /// Get Volume in MegaimperialGallons. + /// + public double MegaimperialGallons + { + get { return (_cubicMeters/0.00454609000000181429905810072407) / 1e6d; } + } + + /// + /// Get Volume in MegausGallons. + /// + public double MegausGallons + { + get { return (_cubicMeters/0.00378541) / 1e6d; } + } + /// /// Get Volume in MetricCups. /// @@ -508,6 +580,22 @@ public static Volume FromDeciliters(double deciliters) return new Volume((deciliters/1e3) * 1e-1d); } + /// + /// Get Volume from HectocubicFeet. + /// + public static Volume FromHectocubicFeet(double hectocubicfeet) + { + return new Volume((hectocubicfeet*0.0283168) * 1e2d); + } + + /// + /// Get Volume from HectocubicMeters. + /// + public static Volume FromHectocubicMeters(double hectocubicmeters) + { + return new Volume((hectocubicmeters) * 1e2d); + } + /// /// Get Volume from Hectoliters. /// @@ -540,6 +628,38 @@ public static Volume FromImperialOunces(double imperialounces) return new Volume(imperialounces*2.8413062499962901241875439064617e-5); } + /// + /// Get Volume from KilocubicFeet. + /// + public static Volume FromKilocubicFeet(double kilocubicfeet) + { + return new Volume((kilocubicfeet*0.0283168) * 1e3d); + } + + /// + /// Get Volume from KilocubicMeters. + /// + public static Volume FromKilocubicMeters(double kilocubicmeters) + { + return new Volume((kilocubicmeters) * 1e3d); + } + + /// + /// Get Volume from KiloimperialGallons. + /// + public static Volume FromKiloimperialGallons(double kiloimperialgallons) + { + return new Volume((kiloimperialgallons*0.00454609000000181429905810072407) * 1e3d); + } + + /// + /// Get Volume from KilousGallons. + /// + public static Volume FromKilousGallons(double kilousgallons) + { + return new Volume((kilousgallons*0.00378541) * 1e3d); + } + /// /// Get Volume from Liters. /// @@ -548,6 +668,30 @@ public static Volume FromLiters(double liters) return new Volume(liters/1e3); } + /// + /// Get Volume from MegacubicFeet. + /// + public static Volume FromMegacubicFeet(double megacubicfeet) + { + return new Volume((megacubicfeet*0.0283168) * 1e6d); + } + + /// + /// Get Volume from MegaimperialGallons. + /// + public static Volume FromMegaimperialGallons(double megaimperialgallons) + { + return new Volume((megaimperialgallons*0.00454609000000181429905810072407) * 1e6d); + } + + /// + /// Get Volume from MegausGallons. + /// + public static Volume FromMegausGallons(double megausgallons) + { + return new Volume((megausgallons*0.00378541) * 1e6d); + } + /// /// Get Volume from MetricCups. /// @@ -865,6 +1009,36 @@ public static Volume FromUsTeaspoons(double usteaspoons) } } + /// + /// Get nullable Volume from nullable HectocubicFeet. + /// + public static Volume? FromHectocubicFeet(double? hectocubicfeet) + { + if (hectocubicfeet.HasValue) + { + return FromHectocubicFeet(hectocubicfeet.Value); + } + else + { + return null; + } + } + + /// + /// Get nullable Volume from nullable HectocubicMeters. + /// + public static Volume? FromHectocubicMeters(double? hectocubicmeters) + { + if (hectocubicmeters.HasValue) + { + return FromHectocubicMeters(hectocubicmeters.Value); + } + else + { + return null; + } + } + /// /// Get nullable Volume from nullable Hectoliters. /// @@ -925,6 +1099,66 @@ public static Volume FromUsTeaspoons(double usteaspoons) } } + /// + /// Get nullable Volume from nullable KilocubicFeet. + /// + public static Volume? FromKilocubicFeet(double? kilocubicfeet) + { + if (kilocubicfeet.HasValue) + { + return FromKilocubicFeet(kilocubicfeet.Value); + } + else + { + return null; + } + } + + /// + /// Get nullable Volume from nullable KilocubicMeters. + /// + public static Volume? FromKilocubicMeters(double? kilocubicmeters) + { + if (kilocubicmeters.HasValue) + { + return FromKilocubicMeters(kilocubicmeters.Value); + } + else + { + return null; + } + } + + /// + /// Get nullable Volume from nullable KiloimperialGallons. + /// + public static Volume? FromKiloimperialGallons(double? kiloimperialgallons) + { + if (kiloimperialgallons.HasValue) + { + return FromKiloimperialGallons(kiloimperialgallons.Value); + } + else + { + return null; + } + } + + /// + /// Get nullable Volume from nullable KilousGallons. + /// + public static Volume? FromKilousGallons(double? kilousgallons) + { + if (kilousgallons.HasValue) + { + return FromKilousGallons(kilousgallons.Value); + } + else + { + return null; + } + } + /// /// Get nullable Volume from nullable Liters. /// @@ -940,6 +1174,51 @@ public static Volume FromUsTeaspoons(double usteaspoons) } } + /// + /// Get nullable Volume from nullable MegacubicFeet. + /// + public static Volume? FromMegacubicFeet(double? megacubicfeet) + { + if (megacubicfeet.HasValue) + { + return FromMegacubicFeet(megacubicfeet.Value); + } + else + { + return null; + } + } + + /// + /// Get nullable Volume from nullable MegaimperialGallons. + /// + public static Volume? FromMegaimperialGallons(double? megaimperialgallons) + { + if (megaimperialgallons.HasValue) + { + return FromMegaimperialGallons(megaimperialgallons.Value); + } + else + { + return null; + } + } + + /// + /// Get nullable Volume from nullable MegausGallons. + /// + public static Volume? FromMegausGallons(double? megausgallons) + { + if (megausgallons.HasValue) + { + return FromMegausGallons(megausgallons.Value); + } + else + { + return null; + } + } + /// /// Get nullable Volume from nullable MetricCups. /// @@ -1203,6 +1482,10 @@ public static Volume From(double val, VolumeUnit fromUnit) return FromCubicYards(val); case VolumeUnit.Deciliter: return FromDeciliters(val); + case VolumeUnit.HectocubicFoot: + return FromHectocubicFeet(val); + case VolumeUnit.HectocubicMeter: + return FromHectocubicMeters(val); case VolumeUnit.Hectoliter: return FromHectoliters(val); case VolumeUnit.ImperialBeerBarrel: @@ -1211,8 +1494,22 @@ public static Volume From(double val, VolumeUnit fromUnit) return FromImperialGallons(val); case VolumeUnit.ImperialOunce: return FromImperialOunces(val); + case VolumeUnit.KilocubicFoot: + return FromKilocubicFeet(val); + case VolumeUnit.KilocubicMeter: + return FromKilocubicMeters(val); + case VolumeUnit.KiloimperialGallon: + return FromKiloimperialGallons(val); + case VolumeUnit.KilousGallon: + return FromKilousGallons(val); case VolumeUnit.Liter: return FromLiters(val); + case VolumeUnit.MegacubicFoot: + return FromMegacubicFeet(val); + case VolumeUnit.MegaimperialGallon: + return FromMegaimperialGallons(val); + case VolumeUnit.MegausGallon: + return FromMegausGallons(val); case VolumeUnit.MetricCup: return FromMetricCups(val); case VolumeUnit.MetricTeaspoon: @@ -1291,6 +1588,10 @@ public static Volume From(double val, VolumeUnit fromUnit) return FromCubicYards(value.Value); case VolumeUnit.Deciliter: return FromDeciliters(value.Value); + case VolumeUnit.HectocubicFoot: + return FromHectocubicFeet(value.Value); + case VolumeUnit.HectocubicMeter: + return FromHectocubicMeters(value.Value); case VolumeUnit.Hectoliter: return FromHectoliters(value.Value); case VolumeUnit.ImperialBeerBarrel: @@ -1299,8 +1600,22 @@ public static Volume From(double val, VolumeUnit fromUnit) return FromImperialGallons(value.Value); case VolumeUnit.ImperialOunce: return FromImperialOunces(value.Value); + case VolumeUnit.KilocubicFoot: + return FromKilocubicFeet(value.Value); + case VolumeUnit.KilocubicMeter: + return FromKilocubicMeters(value.Value); + case VolumeUnit.KiloimperialGallon: + return FromKiloimperialGallons(value.Value); + case VolumeUnit.KilousGallon: + return FromKilousGallons(value.Value); case VolumeUnit.Liter: return FromLiters(value.Value); + case VolumeUnit.MegacubicFoot: + return FromMegacubicFeet(value.Value); + case VolumeUnit.MegaimperialGallon: + return FromMegaimperialGallons(value.Value); + case VolumeUnit.MegausGallon: + return FromMegausGallons(value.Value); case VolumeUnit.MetricCup: return FromMetricCups(value.Value); case VolumeUnit.MetricTeaspoon: @@ -1514,6 +1829,10 @@ public double As(VolumeUnit unit) return CubicYards; case VolumeUnit.Deciliter: return Deciliters; + case VolumeUnit.HectocubicFoot: + return HectocubicFeet; + case VolumeUnit.HectocubicMeter: + return HectocubicMeters; case VolumeUnit.Hectoliter: return Hectoliters; case VolumeUnit.ImperialBeerBarrel: @@ -1522,8 +1841,22 @@ public double As(VolumeUnit unit) return ImperialGallons; case VolumeUnit.ImperialOunce: return ImperialOunces; + case VolumeUnit.KilocubicFoot: + return KilocubicFeet; + case VolumeUnit.KilocubicMeter: + return KilocubicMeters; + case VolumeUnit.KiloimperialGallon: + return KiloimperialGallons; + case VolumeUnit.KilousGallon: + return KilousGallons; case VolumeUnit.Liter: return Liters; + case VolumeUnit.MegacubicFoot: + return MegacubicFeet; + case VolumeUnit.MegaimperialGallon: + return MegaimperialGallons; + case VolumeUnit.MegausGallon: + return MegausGallons; case VolumeUnit.MetricCup: return MetricCups; case VolumeUnit.MetricTeaspoon: diff --git a/UnitsNet/GeneratedCode/UnitSystem.Default.g.cs b/UnitsNet/GeneratedCode/UnitSystem.Default.g.cs index b7987afc1e..cd0557bba0 100644 --- a/UnitsNet/GeneratedCode/UnitSystem.Default.g.cs +++ b/UnitsNet/GeneratedCode/UnitSystem.Default.g.cs @@ -839,16 +839,27 @@ private static readonly ReadOnlyCollection DefaultLocalization { new AbbreviationsForCulture("en-US", "ft·lb"), }), + new CulturesForEnumValue((int) EnergyUnit.GigabritishThermalUnit, + new[] + { + new AbbreviationsForCulture("en-US", "mmBTU"), + }), new CulturesForEnumValue((int) EnergyUnit.GigawattHour, new[] { new AbbreviationsForCulture("en-US", "GWh"), + new AbbreviationsForCulture("en-US", "GВт/ч"), }), new CulturesForEnumValue((int) EnergyUnit.Joule, new[] { new AbbreviationsForCulture("en-US", "J"), }), + new CulturesForEnumValue((int) EnergyUnit.KilobritishThermalUnit, + new[] + { + new AbbreviationsForCulture("en-US", "kBTU"), + }), new CulturesForEnumValue((int) EnergyUnit.Kilocalorie, new[] { @@ -863,6 +874,12 @@ private static readonly ReadOnlyCollection DefaultLocalization new[] { new AbbreviationsForCulture("en-US", "kWh"), + new AbbreviationsForCulture("en-US", "kВт/ч"), + }), + new CulturesForEnumValue((int) EnergyUnit.MegabritishThermalUnit, + new[] + { + new AbbreviationsForCulture("en-US", "mBTU"), }), new CulturesForEnumValue((int) EnergyUnit.Megajoule, new[] @@ -873,6 +890,7 @@ private static readonly ReadOnlyCollection DefaultLocalization new[] { new AbbreviationsForCulture("en-US", "MWh"), + new AbbreviationsForCulture("en-US", "MВт/ч"), }), new CulturesForEnumValue((int) EnergyUnit.ThermEc, new[] @@ -896,6 +914,7 @@ private static readonly ReadOnlyCollection DefaultLocalization new[] { new AbbreviationsForCulture("en-US", "Wh"), + new AbbreviationsForCulture("en-US", "Вт/ч"), }), }), new UnitLocalization(typeof (FlowUnit), @@ -912,6 +931,11 @@ private static readonly ReadOnlyCollection DefaultLocalization new AbbreviationsForCulture("en-US", "dm³/min"), new AbbreviationsForCulture("ru-RU", "дм³/мин"), }), + new CulturesForEnumValue((int) FlowUnit.CubicFootPerHour, + new[] + { + new AbbreviationsForCulture("en-US", "cf/hr"), + }), new CulturesForEnumValue((int) FlowUnit.CubicFootPerSecond, new[] { @@ -1559,6 +1583,12 @@ private static readonly ReadOnlyCollection DefaultLocalization new AbbreviationsForCulture("en-US", "kg"), new AbbreviationsForCulture("ru-RU", "кг"), }), + new CulturesForEnumValue((int) MassUnit.Kilopound, + new[] + { + new AbbreviationsForCulture("en-US", "KLbs"), + new AbbreviationsForCulture("ru-RU", "kфунт"), + }), new CulturesForEnumValue((int) MassUnit.Kilotonne, new[] { @@ -1576,6 +1606,12 @@ private static readonly ReadOnlyCollection DefaultLocalization new AbbreviationsForCulture("en-US", "long tn"), new AbbreviationsForCulture("ru-RU", "тонна большая"), }), + new CulturesForEnumValue((int) MassUnit.Megapound, + new[] + { + new AbbreviationsForCulture("en-US", "MLbs"), + new AbbreviationsForCulture("ru-RU", "Mфунт"), + }), new CulturesForEnumValue((int) MassUnit.Megatonne, new[] { @@ -1609,6 +1645,7 @@ private static readonly ReadOnlyCollection DefaultLocalization new[] { new AbbreviationsForCulture("en-US", "lb"), + new AbbreviationsForCulture("ru-RU", "фунт"), }), new CulturesForEnumValue((int) MassUnit.ShortHundredweight, new[] @@ -1672,6 +1709,11 @@ private static readonly ReadOnlyCollection DefaultLocalization { new AbbreviationsForCulture("en-US", "kg/S"), }), + new CulturesForEnumValue((int) MassFlowUnit.MegapoundPerHour, + new[] + { + new AbbreviationsForCulture("en-US", "Mlb/h"), + }), new CulturesForEnumValue((int) MassFlowUnit.MicrogramPerSecond, new[] { @@ -1692,6 +1734,11 @@ private static readonly ReadOnlyCollection DefaultLocalization { new AbbreviationsForCulture("en-US", "lb/h"), }), + new CulturesForEnumValue((int) MassFlowUnit.ShortTonPerHour, + new[] + { + new AbbreviationsForCulture("en-US", "short tn/h"), + }), new CulturesForEnumValue((int) MassFlowUnit.TonnePerDay, new[] { @@ -1884,6 +1931,11 @@ private static readonly ReadOnlyCollection DefaultLocalization { new AbbreviationsForCulture("en-US", "hp(S)"), }), + new CulturesForEnumValue((int) PowerUnit.BritishThermalUnitPerHour, + new[] + { + new AbbreviationsForCulture("en-US", "Btu/hr"), + }), new CulturesForEnumValue((int) PowerUnit.ElectricalHorsepower, new[] { @@ -1904,6 +1956,11 @@ private static readonly ReadOnlyCollection DefaultLocalization { new AbbreviationsForCulture("en-US", "hp(H)"), }), + new CulturesForEnumValue((int) PowerUnit.KilobritishThermalUnitPerHour, + new[] + { + new AbbreviationsForCulture("en-US", "kBtu/hr"), + }), new CulturesForEnumValue((int) PowerUnit.Kilowatt, new[] { @@ -2950,6 +3007,18 @@ private static readonly ReadOnlyCollection DefaultLocalization new AbbreviationsForCulture("en-US", "dl"), new AbbreviationsForCulture("ru-RU", "дл"), }), + new CulturesForEnumValue((int) VolumeUnit.HectocubicFoot, + new[] + { + new AbbreviationsForCulture("en-US", "hft³"), + new AbbreviationsForCulture("ru-RU", "hфут³"), + }), + new CulturesForEnumValue((int) VolumeUnit.HectocubicMeter, + new[] + { + new AbbreviationsForCulture("en-US", "hm³"), + new AbbreviationsForCulture("ru-RU", "hм³"), + }), new CulturesForEnumValue((int) VolumeUnit.Hectoliter, new[] { @@ -2973,12 +3042,54 @@ private static readonly ReadOnlyCollection DefaultLocalization new AbbreviationsForCulture("en-US", "oz (imp.)"), new AbbreviationsForCulture("ru-RU", "Английская унция"), }), + new CulturesForEnumValue((int) VolumeUnit.KilocubicFoot, + new[] + { + new AbbreviationsForCulture("en-US", "kft³"), + new AbbreviationsForCulture("ru-RU", "kфут³"), + }), + new CulturesForEnumValue((int) VolumeUnit.KilocubicMeter, + new[] + { + new AbbreviationsForCulture("en-US", "km³"), + new AbbreviationsForCulture("ru-RU", "kм³"), + }), + new CulturesForEnumValue((int) VolumeUnit.KiloimperialGallon, + new[] + { + new AbbreviationsForCulture("en-US", "kgal (imp.)"), + new AbbreviationsForCulture("ru-RU", "kАнглийский галлон"), + }), + new CulturesForEnumValue((int) VolumeUnit.KilousGallon, + new[] + { + new AbbreviationsForCulture("en-US", "kgal (U.S.)"), + new AbbreviationsForCulture("ru-RU", "kАмериканский галлон"), + }), new CulturesForEnumValue((int) VolumeUnit.Liter, new[] { new AbbreviationsForCulture("en-US", "l"), new AbbreviationsForCulture("ru-RU", "л"), }), + new CulturesForEnumValue((int) VolumeUnit.MegacubicFoot, + new[] + { + new AbbreviationsForCulture("en-US", "Mft³"), + new AbbreviationsForCulture("ru-RU", "Mфут³"), + }), + new CulturesForEnumValue((int) VolumeUnit.MegaimperialGallon, + new[] + { + new AbbreviationsForCulture("en-US", "Mgal (imp.)"), + new AbbreviationsForCulture("ru-RU", "MАнглийский галлон"), + }), + new CulturesForEnumValue((int) VolumeUnit.MegausGallon, + new[] + { + new AbbreviationsForCulture("en-US", "Mgal (U.S.)"), + new AbbreviationsForCulture("ru-RU", "MАмериканский галлон"), + }), new CulturesForEnumValue((int) VolumeUnit.MetricCup, new[] { diff --git a/UnitsNet/UnitDefinitions/Energy.json b/UnitsNet/UnitDefinitions/Energy.json index 258d5bdf85..26dd8fe195 100644 --- a/UnitsNet/UnitDefinitions/Energy.json +++ b/UnitsNet/UnitDefinitions/Energy.json @@ -34,10 +34,12 @@ "PluralName": "BritishThermalUnits", "FromUnitToBaseFunc": "x*1055.05585262", "FromBaseToUnitFunc": "x/1055.05585262", + "Prefixes": [ "Kilo", "Mega", "Giga" ], "Localization": [ { "Culture": "en-US", - "Abbreviations": [ "BTU" ] + "Abbreviations": [ "BTU" ], + "AbbreviationsWithPrefixes": [ "kBTU", "mBTU", "mmBTU" ] } ] }, @@ -87,6 +89,10 @@ { "Culture": "en-US", "Abbreviations": [ "Wh" ] + }, + { + "Culture": "en-US", + "Abbreviations": [ "Вт/ч" ] } ] }, diff --git a/UnitsNet/UnitDefinitions/Flow.json b/UnitsNet/UnitDefinitions/Flow.json index f00e94bcf7..b1031ebc50 100644 --- a/UnitsNet/UnitDefinitions/Flow.json +++ b/UnitsNet/UnitDefinitions/Flow.json @@ -141,6 +141,18 @@ "Abbreviations": [ "bbl/d", "BOPD" ] } ] + }, + { + "SingularName": "CubicFootPerHour", + "PluralName": "CubicFeetPerHour", + "FromUnitToBaseFunc": "x*7.8657777777777777777777777777778e-6", + "FromBaseToUnitFunc": "x/7.8657777777777777777777777777778e-6", + "Localization": [ + { + "Culture": "en-US", + "Abbreviations": [ "cf/hr" ] + } + ] } ] } diff --git a/UnitsNet/UnitDefinitions/Mass.json b/UnitsNet/UnitDefinitions/Mass.json index 9daea7a5f7..9fe5212d10 100644 --- a/UnitsNet/UnitDefinitions/Mass.json +++ b/UnitsNet/UnitDefinitions/Mass.json @@ -81,10 +81,16 @@ "FromUnitToBaseFunc": "x*0.45359237", "FromBaseToUnitFunc": "x/0.45359237", "XmlDocSummary": "The pound or pound-mass (abbreviations: lb, lbm) is a unit of mass used in the imperial, United States customary and other systems of measurement. A number of different definitions have been used, the most common today being the international avoirdupois pound which is legally defined as exactly 0.45359237 kilograms, and which is divided into 16 avoirdupois ounces.", + "Prefixes": [ "Kilo", "Mega" ], "Localization": [ { "Culture": "en-US", - "Abbreviations": [ "lb" ] + "Abbreviations": [ "lb" ], + "AbbreviationsWithPrefixes": [ "KLbs", "MLbs" ] + }, + { + "Culture": "ru-RU", + "Abbreviations": [ "фунт" ] } ] }, diff --git a/UnitsNet/UnitDefinitions/MassFlow.json b/UnitsNet/UnitDefinitions/MassFlow.json index cbd32844b2..1833ed6e91 100644 --- a/UnitsNet/UnitDefinitions/MassFlow.json +++ b/UnitsNet/UnitDefinitions/MassFlow.json @@ -32,15 +32,17 @@ } ] }, - { + { "SingularName": "PoundPerHour", "PluralName": "PoundsPerHour", "FromUnitToBaseFunc": "x/7.93664", "FromBaseToUnitFunc": "x*7.93664", + "Prefixes": [ "Mega" ], "Localization": [ { "Culture": "en-US", - "Abbreviations": [ "lb/h" ] + "Abbreviations": [ "lb/h" ], + "AbbreviationsWithPrefixes": [ "Mlb/h" ] } ] }, @@ -55,6 +57,18 @@ "Abbreviations": [ "t/d" ] } ] + }, + { + "SingularName": "ShortTonPerHour", + "PluralName": "ShortTonsPerHour", + "FromUnitToBaseFunc": "x*251.9957611", + "FromBaseToUnitFunc": "x/251.9957611", + "Localization": [ + { + "Culture": "en-US", + "Abbreviations": [ "short tn/h" ] + } + ] } ] } \ No newline at end of file diff --git a/UnitsNet/UnitDefinitions/Power.json b/UnitsNet/UnitDefinitions/Power.json index ef5540c8e6..da47552033 100644 --- a/UnitsNet/UnitDefinitions/Power.json +++ b/UnitsNet/UnitDefinitions/Power.json @@ -76,6 +76,20 @@ "Abbreviations": [ "hp(H)" ] } ] + }, + { + "SingularName": "BritishThermalUnitPerHour", + "PluralName": "BritishThermalUnitsPerHour", + "FromUnitToBaseFunc": "x*0.293071m", + "FromBaseToUnitFunc": "x/0.293071m", + "Prefixes": [ "Kilo" ], + "Localization": [ + { + "Culture": "en-US", + "Abbreviations": [ "Btu/hr" ], + "AbbreviationsWithPrefixes": [ "kBtu/hr" ] + } + ] } ] } \ No newline at end of file diff --git a/UnitsNet/UnitDefinitions/Volume.json b/UnitsNet/UnitDefinitions/Volume.json index dc199774ea..91630c8b04 100644 --- a/UnitsNet/UnitDefinitions/Volume.json +++ b/UnitsNet/UnitDefinitions/Volume.json @@ -26,6 +26,7 @@ "PluralName": "CubicMeters", "FromUnitToBaseFunc": "x", "FromBaseToUnitFunc": "x", + "Prefixes": [ "Hecto", "Kilo" ], "Localization": [ { "Culture": "en-US", @@ -154,6 +155,7 @@ "PluralName": "CubicFeet", "FromUnitToBaseFunc": "x*0.0283168", "FromBaseToUnitFunc": "x/0.0283168", + "Prefixes": [ "Hecto", "Kilo", "Mega" ], "Localization": [ { "Culture": "en-US", @@ -186,6 +188,7 @@ "PluralName": "ImperialGallons", "FromUnitToBaseFunc": "x*0.00454609000000181429905810072407", "FromBaseToUnitFunc": "x/0.00454609000000181429905810072407", + "Prefixes": [ "Kilo", "Mega" ], "Localization": [ { "Culture": "en-US", @@ -218,6 +221,7 @@ "PluralName": "UsGallons", "FromUnitToBaseFunc": "x*0.00378541", "FromBaseToUnitFunc": "x/0.00378541", + "Prefixes": [ "Kilo", "Mega" ], "Localization": [ { "Culture": "en-US",