From 8140b11af2096bef4d0cca7801c210c3933ddc7e Mon Sep 17 00:00:00 2001 From: Tristan Milnthorp Date: Tue, 17 Apr 2018 15:14:53 -0400 Subject: [PATCH 1/5] Adding heat flux units with tests --- UnitsNet.Tests/CustomCode/HeatFluxTests.cs | 74 + .../GeneratedCode/HeatFluxTestsBase.g.cs | 269 ++++ UnitsNet/CustomCode/Quantities/Power.extra.cs | 7 +- .../Number/NumberToHeatFluxExtensions.g.cs | 593 ++++++++ .../GeneratedCode/Quantities/HeatFlux.g.cs | 1332 +++++++++++++++++ UnitsNet/GeneratedCode/QuantityType.g.cs | 1 + .../GeneratedCode/UnitSystem.Default.g.cs | 84 ++ .../GeneratedCode/Units/HeatFluxUnit.g.cs | 62 + UnitsNet/UnitDefinitions/HeatFlux.json | 117 ++ 9 files changed, 2538 insertions(+), 1 deletion(-) create mode 100644 UnitsNet.Tests/CustomCode/HeatFluxTests.cs create mode 100644 UnitsNet.Tests/GeneratedCode/HeatFluxTestsBase.g.cs create mode 100644 UnitsNet/GeneratedCode/Extensions/Number/NumberToHeatFluxExtensions.g.cs create mode 100644 UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs create mode 100644 UnitsNet/GeneratedCode/Units/HeatFluxUnit.g.cs create mode 100644 UnitsNet/UnitDefinitions/HeatFlux.json diff --git a/UnitsNet.Tests/CustomCode/HeatFluxTests.cs b/UnitsNet.Tests/CustomCode/HeatFluxTests.cs new file mode 100644 index 0000000000..ca7a9bcc7d --- /dev/null +++ b/UnitsNet.Tests/CustomCode/HeatFluxTests.cs @@ -0,0 +1,74 @@ +//------------------------------------------------------------------------------ +// +// This code was generated (once) by \generate-code.bat, but will not be +// regenerated when it already exists. The purpose of creating this file is to make +// it easier to remember to implement all the unit conversion test cases. +// +// Whenever a new unit is added to this quantity and \generate-code.bat is run, +// the base test class will get a new abstract property and cause a compile error +// in this derived class, reminding the developer to implement the test case +// for the new unit. +// +// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. +// +// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. +// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. +// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. +// +// +//------------------------------------------------------------------------------ + +// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). +// https://github.com/angularsen/UnitsNet +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + + +using System; +using Xunit; + +namespace UnitsNet.Tests.CustomCode +{ + public class HeatFluxTests : HeatFluxTestsBase + { + protected override double BtuPerSquareFootHourInOneWattPerSquareMeter => 3.16998331e-1; + protected override double BtuPerSquareFootMinuteInOneWattPerSquareMeter => 5.28330551e-3; + protected override double BtuPerSquareFootSecondInOneWattPerSquareMeter => 8.80550918e-5; + protected override double BtuPerSquareInchSecondInOneWattPerSquareMeter => 6.11493693e-7; + protected override double CalPerSquareCentiMeterSecondInOneWattPerSquareMeter => 2.39005736e-5; + protected override double CentiwattsPerSquareMeterInOneWattPerSquareMeter => 1e2; + protected override double DeciwattsPerSquareMeterInOneWattPerSquareMeter => 1e1; + protected override double KilocalPerSquareCentiMeterSecondInOneWattPerSquareMeter => 2.39005736e-8; + protected override double KiloCalPerSquareMeterHourInOneWattPerSquareMeter => 8.6042065e-1; + protected override double KilowattsPerSquareMeterInOneWattPerSquareMeter => 1e-3; + protected override double MicrowattsPerSquareMeterInOneWattPerSquareMeter => 1e6; + protected override double MilliwattsPerSquareMeterInOneWattPerSquareMeter => 1e3; + protected override double NanowattsPerSquareMeterInOneWattPerSquareMeter => 1e9; + protected override double WattPerSquareFootInOneWattPerSquareMeter => 9.290304e-2; + protected override double WattPerSquareInchInOneWattPerSquareMeter => 6.4516e-4; + protected override double WattsPerSquareMeterInOneWattPerSquareMeter => 1; + + [Fact] + public void PowerDividedByAreaEqualsHeatFlux() + { + HeatFlux heatFlux = Power.FromWatts( 12 ) / Area.FromSquareMeters( 3 ); + Assert.Equal( heatFlux, HeatFlux.FromWattsPerSquareMeter( 4 ) ); + } + } +} diff --git a/UnitsNet.Tests/GeneratedCode/HeatFluxTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/HeatFluxTestsBase.g.cs new file mode 100644 index 0000000000..6c46d42cbb --- /dev/null +++ b/UnitsNet.Tests/GeneratedCode/HeatFluxTestsBase.g.cs @@ -0,0 +1,269 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by \generate-code.bat. +// +// Changes to this file will be lost when the code is regenerated. +// The build server regenerates the code before each build and a pre-build +// step will regenerate the code on each local build. +// +// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. +// +// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. +// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. +// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. +// +// +//------------------------------------------------------------------------------ + +// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). +// https://github.com/angularsen/UnitsNet +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +using System; +using UnitsNet.Units; +using Xunit; + +// Disable build warning CS1718: Comparison made to same variable; did you mean to compare something else? +#pragma warning disable 1718 + +// ReSharper disable once CheckNamespace +namespace UnitsNet.Tests +{ + /// + /// Test of HeatFlux. + /// +// ReSharper disable once PartialTypeWithSinglePart + public abstract partial class HeatFluxTestsBase + { + protected abstract double BtuPerSquareFootHourInOneWattPerSquareMeter { get; } + protected abstract double BtuPerSquareFootMinuteInOneWattPerSquareMeter { get; } + protected abstract double BtuPerSquareFootSecondInOneWattPerSquareMeter { get; } + protected abstract double BtuPerSquareInchSecondInOneWattPerSquareMeter { get; } + protected abstract double CalPerSquareCentiMeterSecondInOneWattPerSquareMeter { get; } + protected abstract double CentiwattsPerSquareMeterInOneWattPerSquareMeter { get; } + protected abstract double DeciwattsPerSquareMeterInOneWattPerSquareMeter { get; } + protected abstract double KilocalPerSquareCentiMeterSecondInOneWattPerSquareMeter { get; } + protected abstract double KiloCalPerSquareMeterHourInOneWattPerSquareMeter { get; } + protected abstract double KilowattsPerSquareMeterInOneWattPerSquareMeter { get; } + protected abstract double MicrowattsPerSquareMeterInOneWattPerSquareMeter { get; } + protected abstract double MilliwattsPerSquareMeterInOneWattPerSquareMeter { get; } + protected abstract double NanowattsPerSquareMeterInOneWattPerSquareMeter { get; } + protected abstract double WattPerSquareFootInOneWattPerSquareMeter { get; } + protected abstract double WattPerSquareInchInOneWattPerSquareMeter { get; } + protected abstract double WattsPerSquareMeterInOneWattPerSquareMeter { get; } + +// ReSharper disable VirtualMemberNeverOverriden.Global + protected virtual double BtuPerSquareFootHourTolerance { get { return 1e-5; } } + protected virtual double BtuPerSquareFootMinuteTolerance { get { return 1e-5; } } + protected virtual double BtuPerSquareFootSecondTolerance { get { return 1e-5; } } + protected virtual double BtuPerSquareInchSecondTolerance { get { return 1e-5; } } + protected virtual double CalPerSquareCentiMeterSecondTolerance { get { return 1e-5; } } + protected virtual double CentiwattsPerSquareMeterTolerance { get { return 1e-5; } } + protected virtual double DeciwattsPerSquareMeterTolerance { get { return 1e-5; } } + protected virtual double KilocalPerSquareCentiMeterSecondTolerance { get { return 1e-5; } } + protected virtual double KiloCalPerSquareMeterHourTolerance { get { return 1e-5; } } + protected virtual double KilowattsPerSquareMeterTolerance { get { return 1e-5; } } + protected virtual double MicrowattsPerSquareMeterTolerance { get { return 1e-5; } } + protected virtual double MilliwattsPerSquareMeterTolerance { get { return 1e-5; } } + protected virtual double NanowattsPerSquareMeterTolerance { get { return 1e-5; } } + protected virtual double WattPerSquareFootTolerance { get { return 1e-5; } } + protected virtual double WattPerSquareInchTolerance { get { return 1e-5; } } + protected virtual double WattsPerSquareMeterTolerance { get { return 1e-5; } } +// ReSharper restore VirtualMemberNeverOverriden.Global + + [Fact] + public void WattPerSquareMeterToHeatFluxUnits() + { + HeatFlux wattpersquaremeter = HeatFlux.FromWattsPerSquareMeter(1); + AssertEx.EqualTolerance(BtuPerSquareFootHourInOneWattPerSquareMeter, wattpersquaremeter.BtuPerSquareFootHour, BtuPerSquareFootHourTolerance); + AssertEx.EqualTolerance(BtuPerSquareFootMinuteInOneWattPerSquareMeter, wattpersquaremeter.BtuPerSquareFootMinute, BtuPerSquareFootMinuteTolerance); + AssertEx.EqualTolerance(BtuPerSquareFootSecondInOneWattPerSquareMeter, wattpersquaremeter.BtuPerSquareFootSecond, BtuPerSquareFootSecondTolerance); + AssertEx.EqualTolerance(BtuPerSquareInchSecondInOneWattPerSquareMeter, wattpersquaremeter.BtuPerSquareInchSecond, BtuPerSquareInchSecondTolerance); + AssertEx.EqualTolerance(CalPerSquareCentiMeterSecondInOneWattPerSquareMeter, wattpersquaremeter.CalPerSquareCentiMeterSecond, CalPerSquareCentiMeterSecondTolerance); + AssertEx.EqualTolerance(CentiwattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.CentiwattsPerSquareMeter, CentiwattsPerSquareMeterTolerance); + AssertEx.EqualTolerance(DeciwattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.DeciwattsPerSquareMeter, DeciwattsPerSquareMeterTolerance); + AssertEx.EqualTolerance(KilocalPerSquareCentiMeterSecondInOneWattPerSquareMeter, wattpersquaremeter.KilocalPerSquareCentiMeterSecond, KilocalPerSquareCentiMeterSecondTolerance); + AssertEx.EqualTolerance(KiloCalPerSquareMeterHourInOneWattPerSquareMeter, wattpersquaremeter.KiloCalPerSquareMeterHour, KiloCalPerSquareMeterHourTolerance); + AssertEx.EqualTolerance(KilowattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.KilowattsPerSquareMeter, KilowattsPerSquareMeterTolerance); + AssertEx.EqualTolerance(MicrowattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.MicrowattsPerSquareMeter, MicrowattsPerSquareMeterTolerance); + AssertEx.EqualTolerance(MilliwattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.MilliwattsPerSquareMeter, MilliwattsPerSquareMeterTolerance); + AssertEx.EqualTolerance(NanowattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.NanowattsPerSquareMeter, NanowattsPerSquareMeterTolerance); + AssertEx.EqualTolerance(WattPerSquareFootInOneWattPerSquareMeter, wattpersquaremeter.WattPerSquareFoot, WattPerSquareFootTolerance); + AssertEx.EqualTolerance(WattPerSquareInchInOneWattPerSquareMeter, wattpersquaremeter.WattPerSquareInch, WattPerSquareInchTolerance); + AssertEx.EqualTolerance(WattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.WattsPerSquareMeter, WattsPerSquareMeterTolerance); + } + + [Fact] + public void FromValueAndUnit() + { + AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.BtuPerSquareFootHour).BtuPerSquareFootHour, BtuPerSquareFootHourTolerance); + AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.BtuPerSquareFootMinute).BtuPerSquareFootMinute, BtuPerSquareFootMinuteTolerance); + AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.BtuPerSquareFootSecond).BtuPerSquareFootSecond, BtuPerSquareFootSecondTolerance); + AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.BtuPerSquareInchSecond).BtuPerSquareInchSecond, BtuPerSquareInchSecondTolerance); + AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.CalPerSquareCentiMeterSecond).CalPerSquareCentiMeterSecond, CalPerSquareCentiMeterSecondTolerance); + AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.CentiwattPerSquareMeter).CentiwattsPerSquareMeter, CentiwattsPerSquareMeterTolerance); + AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.DeciwattPerSquareMeter).DeciwattsPerSquareMeter, DeciwattsPerSquareMeterTolerance); + AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.KilocalPerSquareCentiMeterSecond).KilocalPerSquareCentiMeterSecond, KilocalPerSquareCentiMeterSecondTolerance); + AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.KiloCalPerSquareMeterHour).KiloCalPerSquareMeterHour, KiloCalPerSquareMeterHourTolerance); + AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.KilowattPerSquareMeter).KilowattsPerSquareMeter, KilowattsPerSquareMeterTolerance); + AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.MicrowattPerSquareMeter).MicrowattsPerSquareMeter, MicrowattsPerSquareMeterTolerance); + AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.MilliwattPerSquareMeter).MilliwattsPerSquareMeter, MilliwattsPerSquareMeterTolerance); + AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.NanowattPerSquareMeter).NanowattsPerSquareMeter, NanowattsPerSquareMeterTolerance); + AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.WattPerSquareFoot).WattPerSquareFoot, WattPerSquareFootTolerance); + AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.WattPerSquareInch).WattPerSquareInch, WattPerSquareInchTolerance); + AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.WattPerSquareMeter).WattsPerSquareMeter, WattsPerSquareMeterTolerance); + } + + [Fact] + public void As() + { + var wattpersquaremeter = HeatFlux.FromWattsPerSquareMeter(1); + AssertEx.EqualTolerance(BtuPerSquareFootHourInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.BtuPerSquareFootHour), BtuPerSquareFootHourTolerance); + AssertEx.EqualTolerance(BtuPerSquareFootMinuteInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.BtuPerSquareFootMinute), BtuPerSquareFootMinuteTolerance); + AssertEx.EqualTolerance(BtuPerSquareFootSecondInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.BtuPerSquareFootSecond), BtuPerSquareFootSecondTolerance); + AssertEx.EqualTolerance(BtuPerSquareInchSecondInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.BtuPerSquareInchSecond), BtuPerSquareInchSecondTolerance); + AssertEx.EqualTolerance(CalPerSquareCentiMeterSecondInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.CalPerSquareCentiMeterSecond), CalPerSquareCentiMeterSecondTolerance); + AssertEx.EqualTolerance(CentiwattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.CentiwattPerSquareMeter), CentiwattsPerSquareMeterTolerance); + AssertEx.EqualTolerance(DeciwattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.DeciwattPerSquareMeter), DeciwattsPerSquareMeterTolerance); + AssertEx.EqualTolerance(KilocalPerSquareCentiMeterSecondInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.KilocalPerSquareCentiMeterSecond), KilocalPerSquareCentiMeterSecondTolerance); + AssertEx.EqualTolerance(KiloCalPerSquareMeterHourInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.KiloCalPerSquareMeterHour), KiloCalPerSquareMeterHourTolerance); + AssertEx.EqualTolerance(KilowattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.KilowattPerSquareMeter), KilowattsPerSquareMeterTolerance); + AssertEx.EqualTolerance(MicrowattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.MicrowattPerSquareMeter), MicrowattsPerSquareMeterTolerance); + AssertEx.EqualTolerance(MilliwattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.MilliwattPerSquareMeter), MilliwattsPerSquareMeterTolerance); + AssertEx.EqualTolerance(NanowattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.NanowattPerSquareMeter), NanowattsPerSquareMeterTolerance); + AssertEx.EqualTolerance(WattPerSquareFootInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.WattPerSquareFoot), WattPerSquareFootTolerance); + AssertEx.EqualTolerance(WattPerSquareInchInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.WattPerSquareInch), WattPerSquareInchTolerance); + AssertEx.EqualTolerance(WattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.WattPerSquareMeter), WattsPerSquareMeterTolerance); + } + + [Fact] + public void ConversionRoundTrip() + { + HeatFlux wattpersquaremeter = HeatFlux.FromWattsPerSquareMeter(1); + AssertEx.EqualTolerance(1, HeatFlux.FromBtuPerSquareFootHour(wattpersquaremeter.BtuPerSquareFootHour).WattsPerSquareMeter, BtuPerSquareFootHourTolerance); + AssertEx.EqualTolerance(1, HeatFlux.FromBtuPerSquareFootMinute(wattpersquaremeter.BtuPerSquareFootMinute).WattsPerSquareMeter, BtuPerSquareFootMinuteTolerance); + AssertEx.EqualTolerance(1, HeatFlux.FromBtuPerSquareFootSecond(wattpersquaremeter.BtuPerSquareFootSecond).WattsPerSquareMeter, BtuPerSquareFootSecondTolerance); + AssertEx.EqualTolerance(1, HeatFlux.FromBtuPerSquareInchSecond(wattpersquaremeter.BtuPerSquareInchSecond).WattsPerSquareMeter, BtuPerSquareInchSecondTolerance); + AssertEx.EqualTolerance(1, HeatFlux.FromCalPerSquareCentiMeterSecond(wattpersquaremeter.CalPerSquareCentiMeterSecond).WattsPerSquareMeter, CalPerSquareCentiMeterSecondTolerance); + AssertEx.EqualTolerance(1, HeatFlux.FromCentiwattsPerSquareMeter(wattpersquaremeter.CentiwattsPerSquareMeter).WattsPerSquareMeter, CentiwattsPerSquareMeterTolerance); + AssertEx.EqualTolerance(1, HeatFlux.FromDeciwattsPerSquareMeter(wattpersquaremeter.DeciwattsPerSquareMeter).WattsPerSquareMeter, DeciwattsPerSquareMeterTolerance); + AssertEx.EqualTolerance(1, HeatFlux.FromKilocalPerSquareCentiMeterSecond(wattpersquaremeter.KilocalPerSquareCentiMeterSecond).WattsPerSquareMeter, KilocalPerSquareCentiMeterSecondTolerance); + AssertEx.EqualTolerance(1, HeatFlux.FromKiloCalPerSquareMeterHour(wattpersquaremeter.KiloCalPerSquareMeterHour).WattsPerSquareMeter, KiloCalPerSquareMeterHourTolerance); + AssertEx.EqualTolerance(1, HeatFlux.FromKilowattsPerSquareMeter(wattpersquaremeter.KilowattsPerSquareMeter).WattsPerSquareMeter, KilowattsPerSquareMeterTolerance); + AssertEx.EqualTolerance(1, HeatFlux.FromMicrowattsPerSquareMeter(wattpersquaremeter.MicrowattsPerSquareMeter).WattsPerSquareMeter, MicrowattsPerSquareMeterTolerance); + AssertEx.EqualTolerance(1, HeatFlux.FromMilliwattsPerSquareMeter(wattpersquaremeter.MilliwattsPerSquareMeter).WattsPerSquareMeter, MilliwattsPerSquareMeterTolerance); + AssertEx.EqualTolerance(1, HeatFlux.FromNanowattsPerSquareMeter(wattpersquaremeter.NanowattsPerSquareMeter).WattsPerSquareMeter, NanowattsPerSquareMeterTolerance); + AssertEx.EqualTolerance(1, HeatFlux.FromWattPerSquareFoot(wattpersquaremeter.WattPerSquareFoot).WattsPerSquareMeter, WattPerSquareFootTolerance); + AssertEx.EqualTolerance(1, HeatFlux.FromWattPerSquareInch(wattpersquaremeter.WattPerSquareInch).WattsPerSquareMeter, WattPerSquareInchTolerance); + AssertEx.EqualTolerance(1, HeatFlux.FromWattsPerSquareMeter(wattpersquaremeter.WattsPerSquareMeter).WattsPerSquareMeter, WattsPerSquareMeterTolerance); + } + + [Fact] + public void ArithmeticOperators() + { + HeatFlux v = HeatFlux.FromWattsPerSquareMeter(1); + AssertEx.EqualTolerance(-1, -v.WattsPerSquareMeter, WattsPerSquareMeterTolerance); + AssertEx.EqualTolerance(2, (HeatFlux.FromWattsPerSquareMeter(3)-v).WattsPerSquareMeter, WattsPerSquareMeterTolerance); + AssertEx.EqualTolerance(2, (v + v).WattsPerSquareMeter, WattsPerSquareMeterTolerance); + AssertEx.EqualTolerance(10, (v*10).WattsPerSquareMeter, WattsPerSquareMeterTolerance); + AssertEx.EqualTolerance(10, (10*v).WattsPerSquareMeter, WattsPerSquareMeterTolerance); + AssertEx.EqualTolerance(2, (HeatFlux.FromWattsPerSquareMeter(10)/5).WattsPerSquareMeter, WattsPerSquareMeterTolerance); + AssertEx.EqualTolerance(2, HeatFlux.FromWattsPerSquareMeter(10)/HeatFlux.FromWattsPerSquareMeter(5), WattsPerSquareMeterTolerance); + } + + [Fact] + public void ComparisonOperators() + { + HeatFlux oneWattPerSquareMeter = HeatFlux.FromWattsPerSquareMeter(1); + HeatFlux twoWattsPerSquareMeter = HeatFlux.FromWattsPerSquareMeter(2); + + Assert.True(oneWattPerSquareMeter < twoWattsPerSquareMeter); + Assert.True(oneWattPerSquareMeter <= twoWattsPerSquareMeter); + Assert.True(twoWattsPerSquareMeter > oneWattPerSquareMeter); + Assert.True(twoWattsPerSquareMeter >= oneWattPerSquareMeter); + + Assert.False(oneWattPerSquareMeter > twoWattsPerSquareMeter); + Assert.False(oneWattPerSquareMeter >= twoWattsPerSquareMeter); + Assert.False(twoWattsPerSquareMeter < oneWattPerSquareMeter); + Assert.False(twoWattsPerSquareMeter <= oneWattPerSquareMeter); + } + + [Fact] + public void CompareToIsImplemented() + { + HeatFlux wattpersquaremeter = HeatFlux.FromWattsPerSquareMeter(1); + Assert.Equal(0, wattpersquaremeter.CompareTo(wattpersquaremeter)); + Assert.True(wattpersquaremeter.CompareTo(HeatFlux.Zero) > 0); + Assert.True(HeatFlux.Zero.CompareTo(wattpersquaremeter) < 0); + } + + [Fact] + public void CompareToThrowsOnTypeMismatch() + { + HeatFlux wattpersquaremeter = HeatFlux.FromWattsPerSquareMeter(1); + Assert.Throws(() => wattpersquaremeter.CompareTo(new object())); + } + + [Fact] + public void CompareToThrowsOnNull() + { + HeatFlux wattpersquaremeter = HeatFlux.FromWattsPerSquareMeter(1); + Assert.Throws(() => wattpersquaremeter.CompareTo(null)); + } + + + [Fact] + public void EqualityOperators() + { + HeatFlux a = HeatFlux.FromWattsPerSquareMeter(1); + HeatFlux b = HeatFlux.FromWattsPerSquareMeter(2); + +// ReSharper disable EqualExpressionComparison + Assert.True(a == a); + Assert.True(a != b); + + Assert.False(a == b); + Assert.False(a != a); +// ReSharper restore EqualExpressionComparison + } + + [Fact] + public void EqualsIsImplemented() + { + HeatFlux v = HeatFlux.FromWattsPerSquareMeter(1); + Assert.True(v.Equals(HeatFlux.FromWattsPerSquareMeter(1), HeatFlux.FromWattsPerSquareMeter(WattsPerSquareMeterTolerance))); + Assert.False(v.Equals(HeatFlux.Zero, HeatFlux.FromWattsPerSquareMeter(WattsPerSquareMeterTolerance))); + } + + [Fact] + public void EqualsReturnsFalseOnTypeMismatch() + { + HeatFlux wattpersquaremeter = HeatFlux.FromWattsPerSquareMeter(1); + Assert.False(wattpersquaremeter.Equals(new object())); + } + + [Fact] + public void EqualsReturnsFalseOnNull() + { + HeatFlux wattpersquaremeter = HeatFlux.FromWattsPerSquareMeter(1); + Assert.False(wattpersquaremeter.Equals(null)); + } + } +} diff --git a/UnitsNet/CustomCode/Quantities/Power.extra.cs b/UnitsNet/CustomCode/Quantities/Power.extra.cs index f4f484aefa..4f2e173280 100644 --- a/UnitsNet/CustomCode/Quantities/Power.extra.cs +++ b/UnitsNet/CustomCode/Quantities/Power.extra.cs @@ -86,6 +86,11 @@ public partial struct Power { return MassFlow.FromKilogramsPerSecond(power.Watts / specificEnergy.JoulesPerKilogram); } + + public static HeatFlux operator /(Power power, Area area) + { + return HeatFlux.FromWattsPerSquareMeter(power.Watts / area.SquareMeters); + } #endif } -} \ No newline at end of file +} diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToHeatFluxExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToHeatFluxExtensions.g.cs new file mode 100644 index 0000000000..f3b6c06bef --- /dev/null +++ b/UnitsNet/GeneratedCode/Extensions/Number/NumberToHeatFluxExtensions.g.cs @@ -0,0 +1,593 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by \generate-code.bat. +// +// Changes to this file will be lost when the code is regenerated. +// The build server regenerates the code before each build and a pre-build +// step will regenerate the code on each local build. +// +// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. +// +// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. +// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. +// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. +// +// +//------------------------------------------------------------------------------ + +// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). +// https://github.com/angularsen/UnitsNet +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +using System; + +// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx +#if !WINDOWS_UWP +namespace UnitsNet.Extensions.NumberToHeatFlux +{ + public static class NumberToHeatFluxExtensions + { + #region BtuPerSquareFootHour + + /// + public static HeatFlux BtuPerSquareFootHour(this int value) => HeatFlux.FromBtuPerSquareFootHour(value); + + /// + public static HeatFlux? BtuPerSquareFootHour(this int? value) => HeatFlux.FromBtuPerSquareFootHour(value); + + /// + public static HeatFlux BtuPerSquareFootHour(this long value) => HeatFlux.FromBtuPerSquareFootHour(value); + + /// + public static HeatFlux? BtuPerSquareFootHour(this long? value) => HeatFlux.FromBtuPerSquareFootHour(value); + + /// + public static HeatFlux BtuPerSquareFootHour(this double value) => HeatFlux.FromBtuPerSquareFootHour(value); + + /// + public static HeatFlux? BtuPerSquareFootHour(this double? value) => HeatFlux.FromBtuPerSquareFootHour(value); + + /// + public static HeatFlux BtuPerSquareFootHour(this float value) => HeatFlux.FromBtuPerSquareFootHour(value); + + /// + public static HeatFlux? BtuPerSquareFootHour(this float? value) => HeatFlux.FromBtuPerSquareFootHour(value); + + /// + public static HeatFlux BtuPerSquareFootHour(this decimal value) => HeatFlux.FromBtuPerSquareFootHour(Convert.ToDouble(value)); + + /// + public static HeatFlux? BtuPerSquareFootHour(this decimal? value) => HeatFlux.FromBtuPerSquareFootHour(value == null ? (double?)null : Convert.ToDouble(value.Value)); + + #endregion + + #region BtuPerSquareFootMinute + + /// + public static HeatFlux BtuPerSquareFootMinute(this int value) => HeatFlux.FromBtuPerSquareFootMinute(value); + + /// + public static HeatFlux? BtuPerSquareFootMinute(this int? value) => HeatFlux.FromBtuPerSquareFootMinute(value); + + /// + public static HeatFlux BtuPerSquareFootMinute(this long value) => HeatFlux.FromBtuPerSquareFootMinute(value); + + /// + public static HeatFlux? BtuPerSquareFootMinute(this long? value) => HeatFlux.FromBtuPerSquareFootMinute(value); + + /// + public static HeatFlux BtuPerSquareFootMinute(this double value) => HeatFlux.FromBtuPerSquareFootMinute(value); + + /// + public static HeatFlux? BtuPerSquareFootMinute(this double? value) => HeatFlux.FromBtuPerSquareFootMinute(value); + + /// + public static HeatFlux BtuPerSquareFootMinute(this float value) => HeatFlux.FromBtuPerSquareFootMinute(value); + + /// + public static HeatFlux? BtuPerSquareFootMinute(this float? value) => HeatFlux.FromBtuPerSquareFootMinute(value); + + /// + public static HeatFlux BtuPerSquareFootMinute(this decimal value) => HeatFlux.FromBtuPerSquareFootMinute(Convert.ToDouble(value)); + + /// + public static HeatFlux? BtuPerSquareFootMinute(this decimal? value) => HeatFlux.FromBtuPerSquareFootMinute(value == null ? (double?)null : Convert.ToDouble(value.Value)); + + #endregion + + #region BtuPerSquareFootSecond + + /// + public static HeatFlux BtuPerSquareFootSecond(this int value) => HeatFlux.FromBtuPerSquareFootSecond(value); + + /// + public static HeatFlux? BtuPerSquareFootSecond(this int? value) => HeatFlux.FromBtuPerSquareFootSecond(value); + + /// + public static HeatFlux BtuPerSquareFootSecond(this long value) => HeatFlux.FromBtuPerSquareFootSecond(value); + + /// + public static HeatFlux? BtuPerSquareFootSecond(this long? value) => HeatFlux.FromBtuPerSquareFootSecond(value); + + /// + public static HeatFlux BtuPerSquareFootSecond(this double value) => HeatFlux.FromBtuPerSquareFootSecond(value); + + /// + public static HeatFlux? BtuPerSquareFootSecond(this double? value) => HeatFlux.FromBtuPerSquareFootSecond(value); + + /// + public static HeatFlux BtuPerSquareFootSecond(this float value) => HeatFlux.FromBtuPerSquareFootSecond(value); + + /// + public static HeatFlux? BtuPerSquareFootSecond(this float? value) => HeatFlux.FromBtuPerSquareFootSecond(value); + + /// + public static HeatFlux BtuPerSquareFootSecond(this decimal value) => HeatFlux.FromBtuPerSquareFootSecond(Convert.ToDouble(value)); + + /// + public static HeatFlux? BtuPerSquareFootSecond(this decimal? value) => HeatFlux.FromBtuPerSquareFootSecond(value == null ? (double?)null : Convert.ToDouble(value.Value)); + + #endregion + + #region BtuPerSquareInchSecond + + /// + public static HeatFlux BtuPerSquareInchSecond(this int value) => HeatFlux.FromBtuPerSquareInchSecond(value); + + /// + public static HeatFlux? BtuPerSquareInchSecond(this int? value) => HeatFlux.FromBtuPerSquareInchSecond(value); + + /// + public static HeatFlux BtuPerSquareInchSecond(this long value) => HeatFlux.FromBtuPerSquareInchSecond(value); + + /// + public static HeatFlux? BtuPerSquareInchSecond(this long? value) => HeatFlux.FromBtuPerSquareInchSecond(value); + + /// + public static HeatFlux BtuPerSquareInchSecond(this double value) => HeatFlux.FromBtuPerSquareInchSecond(value); + + /// + public static HeatFlux? BtuPerSquareInchSecond(this double? value) => HeatFlux.FromBtuPerSquareInchSecond(value); + + /// + public static HeatFlux BtuPerSquareInchSecond(this float value) => HeatFlux.FromBtuPerSquareInchSecond(value); + + /// + public static HeatFlux? BtuPerSquareInchSecond(this float? value) => HeatFlux.FromBtuPerSquareInchSecond(value); + + /// + public static HeatFlux BtuPerSquareInchSecond(this decimal value) => HeatFlux.FromBtuPerSquareInchSecond(Convert.ToDouble(value)); + + /// + public static HeatFlux? BtuPerSquareInchSecond(this decimal? value) => HeatFlux.FromBtuPerSquareInchSecond(value == null ? (double?)null : Convert.ToDouble(value.Value)); + + #endregion + + #region CalPerSquareCentiMeterSecond + + /// + public static HeatFlux CalPerSquareCentiMeterSecond(this int value) => HeatFlux.FromCalPerSquareCentiMeterSecond(value); + + /// + public static HeatFlux? CalPerSquareCentiMeterSecond(this int? value) => HeatFlux.FromCalPerSquareCentiMeterSecond(value); + + /// + public static HeatFlux CalPerSquareCentiMeterSecond(this long value) => HeatFlux.FromCalPerSquareCentiMeterSecond(value); + + /// + public static HeatFlux? CalPerSquareCentiMeterSecond(this long? value) => HeatFlux.FromCalPerSquareCentiMeterSecond(value); + + /// + public static HeatFlux CalPerSquareCentiMeterSecond(this double value) => HeatFlux.FromCalPerSquareCentiMeterSecond(value); + + /// + public static HeatFlux? CalPerSquareCentiMeterSecond(this double? value) => HeatFlux.FromCalPerSquareCentiMeterSecond(value); + + /// + public static HeatFlux CalPerSquareCentiMeterSecond(this float value) => HeatFlux.FromCalPerSquareCentiMeterSecond(value); + + /// + public static HeatFlux? CalPerSquareCentiMeterSecond(this float? value) => HeatFlux.FromCalPerSquareCentiMeterSecond(value); + + /// + public static HeatFlux CalPerSquareCentiMeterSecond(this decimal value) => HeatFlux.FromCalPerSquareCentiMeterSecond(Convert.ToDouble(value)); + + /// + public static HeatFlux? CalPerSquareCentiMeterSecond(this decimal? value) => HeatFlux.FromCalPerSquareCentiMeterSecond(value == null ? (double?)null : Convert.ToDouble(value.Value)); + + #endregion + + #region CentiwattPerSquareMeter + + /// + public static HeatFlux CentiwattsPerSquareMeter(this int value) => HeatFlux.FromCentiwattsPerSquareMeter(value); + + /// + public static HeatFlux? CentiwattsPerSquareMeter(this int? value) => HeatFlux.FromCentiwattsPerSquareMeter(value); + + /// + public static HeatFlux CentiwattsPerSquareMeter(this long value) => HeatFlux.FromCentiwattsPerSquareMeter(value); + + /// + public static HeatFlux? CentiwattsPerSquareMeter(this long? value) => HeatFlux.FromCentiwattsPerSquareMeter(value); + + /// + public static HeatFlux CentiwattsPerSquareMeter(this double value) => HeatFlux.FromCentiwattsPerSquareMeter(value); + + /// + public static HeatFlux? CentiwattsPerSquareMeter(this double? value) => HeatFlux.FromCentiwattsPerSquareMeter(value); + + /// + public static HeatFlux CentiwattsPerSquareMeter(this float value) => HeatFlux.FromCentiwattsPerSquareMeter(value); + + /// + public static HeatFlux? CentiwattsPerSquareMeter(this float? value) => HeatFlux.FromCentiwattsPerSquareMeter(value); + + /// + public static HeatFlux CentiwattsPerSquareMeter(this decimal value) => HeatFlux.FromCentiwattsPerSquareMeter(Convert.ToDouble(value)); + + /// + public static HeatFlux? CentiwattsPerSquareMeter(this decimal? value) => HeatFlux.FromCentiwattsPerSquareMeter(value == null ? (double?)null : Convert.ToDouble(value.Value)); + + #endregion + + #region DeciwattPerSquareMeter + + /// + public static HeatFlux DeciwattsPerSquareMeter(this int value) => HeatFlux.FromDeciwattsPerSquareMeter(value); + + /// + public static HeatFlux? DeciwattsPerSquareMeter(this int? value) => HeatFlux.FromDeciwattsPerSquareMeter(value); + + /// + public static HeatFlux DeciwattsPerSquareMeter(this long value) => HeatFlux.FromDeciwattsPerSquareMeter(value); + + /// + public static HeatFlux? DeciwattsPerSquareMeter(this long? value) => HeatFlux.FromDeciwattsPerSquareMeter(value); + + /// + public static HeatFlux DeciwattsPerSquareMeter(this double value) => HeatFlux.FromDeciwattsPerSquareMeter(value); + + /// + public static HeatFlux? DeciwattsPerSquareMeter(this double? value) => HeatFlux.FromDeciwattsPerSquareMeter(value); + + /// + public static HeatFlux DeciwattsPerSquareMeter(this float value) => HeatFlux.FromDeciwattsPerSquareMeter(value); + + /// + public static HeatFlux? DeciwattsPerSquareMeter(this float? value) => HeatFlux.FromDeciwattsPerSquareMeter(value); + + /// + public static HeatFlux DeciwattsPerSquareMeter(this decimal value) => HeatFlux.FromDeciwattsPerSquareMeter(Convert.ToDouble(value)); + + /// + public static HeatFlux? DeciwattsPerSquareMeter(this decimal? value) => HeatFlux.FromDeciwattsPerSquareMeter(value == null ? (double?)null : Convert.ToDouble(value.Value)); + + #endregion + + #region KilocalPerSquareCentiMeterSecond + + /// + public static HeatFlux KilocalPerSquareCentiMeterSecond(this int value) => HeatFlux.FromKilocalPerSquareCentiMeterSecond(value); + + /// + public static HeatFlux? KilocalPerSquareCentiMeterSecond(this int? value) => HeatFlux.FromKilocalPerSquareCentiMeterSecond(value); + + /// + public static HeatFlux KilocalPerSquareCentiMeterSecond(this long value) => HeatFlux.FromKilocalPerSquareCentiMeterSecond(value); + + /// + public static HeatFlux? KilocalPerSquareCentiMeterSecond(this long? value) => HeatFlux.FromKilocalPerSquareCentiMeterSecond(value); + + /// + public static HeatFlux KilocalPerSquareCentiMeterSecond(this double value) => HeatFlux.FromKilocalPerSquareCentiMeterSecond(value); + + /// + public static HeatFlux? KilocalPerSquareCentiMeterSecond(this double? value) => HeatFlux.FromKilocalPerSquareCentiMeterSecond(value); + + /// + public static HeatFlux KilocalPerSquareCentiMeterSecond(this float value) => HeatFlux.FromKilocalPerSquareCentiMeterSecond(value); + + /// + public static HeatFlux? KilocalPerSquareCentiMeterSecond(this float? value) => HeatFlux.FromKilocalPerSquareCentiMeterSecond(value); + + /// + public static HeatFlux KilocalPerSquareCentiMeterSecond(this decimal value) => HeatFlux.FromKilocalPerSquareCentiMeterSecond(Convert.ToDouble(value)); + + /// + public static HeatFlux? KilocalPerSquareCentiMeterSecond(this decimal? value) => HeatFlux.FromKilocalPerSquareCentiMeterSecond(value == null ? (double?)null : Convert.ToDouble(value.Value)); + + #endregion + + #region KiloCalPerSquareMeterHour + + /// + public static HeatFlux KiloCalPerSquareMeterHour(this int value) => HeatFlux.FromKiloCalPerSquareMeterHour(value); + + /// + public static HeatFlux? KiloCalPerSquareMeterHour(this int? value) => HeatFlux.FromKiloCalPerSquareMeterHour(value); + + /// + public static HeatFlux KiloCalPerSquareMeterHour(this long value) => HeatFlux.FromKiloCalPerSquareMeterHour(value); + + /// + public static HeatFlux? KiloCalPerSquareMeterHour(this long? value) => HeatFlux.FromKiloCalPerSquareMeterHour(value); + + /// + public static HeatFlux KiloCalPerSquareMeterHour(this double value) => HeatFlux.FromKiloCalPerSquareMeterHour(value); + + /// + public static HeatFlux? KiloCalPerSquareMeterHour(this double? value) => HeatFlux.FromKiloCalPerSquareMeterHour(value); + + /// + public static HeatFlux KiloCalPerSquareMeterHour(this float value) => HeatFlux.FromKiloCalPerSquareMeterHour(value); + + /// + public static HeatFlux? KiloCalPerSquareMeterHour(this float? value) => HeatFlux.FromKiloCalPerSquareMeterHour(value); + + /// + public static HeatFlux KiloCalPerSquareMeterHour(this decimal value) => HeatFlux.FromKiloCalPerSquareMeterHour(Convert.ToDouble(value)); + + /// + public static HeatFlux? KiloCalPerSquareMeterHour(this decimal? value) => HeatFlux.FromKiloCalPerSquareMeterHour(value == null ? (double?)null : Convert.ToDouble(value.Value)); + + #endregion + + #region KilowattPerSquareMeter + + /// + public static HeatFlux KilowattsPerSquareMeter(this int value) => HeatFlux.FromKilowattsPerSquareMeter(value); + + /// + public static HeatFlux? KilowattsPerSquareMeter(this int? value) => HeatFlux.FromKilowattsPerSquareMeter(value); + + /// + public static HeatFlux KilowattsPerSquareMeter(this long value) => HeatFlux.FromKilowattsPerSquareMeter(value); + + /// + public static HeatFlux? KilowattsPerSquareMeter(this long? value) => HeatFlux.FromKilowattsPerSquareMeter(value); + + /// + public static HeatFlux KilowattsPerSquareMeter(this double value) => HeatFlux.FromKilowattsPerSquareMeter(value); + + /// + public static HeatFlux? KilowattsPerSquareMeter(this double? value) => HeatFlux.FromKilowattsPerSquareMeter(value); + + /// + public static HeatFlux KilowattsPerSquareMeter(this float value) => HeatFlux.FromKilowattsPerSquareMeter(value); + + /// + public static HeatFlux? KilowattsPerSquareMeter(this float? value) => HeatFlux.FromKilowattsPerSquareMeter(value); + + /// + public static HeatFlux KilowattsPerSquareMeter(this decimal value) => HeatFlux.FromKilowattsPerSquareMeter(Convert.ToDouble(value)); + + /// + public static HeatFlux? KilowattsPerSquareMeter(this decimal? value) => HeatFlux.FromKilowattsPerSquareMeter(value == null ? (double?)null : Convert.ToDouble(value.Value)); + + #endregion + + #region MicrowattPerSquareMeter + + /// + public static HeatFlux MicrowattsPerSquareMeter(this int value) => HeatFlux.FromMicrowattsPerSquareMeter(value); + + /// + public static HeatFlux? MicrowattsPerSquareMeter(this int? value) => HeatFlux.FromMicrowattsPerSquareMeter(value); + + /// + public static HeatFlux MicrowattsPerSquareMeter(this long value) => HeatFlux.FromMicrowattsPerSquareMeter(value); + + /// + public static HeatFlux? MicrowattsPerSquareMeter(this long? value) => HeatFlux.FromMicrowattsPerSquareMeter(value); + + /// + public static HeatFlux MicrowattsPerSquareMeter(this double value) => HeatFlux.FromMicrowattsPerSquareMeter(value); + + /// + public static HeatFlux? MicrowattsPerSquareMeter(this double? value) => HeatFlux.FromMicrowattsPerSquareMeter(value); + + /// + public static HeatFlux MicrowattsPerSquareMeter(this float value) => HeatFlux.FromMicrowattsPerSquareMeter(value); + + /// + public static HeatFlux? MicrowattsPerSquareMeter(this float? value) => HeatFlux.FromMicrowattsPerSquareMeter(value); + + /// + public static HeatFlux MicrowattsPerSquareMeter(this decimal value) => HeatFlux.FromMicrowattsPerSquareMeter(Convert.ToDouble(value)); + + /// + public static HeatFlux? MicrowattsPerSquareMeter(this decimal? value) => HeatFlux.FromMicrowattsPerSquareMeter(value == null ? (double?)null : Convert.ToDouble(value.Value)); + + #endregion + + #region MilliwattPerSquareMeter + + /// + public static HeatFlux MilliwattsPerSquareMeter(this int value) => HeatFlux.FromMilliwattsPerSquareMeter(value); + + /// + public static HeatFlux? MilliwattsPerSquareMeter(this int? value) => HeatFlux.FromMilliwattsPerSquareMeter(value); + + /// + public static HeatFlux MilliwattsPerSquareMeter(this long value) => HeatFlux.FromMilliwattsPerSquareMeter(value); + + /// + public static HeatFlux? MilliwattsPerSquareMeter(this long? value) => HeatFlux.FromMilliwattsPerSquareMeter(value); + + /// + public static HeatFlux MilliwattsPerSquareMeter(this double value) => HeatFlux.FromMilliwattsPerSquareMeter(value); + + /// + public static HeatFlux? MilliwattsPerSquareMeter(this double? value) => HeatFlux.FromMilliwattsPerSquareMeter(value); + + /// + public static HeatFlux MilliwattsPerSquareMeter(this float value) => HeatFlux.FromMilliwattsPerSquareMeter(value); + + /// + public static HeatFlux? MilliwattsPerSquareMeter(this float? value) => HeatFlux.FromMilliwattsPerSquareMeter(value); + + /// + public static HeatFlux MilliwattsPerSquareMeter(this decimal value) => HeatFlux.FromMilliwattsPerSquareMeter(Convert.ToDouble(value)); + + /// + public static HeatFlux? MilliwattsPerSquareMeter(this decimal? value) => HeatFlux.FromMilliwattsPerSquareMeter(value == null ? (double?)null : Convert.ToDouble(value.Value)); + + #endregion + + #region NanowattPerSquareMeter + + /// + public static HeatFlux NanowattsPerSquareMeter(this int value) => HeatFlux.FromNanowattsPerSquareMeter(value); + + /// + public static HeatFlux? NanowattsPerSquareMeter(this int? value) => HeatFlux.FromNanowattsPerSquareMeter(value); + + /// + public static HeatFlux NanowattsPerSquareMeter(this long value) => HeatFlux.FromNanowattsPerSquareMeter(value); + + /// + public static HeatFlux? NanowattsPerSquareMeter(this long? value) => HeatFlux.FromNanowattsPerSquareMeter(value); + + /// + public static HeatFlux NanowattsPerSquareMeter(this double value) => HeatFlux.FromNanowattsPerSquareMeter(value); + + /// + public static HeatFlux? NanowattsPerSquareMeter(this double? value) => HeatFlux.FromNanowattsPerSquareMeter(value); + + /// + public static HeatFlux NanowattsPerSquareMeter(this float value) => HeatFlux.FromNanowattsPerSquareMeter(value); + + /// + public static HeatFlux? NanowattsPerSquareMeter(this float? value) => HeatFlux.FromNanowattsPerSquareMeter(value); + + /// + public static HeatFlux NanowattsPerSquareMeter(this decimal value) => HeatFlux.FromNanowattsPerSquareMeter(Convert.ToDouble(value)); + + /// + public static HeatFlux? NanowattsPerSquareMeter(this decimal? value) => HeatFlux.FromNanowattsPerSquareMeter(value == null ? (double?)null : Convert.ToDouble(value.Value)); + + #endregion + + #region WattPerSquareFoot + + /// + public static HeatFlux WattPerSquareFoot(this int value) => HeatFlux.FromWattPerSquareFoot(value); + + /// + public static HeatFlux? WattPerSquareFoot(this int? value) => HeatFlux.FromWattPerSquareFoot(value); + + /// + public static HeatFlux WattPerSquareFoot(this long value) => HeatFlux.FromWattPerSquareFoot(value); + + /// + public static HeatFlux? WattPerSquareFoot(this long? value) => HeatFlux.FromWattPerSquareFoot(value); + + /// + public static HeatFlux WattPerSquareFoot(this double value) => HeatFlux.FromWattPerSquareFoot(value); + + /// + public static HeatFlux? WattPerSquareFoot(this double? value) => HeatFlux.FromWattPerSquareFoot(value); + + /// + public static HeatFlux WattPerSquareFoot(this float value) => HeatFlux.FromWattPerSquareFoot(value); + + /// + public static HeatFlux? WattPerSquareFoot(this float? value) => HeatFlux.FromWattPerSquareFoot(value); + + /// + public static HeatFlux WattPerSquareFoot(this decimal value) => HeatFlux.FromWattPerSquareFoot(Convert.ToDouble(value)); + + /// + public static HeatFlux? WattPerSquareFoot(this decimal? value) => HeatFlux.FromWattPerSquareFoot(value == null ? (double?)null : Convert.ToDouble(value.Value)); + + #endregion + + #region WattPerSquareInch + + /// + public static HeatFlux WattPerSquareInch(this int value) => HeatFlux.FromWattPerSquareInch(value); + + /// + public static HeatFlux? WattPerSquareInch(this int? value) => HeatFlux.FromWattPerSquareInch(value); + + /// + public static HeatFlux WattPerSquareInch(this long value) => HeatFlux.FromWattPerSquareInch(value); + + /// + public static HeatFlux? WattPerSquareInch(this long? value) => HeatFlux.FromWattPerSquareInch(value); + + /// + public static HeatFlux WattPerSquareInch(this double value) => HeatFlux.FromWattPerSquareInch(value); + + /// + public static HeatFlux? WattPerSquareInch(this double? value) => HeatFlux.FromWattPerSquareInch(value); + + /// + public static HeatFlux WattPerSquareInch(this float value) => HeatFlux.FromWattPerSquareInch(value); + + /// + public static HeatFlux? WattPerSquareInch(this float? value) => HeatFlux.FromWattPerSquareInch(value); + + /// + public static HeatFlux WattPerSquareInch(this decimal value) => HeatFlux.FromWattPerSquareInch(Convert.ToDouble(value)); + + /// + public static HeatFlux? WattPerSquareInch(this decimal? value) => HeatFlux.FromWattPerSquareInch(value == null ? (double?)null : Convert.ToDouble(value.Value)); + + #endregion + + #region WattPerSquareMeter + + /// + public static HeatFlux WattsPerSquareMeter(this int value) => HeatFlux.FromWattsPerSquareMeter(value); + + /// + public static HeatFlux? WattsPerSquareMeter(this int? value) => HeatFlux.FromWattsPerSquareMeter(value); + + /// + public static HeatFlux WattsPerSquareMeter(this long value) => HeatFlux.FromWattsPerSquareMeter(value); + + /// + public static HeatFlux? WattsPerSquareMeter(this long? value) => HeatFlux.FromWattsPerSquareMeter(value); + + /// + public static HeatFlux WattsPerSquareMeter(this double value) => HeatFlux.FromWattsPerSquareMeter(value); + + /// + public static HeatFlux? WattsPerSquareMeter(this double? value) => HeatFlux.FromWattsPerSquareMeter(value); + + /// + public static HeatFlux WattsPerSquareMeter(this float value) => HeatFlux.FromWattsPerSquareMeter(value); + + /// + public static HeatFlux? WattsPerSquareMeter(this float? value) => HeatFlux.FromWattsPerSquareMeter(value); + + /// + public static HeatFlux WattsPerSquareMeter(this decimal value) => HeatFlux.FromWattsPerSquareMeter(Convert.ToDouble(value)); + + /// + public static HeatFlux? WattsPerSquareMeter(this decimal? value) => HeatFlux.FromWattsPerSquareMeter(value == null ? (double?)null : Convert.ToDouble(value.Value)); + + #endregion + + } +} +#endif diff --git a/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs new file mode 100644 index 0000000000..9fddf1bfe1 --- /dev/null +++ b/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs @@ -0,0 +1,1332 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by \generate-code.bat. +// +// Changes to this file will be lost when the code is regenerated. +// The build server regenerates the code before each build and a pre-build +// step will regenerate the code on each local build. +// +// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. +// +// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. +// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. +// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. +// +// +//------------------------------------------------------------------------------ + +// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). +// https://github.com/angularsen/UnitsNet +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Text.RegularExpressions; +using System.Linq; +using JetBrains.Annotations; +using UnitsNet.Units; + +// ReSharper disable once CheckNamespace + +namespace UnitsNet +{ + /// + /// Heat flux is the flow of energy per unit of area per unit of time + /// + // ReSharper disable once PartialTypeWithSinglePart + + // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components + // Public structures can't have any members other than public fields, and those fields must be value types or strings. + // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. +#if WINDOWS_UWP + public sealed partial class HeatFlux +#else + public partial struct HeatFlux : IComparable, IComparable +#endif + { + /// + /// The numeric value this quantity was constructed with. + /// + private readonly double _value; + + /// + /// The unit this quantity was constructed with. + /// + private readonly HeatFluxUnit? _unit; + + /// + /// The numeric value this quantity was constructed with. + /// +#if WINDOWS_UWP + public double Value => Convert.ToDouble(_value); +#else + public double Value => _value; +#endif + + /// + /// The unit this quantity was constructed with -or- if default ctor was used. + /// + public HeatFluxUnit Unit => _unit.GetValueOrDefault(BaseUnit); + + // Windows Runtime Component requires a default constructor +#if WINDOWS_UWP + public HeatFlux() + { + _value = 0; + _unit = BaseUnit; + } +#endif + + [Obsolete("Use the constructor that takes a unit parameter. This constructor will be removed in a future version.")] + public HeatFlux(double wattspersquaremeter) + { + _value = Convert.ToDouble(wattspersquaremeter); + _unit = BaseUnit; + } + + /// + /// Creates the quantity with the given numeric value and unit. + /// + /// Numeric value. + /// Unit representation. + /// Value parameter cannot be named 'value' due to constraint when targeting Windows Runtime Component. +#if WINDOWS_UWP + private +#else + public +#endif + HeatFlux(double numericValue, HeatFluxUnit unit) + { + _value = numericValue; + _unit = unit; + } + + // Windows Runtime Component does not allow public methods/ctors with same number of parameters: https://msdn.microsoft.com/en-us/library/br230301.aspx#Overloaded methods + /// + /// Creates the quantity with the given value assuming the base unit WattPerSquareMeter. + /// + /// Value assuming base unit WattPerSquareMeter. +#if WINDOWS_UWP + private +#else + [Obsolete("Use the constructor that takes a unit parameter. This constructor will be removed in a future version.")] + public +#endif + HeatFlux(long wattspersquaremeter) : this(Convert.ToDouble(wattspersquaremeter), BaseUnit) { } + + // Windows Runtime Component does not allow public methods/ctors with same number of parameters: https://msdn.microsoft.com/en-us/library/br230301.aspx#Overloaded methods + // Windows Runtime Component does not support decimal type + /// + /// Creates the quantity with the given value assuming the base unit WattPerSquareMeter. + /// + /// Value assuming base unit WattPerSquareMeter. +#if WINDOWS_UWP + private +#else + [Obsolete("Use the constructor that takes a unit parameter. This constructor will be removed in a future version.")] + public +#endif + HeatFlux(decimal wattspersquaremeter) : this(Convert.ToDouble(wattspersquaremeter), BaseUnit) { } + + #region Properties + + /// + /// The of this quantity. + /// + public static QuantityType QuantityType => QuantityType.HeatFlux; + + /// + /// The base unit representation of this quantity for the numeric value stored internally. All conversions go via this value. + /// + public static HeatFluxUnit BaseUnit => HeatFluxUnit.WattPerSquareMeter; + + /// + /// All units of measurement for the HeatFlux quantity. + /// + public static HeatFluxUnit[] Units { get; } = Enum.GetValues(typeof(HeatFluxUnit)).Cast().ToArray(); + /// + /// Get HeatFlux in BtuPerSquareFootHour. + /// + public double BtuPerSquareFootHour => As(HeatFluxUnit.BtuPerSquareFootHour); + /// + /// Get HeatFlux in BtuPerSquareFootMinute. + /// + public double BtuPerSquareFootMinute => As(HeatFluxUnit.BtuPerSquareFootMinute); + /// + /// Get HeatFlux in BtuPerSquareFootSecond. + /// + public double BtuPerSquareFootSecond => As(HeatFluxUnit.BtuPerSquareFootSecond); + /// + /// Get HeatFlux in BtuPerSquareInchSecond. + /// + public double BtuPerSquareInchSecond => As(HeatFluxUnit.BtuPerSquareInchSecond); + /// + /// Get HeatFlux in CalPerSquareCentiMeterSecond. + /// + public double CalPerSquareCentiMeterSecond => As(HeatFluxUnit.CalPerSquareCentiMeterSecond); + /// + /// Get HeatFlux in CentiwattsPerSquareMeter. + /// + public double CentiwattsPerSquareMeter => As(HeatFluxUnit.CentiwattPerSquareMeter); + /// + /// Get HeatFlux in DeciwattsPerSquareMeter. + /// + public double DeciwattsPerSquareMeter => As(HeatFluxUnit.DeciwattPerSquareMeter); + /// + /// Get HeatFlux in KilocalPerSquareCentiMeterSecond. + /// + public double KilocalPerSquareCentiMeterSecond => As(HeatFluxUnit.KilocalPerSquareCentiMeterSecond); + /// + /// Get HeatFlux in KiloCalPerSquareMeterHour. + /// + public double KiloCalPerSquareMeterHour => As(HeatFluxUnit.KiloCalPerSquareMeterHour); + /// + /// Get HeatFlux in KilowattsPerSquareMeter. + /// + public double KilowattsPerSquareMeter => As(HeatFluxUnit.KilowattPerSquareMeter); + /// + /// Get HeatFlux in MicrowattsPerSquareMeter. + /// + public double MicrowattsPerSquareMeter => As(HeatFluxUnit.MicrowattPerSquareMeter); + /// + /// Get HeatFlux in MilliwattsPerSquareMeter. + /// + public double MilliwattsPerSquareMeter => As(HeatFluxUnit.MilliwattPerSquareMeter); + /// + /// Get HeatFlux in NanowattsPerSquareMeter. + /// + public double NanowattsPerSquareMeter => As(HeatFluxUnit.NanowattPerSquareMeter); + /// + /// Get HeatFlux in WattPerSquareFoot. + /// + public double WattPerSquareFoot => As(HeatFluxUnit.WattPerSquareFoot); + /// + /// Get HeatFlux in WattPerSquareInch. + /// + public double WattPerSquareInch => As(HeatFluxUnit.WattPerSquareInch); + /// + /// Get HeatFlux in WattsPerSquareMeter. + /// + public double WattsPerSquareMeter => As(HeatFluxUnit.WattPerSquareMeter); + + #endregion + + #region Static + + public static HeatFlux Zero => new HeatFlux(0, BaseUnit); + + /// + /// Get HeatFlux from BtuPerSquareFootHour. + /// +#if WINDOWS_UWP + [Windows.Foundation.Metadata.DefaultOverload] + public static HeatFlux FromBtuPerSquareFootHour(double btupersquarefoothour) +#else + public static HeatFlux FromBtuPerSquareFootHour(QuantityValue btupersquarefoothour) +#endif + { + double value = (double) btupersquarefoothour; + return new HeatFlux(value, HeatFluxUnit.BtuPerSquareFootHour); + } + + /// + /// Get HeatFlux from BtuPerSquareFootMinute. + /// +#if WINDOWS_UWP + [Windows.Foundation.Metadata.DefaultOverload] + public static HeatFlux FromBtuPerSquareFootMinute(double btupersquarefootminute) +#else + public static HeatFlux FromBtuPerSquareFootMinute(QuantityValue btupersquarefootminute) +#endif + { + double value = (double) btupersquarefootminute; + return new HeatFlux(value, HeatFluxUnit.BtuPerSquareFootMinute); + } + + /// + /// Get HeatFlux from BtuPerSquareFootSecond. + /// +#if WINDOWS_UWP + [Windows.Foundation.Metadata.DefaultOverload] + public static HeatFlux FromBtuPerSquareFootSecond(double btupersquarefootsecond) +#else + public static HeatFlux FromBtuPerSquareFootSecond(QuantityValue btupersquarefootsecond) +#endif + { + double value = (double) btupersquarefootsecond; + return new HeatFlux(value, HeatFluxUnit.BtuPerSquareFootSecond); + } + + /// + /// Get HeatFlux from BtuPerSquareInchSecond. + /// +#if WINDOWS_UWP + [Windows.Foundation.Metadata.DefaultOverload] + public static HeatFlux FromBtuPerSquareInchSecond(double btupersquareinchsecond) +#else + public static HeatFlux FromBtuPerSquareInchSecond(QuantityValue btupersquareinchsecond) +#endif + { + double value = (double) btupersquareinchsecond; + return new HeatFlux(value, HeatFluxUnit.BtuPerSquareInchSecond); + } + + /// + /// Get HeatFlux from CalPerSquareCentiMeterSecond. + /// +#if WINDOWS_UWP + [Windows.Foundation.Metadata.DefaultOverload] + public static HeatFlux FromCalPerSquareCentiMeterSecond(double calpersquarecentimetersecond) +#else + public static HeatFlux FromCalPerSquareCentiMeterSecond(QuantityValue calpersquarecentimetersecond) +#endif + { + double value = (double) calpersquarecentimetersecond; + return new HeatFlux(value, HeatFluxUnit.CalPerSquareCentiMeterSecond); + } + + /// + /// Get HeatFlux from CentiwattsPerSquareMeter. + /// +#if WINDOWS_UWP + [Windows.Foundation.Metadata.DefaultOverload] + public static HeatFlux FromCentiwattsPerSquareMeter(double centiwattspersquaremeter) +#else + public static HeatFlux FromCentiwattsPerSquareMeter(QuantityValue centiwattspersquaremeter) +#endif + { + double value = (double) centiwattspersquaremeter; + return new HeatFlux(value, HeatFluxUnit.CentiwattPerSquareMeter); + } + + /// + /// Get HeatFlux from DeciwattsPerSquareMeter. + /// +#if WINDOWS_UWP + [Windows.Foundation.Metadata.DefaultOverload] + public static HeatFlux FromDeciwattsPerSquareMeter(double deciwattspersquaremeter) +#else + public static HeatFlux FromDeciwattsPerSquareMeter(QuantityValue deciwattspersquaremeter) +#endif + { + double value = (double) deciwattspersquaremeter; + return new HeatFlux(value, HeatFluxUnit.DeciwattPerSquareMeter); + } + + /// + /// Get HeatFlux from KilocalPerSquareCentiMeterSecond. + /// +#if WINDOWS_UWP + [Windows.Foundation.Metadata.DefaultOverload] + public static HeatFlux FromKilocalPerSquareCentiMeterSecond(double kilocalpersquarecentimetersecond) +#else + public static HeatFlux FromKilocalPerSquareCentiMeterSecond(QuantityValue kilocalpersquarecentimetersecond) +#endif + { + double value = (double) kilocalpersquarecentimetersecond; + return new HeatFlux(value, HeatFluxUnit.KilocalPerSquareCentiMeterSecond); + } + + /// + /// Get HeatFlux from KiloCalPerSquareMeterHour. + /// +#if WINDOWS_UWP + [Windows.Foundation.Metadata.DefaultOverload] + public static HeatFlux FromKiloCalPerSquareMeterHour(double kilocalpersquaremeterhour) +#else + public static HeatFlux FromKiloCalPerSquareMeterHour(QuantityValue kilocalpersquaremeterhour) +#endif + { + double value = (double) kilocalpersquaremeterhour; + return new HeatFlux(value, HeatFluxUnit.KiloCalPerSquareMeterHour); + } + + /// + /// Get HeatFlux from KilowattsPerSquareMeter. + /// +#if WINDOWS_UWP + [Windows.Foundation.Metadata.DefaultOverload] + public static HeatFlux FromKilowattsPerSquareMeter(double kilowattspersquaremeter) +#else + public static HeatFlux FromKilowattsPerSquareMeter(QuantityValue kilowattspersquaremeter) +#endif + { + double value = (double) kilowattspersquaremeter; + return new HeatFlux(value, HeatFluxUnit.KilowattPerSquareMeter); + } + + /// + /// Get HeatFlux from MicrowattsPerSquareMeter. + /// +#if WINDOWS_UWP + [Windows.Foundation.Metadata.DefaultOverload] + public static HeatFlux FromMicrowattsPerSquareMeter(double microwattspersquaremeter) +#else + public static HeatFlux FromMicrowattsPerSquareMeter(QuantityValue microwattspersquaremeter) +#endif + { + double value = (double) microwattspersquaremeter; + return new HeatFlux(value, HeatFluxUnit.MicrowattPerSquareMeter); + } + + /// + /// Get HeatFlux from MilliwattsPerSquareMeter. + /// +#if WINDOWS_UWP + [Windows.Foundation.Metadata.DefaultOverload] + public static HeatFlux FromMilliwattsPerSquareMeter(double milliwattspersquaremeter) +#else + public static HeatFlux FromMilliwattsPerSquareMeter(QuantityValue milliwattspersquaremeter) +#endif + { + double value = (double) milliwattspersquaremeter; + return new HeatFlux(value, HeatFluxUnit.MilliwattPerSquareMeter); + } + + /// + /// Get HeatFlux from NanowattsPerSquareMeter. + /// +#if WINDOWS_UWP + [Windows.Foundation.Metadata.DefaultOverload] + public static HeatFlux FromNanowattsPerSquareMeter(double nanowattspersquaremeter) +#else + public static HeatFlux FromNanowattsPerSquareMeter(QuantityValue nanowattspersquaremeter) +#endif + { + double value = (double) nanowattspersquaremeter; + return new HeatFlux(value, HeatFluxUnit.NanowattPerSquareMeter); + } + + /// + /// Get HeatFlux from WattPerSquareFoot. + /// +#if WINDOWS_UWP + [Windows.Foundation.Metadata.DefaultOverload] + public static HeatFlux FromWattPerSquareFoot(double wattpersquarefoot) +#else + public static HeatFlux FromWattPerSquareFoot(QuantityValue wattpersquarefoot) +#endif + { + double value = (double) wattpersquarefoot; + return new HeatFlux(value, HeatFluxUnit.WattPerSquareFoot); + } + + /// + /// Get HeatFlux from WattPerSquareInch. + /// +#if WINDOWS_UWP + [Windows.Foundation.Metadata.DefaultOverload] + public static HeatFlux FromWattPerSquareInch(double wattpersquareinch) +#else + public static HeatFlux FromWattPerSquareInch(QuantityValue wattpersquareinch) +#endif + { + double value = (double) wattpersquareinch; + return new HeatFlux(value, HeatFluxUnit.WattPerSquareInch); + } + + /// + /// Get HeatFlux from WattsPerSquareMeter. + /// +#if WINDOWS_UWP + [Windows.Foundation.Metadata.DefaultOverload] + public static HeatFlux FromWattsPerSquareMeter(double wattspersquaremeter) +#else + public static HeatFlux FromWattsPerSquareMeter(QuantityValue wattspersquaremeter) +#endif + { + double value = (double) wattspersquaremeter; + return new HeatFlux(value, HeatFluxUnit.WattPerSquareMeter); + } + + // Windows Runtime Component does not support nullable types (double?): https://msdn.microsoft.com/en-us/library/br230301.aspx +#if !WINDOWS_UWP + /// + /// Get nullable HeatFlux from nullable BtuPerSquareFootHour. + /// + public static HeatFlux? FromBtuPerSquareFootHour(QuantityValue? btupersquarefoothour) + { + if (btupersquarefoothour.HasValue) + { + return FromBtuPerSquareFootHour(btupersquarefoothour.Value); + } + else + { + return null; + } + } + + /// + /// Get nullable HeatFlux from nullable BtuPerSquareFootMinute. + /// + public static HeatFlux? FromBtuPerSquareFootMinute(QuantityValue? btupersquarefootminute) + { + if (btupersquarefootminute.HasValue) + { + return FromBtuPerSquareFootMinute(btupersquarefootminute.Value); + } + else + { + return null; + } + } + + /// + /// Get nullable HeatFlux from nullable BtuPerSquareFootSecond. + /// + public static HeatFlux? FromBtuPerSquareFootSecond(QuantityValue? btupersquarefootsecond) + { + if (btupersquarefootsecond.HasValue) + { + return FromBtuPerSquareFootSecond(btupersquarefootsecond.Value); + } + else + { + return null; + } + } + + /// + /// Get nullable HeatFlux from nullable BtuPerSquareInchSecond. + /// + public static HeatFlux? FromBtuPerSquareInchSecond(QuantityValue? btupersquareinchsecond) + { + if (btupersquareinchsecond.HasValue) + { + return FromBtuPerSquareInchSecond(btupersquareinchsecond.Value); + } + else + { + return null; + } + } + + /// + /// Get nullable HeatFlux from nullable CalPerSquareCentiMeterSecond. + /// + public static HeatFlux? FromCalPerSquareCentiMeterSecond(QuantityValue? calpersquarecentimetersecond) + { + if (calpersquarecentimetersecond.HasValue) + { + return FromCalPerSquareCentiMeterSecond(calpersquarecentimetersecond.Value); + } + else + { + return null; + } + } + + /// + /// Get nullable HeatFlux from nullable CentiwattsPerSquareMeter. + /// + public static HeatFlux? FromCentiwattsPerSquareMeter(QuantityValue? centiwattspersquaremeter) + { + if (centiwattspersquaremeter.HasValue) + { + return FromCentiwattsPerSquareMeter(centiwattspersquaremeter.Value); + } + else + { + return null; + } + } + + /// + /// Get nullable HeatFlux from nullable DeciwattsPerSquareMeter. + /// + public static HeatFlux? FromDeciwattsPerSquareMeter(QuantityValue? deciwattspersquaremeter) + { + if (deciwattspersquaremeter.HasValue) + { + return FromDeciwattsPerSquareMeter(deciwattspersquaremeter.Value); + } + else + { + return null; + } + } + + /// + /// Get nullable HeatFlux from nullable KilocalPerSquareCentiMeterSecond. + /// + public static HeatFlux? FromKilocalPerSquareCentiMeterSecond(QuantityValue? kilocalpersquarecentimetersecond) + { + if (kilocalpersquarecentimetersecond.HasValue) + { + return FromKilocalPerSquareCentiMeterSecond(kilocalpersquarecentimetersecond.Value); + } + else + { + return null; + } + } + + /// + /// Get nullable HeatFlux from nullable KiloCalPerSquareMeterHour. + /// + public static HeatFlux? FromKiloCalPerSquareMeterHour(QuantityValue? kilocalpersquaremeterhour) + { + if (kilocalpersquaremeterhour.HasValue) + { + return FromKiloCalPerSquareMeterHour(kilocalpersquaremeterhour.Value); + } + else + { + return null; + } + } + + /// + /// Get nullable HeatFlux from nullable KilowattsPerSquareMeter. + /// + public static HeatFlux? FromKilowattsPerSquareMeter(QuantityValue? kilowattspersquaremeter) + { + if (kilowattspersquaremeter.HasValue) + { + return FromKilowattsPerSquareMeter(kilowattspersquaremeter.Value); + } + else + { + return null; + } + } + + /// + /// Get nullable HeatFlux from nullable MicrowattsPerSquareMeter. + /// + public static HeatFlux? FromMicrowattsPerSquareMeter(QuantityValue? microwattspersquaremeter) + { + if (microwattspersquaremeter.HasValue) + { + return FromMicrowattsPerSquareMeter(microwattspersquaremeter.Value); + } + else + { + return null; + } + } + + /// + /// Get nullable HeatFlux from nullable MilliwattsPerSquareMeter. + /// + public static HeatFlux? FromMilliwattsPerSquareMeter(QuantityValue? milliwattspersquaremeter) + { + if (milliwattspersquaremeter.HasValue) + { + return FromMilliwattsPerSquareMeter(milliwattspersquaremeter.Value); + } + else + { + return null; + } + } + + /// + /// Get nullable HeatFlux from nullable NanowattsPerSquareMeter. + /// + public static HeatFlux? FromNanowattsPerSquareMeter(QuantityValue? nanowattspersquaremeter) + { + if (nanowattspersquaremeter.HasValue) + { + return FromNanowattsPerSquareMeter(nanowattspersquaremeter.Value); + } + else + { + return null; + } + } + + /// + /// Get nullable HeatFlux from nullable WattPerSquareFoot. + /// + public static HeatFlux? FromWattPerSquareFoot(QuantityValue? wattpersquarefoot) + { + if (wattpersquarefoot.HasValue) + { + return FromWattPerSquareFoot(wattpersquarefoot.Value); + } + else + { + return null; + } + } + + /// + /// Get nullable HeatFlux from nullable WattPerSquareInch. + /// + public static HeatFlux? FromWattPerSquareInch(QuantityValue? wattpersquareinch) + { + if (wattpersquareinch.HasValue) + { + return FromWattPerSquareInch(wattpersquareinch.Value); + } + else + { + return null; + } + } + + /// + /// Get nullable HeatFlux from nullable WattsPerSquareMeter. + /// + public static HeatFlux? FromWattsPerSquareMeter(QuantityValue? wattspersquaremeter) + { + if (wattspersquaremeter.HasValue) + { + return FromWattsPerSquareMeter(wattspersquaremeter.Value); + } + else + { + return null; + } + } + +#endif + + /// + /// Dynamically convert from value and unit enum to . + /// + /// Value to convert from. + /// Unit to convert from. + /// HeatFlux unit value. +#if WINDOWS_UWP + // Fix name conflict with parameter "value" + [return: System.Runtime.InteropServices.WindowsRuntime.ReturnValueName("returnValue")] + public static HeatFlux From(double value, HeatFluxUnit fromUnit) +#else + public static HeatFlux From(QuantityValue value, HeatFluxUnit fromUnit) +#endif + { + return new HeatFlux((double)value, fromUnit); + } + + // Windows Runtime Component does not support nullable types (double?): https://msdn.microsoft.com/en-us/library/br230301.aspx +#if !WINDOWS_UWP + /// + /// Dynamically convert from value and unit enum to . + /// + /// Value to convert from. + /// Unit to convert from. + /// HeatFlux unit value. + public static HeatFlux? From(QuantityValue? value, HeatFluxUnit fromUnit) + { + if (!value.HasValue) + { + return null; + } + + return new HeatFlux((double)value.Value, fromUnit); + } +#endif + + /// + /// Get unit abbreviation string. + /// + /// Unit to get abbreviation for. + /// Unit abbreviation string. + [UsedImplicitly] + public static string GetAbbreviation(HeatFluxUnit unit) + { + return GetAbbreviation(unit, null); + } + + /// + /// Get unit abbreviation string. + /// + /// Unit to get abbreviation for. +#if WINDOWS_UWP + /// Name of culture (ex: "en-US") to use for localization. Defaults to 's default culture. +#else + /// Format to use for localization. Defaults to . +#endif + /// Unit abbreviation string. + [UsedImplicitly] + public static string GetAbbreviation( + HeatFluxUnit unit, +#if WINDOWS_UWP + [CanBeNull] string cultureName) +#else + [CanBeNull] IFormatProvider provider) +#endif + { +#if WINDOWS_UWP + // Windows Runtime Component does not support CultureInfo and IFormatProvider types, so we use culture name for public methods: https://msdn.microsoft.com/en-us/library/br230301.aspx + IFormatProvider provider = cultureName == null ? UnitSystem.DefaultCulture : new CultureInfo(cultureName); +#else + provider = provider ?? UnitSystem.DefaultCulture; +#endif + + return UnitSystem.GetCached(provider).GetDefaultAbbreviation(unit); + } + + #endregion + + #region Arithmetic Operators + + // Windows Runtime Component does not allow operator overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx +#if !WINDOWS_UWP + public static HeatFlux operator -(HeatFlux right) + { + return new HeatFlux(-right.Value, right.Unit); + } + + public static HeatFlux operator +(HeatFlux left, HeatFlux right) + { + return new HeatFlux(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + } + + public static HeatFlux operator -(HeatFlux left, HeatFlux right) + { + return new HeatFlux(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + } + + public static HeatFlux operator *(double left, HeatFlux right) + { + return new HeatFlux(left * right.Value, right.Unit); + } + + public static HeatFlux operator *(HeatFlux left, double right) + { + return new HeatFlux(left.Value * right, left.Unit); + } + + public static HeatFlux operator /(HeatFlux left, double right) + { + return new HeatFlux(left.Value / right, left.Unit); + } + + public static double operator /(HeatFlux left, HeatFlux right) + { + return left.WattsPerSquareMeter / right.WattsPerSquareMeter; + } +#endif + + #endregion + + #region Equality / IComparable + + public int CompareTo(object obj) + { + if (obj == null) throw new ArgumentNullException("obj"); + if (!(obj is HeatFlux)) throw new ArgumentException("Expected type HeatFlux.", "obj"); + return CompareTo((HeatFlux) obj); + } + + // Windows Runtime Component does not allow public methods/ctors with same number of parameters: https://msdn.microsoft.com/en-us/library/br230301.aspx#Overloaded methods +#if WINDOWS_UWP + internal +#else + public +#endif + int CompareTo(HeatFlux other) + { + return AsBaseUnitWattsPerSquareMeter().CompareTo(other.AsBaseUnitWattsPerSquareMeter()); + } + + // Windows Runtime Component does not allow operator overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx +#if !WINDOWS_UWP + public static bool operator <=(HeatFlux left, HeatFlux right) + { + return left.Value <= right.AsBaseNumericType(left.Unit); + } + + public static bool operator >=(HeatFlux left, HeatFlux right) + { + return left.Value >= right.AsBaseNumericType(left.Unit); + } + + public static bool operator <(HeatFlux left, HeatFlux right) + { + return left.Value < right.AsBaseNumericType(left.Unit); + } + + public static bool operator >(HeatFlux left, HeatFlux right) + { + return left.Value > right.AsBaseNumericType(left.Unit); + } + + [Obsolete("It is not safe to compare equality due to using System.Double as the internal representation. It is very easy to get slightly different values due to floating point operations. Instead use Equals(other, maxError) to provide the max allowed error.")] + public static bool operator ==(HeatFlux left, HeatFlux right) + { + // ReSharper disable once CompareOfFloatsByEqualityOperator + return left.Value == right.AsBaseNumericType(left.Unit); + } + + [Obsolete("It is not safe to compare equality due to using System.Double as the internal representation. It is very easy to get slightly different values due to floating point operations. Instead use Equals(other, maxError) to provide the max allowed error.")] + public static bool operator !=(HeatFlux left, HeatFlux right) + { + // ReSharper disable once CompareOfFloatsByEqualityOperator + return left.Value != right.AsBaseNumericType(left.Unit); + } +#endif + + [Obsolete("It is not safe to compare equality due to using System.Double as the internal representation. It is very easy to get slightly different values due to floating point operations. Instead use Equals(other, maxError) to provide the max allowed error.")] + public override bool Equals(object obj) + { + if (obj == null || GetType() != obj.GetType()) + { + return false; + } + + return AsBaseUnitWattsPerSquareMeter().Equals(((HeatFlux) obj).AsBaseUnitWattsPerSquareMeter()); + } + + /// + /// Compare equality to another HeatFlux by specifying a max allowed difference. + /// Note that it is advised against specifying zero difference, due to the nature + /// of floating point operations and using System.Double internally. + /// + /// Other quantity to compare to. + /// Max error allowed. + /// True if the difference between the two values is not greater than the specified max. + public bool Equals(HeatFlux other, HeatFlux maxError) + { + return Math.Abs(AsBaseUnitWattsPerSquareMeter() - other.AsBaseUnitWattsPerSquareMeter()) <= maxError.AsBaseUnitWattsPerSquareMeter(); + } + + public override int GetHashCode() + { + return new { Value, Unit }.GetHashCode(); + } + + #endregion + + #region Conversion + + /// + /// Convert to the unit representation . + /// + /// Value converted to the specified unit. + public double As(HeatFluxUnit unit) + { + if (Unit == unit) + { + return (double)Value; + } + + double baseUnitValue = AsBaseUnitWattsPerSquareMeter(); + + switch (unit) + { + case HeatFluxUnit.BtuPerSquareFootHour: return baseUnitValue/3.15459075; + case HeatFluxUnit.BtuPerSquareFootMinute: return baseUnitValue/1.89275445e2; + case HeatFluxUnit.BtuPerSquareFootSecond: return baseUnitValue/1.13565267e4; + case HeatFluxUnit.BtuPerSquareInchSecond: return baseUnitValue/1.63533984e6; + case HeatFluxUnit.CalPerSquareCentiMeterSecond: return baseUnitValue/4.1840e4; + case HeatFluxUnit.CentiwattPerSquareMeter: return (baseUnitValue) / 1e-2d; + case HeatFluxUnit.DeciwattPerSquareMeter: return (baseUnitValue) / 1e-1d; + case HeatFluxUnit.KilocalPerSquareCentiMeterSecond: return (baseUnitValue/4.1840e4) / 1e3d; + case HeatFluxUnit.KiloCalPerSquareMeterHour: return baseUnitValue/1.16222222; + case HeatFluxUnit.KilowattPerSquareMeter: return (baseUnitValue) / 1e3d; + case HeatFluxUnit.MicrowattPerSquareMeter: return (baseUnitValue) / 1e-6d; + case HeatFluxUnit.MilliwattPerSquareMeter: return (baseUnitValue) / 1e-3d; + case HeatFluxUnit.NanowattPerSquareMeter: return (baseUnitValue) / 1e-9d; + case HeatFluxUnit.WattPerSquareFoot: return baseUnitValue/1.07639e1; + case HeatFluxUnit.WattPerSquareInch: return baseUnitValue/1.5500031e3; + case HeatFluxUnit.WattPerSquareMeter: return baseUnitValue; + + default: + throw new NotImplementedException("unit: " + unit); + } + } + + #endregion + + #region Parsing + + /// + /// Parse a string with one or two quantities of the format "<quantity> <unit>". + /// + /// String to parse. Typically in the form: {number} {unit} + /// + /// Length.Parse("5.5 m", new CultureInfo("en-US")); + /// + /// The value of 'str' cannot be null. + /// + /// Expected string to have one or two pairs of quantity and unit in the format + /// "<quantity> <unit>". Eg. "5.5 m" or "1ft 2in" + /// + /// + /// More than one unit is represented by the specified unit abbreviation. + /// Example: Volume.Parse("1 cup") will throw, because it can refer to any of + /// , and . + /// + /// + /// If anything else goes wrong, typically due to a bug or unhandled case. + /// We wrap exceptions in to allow you to distinguish + /// Units.NET exceptions from other exceptions. + /// + public static HeatFlux Parse(string str) + { + return Parse(str, null); + } + + /// + /// Parse a string with one or two quantities of the format "<quantity> <unit>". + /// + /// String to parse. Typically in the form: {number} {unit} +#if WINDOWS_UWP + /// Name of culture (ex: "en-US") to use when parsing number and unit. Defaults to 's default culture. +#else + /// Format to use when parsing number and unit. Defaults to . +#endif + /// + /// Length.Parse("5.5 m", new CultureInfo("en-US")); + /// + /// The value of 'str' cannot be null. + /// + /// Expected string to have one or two pairs of quantity and unit in the format + /// "<quantity> <unit>". Eg. "5.5 m" or "1ft 2in" + /// + /// + /// More than one unit is represented by the specified unit abbreviation. + /// Example: Volume.Parse("1 cup") will throw, because it can refer to any of + /// , and . + /// + /// + /// If anything else goes wrong, typically due to a bug or unhandled case. + /// We wrap exceptions in to allow you to distinguish + /// Units.NET exceptions from other exceptions. + /// + public static HeatFlux Parse( + string str, +#if WINDOWS_UWP + [CanBeNull] string cultureName) +#else + [CanBeNull] IFormatProvider provider) +#endif + { + if (str == null) throw new ArgumentNullException("str"); + +#if WINDOWS_UWP + // Windows Runtime Component does not support CultureInfo and IFormatProvider types, so we use culture name for public methods: https://msdn.microsoft.com/en-us/library/br230301.aspx + IFormatProvider provider = cultureName == null ? UnitSystem.DefaultCulture : new CultureInfo(cultureName); +#else + provider = provider ?? UnitSystem.DefaultCulture; +#endif + + return QuantityParser.Parse(str, provider, + delegate(string value, string unit, IFormatProvider formatProvider2) + { + double parsedValue = double.Parse(value, formatProvider2); + HeatFluxUnit parsedUnit = ParseUnit(unit, formatProvider2); + return From(parsedValue, parsedUnit); + }, (x, y) => FromWattsPerSquareMeter(x.WattsPerSquareMeter + y.WattsPerSquareMeter)); + } + + /// + /// Try to parse a string with one or two quantities of the format "<quantity> <unit>". + /// + /// String to parse. Typically in the form: {number} {unit} + /// Resulting unit quantity if successful. + /// + /// Length.Parse("5.5 m", new CultureInfo("en-US")); + /// + public static bool TryParse([CanBeNull] string str, out HeatFlux result) + { + return TryParse(str, null, out result); + } + + /// + /// Try to parse a string with one or two quantities of the format "<quantity> <unit>". + /// + /// String to parse. Typically in the form: {number} {unit} +#if WINDOWS_UWP + /// Name of culture (ex: "en-US") to use when parsing number and unit. Defaults to 's default culture. +#else + /// Format to use when parsing number and unit. Defaults to . +#endif + /// Resulting unit quantity if successful. + /// + /// Length.Parse("5.5 m", new CultureInfo("en-US")); + /// + public static bool TryParse( + [CanBeNull] string str, +#if WINDOWS_UWP + [CanBeNull] string cultureName, +#else + [CanBeNull] IFormatProvider provider, +#endif + out HeatFlux result) + { +#if WINDOWS_UWP + // Windows Runtime Component does not support CultureInfo and IFormatProvider types, so we use culture name for public methods: https://msdn.microsoft.com/en-us/library/br230301.aspx + IFormatProvider provider = cultureName == null ? UnitSystem.DefaultCulture : new CultureInfo(cultureName); +#else + provider = provider ?? UnitSystem.DefaultCulture; +#endif + try + { + + result = Parse( + str, +#if WINDOWS_UWP + cultureName); +#else + provider); +#endif + + return true; + } + catch + { + result = default(HeatFlux); + return false; + } + } + + /// + /// Parse a unit string. + /// + /// String to parse. Typically in the form: {number} {unit} + /// + /// Length.ParseUnit("m", new CultureInfo("en-US")); + /// + /// The value of 'str' cannot be null. + /// Error parsing string. + public static HeatFluxUnit ParseUnit(string str) + { + return ParseUnit(str, (IFormatProvider)null); + } + + /// + /// Parse a unit string. + /// + /// String to parse. Typically in the form: {number} {unit} + /// Name of culture (ex: "en-US") to use when parsing number and unit. Defaults to 's default culture. + /// + /// Length.ParseUnit("m", new CultureInfo("en-US")); + /// + /// The value of 'str' cannot be null. + /// Error parsing string. + [Obsolete("Use overload that takes IFormatProvider instead of culture name. This method was only added to support WindowsRuntimeComponent and will be removed from other .NET targets.")] + public static HeatFluxUnit ParseUnit(string str, [CanBeNull] string cultureName) + { + return ParseUnit(str, cultureName == null ? null : new CultureInfo(cultureName)); + } + + /// + /// Parse a unit string. + /// + /// String to parse. Typically in the form: {number} {unit} + /// Format to use when parsing number and unit. Defaults to . + /// + /// Length.ParseUnit("m", new CultureInfo("en-US")); + /// + /// The value of 'str' cannot be null. + /// Error parsing string. + + // Windows Runtime Component does not allow public methods/ctors with same number of parameters: https://msdn.microsoft.com/en-us/library/br230301.aspx#Overloaded methods +#if WINDOWS_UWP + internal +#else + public +#endif + static HeatFluxUnit ParseUnit(string str, IFormatProvider provider = null) + { + if (str == null) throw new ArgumentNullException("str"); + + var unitSystem = UnitSystem.GetCached(provider); + var unit = unitSystem.Parse(str.Trim()); + + if (unit == HeatFluxUnit.Undefined) + { + var newEx = new UnitsNetException("Error parsing string. The unit is not a recognized HeatFluxUnit."); + newEx.Data["input"] = str; + newEx.Data["provider"] = provider?.ToString() ?? "(null)"; + throw newEx; + } + + return unit; + } + + #endregion + + [Obsolete("This is no longer used since we will instead use the quantity's Unit value as default.")] + /// + /// Set the default unit used by ToString(). Default is WattPerSquareMeter + /// + public static HeatFluxUnit ToStringDefaultUnit { get; set; } = HeatFluxUnit.WattPerSquareMeter; + + /// + /// Get default string representation of value and unit. + /// + /// String representation. + public override string ToString() + { + return ToString(Unit); + } + + /// + /// Get string representation of value and unit. Using current UI culture and two significant digits after radix. + /// + /// Unit representation to use. + /// String representation. + public string ToString(HeatFluxUnit unit) + { + return ToString(unit, null, 2); + } + + /// + /// Get string representation of value and unit. Using two significant digits after radix. + /// + /// Unit representation to use. +#if WINDOWS_UWP + /// Name of culture (ex: "en-US") to use for localization and number formatting. Defaults to 's default culture. +#else + /// Format to use for localization and number formatting. Defaults to . +#endif + /// String representation. + public string ToString( + HeatFluxUnit unit, +#if WINDOWS_UWP + [CanBeNull] string cultureName) +#else + [CanBeNull] IFormatProvider provider) +#endif + { + return ToString( + unit, +#if WINDOWS_UWP + cultureName, +#else + provider, +#endif + 2); + } + + /// + /// Get string representation of value and unit. + /// + /// Unit representation to use. +#if WINDOWS_UWP + /// Name of culture (ex: "en-US") to use for localization and number formatting. Defaults to 's default culture. +#else + /// Format to use for localization and number formatting. Defaults to . +#endif + /// The number of significant digits after the radix point. + /// String representation. + [UsedImplicitly] + public string ToString( + HeatFluxUnit unit, +#if WINDOWS_UWP + [CanBeNull] string cultureName, +#else + [CanBeNull] IFormatProvider provider, +#endif + int significantDigitsAfterRadix) + { + double value = As(unit); + string format = UnitFormatter.GetFormat(value, significantDigitsAfterRadix); + return ToString( + unit, +#if WINDOWS_UWP + cultureName, +#else + provider, +#endif + format); + } + + /// + /// Get string representation of value and unit. + /// +#if WINDOWS_UWP + /// Name of culture (ex: "en-US") to use for localization and number formatting. Defaults to 's default culture. +#else + /// Format to use for localization and number formatting. Defaults to . +#endif + /// Unit representation to use. + /// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively." + /// Arguments for string format. Value and unit are implictly included as arguments 0 and 1. + /// String representation. + [UsedImplicitly] + public string ToString( + HeatFluxUnit unit, +#if WINDOWS_UWP + [CanBeNull] string cultureName, +#else + [CanBeNull] IFormatProvider provider, +#endif + [NotNull] string format, + [NotNull] params object[] args) + { + if (format == null) throw new ArgumentNullException(nameof(format)); + if (args == null) throw new ArgumentNullException(nameof(args)); + +#if WINDOWS_UWP + // Windows Runtime Component does not support CultureInfo and IFormatProvider types, so we use culture name for public methods: https://msdn.microsoft.com/en-us/library/br230301.aspx + IFormatProvider provider = cultureName == null ? UnitSystem.DefaultCulture : new CultureInfo(cultureName); +#else + provider = provider ?? UnitSystem.DefaultCulture; +#endif + + double value = As(unit); + object[] formatArgs = UnitFormatter.GetFormatArgs(unit, value, provider, args); + return string.Format(provider, format, formatArgs); + } + + /// + /// Represents the largest possible value of HeatFlux + /// + public static HeatFlux MaxValue => new HeatFlux(double.MaxValue, BaseUnit); + + /// + /// Represents the smallest possible value of HeatFlux + /// + public static HeatFlux MinValue => new HeatFlux(double.MinValue, BaseUnit); + + /// + /// Converts the current value + unit to the base unit. + /// This is typically the first step in converting from one unit to another. + /// + /// The value in the base unit representation. + private double AsBaseUnitWattsPerSquareMeter() + { + if (Unit == HeatFluxUnit.WattPerSquareMeter) { return _value; } + + switch (Unit) + { + case HeatFluxUnit.BtuPerSquareFootHour: return _value*3.15459075; + case HeatFluxUnit.BtuPerSquareFootMinute: return _value*1.89275445e2; + case HeatFluxUnit.BtuPerSquareFootSecond: return _value*1.13565267e4; + case HeatFluxUnit.BtuPerSquareInchSecond: return _value*1.63533984e6; + case HeatFluxUnit.CalPerSquareCentiMeterSecond: return _value*4.1840e4; + case HeatFluxUnit.CentiwattPerSquareMeter: return (_value) * 1e-2d; + case HeatFluxUnit.DeciwattPerSquareMeter: return (_value) * 1e-1d; + case HeatFluxUnit.KilocalPerSquareCentiMeterSecond: return (_value*4.1840e4) * 1e3d; + case HeatFluxUnit.KiloCalPerSquareMeterHour: return _value*1.16222222; + case HeatFluxUnit.KilowattPerSquareMeter: return (_value) * 1e3d; + case HeatFluxUnit.MicrowattPerSquareMeter: return (_value) * 1e-6d; + case HeatFluxUnit.MilliwattPerSquareMeter: return (_value) * 1e-3d; + case HeatFluxUnit.NanowattPerSquareMeter: return (_value) * 1e-9d; + case HeatFluxUnit.WattPerSquareFoot: return _value*1.07639e1; + case HeatFluxUnit.WattPerSquareInch: return _value*1.5500031e3; + case HeatFluxUnit.WattPerSquareMeter: return _value; + default: + throw new NotImplementedException("Unit not implemented: " + Unit); + } + } + + /// Convenience method for working with internal numeric type. + private double AsBaseNumericType(HeatFluxUnit unit) => Convert.ToDouble(As(unit)); + } +} diff --git a/UnitsNet/GeneratedCode/QuantityType.g.cs b/UnitsNet/GeneratedCode/QuantityType.g.cs index 5f1af9ff1e..7103adcdb9 100644 --- a/UnitsNet/GeneratedCode/QuantityType.g.cs +++ b/UnitsNet/GeneratedCode/QuantityType.g.cs @@ -86,6 +86,7 @@ public enum QuantityType ForceChangeRate, ForcePerLength, Frequency, + HeatFlux, Illuminance, Information, Irradiance, diff --git a/UnitsNet/GeneratedCode/UnitSystem.Default.g.cs b/UnitsNet/GeneratedCode/UnitSystem.Default.g.cs index 4f27072774..791544572e 100644 --- a/UnitsNet/GeneratedCode/UnitSystem.Default.g.cs +++ b/UnitsNet/GeneratedCode/UnitSystem.Default.g.cs @@ -1731,6 +1731,90 @@ private static readonly ReadOnlyCollection DefaultLocalization new AbbreviationsForCulture("en-US", "THz"), }), }), + new UnitLocalization(typeof (HeatFluxUnit), + new[] + { + new CulturesForEnumValue((int) HeatFluxUnit.BtuPerSquareFootHour, + new[] + { + new AbbreviationsForCulture("en-US", "BTU/ft²/hr"), + }), + new CulturesForEnumValue((int) HeatFluxUnit.BtuPerSquareFootMinute, + new[] + { + new AbbreviationsForCulture("en-US", "BTU/ft²/min"), + }), + new CulturesForEnumValue((int) HeatFluxUnit.BtuPerSquareFootSecond, + new[] + { + new AbbreviationsForCulture("en-US", "BTU/ft²/s"), + }), + new CulturesForEnumValue((int) HeatFluxUnit.BtuPerSquareInchSecond, + new[] + { + new AbbreviationsForCulture("en-US", "BTU/in²/s"), + }), + new CulturesForEnumValue((int) HeatFluxUnit.CalPerSquareCentiMeterSecond, + new[] + { + new AbbreviationsForCulture("en-US", "cal/cm²/s"), + }), + new CulturesForEnumValue((int) HeatFluxUnit.CentiwattPerSquareMeter, + new[] + { + new AbbreviationsForCulture("en-US", "cW/m²"), + }), + new CulturesForEnumValue((int) HeatFluxUnit.DeciwattPerSquareMeter, + new[] + { + new AbbreviationsForCulture("en-US", "dW/m²"), + }), + new CulturesForEnumValue((int) HeatFluxUnit.KilocalPerSquareCentiMeterSecond, + new[] + { + new AbbreviationsForCulture("en-US", "kcal/cm²/s"), + }), + new CulturesForEnumValue((int) HeatFluxUnit.KiloCalPerSquareMeterHour, + new[] + { + new AbbreviationsForCulture("en-US", "kcal/m²/hr"), + }), + new CulturesForEnumValue((int) HeatFluxUnit.KilowattPerSquareMeter, + new[] + { + new AbbreviationsForCulture("en-US", "kW/m²"), + }), + new CulturesForEnumValue((int) HeatFluxUnit.MicrowattPerSquareMeter, + new[] + { + new AbbreviationsForCulture("en-US", "µW/m²"), + }), + new CulturesForEnumValue((int) HeatFluxUnit.MilliwattPerSquareMeter, + new[] + { + new AbbreviationsForCulture("en-US", "mW/m²"), + }), + new CulturesForEnumValue((int) HeatFluxUnit.NanowattPerSquareMeter, + new[] + { + new AbbreviationsForCulture("en-US", "nW/m²"), + }), + new CulturesForEnumValue((int) HeatFluxUnit.WattPerSquareFoot, + new[] + { + new AbbreviationsForCulture("en-US", "W/ft²"), + }), + new CulturesForEnumValue((int) HeatFluxUnit.WattPerSquareInch, + new[] + { + new AbbreviationsForCulture("en-US", "W/in²"), + }), + new CulturesForEnumValue((int) HeatFluxUnit.WattPerSquareMeter, + new[] + { + new AbbreviationsForCulture("en-US", "W/m²"), + }), + }), new UnitLocalization(typeof (IlluminanceUnit), new[] { diff --git a/UnitsNet/GeneratedCode/Units/HeatFluxUnit.g.cs b/UnitsNet/GeneratedCode/Units/HeatFluxUnit.g.cs new file mode 100644 index 0000000000..572dfa9a6f --- /dev/null +++ b/UnitsNet/GeneratedCode/Units/HeatFluxUnit.g.cs @@ -0,0 +1,62 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by \generate-code.bat. +// +// Changes to this file will be lost when the code is regenerated. +// The build server regenerates the code before each build and a pre-build +// step will regenerate the code on each local build. +// +// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. +// +// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. +// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. +// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. +// +// +//------------------------------------------------------------------------------ + +// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). +// https://github.com/angularsen/UnitsNet +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +// ReSharper disable once CheckNamespace +namespace UnitsNet.Units +{ + public enum HeatFluxUnit + { + Undefined = 0, + BtuPerSquareFootHour, + BtuPerSquareFootMinute, + BtuPerSquareFootSecond, + BtuPerSquareInchSecond, + CalPerSquareCentiMeterSecond, + CentiwattPerSquareMeter, + DeciwattPerSquareMeter, + KilocalPerSquareCentiMeterSecond, + KiloCalPerSquareMeterHour, + KilowattPerSquareMeter, + MicrowattPerSquareMeter, + MilliwattPerSquareMeter, + NanowattPerSquareMeter, + WattPerSquareFoot, + WattPerSquareInch, + WattPerSquareMeter, + } +} diff --git a/UnitsNet/UnitDefinitions/HeatFlux.json b/UnitsNet/UnitDefinitions/HeatFlux.json new file mode 100644 index 0000000000..71af50fe9f --- /dev/null +++ b/UnitsNet/UnitDefinitions/HeatFlux.json @@ -0,0 +1,117 @@ +{ + "Name": "HeatFlux", + "BaseUnit": "WattPerSquareMeter", + "XmlDoc": "Heat flux is the flow of energy per unit of area per unit of time", + "Units": [ + { + "SingularName": "WattPerSquareMeter", + "PluralName": "WattsPerSquareMeter", + "FromUnitToBaseFunc": "x", + "FromBaseToUnitFunc": "x", + "Prefixes": [ "Nano", "Micro", "Milli", "Centi", "Deci", "Kilo" ], + "Localization": [ + { + "Culture": "en-US", + "Abbreviations": [ "W/m²" ] + } + ] + }, + { + "SingularName": "WattPerSquareInch", + "PluralName": "WattPerSquareInch", + "FromUnitToBaseFunc": "x*1.5500031e3", + "FromBaseToUnitFunc": "x/1.5500031e3", + "Localization": [ + { + "Culture": "en-US", + "Abbreviations": [ "W/in²" ] + } + ] + }, + { + "SingularName": "WattPerSquareFoot", + "PluralName": "WattPerSquareFoot", + "FromUnitToBaseFunc": "x*1.07639e1", + "FromBaseToUnitFunc": "x/1.07639e1", + "Localization": [ + { + "Culture": "en-US", + "Abbreviations": [ "W/ft²" ] + } + ] + }, + { + "SingularName": "BtuPerSquareInchSecond", + "PluralName": "BtuPerSquareInchSecond", + "FromUnitToBaseFunc": "x*1.63533984e6", + "FromBaseToUnitFunc": "x/1.63533984e6", + "Localization": [ + { + "Culture": "en-US", + "Abbreviations": [ "BTU/in²/s" ] + } + ] + }, + { + "SingularName": "BtuPerSquareFootSecond", + "PluralName": "BtuPerSquareFootSecond", + "FromUnitToBaseFunc": "x*1.13565267e4", + "FromBaseToUnitFunc": "x/1.13565267e4", + "Localization": [ + { + "Culture": "en-US", + "Abbreviations": [ "BTU/ft²/s" ] + } + ] + }, + { + "SingularName": "BtuPerSquareFootMinute", + "PluralName": "BtuPerSquareFootMinute", + "FromUnitToBaseFunc": "x*1.89275445e2", + "FromBaseToUnitFunc": "x/1.89275445e2", + "Localization": [ + { + "Culture": "en-US", + "Abbreviations": [ "BTU/ft²/min" ] + } + ] + }, + { + "SingularName": "BtuPerSquareFootHour", + "PluralName": "BtuPerSquareFootHour", + "FromUnitToBaseFunc": "x*3.15459075", + "FromBaseToUnitFunc": "x/3.15459075", + "Localization": [ + { + "Culture": "en-US", + "Abbreviations": [ "BTU/ft²/hr" ] + } + ] + }, + { + "SingularName": "CalPerSquareCentiMeterSecond", + "PluralName": "CalPerSquareCentiMeterSecond", + "FromUnitToBaseFunc": "x*4.1840e4", + "FromBaseToUnitFunc": "x/4.1840e4", + "Prefixes": [ "Kilo" ], + "Localization": [ + { + "Culture": "en-US", + "Abbreviations": [ "cal/cm²/s" ] + } + ] + }, + { + "SingularName": "KiloCalPerSquareMeterHour", + "PluralName": "KiloCalPerSquareMeterHour", + "FromUnitToBaseFunc": "x*1.16222222", + "FromBaseToUnitFunc": "x/1.16222222", + "Localization": [ + { + "Culture": "en-US", + "Abbreviations": [ "kcal/m²/hr" ] + } + ] + } + ] +} \ No newline at end of file From 1404aaf39cde48a96096ce6cdac511c8a7f78a74 Mon Sep 17 00:00:00 2001 From: Tristan Milnthorp Date: Wed, 18 Apr 2018 11:50:17 -0400 Subject: [PATCH 2/5] Adding all permutations for operator overloads with heat flux --- UnitsNet.Tests/CustomCode/HeatFluxTests.cs | 18 +++++++- .../CustomCode/Quantities/HeatFlux.extra.cs | 41 +++++++++++++++++++ UnitsNet/CustomCode/Quantities/Power.extra.cs | 5 +++ 3 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 UnitsNet/CustomCode/Quantities/HeatFlux.extra.cs diff --git a/UnitsNet.Tests/CustomCode/HeatFluxTests.cs b/UnitsNet.Tests/CustomCode/HeatFluxTests.cs index ca7a9bcc7d..1418d1390f 100644 --- a/UnitsNet.Tests/CustomCode/HeatFluxTests.cs +++ b/UnitsNet.Tests/CustomCode/HeatFluxTests.cs @@ -67,8 +67,22 @@ public class HeatFluxTests : HeatFluxTestsBase [Fact] public void PowerDividedByAreaEqualsHeatFlux() { - HeatFlux heatFlux = Power.FromWatts( 12 ) / Area.FromSquareMeters( 3 ); - Assert.Equal( heatFlux, HeatFlux.FromWattsPerSquareMeter( 4 ) ); + HeatFlux heatFlux = Power.FromWatts(12) / Area.FromSquareMeters(3); + Assert.Equal(heatFlux, HeatFlux.FromWattsPerSquareMeter(4)); + } + + [Fact] + public void HeatFluxTimesAreaEqualsPower() + { + Power power = HeatFlux.FromWattsPerSquareMeter(3) * Area.FromSquareMeters(4); + Assert.Equal(power, Power.FromWatts(12)); + } + + [Fact] + public void PowerDividedByHeatFluxEqualsArea() + { + Area area = Power.FromWatts(12) / HeatFlux.FromWattsPerSquareMeter(3); + Assert.Equal(area, Area.FromSquareMeters(4)); } } } diff --git a/UnitsNet/CustomCode/Quantities/HeatFlux.extra.cs b/UnitsNet/CustomCode/Quantities/HeatFlux.extra.cs new file mode 100644 index 0000000000..8568ec1283 --- /dev/null +++ b/UnitsNet/CustomCode/Quantities/HeatFlux.extra.cs @@ -0,0 +1,41 @@ +// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). +// https://github.com/angularsen/UnitsNet +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +namespace UnitsNet +{ + // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components + // Public structures can't have any members other than public fields, and those fields must be value types or strings. + // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. +#if WINDOWS_UWP + public sealed partial class HeatFlux +#else + public partial struct HeatFlux +#endif + { + // Windows Runtime Component does not allow operator overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx +#if !WINDOWS_UWP + public static Power operator *(HeatFlux heatFlux, Area area) + { + return Power.FromWatts(heatFlux.WattsPerSquareMeter * area.SquareMeters); + } +#endif + } +} diff --git a/UnitsNet/CustomCode/Quantities/Power.extra.cs b/UnitsNet/CustomCode/Quantities/Power.extra.cs index 4f2e173280..52a5d0f9a5 100644 --- a/UnitsNet/CustomCode/Quantities/Power.extra.cs +++ b/UnitsNet/CustomCode/Quantities/Power.extra.cs @@ -91,6 +91,11 @@ public partial struct Power { return HeatFlux.FromWattsPerSquareMeter(power.Watts / area.SquareMeters); } + + public static Area operator /(Power power, HeatFlux heatFlux) + { + return Area.FromSquareMeters( power.Watts / heatFlux.WattsPerSquareMeter ); + } #endif } } From 23575a3515b2958a41daf2d46e0c6424dcafbe0d Mon Sep 17 00:00:00 2001 From: Tristan Milnthorp Date: Fri, 20 Apr 2018 17:14:47 -0400 Subject: [PATCH 3/5] Naming fixes --- UnitsNet.Tests/CustomCode/HeatFluxTests.cs | 14 +- .../GeneratedCode/HeatFluxTestsBase.g.cs | 84 ++--- .../Number/NumberToHeatFluxExtensions.g.cs | 294 +++++++++--------- .../GeneratedCode/Quantities/HeatFlux.g.cs | 182 +++++------ .../GeneratedCode/UnitSystem.Default.g.cs | 28 +- .../GeneratedCode/Units/HeatFluxUnit.g.cs | 14 +- UnitsNet/UnitDefinitions/HeatFlux.json | 36 +-- 7 files changed, 326 insertions(+), 326 deletions(-) diff --git a/UnitsNet.Tests/CustomCode/HeatFluxTests.cs b/UnitsNet.Tests/CustomCode/HeatFluxTests.cs index 1418d1390f..70b7dee339 100644 --- a/UnitsNet.Tests/CustomCode/HeatFluxTests.cs +++ b/UnitsNet.Tests/CustomCode/HeatFluxTests.cs @@ -47,15 +47,15 @@ namespace UnitsNet.Tests.CustomCode { public class HeatFluxTests : HeatFluxTestsBase { - protected override double BtuPerSquareFootHourInOneWattPerSquareMeter => 3.16998331e-1; - protected override double BtuPerSquareFootMinuteInOneWattPerSquareMeter => 5.28330551e-3; - protected override double BtuPerSquareFootSecondInOneWattPerSquareMeter => 8.80550918e-5; - protected override double BtuPerSquareInchSecondInOneWattPerSquareMeter => 6.11493693e-7; - protected override double CalPerSquareCentiMeterSecondInOneWattPerSquareMeter => 2.39005736e-5; + protected override double BtuPerHourSquareFootInOneWattPerSquareMeter => 3.16998331e-1; + protected override double BtuPerMinuteSquareFootInOneWattPerSquareMeter => 5.28330551e-3; + protected override double BtuPerSecondSquareFootInOneWattPerSquareMeter => 8.80550918e-5; + protected override double BtuPerSecondSquareInchInOneWattPerSquareMeter => 6.11493693e-7; + protected override double CalPerSecondSquareCentimeterInOneWattPerSquareMeter => 2.39005736e-5; protected override double CentiwattsPerSquareMeterInOneWattPerSquareMeter => 1e2; protected override double DeciwattsPerSquareMeterInOneWattPerSquareMeter => 1e1; - protected override double KilocalPerSquareCentiMeterSecondInOneWattPerSquareMeter => 2.39005736e-8; - protected override double KiloCalPerSquareMeterHourInOneWattPerSquareMeter => 8.6042065e-1; + protected override double KilocalPerSecondSquareCentimeterInOneWattPerSquareMeter => 2.39005736e-8; + protected override double KilocalPerHourSquareMeterInOneWattPerSquareMeter => 8.6042065e-1; protected override double KilowattsPerSquareMeterInOneWattPerSquareMeter => 1e-3; protected override double MicrowattsPerSquareMeterInOneWattPerSquareMeter => 1e6; protected override double MilliwattsPerSquareMeterInOneWattPerSquareMeter => 1e3; diff --git a/UnitsNet.Tests/GeneratedCode/HeatFluxTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/HeatFluxTestsBase.g.cs index 6c46d42cbb..50e548b239 100644 --- a/UnitsNet.Tests/GeneratedCode/HeatFluxTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/HeatFluxTestsBase.g.cs @@ -52,15 +52,15 @@ namespace UnitsNet.Tests // ReSharper disable once PartialTypeWithSinglePart public abstract partial class HeatFluxTestsBase { - protected abstract double BtuPerSquareFootHourInOneWattPerSquareMeter { get; } - protected abstract double BtuPerSquareFootMinuteInOneWattPerSquareMeter { get; } - protected abstract double BtuPerSquareFootSecondInOneWattPerSquareMeter { get; } - protected abstract double BtuPerSquareInchSecondInOneWattPerSquareMeter { get; } - protected abstract double CalPerSquareCentiMeterSecondInOneWattPerSquareMeter { get; } + protected abstract double BtuPerHourSquareFootInOneWattPerSquareMeter { get; } + protected abstract double BtuPerMinuteSquareFootInOneWattPerSquareMeter { get; } + protected abstract double BtuPerSecondSquareFootInOneWattPerSquareMeter { get; } + protected abstract double BtuPerSecondSquareInchInOneWattPerSquareMeter { get; } + protected abstract double CalPerSecondSquareCentimeterInOneWattPerSquareMeter { get; } protected abstract double CentiwattsPerSquareMeterInOneWattPerSquareMeter { get; } protected abstract double DeciwattsPerSquareMeterInOneWattPerSquareMeter { get; } - protected abstract double KilocalPerSquareCentiMeterSecondInOneWattPerSquareMeter { get; } - protected abstract double KiloCalPerSquareMeterHourInOneWattPerSquareMeter { get; } + protected abstract double KilocalPerHourSquareMeterInOneWattPerSquareMeter { get; } + protected abstract double KilocalPerSecondSquareCentimeterInOneWattPerSquareMeter { get; } protected abstract double KilowattsPerSquareMeterInOneWattPerSquareMeter { get; } protected abstract double MicrowattsPerSquareMeterInOneWattPerSquareMeter { get; } protected abstract double MilliwattsPerSquareMeterInOneWattPerSquareMeter { get; } @@ -70,15 +70,15 @@ public abstract partial class HeatFluxTestsBase protected abstract double WattsPerSquareMeterInOneWattPerSquareMeter { get; } // ReSharper disable VirtualMemberNeverOverriden.Global - protected virtual double BtuPerSquareFootHourTolerance { get { return 1e-5; } } - protected virtual double BtuPerSquareFootMinuteTolerance { get { return 1e-5; } } - protected virtual double BtuPerSquareFootSecondTolerance { get { return 1e-5; } } - protected virtual double BtuPerSquareInchSecondTolerance { get { return 1e-5; } } - protected virtual double CalPerSquareCentiMeterSecondTolerance { get { return 1e-5; } } + protected virtual double BtuPerHourSquareFootTolerance { get { return 1e-5; } } + protected virtual double BtuPerMinuteSquareFootTolerance { get { return 1e-5; } } + protected virtual double BtuPerSecondSquareFootTolerance { get { return 1e-5; } } + protected virtual double BtuPerSecondSquareInchTolerance { get { return 1e-5; } } + protected virtual double CalPerSecondSquareCentimeterTolerance { get { return 1e-5; } } protected virtual double CentiwattsPerSquareMeterTolerance { get { return 1e-5; } } protected virtual double DeciwattsPerSquareMeterTolerance { get { return 1e-5; } } - protected virtual double KilocalPerSquareCentiMeterSecondTolerance { get { return 1e-5; } } - protected virtual double KiloCalPerSquareMeterHourTolerance { get { return 1e-5; } } + protected virtual double KilocalPerHourSquareMeterTolerance { get { return 1e-5; } } + protected virtual double KilocalPerSecondSquareCentimeterTolerance { get { return 1e-5; } } protected virtual double KilowattsPerSquareMeterTolerance { get { return 1e-5; } } protected virtual double MicrowattsPerSquareMeterTolerance { get { return 1e-5; } } protected virtual double MilliwattsPerSquareMeterTolerance { get { return 1e-5; } } @@ -92,15 +92,15 @@ public abstract partial class HeatFluxTestsBase public void WattPerSquareMeterToHeatFluxUnits() { HeatFlux wattpersquaremeter = HeatFlux.FromWattsPerSquareMeter(1); - AssertEx.EqualTolerance(BtuPerSquareFootHourInOneWattPerSquareMeter, wattpersquaremeter.BtuPerSquareFootHour, BtuPerSquareFootHourTolerance); - AssertEx.EqualTolerance(BtuPerSquareFootMinuteInOneWattPerSquareMeter, wattpersquaremeter.BtuPerSquareFootMinute, BtuPerSquareFootMinuteTolerance); - AssertEx.EqualTolerance(BtuPerSquareFootSecondInOneWattPerSquareMeter, wattpersquaremeter.BtuPerSquareFootSecond, BtuPerSquareFootSecondTolerance); - AssertEx.EqualTolerance(BtuPerSquareInchSecondInOneWattPerSquareMeter, wattpersquaremeter.BtuPerSquareInchSecond, BtuPerSquareInchSecondTolerance); - AssertEx.EqualTolerance(CalPerSquareCentiMeterSecondInOneWattPerSquareMeter, wattpersquaremeter.CalPerSquareCentiMeterSecond, CalPerSquareCentiMeterSecondTolerance); + AssertEx.EqualTolerance(BtuPerHourSquareFootInOneWattPerSquareMeter, wattpersquaremeter.BtuPerHourSquareFoot, BtuPerHourSquareFootTolerance); + AssertEx.EqualTolerance(BtuPerMinuteSquareFootInOneWattPerSquareMeter, wattpersquaremeter.BtuPerMinuteSquareFoot, BtuPerMinuteSquareFootTolerance); + AssertEx.EqualTolerance(BtuPerSecondSquareFootInOneWattPerSquareMeter, wattpersquaremeter.BtuPerSecondSquareFoot, BtuPerSecondSquareFootTolerance); + AssertEx.EqualTolerance(BtuPerSecondSquareInchInOneWattPerSquareMeter, wattpersquaremeter.BtuPerSecondSquareInch, BtuPerSecondSquareInchTolerance); + AssertEx.EqualTolerance(CalPerSecondSquareCentimeterInOneWattPerSquareMeter, wattpersquaremeter.CalPerSecondSquareCentimeter, CalPerSecondSquareCentimeterTolerance); AssertEx.EqualTolerance(CentiwattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.CentiwattsPerSquareMeter, CentiwattsPerSquareMeterTolerance); AssertEx.EqualTolerance(DeciwattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.DeciwattsPerSquareMeter, DeciwattsPerSquareMeterTolerance); - AssertEx.EqualTolerance(KilocalPerSquareCentiMeterSecondInOneWattPerSquareMeter, wattpersquaremeter.KilocalPerSquareCentiMeterSecond, KilocalPerSquareCentiMeterSecondTolerance); - AssertEx.EqualTolerance(KiloCalPerSquareMeterHourInOneWattPerSquareMeter, wattpersquaremeter.KiloCalPerSquareMeterHour, KiloCalPerSquareMeterHourTolerance); + AssertEx.EqualTolerance(KilocalPerHourSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.KilocalPerHourSquareMeter, KilocalPerHourSquareMeterTolerance); + AssertEx.EqualTolerance(KilocalPerSecondSquareCentimeterInOneWattPerSquareMeter, wattpersquaremeter.KilocalPerSecondSquareCentimeter, KilocalPerSecondSquareCentimeterTolerance); AssertEx.EqualTolerance(KilowattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.KilowattsPerSquareMeter, KilowattsPerSquareMeterTolerance); AssertEx.EqualTolerance(MicrowattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.MicrowattsPerSquareMeter, MicrowattsPerSquareMeterTolerance); AssertEx.EqualTolerance(MilliwattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.MilliwattsPerSquareMeter, MilliwattsPerSquareMeterTolerance); @@ -113,15 +113,15 @@ public void WattPerSquareMeterToHeatFluxUnits() [Fact] public void FromValueAndUnit() { - AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.BtuPerSquareFootHour).BtuPerSquareFootHour, BtuPerSquareFootHourTolerance); - AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.BtuPerSquareFootMinute).BtuPerSquareFootMinute, BtuPerSquareFootMinuteTolerance); - AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.BtuPerSquareFootSecond).BtuPerSquareFootSecond, BtuPerSquareFootSecondTolerance); - AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.BtuPerSquareInchSecond).BtuPerSquareInchSecond, BtuPerSquareInchSecondTolerance); - AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.CalPerSquareCentiMeterSecond).CalPerSquareCentiMeterSecond, CalPerSquareCentiMeterSecondTolerance); + AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.BtuPerHourSquareFoot).BtuPerHourSquareFoot, BtuPerHourSquareFootTolerance); + AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.BtuPerMinuteSquareFoot).BtuPerMinuteSquareFoot, BtuPerMinuteSquareFootTolerance); + AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.BtuPerSecondSquareFoot).BtuPerSecondSquareFoot, BtuPerSecondSquareFootTolerance); + AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.BtuPerSecondSquareInch).BtuPerSecondSquareInch, BtuPerSecondSquareInchTolerance); + AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.CalPerSecondSquareCentimeter).CalPerSecondSquareCentimeter, CalPerSecondSquareCentimeterTolerance); AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.CentiwattPerSquareMeter).CentiwattsPerSquareMeter, CentiwattsPerSquareMeterTolerance); AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.DeciwattPerSquareMeter).DeciwattsPerSquareMeter, DeciwattsPerSquareMeterTolerance); - AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.KilocalPerSquareCentiMeterSecond).KilocalPerSquareCentiMeterSecond, KilocalPerSquareCentiMeterSecondTolerance); - AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.KiloCalPerSquareMeterHour).KiloCalPerSquareMeterHour, KiloCalPerSquareMeterHourTolerance); + AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.KilocalPerHourSquareMeter).KilocalPerHourSquareMeter, KilocalPerHourSquareMeterTolerance); + AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.KilocalPerSecondSquareCentimeter).KilocalPerSecondSquareCentimeter, KilocalPerSecondSquareCentimeterTolerance); AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.KilowattPerSquareMeter).KilowattsPerSquareMeter, KilowattsPerSquareMeterTolerance); AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.MicrowattPerSquareMeter).MicrowattsPerSquareMeter, MicrowattsPerSquareMeterTolerance); AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.MilliwattPerSquareMeter).MilliwattsPerSquareMeter, MilliwattsPerSquareMeterTolerance); @@ -135,15 +135,15 @@ public void FromValueAndUnit() public void As() { var wattpersquaremeter = HeatFlux.FromWattsPerSquareMeter(1); - AssertEx.EqualTolerance(BtuPerSquareFootHourInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.BtuPerSquareFootHour), BtuPerSquareFootHourTolerance); - AssertEx.EqualTolerance(BtuPerSquareFootMinuteInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.BtuPerSquareFootMinute), BtuPerSquareFootMinuteTolerance); - AssertEx.EqualTolerance(BtuPerSquareFootSecondInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.BtuPerSquareFootSecond), BtuPerSquareFootSecondTolerance); - AssertEx.EqualTolerance(BtuPerSquareInchSecondInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.BtuPerSquareInchSecond), BtuPerSquareInchSecondTolerance); - AssertEx.EqualTolerance(CalPerSquareCentiMeterSecondInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.CalPerSquareCentiMeterSecond), CalPerSquareCentiMeterSecondTolerance); + AssertEx.EqualTolerance(BtuPerHourSquareFootInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.BtuPerHourSquareFoot), BtuPerHourSquareFootTolerance); + AssertEx.EqualTolerance(BtuPerMinuteSquareFootInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.BtuPerMinuteSquareFoot), BtuPerMinuteSquareFootTolerance); + AssertEx.EqualTolerance(BtuPerSecondSquareFootInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.BtuPerSecondSquareFoot), BtuPerSecondSquareFootTolerance); + AssertEx.EqualTolerance(BtuPerSecondSquareInchInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.BtuPerSecondSquareInch), BtuPerSecondSquareInchTolerance); + AssertEx.EqualTolerance(CalPerSecondSquareCentimeterInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.CalPerSecondSquareCentimeter), CalPerSecondSquareCentimeterTolerance); AssertEx.EqualTolerance(CentiwattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.CentiwattPerSquareMeter), CentiwattsPerSquareMeterTolerance); AssertEx.EqualTolerance(DeciwattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.DeciwattPerSquareMeter), DeciwattsPerSquareMeterTolerance); - AssertEx.EqualTolerance(KilocalPerSquareCentiMeterSecondInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.KilocalPerSquareCentiMeterSecond), KilocalPerSquareCentiMeterSecondTolerance); - AssertEx.EqualTolerance(KiloCalPerSquareMeterHourInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.KiloCalPerSquareMeterHour), KiloCalPerSquareMeterHourTolerance); + AssertEx.EqualTolerance(KilocalPerHourSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.KilocalPerHourSquareMeter), KilocalPerHourSquareMeterTolerance); + AssertEx.EqualTolerance(KilocalPerSecondSquareCentimeterInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.KilocalPerSecondSquareCentimeter), KilocalPerSecondSquareCentimeterTolerance); AssertEx.EqualTolerance(KilowattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.KilowattPerSquareMeter), KilowattsPerSquareMeterTolerance); AssertEx.EqualTolerance(MicrowattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.MicrowattPerSquareMeter), MicrowattsPerSquareMeterTolerance); AssertEx.EqualTolerance(MilliwattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.MilliwattPerSquareMeter), MilliwattsPerSquareMeterTolerance); @@ -157,15 +157,15 @@ public void As() public void ConversionRoundTrip() { HeatFlux wattpersquaremeter = HeatFlux.FromWattsPerSquareMeter(1); - AssertEx.EqualTolerance(1, HeatFlux.FromBtuPerSquareFootHour(wattpersquaremeter.BtuPerSquareFootHour).WattsPerSquareMeter, BtuPerSquareFootHourTolerance); - AssertEx.EqualTolerance(1, HeatFlux.FromBtuPerSquareFootMinute(wattpersquaremeter.BtuPerSquareFootMinute).WattsPerSquareMeter, BtuPerSquareFootMinuteTolerance); - AssertEx.EqualTolerance(1, HeatFlux.FromBtuPerSquareFootSecond(wattpersquaremeter.BtuPerSquareFootSecond).WattsPerSquareMeter, BtuPerSquareFootSecondTolerance); - AssertEx.EqualTolerance(1, HeatFlux.FromBtuPerSquareInchSecond(wattpersquaremeter.BtuPerSquareInchSecond).WattsPerSquareMeter, BtuPerSquareInchSecondTolerance); - AssertEx.EqualTolerance(1, HeatFlux.FromCalPerSquareCentiMeterSecond(wattpersquaremeter.CalPerSquareCentiMeterSecond).WattsPerSquareMeter, CalPerSquareCentiMeterSecondTolerance); + AssertEx.EqualTolerance(1, HeatFlux.FromBtuPerHourSquareFoot(wattpersquaremeter.BtuPerHourSquareFoot).WattsPerSquareMeter, BtuPerHourSquareFootTolerance); + AssertEx.EqualTolerance(1, HeatFlux.FromBtuPerMinuteSquareFoot(wattpersquaremeter.BtuPerMinuteSquareFoot).WattsPerSquareMeter, BtuPerMinuteSquareFootTolerance); + AssertEx.EqualTolerance(1, HeatFlux.FromBtuPerSecondSquareFoot(wattpersquaremeter.BtuPerSecondSquareFoot).WattsPerSquareMeter, BtuPerSecondSquareFootTolerance); + AssertEx.EqualTolerance(1, HeatFlux.FromBtuPerSecondSquareInch(wattpersquaremeter.BtuPerSecondSquareInch).WattsPerSquareMeter, BtuPerSecondSquareInchTolerance); + AssertEx.EqualTolerance(1, HeatFlux.FromCalPerSecondSquareCentimeter(wattpersquaremeter.CalPerSecondSquareCentimeter).WattsPerSquareMeter, CalPerSecondSquareCentimeterTolerance); AssertEx.EqualTolerance(1, HeatFlux.FromCentiwattsPerSquareMeter(wattpersquaremeter.CentiwattsPerSquareMeter).WattsPerSquareMeter, CentiwattsPerSquareMeterTolerance); AssertEx.EqualTolerance(1, HeatFlux.FromDeciwattsPerSquareMeter(wattpersquaremeter.DeciwattsPerSquareMeter).WattsPerSquareMeter, DeciwattsPerSquareMeterTolerance); - AssertEx.EqualTolerance(1, HeatFlux.FromKilocalPerSquareCentiMeterSecond(wattpersquaremeter.KilocalPerSquareCentiMeterSecond).WattsPerSquareMeter, KilocalPerSquareCentiMeterSecondTolerance); - AssertEx.EqualTolerance(1, HeatFlux.FromKiloCalPerSquareMeterHour(wattpersquaremeter.KiloCalPerSquareMeterHour).WattsPerSquareMeter, KiloCalPerSquareMeterHourTolerance); + AssertEx.EqualTolerance(1, HeatFlux.FromKilocalPerHourSquareMeter(wattpersquaremeter.KilocalPerHourSquareMeter).WattsPerSquareMeter, KilocalPerHourSquareMeterTolerance); + AssertEx.EqualTolerance(1, HeatFlux.FromKilocalPerSecondSquareCentimeter(wattpersquaremeter.KilocalPerSecondSquareCentimeter).WattsPerSquareMeter, KilocalPerSecondSquareCentimeterTolerance); AssertEx.EqualTolerance(1, HeatFlux.FromKilowattsPerSquareMeter(wattpersquaremeter.KilowattsPerSquareMeter).WattsPerSquareMeter, KilowattsPerSquareMeterTolerance); AssertEx.EqualTolerance(1, HeatFlux.FromMicrowattsPerSquareMeter(wattpersquaremeter.MicrowattsPerSquareMeter).WattsPerSquareMeter, MicrowattsPerSquareMeterTolerance); AssertEx.EqualTolerance(1, HeatFlux.FromMilliwattsPerSquareMeter(wattpersquaremeter.MilliwattsPerSquareMeter).WattsPerSquareMeter, MilliwattsPerSquareMeterTolerance); diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToHeatFluxExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToHeatFluxExtensions.g.cs index f3b6c06bef..5994d21869 100644 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToHeatFluxExtensions.g.cs +++ b/UnitsNet/GeneratedCode/Extensions/Number/NumberToHeatFluxExtensions.g.cs @@ -44,173 +44,173 @@ namespace UnitsNet.Extensions.NumberToHeatFlux { public static class NumberToHeatFluxExtensions { - #region BtuPerSquareFootHour + #region BtuPerHourSquareFoot - /// - public static HeatFlux BtuPerSquareFootHour(this int value) => HeatFlux.FromBtuPerSquareFootHour(value); + /// + public static HeatFlux BtuPerHourSquareFoot(this int value) => HeatFlux.FromBtuPerHourSquareFoot(value); - /// - public static HeatFlux? BtuPerSquareFootHour(this int? value) => HeatFlux.FromBtuPerSquareFootHour(value); + /// + public static HeatFlux? BtuPerHourSquareFoot(this int? value) => HeatFlux.FromBtuPerHourSquareFoot(value); - /// - public static HeatFlux BtuPerSquareFootHour(this long value) => HeatFlux.FromBtuPerSquareFootHour(value); + /// + public static HeatFlux BtuPerHourSquareFoot(this long value) => HeatFlux.FromBtuPerHourSquareFoot(value); - /// - public static HeatFlux? BtuPerSquareFootHour(this long? value) => HeatFlux.FromBtuPerSquareFootHour(value); + /// + public static HeatFlux? BtuPerHourSquareFoot(this long? value) => HeatFlux.FromBtuPerHourSquareFoot(value); - /// - public static HeatFlux BtuPerSquareFootHour(this double value) => HeatFlux.FromBtuPerSquareFootHour(value); + /// + public static HeatFlux BtuPerHourSquareFoot(this double value) => HeatFlux.FromBtuPerHourSquareFoot(value); - /// - public static HeatFlux? BtuPerSquareFootHour(this double? value) => HeatFlux.FromBtuPerSquareFootHour(value); + /// + public static HeatFlux? BtuPerHourSquareFoot(this double? value) => HeatFlux.FromBtuPerHourSquareFoot(value); - /// - public static HeatFlux BtuPerSquareFootHour(this float value) => HeatFlux.FromBtuPerSquareFootHour(value); + /// + public static HeatFlux BtuPerHourSquareFoot(this float value) => HeatFlux.FromBtuPerHourSquareFoot(value); - /// - public static HeatFlux? BtuPerSquareFootHour(this float? value) => HeatFlux.FromBtuPerSquareFootHour(value); + /// + public static HeatFlux? BtuPerHourSquareFoot(this float? value) => HeatFlux.FromBtuPerHourSquareFoot(value); - /// - public static HeatFlux BtuPerSquareFootHour(this decimal value) => HeatFlux.FromBtuPerSquareFootHour(Convert.ToDouble(value)); + /// + public static HeatFlux BtuPerHourSquareFoot(this decimal value) => HeatFlux.FromBtuPerHourSquareFoot(Convert.ToDouble(value)); - /// - public static HeatFlux? BtuPerSquareFootHour(this decimal? value) => HeatFlux.FromBtuPerSquareFootHour(value == null ? (double?)null : Convert.ToDouble(value.Value)); + /// + public static HeatFlux? BtuPerHourSquareFoot(this decimal? value) => HeatFlux.FromBtuPerHourSquareFoot(value == null ? (double?)null : Convert.ToDouble(value.Value)); #endregion - #region BtuPerSquareFootMinute + #region BtuPerMinuteSquareFoot - /// - public static HeatFlux BtuPerSquareFootMinute(this int value) => HeatFlux.FromBtuPerSquareFootMinute(value); + /// + public static HeatFlux BtuPerMinuteSquareFoot(this int value) => HeatFlux.FromBtuPerMinuteSquareFoot(value); - /// - public static HeatFlux? BtuPerSquareFootMinute(this int? value) => HeatFlux.FromBtuPerSquareFootMinute(value); + /// + public static HeatFlux? BtuPerMinuteSquareFoot(this int? value) => HeatFlux.FromBtuPerMinuteSquareFoot(value); - /// - public static HeatFlux BtuPerSquareFootMinute(this long value) => HeatFlux.FromBtuPerSquareFootMinute(value); + /// + public static HeatFlux BtuPerMinuteSquareFoot(this long value) => HeatFlux.FromBtuPerMinuteSquareFoot(value); - /// - public static HeatFlux? BtuPerSquareFootMinute(this long? value) => HeatFlux.FromBtuPerSquareFootMinute(value); + /// + public static HeatFlux? BtuPerMinuteSquareFoot(this long? value) => HeatFlux.FromBtuPerMinuteSquareFoot(value); - /// - public static HeatFlux BtuPerSquareFootMinute(this double value) => HeatFlux.FromBtuPerSquareFootMinute(value); + /// + public static HeatFlux BtuPerMinuteSquareFoot(this double value) => HeatFlux.FromBtuPerMinuteSquareFoot(value); - /// - public static HeatFlux? BtuPerSquareFootMinute(this double? value) => HeatFlux.FromBtuPerSquareFootMinute(value); + /// + public static HeatFlux? BtuPerMinuteSquareFoot(this double? value) => HeatFlux.FromBtuPerMinuteSquareFoot(value); - /// - public static HeatFlux BtuPerSquareFootMinute(this float value) => HeatFlux.FromBtuPerSquareFootMinute(value); + /// + public static HeatFlux BtuPerMinuteSquareFoot(this float value) => HeatFlux.FromBtuPerMinuteSquareFoot(value); - /// - public static HeatFlux? BtuPerSquareFootMinute(this float? value) => HeatFlux.FromBtuPerSquareFootMinute(value); + /// + public static HeatFlux? BtuPerMinuteSquareFoot(this float? value) => HeatFlux.FromBtuPerMinuteSquareFoot(value); - /// - public static HeatFlux BtuPerSquareFootMinute(this decimal value) => HeatFlux.FromBtuPerSquareFootMinute(Convert.ToDouble(value)); + /// + public static HeatFlux BtuPerMinuteSquareFoot(this decimal value) => HeatFlux.FromBtuPerMinuteSquareFoot(Convert.ToDouble(value)); - /// - public static HeatFlux? BtuPerSquareFootMinute(this decimal? value) => HeatFlux.FromBtuPerSquareFootMinute(value == null ? (double?)null : Convert.ToDouble(value.Value)); + /// + public static HeatFlux? BtuPerMinuteSquareFoot(this decimal? value) => HeatFlux.FromBtuPerMinuteSquareFoot(value == null ? (double?)null : Convert.ToDouble(value.Value)); #endregion - #region BtuPerSquareFootSecond + #region BtuPerSecondSquareFoot - /// - public static HeatFlux BtuPerSquareFootSecond(this int value) => HeatFlux.FromBtuPerSquareFootSecond(value); + /// + public static HeatFlux BtuPerSecondSquareFoot(this int value) => HeatFlux.FromBtuPerSecondSquareFoot(value); - /// - public static HeatFlux? BtuPerSquareFootSecond(this int? value) => HeatFlux.FromBtuPerSquareFootSecond(value); + /// + public static HeatFlux? BtuPerSecondSquareFoot(this int? value) => HeatFlux.FromBtuPerSecondSquareFoot(value); - /// - public static HeatFlux BtuPerSquareFootSecond(this long value) => HeatFlux.FromBtuPerSquareFootSecond(value); + /// + public static HeatFlux BtuPerSecondSquareFoot(this long value) => HeatFlux.FromBtuPerSecondSquareFoot(value); - /// - public static HeatFlux? BtuPerSquareFootSecond(this long? value) => HeatFlux.FromBtuPerSquareFootSecond(value); + /// + public static HeatFlux? BtuPerSecondSquareFoot(this long? value) => HeatFlux.FromBtuPerSecondSquareFoot(value); - /// - public static HeatFlux BtuPerSquareFootSecond(this double value) => HeatFlux.FromBtuPerSquareFootSecond(value); + /// + public static HeatFlux BtuPerSecondSquareFoot(this double value) => HeatFlux.FromBtuPerSecondSquareFoot(value); - /// - public static HeatFlux? BtuPerSquareFootSecond(this double? value) => HeatFlux.FromBtuPerSquareFootSecond(value); + /// + public static HeatFlux? BtuPerSecondSquareFoot(this double? value) => HeatFlux.FromBtuPerSecondSquareFoot(value); - /// - public static HeatFlux BtuPerSquareFootSecond(this float value) => HeatFlux.FromBtuPerSquareFootSecond(value); + /// + public static HeatFlux BtuPerSecondSquareFoot(this float value) => HeatFlux.FromBtuPerSecondSquareFoot(value); - /// - public static HeatFlux? BtuPerSquareFootSecond(this float? value) => HeatFlux.FromBtuPerSquareFootSecond(value); + /// + public static HeatFlux? BtuPerSecondSquareFoot(this float? value) => HeatFlux.FromBtuPerSecondSquareFoot(value); - /// - public static HeatFlux BtuPerSquareFootSecond(this decimal value) => HeatFlux.FromBtuPerSquareFootSecond(Convert.ToDouble(value)); + /// + public static HeatFlux BtuPerSecondSquareFoot(this decimal value) => HeatFlux.FromBtuPerSecondSquareFoot(Convert.ToDouble(value)); - /// - public static HeatFlux? BtuPerSquareFootSecond(this decimal? value) => HeatFlux.FromBtuPerSquareFootSecond(value == null ? (double?)null : Convert.ToDouble(value.Value)); + /// + public static HeatFlux? BtuPerSecondSquareFoot(this decimal? value) => HeatFlux.FromBtuPerSecondSquareFoot(value == null ? (double?)null : Convert.ToDouble(value.Value)); #endregion - #region BtuPerSquareInchSecond + #region BtuPerSecondSquareInch - /// - public static HeatFlux BtuPerSquareInchSecond(this int value) => HeatFlux.FromBtuPerSquareInchSecond(value); + /// + public static HeatFlux BtuPerSecondSquareInch(this int value) => HeatFlux.FromBtuPerSecondSquareInch(value); - /// - public static HeatFlux? BtuPerSquareInchSecond(this int? value) => HeatFlux.FromBtuPerSquareInchSecond(value); + /// + public static HeatFlux? BtuPerSecondSquareInch(this int? value) => HeatFlux.FromBtuPerSecondSquareInch(value); - /// - public static HeatFlux BtuPerSquareInchSecond(this long value) => HeatFlux.FromBtuPerSquareInchSecond(value); + /// + public static HeatFlux BtuPerSecondSquareInch(this long value) => HeatFlux.FromBtuPerSecondSquareInch(value); - /// - public static HeatFlux? BtuPerSquareInchSecond(this long? value) => HeatFlux.FromBtuPerSquareInchSecond(value); + /// + public static HeatFlux? BtuPerSecondSquareInch(this long? value) => HeatFlux.FromBtuPerSecondSquareInch(value); - /// - public static HeatFlux BtuPerSquareInchSecond(this double value) => HeatFlux.FromBtuPerSquareInchSecond(value); + /// + public static HeatFlux BtuPerSecondSquareInch(this double value) => HeatFlux.FromBtuPerSecondSquareInch(value); - /// - public static HeatFlux? BtuPerSquareInchSecond(this double? value) => HeatFlux.FromBtuPerSquareInchSecond(value); + /// + public static HeatFlux? BtuPerSecondSquareInch(this double? value) => HeatFlux.FromBtuPerSecondSquareInch(value); - /// - public static HeatFlux BtuPerSquareInchSecond(this float value) => HeatFlux.FromBtuPerSquareInchSecond(value); + /// + public static HeatFlux BtuPerSecondSquareInch(this float value) => HeatFlux.FromBtuPerSecondSquareInch(value); - /// - public static HeatFlux? BtuPerSquareInchSecond(this float? value) => HeatFlux.FromBtuPerSquareInchSecond(value); + /// + public static HeatFlux? BtuPerSecondSquareInch(this float? value) => HeatFlux.FromBtuPerSecondSquareInch(value); - /// - public static HeatFlux BtuPerSquareInchSecond(this decimal value) => HeatFlux.FromBtuPerSquareInchSecond(Convert.ToDouble(value)); + /// + public static HeatFlux BtuPerSecondSquareInch(this decimal value) => HeatFlux.FromBtuPerSecondSquareInch(Convert.ToDouble(value)); - /// - public static HeatFlux? BtuPerSquareInchSecond(this decimal? value) => HeatFlux.FromBtuPerSquareInchSecond(value == null ? (double?)null : Convert.ToDouble(value.Value)); + /// + public static HeatFlux? BtuPerSecondSquareInch(this decimal? value) => HeatFlux.FromBtuPerSecondSquareInch(value == null ? (double?)null : Convert.ToDouble(value.Value)); #endregion - #region CalPerSquareCentiMeterSecond + #region CalPerSecondSquareCentimeter - /// - public static HeatFlux CalPerSquareCentiMeterSecond(this int value) => HeatFlux.FromCalPerSquareCentiMeterSecond(value); + /// + public static HeatFlux CalPerSecondSquareCentimeter(this int value) => HeatFlux.FromCalPerSecondSquareCentimeter(value); - /// - public static HeatFlux? CalPerSquareCentiMeterSecond(this int? value) => HeatFlux.FromCalPerSquareCentiMeterSecond(value); + /// + public static HeatFlux? CalPerSecondSquareCentimeter(this int? value) => HeatFlux.FromCalPerSecondSquareCentimeter(value); - /// - public static HeatFlux CalPerSquareCentiMeterSecond(this long value) => HeatFlux.FromCalPerSquareCentiMeterSecond(value); + /// + public static HeatFlux CalPerSecondSquareCentimeter(this long value) => HeatFlux.FromCalPerSecondSquareCentimeter(value); - /// - public static HeatFlux? CalPerSquareCentiMeterSecond(this long? value) => HeatFlux.FromCalPerSquareCentiMeterSecond(value); + /// + public static HeatFlux? CalPerSecondSquareCentimeter(this long? value) => HeatFlux.FromCalPerSecondSquareCentimeter(value); - /// - public static HeatFlux CalPerSquareCentiMeterSecond(this double value) => HeatFlux.FromCalPerSquareCentiMeterSecond(value); + /// + public static HeatFlux CalPerSecondSquareCentimeter(this double value) => HeatFlux.FromCalPerSecondSquareCentimeter(value); - /// - public static HeatFlux? CalPerSquareCentiMeterSecond(this double? value) => HeatFlux.FromCalPerSquareCentiMeterSecond(value); + /// + public static HeatFlux? CalPerSecondSquareCentimeter(this double? value) => HeatFlux.FromCalPerSecondSquareCentimeter(value); - /// - public static HeatFlux CalPerSquareCentiMeterSecond(this float value) => HeatFlux.FromCalPerSquareCentiMeterSecond(value); + /// + public static HeatFlux CalPerSecondSquareCentimeter(this float value) => HeatFlux.FromCalPerSecondSquareCentimeter(value); - /// - public static HeatFlux? CalPerSquareCentiMeterSecond(this float? value) => HeatFlux.FromCalPerSquareCentiMeterSecond(value); + /// + public static HeatFlux? CalPerSecondSquareCentimeter(this float? value) => HeatFlux.FromCalPerSecondSquareCentimeter(value); - /// - public static HeatFlux CalPerSquareCentiMeterSecond(this decimal value) => HeatFlux.FromCalPerSquareCentiMeterSecond(Convert.ToDouble(value)); + /// + public static HeatFlux CalPerSecondSquareCentimeter(this decimal value) => HeatFlux.FromCalPerSecondSquareCentimeter(Convert.ToDouble(value)); - /// - public static HeatFlux? CalPerSquareCentiMeterSecond(this decimal? value) => HeatFlux.FromCalPerSquareCentiMeterSecond(value == null ? (double?)null : Convert.ToDouble(value.Value)); + /// + public static HeatFlux? CalPerSecondSquareCentimeter(this decimal? value) => HeatFlux.FromCalPerSecondSquareCentimeter(value == null ? (double?)null : Convert.ToDouble(value.Value)); #endregion @@ -282,71 +282,71 @@ public static class NumberToHeatFluxExtensions #endregion - #region KilocalPerSquareCentiMeterSecond + #region KilocalPerHourSquareMeter - /// - public static HeatFlux KilocalPerSquareCentiMeterSecond(this int value) => HeatFlux.FromKilocalPerSquareCentiMeterSecond(value); + /// + public static HeatFlux KilocalPerHourSquareMeter(this int value) => HeatFlux.FromKilocalPerHourSquareMeter(value); - /// - public static HeatFlux? KilocalPerSquareCentiMeterSecond(this int? value) => HeatFlux.FromKilocalPerSquareCentiMeterSecond(value); + /// + public static HeatFlux? KilocalPerHourSquareMeter(this int? value) => HeatFlux.FromKilocalPerHourSquareMeter(value); - /// - public static HeatFlux KilocalPerSquareCentiMeterSecond(this long value) => HeatFlux.FromKilocalPerSquareCentiMeterSecond(value); + /// + public static HeatFlux KilocalPerHourSquareMeter(this long value) => HeatFlux.FromKilocalPerHourSquareMeter(value); - /// - public static HeatFlux? KilocalPerSquareCentiMeterSecond(this long? value) => HeatFlux.FromKilocalPerSquareCentiMeterSecond(value); + /// + public static HeatFlux? KilocalPerHourSquareMeter(this long? value) => HeatFlux.FromKilocalPerHourSquareMeter(value); - /// - public static HeatFlux KilocalPerSquareCentiMeterSecond(this double value) => HeatFlux.FromKilocalPerSquareCentiMeterSecond(value); + /// + public static HeatFlux KilocalPerHourSquareMeter(this double value) => HeatFlux.FromKilocalPerHourSquareMeter(value); - /// - public static HeatFlux? KilocalPerSquareCentiMeterSecond(this double? value) => HeatFlux.FromKilocalPerSquareCentiMeterSecond(value); + /// + public static HeatFlux? KilocalPerHourSquareMeter(this double? value) => HeatFlux.FromKilocalPerHourSquareMeter(value); - /// - public static HeatFlux KilocalPerSquareCentiMeterSecond(this float value) => HeatFlux.FromKilocalPerSquareCentiMeterSecond(value); + /// + public static HeatFlux KilocalPerHourSquareMeter(this float value) => HeatFlux.FromKilocalPerHourSquareMeter(value); - /// - public static HeatFlux? KilocalPerSquareCentiMeterSecond(this float? value) => HeatFlux.FromKilocalPerSquareCentiMeterSecond(value); + /// + public static HeatFlux? KilocalPerHourSquareMeter(this float? value) => HeatFlux.FromKilocalPerHourSquareMeter(value); - /// - public static HeatFlux KilocalPerSquareCentiMeterSecond(this decimal value) => HeatFlux.FromKilocalPerSquareCentiMeterSecond(Convert.ToDouble(value)); + /// + public static HeatFlux KilocalPerHourSquareMeter(this decimal value) => HeatFlux.FromKilocalPerHourSquareMeter(Convert.ToDouble(value)); - /// - public static HeatFlux? KilocalPerSquareCentiMeterSecond(this decimal? value) => HeatFlux.FromKilocalPerSquareCentiMeterSecond(value == null ? (double?)null : Convert.ToDouble(value.Value)); + /// + public static HeatFlux? KilocalPerHourSquareMeter(this decimal? value) => HeatFlux.FromKilocalPerHourSquareMeter(value == null ? (double?)null : Convert.ToDouble(value.Value)); #endregion - #region KiloCalPerSquareMeterHour + #region KilocalPerSecondSquareCentimeter - /// - public static HeatFlux KiloCalPerSquareMeterHour(this int value) => HeatFlux.FromKiloCalPerSquareMeterHour(value); + /// + public static HeatFlux KilocalPerSecondSquareCentimeter(this int value) => HeatFlux.FromKilocalPerSecondSquareCentimeter(value); - /// - public static HeatFlux? KiloCalPerSquareMeterHour(this int? value) => HeatFlux.FromKiloCalPerSquareMeterHour(value); + /// + public static HeatFlux? KilocalPerSecondSquareCentimeter(this int? value) => HeatFlux.FromKilocalPerSecondSquareCentimeter(value); - /// - public static HeatFlux KiloCalPerSquareMeterHour(this long value) => HeatFlux.FromKiloCalPerSquareMeterHour(value); + /// + public static HeatFlux KilocalPerSecondSquareCentimeter(this long value) => HeatFlux.FromKilocalPerSecondSquareCentimeter(value); - /// - public static HeatFlux? KiloCalPerSquareMeterHour(this long? value) => HeatFlux.FromKiloCalPerSquareMeterHour(value); + /// + public static HeatFlux? KilocalPerSecondSquareCentimeter(this long? value) => HeatFlux.FromKilocalPerSecondSquareCentimeter(value); - /// - public static HeatFlux KiloCalPerSquareMeterHour(this double value) => HeatFlux.FromKiloCalPerSquareMeterHour(value); + /// + public static HeatFlux KilocalPerSecondSquareCentimeter(this double value) => HeatFlux.FromKilocalPerSecondSquareCentimeter(value); - /// - public static HeatFlux? KiloCalPerSquareMeterHour(this double? value) => HeatFlux.FromKiloCalPerSquareMeterHour(value); + /// + public static HeatFlux? KilocalPerSecondSquareCentimeter(this double? value) => HeatFlux.FromKilocalPerSecondSquareCentimeter(value); - /// - public static HeatFlux KiloCalPerSquareMeterHour(this float value) => HeatFlux.FromKiloCalPerSquareMeterHour(value); + /// + public static HeatFlux KilocalPerSecondSquareCentimeter(this float value) => HeatFlux.FromKilocalPerSecondSquareCentimeter(value); - /// - public static HeatFlux? KiloCalPerSquareMeterHour(this float? value) => HeatFlux.FromKiloCalPerSquareMeterHour(value); + /// + public static HeatFlux? KilocalPerSecondSquareCentimeter(this float? value) => HeatFlux.FromKilocalPerSecondSquareCentimeter(value); - /// - public static HeatFlux KiloCalPerSquareMeterHour(this decimal value) => HeatFlux.FromKiloCalPerSquareMeterHour(Convert.ToDouble(value)); + /// + public static HeatFlux KilocalPerSecondSquareCentimeter(this decimal value) => HeatFlux.FromKilocalPerSecondSquareCentimeter(Convert.ToDouble(value)); - /// - public static HeatFlux? KiloCalPerSquareMeterHour(this decimal? value) => HeatFlux.FromKiloCalPerSquareMeterHour(value == null ? (double?)null : Convert.ToDouble(value.Value)); + /// + public static HeatFlux? KilocalPerSecondSquareCentimeter(this decimal? value) => HeatFlux.FromKilocalPerSecondSquareCentimeter(value == null ? (double?)null : Convert.ToDouble(value.Value)); #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs index 9fddf1bfe1..48c587db98 100644 --- a/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs @@ -163,25 +163,25 @@ public HeatFlux(double wattspersquaremeter) /// public static HeatFluxUnit[] Units { get; } = Enum.GetValues(typeof(HeatFluxUnit)).Cast().ToArray(); /// - /// Get HeatFlux in BtuPerSquareFootHour. + /// Get HeatFlux in BtuPerHourSquareFoot. /// - public double BtuPerSquareFootHour => As(HeatFluxUnit.BtuPerSquareFootHour); + public double BtuPerHourSquareFoot => As(HeatFluxUnit.BtuPerHourSquareFoot); /// - /// Get HeatFlux in BtuPerSquareFootMinute. + /// Get HeatFlux in BtuPerMinuteSquareFoot. /// - public double BtuPerSquareFootMinute => As(HeatFluxUnit.BtuPerSquareFootMinute); + public double BtuPerMinuteSquareFoot => As(HeatFluxUnit.BtuPerMinuteSquareFoot); /// - /// Get HeatFlux in BtuPerSquareFootSecond. + /// Get HeatFlux in BtuPerSecondSquareFoot. /// - public double BtuPerSquareFootSecond => As(HeatFluxUnit.BtuPerSquareFootSecond); + public double BtuPerSecondSquareFoot => As(HeatFluxUnit.BtuPerSecondSquareFoot); /// - /// Get HeatFlux in BtuPerSquareInchSecond. + /// Get HeatFlux in BtuPerSecondSquareInch. /// - public double BtuPerSquareInchSecond => As(HeatFluxUnit.BtuPerSquareInchSecond); + public double BtuPerSecondSquareInch => As(HeatFluxUnit.BtuPerSecondSquareInch); /// - /// Get HeatFlux in CalPerSquareCentiMeterSecond. + /// Get HeatFlux in CalPerSecondSquareCentimeter. /// - public double CalPerSquareCentiMeterSecond => As(HeatFluxUnit.CalPerSquareCentiMeterSecond); + public double CalPerSecondSquareCentimeter => As(HeatFluxUnit.CalPerSecondSquareCentimeter); /// /// Get HeatFlux in CentiwattsPerSquareMeter. /// @@ -191,13 +191,13 @@ public HeatFlux(double wattspersquaremeter) /// public double DeciwattsPerSquareMeter => As(HeatFluxUnit.DeciwattPerSquareMeter); /// - /// Get HeatFlux in KilocalPerSquareCentiMeterSecond. + /// Get HeatFlux in KilocalPerHourSquareMeter. /// - public double KilocalPerSquareCentiMeterSecond => As(HeatFluxUnit.KilocalPerSquareCentiMeterSecond); + public double KilocalPerHourSquareMeter => As(HeatFluxUnit.KilocalPerHourSquareMeter); /// - /// Get HeatFlux in KiloCalPerSquareMeterHour. + /// Get HeatFlux in KilocalPerSecondSquareCentimeter. /// - public double KiloCalPerSquareMeterHour => As(HeatFluxUnit.KiloCalPerSquareMeterHour); + public double KilocalPerSecondSquareCentimeter => As(HeatFluxUnit.KilocalPerSecondSquareCentimeter); /// /// Get HeatFlux in KilowattsPerSquareMeter. /// @@ -234,73 +234,73 @@ public HeatFlux(double wattspersquaremeter) public static HeatFlux Zero => new HeatFlux(0, BaseUnit); /// - /// Get HeatFlux from BtuPerSquareFootHour. + /// Get HeatFlux from BtuPerHourSquareFoot. /// #if WINDOWS_UWP [Windows.Foundation.Metadata.DefaultOverload] - public static HeatFlux FromBtuPerSquareFootHour(double btupersquarefoothour) + public static HeatFlux FromBtuPerHourSquareFoot(double btuperhoursquarefoot) #else - public static HeatFlux FromBtuPerSquareFootHour(QuantityValue btupersquarefoothour) + public static HeatFlux FromBtuPerHourSquareFoot(QuantityValue btuperhoursquarefoot) #endif { - double value = (double) btupersquarefoothour; - return new HeatFlux(value, HeatFluxUnit.BtuPerSquareFootHour); + double value = (double) btuperhoursquarefoot; + return new HeatFlux(value, HeatFluxUnit.BtuPerHourSquareFoot); } /// - /// Get HeatFlux from BtuPerSquareFootMinute. + /// Get HeatFlux from BtuPerMinuteSquareFoot. /// #if WINDOWS_UWP [Windows.Foundation.Metadata.DefaultOverload] - public static HeatFlux FromBtuPerSquareFootMinute(double btupersquarefootminute) + public static HeatFlux FromBtuPerMinuteSquareFoot(double btuperminutesquarefoot) #else - public static HeatFlux FromBtuPerSquareFootMinute(QuantityValue btupersquarefootminute) + public static HeatFlux FromBtuPerMinuteSquareFoot(QuantityValue btuperminutesquarefoot) #endif { - double value = (double) btupersquarefootminute; - return new HeatFlux(value, HeatFluxUnit.BtuPerSquareFootMinute); + double value = (double) btuperminutesquarefoot; + return new HeatFlux(value, HeatFluxUnit.BtuPerMinuteSquareFoot); } /// - /// Get HeatFlux from BtuPerSquareFootSecond. + /// Get HeatFlux from BtuPerSecondSquareFoot. /// #if WINDOWS_UWP [Windows.Foundation.Metadata.DefaultOverload] - public static HeatFlux FromBtuPerSquareFootSecond(double btupersquarefootsecond) + public static HeatFlux FromBtuPerSecondSquareFoot(double btupersecondsquarefoot) #else - public static HeatFlux FromBtuPerSquareFootSecond(QuantityValue btupersquarefootsecond) + public static HeatFlux FromBtuPerSecondSquareFoot(QuantityValue btupersecondsquarefoot) #endif { - double value = (double) btupersquarefootsecond; - return new HeatFlux(value, HeatFluxUnit.BtuPerSquareFootSecond); + double value = (double) btupersecondsquarefoot; + return new HeatFlux(value, HeatFluxUnit.BtuPerSecondSquareFoot); } /// - /// Get HeatFlux from BtuPerSquareInchSecond. + /// Get HeatFlux from BtuPerSecondSquareInch. /// #if WINDOWS_UWP [Windows.Foundation.Metadata.DefaultOverload] - public static HeatFlux FromBtuPerSquareInchSecond(double btupersquareinchsecond) + public static HeatFlux FromBtuPerSecondSquareInch(double btupersecondsquareinch) #else - public static HeatFlux FromBtuPerSquareInchSecond(QuantityValue btupersquareinchsecond) + public static HeatFlux FromBtuPerSecondSquareInch(QuantityValue btupersecondsquareinch) #endif { - double value = (double) btupersquareinchsecond; - return new HeatFlux(value, HeatFluxUnit.BtuPerSquareInchSecond); + double value = (double) btupersecondsquareinch; + return new HeatFlux(value, HeatFluxUnit.BtuPerSecondSquareInch); } /// - /// Get HeatFlux from CalPerSquareCentiMeterSecond. + /// Get HeatFlux from CalPerSecondSquareCentimeter. /// #if WINDOWS_UWP [Windows.Foundation.Metadata.DefaultOverload] - public static HeatFlux FromCalPerSquareCentiMeterSecond(double calpersquarecentimetersecond) + public static HeatFlux FromCalPerSecondSquareCentimeter(double calpersecondsquarecentimeter) #else - public static HeatFlux FromCalPerSquareCentiMeterSecond(QuantityValue calpersquarecentimetersecond) + public static HeatFlux FromCalPerSecondSquareCentimeter(QuantityValue calpersecondsquarecentimeter) #endif { - double value = (double) calpersquarecentimetersecond; - return new HeatFlux(value, HeatFluxUnit.CalPerSquareCentiMeterSecond); + double value = (double) calpersecondsquarecentimeter; + return new HeatFlux(value, HeatFluxUnit.CalPerSecondSquareCentimeter); } /// @@ -332,31 +332,31 @@ public static HeatFlux FromDeciwattsPerSquareMeter(QuantityValue deciwattspersqu } /// - /// Get HeatFlux from KilocalPerSquareCentiMeterSecond. + /// Get HeatFlux from KilocalPerHourSquareMeter. /// #if WINDOWS_UWP [Windows.Foundation.Metadata.DefaultOverload] - public static HeatFlux FromKilocalPerSquareCentiMeterSecond(double kilocalpersquarecentimetersecond) + public static HeatFlux FromKilocalPerHourSquareMeter(double kilocalperhoursquaremeter) #else - public static HeatFlux FromKilocalPerSquareCentiMeterSecond(QuantityValue kilocalpersquarecentimetersecond) + public static HeatFlux FromKilocalPerHourSquareMeter(QuantityValue kilocalperhoursquaremeter) #endif { - double value = (double) kilocalpersquarecentimetersecond; - return new HeatFlux(value, HeatFluxUnit.KilocalPerSquareCentiMeterSecond); + double value = (double) kilocalperhoursquaremeter; + return new HeatFlux(value, HeatFluxUnit.KilocalPerHourSquareMeter); } /// - /// Get HeatFlux from KiloCalPerSquareMeterHour. + /// Get HeatFlux from KilocalPerSecondSquareCentimeter. /// #if WINDOWS_UWP [Windows.Foundation.Metadata.DefaultOverload] - public static HeatFlux FromKiloCalPerSquareMeterHour(double kilocalpersquaremeterhour) + public static HeatFlux FromKilocalPerSecondSquareCentimeter(double kilocalpersecondsquarecentimeter) #else - public static HeatFlux FromKiloCalPerSquareMeterHour(QuantityValue kilocalpersquaremeterhour) + public static HeatFlux FromKilocalPerSecondSquareCentimeter(QuantityValue kilocalpersecondsquarecentimeter) #endif { - double value = (double) kilocalpersquaremeterhour; - return new HeatFlux(value, HeatFluxUnit.KiloCalPerSquareMeterHour); + double value = (double) kilocalpersecondsquarecentimeter; + return new HeatFlux(value, HeatFluxUnit.KilocalPerSecondSquareCentimeter); } /// @@ -460,13 +460,13 @@ public static HeatFlux FromWattsPerSquareMeter(QuantityValue wattspersquaremeter // Windows Runtime Component does not support nullable types (double?): https://msdn.microsoft.com/en-us/library/br230301.aspx #if !WINDOWS_UWP /// - /// Get nullable HeatFlux from nullable BtuPerSquareFootHour. + /// Get nullable HeatFlux from nullable BtuPerHourSquareFoot. /// - public static HeatFlux? FromBtuPerSquareFootHour(QuantityValue? btupersquarefoothour) + public static HeatFlux? FromBtuPerHourSquareFoot(QuantityValue? btuperhoursquarefoot) { - if (btupersquarefoothour.HasValue) + if (btuperhoursquarefoot.HasValue) { - return FromBtuPerSquareFootHour(btupersquarefoothour.Value); + return FromBtuPerHourSquareFoot(btuperhoursquarefoot.Value); } else { @@ -475,13 +475,13 @@ public static HeatFlux FromWattsPerSquareMeter(QuantityValue wattspersquaremeter } /// - /// Get nullable HeatFlux from nullable BtuPerSquareFootMinute. + /// Get nullable HeatFlux from nullable BtuPerMinuteSquareFoot. /// - public static HeatFlux? FromBtuPerSquareFootMinute(QuantityValue? btupersquarefootminute) + public static HeatFlux? FromBtuPerMinuteSquareFoot(QuantityValue? btuperminutesquarefoot) { - if (btupersquarefootminute.HasValue) + if (btuperminutesquarefoot.HasValue) { - return FromBtuPerSquareFootMinute(btupersquarefootminute.Value); + return FromBtuPerMinuteSquareFoot(btuperminutesquarefoot.Value); } else { @@ -490,13 +490,13 @@ public static HeatFlux FromWattsPerSquareMeter(QuantityValue wattspersquaremeter } /// - /// Get nullable HeatFlux from nullable BtuPerSquareFootSecond. + /// Get nullable HeatFlux from nullable BtuPerSecondSquareFoot. /// - public static HeatFlux? FromBtuPerSquareFootSecond(QuantityValue? btupersquarefootsecond) + public static HeatFlux? FromBtuPerSecondSquareFoot(QuantityValue? btupersecondsquarefoot) { - if (btupersquarefootsecond.HasValue) + if (btupersecondsquarefoot.HasValue) { - return FromBtuPerSquareFootSecond(btupersquarefootsecond.Value); + return FromBtuPerSecondSquareFoot(btupersecondsquarefoot.Value); } else { @@ -505,13 +505,13 @@ public static HeatFlux FromWattsPerSquareMeter(QuantityValue wattspersquaremeter } /// - /// Get nullable HeatFlux from nullable BtuPerSquareInchSecond. + /// Get nullable HeatFlux from nullable BtuPerSecondSquareInch. /// - public static HeatFlux? FromBtuPerSquareInchSecond(QuantityValue? btupersquareinchsecond) + public static HeatFlux? FromBtuPerSecondSquareInch(QuantityValue? btupersecondsquareinch) { - if (btupersquareinchsecond.HasValue) + if (btupersecondsquareinch.HasValue) { - return FromBtuPerSquareInchSecond(btupersquareinchsecond.Value); + return FromBtuPerSecondSquareInch(btupersecondsquareinch.Value); } else { @@ -520,13 +520,13 @@ public static HeatFlux FromWattsPerSquareMeter(QuantityValue wattspersquaremeter } /// - /// Get nullable HeatFlux from nullable CalPerSquareCentiMeterSecond. + /// Get nullable HeatFlux from nullable CalPerSecondSquareCentimeter. /// - public static HeatFlux? FromCalPerSquareCentiMeterSecond(QuantityValue? calpersquarecentimetersecond) + public static HeatFlux? FromCalPerSecondSquareCentimeter(QuantityValue? calpersecondsquarecentimeter) { - if (calpersquarecentimetersecond.HasValue) + if (calpersecondsquarecentimeter.HasValue) { - return FromCalPerSquareCentiMeterSecond(calpersquarecentimetersecond.Value); + return FromCalPerSecondSquareCentimeter(calpersecondsquarecentimeter.Value); } else { @@ -565,13 +565,13 @@ public static HeatFlux FromWattsPerSquareMeter(QuantityValue wattspersquaremeter } /// - /// Get nullable HeatFlux from nullable KilocalPerSquareCentiMeterSecond. + /// Get nullable HeatFlux from nullable KilocalPerHourSquareMeter. /// - public static HeatFlux? FromKilocalPerSquareCentiMeterSecond(QuantityValue? kilocalpersquarecentimetersecond) + public static HeatFlux? FromKilocalPerHourSquareMeter(QuantityValue? kilocalperhoursquaremeter) { - if (kilocalpersquarecentimetersecond.HasValue) + if (kilocalperhoursquaremeter.HasValue) { - return FromKilocalPerSquareCentiMeterSecond(kilocalpersquarecentimetersecond.Value); + return FromKilocalPerHourSquareMeter(kilocalperhoursquaremeter.Value); } else { @@ -580,13 +580,13 @@ public static HeatFlux FromWattsPerSquareMeter(QuantityValue wattspersquaremeter } /// - /// Get nullable HeatFlux from nullable KiloCalPerSquareMeterHour. + /// Get nullable HeatFlux from nullable KilocalPerSecondSquareCentimeter. /// - public static HeatFlux? FromKiloCalPerSquareMeterHour(QuantityValue? kilocalpersquaremeterhour) + public static HeatFlux? FromKilocalPerSecondSquareCentimeter(QuantityValue? kilocalpersecondsquarecentimeter) { - if (kilocalpersquaremeterhour.HasValue) + if (kilocalpersecondsquarecentimeter.HasValue) { - return FromKiloCalPerSquareMeterHour(kilocalpersquaremeterhour.Value); + return FromKilocalPerSecondSquareCentimeter(kilocalpersecondsquarecentimeter.Value); } else { @@ -926,15 +926,15 @@ public double As(HeatFluxUnit unit) switch (unit) { - case HeatFluxUnit.BtuPerSquareFootHour: return baseUnitValue/3.15459075; - case HeatFluxUnit.BtuPerSquareFootMinute: return baseUnitValue/1.89275445e2; - case HeatFluxUnit.BtuPerSquareFootSecond: return baseUnitValue/1.13565267e4; - case HeatFluxUnit.BtuPerSquareInchSecond: return baseUnitValue/1.63533984e6; - case HeatFluxUnit.CalPerSquareCentiMeterSecond: return baseUnitValue/4.1840e4; + case HeatFluxUnit.BtuPerHourSquareFoot: return baseUnitValue/3.15459075; + case HeatFluxUnit.BtuPerMinuteSquareFoot: return baseUnitValue/1.89275445e2; + case HeatFluxUnit.BtuPerSecondSquareFoot: return baseUnitValue/1.13565267e4; + case HeatFluxUnit.BtuPerSecondSquareInch: return baseUnitValue/1.63533984e6; + case HeatFluxUnit.CalPerSecondSquareCentimeter: return baseUnitValue/4.1840e4; case HeatFluxUnit.CentiwattPerSquareMeter: return (baseUnitValue) / 1e-2d; case HeatFluxUnit.DeciwattPerSquareMeter: return (baseUnitValue) / 1e-1d; - case HeatFluxUnit.KilocalPerSquareCentiMeterSecond: return (baseUnitValue/4.1840e4) / 1e3d; - case HeatFluxUnit.KiloCalPerSquareMeterHour: return baseUnitValue/1.16222222; + case HeatFluxUnit.KilocalPerHourSquareMeter: return baseUnitValue/1.16222222; + case HeatFluxUnit.KilocalPerSecondSquareCentimeter: return (baseUnitValue/4.1840e4) / 1e3d; case HeatFluxUnit.KilowattPerSquareMeter: return (baseUnitValue) / 1e3d; case HeatFluxUnit.MicrowattPerSquareMeter: return (baseUnitValue) / 1e-6d; case HeatFluxUnit.MilliwattPerSquareMeter: return (baseUnitValue) / 1e-3d; @@ -1305,15 +1305,15 @@ private double AsBaseUnitWattsPerSquareMeter() switch (Unit) { - case HeatFluxUnit.BtuPerSquareFootHour: return _value*3.15459075; - case HeatFluxUnit.BtuPerSquareFootMinute: return _value*1.89275445e2; - case HeatFluxUnit.BtuPerSquareFootSecond: return _value*1.13565267e4; - case HeatFluxUnit.BtuPerSquareInchSecond: return _value*1.63533984e6; - case HeatFluxUnit.CalPerSquareCentiMeterSecond: return _value*4.1840e4; + case HeatFluxUnit.BtuPerHourSquareFoot: return _value*3.15459075; + case HeatFluxUnit.BtuPerMinuteSquareFoot: return _value*1.89275445e2; + case HeatFluxUnit.BtuPerSecondSquareFoot: return _value*1.13565267e4; + case HeatFluxUnit.BtuPerSecondSquareInch: return _value*1.63533984e6; + case HeatFluxUnit.CalPerSecondSquareCentimeter: return _value*4.1840e4; case HeatFluxUnit.CentiwattPerSquareMeter: return (_value) * 1e-2d; case HeatFluxUnit.DeciwattPerSquareMeter: return (_value) * 1e-1d; - case HeatFluxUnit.KilocalPerSquareCentiMeterSecond: return (_value*4.1840e4) * 1e3d; - case HeatFluxUnit.KiloCalPerSquareMeterHour: return _value*1.16222222; + case HeatFluxUnit.KilocalPerHourSquareMeter: return _value*1.16222222; + case HeatFluxUnit.KilocalPerSecondSquareCentimeter: return (_value*4.1840e4) * 1e3d; case HeatFluxUnit.KilowattPerSquareMeter: return (_value) * 1e3d; case HeatFluxUnit.MicrowattPerSquareMeter: return (_value) * 1e-6d; case HeatFluxUnit.MilliwattPerSquareMeter: return (_value) * 1e-3d; diff --git a/UnitsNet/GeneratedCode/UnitSystem.Default.g.cs b/UnitsNet/GeneratedCode/UnitSystem.Default.g.cs index 791544572e..501a285ab6 100644 --- a/UnitsNet/GeneratedCode/UnitSystem.Default.g.cs +++ b/UnitsNet/GeneratedCode/UnitSystem.Default.g.cs @@ -1734,30 +1734,30 @@ private static readonly ReadOnlyCollection DefaultLocalization new UnitLocalization(typeof (HeatFluxUnit), new[] { - new CulturesForEnumValue((int) HeatFluxUnit.BtuPerSquareFootHour, + new CulturesForEnumValue((int) HeatFluxUnit.BtuPerHourSquareFoot, new[] { - new AbbreviationsForCulture("en-US", "BTU/ft²/hr"), + new AbbreviationsForCulture("en-US", "BTU/hr·ft²"), }), - new CulturesForEnumValue((int) HeatFluxUnit.BtuPerSquareFootMinute, + new CulturesForEnumValue((int) HeatFluxUnit.BtuPerMinuteSquareFoot, new[] { - new AbbreviationsForCulture("en-US", "BTU/ft²/min"), + new AbbreviationsForCulture("en-US", "BTU/min·ft²"), }), - new CulturesForEnumValue((int) HeatFluxUnit.BtuPerSquareFootSecond, + new CulturesForEnumValue((int) HeatFluxUnit.BtuPerSecondSquareFoot, new[] { - new AbbreviationsForCulture("en-US", "BTU/ft²/s"), + new AbbreviationsForCulture("en-US", "BTU/s·ft²"), }), - new CulturesForEnumValue((int) HeatFluxUnit.BtuPerSquareInchSecond, + new CulturesForEnumValue((int) HeatFluxUnit.BtuPerSecondSquareInch, new[] { - new AbbreviationsForCulture("en-US", "BTU/in²/s"), + new AbbreviationsForCulture("en-US", "BTU/s·in²"), }), - new CulturesForEnumValue((int) HeatFluxUnit.CalPerSquareCentiMeterSecond, + new CulturesForEnumValue((int) HeatFluxUnit.CalPerSecondSquareCentimeter, new[] { - new AbbreviationsForCulture("en-US", "cal/cm²/s"), + new AbbreviationsForCulture("en-US", "cal/s·cm²"), }), new CulturesForEnumValue((int) HeatFluxUnit.CentiwattPerSquareMeter, new[] @@ -1769,15 +1769,15 @@ private static readonly ReadOnlyCollection DefaultLocalization { new AbbreviationsForCulture("en-US", "dW/m²"), }), - new CulturesForEnumValue((int) HeatFluxUnit.KilocalPerSquareCentiMeterSecond, + new CulturesForEnumValue((int) HeatFluxUnit.KilocalPerHourSquareMeter, new[] { - new AbbreviationsForCulture("en-US", "kcal/cm²/s"), + new AbbreviationsForCulture("en-US", "kcal/hr·m²"), }), - new CulturesForEnumValue((int) HeatFluxUnit.KiloCalPerSquareMeterHour, + new CulturesForEnumValue((int) HeatFluxUnit.KilocalPerSecondSquareCentimeter, new[] { - new AbbreviationsForCulture("en-US", "kcal/m²/hr"), + new AbbreviationsForCulture("en-US", "kcal/s·cm²"), }), new CulturesForEnumValue((int) HeatFluxUnit.KilowattPerSquareMeter, new[] diff --git a/UnitsNet/GeneratedCode/Units/HeatFluxUnit.g.cs b/UnitsNet/GeneratedCode/Units/HeatFluxUnit.g.cs index 572dfa9a6f..b537948049 100644 --- a/UnitsNet/GeneratedCode/Units/HeatFluxUnit.g.cs +++ b/UnitsNet/GeneratedCode/Units/HeatFluxUnit.g.cs @@ -42,15 +42,15 @@ namespace UnitsNet.Units public enum HeatFluxUnit { Undefined = 0, - BtuPerSquareFootHour, - BtuPerSquareFootMinute, - BtuPerSquareFootSecond, - BtuPerSquareInchSecond, - CalPerSquareCentiMeterSecond, + BtuPerHourSquareFoot, + BtuPerMinuteSquareFoot, + BtuPerSecondSquareFoot, + BtuPerSecondSquareInch, + CalPerSecondSquareCentimeter, CentiwattPerSquareMeter, DeciwattPerSquareMeter, - KilocalPerSquareCentiMeterSecond, - KiloCalPerSquareMeterHour, + KilocalPerHourSquareMeter, + KilocalPerSecondSquareCentimeter, KilowattPerSquareMeter, MicrowattPerSquareMeter, MilliwattPerSquareMeter, diff --git a/UnitsNet/UnitDefinitions/HeatFlux.json b/UnitsNet/UnitDefinitions/HeatFlux.json index 71af50fe9f..2426cccfd1 100644 --- a/UnitsNet/UnitDefinitions/HeatFlux.json +++ b/UnitsNet/UnitDefinitions/HeatFlux.json @@ -41,75 +41,75 @@ ] }, { - "SingularName": "BtuPerSquareInchSecond", - "PluralName": "BtuPerSquareInchSecond", + "SingularName": "BtuPerSecondSquareInch", + "PluralName": "BtuPerSecondSquareInch", "FromUnitToBaseFunc": "x*1.63533984e6", "FromBaseToUnitFunc": "x/1.63533984e6", "Localization": [ { "Culture": "en-US", - "Abbreviations": [ "BTU/in²/s" ] + "Abbreviations": [ "BTU/s·in²" ] } ] }, { - "SingularName": "BtuPerSquareFootSecond", - "PluralName": "BtuPerSquareFootSecond", + "SingularName": "BtuPerSecondSquareFoot", + "PluralName": "BtuPerSecondSquareFoot", "FromUnitToBaseFunc": "x*1.13565267e4", "FromBaseToUnitFunc": "x/1.13565267e4", "Localization": [ { "Culture": "en-US", - "Abbreviations": [ "BTU/ft²/s" ] + "Abbreviations": [ "BTU/s·ft²" ] } ] }, { - "SingularName": "BtuPerSquareFootMinute", - "PluralName": "BtuPerSquareFootMinute", + "SingularName": "BtuPerMinuteSquareFoot", + "PluralName": "BtuPerMinuteSquareFoot", "FromUnitToBaseFunc": "x*1.89275445e2", "FromBaseToUnitFunc": "x/1.89275445e2", "Localization": [ { "Culture": "en-US", - "Abbreviations": [ "BTU/ft²/min" ] + "Abbreviations": [ "BTU/min·ft²" ] } ] }, { - "SingularName": "BtuPerSquareFootHour", - "PluralName": "BtuPerSquareFootHour", + "SingularName": "BtuPerHourSquareFoot", + "PluralName": "BtuPerHourSquareFoot", "FromUnitToBaseFunc": "x*3.15459075", "FromBaseToUnitFunc": "x/3.15459075", "Localization": [ { "Culture": "en-US", - "Abbreviations": [ "BTU/ft²/hr" ] + "Abbreviations": [ "BTU/hr·ft²" ] } ] }, { - "SingularName": "CalPerSquareCentiMeterSecond", - "PluralName": "CalPerSquareCentiMeterSecond", + "SingularName": "CalPerSecondSquareCentimeter", + "PluralName": "CalPerSecondSquareCentimeter", "FromUnitToBaseFunc": "x*4.1840e4", "FromBaseToUnitFunc": "x/4.1840e4", "Prefixes": [ "Kilo" ], "Localization": [ { "Culture": "en-US", - "Abbreviations": [ "cal/cm²/s" ] + "Abbreviations": [ "cal/s·cm²" ] } ] }, { - "SingularName": "KiloCalPerSquareMeterHour", - "PluralName": "KiloCalPerSquareMeterHour", + "SingularName": "KilocalPerHourSquareMeter", + "PluralName": "KilocalPerHourSquareMeter", "FromUnitToBaseFunc": "x*1.16222222", "FromBaseToUnitFunc": "x/1.16222222", "Localization": [ { "Culture": "en-US", - "Abbreviations": [ "kcal/m²/hr" ] + "Abbreviations": [ "kcal/hr·m²" ] } ] } From 531dfaddb2e84e8f134a3e74b9a9b9e7365612f1 Mon Sep 17 00:00:00 2001 From: Tristan Milnthorp Date: Mon, 23 Apr 2018 10:49:47 -0400 Subject: [PATCH 4/5] Consistency and verification (IT) updates --- UnitsNet.Tests/CustomCode/HeatFluxTests.cs | 6 +- .../GeneratedCode/HeatFluxTestsBase.g.cs | 36 ++--- .../Number/NumberToHeatFluxExtensions.g.cs | 126 +++++++++--------- .../GeneratedCode/Quantities/HeatFlux.g.cs | 78 +++++------ .../GeneratedCode/UnitSystem.Default.g.cs | 10 +- .../GeneratedCode/Units/HeatFluxUnit.g.cs | 6 +- UnitsNet/UnitDefinitions/HeatFlux.json | 20 +-- 7 files changed, 141 insertions(+), 141 deletions(-) diff --git a/UnitsNet.Tests/CustomCode/HeatFluxTests.cs b/UnitsNet.Tests/CustomCode/HeatFluxTests.cs index 70b7dee339..1683a299cf 100644 --- a/UnitsNet.Tests/CustomCode/HeatFluxTests.cs +++ b/UnitsNet.Tests/CustomCode/HeatFluxTests.cs @@ -51,11 +51,11 @@ public class HeatFluxTests : HeatFluxTestsBase protected override double BtuPerMinuteSquareFootInOneWattPerSquareMeter => 5.28330551e-3; protected override double BtuPerSecondSquareFootInOneWattPerSquareMeter => 8.80550918e-5; protected override double BtuPerSecondSquareInchInOneWattPerSquareMeter => 6.11493693e-7; - protected override double CalPerSecondSquareCentimeterInOneWattPerSquareMeter => 2.39005736e-5; + protected override double CaloriePerSecondSquareCentimeterInOneWattPerSquareMeter => 2.388458966e-5; protected override double CentiwattsPerSquareMeterInOneWattPerSquareMeter => 1e2; protected override double DeciwattsPerSquareMeterInOneWattPerSquareMeter => 1e1; - protected override double KilocalPerSecondSquareCentimeterInOneWattPerSquareMeter => 2.39005736e-8; - protected override double KilocalPerHourSquareMeterInOneWattPerSquareMeter => 8.6042065e-1; + protected override double KilocaloriePerSecondSquareCentimeterInOneWattPerSquareMeter => 2.388458966e-8; + protected override double KilocaloriePerHourSquareMeterInOneWattPerSquareMeter => 8.59845227859e-1; protected override double KilowattsPerSquareMeterInOneWattPerSquareMeter => 1e-3; protected override double MicrowattsPerSquareMeterInOneWattPerSquareMeter => 1e6; protected override double MilliwattsPerSquareMeterInOneWattPerSquareMeter => 1e3; diff --git a/UnitsNet.Tests/GeneratedCode/HeatFluxTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/HeatFluxTestsBase.g.cs index 50e548b239..823d3f6e8e 100644 --- a/UnitsNet.Tests/GeneratedCode/HeatFluxTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/HeatFluxTestsBase.g.cs @@ -56,11 +56,11 @@ public abstract partial class HeatFluxTestsBase protected abstract double BtuPerMinuteSquareFootInOneWattPerSquareMeter { get; } protected abstract double BtuPerSecondSquareFootInOneWattPerSquareMeter { get; } protected abstract double BtuPerSecondSquareInchInOneWattPerSquareMeter { get; } - protected abstract double CalPerSecondSquareCentimeterInOneWattPerSquareMeter { get; } + protected abstract double CaloriePerSecondSquareCentimeterInOneWattPerSquareMeter { get; } protected abstract double CentiwattsPerSquareMeterInOneWattPerSquareMeter { get; } protected abstract double DeciwattsPerSquareMeterInOneWattPerSquareMeter { get; } - protected abstract double KilocalPerHourSquareMeterInOneWattPerSquareMeter { get; } - protected abstract double KilocalPerSecondSquareCentimeterInOneWattPerSquareMeter { get; } + protected abstract double KilocaloriePerHourSquareMeterInOneWattPerSquareMeter { get; } + protected abstract double KilocaloriePerSecondSquareCentimeterInOneWattPerSquareMeter { get; } protected abstract double KilowattsPerSquareMeterInOneWattPerSquareMeter { get; } protected abstract double MicrowattsPerSquareMeterInOneWattPerSquareMeter { get; } protected abstract double MilliwattsPerSquareMeterInOneWattPerSquareMeter { get; } @@ -74,11 +74,11 @@ public abstract partial class HeatFluxTestsBase protected virtual double BtuPerMinuteSquareFootTolerance { get { return 1e-5; } } protected virtual double BtuPerSecondSquareFootTolerance { get { return 1e-5; } } protected virtual double BtuPerSecondSquareInchTolerance { get { return 1e-5; } } - protected virtual double CalPerSecondSquareCentimeterTolerance { get { return 1e-5; } } + protected virtual double CaloriePerSecondSquareCentimeterTolerance { get { return 1e-5; } } protected virtual double CentiwattsPerSquareMeterTolerance { get { return 1e-5; } } protected virtual double DeciwattsPerSquareMeterTolerance { get { return 1e-5; } } - protected virtual double KilocalPerHourSquareMeterTolerance { get { return 1e-5; } } - protected virtual double KilocalPerSecondSquareCentimeterTolerance { get { return 1e-5; } } + protected virtual double KilocaloriePerHourSquareMeterTolerance { get { return 1e-5; } } + protected virtual double KilocaloriePerSecondSquareCentimeterTolerance { get { return 1e-5; } } protected virtual double KilowattsPerSquareMeterTolerance { get { return 1e-5; } } protected virtual double MicrowattsPerSquareMeterTolerance { get { return 1e-5; } } protected virtual double MilliwattsPerSquareMeterTolerance { get { return 1e-5; } } @@ -96,11 +96,11 @@ public void WattPerSquareMeterToHeatFluxUnits() AssertEx.EqualTolerance(BtuPerMinuteSquareFootInOneWattPerSquareMeter, wattpersquaremeter.BtuPerMinuteSquareFoot, BtuPerMinuteSquareFootTolerance); AssertEx.EqualTolerance(BtuPerSecondSquareFootInOneWattPerSquareMeter, wattpersquaremeter.BtuPerSecondSquareFoot, BtuPerSecondSquareFootTolerance); AssertEx.EqualTolerance(BtuPerSecondSquareInchInOneWattPerSquareMeter, wattpersquaremeter.BtuPerSecondSquareInch, BtuPerSecondSquareInchTolerance); - AssertEx.EqualTolerance(CalPerSecondSquareCentimeterInOneWattPerSquareMeter, wattpersquaremeter.CalPerSecondSquareCentimeter, CalPerSecondSquareCentimeterTolerance); + AssertEx.EqualTolerance(CaloriePerSecondSquareCentimeterInOneWattPerSquareMeter, wattpersquaremeter.CaloriePerSecondSquareCentimeter, CaloriePerSecondSquareCentimeterTolerance); AssertEx.EqualTolerance(CentiwattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.CentiwattsPerSquareMeter, CentiwattsPerSquareMeterTolerance); AssertEx.EqualTolerance(DeciwattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.DeciwattsPerSquareMeter, DeciwattsPerSquareMeterTolerance); - AssertEx.EqualTolerance(KilocalPerHourSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.KilocalPerHourSquareMeter, KilocalPerHourSquareMeterTolerance); - AssertEx.EqualTolerance(KilocalPerSecondSquareCentimeterInOneWattPerSquareMeter, wattpersquaremeter.KilocalPerSecondSquareCentimeter, KilocalPerSecondSquareCentimeterTolerance); + AssertEx.EqualTolerance(KilocaloriePerHourSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.KilocaloriePerHourSquareMeter, KilocaloriePerHourSquareMeterTolerance); + AssertEx.EqualTolerance(KilocaloriePerSecondSquareCentimeterInOneWattPerSquareMeter, wattpersquaremeter.KilocaloriePerSecondSquareCentimeter, KilocaloriePerSecondSquareCentimeterTolerance); AssertEx.EqualTolerance(KilowattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.KilowattsPerSquareMeter, KilowattsPerSquareMeterTolerance); AssertEx.EqualTolerance(MicrowattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.MicrowattsPerSquareMeter, MicrowattsPerSquareMeterTolerance); AssertEx.EqualTolerance(MilliwattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.MilliwattsPerSquareMeter, MilliwattsPerSquareMeterTolerance); @@ -117,11 +117,11 @@ public void FromValueAndUnit() AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.BtuPerMinuteSquareFoot).BtuPerMinuteSquareFoot, BtuPerMinuteSquareFootTolerance); AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.BtuPerSecondSquareFoot).BtuPerSecondSquareFoot, BtuPerSecondSquareFootTolerance); AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.BtuPerSecondSquareInch).BtuPerSecondSquareInch, BtuPerSecondSquareInchTolerance); - AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.CalPerSecondSquareCentimeter).CalPerSecondSquareCentimeter, CalPerSecondSquareCentimeterTolerance); + AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.CaloriePerSecondSquareCentimeter).CaloriePerSecondSquareCentimeter, CaloriePerSecondSquareCentimeterTolerance); AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.CentiwattPerSquareMeter).CentiwattsPerSquareMeter, CentiwattsPerSquareMeterTolerance); AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.DeciwattPerSquareMeter).DeciwattsPerSquareMeter, DeciwattsPerSquareMeterTolerance); - AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.KilocalPerHourSquareMeter).KilocalPerHourSquareMeter, KilocalPerHourSquareMeterTolerance); - AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.KilocalPerSecondSquareCentimeter).KilocalPerSecondSquareCentimeter, KilocalPerSecondSquareCentimeterTolerance); + AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.KilocaloriePerHourSquareMeter).KilocaloriePerHourSquareMeter, KilocaloriePerHourSquareMeterTolerance); + AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.KilocaloriePerSecondSquareCentimeter).KilocaloriePerSecondSquareCentimeter, KilocaloriePerSecondSquareCentimeterTolerance); AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.KilowattPerSquareMeter).KilowattsPerSquareMeter, KilowattsPerSquareMeterTolerance); AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.MicrowattPerSquareMeter).MicrowattsPerSquareMeter, MicrowattsPerSquareMeterTolerance); AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.MilliwattPerSquareMeter).MilliwattsPerSquareMeter, MilliwattsPerSquareMeterTolerance); @@ -139,11 +139,11 @@ public void As() AssertEx.EqualTolerance(BtuPerMinuteSquareFootInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.BtuPerMinuteSquareFoot), BtuPerMinuteSquareFootTolerance); AssertEx.EqualTolerance(BtuPerSecondSquareFootInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.BtuPerSecondSquareFoot), BtuPerSecondSquareFootTolerance); AssertEx.EqualTolerance(BtuPerSecondSquareInchInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.BtuPerSecondSquareInch), BtuPerSecondSquareInchTolerance); - AssertEx.EqualTolerance(CalPerSecondSquareCentimeterInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.CalPerSecondSquareCentimeter), CalPerSecondSquareCentimeterTolerance); + AssertEx.EqualTolerance(CaloriePerSecondSquareCentimeterInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.CaloriePerSecondSquareCentimeter), CaloriePerSecondSquareCentimeterTolerance); AssertEx.EqualTolerance(CentiwattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.CentiwattPerSquareMeter), CentiwattsPerSquareMeterTolerance); AssertEx.EqualTolerance(DeciwattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.DeciwattPerSquareMeter), DeciwattsPerSquareMeterTolerance); - AssertEx.EqualTolerance(KilocalPerHourSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.KilocalPerHourSquareMeter), KilocalPerHourSquareMeterTolerance); - AssertEx.EqualTolerance(KilocalPerSecondSquareCentimeterInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.KilocalPerSecondSquareCentimeter), KilocalPerSecondSquareCentimeterTolerance); + AssertEx.EqualTolerance(KilocaloriePerHourSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.KilocaloriePerHourSquareMeter), KilocaloriePerHourSquareMeterTolerance); + AssertEx.EqualTolerance(KilocaloriePerSecondSquareCentimeterInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.KilocaloriePerSecondSquareCentimeter), KilocaloriePerSecondSquareCentimeterTolerance); AssertEx.EqualTolerance(KilowattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.KilowattPerSquareMeter), KilowattsPerSquareMeterTolerance); AssertEx.EqualTolerance(MicrowattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.MicrowattPerSquareMeter), MicrowattsPerSquareMeterTolerance); AssertEx.EqualTolerance(MilliwattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.MilliwattPerSquareMeter), MilliwattsPerSquareMeterTolerance); @@ -161,11 +161,11 @@ public void ConversionRoundTrip() AssertEx.EqualTolerance(1, HeatFlux.FromBtuPerMinuteSquareFoot(wattpersquaremeter.BtuPerMinuteSquareFoot).WattsPerSquareMeter, BtuPerMinuteSquareFootTolerance); AssertEx.EqualTolerance(1, HeatFlux.FromBtuPerSecondSquareFoot(wattpersquaremeter.BtuPerSecondSquareFoot).WattsPerSquareMeter, BtuPerSecondSquareFootTolerance); AssertEx.EqualTolerance(1, HeatFlux.FromBtuPerSecondSquareInch(wattpersquaremeter.BtuPerSecondSquareInch).WattsPerSquareMeter, BtuPerSecondSquareInchTolerance); - AssertEx.EqualTolerance(1, HeatFlux.FromCalPerSecondSquareCentimeter(wattpersquaremeter.CalPerSecondSquareCentimeter).WattsPerSquareMeter, CalPerSecondSquareCentimeterTolerance); + AssertEx.EqualTolerance(1, HeatFlux.FromCaloriePerSecondSquareCentimeter(wattpersquaremeter.CaloriePerSecondSquareCentimeter).WattsPerSquareMeter, CaloriePerSecondSquareCentimeterTolerance); AssertEx.EqualTolerance(1, HeatFlux.FromCentiwattsPerSquareMeter(wattpersquaremeter.CentiwattsPerSquareMeter).WattsPerSquareMeter, CentiwattsPerSquareMeterTolerance); AssertEx.EqualTolerance(1, HeatFlux.FromDeciwattsPerSquareMeter(wattpersquaremeter.DeciwattsPerSquareMeter).WattsPerSquareMeter, DeciwattsPerSquareMeterTolerance); - AssertEx.EqualTolerance(1, HeatFlux.FromKilocalPerHourSquareMeter(wattpersquaremeter.KilocalPerHourSquareMeter).WattsPerSquareMeter, KilocalPerHourSquareMeterTolerance); - AssertEx.EqualTolerance(1, HeatFlux.FromKilocalPerSecondSquareCentimeter(wattpersquaremeter.KilocalPerSecondSquareCentimeter).WattsPerSquareMeter, KilocalPerSecondSquareCentimeterTolerance); + AssertEx.EqualTolerance(1, HeatFlux.FromKilocaloriePerHourSquareMeter(wattpersquaremeter.KilocaloriePerHourSquareMeter).WattsPerSquareMeter, KilocaloriePerHourSquareMeterTolerance); + AssertEx.EqualTolerance(1, HeatFlux.FromKilocaloriePerSecondSquareCentimeter(wattpersquaremeter.KilocaloriePerSecondSquareCentimeter).WattsPerSquareMeter, KilocaloriePerSecondSquareCentimeterTolerance); AssertEx.EqualTolerance(1, HeatFlux.FromKilowattsPerSquareMeter(wattpersquaremeter.KilowattsPerSquareMeter).WattsPerSquareMeter, KilowattsPerSquareMeterTolerance); AssertEx.EqualTolerance(1, HeatFlux.FromMicrowattsPerSquareMeter(wattpersquaremeter.MicrowattsPerSquareMeter).WattsPerSquareMeter, MicrowattsPerSquareMeterTolerance); AssertEx.EqualTolerance(1, HeatFlux.FromMilliwattsPerSquareMeter(wattpersquaremeter.MilliwattsPerSquareMeter).WattsPerSquareMeter, MilliwattsPerSquareMeterTolerance); diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToHeatFluxExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToHeatFluxExtensions.g.cs index 5994d21869..cce37de1a8 100644 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToHeatFluxExtensions.g.cs +++ b/UnitsNet/GeneratedCode/Extensions/Number/NumberToHeatFluxExtensions.g.cs @@ -180,37 +180,37 @@ public static class NumberToHeatFluxExtensions #endregion - #region CalPerSecondSquareCentimeter + #region CaloriePerSecondSquareCentimeter - /// - public static HeatFlux CalPerSecondSquareCentimeter(this int value) => HeatFlux.FromCalPerSecondSquareCentimeter(value); + /// + public static HeatFlux CaloriePerSecondSquareCentimeter(this int value) => HeatFlux.FromCaloriePerSecondSquareCentimeter(value); - /// - public static HeatFlux? CalPerSecondSquareCentimeter(this int? value) => HeatFlux.FromCalPerSecondSquareCentimeter(value); + /// + public static HeatFlux? CaloriePerSecondSquareCentimeter(this int? value) => HeatFlux.FromCaloriePerSecondSquareCentimeter(value); - /// - public static HeatFlux CalPerSecondSquareCentimeter(this long value) => HeatFlux.FromCalPerSecondSquareCentimeter(value); + /// + public static HeatFlux CaloriePerSecondSquareCentimeter(this long value) => HeatFlux.FromCaloriePerSecondSquareCentimeter(value); - /// - public static HeatFlux? CalPerSecondSquareCentimeter(this long? value) => HeatFlux.FromCalPerSecondSquareCentimeter(value); + /// + public static HeatFlux? CaloriePerSecondSquareCentimeter(this long? value) => HeatFlux.FromCaloriePerSecondSquareCentimeter(value); - /// - public static HeatFlux CalPerSecondSquareCentimeter(this double value) => HeatFlux.FromCalPerSecondSquareCentimeter(value); + /// + public static HeatFlux CaloriePerSecondSquareCentimeter(this double value) => HeatFlux.FromCaloriePerSecondSquareCentimeter(value); - /// - public static HeatFlux? CalPerSecondSquareCentimeter(this double? value) => HeatFlux.FromCalPerSecondSquareCentimeter(value); + /// + public static HeatFlux? CaloriePerSecondSquareCentimeter(this double? value) => HeatFlux.FromCaloriePerSecondSquareCentimeter(value); - /// - public static HeatFlux CalPerSecondSquareCentimeter(this float value) => HeatFlux.FromCalPerSecondSquareCentimeter(value); + /// + public static HeatFlux CaloriePerSecondSquareCentimeter(this float value) => HeatFlux.FromCaloriePerSecondSquareCentimeter(value); - /// - public static HeatFlux? CalPerSecondSquareCentimeter(this float? value) => HeatFlux.FromCalPerSecondSquareCentimeter(value); + /// + public static HeatFlux? CaloriePerSecondSquareCentimeter(this float? value) => HeatFlux.FromCaloriePerSecondSquareCentimeter(value); - /// - public static HeatFlux CalPerSecondSquareCentimeter(this decimal value) => HeatFlux.FromCalPerSecondSquareCentimeter(Convert.ToDouble(value)); + /// + public static HeatFlux CaloriePerSecondSquareCentimeter(this decimal value) => HeatFlux.FromCaloriePerSecondSquareCentimeter(Convert.ToDouble(value)); - /// - public static HeatFlux? CalPerSecondSquareCentimeter(this decimal? value) => HeatFlux.FromCalPerSecondSquareCentimeter(value == null ? (double?)null : Convert.ToDouble(value.Value)); + /// + public static HeatFlux? CaloriePerSecondSquareCentimeter(this decimal? value) => HeatFlux.FromCaloriePerSecondSquareCentimeter(value == null ? (double?)null : Convert.ToDouble(value.Value)); #endregion @@ -282,71 +282,71 @@ public static class NumberToHeatFluxExtensions #endregion - #region KilocalPerHourSquareMeter + #region KilocaloriePerHourSquareMeter - /// - public static HeatFlux KilocalPerHourSquareMeter(this int value) => HeatFlux.FromKilocalPerHourSquareMeter(value); + /// + public static HeatFlux KilocaloriePerHourSquareMeter(this int value) => HeatFlux.FromKilocaloriePerHourSquareMeter(value); - /// - public static HeatFlux? KilocalPerHourSquareMeter(this int? value) => HeatFlux.FromKilocalPerHourSquareMeter(value); + /// + public static HeatFlux? KilocaloriePerHourSquareMeter(this int? value) => HeatFlux.FromKilocaloriePerHourSquareMeter(value); - /// - public static HeatFlux KilocalPerHourSquareMeter(this long value) => HeatFlux.FromKilocalPerHourSquareMeter(value); + /// + public static HeatFlux KilocaloriePerHourSquareMeter(this long value) => HeatFlux.FromKilocaloriePerHourSquareMeter(value); - /// - public static HeatFlux? KilocalPerHourSquareMeter(this long? value) => HeatFlux.FromKilocalPerHourSquareMeter(value); + /// + public static HeatFlux? KilocaloriePerHourSquareMeter(this long? value) => HeatFlux.FromKilocaloriePerHourSquareMeter(value); - /// - public static HeatFlux KilocalPerHourSquareMeter(this double value) => HeatFlux.FromKilocalPerHourSquareMeter(value); + /// + public static HeatFlux KilocaloriePerHourSquareMeter(this double value) => HeatFlux.FromKilocaloriePerHourSquareMeter(value); - /// - public static HeatFlux? KilocalPerHourSquareMeter(this double? value) => HeatFlux.FromKilocalPerHourSquareMeter(value); + /// + public static HeatFlux? KilocaloriePerHourSquareMeter(this double? value) => HeatFlux.FromKilocaloriePerHourSquareMeter(value); - /// - public static HeatFlux KilocalPerHourSquareMeter(this float value) => HeatFlux.FromKilocalPerHourSquareMeter(value); + /// + public static HeatFlux KilocaloriePerHourSquareMeter(this float value) => HeatFlux.FromKilocaloriePerHourSquareMeter(value); - /// - public static HeatFlux? KilocalPerHourSquareMeter(this float? value) => HeatFlux.FromKilocalPerHourSquareMeter(value); + /// + public static HeatFlux? KilocaloriePerHourSquareMeter(this float? value) => HeatFlux.FromKilocaloriePerHourSquareMeter(value); - /// - public static HeatFlux KilocalPerHourSquareMeter(this decimal value) => HeatFlux.FromKilocalPerHourSquareMeter(Convert.ToDouble(value)); + /// + public static HeatFlux KilocaloriePerHourSquareMeter(this decimal value) => HeatFlux.FromKilocaloriePerHourSquareMeter(Convert.ToDouble(value)); - /// - public static HeatFlux? KilocalPerHourSquareMeter(this decimal? value) => HeatFlux.FromKilocalPerHourSquareMeter(value == null ? (double?)null : Convert.ToDouble(value.Value)); + /// + public static HeatFlux? KilocaloriePerHourSquareMeter(this decimal? value) => HeatFlux.FromKilocaloriePerHourSquareMeter(value == null ? (double?)null : Convert.ToDouble(value.Value)); #endregion - #region KilocalPerSecondSquareCentimeter + #region KilocaloriePerSecondSquareCentimeter - /// - public static HeatFlux KilocalPerSecondSquareCentimeter(this int value) => HeatFlux.FromKilocalPerSecondSquareCentimeter(value); + /// + public static HeatFlux KilocaloriePerSecondSquareCentimeter(this int value) => HeatFlux.FromKilocaloriePerSecondSquareCentimeter(value); - /// - public static HeatFlux? KilocalPerSecondSquareCentimeter(this int? value) => HeatFlux.FromKilocalPerSecondSquareCentimeter(value); + /// + public static HeatFlux? KilocaloriePerSecondSquareCentimeter(this int? value) => HeatFlux.FromKilocaloriePerSecondSquareCentimeter(value); - /// - public static HeatFlux KilocalPerSecondSquareCentimeter(this long value) => HeatFlux.FromKilocalPerSecondSquareCentimeter(value); + /// + public static HeatFlux KilocaloriePerSecondSquareCentimeter(this long value) => HeatFlux.FromKilocaloriePerSecondSquareCentimeter(value); - /// - public static HeatFlux? KilocalPerSecondSquareCentimeter(this long? value) => HeatFlux.FromKilocalPerSecondSquareCentimeter(value); + /// + public static HeatFlux? KilocaloriePerSecondSquareCentimeter(this long? value) => HeatFlux.FromKilocaloriePerSecondSquareCentimeter(value); - /// - public static HeatFlux KilocalPerSecondSquareCentimeter(this double value) => HeatFlux.FromKilocalPerSecondSquareCentimeter(value); + /// + public static HeatFlux KilocaloriePerSecondSquareCentimeter(this double value) => HeatFlux.FromKilocaloriePerSecondSquareCentimeter(value); - /// - public static HeatFlux? KilocalPerSecondSquareCentimeter(this double? value) => HeatFlux.FromKilocalPerSecondSquareCentimeter(value); + /// + public static HeatFlux? KilocaloriePerSecondSquareCentimeter(this double? value) => HeatFlux.FromKilocaloriePerSecondSquareCentimeter(value); - /// - public static HeatFlux KilocalPerSecondSquareCentimeter(this float value) => HeatFlux.FromKilocalPerSecondSquareCentimeter(value); + /// + public static HeatFlux KilocaloriePerSecondSquareCentimeter(this float value) => HeatFlux.FromKilocaloriePerSecondSquareCentimeter(value); - /// - public static HeatFlux? KilocalPerSecondSquareCentimeter(this float? value) => HeatFlux.FromKilocalPerSecondSquareCentimeter(value); + /// + public static HeatFlux? KilocaloriePerSecondSquareCentimeter(this float? value) => HeatFlux.FromKilocaloriePerSecondSquareCentimeter(value); - /// - public static HeatFlux KilocalPerSecondSquareCentimeter(this decimal value) => HeatFlux.FromKilocalPerSecondSquareCentimeter(Convert.ToDouble(value)); + /// + public static HeatFlux KilocaloriePerSecondSquareCentimeter(this decimal value) => HeatFlux.FromKilocaloriePerSecondSquareCentimeter(Convert.ToDouble(value)); - /// - public static HeatFlux? KilocalPerSecondSquareCentimeter(this decimal? value) => HeatFlux.FromKilocalPerSecondSquareCentimeter(value == null ? (double?)null : Convert.ToDouble(value.Value)); + /// + public static HeatFlux? KilocaloriePerSecondSquareCentimeter(this decimal? value) => HeatFlux.FromKilocaloriePerSecondSquareCentimeter(value == null ? (double?)null : Convert.ToDouble(value.Value)); #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs index 48c587db98..27d65aadf8 100644 --- a/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs @@ -179,9 +179,9 @@ public HeatFlux(double wattspersquaremeter) /// public double BtuPerSecondSquareInch => As(HeatFluxUnit.BtuPerSecondSquareInch); /// - /// Get HeatFlux in CalPerSecondSquareCentimeter. + /// Get HeatFlux in CaloriePerSecondSquareCentimeter. /// - public double CalPerSecondSquareCentimeter => As(HeatFluxUnit.CalPerSecondSquareCentimeter); + public double CaloriePerSecondSquareCentimeter => As(HeatFluxUnit.CaloriePerSecondSquareCentimeter); /// /// Get HeatFlux in CentiwattsPerSquareMeter. /// @@ -191,13 +191,13 @@ public HeatFlux(double wattspersquaremeter) /// public double DeciwattsPerSquareMeter => As(HeatFluxUnit.DeciwattPerSquareMeter); /// - /// Get HeatFlux in KilocalPerHourSquareMeter. + /// Get HeatFlux in KilocaloriePerHourSquareMeter. /// - public double KilocalPerHourSquareMeter => As(HeatFluxUnit.KilocalPerHourSquareMeter); + public double KilocaloriePerHourSquareMeter => As(HeatFluxUnit.KilocaloriePerHourSquareMeter); /// - /// Get HeatFlux in KilocalPerSecondSquareCentimeter. + /// Get HeatFlux in KilocaloriePerSecondSquareCentimeter. /// - public double KilocalPerSecondSquareCentimeter => As(HeatFluxUnit.KilocalPerSecondSquareCentimeter); + public double KilocaloriePerSecondSquareCentimeter => As(HeatFluxUnit.KilocaloriePerSecondSquareCentimeter); /// /// Get HeatFlux in KilowattsPerSquareMeter. /// @@ -290,17 +290,17 @@ public static HeatFlux FromBtuPerSecondSquareInch(QuantityValue btupersecondsqua } /// - /// Get HeatFlux from CalPerSecondSquareCentimeter. + /// Get HeatFlux from CaloriePerSecondSquareCentimeter. /// #if WINDOWS_UWP [Windows.Foundation.Metadata.DefaultOverload] - public static HeatFlux FromCalPerSecondSquareCentimeter(double calpersecondsquarecentimeter) + public static HeatFlux FromCaloriePerSecondSquareCentimeter(double caloriepersecondsquarecentimeter) #else - public static HeatFlux FromCalPerSecondSquareCentimeter(QuantityValue calpersecondsquarecentimeter) + public static HeatFlux FromCaloriePerSecondSquareCentimeter(QuantityValue caloriepersecondsquarecentimeter) #endif { - double value = (double) calpersecondsquarecentimeter; - return new HeatFlux(value, HeatFluxUnit.CalPerSecondSquareCentimeter); + double value = (double) caloriepersecondsquarecentimeter; + return new HeatFlux(value, HeatFluxUnit.CaloriePerSecondSquareCentimeter); } /// @@ -332,31 +332,31 @@ public static HeatFlux FromDeciwattsPerSquareMeter(QuantityValue deciwattspersqu } /// - /// Get HeatFlux from KilocalPerHourSquareMeter. + /// Get HeatFlux from KilocaloriePerHourSquareMeter. /// #if WINDOWS_UWP [Windows.Foundation.Metadata.DefaultOverload] - public static HeatFlux FromKilocalPerHourSquareMeter(double kilocalperhoursquaremeter) + public static HeatFlux FromKilocaloriePerHourSquareMeter(double kilocalorieperhoursquaremeter) #else - public static HeatFlux FromKilocalPerHourSquareMeter(QuantityValue kilocalperhoursquaremeter) + public static HeatFlux FromKilocaloriePerHourSquareMeter(QuantityValue kilocalorieperhoursquaremeter) #endif { - double value = (double) kilocalperhoursquaremeter; - return new HeatFlux(value, HeatFluxUnit.KilocalPerHourSquareMeter); + double value = (double) kilocalorieperhoursquaremeter; + return new HeatFlux(value, HeatFluxUnit.KilocaloriePerHourSquareMeter); } /// - /// Get HeatFlux from KilocalPerSecondSquareCentimeter. + /// Get HeatFlux from KilocaloriePerSecondSquareCentimeter. /// #if WINDOWS_UWP [Windows.Foundation.Metadata.DefaultOverload] - public static HeatFlux FromKilocalPerSecondSquareCentimeter(double kilocalpersecondsquarecentimeter) + public static HeatFlux FromKilocaloriePerSecondSquareCentimeter(double kilocaloriepersecondsquarecentimeter) #else - public static HeatFlux FromKilocalPerSecondSquareCentimeter(QuantityValue kilocalpersecondsquarecentimeter) + public static HeatFlux FromKilocaloriePerSecondSquareCentimeter(QuantityValue kilocaloriepersecondsquarecentimeter) #endif { - double value = (double) kilocalpersecondsquarecentimeter; - return new HeatFlux(value, HeatFluxUnit.KilocalPerSecondSquareCentimeter); + double value = (double) kilocaloriepersecondsquarecentimeter; + return new HeatFlux(value, HeatFluxUnit.KilocaloriePerSecondSquareCentimeter); } /// @@ -520,13 +520,13 @@ public static HeatFlux FromWattsPerSquareMeter(QuantityValue wattspersquaremeter } /// - /// Get nullable HeatFlux from nullable CalPerSecondSquareCentimeter. + /// Get nullable HeatFlux from nullable CaloriePerSecondSquareCentimeter. /// - public static HeatFlux? FromCalPerSecondSquareCentimeter(QuantityValue? calpersecondsquarecentimeter) + public static HeatFlux? FromCaloriePerSecondSquareCentimeter(QuantityValue? caloriepersecondsquarecentimeter) { - if (calpersecondsquarecentimeter.HasValue) + if (caloriepersecondsquarecentimeter.HasValue) { - return FromCalPerSecondSquareCentimeter(calpersecondsquarecentimeter.Value); + return FromCaloriePerSecondSquareCentimeter(caloriepersecondsquarecentimeter.Value); } else { @@ -565,13 +565,13 @@ public static HeatFlux FromWattsPerSquareMeter(QuantityValue wattspersquaremeter } /// - /// Get nullable HeatFlux from nullable KilocalPerHourSquareMeter. + /// Get nullable HeatFlux from nullable KilocaloriePerHourSquareMeter. /// - public static HeatFlux? FromKilocalPerHourSquareMeter(QuantityValue? kilocalperhoursquaremeter) + public static HeatFlux? FromKilocaloriePerHourSquareMeter(QuantityValue? kilocalorieperhoursquaremeter) { - if (kilocalperhoursquaremeter.HasValue) + if (kilocalorieperhoursquaremeter.HasValue) { - return FromKilocalPerHourSquareMeter(kilocalperhoursquaremeter.Value); + return FromKilocaloriePerHourSquareMeter(kilocalorieperhoursquaremeter.Value); } else { @@ -580,13 +580,13 @@ public static HeatFlux FromWattsPerSquareMeter(QuantityValue wattspersquaremeter } /// - /// Get nullable HeatFlux from nullable KilocalPerSecondSquareCentimeter. + /// Get nullable HeatFlux from nullable KilocaloriePerSecondSquareCentimeter. /// - public static HeatFlux? FromKilocalPerSecondSquareCentimeter(QuantityValue? kilocalpersecondsquarecentimeter) + public static HeatFlux? FromKilocaloriePerSecondSquareCentimeter(QuantityValue? kilocaloriepersecondsquarecentimeter) { - if (kilocalpersecondsquarecentimeter.HasValue) + if (kilocaloriepersecondsquarecentimeter.HasValue) { - return FromKilocalPerSecondSquareCentimeter(kilocalpersecondsquarecentimeter.Value); + return FromKilocaloriePerSecondSquareCentimeter(kilocaloriepersecondsquarecentimeter.Value); } else { @@ -930,11 +930,11 @@ public double As(HeatFluxUnit unit) case HeatFluxUnit.BtuPerMinuteSquareFoot: return baseUnitValue/1.89275445e2; case HeatFluxUnit.BtuPerSecondSquareFoot: return baseUnitValue/1.13565267e4; case HeatFluxUnit.BtuPerSecondSquareInch: return baseUnitValue/1.63533984e6; - case HeatFluxUnit.CalPerSecondSquareCentimeter: return baseUnitValue/4.1840e4; + case HeatFluxUnit.CaloriePerSecondSquareCentimeter: return baseUnitValue/4.1868e4; case HeatFluxUnit.CentiwattPerSquareMeter: return (baseUnitValue) / 1e-2d; case HeatFluxUnit.DeciwattPerSquareMeter: return (baseUnitValue) / 1e-1d; - case HeatFluxUnit.KilocalPerHourSquareMeter: return baseUnitValue/1.16222222; - case HeatFluxUnit.KilocalPerSecondSquareCentimeter: return (baseUnitValue/4.1840e4) / 1e3d; + case HeatFluxUnit.KilocaloriePerHourSquareMeter: return baseUnitValue/1.163; + case HeatFluxUnit.KilocaloriePerSecondSquareCentimeter: return (baseUnitValue/4.1868e4) / 1e3d; case HeatFluxUnit.KilowattPerSquareMeter: return (baseUnitValue) / 1e3d; case HeatFluxUnit.MicrowattPerSquareMeter: return (baseUnitValue) / 1e-6d; case HeatFluxUnit.MilliwattPerSquareMeter: return (baseUnitValue) / 1e-3d; @@ -1309,11 +1309,11 @@ private double AsBaseUnitWattsPerSquareMeter() case HeatFluxUnit.BtuPerMinuteSquareFoot: return _value*1.89275445e2; case HeatFluxUnit.BtuPerSecondSquareFoot: return _value*1.13565267e4; case HeatFluxUnit.BtuPerSecondSquareInch: return _value*1.63533984e6; - case HeatFluxUnit.CalPerSecondSquareCentimeter: return _value*4.1840e4; + case HeatFluxUnit.CaloriePerSecondSquareCentimeter: return _value*4.1868e4; case HeatFluxUnit.CentiwattPerSquareMeter: return (_value) * 1e-2d; case HeatFluxUnit.DeciwattPerSquareMeter: return (_value) * 1e-1d; - case HeatFluxUnit.KilocalPerHourSquareMeter: return _value*1.16222222; - case HeatFluxUnit.KilocalPerSecondSquareCentimeter: return (_value*4.1840e4) * 1e3d; + case HeatFluxUnit.KilocaloriePerHourSquareMeter: return _value*1.163; + case HeatFluxUnit.KilocaloriePerSecondSquareCentimeter: return (_value*4.1868e4) * 1e3d; case HeatFluxUnit.KilowattPerSquareMeter: return (_value) * 1e3d; case HeatFluxUnit.MicrowattPerSquareMeter: return (_value) * 1e-6d; case HeatFluxUnit.MilliwattPerSquareMeter: return (_value) * 1e-3d; diff --git a/UnitsNet/GeneratedCode/UnitSystem.Default.g.cs b/UnitsNet/GeneratedCode/UnitSystem.Default.g.cs index 501a285ab6..06c9b46681 100644 --- a/UnitsNet/GeneratedCode/UnitSystem.Default.g.cs +++ b/UnitsNet/GeneratedCode/UnitSystem.Default.g.cs @@ -1737,7 +1737,7 @@ private static readonly ReadOnlyCollection DefaultLocalization new CulturesForEnumValue((int) HeatFluxUnit.BtuPerHourSquareFoot, new[] { - new AbbreviationsForCulture("en-US", "BTU/hr·ft²"), + new AbbreviationsForCulture("en-US", "BTU/h·ft²"), }), new CulturesForEnumValue((int) HeatFluxUnit.BtuPerMinuteSquareFoot, new[] @@ -1754,7 +1754,7 @@ private static readonly ReadOnlyCollection DefaultLocalization { new AbbreviationsForCulture("en-US", "BTU/s·in²"), }), - new CulturesForEnumValue((int) HeatFluxUnit.CalPerSecondSquareCentimeter, + new CulturesForEnumValue((int) HeatFluxUnit.CaloriePerSecondSquareCentimeter, new[] { new AbbreviationsForCulture("en-US", "cal/s·cm²"), @@ -1769,12 +1769,12 @@ private static readonly ReadOnlyCollection DefaultLocalization { new AbbreviationsForCulture("en-US", "dW/m²"), }), - new CulturesForEnumValue((int) HeatFluxUnit.KilocalPerHourSquareMeter, + new CulturesForEnumValue((int) HeatFluxUnit.KilocaloriePerHourSquareMeter, new[] { - new AbbreviationsForCulture("en-US", "kcal/hr·m²"), + new AbbreviationsForCulture("en-US", "kcal/h·m²"), }), - new CulturesForEnumValue((int) HeatFluxUnit.KilocalPerSecondSquareCentimeter, + new CulturesForEnumValue((int) HeatFluxUnit.KilocaloriePerSecondSquareCentimeter, new[] { new AbbreviationsForCulture("en-US", "kcal/s·cm²"), diff --git a/UnitsNet/GeneratedCode/Units/HeatFluxUnit.g.cs b/UnitsNet/GeneratedCode/Units/HeatFluxUnit.g.cs index b537948049..7c131c0664 100644 --- a/UnitsNet/GeneratedCode/Units/HeatFluxUnit.g.cs +++ b/UnitsNet/GeneratedCode/Units/HeatFluxUnit.g.cs @@ -46,11 +46,11 @@ public enum HeatFluxUnit BtuPerMinuteSquareFoot, BtuPerSecondSquareFoot, BtuPerSecondSquareInch, - CalPerSecondSquareCentimeter, + CaloriePerSecondSquareCentimeter, CentiwattPerSquareMeter, DeciwattPerSquareMeter, - KilocalPerHourSquareMeter, - KilocalPerSecondSquareCentimeter, + KilocaloriePerHourSquareMeter, + KilocaloriePerSecondSquareCentimeter, KilowattPerSquareMeter, MicrowattPerSquareMeter, MilliwattPerSquareMeter, diff --git a/UnitsNet/UnitDefinitions/HeatFlux.json b/UnitsNet/UnitDefinitions/HeatFlux.json index 2426cccfd1..276cd7f67b 100644 --- a/UnitsNet/UnitDefinitions/HeatFlux.json +++ b/UnitsNet/UnitDefinitions/HeatFlux.json @@ -84,15 +84,15 @@ "Localization": [ { "Culture": "en-US", - "Abbreviations": [ "BTU/hr·ft²" ] + "Abbreviations": [ "BTU/h·ft²" ] } ] }, { - "SingularName": "CalPerSecondSquareCentimeter", - "PluralName": "CalPerSecondSquareCentimeter", - "FromUnitToBaseFunc": "x*4.1840e4", - "FromBaseToUnitFunc": "x/4.1840e4", + "SingularName": "CaloriePerSecondSquareCentimeter", + "PluralName": "CaloriePerSecondSquareCentimeter", + "FromUnitToBaseFunc": "x*4.1868e4", + "FromBaseToUnitFunc": "x/4.1868e4", "Prefixes": [ "Kilo" ], "Localization": [ { @@ -102,14 +102,14 @@ ] }, { - "SingularName": "KilocalPerHourSquareMeter", - "PluralName": "KilocalPerHourSquareMeter", - "FromUnitToBaseFunc": "x*1.16222222", - "FromBaseToUnitFunc": "x/1.16222222", + "SingularName": "KilocaloriePerHourSquareMeter", + "PluralName": "KilocaloriePerHourSquareMeter", + "FromUnitToBaseFunc": "x*1.163", + "FromBaseToUnitFunc": "x/1.163", "Localization": [ { "Culture": "en-US", - "Abbreviations": [ "kcal/hr·m²" ] + "Abbreviations": [ "kcal/h·m²" ] } ] } From 596ea015d7f3df3b6e8e8b9950115d10e3468e5d Mon Sep 17 00:00:00 2001 From: Tristan Milnthorp Date: Tue, 24 Apr 2018 08:36:26 -0400 Subject: [PATCH 5/5] Fixing plural names --- UnitsNet.Tests/CustomCode/HeatFluxTests.cs | 18 +- .../GeneratedCode/HeatFluxTestsBase.g.cs | 108 +++--- .../Number/NumberToHeatFluxExtensions.g.cs | 360 +++++++++--------- .../GeneratedCode/Quantities/HeatFlux.g.cs | 180 ++++----- UnitsNet/UnitDefinitions/HeatFlux.json | 16 +- 5 files changed, 341 insertions(+), 341 deletions(-) diff --git a/UnitsNet.Tests/CustomCode/HeatFluxTests.cs b/UnitsNet.Tests/CustomCode/HeatFluxTests.cs index 1683a299cf..7b9a24687b 100644 --- a/UnitsNet.Tests/CustomCode/HeatFluxTests.cs +++ b/UnitsNet.Tests/CustomCode/HeatFluxTests.cs @@ -47,21 +47,21 @@ namespace UnitsNet.Tests.CustomCode { public class HeatFluxTests : HeatFluxTestsBase { - protected override double BtuPerHourSquareFootInOneWattPerSquareMeter => 3.16998331e-1; - protected override double BtuPerMinuteSquareFootInOneWattPerSquareMeter => 5.28330551e-3; - protected override double BtuPerSecondSquareFootInOneWattPerSquareMeter => 8.80550918e-5; - protected override double BtuPerSecondSquareInchInOneWattPerSquareMeter => 6.11493693e-7; - protected override double CaloriePerSecondSquareCentimeterInOneWattPerSquareMeter => 2.388458966e-5; + protected override double BtusPerHourSquareFootInOneWattPerSquareMeter => 3.16998331e-1; + protected override double BtusPerMinuteSquareFootInOneWattPerSquareMeter => 5.28330551e-3; + protected override double BtusPerSecondSquareFootInOneWattPerSquareMeter => 8.80550918e-5; + protected override double BtusPerSecondSquareInchInOneWattPerSquareMeter => 6.11493693e-7; + protected override double CaloriesPerSecondSquareCentimeterInOneWattPerSquareMeter => 2.388458966e-5; protected override double CentiwattsPerSquareMeterInOneWattPerSquareMeter => 1e2; protected override double DeciwattsPerSquareMeterInOneWattPerSquareMeter => 1e1; - protected override double KilocaloriePerSecondSquareCentimeterInOneWattPerSquareMeter => 2.388458966e-8; - protected override double KilocaloriePerHourSquareMeterInOneWattPerSquareMeter => 8.59845227859e-1; + protected override double KilocaloriesPerSecondSquareCentimeterInOneWattPerSquareMeter => 2.388458966e-8; + protected override double KilocaloriesPerHourSquareMeterInOneWattPerSquareMeter => 8.59845227859e-1; protected override double KilowattsPerSquareMeterInOneWattPerSquareMeter => 1e-3; protected override double MicrowattsPerSquareMeterInOneWattPerSquareMeter => 1e6; protected override double MilliwattsPerSquareMeterInOneWattPerSquareMeter => 1e3; protected override double NanowattsPerSquareMeterInOneWattPerSquareMeter => 1e9; - protected override double WattPerSquareFootInOneWattPerSquareMeter => 9.290304e-2; - protected override double WattPerSquareInchInOneWattPerSquareMeter => 6.4516e-4; + protected override double WattsPerSquareFootInOneWattPerSquareMeter => 9.290304e-2; + protected override double WattsPerSquareInchInOneWattPerSquareMeter => 6.4516e-4; protected override double WattsPerSquareMeterInOneWattPerSquareMeter => 1; [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/HeatFluxTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/HeatFluxTestsBase.g.cs index 823d3f6e8e..48efc387cf 100644 --- a/UnitsNet.Tests/GeneratedCode/HeatFluxTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/HeatFluxTestsBase.g.cs @@ -52,39 +52,39 @@ namespace UnitsNet.Tests // ReSharper disable once PartialTypeWithSinglePart public abstract partial class HeatFluxTestsBase { - protected abstract double BtuPerHourSquareFootInOneWattPerSquareMeter { get; } - protected abstract double BtuPerMinuteSquareFootInOneWattPerSquareMeter { get; } - protected abstract double BtuPerSecondSquareFootInOneWattPerSquareMeter { get; } - protected abstract double BtuPerSecondSquareInchInOneWattPerSquareMeter { get; } - protected abstract double CaloriePerSecondSquareCentimeterInOneWattPerSquareMeter { get; } + protected abstract double BtusPerHourSquareFootInOneWattPerSquareMeter { get; } + protected abstract double BtusPerMinuteSquareFootInOneWattPerSquareMeter { get; } + protected abstract double BtusPerSecondSquareFootInOneWattPerSquareMeter { get; } + protected abstract double BtusPerSecondSquareInchInOneWattPerSquareMeter { get; } + protected abstract double CaloriesPerSecondSquareCentimeterInOneWattPerSquareMeter { get; } protected abstract double CentiwattsPerSquareMeterInOneWattPerSquareMeter { get; } protected abstract double DeciwattsPerSquareMeterInOneWattPerSquareMeter { get; } - protected abstract double KilocaloriePerHourSquareMeterInOneWattPerSquareMeter { get; } - protected abstract double KilocaloriePerSecondSquareCentimeterInOneWattPerSquareMeter { get; } + protected abstract double KilocaloriesPerHourSquareMeterInOneWattPerSquareMeter { get; } + protected abstract double KilocaloriesPerSecondSquareCentimeterInOneWattPerSquareMeter { get; } protected abstract double KilowattsPerSquareMeterInOneWattPerSquareMeter { get; } protected abstract double MicrowattsPerSquareMeterInOneWattPerSquareMeter { get; } protected abstract double MilliwattsPerSquareMeterInOneWattPerSquareMeter { get; } protected abstract double NanowattsPerSquareMeterInOneWattPerSquareMeter { get; } - protected abstract double WattPerSquareFootInOneWattPerSquareMeter { get; } - protected abstract double WattPerSquareInchInOneWattPerSquareMeter { get; } + protected abstract double WattsPerSquareFootInOneWattPerSquareMeter { get; } + protected abstract double WattsPerSquareInchInOneWattPerSquareMeter { get; } protected abstract double WattsPerSquareMeterInOneWattPerSquareMeter { get; } // ReSharper disable VirtualMemberNeverOverriden.Global - protected virtual double BtuPerHourSquareFootTolerance { get { return 1e-5; } } - protected virtual double BtuPerMinuteSquareFootTolerance { get { return 1e-5; } } - protected virtual double BtuPerSecondSquareFootTolerance { get { return 1e-5; } } - protected virtual double BtuPerSecondSquareInchTolerance { get { return 1e-5; } } - protected virtual double CaloriePerSecondSquareCentimeterTolerance { get { return 1e-5; } } + protected virtual double BtusPerHourSquareFootTolerance { get { return 1e-5; } } + protected virtual double BtusPerMinuteSquareFootTolerance { get { return 1e-5; } } + protected virtual double BtusPerSecondSquareFootTolerance { get { return 1e-5; } } + protected virtual double BtusPerSecondSquareInchTolerance { get { return 1e-5; } } + protected virtual double CaloriesPerSecondSquareCentimeterTolerance { get { return 1e-5; } } protected virtual double CentiwattsPerSquareMeterTolerance { get { return 1e-5; } } protected virtual double DeciwattsPerSquareMeterTolerance { get { return 1e-5; } } - protected virtual double KilocaloriePerHourSquareMeterTolerance { get { return 1e-5; } } - protected virtual double KilocaloriePerSecondSquareCentimeterTolerance { get { return 1e-5; } } + protected virtual double KilocaloriesPerHourSquareMeterTolerance { get { return 1e-5; } } + protected virtual double KilocaloriesPerSecondSquareCentimeterTolerance { get { return 1e-5; } } protected virtual double KilowattsPerSquareMeterTolerance { get { return 1e-5; } } protected virtual double MicrowattsPerSquareMeterTolerance { get { return 1e-5; } } protected virtual double MilliwattsPerSquareMeterTolerance { get { return 1e-5; } } protected virtual double NanowattsPerSquareMeterTolerance { get { return 1e-5; } } - protected virtual double WattPerSquareFootTolerance { get { return 1e-5; } } - protected virtual double WattPerSquareInchTolerance { get { return 1e-5; } } + protected virtual double WattsPerSquareFootTolerance { get { return 1e-5; } } + protected virtual double WattsPerSquareInchTolerance { get { return 1e-5; } } protected virtual double WattsPerSquareMeterTolerance { get { return 1e-5; } } // ReSharper restore VirtualMemberNeverOverriden.Global @@ -92,42 +92,42 @@ public abstract partial class HeatFluxTestsBase public void WattPerSquareMeterToHeatFluxUnits() { HeatFlux wattpersquaremeter = HeatFlux.FromWattsPerSquareMeter(1); - AssertEx.EqualTolerance(BtuPerHourSquareFootInOneWattPerSquareMeter, wattpersquaremeter.BtuPerHourSquareFoot, BtuPerHourSquareFootTolerance); - AssertEx.EqualTolerance(BtuPerMinuteSquareFootInOneWattPerSquareMeter, wattpersquaremeter.BtuPerMinuteSquareFoot, BtuPerMinuteSquareFootTolerance); - AssertEx.EqualTolerance(BtuPerSecondSquareFootInOneWattPerSquareMeter, wattpersquaremeter.BtuPerSecondSquareFoot, BtuPerSecondSquareFootTolerance); - AssertEx.EqualTolerance(BtuPerSecondSquareInchInOneWattPerSquareMeter, wattpersquaremeter.BtuPerSecondSquareInch, BtuPerSecondSquareInchTolerance); - AssertEx.EqualTolerance(CaloriePerSecondSquareCentimeterInOneWattPerSquareMeter, wattpersquaremeter.CaloriePerSecondSquareCentimeter, CaloriePerSecondSquareCentimeterTolerance); + AssertEx.EqualTolerance(BtusPerHourSquareFootInOneWattPerSquareMeter, wattpersquaremeter.BtusPerHourSquareFoot, BtusPerHourSquareFootTolerance); + AssertEx.EqualTolerance(BtusPerMinuteSquareFootInOneWattPerSquareMeter, wattpersquaremeter.BtusPerMinuteSquareFoot, BtusPerMinuteSquareFootTolerance); + AssertEx.EqualTolerance(BtusPerSecondSquareFootInOneWattPerSquareMeter, wattpersquaremeter.BtusPerSecondSquareFoot, BtusPerSecondSquareFootTolerance); + AssertEx.EqualTolerance(BtusPerSecondSquareInchInOneWattPerSquareMeter, wattpersquaremeter.BtusPerSecondSquareInch, BtusPerSecondSquareInchTolerance); + AssertEx.EqualTolerance(CaloriesPerSecondSquareCentimeterInOneWattPerSquareMeter, wattpersquaremeter.CaloriesPerSecondSquareCentimeter, CaloriesPerSecondSquareCentimeterTolerance); AssertEx.EqualTolerance(CentiwattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.CentiwattsPerSquareMeter, CentiwattsPerSquareMeterTolerance); AssertEx.EqualTolerance(DeciwattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.DeciwattsPerSquareMeter, DeciwattsPerSquareMeterTolerance); - AssertEx.EqualTolerance(KilocaloriePerHourSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.KilocaloriePerHourSquareMeter, KilocaloriePerHourSquareMeterTolerance); - AssertEx.EqualTolerance(KilocaloriePerSecondSquareCentimeterInOneWattPerSquareMeter, wattpersquaremeter.KilocaloriePerSecondSquareCentimeter, KilocaloriePerSecondSquareCentimeterTolerance); + AssertEx.EqualTolerance(KilocaloriesPerHourSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.KilocaloriesPerHourSquareMeter, KilocaloriesPerHourSquareMeterTolerance); + AssertEx.EqualTolerance(KilocaloriesPerSecondSquareCentimeterInOneWattPerSquareMeter, wattpersquaremeter.KilocaloriesPerSecondSquareCentimeter, KilocaloriesPerSecondSquareCentimeterTolerance); AssertEx.EqualTolerance(KilowattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.KilowattsPerSquareMeter, KilowattsPerSquareMeterTolerance); AssertEx.EqualTolerance(MicrowattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.MicrowattsPerSquareMeter, MicrowattsPerSquareMeterTolerance); AssertEx.EqualTolerance(MilliwattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.MilliwattsPerSquareMeter, MilliwattsPerSquareMeterTolerance); AssertEx.EqualTolerance(NanowattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.NanowattsPerSquareMeter, NanowattsPerSquareMeterTolerance); - AssertEx.EqualTolerance(WattPerSquareFootInOneWattPerSquareMeter, wattpersquaremeter.WattPerSquareFoot, WattPerSquareFootTolerance); - AssertEx.EqualTolerance(WattPerSquareInchInOneWattPerSquareMeter, wattpersquaremeter.WattPerSquareInch, WattPerSquareInchTolerance); + AssertEx.EqualTolerance(WattsPerSquareFootInOneWattPerSquareMeter, wattpersquaremeter.WattsPerSquareFoot, WattsPerSquareFootTolerance); + AssertEx.EqualTolerance(WattsPerSquareInchInOneWattPerSquareMeter, wattpersquaremeter.WattsPerSquareInch, WattsPerSquareInchTolerance); AssertEx.EqualTolerance(WattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.WattsPerSquareMeter, WattsPerSquareMeterTolerance); } [Fact] public void FromValueAndUnit() { - AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.BtuPerHourSquareFoot).BtuPerHourSquareFoot, BtuPerHourSquareFootTolerance); - AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.BtuPerMinuteSquareFoot).BtuPerMinuteSquareFoot, BtuPerMinuteSquareFootTolerance); - AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.BtuPerSecondSquareFoot).BtuPerSecondSquareFoot, BtuPerSecondSquareFootTolerance); - AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.BtuPerSecondSquareInch).BtuPerSecondSquareInch, BtuPerSecondSquareInchTolerance); - AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.CaloriePerSecondSquareCentimeter).CaloriePerSecondSquareCentimeter, CaloriePerSecondSquareCentimeterTolerance); + AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.BtuPerHourSquareFoot).BtusPerHourSquareFoot, BtusPerHourSquareFootTolerance); + AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.BtuPerMinuteSquareFoot).BtusPerMinuteSquareFoot, BtusPerMinuteSquareFootTolerance); + AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.BtuPerSecondSquareFoot).BtusPerSecondSquareFoot, BtusPerSecondSquareFootTolerance); + AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.BtuPerSecondSquareInch).BtusPerSecondSquareInch, BtusPerSecondSquareInchTolerance); + AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.CaloriePerSecondSquareCentimeter).CaloriesPerSecondSquareCentimeter, CaloriesPerSecondSquareCentimeterTolerance); AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.CentiwattPerSquareMeter).CentiwattsPerSquareMeter, CentiwattsPerSquareMeterTolerance); AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.DeciwattPerSquareMeter).DeciwattsPerSquareMeter, DeciwattsPerSquareMeterTolerance); - AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.KilocaloriePerHourSquareMeter).KilocaloriePerHourSquareMeter, KilocaloriePerHourSquareMeterTolerance); - AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.KilocaloriePerSecondSquareCentimeter).KilocaloriePerSecondSquareCentimeter, KilocaloriePerSecondSquareCentimeterTolerance); + AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.KilocaloriePerHourSquareMeter).KilocaloriesPerHourSquareMeter, KilocaloriesPerHourSquareMeterTolerance); + AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.KilocaloriePerSecondSquareCentimeter).KilocaloriesPerSecondSquareCentimeter, KilocaloriesPerSecondSquareCentimeterTolerance); AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.KilowattPerSquareMeter).KilowattsPerSquareMeter, KilowattsPerSquareMeterTolerance); AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.MicrowattPerSquareMeter).MicrowattsPerSquareMeter, MicrowattsPerSquareMeterTolerance); AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.MilliwattPerSquareMeter).MilliwattsPerSquareMeter, MilliwattsPerSquareMeterTolerance); AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.NanowattPerSquareMeter).NanowattsPerSquareMeter, NanowattsPerSquareMeterTolerance); - AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.WattPerSquareFoot).WattPerSquareFoot, WattPerSquareFootTolerance); - AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.WattPerSquareInch).WattPerSquareInch, WattPerSquareInchTolerance); + AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.WattPerSquareFoot).WattsPerSquareFoot, WattsPerSquareFootTolerance); + AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.WattPerSquareInch).WattsPerSquareInch, WattsPerSquareInchTolerance); AssertEx.EqualTolerance(1, HeatFlux.From(1, HeatFluxUnit.WattPerSquareMeter).WattsPerSquareMeter, WattsPerSquareMeterTolerance); } @@ -135,21 +135,21 @@ public void FromValueAndUnit() public void As() { var wattpersquaremeter = HeatFlux.FromWattsPerSquareMeter(1); - AssertEx.EqualTolerance(BtuPerHourSquareFootInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.BtuPerHourSquareFoot), BtuPerHourSquareFootTolerance); - AssertEx.EqualTolerance(BtuPerMinuteSquareFootInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.BtuPerMinuteSquareFoot), BtuPerMinuteSquareFootTolerance); - AssertEx.EqualTolerance(BtuPerSecondSquareFootInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.BtuPerSecondSquareFoot), BtuPerSecondSquareFootTolerance); - AssertEx.EqualTolerance(BtuPerSecondSquareInchInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.BtuPerSecondSquareInch), BtuPerSecondSquareInchTolerance); - AssertEx.EqualTolerance(CaloriePerSecondSquareCentimeterInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.CaloriePerSecondSquareCentimeter), CaloriePerSecondSquareCentimeterTolerance); + AssertEx.EqualTolerance(BtusPerHourSquareFootInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.BtuPerHourSquareFoot), BtusPerHourSquareFootTolerance); + AssertEx.EqualTolerance(BtusPerMinuteSquareFootInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.BtuPerMinuteSquareFoot), BtusPerMinuteSquareFootTolerance); + AssertEx.EqualTolerance(BtusPerSecondSquareFootInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.BtuPerSecondSquareFoot), BtusPerSecondSquareFootTolerance); + AssertEx.EqualTolerance(BtusPerSecondSquareInchInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.BtuPerSecondSquareInch), BtusPerSecondSquareInchTolerance); + AssertEx.EqualTolerance(CaloriesPerSecondSquareCentimeterInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.CaloriePerSecondSquareCentimeter), CaloriesPerSecondSquareCentimeterTolerance); AssertEx.EqualTolerance(CentiwattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.CentiwattPerSquareMeter), CentiwattsPerSquareMeterTolerance); AssertEx.EqualTolerance(DeciwattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.DeciwattPerSquareMeter), DeciwattsPerSquareMeterTolerance); - AssertEx.EqualTolerance(KilocaloriePerHourSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.KilocaloriePerHourSquareMeter), KilocaloriePerHourSquareMeterTolerance); - AssertEx.EqualTolerance(KilocaloriePerSecondSquareCentimeterInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.KilocaloriePerSecondSquareCentimeter), KilocaloriePerSecondSquareCentimeterTolerance); + AssertEx.EqualTolerance(KilocaloriesPerHourSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.KilocaloriePerHourSquareMeter), KilocaloriesPerHourSquareMeterTolerance); + AssertEx.EqualTolerance(KilocaloriesPerSecondSquareCentimeterInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.KilocaloriePerSecondSquareCentimeter), KilocaloriesPerSecondSquareCentimeterTolerance); AssertEx.EqualTolerance(KilowattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.KilowattPerSquareMeter), KilowattsPerSquareMeterTolerance); AssertEx.EqualTolerance(MicrowattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.MicrowattPerSquareMeter), MicrowattsPerSquareMeterTolerance); AssertEx.EqualTolerance(MilliwattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.MilliwattPerSquareMeter), MilliwattsPerSquareMeterTolerance); AssertEx.EqualTolerance(NanowattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.NanowattPerSquareMeter), NanowattsPerSquareMeterTolerance); - AssertEx.EqualTolerance(WattPerSquareFootInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.WattPerSquareFoot), WattPerSquareFootTolerance); - AssertEx.EqualTolerance(WattPerSquareInchInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.WattPerSquareInch), WattPerSquareInchTolerance); + AssertEx.EqualTolerance(WattsPerSquareFootInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.WattPerSquareFoot), WattsPerSquareFootTolerance); + AssertEx.EqualTolerance(WattsPerSquareInchInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.WattPerSquareInch), WattsPerSquareInchTolerance); AssertEx.EqualTolerance(WattsPerSquareMeterInOneWattPerSquareMeter, wattpersquaremeter.As(HeatFluxUnit.WattPerSquareMeter), WattsPerSquareMeterTolerance); } @@ -157,21 +157,21 @@ public void As() public void ConversionRoundTrip() { HeatFlux wattpersquaremeter = HeatFlux.FromWattsPerSquareMeter(1); - AssertEx.EqualTolerance(1, HeatFlux.FromBtuPerHourSquareFoot(wattpersquaremeter.BtuPerHourSquareFoot).WattsPerSquareMeter, BtuPerHourSquareFootTolerance); - AssertEx.EqualTolerance(1, HeatFlux.FromBtuPerMinuteSquareFoot(wattpersquaremeter.BtuPerMinuteSquareFoot).WattsPerSquareMeter, BtuPerMinuteSquareFootTolerance); - AssertEx.EqualTolerance(1, HeatFlux.FromBtuPerSecondSquareFoot(wattpersquaremeter.BtuPerSecondSquareFoot).WattsPerSquareMeter, BtuPerSecondSquareFootTolerance); - AssertEx.EqualTolerance(1, HeatFlux.FromBtuPerSecondSquareInch(wattpersquaremeter.BtuPerSecondSquareInch).WattsPerSquareMeter, BtuPerSecondSquareInchTolerance); - AssertEx.EqualTolerance(1, HeatFlux.FromCaloriePerSecondSquareCentimeter(wattpersquaremeter.CaloriePerSecondSquareCentimeter).WattsPerSquareMeter, CaloriePerSecondSquareCentimeterTolerance); + AssertEx.EqualTolerance(1, HeatFlux.FromBtusPerHourSquareFoot(wattpersquaremeter.BtusPerHourSquareFoot).WattsPerSquareMeter, BtusPerHourSquareFootTolerance); + AssertEx.EqualTolerance(1, HeatFlux.FromBtusPerMinuteSquareFoot(wattpersquaremeter.BtusPerMinuteSquareFoot).WattsPerSquareMeter, BtusPerMinuteSquareFootTolerance); + AssertEx.EqualTolerance(1, HeatFlux.FromBtusPerSecondSquareFoot(wattpersquaremeter.BtusPerSecondSquareFoot).WattsPerSquareMeter, BtusPerSecondSquareFootTolerance); + AssertEx.EqualTolerance(1, HeatFlux.FromBtusPerSecondSquareInch(wattpersquaremeter.BtusPerSecondSquareInch).WattsPerSquareMeter, BtusPerSecondSquareInchTolerance); + AssertEx.EqualTolerance(1, HeatFlux.FromCaloriesPerSecondSquareCentimeter(wattpersquaremeter.CaloriesPerSecondSquareCentimeter).WattsPerSquareMeter, CaloriesPerSecondSquareCentimeterTolerance); AssertEx.EqualTolerance(1, HeatFlux.FromCentiwattsPerSquareMeter(wattpersquaremeter.CentiwattsPerSquareMeter).WattsPerSquareMeter, CentiwattsPerSquareMeterTolerance); AssertEx.EqualTolerance(1, HeatFlux.FromDeciwattsPerSquareMeter(wattpersquaremeter.DeciwattsPerSquareMeter).WattsPerSquareMeter, DeciwattsPerSquareMeterTolerance); - AssertEx.EqualTolerance(1, HeatFlux.FromKilocaloriePerHourSquareMeter(wattpersquaremeter.KilocaloriePerHourSquareMeter).WattsPerSquareMeter, KilocaloriePerHourSquareMeterTolerance); - AssertEx.EqualTolerance(1, HeatFlux.FromKilocaloriePerSecondSquareCentimeter(wattpersquaremeter.KilocaloriePerSecondSquareCentimeter).WattsPerSquareMeter, KilocaloriePerSecondSquareCentimeterTolerance); + AssertEx.EqualTolerance(1, HeatFlux.FromKilocaloriesPerHourSquareMeter(wattpersquaremeter.KilocaloriesPerHourSquareMeter).WattsPerSquareMeter, KilocaloriesPerHourSquareMeterTolerance); + AssertEx.EqualTolerance(1, HeatFlux.FromKilocaloriesPerSecondSquareCentimeter(wattpersquaremeter.KilocaloriesPerSecondSquareCentimeter).WattsPerSquareMeter, KilocaloriesPerSecondSquareCentimeterTolerance); AssertEx.EqualTolerance(1, HeatFlux.FromKilowattsPerSquareMeter(wattpersquaremeter.KilowattsPerSquareMeter).WattsPerSquareMeter, KilowattsPerSquareMeterTolerance); AssertEx.EqualTolerance(1, HeatFlux.FromMicrowattsPerSquareMeter(wattpersquaremeter.MicrowattsPerSquareMeter).WattsPerSquareMeter, MicrowattsPerSquareMeterTolerance); AssertEx.EqualTolerance(1, HeatFlux.FromMilliwattsPerSquareMeter(wattpersquaremeter.MilliwattsPerSquareMeter).WattsPerSquareMeter, MilliwattsPerSquareMeterTolerance); AssertEx.EqualTolerance(1, HeatFlux.FromNanowattsPerSquareMeter(wattpersquaremeter.NanowattsPerSquareMeter).WattsPerSquareMeter, NanowattsPerSquareMeterTolerance); - AssertEx.EqualTolerance(1, HeatFlux.FromWattPerSquareFoot(wattpersquaremeter.WattPerSquareFoot).WattsPerSquareMeter, WattPerSquareFootTolerance); - AssertEx.EqualTolerance(1, HeatFlux.FromWattPerSquareInch(wattpersquaremeter.WattPerSquareInch).WattsPerSquareMeter, WattPerSquareInchTolerance); + AssertEx.EqualTolerance(1, HeatFlux.FromWattsPerSquareFoot(wattpersquaremeter.WattsPerSquareFoot).WattsPerSquareMeter, WattsPerSquareFootTolerance); + AssertEx.EqualTolerance(1, HeatFlux.FromWattsPerSquareInch(wattpersquaremeter.WattsPerSquareInch).WattsPerSquareMeter, WattsPerSquareInchTolerance); AssertEx.EqualTolerance(1, HeatFlux.FromWattsPerSquareMeter(wattpersquaremeter.WattsPerSquareMeter).WattsPerSquareMeter, WattsPerSquareMeterTolerance); } diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToHeatFluxExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToHeatFluxExtensions.g.cs index cce37de1a8..c273a40e62 100644 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToHeatFluxExtensions.g.cs +++ b/UnitsNet/GeneratedCode/Extensions/Number/NumberToHeatFluxExtensions.g.cs @@ -46,171 +46,171 @@ public static class NumberToHeatFluxExtensions { #region BtuPerHourSquareFoot - /// - public static HeatFlux BtuPerHourSquareFoot(this int value) => HeatFlux.FromBtuPerHourSquareFoot(value); + /// + public static HeatFlux BtusPerHourSquareFoot(this int value) => HeatFlux.FromBtusPerHourSquareFoot(value); - /// - public static HeatFlux? BtuPerHourSquareFoot(this int? value) => HeatFlux.FromBtuPerHourSquareFoot(value); + /// + public static HeatFlux? BtusPerHourSquareFoot(this int? value) => HeatFlux.FromBtusPerHourSquareFoot(value); - /// - public static HeatFlux BtuPerHourSquareFoot(this long value) => HeatFlux.FromBtuPerHourSquareFoot(value); + /// + public static HeatFlux BtusPerHourSquareFoot(this long value) => HeatFlux.FromBtusPerHourSquareFoot(value); - /// - public static HeatFlux? BtuPerHourSquareFoot(this long? value) => HeatFlux.FromBtuPerHourSquareFoot(value); + /// + public static HeatFlux? BtusPerHourSquareFoot(this long? value) => HeatFlux.FromBtusPerHourSquareFoot(value); - /// - public static HeatFlux BtuPerHourSquareFoot(this double value) => HeatFlux.FromBtuPerHourSquareFoot(value); + /// + public static HeatFlux BtusPerHourSquareFoot(this double value) => HeatFlux.FromBtusPerHourSquareFoot(value); - /// - public static HeatFlux? BtuPerHourSquareFoot(this double? value) => HeatFlux.FromBtuPerHourSquareFoot(value); + /// + public static HeatFlux? BtusPerHourSquareFoot(this double? value) => HeatFlux.FromBtusPerHourSquareFoot(value); - /// - public static HeatFlux BtuPerHourSquareFoot(this float value) => HeatFlux.FromBtuPerHourSquareFoot(value); + /// + public static HeatFlux BtusPerHourSquareFoot(this float value) => HeatFlux.FromBtusPerHourSquareFoot(value); - /// - public static HeatFlux? BtuPerHourSquareFoot(this float? value) => HeatFlux.FromBtuPerHourSquareFoot(value); + /// + public static HeatFlux? BtusPerHourSquareFoot(this float? value) => HeatFlux.FromBtusPerHourSquareFoot(value); - /// - public static HeatFlux BtuPerHourSquareFoot(this decimal value) => HeatFlux.FromBtuPerHourSquareFoot(Convert.ToDouble(value)); + /// + public static HeatFlux BtusPerHourSquareFoot(this decimal value) => HeatFlux.FromBtusPerHourSquareFoot(Convert.ToDouble(value)); - /// - public static HeatFlux? BtuPerHourSquareFoot(this decimal? value) => HeatFlux.FromBtuPerHourSquareFoot(value == null ? (double?)null : Convert.ToDouble(value.Value)); + /// + public static HeatFlux? BtusPerHourSquareFoot(this decimal? value) => HeatFlux.FromBtusPerHourSquareFoot(value == null ? (double?)null : Convert.ToDouble(value.Value)); #endregion #region BtuPerMinuteSquareFoot - /// - public static HeatFlux BtuPerMinuteSquareFoot(this int value) => HeatFlux.FromBtuPerMinuteSquareFoot(value); + /// + public static HeatFlux BtusPerMinuteSquareFoot(this int value) => HeatFlux.FromBtusPerMinuteSquareFoot(value); - /// - public static HeatFlux? BtuPerMinuteSquareFoot(this int? value) => HeatFlux.FromBtuPerMinuteSquareFoot(value); + /// + public static HeatFlux? BtusPerMinuteSquareFoot(this int? value) => HeatFlux.FromBtusPerMinuteSquareFoot(value); - /// - public static HeatFlux BtuPerMinuteSquareFoot(this long value) => HeatFlux.FromBtuPerMinuteSquareFoot(value); + /// + public static HeatFlux BtusPerMinuteSquareFoot(this long value) => HeatFlux.FromBtusPerMinuteSquareFoot(value); - /// - public static HeatFlux? BtuPerMinuteSquareFoot(this long? value) => HeatFlux.FromBtuPerMinuteSquareFoot(value); + /// + public static HeatFlux? BtusPerMinuteSquareFoot(this long? value) => HeatFlux.FromBtusPerMinuteSquareFoot(value); - /// - public static HeatFlux BtuPerMinuteSquareFoot(this double value) => HeatFlux.FromBtuPerMinuteSquareFoot(value); + /// + public static HeatFlux BtusPerMinuteSquareFoot(this double value) => HeatFlux.FromBtusPerMinuteSquareFoot(value); - /// - public static HeatFlux? BtuPerMinuteSquareFoot(this double? value) => HeatFlux.FromBtuPerMinuteSquareFoot(value); + /// + public static HeatFlux? BtusPerMinuteSquareFoot(this double? value) => HeatFlux.FromBtusPerMinuteSquareFoot(value); - /// - public static HeatFlux BtuPerMinuteSquareFoot(this float value) => HeatFlux.FromBtuPerMinuteSquareFoot(value); + /// + public static HeatFlux BtusPerMinuteSquareFoot(this float value) => HeatFlux.FromBtusPerMinuteSquareFoot(value); - /// - public static HeatFlux? BtuPerMinuteSquareFoot(this float? value) => HeatFlux.FromBtuPerMinuteSquareFoot(value); + /// + public static HeatFlux? BtusPerMinuteSquareFoot(this float? value) => HeatFlux.FromBtusPerMinuteSquareFoot(value); - /// - public static HeatFlux BtuPerMinuteSquareFoot(this decimal value) => HeatFlux.FromBtuPerMinuteSquareFoot(Convert.ToDouble(value)); + /// + public static HeatFlux BtusPerMinuteSquareFoot(this decimal value) => HeatFlux.FromBtusPerMinuteSquareFoot(Convert.ToDouble(value)); - /// - public static HeatFlux? BtuPerMinuteSquareFoot(this decimal? value) => HeatFlux.FromBtuPerMinuteSquareFoot(value == null ? (double?)null : Convert.ToDouble(value.Value)); + /// + public static HeatFlux? BtusPerMinuteSquareFoot(this decimal? value) => HeatFlux.FromBtusPerMinuteSquareFoot(value == null ? (double?)null : Convert.ToDouble(value.Value)); #endregion #region BtuPerSecondSquareFoot - /// - public static HeatFlux BtuPerSecondSquareFoot(this int value) => HeatFlux.FromBtuPerSecondSquareFoot(value); + /// + public static HeatFlux BtusPerSecondSquareFoot(this int value) => HeatFlux.FromBtusPerSecondSquareFoot(value); - /// - public static HeatFlux? BtuPerSecondSquareFoot(this int? value) => HeatFlux.FromBtuPerSecondSquareFoot(value); + /// + public static HeatFlux? BtusPerSecondSquareFoot(this int? value) => HeatFlux.FromBtusPerSecondSquareFoot(value); - /// - public static HeatFlux BtuPerSecondSquareFoot(this long value) => HeatFlux.FromBtuPerSecondSquareFoot(value); + /// + public static HeatFlux BtusPerSecondSquareFoot(this long value) => HeatFlux.FromBtusPerSecondSquareFoot(value); - /// - public static HeatFlux? BtuPerSecondSquareFoot(this long? value) => HeatFlux.FromBtuPerSecondSquareFoot(value); + /// + public static HeatFlux? BtusPerSecondSquareFoot(this long? value) => HeatFlux.FromBtusPerSecondSquareFoot(value); - /// - public static HeatFlux BtuPerSecondSquareFoot(this double value) => HeatFlux.FromBtuPerSecondSquareFoot(value); + /// + public static HeatFlux BtusPerSecondSquareFoot(this double value) => HeatFlux.FromBtusPerSecondSquareFoot(value); - /// - public static HeatFlux? BtuPerSecondSquareFoot(this double? value) => HeatFlux.FromBtuPerSecondSquareFoot(value); + /// + public static HeatFlux? BtusPerSecondSquareFoot(this double? value) => HeatFlux.FromBtusPerSecondSquareFoot(value); - /// - public static HeatFlux BtuPerSecondSquareFoot(this float value) => HeatFlux.FromBtuPerSecondSquareFoot(value); + /// + public static HeatFlux BtusPerSecondSquareFoot(this float value) => HeatFlux.FromBtusPerSecondSquareFoot(value); - /// - public static HeatFlux? BtuPerSecondSquareFoot(this float? value) => HeatFlux.FromBtuPerSecondSquareFoot(value); + /// + public static HeatFlux? BtusPerSecondSquareFoot(this float? value) => HeatFlux.FromBtusPerSecondSquareFoot(value); - /// - public static HeatFlux BtuPerSecondSquareFoot(this decimal value) => HeatFlux.FromBtuPerSecondSquareFoot(Convert.ToDouble(value)); + /// + public static HeatFlux BtusPerSecondSquareFoot(this decimal value) => HeatFlux.FromBtusPerSecondSquareFoot(Convert.ToDouble(value)); - /// - public static HeatFlux? BtuPerSecondSquareFoot(this decimal? value) => HeatFlux.FromBtuPerSecondSquareFoot(value == null ? (double?)null : Convert.ToDouble(value.Value)); + /// + public static HeatFlux? BtusPerSecondSquareFoot(this decimal? value) => HeatFlux.FromBtusPerSecondSquareFoot(value == null ? (double?)null : Convert.ToDouble(value.Value)); #endregion #region BtuPerSecondSquareInch - /// - public static HeatFlux BtuPerSecondSquareInch(this int value) => HeatFlux.FromBtuPerSecondSquareInch(value); + /// + public static HeatFlux BtusPerSecondSquareInch(this int value) => HeatFlux.FromBtusPerSecondSquareInch(value); - /// - public static HeatFlux? BtuPerSecondSquareInch(this int? value) => HeatFlux.FromBtuPerSecondSquareInch(value); + /// + public static HeatFlux? BtusPerSecondSquareInch(this int? value) => HeatFlux.FromBtusPerSecondSquareInch(value); - /// - public static HeatFlux BtuPerSecondSquareInch(this long value) => HeatFlux.FromBtuPerSecondSquareInch(value); + /// + public static HeatFlux BtusPerSecondSquareInch(this long value) => HeatFlux.FromBtusPerSecondSquareInch(value); - /// - public static HeatFlux? BtuPerSecondSquareInch(this long? value) => HeatFlux.FromBtuPerSecondSquareInch(value); + /// + public static HeatFlux? BtusPerSecondSquareInch(this long? value) => HeatFlux.FromBtusPerSecondSquareInch(value); - /// - public static HeatFlux BtuPerSecondSquareInch(this double value) => HeatFlux.FromBtuPerSecondSquareInch(value); + /// + public static HeatFlux BtusPerSecondSquareInch(this double value) => HeatFlux.FromBtusPerSecondSquareInch(value); - /// - public static HeatFlux? BtuPerSecondSquareInch(this double? value) => HeatFlux.FromBtuPerSecondSquareInch(value); + /// + public static HeatFlux? BtusPerSecondSquareInch(this double? value) => HeatFlux.FromBtusPerSecondSquareInch(value); - /// - public static HeatFlux BtuPerSecondSquareInch(this float value) => HeatFlux.FromBtuPerSecondSquareInch(value); + /// + public static HeatFlux BtusPerSecondSquareInch(this float value) => HeatFlux.FromBtusPerSecondSquareInch(value); - /// - public static HeatFlux? BtuPerSecondSquareInch(this float? value) => HeatFlux.FromBtuPerSecondSquareInch(value); + /// + public static HeatFlux? BtusPerSecondSquareInch(this float? value) => HeatFlux.FromBtusPerSecondSquareInch(value); - /// - public static HeatFlux BtuPerSecondSquareInch(this decimal value) => HeatFlux.FromBtuPerSecondSquareInch(Convert.ToDouble(value)); + /// + public static HeatFlux BtusPerSecondSquareInch(this decimal value) => HeatFlux.FromBtusPerSecondSquareInch(Convert.ToDouble(value)); - /// - public static HeatFlux? BtuPerSecondSquareInch(this decimal? value) => HeatFlux.FromBtuPerSecondSquareInch(value == null ? (double?)null : Convert.ToDouble(value.Value)); + /// + public static HeatFlux? BtusPerSecondSquareInch(this decimal? value) => HeatFlux.FromBtusPerSecondSquareInch(value == null ? (double?)null : Convert.ToDouble(value.Value)); #endregion #region CaloriePerSecondSquareCentimeter - /// - public static HeatFlux CaloriePerSecondSquareCentimeter(this int value) => HeatFlux.FromCaloriePerSecondSquareCentimeter(value); + /// + public static HeatFlux CaloriesPerSecondSquareCentimeter(this int value) => HeatFlux.FromCaloriesPerSecondSquareCentimeter(value); - /// - public static HeatFlux? CaloriePerSecondSquareCentimeter(this int? value) => HeatFlux.FromCaloriePerSecondSquareCentimeter(value); + /// + public static HeatFlux? CaloriesPerSecondSquareCentimeter(this int? value) => HeatFlux.FromCaloriesPerSecondSquareCentimeter(value); - /// - public static HeatFlux CaloriePerSecondSquareCentimeter(this long value) => HeatFlux.FromCaloriePerSecondSquareCentimeter(value); + /// + public static HeatFlux CaloriesPerSecondSquareCentimeter(this long value) => HeatFlux.FromCaloriesPerSecondSquareCentimeter(value); - /// - public static HeatFlux? CaloriePerSecondSquareCentimeter(this long? value) => HeatFlux.FromCaloriePerSecondSquareCentimeter(value); + /// + public static HeatFlux? CaloriesPerSecondSquareCentimeter(this long? value) => HeatFlux.FromCaloriesPerSecondSquareCentimeter(value); - /// - public static HeatFlux CaloriePerSecondSquareCentimeter(this double value) => HeatFlux.FromCaloriePerSecondSquareCentimeter(value); + /// + public static HeatFlux CaloriesPerSecondSquareCentimeter(this double value) => HeatFlux.FromCaloriesPerSecondSquareCentimeter(value); - /// - public static HeatFlux? CaloriePerSecondSquareCentimeter(this double? value) => HeatFlux.FromCaloriePerSecondSquareCentimeter(value); + /// + public static HeatFlux? CaloriesPerSecondSquareCentimeter(this double? value) => HeatFlux.FromCaloriesPerSecondSquareCentimeter(value); - /// - public static HeatFlux CaloriePerSecondSquareCentimeter(this float value) => HeatFlux.FromCaloriePerSecondSquareCentimeter(value); + /// + public static HeatFlux CaloriesPerSecondSquareCentimeter(this float value) => HeatFlux.FromCaloriesPerSecondSquareCentimeter(value); - /// - public static HeatFlux? CaloriePerSecondSquareCentimeter(this float? value) => HeatFlux.FromCaloriePerSecondSquareCentimeter(value); + /// + public static HeatFlux? CaloriesPerSecondSquareCentimeter(this float? value) => HeatFlux.FromCaloriesPerSecondSquareCentimeter(value); - /// - public static HeatFlux CaloriePerSecondSquareCentimeter(this decimal value) => HeatFlux.FromCaloriePerSecondSquareCentimeter(Convert.ToDouble(value)); + /// + public static HeatFlux CaloriesPerSecondSquareCentimeter(this decimal value) => HeatFlux.FromCaloriesPerSecondSquareCentimeter(Convert.ToDouble(value)); - /// - public static HeatFlux? CaloriePerSecondSquareCentimeter(this decimal? value) => HeatFlux.FromCaloriePerSecondSquareCentimeter(value == null ? (double?)null : Convert.ToDouble(value.Value)); + /// + public static HeatFlux? CaloriesPerSecondSquareCentimeter(this decimal? value) => HeatFlux.FromCaloriesPerSecondSquareCentimeter(value == null ? (double?)null : Convert.ToDouble(value.Value)); #endregion @@ -284,69 +284,69 @@ public static class NumberToHeatFluxExtensions #region KilocaloriePerHourSquareMeter - /// - public static HeatFlux KilocaloriePerHourSquareMeter(this int value) => HeatFlux.FromKilocaloriePerHourSquareMeter(value); + /// + public static HeatFlux KilocaloriesPerHourSquareMeter(this int value) => HeatFlux.FromKilocaloriesPerHourSquareMeter(value); - /// - public static HeatFlux? KilocaloriePerHourSquareMeter(this int? value) => HeatFlux.FromKilocaloriePerHourSquareMeter(value); + /// + public static HeatFlux? KilocaloriesPerHourSquareMeter(this int? value) => HeatFlux.FromKilocaloriesPerHourSquareMeter(value); - /// - public static HeatFlux KilocaloriePerHourSquareMeter(this long value) => HeatFlux.FromKilocaloriePerHourSquareMeter(value); + /// + public static HeatFlux KilocaloriesPerHourSquareMeter(this long value) => HeatFlux.FromKilocaloriesPerHourSquareMeter(value); - /// - public static HeatFlux? KilocaloriePerHourSquareMeter(this long? value) => HeatFlux.FromKilocaloriePerHourSquareMeter(value); + /// + public static HeatFlux? KilocaloriesPerHourSquareMeter(this long? value) => HeatFlux.FromKilocaloriesPerHourSquareMeter(value); - /// - public static HeatFlux KilocaloriePerHourSquareMeter(this double value) => HeatFlux.FromKilocaloriePerHourSquareMeter(value); + /// + public static HeatFlux KilocaloriesPerHourSquareMeter(this double value) => HeatFlux.FromKilocaloriesPerHourSquareMeter(value); - /// - public static HeatFlux? KilocaloriePerHourSquareMeter(this double? value) => HeatFlux.FromKilocaloriePerHourSquareMeter(value); + /// + public static HeatFlux? KilocaloriesPerHourSquareMeter(this double? value) => HeatFlux.FromKilocaloriesPerHourSquareMeter(value); - /// - public static HeatFlux KilocaloriePerHourSquareMeter(this float value) => HeatFlux.FromKilocaloriePerHourSquareMeter(value); + /// + public static HeatFlux KilocaloriesPerHourSquareMeter(this float value) => HeatFlux.FromKilocaloriesPerHourSquareMeter(value); - /// - public static HeatFlux? KilocaloriePerHourSquareMeter(this float? value) => HeatFlux.FromKilocaloriePerHourSquareMeter(value); + /// + public static HeatFlux? KilocaloriesPerHourSquareMeter(this float? value) => HeatFlux.FromKilocaloriesPerHourSquareMeter(value); - /// - public static HeatFlux KilocaloriePerHourSquareMeter(this decimal value) => HeatFlux.FromKilocaloriePerHourSquareMeter(Convert.ToDouble(value)); + /// + public static HeatFlux KilocaloriesPerHourSquareMeter(this decimal value) => HeatFlux.FromKilocaloriesPerHourSquareMeter(Convert.ToDouble(value)); - /// - public static HeatFlux? KilocaloriePerHourSquareMeter(this decimal? value) => HeatFlux.FromKilocaloriePerHourSquareMeter(value == null ? (double?)null : Convert.ToDouble(value.Value)); + /// + public static HeatFlux? KilocaloriesPerHourSquareMeter(this decimal? value) => HeatFlux.FromKilocaloriesPerHourSquareMeter(value == null ? (double?)null : Convert.ToDouble(value.Value)); #endregion #region KilocaloriePerSecondSquareCentimeter - /// - public static HeatFlux KilocaloriePerSecondSquareCentimeter(this int value) => HeatFlux.FromKilocaloriePerSecondSquareCentimeter(value); + /// + public static HeatFlux KilocaloriesPerSecondSquareCentimeter(this int value) => HeatFlux.FromKilocaloriesPerSecondSquareCentimeter(value); - /// - public static HeatFlux? KilocaloriePerSecondSquareCentimeter(this int? value) => HeatFlux.FromKilocaloriePerSecondSquareCentimeter(value); + /// + public static HeatFlux? KilocaloriesPerSecondSquareCentimeter(this int? value) => HeatFlux.FromKilocaloriesPerSecondSquareCentimeter(value); - /// - public static HeatFlux KilocaloriePerSecondSquareCentimeter(this long value) => HeatFlux.FromKilocaloriePerSecondSquareCentimeter(value); + /// + public static HeatFlux KilocaloriesPerSecondSquareCentimeter(this long value) => HeatFlux.FromKilocaloriesPerSecondSquareCentimeter(value); - /// - public static HeatFlux? KilocaloriePerSecondSquareCentimeter(this long? value) => HeatFlux.FromKilocaloriePerSecondSquareCentimeter(value); + /// + public static HeatFlux? KilocaloriesPerSecondSquareCentimeter(this long? value) => HeatFlux.FromKilocaloriesPerSecondSquareCentimeter(value); - /// - public static HeatFlux KilocaloriePerSecondSquareCentimeter(this double value) => HeatFlux.FromKilocaloriePerSecondSquareCentimeter(value); + /// + public static HeatFlux KilocaloriesPerSecondSquareCentimeter(this double value) => HeatFlux.FromKilocaloriesPerSecondSquareCentimeter(value); - /// - public static HeatFlux? KilocaloriePerSecondSquareCentimeter(this double? value) => HeatFlux.FromKilocaloriePerSecondSquareCentimeter(value); + /// + public static HeatFlux? KilocaloriesPerSecondSquareCentimeter(this double? value) => HeatFlux.FromKilocaloriesPerSecondSquareCentimeter(value); - /// - public static HeatFlux KilocaloriePerSecondSquareCentimeter(this float value) => HeatFlux.FromKilocaloriePerSecondSquareCentimeter(value); + /// + public static HeatFlux KilocaloriesPerSecondSquareCentimeter(this float value) => HeatFlux.FromKilocaloriesPerSecondSquareCentimeter(value); - /// - public static HeatFlux? KilocaloriePerSecondSquareCentimeter(this float? value) => HeatFlux.FromKilocaloriePerSecondSquareCentimeter(value); + /// + public static HeatFlux? KilocaloriesPerSecondSquareCentimeter(this float? value) => HeatFlux.FromKilocaloriesPerSecondSquareCentimeter(value); - /// - public static HeatFlux KilocaloriePerSecondSquareCentimeter(this decimal value) => HeatFlux.FromKilocaloriePerSecondSquareCentimeter(Convert.ToDouble(value)); + /// + public static HeatFlux KilocaloriesPerSecondSquareCentimeter(this decimal value) => HeatFlux.FromKilocaloriesPerSecondSquareCentimeter(Convert.ToDouble(value)); - /// - public static HeatFlux? KilocaloriePerSecondSquareCentimeter(this decimal? value) => HeatFlux.FromKilocaloriePerSecondSquareCentimeter(value == null ? (double?)null : Convert.ToDouble(value.Value)); + /// + public static HeatFlux? KilocaloriesPerSecondSquareCentimeter(this decimal? value) => HeatFlux.FromKilocaloriesPerSecondSquareCentimeter(value == null ? (double?)null : Convert.ToDouble(value.Value)); #endregion @@ -488,69 +488,69 @@ public static class NumberToHeatFluxExtensions #region WattPerSquareFoot - /// - public static HeatFlux WattPerSquareFoot(this int value) => HeatFlux.FromWattPerSquareFoot(value); + /// + public static HeatFlux WattsPerSquareFoot(this int value) => HeatFlux.FromWattsPerSquareFoot(value); - /// - public static HeatFlux? WattPerSquareFoot(this int? value) => HeatFlux.FromWattPerSquareFoot(value); + /// + public static HeatFlux? WattsPerSquareFoot(this int? value) => HeatFlux.FromWattsPerSquareFoot(value); - /// - public static HeatFlux WattPerSquareFoot(this long value) => HeatFlux.FromWattPerSquareFoot(value); + /// + public static HeatFlux WattsPerSquareFoot(this long value) => HeatFlux.FromWattsPerSquareFoot(value); - /// - public static HeatFlux? WattPerSquareFoot(this long? value) => HeatFlux.FromWattPerSquareFoot(value); + /// + public static HeatFlux? WattsPerSquareFoot(this long? value) => HeatFlux.FromWattsPerSquareFoot(value); - /// - public static HeatFlux WattPerSquareFoot(this double value) => HeatFlux.FromWattPerSquareFoot(value); + /// + public static HeatFlux WattsPerSquareFoot(this double value) => HeatFlux.FromWattsPerSquareFoot(value); - /// - public static HeatFlux? WattPerSquareFoot(this double? value) => HeatFlux.FromWattPerSquareFoot(value); + /// + public static HeatFlux? WattsPerSquareFoot(this double? value) => HeatFlux.FromWattsPerSquareFoot(value); - /// - public static HeatFlux WattPerSquareFoot(this float value) => HeatFlux.FromWattPerSquareFoot(value); + /// + public static HeatFlux WattsPerSquareFoot(this float value) => HeatFlux.FromWattsPerSquareFoot(value); - /// - public static HeatFlux? WattPerSquareFoot(this float? value) => HeatFlux.FromWattPerSquareFoot(value); + /// + public static HeatFlux? WattsPerSquareFoot(this float? value) => HeatFlux.FromWattsPerSquareFoot(value); - /// - public static HeatFlux WattPerSquareFoot(this decimal value) => HeatFlux.FromWattPerSquareFoot(Convert.ToDouble(value)); + /// + public static HeatFlux WattsPerSquareFoot(this decimal value) => HeatFlux.FromWattsPerSquareFoot(Convert.ToDouble(value)); - /// - public static HeatFlux? WattPerSquareFoot(this decimal? value) => HeatFlux.FromWattPerSquareFoot(value == null ? (double?)null : Convert.ToDouble(value.Value)); + /// + public static HeatFlux? WattsPerSquareFoot(this decimal? value) => HeatFlux.FromWattsPerSquareFoot(value == null ? (double?)null : Convert.ToDouble(value.Value)); #endregion #region WattPerSquareInch - /// - public static HeatFlux WattPerSquareInch(this int value) => HeatFlux.FromWattPerSquareInch(value); + /// + public static HeatFlux WattsPerSquareInch(this int value) => HeatFlux.FromWattsPerSquareInch(value); - /// - public static HeatFlux? WattPerSquareInch(this int? value) => HeatFlux.FromWattPerSquareInch(value); + /// + public static HeatFlux? WattsPerSquareInch(this int? value) => HeatFlux.FromWattsPerSquareInch(value); - /// - public static HeatFlux WattPerSquareInch(this long value) => HeatFlux.FromWattPerSquareInch(value); + /// + public static HeatFlux WattsPerSquareInch(this long value) => HeatFlux.FromWattsPerSquareInch(value); - /// - public static HeatFlux? WattPerSquareInch(this long? value) => HeatFlux.FromWattPerSquareInch(value); + /// + public static HeatFlux? WattsPerSquareInch(this long? value) => HeatFlux.FromWattsPerSquareInch(value); - /// - public static HeatFlux WattPerSquareInch(this double value) => HeatFlux.FromWattPerSquareInch(value); + /// + public static HeatFlux WattsPerSquareInch(this double value) => HeatFlux.FromWattsPerSquareInch(value); - /// - public static HeatFlux? WattPerSquareInch(this double? value) => HeatFlux.FromWattPerSquareInch(value); + /// + public static HeatFlux? WattsPerSquareInch(this double? value) => HeatFlux.FromWattsPerSquareInch(value); - /// - public static HeatFlux WattPerSquareInch(this float value) => HeatFlux.FromWattPerSquareInch(value); + /// + public static HeatFlux WattsPerSquareInch(this float value) => HeatFlux.FromWattsPerSquareInch(value); - /// - public static HeatFlux? WattPerSquareInch(this float? value) => HeatFlux.FromWattPerSquareInch(value); + /// + public static HeatFlux? WattsPerSquareInch(this float? value) => HeatFlux.FromWattsPerSquareInch(value); - /// - public static HeatFlux WattPerSquareInch(this decimal value) => HeatFlux.FromWattPerSquareInch(Convert.ToDouble(value)); + /// + public static HeatFlux WattsPerSquareInch(this decimal value) => HeatFlux.FromWattsPerSquareInch(Convert.ToDouble(value)); - /// - public static HeatFlux? WattPerSquareInch(this decimal? value) => HeatFlux.FromWattPerSquareInch(value == null ? (double?)null : Convert.ToDouble(value.Value)); + /// + public static HeatFlux? WattsPerSquareInch(this decimal? value) => HeatFlux.FromWattsPerSquareInch(value == null ? (double?)null : Convert.ToDouble(value.Value)); #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs index 27d65aadf8..07d4788874 100644 --- a/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs @@ -163,25 +163,25 @@ public HeatFlux(double wattspersquaremeter) /// public static HeatFluxUnit[] Units { get; } = Enum.GetValues(typeof(HeatFluxUnit)).Cast().ToArray(); /// - /// Get HeatFlux in BtuPerHourSquareFoot. + /// Get HeatFlux in BtusPerHourSquareFoot. /// - public double BtuPerHourSquareFoot => As(HeatFluxUnit.BtuPerHourSquareFoot); + public double BtusPerHourSquareFoot => As(HeatFluxUnit.BtuPerHourSquareFoot); /// - /// Get HeatFlux in BtuPerMinuteSquareFoot. + /// Get HeatFlux in BtusPerMinuteSquareFoot. /// - public double BtuPerMinuteSquareFoot => As(HeatFluxUnit.BtuPerMinuteSquareFoot); + public double BtusPerMinuteSquareFoot => As(HeatFluxUnit.BtuPerMinuteSquareFoot); /// - /// Get HeatFlux in BtuPerSecondSquareFoot. + /// Get HeatFlux in BtusPerSecondSquareFoot. /// - public double BtuPerSecondSquareFoot => As(HeatFluxUnit.BtuPerSecondSquareFoot); + public double BtusPerSecondSquareFoot => As(HeatFluxUnit.BtuPerSecondSquareFoot); /// - /// Get HeatFlux in BtuPerSecondSquareInch. + /// Get HeatFlux in BtusPerSecondSquareInch. /// - public double BtuPerSecondSquareInch => As(HeatFluxUnit.BtuPerSecondSquareInch); + public double BtusPerSecondSquareInch => As(HeatFluxUnit.BtuPerSecondSquareInch); /// - /// Get HeatFlux in CaloriePerSecondSquareCentimeter. + /// Get HeatFlux in CaloriesPerSecondSquareCentimeter. /// - public double CaloriePerSecondSquareCentimeter => As(HeatFluxUnit.CaloriePerSecondSquareCentimeter); + public double CaloriesPerSecondSquareCentimeter => As(HeatFluxUnit.CaloriePerSecondSquareCentimeter); /// /// Get HeatFlux in CentiwattsPerSquareMeter. /// @@ -191,13 +191,13 @@ public HeatFlux(double wattspersquaremeter) /// public double DeciwattsPerSquareMeter => As(HeatFluxUnit.DeciwattPerSquareMeter); /// - /// Get HeatFlux in KilocaloriePerHourSquareMeter. + /// Get HeatFlux in KilocaloriesPerHourSquareMeter. /// - public double KilocaloriePerHourSquareMeter => As(HeatFluxUnit.KilocaloriePerHourSquareMeter); + public double KilocaloriesPerHourSquareMeter => As(HeatFluxUnit.KilocaloriePerHourSquareMeter); /// - /// Get HeatFlux in KilocaloriePerSecondSquareCentimeter. + /// Get HeatFlux in KilocaloriesPerSecondSquareCentimeter. /// - public double KilocaloriePerSecondSquareCentimeter => As(HeatFluxUnit.KilocaloriePerSecondSquareCentimeter); + public double KilocaloriesPerSecondSquareCentimeter => As(HeatFluxUnit.KilocaloriePerSecondSquareCentimeter); /// /// Get HeatFlux in KilowattsPerSquareMeter. /// @@ -215,13 +215,13 @@ public HeatFlux(double wattspersquaremeter) /// public double NanowattsPerSquareMeter => As(HeatFluxUnit.NanowattPerSquareMeter); /// - /// Get HeatFlux in WattPerSquareFoot. + /// Get HeatFlux in WattsPerSquareFoot. /// - public double WattPerSquareFoot => As(HeatFluxUnit.WattPerSquareFoot); + public double WattsPerSquareFoot => As(HeatFluxUnit.WattPerSquareFoot); /// - /// Get HeatFlux in WattPerSquareInch. + /// Get HeatFlux in WattsPerSquareInch. /// - public double WattPerSquareInch => As(HeatFluxUnit.WattPerSquareInch); + public double WattsPerSquareInch => As(HeatFluxUnit.WattPerSquareInch); /// /// Get HeatFlux in WattsPerSquareMeter. /// @@ -234,72 +234,72 @@ public HeatFlux(double wattspersquaremeter) public static HeatFlux Zero => new HeatFlux(0, BaseUnit); /// - /// Get HeatFlux from BtuPerHourSquareFoot. + /// Get HeatFlux from BtusPerHourSquareFoot. /// #if WINDOWS_UWP [Windows.Foundation.Metadata.DefaultOverload] - public static HeatFlux FromBtuPerHourSquareFoot(double btuperhoursquarefoot) + public static HeatFlux FromBtusPerHourSquareFoot(double btusperhoursquarefoot) #else - public static HeatFlux FromBtuPerHourSquareFoot(QuantityValue btuperhoursquarefoot) + public static HeatFlux FromBtusPerHourSquareFoot(QuantityValue btusperhoursquarefoot) #endif { - double value = (double) btuperhoursquarefoot; + double value = (double) btusperhoursquarefoot; return new HeatFlux(value, HeatFluxUnit.BtuPerHourSquareFoot); } /// - /// Get HeatFlux from BtuPerMinuteSquareFoot. + /// Get HeatFlux from BtusPerMinuteSquareFoot. /// #if WINDOWS_UWP [Windows.Foundation.Metadata.DefaultOverload] - public static HeatFlux FromBtuPerMinuteSquareFoot(double btuperminutesquarefoot) + public static HeatFlux FromBtusPerMinuteSquareFoot(double btusperminutesquarefoot) #else - public static HeatFlux FromBtuPerMinuteSquareFoot(QuantityValue btuperminutesquarefoot) + public static HeatFlux FromBtusPerMinuteSquareFoot(QuantityValue btusperminutesquarefoot) #endif { - double value = (double) btuperminutesquarefoot; + double value = (double) btusperminutesquarefoot; return new HeatFlux(value, HeatFluxUnit.BtuPerMinuteSquareFoot); } /// - /// Get HeatFlux from BtuPerSecondSquareFoot. + /// Get HeatFlux from BtusPerSecondSquareFoot. /// #if WINDOWS_UWP [Windows.Foundation.Metadata.DefaultOverload] - public static HeatFlux FromBtuPerSecondSquareFoot(double btupersecondsquarefoot) + public static HeatFlux FromBtusPerSecondSquareFoot(double btuspersecondsquarefoot) #else - public static HeatFlux FromBtuPerSecondSquareFoot(QuantityValue btupersecondsquarefoot) + public static HeatFlux FromBtusPerSecondSquareFoot(QuantityValue btuspersecondsquarefoot) #endif { - double value = (double) btupersecondsquarefoot; + double value = (double) btuspersecondsquarefoot; return new HeatFlux(value, HeatFluxUnit.BtuPerSecondSquareFoot); } /// - /// Get HeatFlux from BtuPerSecondSquareInch. + /// Get HeatFlux from BtusPerSecondSquareInch. /// #if WINDOWS_UWP [Windows.Foundation.Metadata.DefaultOverload] - public static HeatFlux FromBtuPerSecondSquareInch(double btupersecondsquareinch) + public static HeatFlux FromBtusPerSecondSquareInch(double btuspersecondsquareinch) #else - public static HeatFlux FromBtuPerSecondSquareInch(QuantityValue btupersecondsquareinch) + public static HeatFlux FromBtusPerSecondSquareInch(QuantityValue btuspersecondsquareinch) #endif { - double value = (double) btupersecondsquareinch; + double value = (double) btuspersecondsquareinch; return new HeatFlux(value, HeatFluxUnit.BtuPerSecondSquareInch); } /// - /// Get HeatFlux from CaloriePerSecondSquareCentimeter. + /// Get HeatFlux from CaloriesPerSecondSquareCentimeter. /// #if WINDOWS_UWP [Windows.Foundation.Metadata.DefaultOverload] - public static HeatFlux FromCaloriePerSecondSquareCentimeter(double caloriepersecondsquarecentimeter) + public static HeatFlux FromCaloriesPerSecondSquareCentimeter(double caloriespersecondsquarecentimeter) #else - public static HeatFlux FromCaloriePerSecondSquareCentimeter(QuantityValue caloriepersecondsquarecentimeter) + public static HeatFlux FromCaloriesPerSecondSquareCentimeter(QuantityValue caloriespersecondsquarecentimeter) #endif { - double value = (double) caloriepersecondsquarecentimeter; + double value = (double) caloriespersecondsquarecentimeter; return new HeatFlux(value, HeatFluxUnit.CaloriePerSecondSquareCentimeter); } @@ -332,30 +332,30 @@ public static HeatFlux FromDeciwattsPerSquareMeter(QuantityValue deciwattspersqu } /// - /// Get HeatFlux from KilocaloriePerHourSquareMeter. + /// Get HeatFlux from KilocaloriesPerHourSquareMeter. /// #if WINDOWS_UWP [Windows.Foundation.Metadata.DefaultOverload] - public static HeatFlux FromKilocaloriePerHourSquareMeter(double kilocalorieperhoursquaremeter) + public static HeatFlux FromKilocaloriesPerHourSquareMeter(double kilocaloriesperhoursquaremeter) #else - public static HeatFlux FromKilocaloriePerHourSquareMeter(QuantityValue kilocalorieperhoursquaremeter) + public static HeatFlux FromKilocaloriesPerHourSquareMeter(QuantityValue kilocaloriesperhoursquaremeter) #endif { - double value = (double) kilocalorieperhoursquaremeter; + double value = (double) kilocaloriesperhoursquaremeter; return new HeatFlux(value, HeatFluxUnit.KilocaloriePerHourSquareMeter); } /// - /// Get HeatFlux from KilocaloriePerSecondSquareCentimeter. + /// Get HeatFlux from KilocaloriesPerSecondSquareCentimeter. /// #if WINDOWS_UWP [Windows.Foundation.Metadata.DefaultOverload] - public static HeatFlux FromKilocaloriePerSecondSquareCentimeter(double kilocaloriepersecondsquarecentimeter) + public static HeatFlux FromKilocaloriesPerSecondSquareCentimeter(double kilocaloriespersecondsquarecentimeter) #else - public static HeatFlux FromKilocaloriePerSecondSquareCentimeter(QuantityValue kilocaloriepersecondsquarecentimeter) + public static HeatFlux FromKilocaloriesPerSecondSquareCentimeter(QuantityValue kilocaloriespersecondsquarecentimeter) #endif { - double value = (double) kilocaloriepersecondsquarecentimeter; + double value = (double) kilocaloriespersecondsquarecentimeter; return new HeatFlux(value, HeatFluxUnit.KilocaloriePerSecondSquareCentimeter); } @@ -416,30 +416,30 @@ public static HeatFlux FromNanowattsPerSquareMeter(QuantityValue nanowattspersqu } /// - /// Get HeatFlux from WattPerSquareFoot. + /// Get HeatFlux from WattsPerSquareFoot. /// #if WINDOWS_UWP [Windows.Foundation.Metadata.DefaultOverload] - public static HeatFlux FromWattPerSquareFoot(double wattpersquarefoot) + public static HeatFlux FromWattsPerSquareFoot(double wattspersquarefoot) #else - public static HeatFlux FromWattPerSquareFoot(QuantityValue wattpersquarefoot) + public static HeatFlux FromWattsPerSquareFoot(QuantityValue wattspersquarefoot) #endif { - double value = (double) wattpersquarefoot; + double value = (double) wattspersquarefoot; return new HeatFlux(value, HeatFluxUnit.WattPerSquareFoot); } /// - /// Get HeatFlux from WattPerSquareInch. + /// Get HeatFlux from WattsPerSquareInch. /// #if WINDOWS_UWP [Windows.Foundation.Metadata.DefaultOverload] - public static HeatFlux FromWattPerSquareInch(double wattpersquareinch) + public static HeatFlux FromWattsPerSquareInch(double wattspersquareinch) #else - public static HeatFlux FromWattPerSquareInch(QuantityValue wattpersquareinch) + public static HeatFlux FromWattsPerSquareInch(QuantityValue wattspersquareinch) #endif { - double value = (double) wattpersquareinch; + double value = (double) wattspersquareinch; return new HeatFlux(value, HeatFluxUnit.WattPerSquareInch); } @@ -460,13 +460,13 @@ public static HeatFlux FromWattsPerSquareMeter(QuantityValue wattspersquaremeter // Windows Runtime Component does not support nullable types (double?): https://msdn.microsoft.com/en-us/library/br230301.aspx #if !WINDOWS_UWP /// - /// Get nullable HeatFlux from nullable BtuPerHourSquareFoot. + /// Get nullable HeatFlux from nullable BtusPerHourSquareFoot. /// - public static HeatFlux? FromBtuPerHourSquareFoot(QuantityValue? btuperhoursquarefoot) + public static HeatFlux? FromBtusPerHourSquareFoot(QuantityValue? btusperhoursquarefoot) { - if (btuperhoursquarefoot.HasValue) + if (btusperhoursquarefoot.HasValue) { - return FromBtuPerHourSquareFoot(btuperhoursquarefoot.Value); + return FromBtusPerHourSquareFoot(btusperhoursquarefoot.Value); } else { @@ -475,13 +475,13 @@ public static HeatFlux FromWattsPerSquareMeter(QuantityValue wattspersquaremeter } /// - /// Get nullable HeatFlux from nullable BtuPerMinuteSquareFoot. + /// Get nullable HeatFlux from nullable BtusPerMinuteSquareFoot. /// - public static HeatFlux? FromBtuPerMinuteSquareFoot(QuantityValue? btuperminutesquarefoot) + public static HeatFlux? FromBtusPerMinuteSquareFoot(QuantityValue? btusperminutesquarefoot) { - if (btuperminutesquarefoot.HasValue) + if (btusperminutesquarefoot.HasValue) { - return FromBtuPerMinuteSquareFoot(btuperminutesquarefoot.Value); + return FromBtusPerMinuteSquareFoot(btusperminutesquarefoot.Value); } else { @@ -490,13 +490,13 @@ public static HeatFlux FromWattsPerSquareMeter(QuantityValue wattspersquaremeter } /// - /// Get nullable HeatFlux from nullable BtuPerSecondSquareFoot. + /// Get nullable HeatFlux from nullable BtusPerSecondSquareFoot. /// - public static HeatFlux? FromBtuPerSecondSquareFoot(QuantityValue? btupersecondsquarefoot) + public static HeatFlux? FromBtusPerSecondSquareFoot(QuantityValue? btuspersecondsquarefoot) { - if (btupersecondsquarefoot.HasValue) + if (btuspersecondsquarefoot.HasValue) { - return FromBtuPerSecondSquareFoot(btupersecondsquarefoot.Value); + return FromBtusPerSecondSquareFoot(btuspersecondsquarefoot.Value); } else { @@ -505,13 +505,13 @@ public static HeatFlux FromWattsPerSquareMeter(QuantityValue wattspersquaremeter } /// - /// Get nullable HeatFlux from nullable BtuPerSecondSquareInch. + /// Get nullable HeatFlux from nullable BtusPerSecondSquareInch. /// - public static HeatFlux? FromBtuPerSecondSquareInch(QuantityValue? btupersecondsquareinch) + public static HeatFlux? FromBtusPerSecondSquareInch(QuantityValue? btuspersecondsquareinch) { - if (btupersecondsquareinch.HasValue) + if (btuspersecondsquareinch.HasValue) { - return FromBtuPerSecondSquareInch(btupersecondsquareinch.Value); + return FromBtusPerSecondSquareInch(btuspersecondsquareinch.Value); } else { @@ -520,13 +520,13 @@ public static HeatFlux FromWattsPerSquareMeter(QuantityValue wattspersquaremeter } /// - /// Get nullable HeatFlux from nullable CaloriePerSecondSquareCentimeter. + /// Get nullable HeatFlux from nullable CaloriesPerSecondSquareCentimeter. /// - public static HeatFlux? FromCaloriePerSecondSquareCentimeter(QuantityValue? caloriepersecondsquarecentimeter) + public static HeatFlux? FromCaloriesPerSecondSquareCentimeter(QuantityValue? caloriespersecondsquarecentimeter) { - if (caloriepersecondsquarecentimeter.HasValue) + if (caloriespersecondsquarecentimeter.HasValue) { - return FromCaloriePerSecondSquareCentimeter(caloriepersecondsquarecentimeter.Value); + return FromCaloriesPerSecondSquareCentimeter(caloriespersecondsquarecentimeter.Value); } else { @@ -565,13 +565,13 @@ public static HeatFlux FromWattsPerSquareMeter(QuantityValue wattspersquaremeter } /// - /// Get nullable HeatFlux from nullable KilocaloriePerHourSquareMeter. + /// Get nullable HeatFlux from nullable KilocaloriesPerHourSquareMeter. /// - public static HeatFlux? FromKilocaloriePerHourSquareMeter(QuantityValue? kilocalorieperhoursquaremeter) + public static HeatFlux? FromKilocaloriesPerHourSquareMeter(QuantityValue? kilocaloriesperhoursquaremeter) { - if (kilocalorieperhoursquaremeter.HasValue) + if (kilocaloriesperhoursquaremeter.HasValue) { - return FromKilocaloriePerHourSquareMeter(kilocalorieperhoursquaremeter.Value); + return FromKilocaloriesPerHourSquareMeter(kilocaloriesperhoursquaremeter.Value); } else { @@ -580,13 +580,13 @@ public static HeatFlux FromWattsPerSquareMeter(QuantityValue wattspersquaremeter } /// - /// Get nullable HeatFlux from nullable KilocaloriePerSecondSquareCentimeter. + /// Get nullable HeatFlux from nullable KilocaloriesPerSecondSquareCentimeter. /// - public static HeatFlux? FromKilocaloriePerSecondSquareCentimeter(QuantityValue? kilocaloriepersecondsquarecentimeter) + public static HeatFlux? FromKilocaloriesPerSecondSquareCentimeter(QuantityValue? kilocaloriespersecondsquarecentimeter) { - if (kilocaloriepersecondsquarecentimeter.HasValue) + if (kilocaloriespersecondsquarecentimeter.HasValue) { - return FromKilocaloriePerSecondSquareCentimeter(kilocaloriepersecondsquarecentimeter.Value); + return FromKilocaloriesPerSecondSquareCentimeter(kilocaloriespersecondsquarecentimeter.Value); } else { @@ -655,13 +655,13 @@ public static HeatFlux FromWattsPerSquareMeter(QuantityValue wattspersquaremeter } /// - /// Get nullable HeatFlux from nullable WattPerSquareFoot. + /// Get nullable HeatFlux from nullable WattsPerSquareFoot. /// - public static HeatFlux? FromWattPerSquareFoot(QuantityValue? wattpersquarefoot) + public static HeatFlux? FromWattsPerSquareFoot(QuantityValue? wattspersquarefoot) { - if (wattpersquarefoot.HasValue) + if (wattspersquarefoot.HasValue) { - return FromWattPerSquareFoot(wattpersquarefoot.Value); + return FromWattsPerSquareFoot(wattspersquarefoot.Value); } else { @@ -670,13 +670,13 @@ public static HeatFlux FromWattsPerSquareMeter(QuantityValue wattspersquaremeter } /// - /// Get nullable HeatFlux from nullable WattPerSquareInch. + /// Get nullable HeatFlux from nullable WattsPerSquareInch. /// - public static HeatFlux? FromWattPerSquareInch(QuantityValue? wattpersquareinch) + public static HeatFlux? FromWattsPerSquareInch(QuantityValue? wattspersquareinch) { - if (wattpersquareinch.HasValue) + if (wattspersquareinch.HasValue) { - return FromWattPerSquareInch(wattpersquareinch.Value); + return FromWattsPerSquareInch(wattspersquareinch.Value); } else { diff --git a/UnitsNet/UnitDefinitions/HeatFlux.json b/UnitsNet/UnitDefinitions/HeatFlux.json index 276cd7f67b..ef532cb0b0 100644 --- a/UnitsNet/UnitDefinitions/HeatFlux.json +++ b/UnitsNet/UnitDefinitions/HeatFlux.json @@ -18,7 +18,7 @@ }, { "SingularName": "WattPerSquareInch", - "PluralName": "WattPerSquareInch", + "PluralName": "WattsPerSquareInch", "FromUnitToBaseFunc": "x*1.5500031e3", "FromBaseToUnitFunc": "x/1.5500031e3", "Localization": [ @@ -30,7 +30,7 @@ }, { "SingularName": "WattPerSquareFoot", - "PluralName": "WattPerSquareFoot", + "PluralName": "WattsPerSquareFoot", "FromUnitToBaseFunc": "x*1.07639e1", "FromBaseToUnitFunc": "x/1.07639e1", "Localization": [ @@ -42,7 +42,7 @@ }, { "SingularName": "BtuPerSecondSquareInch", - "PluralName": "BtuPerSecondSquareInch", + "PluralName": "BtusPerSecondSquareInch", "FromUnitToBaseFunc": "x*1.63533984e6", "FromBaseToUnitFunc": "x/1.63533984e6", "Localization": [ @@ -54,7 +54,7 @@ }, { "SingularName": "BtuPerSecondSquareFoot", - "PluralName": "BtuPerSecondSquareFoot", + "PluralName": "BtusPerSecondSquareFoot", "FromUnitToBaseFunc": "x*1.13565267e4", "FromBaseToUnitFunc": "x/1.13565267e4", "Localization": [ @@ -66,7 +66,7 @@ }, { "SingularName": "BtuPerMinuteSquareFoot", - "PluralName": "BtuPerMinuteSquareFoot", + "PluralName": "BtusPerMinuteSquareFoot", "FromUnitToBaseFunc": "x*1.89275445e2", "FromBaseToUnitFunc": "x/1.89275445e2", "Localization": [ @@ -78,7 +78,7 @@ }, { "SingularName": "BtuPerHourSquareFoot", - "PluralName": "BtuPerHourSquareFoot", + "PluralName": "BtusPerHourSquareFoot", "FromUnitToBaseFunc": "x*3.15459075", "FromBaseToUnitFunc": "x/3.15459075", "Localization": [ @@ -90,7 +90,7 @@ }, { "SingularName": "CaloriePerSecondSquareCentimeter", - "PluralName": "CaloriePerSecondSquareCentimeter", + "PluralName": "CaloriesPerSecondSquareCentimeter", "FromUnitToBaseFunc": "x*4.1868e4", "FromBaseToUnitFunc": "x/4.1868e4", "Prefixes": [ "Kilo" ], @@ -103,7 +103,7 @@ }, { "SingularName": "KilocaloriePerHourSquareMeter", - "PluralName": "KilocaloriePerHourSquareMeter", + "PluralName": "KilocaloriesPerHourSquareMeter", "FromUnitToBaseFunc": "x*1.163", "FromBaseToUnitFunc": "x/1.163", "Localization": [