diff --git a/Build/build-pack-nano-nugets.psm1 b/Build/build-pack-nano-nugets.psm1 index e1981e6ba7..a51f78eb17 100644 --- a/Build/build-pack-nano-nugets.psm1 +++ b/Build/build-pack-nano-nugets.psm1 @@ -23,6 +23,8 @@ function Invoke-BuildNanoNugets { & $nuget pack "$root\UnitsNet.NanoFramework\GeneratedCode\Mass\UnitsNet.NanoFramework.Mass.nuspec" -Verbosity detailed -OutputDirectory "$nugetOutDir" & $nuget pack "$root\UnitsNet.NanoFramework\GeneratedCode\MassConcentration\UnitsNet.NanoFramework.MassConcentration.nuspec" -Verbosity detailed -OutputDirectory "$nugetOutDir" & $nuget pack "$root\UnitsNet.NanoFramework\GeneratedCode\Angle\UnitsNet.NanoFramework.Angle.nuspec" -Verbosity detailed -OutputDirectory "$nugetOutDir" + & $nuget pack "$root\UnitsNet.NanoFramework\GeneratedCode\MagneticField\UnitsNet.NanoFramework.MagneticField.nuspec" -Verbosity detailed -OutputDirectory "$nugetOutDir" + & $nuget pack "$root\UnitsNet.NanoFramework\GeneratedCode\Acceleration\UnitsNet.NanoFramework.Acceleration.nuspec" -Verbosity detailed -OutputDirectory "$nugetOutDir" } diff --git a/CodeGen/CodeGen.csproj b/CodeGen/CodeGen.csproj index fc9ec0d758..caa5bf7342 100644 --- a/CodeGen/CodeGen.csproj +++ b/CodeGen/CodeGen.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net8.0 latest enable @@ -11,10 +11,9 @@ - - - - + + + diff --git a/CodeGen/Exceptions/UnitsNetCodeGenException.cs b/CodeGen/Exceptions/UnitsNetCodeGenException.cs index 2e98bc3e86..e25340993a 100644 --- a/CodeGen/Exceptions/UnitsNetCodeGenException.cs +++ b/CodeGen/Exceptions/UnitsNetCodeGenException.cs @@ -2,20 +2,11 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Runtime.Serialization; namespace CodeGen.Exceptions { internal class UnitsNetCodeGenException : Exception { - public UnitsNetCodeGenException() - { - } - - protected UnitsNetCodeGenException(SerializationInfo info, StreamingContext context) : base(info, context) - { - } - public UnitsNetCodeGenException(string message) : base(message) { } diff --git a/CodeGen/Generators/NanoFrameworkGen/NuspecGenerator.cs b/CodeGen/Generators/NanoFrameworkGen/NuspecGenerator.cs index d375bc8047..595490b2da 100644 --- a/CodeGen/Generators/NanoFrameworkGen/NuspecGenerator.cs +++ b/CodeGen/Generators/NanoFrameworkGen/NuspecGenerator.cs @@ -25,11 +25,11 @@ public string Generate() UnitsNet.nanoFramework.{_quantity.Name} - 6.0.0-pre002 + 6.0.0-pre006 Units.NET {_quantity.Name} - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds {_quantity.Name} units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/Common/UnitDefinitions/Irradiation.json b/Common/UnitDefinitions/Irradiation.json index 1097c6e3b4..3689cd0db4 100644 --- a/Common/UnitDefinitions/Irradiation.json +++ b/Common/UnitDefinitions/Irradiation.json @@ -58,6 +58,19 @@ "Abbreviations": [ "Wh/m²" ] } ] + }, + { + "SingularName": "BtuPerSquareFoot", + "PluralName": "BtusPerSquareFoot", + "FromUnitToBaseFunc": "{x} * (52752792631d / 4645152d)", + "FromBaseToUnitFunc": "{x} / (52752792631d / 4645152d)", + "Prefixes": [ "Kilo" ], + "Localization": [ + { + "Culture": "en-US", + "Abbreviations": [ "Btu/ft²" ] + } + ] } ] } diff --git a/Common/UnitDefinitions/RadiationEquivalentDose.json b/Common/UnitDefinitions/RadiationEquivalentDose.json new file mode 100644 index 0000000000..85da7bbed3 --- /dev/null +++ b/Common/UnitDefinitions/RadiationEquivalentDose.json @@ -0,0 +1,48 @@ +{ + "Name": "RadiationEquivalentDose", + "BaseUnit": "Sievert", + "XmlDocSummary": "Equivalent dose is a dose quantity representing the stochastic health effects of low levels of ionizing radiation on the human body which represents the probability of radiation-induced cancer and genetic damage.", + "XmlDocsRemarks": "https://en.wikipedia.org/wiki/Equivalent_dose", + "BaseDimensions": { + "L": 2, + "T": -2 + }, + "Units": [ + { + "SingularName": "Sievert", + "PluralName": "Sieverts", + "FromUnitToBaseFunc": "{x}", + "FromBaseToUnitFunc": "{x}", + "BaseUnits": { + "L": "Meter", + "T": "Second" + }, + "Prefixes": [ "Nano", "Micro", "Milli" ], + "XmlDocSummary": "The sievert is a unit in the International System of Units (SI) intended to represent the stochastic health risk of ionizing radiation, which is defined as the probability of causing radiation-induced cancer and genetic damage.", + "XmlDocRemarks": "https://en.wikipedia.org/wiki/Sievert", + "Localization": [ + { + "Culture": "en-US", + "Abbreviations": [ "Sv" ] + }, + { + "Culture": "ru-RU", + "Abbreviations": [ "Зв" ] + } + ] + }, + { + "SingularName": "RoentgenEquivalentMan", + "PluralName": "RoentgensEquivalentMan", + "FromUnitToBaseFunc": "{x} / 100", + "FromBaseToUnitFunc": "{x} * 100", + "Prefixes": [ "Milli" ], + "Localization": [ + { + "Culture": "en-US", + "Abbreviations": [ "rem" ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Common/UnitDefinitions/Volume.json b/Common/UnitDefinitions/Volume.json index bab775e2e0..25ee2d9cb9 100644 --- a/Common/UnitDefinitions/Volume.json +++ b/Common/UnitDefinitions/Volume.json @@ -194,8 +194,8 @@ { "SingularName": "CubicInch", "PluralName": "CubicInches", - "FromUnitToBaseFunc": "{x} * 1.6387 * 1e-5", - "FromBaseToUnitFunc": "{x} / (1.6387 * 1e-5)", + "FromUnitToBaseFunc": "{x} * 1.6387064e-5", + "FromBaseToUnitFunc": "{x} / 1.6387064e-5", "Localization": [ { "Culture": "en-US", diff --git a/Common/UnitDefinitions/VolumeFlow.json b/Common/UnitDefinitions/VolumeFlow.json index 9a51f57701..9d07ee2f08 100644 --- a/Common/UnitDefinitions/VolumeFlow.json +++ b/Common/UnitDefinitions/VolumeFlow.json @@ -181,7 +181,7 @@ "PluralName": "LitersPerSecond", "FromUnitToBaseFunc": "{x} / 1000", "FromBaseToUnitFunc": "{x} * 1000", - "Prefixes": [ "Nano", "Micro", "Milli", "Centi", "Deci", "Kilo", "Mega" ], + "Prefixes": [ "Nano", "Micro", "Milli", "Centi", "Deci", "Deca", "Hecto", "Kilo", "Mega" ], "Localization": [ { "Culture": "en-US", @@ -198,7 +198,7 @@ "PluralName": "LitersPerMinute", "FromUnitToBaseFunc": "{x} / 60000.00000", "FromBaseToUnitFunc": "{x} * 60000.00000", - "Prefixes": [ "Nano", "Micro", "Milli", "Centi", "Deci", "Kilo", "Mega" ], + "Prefixes": [ "Nano", "Micro", "Milli", "Centi", "Deci", "Deca", "Hecto", "Kilo", "Mega" ], "Localization": [ { "Culture": "en-US", @@ -215,7 +215,7 @@ "PluralName": "LitersPerHour", "FromUnitToBaseFunc": "{x} / 3600000.000", "FromBaseToUnitFunc": "{x} * 3600000.000", - "Prefixes": [ "Nano", "Micro", "Milli", "Centi", "Deci", "Kilo", "Mega" ], + "Prefixes": [ "Nano", "Micro", "Milli", "Centi", "Deci", "Deca", "Hecto", "Kilo", "Mega" ], "Localization": [ { "Culture": "en-US", @@ -232,7 +232,7 @@ "PluralName": "LitersPerDay", "FromUnitToBaseFunc": "{x} / 86400000", "FromBaseToUnitFunc": "{x} * 86400000", - "Prefixes": [ "Nano", "Micro", "Milli", "Centi", "Deci", "Kilo", "Mega" ], + "Prefixes": [ "Nano", "Micro", "Milli", "Centi", "Deci", "Deca", "Hecto", "Kilo", "Mega" ], "Localization": [ { "Culture": "en-US", diff --git a/Common/UnitEnumValues.g.json b/Common/UnitEnumValues.g.json index 4d909db5bb..73ba872afa 100644 --- a/Common/UnitEnumValues.g.json +++ b/Common/UnitEnumValues.g.json @@ -631,7 +631,9 @@ "KilojoulePerSquareMeter": 4, "KilowattHourPerSquareMeter": 5, "MillijoulePerSquareCentimeter": 6, - "WattHourPerSquareMeter": 7 + "WattHourPerSquareMeter": 7, + "BtuPerSquareFoot": 15, + "KilobtuPerSquareFoot": 9 }, "Jerk": { "CentimeterPerSecondCubed": 1, @@ -1676,7 +1678,15 @@ "MegaliterPerMinute": 64, "MegaliterPerSecond": 65, "MegaukGallonPerDay": 73, - "MegausGallonPerDay": 77 + "MegausGallonPerDay": 77, + "DecaliterPerDay": 71, + "DecaliterPerHour": 78, + "DecaliterPerMinute": 67, + "DecaliterPerSecond": 70, + "HectoliterPerDay": 74, + "HectoliterPerHour": 72, + "HectoliterPerMinute": 75, + "HectoliterPerSecond": 69 }, "VolumeFlowPerArea": { "CubicFootPerMinutePerSquareFoot": 1, @@ -1835,5 +1845,15 @@ "Roentgen": 4, "Microroentgen": 12, "Milliroentgen": 13 + }, + "RadiationEquivalentDose": { + "Microsievert": 1, + "MilliroentgenEquivalentMan": 2, + "Millisievert": 7, + "Nanosievert": 5, + "RoentgenEquivalentMan": 4, + "Sievert": 9, + "Kilosievert": 3, + "Megasievert": 6 } } diff --git a/Common/UnitRelations.json b/Common/UnitRelations.json index b6e6cc2ad3..afd0ab65b6 100644 --- a/Common/UnitRelations.json +++ b/Common/UnitRelations.json @@ -8,6 +8,7 @@ "Angle.Radian = RotationalSpeed.RadianPerSecond * Duration.Second", "Area.SquareMeter = KinematicViscosity.SquareMeterPerSecond * Duration.Second", "Area.SquareMeter = Length.Meter * Length.Meter", + "Area.SquareMeter = Volume.CubicMeter * ReciprocalLength.InverseMeter", "AreaMomentOfInertia.MeterToTheFourth = Volume.CubicMeter * Length.Meter", "double = Density.KilogramPerCubicMeter * SpecificVolume.CubicMeterPerKilogram", "double = SpecificEnergy.JoulePerKilogram * BrakeSpecificFuelConsumption.KilogramPerJoule", @@ -30,7 +31,9 @@ "ForcePerLength.NewtonPerMeter = Pressure.NewtonPerSquareMeter * Length.Meter", "ForcePerLength.NewtonPerMeter = SpecificWeight.NewtonPerCubicMeter * Area.SquareMeter", "KinematicViscosity.SquareMeterPerSecond = Length.Meter * Speed.MeterPerSecond", + "Length.Meter = Area.SquareMeter * ReciprocalLength.InverseMeter", "Length.Meter = Speed.MeterPerSecond * Duration.Second", + "Length.Meter = Volume.CubicMeter * ReciprocalArea.InverseSquareMeter", "LinearDensity.KilogramPerMeter = Area.SquareMeter * Density.KilogramPerCubicMeter", "LuminousIntensity.Candela = Luminance.CandelaPerSquareMeter * Area.SquareMeter", "Mass.Gram = AmountOfSubstance.Mole * MolarMass.GramPerMole", diff --git a/PerfTests/PerfTest_Startup/PerfTest_Startup.csproj b/PerfTests/PerfTest_Startup/PerfTest_Startup.csproj index fa16b7ff97..dd5984c9e8 100644 --- a/PerfTests/PerfTest_Startup/PerfTest_Startup.csproj +++ b/PerfTests/PerfTest_Startup/PerfTest_Startup.csproj @@ -2,7 +2,7 @@ Exe - net7.0 + net8.0 enable enable perftest diff --git a/PerfTests/PerfTest_Startup_v4_144_0/PerfTest_Startup_v4_144_0.csproj b/PerfTests/PerfTest_Startup_v4_144_0/PerfTest_Startup_v4_144_0.csproj index 562902a0c0..6ce0806129 100644 --- a/PerfTests/PerfTest_Startup_v4_144_0/PerfTest_Startup_v4_144_0.csproj +++ b/PerfTests/PerfTest_Startup_v4_144_0/PerfTest_Startup_v4_144_0.csproj @@ -2,7 +2,7 @@ Exe - net7.0 + net8.0 enable enable perftest_before diff --git a/PerfTests/PerfTest_Startup_v4_72_0/PerfTest_Startup_v4_72_0.csproj b/PerfTests/PerfTest_Startup_v4_72_0/PerfTest_Startup_v4_72_0.csproj index 5140e2090b..03686a9f46 100644 --- a/PerfTests/PerfTest_Startup_v4_72_0/PerfTest_Startup_v4_72_0.csproj +++ b/PerfTests/PerfTest_Startup_v4_72_0/PerfTest_Startup_v4_72_0.csproj @@ -2,7 +2,7 @@ Exe - net7.0 + net8.0 enable enable perftest_before diff --git a/README.md b/README.md index 2f01def5a1..f4a93903df 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,8 @@ Add strongly typed quantities to your code and get merrily on with your life. No more magic constants found on Stack Overflow, no more second-guessing the unit of parameters and variables. -[Upgrading from 4.x to 5.x](https://github.com/angularsen/UnitsNet/wiki/Upgrading-from-4.x-to-5.x) +[Upgrading from 4.x to 5.x](https://github.com/angularsen/UnitsNet/wiki/Upgrading-from-4.x-to-5.x)
+[Upgrading from 5.x to 6.x](https://github.com/angularsen/UnitsNet/wiki/Upgrading-from-5.x-to-6.x) (still in prerelease and may yet change) ### Overview diff --git a/UnitsNet.Benchmark/Scripts/json-export-all-runtimes.bat b/UnitsNet.Benchmark/Scripts/json-export-all-runtimes.bat index 8c631cb1de..895d9d9cb1 100644 --- a/UnitsNet.Benchmark/Scripts/json-export-all-runtimes.bat +++ b/UnitsNet.Benchmark/Scripts/json-export-all-runtimes.bat @@ -4,8 +4,8 @@ SET projectdir="%scriptdir%..\.." SET exportdir="%projectdir%\Artifacts\Benchmark" :: this fails on the build server (also tested with the nightly benchmark.net package: 0.12.1.1533): possibly related to https://github.com/dotnet/BenchmarkDotNet/issues/1487 dotnet run --project "%projectdir%/UnitsNet.Benchmark" -c Release ^ ---framework net6.0 ^ ---runtimes net472 net48 netcoreapp2.1 netcoreapp3.1 net6.0 ^ +--framework net8.0 ^ +--runtimes net48 net8.0 ^ --artifacts=%exportdir% ^ --exporters json ^ --filter * ^ @@ -14,4 +14,4 @@ dotnet run --project "%projectdir%/UnitsNet.Benchmark" -c Release ^ --join %1 %2 %3 :: this runs fine, however there is currently no way of displaying multiple-lines-per-chart: see https://github.com/rhysd/github-action-benchmark/issues/18 -:: dotnet run --project "%scriptdir%/UnitsNet.Benchmark" -c Release -f net6.0 --runtimes netcoreapp31 netcoreapp50 --filter ** --artifacts="%scriptdir%/Artifacts/Benchmark" --exporters json +:: dotnet run --project "%scriptdir%/UnitsNet.Benchmark" -c Release -f net8.0 --runtimes net48 net8.0 --filter ** --artifacts="%scriptdir%/Artifacts/Benchmark" --exporters json diff --git a/UnitsNet.Benchmark/Scripts/json-export-net5.bat b/UnitsNet.Benchmark/Scripts/json-export-net5.bat deleted file mode 100644 index 6d446ec0b5..0000000000 --- a/UnitsNet.Benchmark/Scripts/json-export-net5.bat +++ /dev/null @@ -1,17 +0,0 @@ -@echo off -SET scriptdir=%~dp0 -SET projectdir="%scriptdir%..\.." -SET exportdir="%projectdir%\Artifacts\Benchmark" -:: this fails on the build server (also tested with the nightly benchmark.net package: 0.12.1.1533): possibly related to https://github.com/dotnet/BenchmarkDotNet/issues/1487 -dotnet run --project "%projectdir%\UnitsNet.Benchmark" -c Release ^ ---framework net5.0 ^ ---runtimes net5.0 ^ ---artifacts=%exportdir% ^ ---exporters json ^ ---filter * ^ ---iterationTime 250 ^ ---statisticalTest 0.001ms ^ ---join %1 %2 %3 - -:: this runs fine, however there is currently no way of displaying multiple-lines-per-chart: see https://github.com/rhysd/github-action-benchmark/issues/18 -:: dotnet run --project "%scriptdir%/UnitsNet.Benchmark" -c Release -f net5.0 --runtimes netcoreapp31 net5.0 --filter ** --artifacts="%scriptdir%/Artifacts/Benchmark" --exporters json diff --git a/UnitsNet.Benchmark/Scripts/r-plot-all-runtimes.bat b/UnitsNet.Benchmark/Scripts/r-plot-all-runtimes.bat index aa592c0fba..19cff17270 100644 --- a/UnitsNet.Benchmark/Scripts/r-plot-all-runtimes.bat +++ b/UnitsNet.Benchmark/Scripts/r-plot-all-runtimes.bat @@ -4,8 +4,8 @@ SET projectdir="%scriptdir%..\.." SET exportdir="%projectdir%\Artifacts\Benchmark" :: this fails on the build server (also tested with the nightly benchmark.net package: 0.12.1.1533): possibly related to https://github.com/dotnet/BenchmarkDotNet/issues/1487 dotnet run --project "%projectdir%\UnitsNet.Benchmark" -c Release ^ ---framework net5.0 ^ ---runtimes net472 net48 netcoreapp2.1 netcoreapp3.1 net6.0 ^ +--framework net8.0 ^ +--runtimes net48 net8.0 ^ --artifacts=%exportdir% ^ --exporters rplot ^ --filter * ^ diff --git a/UnitsNet.Benchmark/UnitsNet.Benchmark.csproj b/UnitsNet.Benchmark/UnitsNet.Benchmark.csproj index 917567e332..5a90114f34 100644 --- a/UnitsNet.Benchmark/UnitsNet.Benchmark.csproj +++ b/UnitsNet.Benchmark/UnitsNet.Benchmark.csproj @@ -1,7 +1,7 @@  Exe - net6.0;net48 + net8.0 4.0.0.0 4.0.0.0 UnitsNet.Benchmark @@ -10,8 +10,8 @@ - - + + all diff --git a/UnitsNet.NanoFramework/GeneratedCode/AbsorbedDoseOfIonizingRadiation/UnitsNet.NanoFramework.AbsorbedDoseOfIonizingRadiation.nuspec b/UnitsNet.NanoFramework/GeneratedCode/AbsorbedDoseOfIonizingRadiation/UnitsNet.NanoFramework.AbsorbedDoseOfIonizingRadiation.nuspec index 3a7b85f694..bb286cc245 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/AbsorbedDoseOfIonizingRadiation/UnitsNet.NanoFramework.AbsorbedDoseOfIonizingRadiation.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/AbsorbedDoseOfIonizingRadiation/UnitsNet.NanoFramework.AbsorbedDoseOfIonizingRadiation.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.AbsorbedDoseOfIonizingRadiation - 6.0.0-pre002 + 6.0.0-pre006 Units.NET AbsorbedDoseOfIonizingRadiation - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds AbsorbedDoseOfIonizingRadiation units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/Acceleration/UnitsNet.NanoFramework.Acceleration.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Acceleration/UnitsNet.NanoFramework.Acceleration.nuspec index f14f2e6eca..e7274fd622 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/Acceleration/UnitsNet.NanoFramework.Acceleration.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/Acceleration/UnitsNet.NanoFramework.Acceleration.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.Acceleration - 6.0.0-pre002 + 6.0.0-pre006 Units.NET Acceleration - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds Acceleration units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/AmountOfSubstance/UnitsNet.NanoFramework.AmountOfSubstance.nuspec b/UnitsNet.NanoFramework/GeneratedCode/AmountOfSubstance/UnitsNet.NanoFramework.AmountOfSubstance.nuspec index ae8673ef62..093083d857 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/AmountOfSubstance/UnitsNet.NanoFramework.AmountOfSubstance.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/AmountOfSubstance/UnitsNet.NanoFramework.AmountOfSubstance.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.AmountOfSubstance - 6.0.0-pre002 + 6.0.0-pre006 Units.NET AmountOfSubstance - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds AmountOfSubstance units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/AmplitudeRatio/UnitsNet.NanoFramework.AmplitudeRatio.nuspec b/UnitsNet.NanoFramework/GeneratedCode/AmplitudeRatio/UnitsNet.NanoFramework.AmplitudeRatio.nuspec index 27f71e6090..ace92ce237 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/AmplitudeRatio/UnitsNet.NanoFramework.AmplitudeRatio.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/AmplitudeRatio/UnitsNet.NanoFramework.AmplitudeRatio.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.AmplitudeRatio - 6.0.0-pre002 + 6.0.0-pre006 Units.NET AmplitudeRatio - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds AmplitudeRatio units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/Angle/UnitsNet.NanoFramework.Angle.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Angle/UnitsNet.NanoFramework.Angle.nuspec index 460b8ba3e0..94aa591caf 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/Angle/UnitsNet.NanoFramework.Angle.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/Angle/UnitsNet.NanoFramework.Angle.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.Angle - 6.0.0-pre002 + 6.0.0-pre006 Units.NET Angle - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds Angle units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/ApparentEnergy/UnitsNet.NanoFramework.ApparentEnergy.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ApparentEnergy/UnitsNet.NanoFramework.ApparentEnergy.nuspec index 5d30cc6213..948a02c222 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/ApparentEnergy/UnitsNet.NanoFramework.ApparentEnergy.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/ApparentEnergy/UnitsNet.NanoFramework.ApparentEnergy.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.ApparentEnergy - 6.0.0-pre002 + 6.0.0-pre006 Units.NET ApparentEnergy - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds ApparentEnergy units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/ApparentPower/UnitsNet.NanoFramework.ApparentPower.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ApparentPower/UnitsNet.NanoFramework.ApparentPower.nuspec index 98d5dea02f..4e4832be1e 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/ApparentPower/UnitsNet.NanoFramework.ApparentPower.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/ApparentPower/UnitsNet.NanoFramework.ApparentPower.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.ApparentPower - 6.0.0-pre002 + 6.0.0-pre006 Units.NET ApparentPower - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds ApparentPower units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/Area/UnitsNet.NanoFramework.Area.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Area/UnitsNet.NanoFramework.Area.nuspec index 3892a5afad..4643e59d35 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/Area/UnitsNet.NanoFramework.Area.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/Area/UnitsNet.NanoFramework.Area.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.Area - 6.0.0-pre002 + 6.0.0-pre006 Units.NET Area - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds Area units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/AreaDensity/UnitsNet.NanoFramework.AreaDensity.nuspec b/UnitsNet.NanoFramework/GeneratedCode/AreaDensity/UnitsNet.NanoFramework.AreaDensity.nuspec index cc84366884..a5e8ccb3d3 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/AreaDensity/UnitsNet.NanoFramework.AreaDensity.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/AreaDensity/UnitsNet.NanoFramework.AreaDensity.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.AreaDensity - 6.0.0-pre002 + 6.0.0-pre006 Units.NET AreaDensity - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds AreaDensity units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/AreaMomentOfInertia/UnitsNet.NanoFramework.AreaMomentOfInertia.nuspec b/UnitsNet.NanoFramework/GeneratedCode/AreaMomentOfInertia/UnitsNet.NanoFramework.AreaMomentOfInertia.nuspec index d26b975ab8..06da684f48 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/AreaMomentOfInertia/UnitsNet.NanoFramework.AreaMomentOfInertia.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/AreaMomentOfInertia/UnitsNet.NanoFramework.AreaMomentOfInertia.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.AreaMomentOfInertia - 6.0.0-pre002 + 6.0.0-pre006 Units.NET AreaMomentOfInertia - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds AreaMomentOfInertia units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/BitRate/UnitsNet.NanoFramework.BitRate.nuspec b/UnitsNet.NanoFramework/GeneratedCode/BitRate/UnitsNet.NanoFramework.BitRate.nuspec index ee6ca4a5cc..24fa166f7a 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/BitRate/UnitsNet.NanoFramework.BitRate.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/BitRate/UnitsNet.NanoFramework.BitRate.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.BitRate - 6.0.0-pre002 + 6.0.0-pre006 Units.NET BitRate - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds BitRate units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/BrakeSpecificFuelConsumption/UnitsNet.NanoFramework.BrakeSpecificFuelConsumption.nuspec b/UnitsNet.NanoFramework/GeneratedCode/BrakeSpecificFuelConsumption/UnitsNet.NanoFramework.BrakeSpecificFuelConsumption.nuspec index dbdb7032c8..003afcbdf4 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/BrakeSpecificFuelConsumption/UnitsNet.NanoFramework.BrakeSpecificFuelConsumption.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/BrakeSpecificFuelConsumption/UnitsNet.NanoFramework.BrakeSpecificFuelConsumption.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.BrakeSpecificFuelConsumption - 6.0.0-pre002 + 6.0.0-pre006 Units.NET BrakeSpecificFuelConsumption - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds BrakeSpecificFuelConsumption units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/Capacitance/UnitsNet.NanoFramework.Capacitance.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Capacitance/UnitsNet.NanoFramework.Capacitance.nuspec index 3bf8166c28..bcb37f871a 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/Capacitance/UnitsNet.NanoFramework.Capacitance.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/Capacitance/UnitsNet.NanoFramework.Capacitance.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.Capacitance - 6.0.0-pre002 + 6.0.0-pre006 Units.NET Capacitance - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds Capacitance units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/CoefficientOfThermalExpansion/UnitsNet.NanoFramework.CoefficientOfThermalExpansion.nuspec b/UnitsNet.NanoFramework/GeneratedCode/CoefficientOfThermalExpansion/UnitsNet.NanoFramework.CoefficientOfThermalExpansion.nuspec index 39682561df..7a55bc80f5 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/CoefficientOfThermalExpansion/UnitsNet.NanoFramework.CoefficientOfThermalExpansion.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/CoefficientOfThermalExpansion/UnitsNet.NanoFramework.CoefficientOfThermalExpansion.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.CoefficientOfThermalExpansion - 6.0.0-pre002 + 6.0.0-pre006 Units.NET CoefficientOfThermalExpansion - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds CoefficientOfThermalExpansion units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/Compressibility/UnitsNet.NanoFramework.Compressibility.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Compressibility/UnitsNet.NanoFramework.Compressibility.nuspec index f9abdf216f..6bdcbb405a 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/Compressibility/UnitsNet.NanoFramework.Compressibility.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/Compressibility/UnitsNet.NanoFramework.Compressibility.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.Compressibility - 6.0.0-pre002 + 6.0.0-pre006 Units.NET Compressibility - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds Compressibility units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/Density/UnitsNet.NanoFramework.Density.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Density/UnitsNet.NanoFramework.Density.nuspec index 18f5d7de62..a8bd31b8fa 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/Density/UnitsNet.NanoFramework.Density.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/Density/UnitsNet.NanoFramework.Density.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.Density - 6.0.0-pre002 + 6.0.0-pre006 Units.NET Density - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds Density units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/Duration/UnitsNet.NanoFramework.Duration.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Duration/UnitsNet.NanoFramework.Duration.nuspec index 9e004c581f..6767f55c1d 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/Duration/UnitsNet.NanoFramework.Duration.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/Duration/UnitsNet.NanoFramework.Duration.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.Duration - 6.0.0-pre002 + 6.0.0-pre006 Units.NET Duration - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds Duration units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/DynamicViscosity/UnitsNet.NanoFramework.DynamicViscosity.nuspec b/UnitsNet.NanoFramework/GeneratedCode/DynamicViscosity/UnitsNet.NanoFramework.DynamicViscosity.nuspec index 9e6fe9358c..c1a8d792a2 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/DynamicViscosity/UnitsNet.NanoFramework.DynamicViscosity.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/DynamicViscosity/UnitsNet.NanoFramework.DynamicViscosity.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.DynamicViscosity - 6.0.0-pre002 + 6.0.0-pre006 Units.NET DynamicViscosity - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds DynamicViscosity units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricAdmittance/UnitsNet.NanoFramework.ElectricAdmittance.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricAdmittance/UnitsNet.NanoFramework.ElectricAdmittance.nuspec index 2e072e824e..45f311888e 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/ElectricAdmittance/UnitsNet.NanoFramework.ElectricAdmittance.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricAdmittance/UnitsNet.NanoFramework.ElectricAdmittance.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.ElectricAdmittance - 6.0.0-pre002 + 6.0.0-pre006 Units.NET ElectricAdmittance - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds ElectricAdmittance units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricCharge/UnitsNet.NanoFramework.ElectricCharge.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricCharge/UnitsNet.NanoFramework.ElectricCharge.nuspec index 91e535f696..f985c484b8 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/ElectricCharge/UnitsNet.NanoFramework.ElectricCharge.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricCharge/UnitsNet.NanoFramework.ElectricCharge.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.ElectricCharge - 6.0.0-pre002 + 6.0.0-pre006 Units.NET ElectricCharge - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds ElectricCharge units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricChargeDensity/UnitsNet.NanoFramework.ElectricChargeDensity.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricChargeDensity/UnitsNet.NanoFramework.ElectricChargeDensity.nuspec index adba848d52..6d477c716c 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/ElectricChargeDensity/UnitsNet.NanoFramework.ElectricChargeDensity.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricChargeDensity/UnitsNet.NanoFramework.ElectricChargeDensity.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.ElectricChargeDensity - 6.0.0-pre002 + 6.0.0-pre006 Units.NET ElectricChargeDensity - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds ElectricChargeDensity units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricConductance/UnitsNet.NanoFramework.ElectricConductance.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricConductance/UnitsNet.NanoFramework.ElectricConductance.nuspec index 463d61299e..135f95b089 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/ElectricConductance/UnitsNet.NanoFramework.ElectricConductance.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricConductance/UnitsNet.NanoFramework.ElectricConductance.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.ElectricConductance - 6.0.0-pre002 + 6.0.0-pre006 Units.NET ElectricConductance - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds ElectricConductance units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricConductivity/UnitsNet.NanoFramework.ElectricConductivity.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricConductivity/UnitsNet.NanoFramework.ElectricConductivity.nuspec index 61770d3423..0546545f73 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/ElectricConductivity/UnitsNet.NanoFramework.ElectricConductivity.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricConductivity/UnitsNet.NanoFramework.ElectricConductivity.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.ElectricConductivity - 6.0.0-pre002 + 6.0.0-pre006 Units.NET ElectricConductivity - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds ElectricConductivity units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrent/UnitsNet.NanoFramework.ElectricCurrent.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrent/UnitsNet.NanoFramework.ElectricCurrent.nuspec index 6cb9ac7e5b..50b90312de 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrent/UnitsNet.NanoFramework.ElectricCurrent.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrent/UnitsNet.NanoFramework.ElectricCurrent.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.ElectricCurrent - 6.0.0-pre002 + 6.0.0-pre006 Units.NET ElectricCurrent - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds ElectricCurrent units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrentDensity/UnitsNet.NanoFramework.ElectricCurrentDensity.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrentDensity/UnitsNet.NanoFramework.ElectricCurrentDensity.nuspec index cd4d1c8c66..4fe7d78796 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrentDensity/UnitsNet.NanoFramework.ElectricCurrentDensity.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrentDensity/UnitsNet.NanoFramework.ElectricCurrentDensity.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.ElectricCurrentDensity - 6.0.0-pre002 + 6.0.0-pre006 Units.NET ElectricCurrentDensity - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds ElectricCurrentDensity units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrentGradient/UnitsNet.NanoFramework.ElectricCurrentGradient.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrentGradient/UnitsNet.NanoFramework.ElectricCurrentGradient.nuspec index c61c20f617..e492038be0 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrentGradient/UnitsNet.NanoFramework.ElectricCurrentGradient.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrentGradient/UnitsNet.NanoFramework.ElectricCurrentGradient.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.ElectricCurrentGradient - 6.0.0-pre002 + 6.0.0-pre006 Units.NET ElectricCurrentGradient - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds ElectricCurrentGradient units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricField/UnitsNet.NanoFramework.ElectricField.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricField/UnitsNet.NanoFramework.ElectricField.nuspec index eeb466f4ca..42dee45723 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/ElectricField/UnitsNet.NanoFramework.ElectricField.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricField/UnitsNet.NanoFramework.ElectricField.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.ElectricField - 6.0.0-pre002 + 6.0.0-pre006 Units.NET ElectricField - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds ElectricField units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricInductance/UnitsNet.NanoFramework.ElectricInductance.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricInductance/UnitsNet.NanoFramework.ElectricInductance.nuspec index 75c81bf632..eecb8261d9 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/ElectricInductance/UnitsNet.NanoFramework.ElectricInductance.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricInductance/UnitsNet.NanoFramework.ElectricInductance.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.ElectricInductance - 6.0.0-pre002 + 6.0.0-pre006 Units.NET ElectricInductance - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds ElectricInductance units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricPotential/UnitsNet.NanoFramework.ElectricPotential.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricPotential/UnitsNet.NanoFramework.ElectricPotential.nuspec index fc97fc6289..ac39144ae5 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/ElectricPotential/UnitsNet.NanoFramework.ElectricPotential.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricPotential/UnitsNet.NanoFramework.ElectricPotential.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.ElectricPotential - 6.0.0-pre002 + 6.0.0-pre006 Units.NET ElectricPotential - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds ElectricPotential units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricPotentialAc/UnitsNet.NanoFramework.ElectricPotentialAc.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricPotentialAc/UnitsNet.NanoFramework.ElectricPotentialAc.nuspec index 0e572f241e..f892313d19 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/ElectricPotentialAc/UnitsNet.NanoFramework.ElectricPotentialAc.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricPotentialAc/UnitsNet.NanoFramework.ElectricPotentialAc.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.ElectricPotentialAc - 6.0.0-pre002 + 6.0.0-pre006 Units.NET ElectricPotentialAc - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds ElectricPotentialAc units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricPotentialChangeRate/UnitsNet.NanoFramework.ElectricPotentialChangeRate.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricPotentialChangeRate/UnitsNet.NanoFramework.ElectricPotentialChangeRate.nuspec index 7cfe7c46f0..3108512dad 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/ElectricPotentialChangeRate/UnitsNet.NanoFramework.ElectricPotentialChangeRate.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricPotentialChangeRate/UnitsNet.NanoFramework.ElectricPotentialChangeRate.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.ElectricPotentialChangeRate - 6.0.0-pre002 + 6.0.0-pre006 Units.NET ElectricPotentialChangeRate - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds ElectricPotentialChangeRate units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricPotentialDc/UnitsNet.NanoFramework.ElectricPotentialDc.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricPotentialDc/UnitsNet.NanoFramework.ElectricPotentialDc.nuspec index 54cd5d7e29..8c5bf8d05c 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/ElectricPotentialDc/UnitsNet.NanoFramework.ElectricPotentialDc.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricPotentialDc/UnitsNet.NanoFramework.ElectricPotentialDc.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.ElectricPotentialDc - 6.0.0-pre002 + 6.0.0-pre006 Units.NET ElectricPotentialDc - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds ElectricPotentialDc units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricResistance/UnitsNet.NanoFramework.ElectricResistance.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricResistance/UnitsNet.NanoFramework.ElectricResistance.nuspec index 6779f40d15..8c5d2a069b 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/ElectricResistance/UnitsNet.NanoFramework.ElectricResistance.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricResistance/UnitsNet.NanoFramework.ElectricResistance.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.ElectricResistance - 6.0.0-pre002 + 6.0.0-pre006 Units.NET ElectricResistance - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds ElectricResistance units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricResistivity/UnitsNet.NanoFramework.ElectricResistivity.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricResistivity/UnitsNet.NanoFramework.ElectricResistivity.nuspec index ddb6231d4a..d7104781c0 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/ElectricResistivity/UnitsNet.NanoFramework.ElectricResistivity.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricResistivity/UnitsNet.NanoFramework.ElectricResistivity.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.ElectricResistivity - 6.0.0-pre002 + 6.0.0-pre006 Units.NET ElectricResistivity - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds ElectricResistivity units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricSurfaceChargeDensity/UnitsNet.NanoFramework.ElectricSurfaceChargeDensity.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricSurfaceChargeDensity/UnitsNet.NanoFramework.ElectricSurfaceChargeDensity.nuspec index 2d2540b326..f563a573df 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/ElectricSurfaceChargeDensity/UnitsNet.NanoFramework.ElectricSurfaceChargeDensity.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricSurfaceChargeDensity/UnitsNet.NanoFramework.ElectricSurfaceChargeDensity.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.ElectricSurfaceChargeDensity - 6.0.0-pre002 + 6.0.0-pre006 Units.NET ElectricSurfaceChargeDensity - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds ElectricSurfaceChargeDensity units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/Energy/UnitsNet.NanoFramework.Energy.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Energy/UnitsNet.NanoFramework.Energy.nuspec index a8b81f536d..3963e0675c 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/Energy/UnitsNet.NanoFramework.Energy.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/Energy/UnitsNet.NanoFramework.Energy.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.Energy - 6.0.0-pre002 + 6.0.0-pre006 Units.NET Energy - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds Energy units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/EnergyDensity/UnitsNet.NanoFramework.EnergyDensity.nuspec b/UnitsNet.NanoFramework/GeneratedCode/EnergyDensity/UnitsNet.NanoFramework.EnergyDensity.nuspec index 41721e71a9..4ddc722375 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/EnergyDensity/UnitsNet.NanoFramework.EnergyDensity.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/EnergyDensity/UnitsNet.NanoFramework.EnergyDensity.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.EnergyDensity - 6.0.0-pre002 + 6.0.0-pre006 Units.NET EnergyDensity - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds EnergyDensity units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/Entropy/UnitsNet.NanoFramework.Entropy.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Entropy/UnitsNet.NanoFramework.Entropy.nuspec index dc37d5f572..388f627fad 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/Entropy/UnitsNet.NanoFramework.Entropy.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/Entropy/UnitsNet.NanoFramework.Entropy.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.Entropy - 6.0.0-pre002 + 6.0.0-pre006 Units.NET Entropy - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds Entropy units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/Force/UnitsNet.NanoFramework.Force.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Force/UnitsNet.NanoFramework.Force.nuspec index dd091f465e..d7968e1654 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/Force/UnitsNet.NanoFramework.Force.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/Force/UnitsNet.NanoFramework.Force.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.Force - 6.0.0-pre002 + 6.0.0-pre006 Units.NET Force - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds Force units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/ForceChangeRate/UnitsNet.NanoFramework.ForceChangeRate.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ForceChangeRate/UnitsNet.NanoFramework.ForceChangeRate.nuspec index f9b3cf8f55..d3d939aa7e 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/ForceChangeRate/UnitsNet.NanoFramework.ForceChangeRate.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/ForceChangeRate/UnitsNet.NanoFramework.ForceChangeRate.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.ForceChangeRate - 6.0.0-pre002 + 6.0.0-pre006 Units.NET ForceChangeRate - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds ForceChangeRate units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/ForcePerLength/UnitsNet.NanoFramework.ForcePerLength.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ForcePerLength/UnitsNet.NanoFramework.ForcePerLength.nuspec index 6be296fb2e..b015e03fad 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/ForcePerLength/UnitsNet.NanoFramework.ForcePerLength.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/ForcePerLength/UnitsNet.NanoFramework.ForcePerLength.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.ForcePerLength - 6.0.0-pre002 + 6.0.0-pre006 Units.NET ForcePerLength - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds ForcePerLength units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/Frequency/UnitsNet.NanoFramework.Frequency.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Frequency/UnitsNet.NanoFramework.Frequency.nuspec index 3594f61cf8..cf9bad5d09 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/Frequency/UnitsNet.NanoFramework.Frequency.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/Frequency/UnitsNet.NanoFramework.Frequency.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.Frequency - 6.0.0-pre002 + 6.0.0-pre006 Units.NET Frequency - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds Frequency units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/FuelEfficiency/UnitsNet.NanoFramework.FuelEfficiency.nuspec b/UnitsNet.NanoFramework/GeneratedCode/FuelEfficiency/UnitsNet.NanoFramework.FuelEfficiency.nuspec index a4f3a4186b..df7a63b78d 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/FuelEfficiency/UnitsNet.NanoFramework.FuelEfficiency.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/FuelEfficiency/UnitsNet.NanoFramework.FuelEfficiency.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.FuelEfficiency - 6.0.0-pre002 + 6.0.0-pre006 Units.NET FuelEfficiency - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds FuelEfficiency units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/HeatFlux/UnitsNet.NanoFramework.HeatFlux.nuspec b/UnitsNet.NanoFramework/GeneratedCode/HeatFlux/UnitsNet.NanoFramework.HeatFlux.nuspec index 3f96f5901c..02a645988b 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/HeatFlux/UnitsNet.NanoFramework.HeatFlux.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/HeatFlux/UnitsNet.NanoFramework.HeatFlux.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.HeatFlux - 6.0.0-pre002 + 6.0.0-pre006 Units.NET HeatFlux - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds HeatFlux units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/HeatTransferCoefficient/UnitsNet.NanoFramework.HeatTransferCoefficient.nuspec b/UnitsNet.NanoFramework/GeneratedCode/HeatTransferCoefficient/UnitsNet.NanoFramework.HeatTransferCoefficient.nuspec index 85d3d7e030..9b379dad9b 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/HeatTransferCoefficient/UnitsNet.NanoFramework.HeatTransferCoefficient.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/HeatTransferCoefficient/UnitsNet.NanoFramework.HeatTransferCoefficient.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.HeatTransferCoefficient - 6.0.0-pre002 + 6.0.0-pre006 Units.NET HeatTransferCoefficient - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds HeatTransferCoefficient units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/Illuminance/UnitsNet.NanoFramework.Illuminance.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Illuminance/UnitsNet.NanoFramework.Illuminance.nuspec index f968214c64..3e367323f5 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/Illuminance/UnitsNet.NanoFramework.Illuminance.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/Illuminance/UnitsNet.NanoFramework.Illuminance.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.Illuminance - 6.0.0-pre002 + 6.0.0-pre006 Units.NET Illuminance - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds Illuminance units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/Impulse/UnitsNet.NanoFramework.Impulse.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Impulse/UnitsNet.NanoFramework.Impulse.nuspec index 74ddac9282..02a1693a15 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/Impulse/UnitsNet.NanoFramework.Impulse.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/Impulse/UnitsNet.NanoFramework.Impulse.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.Impulse - 6.0.0-pre002 + 6.0.0-pre006 Units.NET Impulse - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds Impulse units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/Information/UnitsNet.NanoFramework.Information.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Information/UnitsNet.NanoFramework.Information.nuspec index 1547d59f79..b9ab5561d4 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/Information/UnitsNet.NanoFramework.Information.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/Information/UnitsNet.NanoFramework.Information.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.Information - 6.0.0-pre002 + 6.0.0-pre006 Units.NET Information - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds Information units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/Irradiance/UnitsNet.NanoFramework.Irradiance.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Irradiance/UnitsNet.NanoFramework.Irradiance.nuspec index 96955397c1..ac1bd8bb2f 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/Irradiance/UnitsNet.NanoFramework.Irradiance.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/Irradiance/UnitsNet.NanoFramework.Irradiance.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.Irradiance - 6.0.0-pre002 + 6.0.0-pre006 Units.NET Irradiance - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds Irradiance units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/Irradiation/UnitsNet.NanoFramework.Irradiation.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Irradiation/UnitsNet.NanoFramework.Irradiation.nuspec index b03915d644..be125334fc 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/Irradiation/UnitsNet.NanoFramework.Irradiation.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/Irradiation/UnitsNet.NanoFramework.Irradiation.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.Irradiation - 6.0.0-pre002 + 6.0.0-pre006 Units.NET Irradiation - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds Irradiation units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/Jerk/UnitsNet.NanoFramework.Jerk.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Jerk/UnitsNet.NanoFramework.Jerk.nuspec index 57345f4a53..24a23302bf 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/Jerk/UnitsNet.NanoFramework.Jerk.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/Jerk/UnitsNet.NanoFramework.Jerk.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.Jerk - 6.0.0-pre002 + 6.0.0-pre006 Units.NET Jerk - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds Jerk units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/KinematicViscosity/UnitsNet.NanoFramework.KinematicViscosity.nuspec b/UnitsNet.NanoFramework/GeneratedCode/KinematicViscosity/UnitsNet.NanoFramework.KinematicViscosity.nuspec index b34e77e8dc..0ac3133fa4 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/KinematicViscosity/UnitsNet.NanoFramework.KinematicViscosity.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/KinematicViscosity/UnitsNet.NanoFramework.KinematicViscosity.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.KinematicViscosity - 6.0.0-pre002 + 6.0.0-pre006 Units.NET KinematicViscosity - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds KinematicViscosity units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/LapseRate/UnitsNet.NanoFramework.LapseRate.nuspec b/UnitsNet.NanoFramework/GeneratedCode/LapseRate/UnitsNet.NanoFramework.LapseRate.nuspec index d16cfb4ef3..f1ff325ed7 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/LapseRate/UnitsNet.NanoFramework.LapseRate.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/LapseRate/UnitsNet.NanoFramework.LapseRate.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.LapseRate - 6.0.0-pre002 + 6.0.0-pre006 Units.NET LapseRate - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds LapseRate units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/LeakRate/UnitsNet.NanoFramework.LeakRate.nuspec b/UnitsNet.NanoFramework/GeneratedCode/LeakRate/UnitsNet.NanoFramework.LeakRate.nuspec index 0d554c02d2..b0b0739746 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/LeakRate/UnitsNet.NanoFramework.LeakRate.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/LeakRate/UnitsNet.NanoFramework.LeakRate.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.LeakRate - 6.0.0-pre002 + 6.0.0-pre006 Units.NET LeakRate - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds LeakRate units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/Length/UnitsNet.NanoFramework.Length.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Length/UnitsNet.NanoFramework.Length.nuspec index c688bfc007..e18aeb53d8 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/Length/UnitsNet.NanoFramework.Length.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/Length/UnitsNet.NanoFramework.Length.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.Length - 6.0.0-pre002 + 6.0.0-pre006 Units.NET Length - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds Length units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/Level/UnitsNet.NanoFramework.Level.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Level/UnitsNet.NanoFramework.Level.nuspec index c7e83857a4..9f94e026e2 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/Level/UnitsNet.NanoFramework.Level.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/Level/UnitsNet.NanoFramework.Level.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.Level - 6.0.0-pre002 + 6.0.0-pre006 Units.NET Level - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds Level units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/LinearDensity/UnitsNet.NanoFramework.LinearDensity.nuspec b/UnitsNet.NanoFramework/GeneratedCode/LinearDensity/UnitsNet.NanoFramework.LinearDensity.nuspec index 69b4d071c6..750d6573fe 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/LinearDensity/UnitsNet.NanoFramework.LinearDensity.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/LinearDensity/UnitsNet.NanoFramework.LinearDensity.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.LinearDensity - 6.0.0-pre002 + 6.0.0-pre006 Units.NET LinearDensity - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds LinearDensity units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/LinearPowerDensity/UnitsNet.NanoFramework.LinearPowerDensity.nuspec b/UnitsNet.NanoFramework/GeneratedCode/LinearPowerDensity/UnitsNet.NanoFramework.LinearPowerDensity.nuspec index db5cedefe1..d42474b484 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/LinearPowerDensity/UnitsNet.NanoFramework.LinearPowerDensity.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/LinearPowerDensity/UnitsNet.NanoFramework.LinearPowerDensity.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.LinearPowerDensity - 6.0.0-pre002 + 6.0.0-pre006 Units.NET LinearPowerDensity - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds LinearPowerDensity units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/Luminance/UnitsNet.NanoFramework.Luminance.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Luminance/UnitsNet.NanoFramework.Luminance.nuspec index 049f02c7f6..7b43161bcb 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/Luminance/UnitsNet.NanoFramework.Luminance.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/Luminance/UnitsNet.NanoFramework.Luminance.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.Luminance - 6.0.0-pre002 + 6.0.0-pre006 Units.NET Luminance - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds Luminance units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/Luminosity/UnitsNet.NanoFramework.Luminosity.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Luminosity/UnitsNet.NanoFramework.Luminosity.nuspec index 24bad24a07..a0001f3579 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/Luminosity/UnitsNet.NanoFramework.Luminosity.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/Luminosity/UnitsNet.NanoFramework.Luminosity.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.Luminosity - 6.0.0-pre002 + 6.0.0-pre006 Units.NET Luminosity - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds Luminosity units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/LuminousFlux/UnitsNet.NanoFramework.LuminousFlux.nuspec b/UnitsNet.NanoFramework/GeneratedCode/LuminousFlux/UnitsNet.NanoFramework.LuminousFlux.nuspec index 666db97c73..c8cfb7e19a 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/LuminousFlux/UnitsNet.NanoFramework.LuminousFlux.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/LuminousFlux/UnitsNet.NanoFramework.LuminousFlux.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.LuminousFlux - 6.0.0-pre002 + 6.0.0-pre006 Units.NET LuminousFlux - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds LuminousFlux units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/LuminousIntensity/UnitsNet.NanoFramework.LuminousIntensity.nuspec b/UnitsNet.NanoFramework/GeneratedCode/LuminousIntensity/UnitsNet.NanoFramework.LuminousIntensity.nuspec index f0f6ea674c..5329c9101f 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/LuminousIntensity/UnitsNet.NanoFramework.LuminousIntensity.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/LuminousIntensity/UnitsNet.NanoFramework.LuminousIntensity.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.LuminousIntensity - 6.0.0-pre002 + 6.0.0-pre006 Units.NET LuminousIntensity - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds LuminousIntensity units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/MagneticField/UnitsNet.NanoFramework.MagneticField.nuspec b/UnitsNet.NanoFramework/GeneratedCode/MagneticField/UnitsNet.NanoFramework.MagneticField.nuspec index fd09b77b75..437cb19161 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/MagneticField/UnitsNet.NanoFramework.MagneticField.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/MagneticField/UnitsNet.NanoFramework.MagneticField.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.MagneticField - 6.0.0-pre002 + 6.0.0-pre006 Units.NET MagneticField - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds MagneticField units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/MagneticFlux/UnitsNet.NanoFramework.MagneticFlux.nuspec b/UnitsNet.NanoFramework/GeneratedCode/MagneticFlux/UnitsNet.NanoFramework.MagneticFlux.nuspec index 24341242a3..f6437c7686 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/MagneticFlux/UnitsNet.NanoFramework.MagneticFlux.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/MagneticFlux/UnitsNet.NanoFramework.MagneticFlux.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.MagneticFlux - 6.0.0-pre002 + 6.0.0-pre006 Units.NET MagneticFlux - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds MagneticFlux units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/Magnetization/UnitsNet.NanoFramework.Magnetization.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Magnetization/UnitsNet.NanoFramework.Magnetization.nuspec index bf4d97b1e0..49a6048253 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/Magnetization/UnitsNet.NanoFramework.Magnetization.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/Magnetization/UnitsNet.NanoFramework.Magnetization.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.Magnetization - 6.0.0-pre002 + 6.0.0-pre006 Units.NET Magnetization - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds Magnetization units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/Mass/UnitsNet.NanoFramework.Mass.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Mass/UnitsNet.NanoFramework.Mass.nuspec index a7ccf3916f..204a7f5fd3 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/Mass/UnitsNet.NanoFramework.Mass.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/Mass/UnitsNet.NanoFramework.Mass.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.Mass - 6.0.0-pre002 + 6.0.0-pre006 Units.NET Mass - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds Mass units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/MassConcentration/UnitsNet.NanoFramework.MassConcentration.nuspec b/UnitsNet.NanoFramework/GeneratedCode/MassConcentration/UnitsNet.NanoFramework.MassConcentration.nuspec index c54cf9e79f..5463174583 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/MassConcentration/UnitsNet.NanoFramework.MassConcentration.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/MassConcentration/UnitsNet.NanoFramework.MassConcentration.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.MassConcentration - 6.0.0-pre002 + 6.0.0-pre006 Units.NET MassConcentration - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds MassConcentration units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/MassFlow/UnitsNet.NanoFramework.MassFlow.nuspec b/UnitsNet.NanoFramework/GeneratedCode/MassFlow/UnitsNet.NanoFramework.MassFlow.nuspec index 9a22ed732d..5bc2d9f0fb 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/MassFlow/UnitsNet.NanoFramework.MassFlow.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/MassFlow/UnitsNet.NanoFramework.MassFlow.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.MassFlow - 6.0.0-pre002 + 6.0.0-pre006 Units.NET MassFlow - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds MassFlow units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/MassFlux/UnitsNet.NanoFramework.MassFlux.nuspec b/UnitsNet.NanoFramework/GeneratedCode/MassFlux/UnitsNet.NanoFramework.MassFlux.nuspec index 0b7de513c1..fa9360ef52 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/MassFlux/UnitsNet.NanoFramework.MassFlux.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/MassFlux/UnitsNet.NanoFramework.MassFlux.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.MassFlux - 6.0.0-pre002 + 6.0.0-pre006 Units.NET MassFlux - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds MassFlux units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/MassFraction/UnitsNet.NanoFramework.MassFraction.nuspec b/UnitsNet.NanoFramework/GeneratedCode/MassFraction/UnitsNet.NanoFramework.MassFraction.nuspec index 5fc60bb002..a3ba1946a7 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/MassFraction/UnitsNet.NanoFramework.MassFraction.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/MassFraction/UnitsNet.NanoFramework.MassFraction.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.MassFraction - 6.0.0-pre002 + 6.0.0-pre006 Units.NET MassFraction - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds MassFraction units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/MassMomentOfInertia/UnitsNet.NanoFramework.MassMomentOfInertia.nuspec b/UnitsNet.NanoFramework/GeneratedCode/MassMomentOfInertia/UnitsNet.NanoFramework.MassMomentOfInertia.nuspec index e8ed3169f1..ab16956a7a 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/MassMomentOfInertia/UnitsNet.NanoFramework.MassMomentOfInertia.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/MassMomentOfInertia/UnitsNet.NanoFramework.MassMomentOfInertia.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.MassMomentOfInertia - 6.0.0-pre002 + 6.0.0-pre006 Units.NET MassMomentOfInertia - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds MassMomentOfInertia units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/Molality/UnitsNet.NanoFramework.Molality.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Molality/UnitsNet.NanoFramework.Molality.nuspec index f72ceab9ac..554bdecda1 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/Molality/UnitsNet.NanoFramework.Molality.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/Molality/UnitsNet.NanoFramework.Molality.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.Molality - 6.0.0-pre002 + 6.0.0-pre006 Units.NET Molality - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds Molality units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/MolarEnergy/UnitsNet.NanoFramework.MolarEnergy.nuspec b/UnitsNet.NanoFramework/GeneratedCode/MolarEnergy/UnitsNet.NanoFramework.MolarEnergy.nuspec index 6569b938d3..606ef4bd82 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/MolarEnergy/UnitsNet.NanoFramework.MolarEnergy.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/MolarEnergy/UnitsNet.NanoFramework.MolarEnergy.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.MolarEnergy - 6.0.0-pre002 + 6.0.0-pre006 Units.NET MolarEnergy - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds MolarEnergy units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/MolarEntropy/UnitsNet.NanoFramework.MolarEntropy.nuspec b/UnitsNet.NanoFramework/GeneratedCode/MolarEntropy/UnitsNet.NanoFramework.MolarEntropy.nuspec index 942431d7a5..f71123bf2d 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/MolarEntropy/UnitsNet.NanoFramework.MolarEntropy.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/MolarEntropy/UnitsNet.NanoFramework.MolarEntropy.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.MolarEntropy - 6.0.0-pre002 + 6.0.0-pre006 Units.NET MolarEntropy - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds MolarEntropy units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/MolarFlow/UnitsNet.NanoFramework.MolarFlow.nuspec b/UnitsNet.NanoFramework/GeneratedCode/MolarFlow/UnitsNet.NanoFramework.MolarFlow.nuspec index d29b883f16..ef23e33842 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/MolarFlow/UnitsNet.NanoFramework.MolarFlow.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/MolarFlow/UnitsNet.NanoFramework.MolarFlow.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.MolarFlow - 6.0.0-pre002 + 6.0.0-pre006 Units.NET MolarFlow - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds MolarFlow units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/MolarMass/UnitsNet.NanoFramework.MolarMass.nuspec b/UnitsNet.NanoFramework/GeneratedCode/MolarMass/UnitsNet.NanoFramework.MolarMass.nuspec index 359957c597..2733e8387d 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/MolarMass/UnitsNet.NanoFramework.MolarMass.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/MolarMass/UnitsNet.NanoFramework.MolarMass.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.MolarMass - 6.0.0-pre002 + 6.0.0-pre006 Units.NET MolarMass - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds MolarMass units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/Molarity/UnitsNet.NanoFramework.Molarity.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Molarity/UnitsNet.NanoFramework.Molarity.nuspec index bf863c1ddc..e29d04a9de 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/Molarity/UnitsNet.NanoFramework.Molarity.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/Molarity/UnitsNet.NanoFramework.Molarity.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.Molarity - 6.0.0-pre002 + 6.0.0-pre006 Units.NET Molarity - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds Molarity units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/Permeability/UnitsNet.NanoFramework.Permeability.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Permeability/UnitsNet.NanoFramework.Permeability.nuspec index 422264538b..a38f6720f5 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/Permeability/UnitsNet.NanoFramework.Permeability.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/Permeability/UnitsNet.NanoFramework.Permeability.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.Permeability - 6.0.0-pre002 + 6.0.0-pre006 Units.NET Permeability - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds Permeability units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/Permittivity/UnitsNet.NanoFramework.Permittivity.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Permittivity/UnitsNet.NanoFramework.Permittivity.nuspec index b2d910146a..4392da511d 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/Permittivity/UnitsNet.NanoFramework.Permittivity.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/Permittivity/UnitsNet.NanoFramework.Permittivity.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.Permittivity - 6.0.0-pre002 + 6.0.0-pre006 Units.NET Permittivity - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds Permittivity units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/PorousMediumPermeability/UnitsNet.NanoFramework.PorousMediumPermeability.nuspec b/UnitsNet.NanoFramework/GeneratedCode/PorousMediumPermeability/UnitsNet.NanoFramework.PorousMediumPermeability.nuspec index c5385738fa..72d46532f1 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/PorousMediumPermeability/UnitsNet.NanoFramework.PorousMediumPermeability.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/PorousMediumPermeability/UnitsNet.NanoFramework.PorousMediumPermeability.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.PorousMediumPermeability - 6.0.0-pre002 + 6.0.0-pre006 Units.NET PorousMediumPermeability - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds PorousMediumPermeability units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/Power/UnitsNet.NanoFramework.Power.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Power/UnitsNet.NanoFramework.Power.nuspec index bd143b1593..c50208d87b 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/Power/UnitsNet.NanoFramework.Power.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/Power/UnitsNet.NanoFramework.Power.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.Power - 6.0.0-pre002 + 6.0.0-pre006 Units.NET Power - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds Power units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/PowerDensity/UnitsNet.NanoFramework.PowerDensity.nuspec b/UnitsNet.NanoFramework/GeneratedCode/PowerDensity/UnitsNet.NanoFramework.PowerDensity.nuspec index 7e88b11c18..bd96df289b 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/PowerDensity/UnitsNet.NanoFramework.PowerDensity.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/PowerDensity/UnitsNet.NanoFramework.PowerDensity.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.PowerDensity - 6.0.0-pre002 + 6.0.0-pre006 Units.NET PowerDensity - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds PowerDensity units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/PowerRatio/UnitsNet.NanoFramework.PowerRatio.nuspec b/UnitsNet.NanoFramework/GeneratedCode/PowerRatio/UnitsNet.NanoFramework.PowerRatio.nuspec index 3dbc5ac840..b84b3659ef 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/PowerRatio/UnitsNet.NanoFramework.PowerRatio.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/PowerRatio/UnitsNet.NanoFramework.PowerRatio.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.PowerRatio - 6.0.0-pre002 + 6.0.0-pre006 Units.NET PowerRatio - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds PowerRatio units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/Pressure/UnitsNet.NanoFramework.Pressure.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Pressure/UnitsNet.NanoFramework.Pressure.nuspec index 81e54b4e97..0dff49b75a 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/Pressure/UnitsNet.NanoFramework.Pressure.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/Pressure/UnitsNet.NanoFramework.Pressure.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.Pressure - 6.0.0-pre002 + 6.0.0-pre006 Units.NET Pressure - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds Pressure units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/PressureChangeRate/UnitsNet.NanoFramework.PressureChangeRate.nuspec b/UnitsNet.NanoFramework/GeneratedCode/PressureChangeRate/UnitsNet.NanoFramework.PressureChangeRate.nuspec index ecf925c2b7..5dc156da08 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/PressureChangeRate/UnitsNet.NanoFramework.PressureChangeRate.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/PressureChangeRate/UnitsNet.NanoFramework.PressureChangeRate.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.PressureChangeRate - 6.0.0-pre002 + 6.0.0-pre006 Units.NET PressureChangeRate - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds PressureChangeRate units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Irradiation.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Irradiation.g.cs index 694d7ebee1..2f0fe42dd9 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Irradiation.g.cs +++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Irradiation.g.cs @@ -81,6 +81,11 @@ public Irradiation(double value, IrradiationUnit unit) public static Irradiation Zero { get; } = new Irradiation(0, BaseUnit); #region Conversion Properties + /// + /// Gets a value of this quantity converted into + /// + public double BtusPerSquareFoot => As(IrradiationUnit.BtuPerSquareFoot); + /// /// Gets a value of this quantity converted into /// @@ -96,6 +101,11 @@ public Irradiation(double value, IrradiationUnit unit) /// public double JoulesPerSquareMillimeter => As(IrradiationUnit.JoulePerSquareMillimeter); + /// + /// Gets a value of this quantity converted into + /// + public double KilobtusPerSquareFoot => As(IrradiationUnit.KilobtuPerSquareFoot); + /// /// Gets a value of this quantity converted into /// @@ -120,6 +130,11 @@ public Irradiation(double value, IrradiationUnit unit) #region Static Factory Methods + /// + /// Creates a from . + /// + public static Irradiation FromBtusPerSquareFoot(double btuspersquarefoot) => new Irradiation(btuspersquarefoot, IrradiationUnit.BtuPerSquareFoot); + /// /// Creates a from . /// @@ -135,6 +150,11 @@ public Irradiation(double value, IrradiationUnit unit) /// public static Irradiation FromJoulesPerSquareMillimeter(double joulespersquaremillimeter) => new Irradiation(joulespersquaremillimeter, IrradiationUnit.JoulePerSquareMillimeter); + /// + /// Creates a from . + /// + public static Irradiation FromKilobtusPerSquareFoot(double kilobtuspersquarefoot) => new Irradiation(kilobtuspersquarefoot, IrradiationUnit.KilobtuPerSquareFoot); + /// /// Creates a from . /// @@ -195,9 +215,11 @@ private double GetValueInBaseUnit() { return Unit switch { + IrradiationUnit.BtuPerSquareFoot => _value * (52752792631d / 4645152d), IrradiationUnit.JoulePerSquareCentimeter => _value * 1e4, IrradiationUnit.JoulePerSquareMeter => _value, IrradiationUnit.JoulePerSquareMillimeter => _value * 1e6, + IrradiationUnit.KilobtuPerSquareFoot => (_value * (52752792631d / 4645152d)) * 1e3d, IrradiationUnit.KilojoulePerSquareMeter => (_value) * 1e3d, IrradiationUnit.KilowattHourPerSquareMeter => (_value * 3600d) * 1e3d, IrradiationUnit.MillijoulePerSquareCentimeter => (_value * 1e4) * 1e-3d, @@ -215,9 +237,11 @@ private double GetValueAs(IrradiationUnit unit) return unit switch { + IrradiationUnit.BtuPerSquareFoot => baseUnitValue / (52752792631d / 4645152d), IrradiationUnit.JoulePerSquareCentimeter => baseUnitValue / 1e4, IrradiationUnit.JoulePerSquareMeter => baseUnitValue, IrradiationUnit.JoulePerSquareMillimeter => baseUnitValue / 1e6, + IrradiationUnit.KilobtuPerSquareFoot => (baseUnitValue / (52752792631d / 4645152d)) / 1e3d, IrradiationUnit.KilojoulePerSquareMeter => (baseUnitValue) / 1e3d, IrradiationUnit.KilowattHourPerSquareMeter => (baseUnitValue / 3600d) / 1e3d, IrradiationUnit.MillijoulePerSquareCentimeter => (baseUnitValue / 1e4) / 1e-3d, diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/RadiationEquivalentDose.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/RadiationEquivalentDose.g.cs new file mode 100644 index 0000000000..7dad4629ec --- /dev/null +++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/RadiationEquivalentDose.g.cs @@ -0,0 +1,217 @@ +//------------------------------------------------------------------------------ +// +// 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 UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities. +// +// +//------------------------------------------------------------------------------ + +// Licensed under MIT No Attribution, see LICENSE file at the root. +// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. + +using System; +using UnitsNet.Units; + +namespace UnitsNet +{ + /// + /// + /// Equivalent dose is a dose quantity representing the stochastic health effects of low levels of ionizing radiation on the human body which represents the probability of radiation-induced cancer and genetic damage. + /// + public struct RadiationEquivalentDose + { + /// + /// The numeric value this quantity was constructed with. + /// + private readonly double _value; + + /// + /// The unit this quantity was constructed with. + /// + private readonly RadiationEquivalentDoseUnit _unit; + + /// + /// The numeric value this quantity was constructed with. + /// + public double Value => _value; + + /// + public RadiationEquivalentDoseUnit Unit => _unit; + + /// + /// Creates the quantity with the given numeric value and unit. + /// + /// The numeric value to construct this quantity with. + /// The unit representation to construct this quantity with. + public RadiationEquivalentDose(double value, RadiationEquivalentDoseUnit unit) + { + _value = value; + _unit = unit; + } + + /// + /// The base unit of RadiationEquivalentDose, which is Second. All conversions go via this value. + /// + public static RadiationEquivalentDoseUnit BaseUnit { get; } = RadiationEquivalentDoseUnit.Sievert; + + /// + /// Represents the largest possible value of RadiationEquivalentDose. + /// + public static RadiationEquivalentDose MaxValue { get; } = new RadiationEquivalentDose(double.MaxValue, BaseUnit); + + /// + /// Represents the smallest possible value of RadiationEquivalentDose. + /// + public static RadiationEquivalentDose MinValue { get; } = new RadiationEquivalentDose(double.MinValue, BaseUnit); + + /// + /// Gets an instance of this quantity with a value of 0 in the base unit Second. + /// + public static RadiationEquivalentDose Zero { get; } = new RadiationEquivalentDose(0, BaseUnit); + #region Conversion Properties + + /// + /// Gets a value of this quantity converted into + /// + public double Microsieverts => As(RadiationEquivalentDoseUnit.Microsievert); + + /// + /// Gets a value of this quantity converted into + /// + public double MilliroentgensEquivalentMan => As(RadiationEquivalentDoseUnit.MilliroentgenEquivalentMan); + + /// + /// Gets a value of this quantity converted into + /// + public double Millisieverts => As(RadiationEquivalentDoseUnit.Millisievert); + + /// + /// Gets a value of this quantity converted into + /// + public double Nanosieverts => As(RadiationEquivalentDoseUnit.Nanosievert); + + /// + /// Gets a value of this quantity converted into + /// + public double RoentgensEquivalentMan => As(RadiationEquivalentDoseUnit.RoentgenEquivalentMan); + + /// + /// Gets a value of this quantity converted into + /// + public double Sieverts => As(RadiationEquivalentDoseUnit.Sievert); + + #endregion + + #region Static Factory Methods + + /// + /// Creates a from . + /// + public static RadiationEquivalentDose FromMicrosieverts(double microsieverts) => new RadiationEquivalentDose(microsieverts, RadiationEquivalentDoseUnit.Microsievert); + + /// + /// Creates a from . + /// + public static RadiationEquivalentDose FromMilliroentgensEquivalentMan(double milliroentgensequivalentman) => new RadiationEquivalentDose(milliroentgensequivalentman, RadiationEquivalentDoseUnit.MilliroentgenEquivalentMan); + + /// + /// Creates a from . + /// + public static RadiationEquivalentDose FromMillisieverts(double millisieverts) => new RadiationEquivalentDose(millisieverts, RadiationEquivalentDoseUnit.Millisievert); + + /// + /// Creates a from . + /// + public static RadiationEquivalentDose FromNanosieverts(double nanosieverts) => new RadiationEquivalentDose(nanosieverts, RadiationEquivalentDoseUnit.Nanosievert); + + /// + /// Creates a from . + /// + public static RadiationEquivalentDose FromRoentgensEquivalentMan(double roentgensequivalentman) => new RadiationEquivalentDose(roentgensequivalentman, RadiationEquivalentDoseUnit.RoentgenEquivalentMan); + + /// + /// Creates a from . + /// + public static RadiationEquivalentDose FromSieverts(double sieverts) => new RadiationEquivalentDose(sieverts, RadiationEquivalentDoseUnit.Sievert); + + /// + /// Dynamically convert from value and unit enum to . + /// + /// Value to convert from. + /// Unit to convert from. + /// RadiationEquivalentDose unit value. + public static RadiationEquivalentDose From(double value, RadiationEquivalentDoseUnit fromUnit) + { + return new RadiationEquivalentDose(value, fromUnit); + } + + #endregion + + #region Conversion Methods + + /// + /// Convert to the unit representation . + /// + /// Value converted to the specified unit. + public double As(RadiationEquivalentDoseUnit unit) => GetValueAs(unit); + + /// + /// Converts this RadiationEquivalentDose to another RadiationEquivalentDose with the unit representation . + /// + /// A RadiationEquivalentDose with the specified unit. + public RadiationEquivalentDose ToUnit(RadiationEquivalentDoseUnit unit) + { + var convertedValue = GetValueAs(unit); + return new RadiationEquivalentDose(convertedValue, unit); + } + + /// + /// 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 GetValueInBaseUnit() + { + return Unit switch + { + RadiationEquivalentDoseUnit.Microsievert => (_value) * 1e-6d, + RadiationEquivalentDoseUnit.MilliroentgenEquivalentMan => (_value / 100) * 1e-3d, + RadiationEquivalentDoseUnit.Millisievert => (_value) * 1e-3d, + RadiationEquivalentDoseUnit.Nanosievert => (_value) * 1e-9d, + RadiationEquivalentDoseUnit.RoentgenEquivalentMan => _value / 100, + RadiationEquivalentDoseUnit.Sievert => _value, + _ => throw new NotImplementedException($"Can not convert {Unit} to base units.") + }; + } + + private double GetValueAs(RadiationEquivalentDoseUnit unit) + { + if (Unit == unit) + return _value; + + var baseUnitValue = GetValueInBaseUnit(); + + return unit switch + { + RadiationEquivalentDoseUnit.Microsievert => (baseUnitValue) / 1e-6d, + RadiationEquivalentDoseUnit.MilliroentgenEquivalentMan => (baseUnitValue * 100) / 1e-3d, + RadiationEquivalentDoseUnit.Millisievert => (baseUnitValue) / 1e-3d, + RadiationEquivalentDoseUnit.Nanosievert => (baseUnitValue) / 1e-9d, + RadiationEquivalentDoseUnit.RoentgenEquivalentMan => baseUnitValue * 100, + RadiationEquivalentDoseUnit.Sievert => baseUnitValue, + _ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.") + }; + } + + #endregion + } +} + diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Volume.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Volume.g.cs index e42da04937..c552a1e486 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Volume.g.cs +++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Volume.g.cs @@ -670,7 +670,7 @@ private double GetValueInBaseUnit() VolumeUnit.CubicDecimeter => _value / 1e3, VolumeUnit.CubicFoot => _value * 2.8316846592e-2, VolumeUnit.CubicHectometer => _value * 1e6, - VolumeUnit.CubicInch => _value * 1.6387 * 1e-5, + VolumeUnit.CubicInch => _value * 1.6387064e-5, VolumeUnit.CubicKilometer => _value * 1e9, VolumeUnit.CubicMeter => _value, VolumeUnit.CubicMicrometer => _value / 1e18, @@ -737,7 +737,7 @@ private double GetValueAs(VolumeUnit unit) VolumeUnit.CubicDecimeter => baseUnitValue * 1e3, VolumeUnit.CubicFoot => baseUnitValue / 2.8316846592e-2, VolumeUnit.CubicHectometer => baseUnitValue / 1e6, - VolumeUnit.CubicInch => baseUnitValue / (1.6387 * 1e-5), + VolumeUnit.CubicInch => baseUnitValue / 1.6387064e-5, VolumeUnit.CubicKilometer => baseUnitValue / 1e9, VolumeUnit.CubicMeter => baseUnitValue, VolumeUnit.CubicMicrometer => baseUnitValue * 1e18, diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/VolumeFlow.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/VolumeFlow.g.cs index 9b916dcb4b..052928de13 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/VolumeFlow.g.cs +++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/VolumeFlow.g.cs @@ -188,6 +188,26 @@ public VolumeFlow(double value, VolumeFlowUnit unit) /// public double CubicYardsPerSecond => As(VolumeFlowUnit.CubicYardPerSecond); + /// + /// Gets a value of this quantity converted into + /// + public double DecalitersPerDay => As(VolumeFlowUnit.DecaliterPerDay); + + /// + /// Gets a value of this quantity converted into + /// + public double DecalitersPerHour => As(VolumeFlowUnit.DecaliterPerHour); + + /// + /// Gets a value of this quantity converted into + /// + public double DecalitersPerMinute => As(VolumeFlowUnit.DecaliterPerMinute); + + /// + /// Gets a value of this quantity converted into + /// + public double DecalitersPerSecond => As(VolumeFlowUnit.DecaliterPerSecond); + /// /// Gets a value of this quantity converted into /// @@ -208,6 +228,26 @@ public VolumeFlow(double value, VolumeFlowUnit unit) /// public double DecilitersPerSecond => As(VolumeFlowUnit.DeciliterPerSecond); + /// + /// Gets a value of this quantity converted into + /// + public double HectolitersPerDay => As(VolumeFlowUnit.HectoliterPerDay); + + /// + /// Gets a value of this quantity converted into + /// + public double HectolitersPerHour => As(VolumeFlowUnit.HectoliterPerHour); + + /// + /// Gets a value of this quantity converted into + /// + public double HectolitersPerMinute => As(VolumeFlowUnit.HectoliterPerMinute); + + /// + /// Gets a value of this quantity converted into + /// + public double HectolitersPerSecond => As(VolumeFlowUnit.HectoliterPerSecond); + /// /// Gets a value of this quantity converted into /// @@ -527,6 +567,26 @@ public VolumeFlow(double value, VolumeFlowUnit unit) /// public static VolumeFlow FromCubicYardsPerSecond(double cubicyardspersecond) => new VolumeFlow(cubicyardspersecond, VolumeFlowUnit.CubicYardPerSecond); + /// + /// Creates a from . + /// + public static VolumeFlow FromDecalitersPerDay(double decalitersperday) => new VolumeFlow(decalitersperday, VolumeFlowUnit.DecaliterPerDay); + + /// + /// Creates a from . + /// + public static VolumeFlow FromDecalitersPerHour(double decalitersperhour) => new VolumeFlow(decalitersperhour, VolumeFlowUnit.DecaliterPerHour); + + /// + /// Creates a from . + /// + public static VolumeFlow FromDecalitersPerMinute(double decalitersperminute) => new VolumeFlow(decalitersperminute, VolumeFlowUnit.DecaliterPerMinute); + + /// + /// Creates a from . + /// + public static VolumeFlow FromDecalitersPerSecond(double decaliterspersecond) => new VolumeFlow(decaliterspersecond, VolumeFlowUnit.DecaliterPerSecond); + /// /// Creates a from . /// @@ -547,6 +607,26 @@ public VolumeFlow(double value, VolumeFlowUnit unit) /// public static VolumeFlow FromDecilitersPerSecond(double deciliterspersecond) => new VolumeFlow(deciliterspersecond, VolumeFlowUnit.DeciliterPerSecond); + /// + /// Creates a from . + /// + public static VolumeFlow FromHectolitersPerDay(double hectolitersperday) => new VolumeFlow(hectolitersperday, VolumeFlowUnit.HectoliterPerDay); + + /// + /// Creates a from . + /// + public static VolumeFlow FromHectolitersPerHour(double hectolitersperhour) => new VolumeFlow(hectolitersperhour, VolumeFlowUnit.HectoliterPerHour); + + /// + /// Creates a from . + /// + public static VolumeFlow FromHectolitersPerMinute(double hectolitersperminute) => new VolumeFlow(hectolitersperminute, VolumeFlowUnit.HectoliterPerMinute); + + /// + /// Creates a from . + /// + public static VolumeFlow FromHectolitersPerSecond(double hectoliterspersecond) => new VolumeFlow(hectoliterspersecond, VolumeFlowUnit.HectoliterPerSecond); + /// /// Creates a from . /// @@ -814,10 +894,18 @@ private double GetValueInBaseUnit() VolumeFlowUnit.CubicYardPerHour => _value * 2.1237634944E-4, VolumeFlowUnit.CubicYardPerMinute => _value * 0.0127425809664, VolumeFlowUnit.CubicYardPerSecond => _value * 0.764554857984, + VolumeFlowUnit.DecaliterPerDay => (_value / 86400000) * 1e1d, + VolumeFlowUnit.DecaliterPerHour => (_value / 3600000.000) * 1e1d, + VolumeFlowUnit.DecaliterPerMinute => (_value / 60000.00000) * 1e1d, + VolumeFlowUnit.DecaliterPerSecond => (_value / 1000) * 1e1d, VolumeFlowUnit.DeciliterPerDay => (_value / 86400000) * 1e-1d, VolumeFlowUnit.DeciliterPerHour => (_value / 3600000.000) * 1e-1d, VolumeFlowUnit.DeciliterPerMinute => (_value / 60000.00000) * 1e-1d, VolumeFlowUnit.DeciliterPerSecond => (_value / 1000) * 1e-1d, + VolumeFlowUnit.HectoliterPerDay => (_value / 86400000) * 1e2d, + VolumeFlowUnit.HectoliterPerHour => (_value / 3600000.000) * 1e2d, + VolumeFlowUnit.HectoliterPerMinute => (_value / 60000.00000) * 1e2d, + VolumeFlowUnit.HectoliterPerSecond => (_value / 1000) * 1e2d, VolumeFlowUnit.KiloliterPerDay => (_value / 86400000) * 1e3d, VolumeFlowUnit.KiloliterPerHour => (_value / 3600000.000) * 1e3d, VolumeFlowUnit.KiloliterPerMinute => (_value / 60000.00000) * 1e3d, @@ -894,10 +982,18 @@ private double GetValueAs(VolumeFlowUnit unit) VolumeFlowUnit.CubicYardPerHour => baseUnitValue / 2.1237634944E-4, VolumeFlowUnit.CubicYardPerMinute => baseUnitValue / 0.0127425809664, VolumeFlowUnit.CubicYardPerSecond => baseUnitValue / 0.764554857984, + VolumeFlowUnit.DecaliterPerDay => (baseUnitValue * 86400000) / 1e1d, + VolumeFlowUnit.DecaliterPerHour => (baseUnitValue * 3600000.000) / 1e1d, + VolumeFlowUnit.DecaliterPerMinute => (baseUnitValue * 60000.00000) / 1e1d, + VolumeFlowUnit.DecaliterPerSecond => (baseUnitValue * 1000) / 1e1d, VolumeFlowUnit.DeciliterPerDay => (baseUnitValue * 86400000) / 1e-1d, VolumeFlowUnit.DeciliterPerHour => (baseUnitValue * 3600000.000) / 1e-1d, VolumeFlowUnit.DeciliterPerMinute => (baseUnitValue * 60000.00000) / 1e-1d, VolumeFlowUnit.DeciliterPerSecond => (baseUnitValue * 1000) / 1e-1d, + VolumeFlowUnit.HectoliterPerDay => (baseUnitValue * 86400000) / 1e2d, + VolumeFlowUnit.HectoliterPerHour => (baseUnitValue * 3600000.000) / 1e2d, + VolumeFlowUnit.HectoliterPerMinute => (baseUnitValue * 60000.00000) / 1e2d, + VolumeFlowUnit.HectoliterPerSecond => (baseUnitValue * 1000) / 1e2d, VolumeFlowUnit.KiloliterPerDay => (baseUnitValue * 86400000) / 1e3d, VolumeFlowUnit.KiloliterPerHour => (baseUnitValue * 3600000.000) / 1e3d, VolumeFlowUnit.KiloliterPerMinute => (baseUnitValue * 60000.00000) / 1e3d, diff --git a/UnitsNet.NanoFramework/GeneratedCode/RadiationEquivalentDose/RadiationEquivalentDose.nfproj b/UnitsNet.NanoFramework/GeneratedCode/RadiationEquivalentDose/RadiationEquivalentDose.nfproj new file mode 100644 index 0000000000..552e257f67 --- /dev/null +++ b/UnitsNet.NanoFramework/GeneratedCode/RadiationEquivalentDose/RadiationEquivalentDose.nfproj @@ -0,0 +1,42 @@ + + + + $(MSBuildExtensionsPath)\nanoFramework\v1.0\ + + + + Debug + AnyCPU + {11A8DD76-328B-46DF-9F39-F559912D0360};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + {dcdccf04-c930-b455-77a4-d9d4a7df8723} + Library + Properties + 512 + UnitsNet + UnitsNet.RadiationEquivalentDose + v1.0 + bin\$(Configuration)\$(AssemblyName).xml + + + + + + + + + + ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll + True + True + + + + + + + + + + + + diff --git a/UnitsNet.NanoFramework/GeneratedCode/RadiationEquivalentDose/UnitsNet.NanoFramework.RadiationEquivalentDose.nuspec b/UnitsNet.NanoFramework/GeneratedCode/RadiationEquivalentDose/UnitsNet.NanoFramework.RadiationEquivalentDose.nuspec new file mode 100644 index 0000000000..5e39a87c6d --- /dev/null +++ b/UnitsNet.NanoFramework/GeneratedCode/RadiationEquivalentDose/UnitsNet.NanoFramework.RadiationEquivalentDose.nuspec @@ -0,0 +1,26 @@ + + + + UnitsNet.nanoFramework.RadiationEquivalentDose + 6.0.0-pre006 + Units.NET RadiationEquivalentDose - nanoFramework + Andreas Gullberg Larsen,nanoframework + UnitsNet + MIT-0 + https://github.com/angularsen/UnitsNet + false + Adds RadiationEquivalentDose units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. + https://raw.githubusercontent.com/angularsen/UnitsNet/ce85185429be345d77eb2ce09c99d59cc9ab8aed/Docs/Images/logo-32.png + + + Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). + en-US + nanoframework radiationequivalentdose unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable + + + + + + + + diff --git a/UnitsNet.NanoFramework/GeneratedCode/RadiationEquivalentDose/packages.config b/UnitsNet.NanoFramework/GeneratedCode/RadiationEquivalentDose/packages.config new file mode 100644 index 0000000000..313a8dccdf --- /dev/null +++ b/UnitsNet.NanoFramework/GeneratedCode/RadiationEquivalentDose/packages.config @@ -0,0 +1,4 @@ + + + + diff --git a/UnitsNet.NanoFramework/GeneratedCode/RadiationExposure/UnitsNet.NanoFramework.RadiationExposure.nuspec b/UnitsNet.NanoFramework/GeneratedCode/RadiationExposure/UnitsNet.NanoFramework.RadiationExposure.nuspec index 3422169043..64b9009223 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/RadiationExposure/UnitsNet.NanoFramework.RadiationExposure.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/RadiationExposure/UnitsNet.NanoFramework.RadiationExposure.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.RadiationExposure - 6.0.0-pre002 + 6.0.0-pre006 Units.NET RadiationExposure - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds RadiationExposure units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/Radioactivity/UnitsNet.NanoFramework.Radioactivity.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Radioactivity/UnitsNet.NanoFramework.Radioactivity.nuspec index 355143390f..964dc047e5 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/Radioactivity/UnitsNet.NanoFramework.Radioactivity.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/Radioactivity/UnitsNet.NanoFramework.Radioactivity.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.Radioactivity - 6.0.0-pre002 + 6.0.0-pre006 Units.NET Radioactivity - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds Radioactivity units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/Ratio/UnitsNet.NanoFramework.Ratio.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Ratio/UnitsNet.NanoFramework.Ratio.nuspec index 6cbca2b03e..97bc5334ce 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/Ratio/UnitsNet.NanoFramework.Ratio.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/Ratio/UnitsNet.NanoFramework.Ratio.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.Ratio - 6.0.0-pre002 + 6.0.0-pre006 Units.NET Ratio - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds Ratio units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/RatioChangeRate/UnitsNet.NanoFramework.RatioChangeRate.nuspec b/UnitsNet.NanoFramework/GeneratedCode/RatioChangeRate/UnitsNet.NanoFramework.RatioChangeRate.nuspec index 75fe2a795f..c68f593e6b 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/RatioChangeRate/UnitsNet.NanoFramework.RatioChangeRate.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/RatioChangeRate/UnitsNet.NanoFramework.RatioChangeRate.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.RatioChangeRate - 6.0.0-pre002 + 6.0.0-pre006 Units.NET RatioChangeRate - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds RatioChangeRate units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/ReactiveEnergy/UnitsNet.NanoFramework.ReactiveEnergy.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ReactiveEnergy/UnitsNet.NanoFramework.ReactiveEnergy.nuspec index 0864450750..3273e83d0c 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/ReactiveEnergy/UnitsNet.NanoFramework.ReactiveEnergy.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/ReactiveEnergy/UnitsNet.NanoFramework.ReactiveEnergy.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.ReactiveEnergy - 6.0.0-pre002 + 6.0.0-pre006 Units.NET ReactiveEnergy - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds ReactiveEnergy units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/ReactivePower/UnitsNet.NanoFramework.ReactivePower.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ReactivePower/UnitsNet.NanoFramework.ReactivePower.nuspec index e5fe2ad590..7c2eb24be4 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/ReactivePower/UnitsNet.NanoFramework.ReactivePower.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/ReactivePower/UnitsNet.NanoFramework.ReactivePower.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.ReactivePower - 6.0.0-pre002 + 6.0.0-pre006 Units.NET ReactivePower - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds ReactivePower units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/ReciprocalArea/UnitsNet.NanoFramework.ReciprocalArea.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ReciprocalArea/UnitsNet.NanoFramework.ReciprocalArea.nuspec index 8ad50bc1e3..298ab7ca94 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/ReciprocalArea/UnitsNet.NanoFramework.ReciprocalArea.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/ReciprocalArea/UnitsNet.NanoFramework.ReciprocalArea.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.ReciprocalArea - 6.0.0-pre002 + 6.0.0-pre006 Units.NET ReciprocalArea - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds ReciprocalArea units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/ReciprocalLength/UnitsNet.NanoFramework.ReciprocalLength.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ReciprocalLength/UnitsNet.NanoFramework.ReciprocalLength.nuspec index f295702b9f..3da3990c08 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/ReciprocalLength/UnitsNet.NanoFramework.ReciprocalLength.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/ReciprocalLength/UnitsNet.NanoFramework.ReciprocalLength.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.ReciprocalLength - 6.0.0-pre002 + 6.0.0-pre006 Units.NET ReciprocalLength - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds ReciprocalLength units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/RelativeHumidity/UnitsNet.NanoFramework.RelativeHumidity.nuspec b/UnitsNet.NanoFramework/GeneratedCode/RelativeHumidity/UnitsNet.NanoFramework.RelativeHumidity.nuspec index 8dea8cc176..f5fd4a4b7e 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/RelativeHumidity/UnitsNet.NanoFramework.RelativeHumidity.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/RelativeHumidity/UnitsNet.NanoFramework.RelativeHumidity.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.RelativeHumidity - 6.0.0-pre002 + 6.0.0-pre006 Units.NET RelativeHumidity - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds RelativeHumidity units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/RotationalAcceleration/UnitsNet.NanoFramework.RotationalAcceleration.nuspec b/UnitsNet.NanoFramework/GeneratedCode/RotationalAcceleration/UnitsNet.NanoFramework.RotationalAcceleration.nuspec index 1bf54f9d6c..759c615f95 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/RotationalAcceleration/UnitsNet.NanoFramework.RotationalAcceleration.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/RotationalAcceleration/UnitsNet.NanoFramework.RotationalAcceleration.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.RotationalAcceleration - 6.0.0-pre002 + 6.0.0-pre006 Units.NET RotationalAcceleration - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds RotationalAcceleration units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/RotationalSpeed/UnitsNet.NanoFramework.RotationalSpeed.nuspec b/UnitsNet.NanoFramework/GeneratedCode/RotationalSpeed/UnitsNet.NanoFramework.RotationalSpeed.nuspec index 1c097bbbf1..d539a3fe32 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/RotationalSpeed/UnitsNet.NanoFramework.RotationalSpeed.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/RotationalSpeed/UnitsNet.NanoFramework.RotationalSpeed.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.RotationalSpeed - 6.0.0-pre002 + 6.0.0-pre006 Units.NET RotationalSpeed - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds RotationalSpeed units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/RotationalStiffness/UnitsNet.NanoFramework.RotationalStiffness.nuspec b/UnitsNet.NanoFramework/GeneratedCode/RotationalStiffness/UnitsNet.NanoFramework.RotationalStiffness.nuspec index f43923368d..2017d12272 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/RotationalStiffness/UnitsNet.NanoFramework.RotationalStiffness.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/RotationalStiffness/UnitsNet.NanoFramework.RotationalStiffness.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.RotationalStiffness - 6.0.0-pre002 + 6.0.0-pre006 Units.NET RotationalStiffness - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds RotationalStiffness units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/RotationalStiffnessPerLength/UnitsNet.NanoFramework.RotationalStiffnessPerLength.nuspec b/UnitsNet.NanoFramework/GeneratedCode/RotationalStiffnessPerLength/UnitsNet.NanoFramework.RotationalStiffnessPerLength.nuspec index d7d981688d..208a2e105b 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/RotationalStiffnessPerLength/UnitsNet.NanoFramework.RotationalStiffnessPerLength.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/RotationalStiffnessPerLength/UnitsNet.NanoFramework.RotationalStiffnessPerLength.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.RotationalStiffnessPerLength - 6.0.0-pre002 + 6.0.0-pre006 Units.NET RotationalStiffnessPerLength - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds RotationalStiffnessPerLength units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/Scalar/UnitsNet.NanoFramework.Scalar.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Scalar/UnitsNet.NanoFramework.Scalar.nuspec index 072d9230cd..6378a5e8b0 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/Scalar/UnitsNet.NanoFramework.Scalar.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/Scalar/UnitsNet.NanoFramework.Scalar.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.Scalar - 6.0.0-pre002 + 6.0.0-pre006 Units.NET Scalar - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds Scalar units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/SolidAngle/UnitsNet.NanoFramework.SolidAngle.nuspec b/UnitsNet.NanoFramework/GeneratedCode/SolidAngle/UnitsNet.NanoFramework.SolidAngle.nuspec index 90b39e7f92..4b4ceefb23 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/SolidAngle/UnitsNet.NanoFramework.SolidAngle.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/SolidAngle/UnitsNet.NanoFramework.SolidAngle.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.SolidAngle - 6.0.0-pre002 + 6.0.0-pre006 Units.NET SolidAngle - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds SolidAngle units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/SpecificEnergy/UnitsNet.NanoFramework.SpecificEnergy.nuspec b/UnitsNet.NanoFramework/GeneratedCode/SpecificEnergy/UnitsNet.NanoFramework.SpecificEnergy.nuspec index 187f4401db..fe2ee7f825 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/SpecificEnergy/UnitsNet.NanoFramework.SpecificEnergy.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/SpecificEnergy/UnitsNet.NanoFramework.SpecificEnergy.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.SpecificEnergy - 6.0.0-pre002 + 6.0.0-pre006 Units.NET SpecificEnergy - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds SpecificEnergy units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/SpecificEntropy/UnitsNet.NanoFramework.SpecificEntropy.nuspec b/UnitsNet.NanoFramework/GeneratedCode/SpecificEntropy/UnitsNet.NanoFramework.SpecificEntropy.nuspec index d5ed99cf0e..9765f6dd82 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/SpecificEntropy/UnitsNet.NanoFramework.SpecificEntropy.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/SpecificEntropy/UnitsNet.NanoFramework.SpecificEntropy.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.SpecificEntropy - 6.0.0-pre002 + 6.0.0-pre006 Units.NET SpecificEntropy - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds SpecificEntropy units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/SpecificFuelConsumption/UnitsNet.NanoFramework.SpecificFuelConsumption.nuspec b/UnitsNet.NanoFramework/GeneratedCode/SpecificFuelConsumption/UnitsNet.NanoFramework.SpecificFuelConsumption.nuspec index 297663da6a..4e03dfbf02 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/SpecificFuelConsumption/UnitsNet.NanoFramework.SpecificFuelConsumption.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/SpecificFuelConsumption/UnitsNet.NanoFramework.SpecificFuelConsumption.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.SpecificFuelConsumption - 6.0.0-pre002 + 6.0.0-pre006 Units.NET SpecificFuelConsumption - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds SpecificFuelConsumption units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/SpecificVolume/UnitsNet.NanoFramework.SpecificVolume.nuspec b/UnitsNet.NanoFramework/GeneratedCode/SpecificVolume/UnitsNet.NanoFramework.SpecificVolume.nuspec index 6102fe1d0b..0f01b7795f 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/SpecificVolume/UnitsNet.NanoFramework.SpecificVolume.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/SpecificVolume/UnitsNet.NanoFramework.SpecificVolume.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.SpecificVolume - 6.0.0-pre002 + 6.0.0-pre006 Units.NET SpecificVolume - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds SpecificVolume units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/SpecificWeight/UnitsNet.NanoFramework.SpecificWeight.nuspec b/UnitsNet.NanoFramework/GeneratedCode/SpecificWeight/UnitsNet.NanoFramework.SpecificWeight.nuspec index 9bf3064045..66339b7946 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/SpecificWeight/UnitsNet.NanoFramework.SpecificWeight.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/SpecificWeight/UnitsNet.NanoFramework.SpecificWeight.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.SpecificWeight - 6.0.0-pre002 + 6.0.0-pre006 Units.NET SpecificWeight - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds SpecificWeight units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/Speed/UnitsNet.NanoFramework.Speed.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Speed/UnitsNet.NanoFramework.Speed.nuspec index 1818a483f0..04a5b93aa2 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/Speed/UnitsNet.NanoFramework.Speed.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/Speed/UnitsNet.NanoFramework.Speed.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.Speed - 6.0.0-pre002 + 6.0.0-pre006 Units.NET Speed - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds Speed units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/StandardVolumeFlow/UnitsNet.NanoFramework.StandardVolumeFlow.nuspec b/UnitsNet.NanoFramework/GeneratedCode/StandardVolumeFlow/UnitsNet.NanoFramework.StandardVolumeFlow.nuspec index 76c1085b88..e33459bc31 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/StandardVolumeFlow/UnitsNet.NanoFramework.StandardVolumeFlow.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/StandardVolumeFlow/UnitsNet.NanoFramework.StandardVolumeFlow.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.StandardVolumeFlow - 6.0.0-pre002 + 6.0.0-pre006 Units.NET StandardVolumeFlow - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds StandardVolumeFlow units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/Temperature/UnitsNet.NanoFramework.Temperature.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Temperature/UnitsNet.NanoFramework.Temperature.nuspec index f142047e92..8aded72c90 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/Temperature/UnitsNet.NanoFramework.Temperature.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/Temperature/UnitsNet.NanoFramework.Temperature.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.Temperature - 6.0.0-pre002 + 6.0.0-pre006 Units.NET Temperature - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds Temperature units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/TemperatureChangeRate/UnitsNet.NanoFramework.TemperatureChangeRate.nuspec b/UnitsNet.NanoFramework/GeneratedCode/TemperatureChangeRate/UnitsNet.NanoFramework.TemperatureChangeRate.nuspec index 66fbb41220..90d5edd58e 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/TemperatureChangeRate/UnitsNet.NanoFramework.TemperatureChangeRate.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/TemperatureChangeRate/UnitsNet.NanoFramework.TemperatureChangeRate.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.TemperatureChangeRate - 6.0.0-pre002 + 6.0.0-pre006 Units.NET TemperatureChangeRate - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds TemperatureChangeRate units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/TemperatureDelta/UnitsNet.NanoFramework.TemperatureDelta.nuspec b/UnitsNet.NanoFramework/GeneratedCode/TemperatureDelta/UnitsNet.NanoFramework.TemperatureDelta.nuspec index 758c136fa5..bf80969093 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/TemperatureDelta/UnitsNet.NanoFramework.TemperatureDelta.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/TemperatureDelta/UnitsNet.NanoFramework.TemperatureDelta.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.TemperatureDelta - 6.0.0-pre002 + 6.0.0-pre006 Units.NET TemperatureDelta - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds TemperatureDelta units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/TemperatureGradient/UnitsNet.NanoFramework.TemperatureGradient.nuspec b/UnitsNet.NanoFramework/GeneratedCode/TemperatureGradient/UnitsNet.NanoFramework.TemperatureGradient.nuspec index 3ebfc812f7..5088e8b5a8 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/TemperatureGradient/UnitsNet.NanoFramework.TemperatureGradient.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/TemperatureGradient/UnitsNet.NanoFramework.TemperatureGradient.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.TemperatureGradient - 6.0.0-pre002 + 6.0.0-pre006 Units.NET TemperatureGradient - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds TemperatureGradient units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/ThermalConductivity/UnitsNet.NanoFramework.ThermalConductivity.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ThermalConductivity/UnitsNet.NanoFramework.ThermalConductivity.nuspec index fc491c6431..18cc985fb4 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/ThermalConductivity/UnitsNet.NanoFramework.ThermalConductivity.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/ThermalConductivity/UnitsNet.NanoFramework.ThermalConductivity.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.ThermalConductivity - 6.0.0-pre002 + 6.0.0-pre006 Units.NET ThermalConductivity - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds ThermalConductivity units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/ThermalResistance/UnitsNet.NanoFramework.ThermalResistance.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ThermalResistance/UnitsNet.NanoFramework.ThermalResistance.nuspec index 72b991cf1f..8f08481295 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/ThermalResistance/UnitsNet.NanoFramework.ThermalResistance.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/ThermalResistance/UnitsNet.NanoFramework.ThermalResistance.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.ThermalResistance - 6.0.0-pre002 + 6.0.0-pre006 Units.NET ThermalResistance - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds ThermalResistance units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/Torque/UnitsNet.NanoFramework.Torque.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Torque/UnitsNet.NanoFramework.Torque.nuspec index 876f789701..fa36938ec6 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/Torque/UnitsNet.NanoFramework.Torque.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/Torque/UnitsNet.NanoFramework.Torque.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.Torque - 6.0.0-pre002 + 6.0.0-pre006 Units.NET Torque - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds Torque units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/TorquePerLength/UnitsNet.NanoFramework.TorquePerLength.nuspec b/UnitsNet.NanoFramework/GeneratedCode/TorquePerLength/UnitsNet.NanoFramework.TorquePerLength.nuspec index b6af04d90d..8f611759ab 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/TorquePerLength/UnitsNet.NanoFramework.TorquePerLength.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/TorquePerLength/UnitsNet.NanoFramework.TorquePerLength.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.TorquePerLength - 6.0.0-pre002 + 6.0.0-pre006 Units.NET TorquePerLength - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds TorquePerLength units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/Turbidity/UnitsNet.NanoFramework.Turbidity.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Turbidity/UnitsNet.NanoFramework.Turbidity.nuspec index 708818bc43..f62fb43b3f 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/Turbidity/UnitsNet.NanoFramework.Turbidity.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/Turbidity/UnitsNet.NanoFramework.Turbidity.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.Turbidity - 6.0.0-pre002 + 6.0.0-pre006 Units.NET Turbidity - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds Turbidity units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/IrradiationUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/IrradiationUnit.g.cs index 449fdf2491..26d131063a 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/Units/IrradiationUnit.g.cs +++ b/UnitsNet.NanoFramework/GeneratedCode/Units/IrradiationUnit.g.cs @@ -25,9 +25,11 @@ namespace UnitsNet.Units public enum IrradiationUnit { + BtuPerSquareFoot = 15, JoulePerSquareCentimeter = 1, JoulePerSquareMeter = 2, JoulePerSquareMillimeter = 3, + KilobtuPerSquareFoot = 9, KilojoulePerSquareMeter = 4, KilowattHourPerSquareMeter = 5, MillijoulePerSquareCentimeter = 6, diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/RadiationEquivalentDoseUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/RadiationEquivalentDoseUnit.g.cs new file mode 100644 index 0000000000..2095852833 --- /dev/null +++ b/UnitsNet.NanoFramework/GeneratedCode/Units/RadiationEquivalentDoseUnit.g.cs @@ -0,0 +1,42 @@ +//------------------------------------------------------------------------------ +// +// 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 UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities. +// +// +//------------------------------------------------------------------------------ + +// Licensed under MIT No Attribution, see LICENSE file at the root. +// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. + +// ReSharper disable once CheckNamespace +namespace UnitsNet.Units +{ + // Disable missing XML comment warnings for the generated unit enums. + #pragma warning disable 1591 + + public enum RadiationEquivalentDoseUnit + { + Microsievert = 1, + MilliroentgenEquivalentMan = 2, + Millisievert = 7, + Nanosievert = 5, + RoentgenEquivalentMan = 4, + + /// + /// The sievert is a unit in the International System of Units (SI) intended to represent the stochastic health risk of ionizing radiation, which is defined as the probability of causing radiation-induced cancer and genetic damage. + /// + /// https://en.wikipedia.org/wiki/Sievert + Sievert = 9, + } + + #pragma warning restore 1591 +} diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/VolumeFlowUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/VolumeFlowUnit.g.cs index ab8b2bca49..6c14bc7b98 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/Units/VolumeFlowUnit.g.cs +++ b/UnitsNet.NanoFramework/GeneratedCode/Units/VolumeFlowUnit.g.cs @@ -47,10 +47,18 @@ public enum VolumeFlowUnit CubicYardPerHour = 20, CubicYardPerMinute = 21, CubicYardPerSecond = 22, + DecaliterPerDay = 71, + DecaliterPerHour = 78, + DecaliterPerMinute = 67, + DecaliterPerSecond = 70, DeciliterPerDay = 23, DeciliterPerHour = 24, DeciliterPerMinute = 25, DeciliterPerSecond = 26, + HectoliterPerDay = 74, + HectoliterPerHour = 72, + HectoliterPerMinute = 75, + HectoliterPerSecond = 69, KiloliterPerDay = 27, KiloliterPerHour = 28, KiloliterPerMinute = 29, diff --git a/UnitsNet.NanoFramework/GeneratedCode/UnitsNet.nanoFramework.sln b/UnitsNet.NanoFramework/GeneratedCode/UnitsNet.nanoFramework.sln index 4ae1dab440..d64098f57d 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/UnitsNet.nanoFramework.sln +++ b/UnitsNet.NanoFramework/GeneratedCode/UnitsNet.nanoFramework.sln @@ -170,6 +170,8 @@ Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "Pressure", "Pressure\Pressu EndProject Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "PressureChangeRate", "PressureChangeRate\PressureChangeRate.nfproj", "{c9e4cfa9-c5d3-5e9d-243c-106ba4b6a447}" EndProject +Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "RadiationEquivalentDose", "RadiationEquivalentDose\RadiationEquivalentDose.nfproj", "{dcdccf04-c930-b455-77a4-d9d4a7df8723}" +EndProject Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "RadiationExposure", "RadiationExposure\RadiationExposure.nfproj", "{69b383c7-828a-1857-cbe2-f11b9ba77320}" EndProject Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "Radioactivity", "Radioactivity\Radioactivity.nfproj", "{abf4b42f-e999-2a78-403f-fb09524f186a}" @@ -758,6 +760,12 @@ Global {c9e4cfa9-c5d3-5e9d-243c-106ba4b6a447}.Release|Any CPU.ActiveCfg = Release|Any CPU {c9e4cfa9-c5d3-5e9d-243c-106ba4b6a447}.Release|Any CPU.Build.0 = Release|Any CPU {c9e4cfa9-c5d3-5e9d-243c-106ba4b6a447}.Release|Any CPU.Deploy.0 = Release|Any CPU +{dcdccf04-c930-b455-77a4-d9d4a7df8723}.Debug|Any CPU.ActiveCfg = Debug|Any CPU +{dcdccf04-c930-b455-77a4-d9d4a7df8723}.Debug|Any CPU.Build.0 = Debug|Any CPU +{dcdccf04-c930-b455-77a4-d9d4a7df8723}.Debug|Any CPU.Deploy.0 = Debug|Any CPU +{dcdccf04-c930-b455-77a4-d9d4a7df8723}.Release|Any CPU.ActiveCfg = Release|Any CPU +{dcdccf04-c930-b455-77a4-d9d4a7df8723}.Release|Any CPU.Build.0 = Release|Any CPU +{dcdccf04-c930-b455-77a4-d9d4a7df8723}.Release|Any CPU.Deploy.0 = Release|Any CPU {69b383c7-828a-1857-cbe2-f11b9ba77320}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {69b383c7-828a-1857-cbe2-f11b9ba77320}.Debug|Any CPU.Build.0 = Debug|Any CPU {69b383c7-828a-1857-cbe2-f11b9ba77320}.Debug|Any CPU.Deploy.0 = Debug|Any CPU diff --git a/UnitsNet.NanoFramework/GeneratedCode/VitaminA/UnitsNet.NanoFramework.VitaminA.nuspec b/UnitsNet.NanoFramework/GeneratedCode/VitaminA/UnitsNet.NanoFramework.VitaminA.nuspec index 1cd4004167..4c3c1b4944 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/VitaminA/UnitsNet.NanoFramework.VitaminA.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/VitaminA/UnitsNet.NanoFramework.VitaminA.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.VitaminA - 6.0.0-pre002 + 6.0.0-pre006 Units.NET VitaminA - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds VitaminA units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/Volume/UnitsNet.NanoFramework.Volume.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Volume/UnitsNet.NanoFramework.Volume.nuspec index 8deab862b7..985a60544a 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/Volume/UnitsNet.NanoFramework.Volume.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/Volume/UnitsNet.NanoFramework.Volume.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.Volume - 6.0.0-pre002 + 6.0.0-pre006 Units.NET Volume - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds Volume units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/VolumeConcentration/UnitsNet.NanoFramework.VolumeConcentration.nuspec b/UnitsNet.NanoFramework/GeneratedCode/VolumeConcentration/UnitsNet.NanoFramework.VolumeConcentration.nuspec index 7b5ffd0efc..7580eec0bd 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/VolumeConcentration/UnitsNet.NanoFramework.VolumeConcentration.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/VolumeConcentration/UnitsNet.NanoFramework.VolumeConcentration.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.VolumeConcentration - 6.0.0-pre002 + 6.0.0-pre006 Units.NET VolumeConcentration - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds VolumeConcentration units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/VolumeFlow/UnitsNet.NanoFramework.VolumeFlow.nuspec b/UnitsNet.NanoFramework/GeneratedCode/VolumeFlow/UnitsNet.NanoFramework.VolumeFlow.nuspec index fd75a5a62c..52adce9d8e 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/VolumeFlow/UnitsNet.NanoFramework.VolumeFlow.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/VolumeFlow/UnitsNet.NanoFramework.VolumeFlow.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.VolumeFlow - 6.0.0-pre002 + 6.0.0-pre006 Units.NET VolumeFlow - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds VolumeFlow units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/VolumeFlowPerArea/UnitsNet.NanoFramework.VolumeFlowPerArea.nuspec b/UnitsNet.NanoFramework/GeneratedCode/VolumeFlowPerArea/UnitsNet.NanoFramework.VolumeFlowPerArea.nuspec index 8f8f9167e3..19b0b42cc6 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/VolumeFlowPerArea/UnitsNet.NanoFramework.VolumeFlowPerArea.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/VolumeFlowPerArea/UnitsNet.NanoFramework.VolumeFlowPerArea.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.VolumeFlowPerArea - 6.0.0-pre002 + 6.0.0-pre006 Units.NET VolumeFlowPerArea - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds VolumeFlowPerArea units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/VolumePerLength/UnitsNet.NanoFramework.VolumePerLength.nuspec b/UnitsNet.NanoFramework/GeneratedCode/VolumePerLength/UnitsNet.NanoFramework.VolumePerLength.nuspec index 888c9ff84c..9f02db1904 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/VolumePerLength/UnitsNet.NanoFramework.VolumePerLength.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/VolumePerLength/UnitsNet.NanoFramework.VolumePerLength.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.VolumePerLength - 6.0.0-pre002 + 6.0.0-pre006 Units.NET VolumePerLength - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds VolumePerLength units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/VolumetricHeatCapacity/UnitsNet.NanoFramework.VolumetricHeatCapacity.nuspec b/UnitsNet.NanoFramework/GeneratedCode/VolumetricHeatCapacity/UnitsNet.NanoFramework.VolumetricHeatCapacity.nuspec index 914e6fec32..8582de2853 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/VolumetricHeatCapacity/UnitsNet.NanoFramework.VolumetricHeatCapacity.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/VolumetricHeatCapacity/UnitsNet.NanoFramework.VolumetricHeatCapacity.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.VolumetricHeatCapacity - 6.0.0-pre002 + 6.0.0-pre006 Units.NET VolumetricHeatCapacity - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds VolumetricHeatCapacity units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NanoFramework/GeneratedCode/WarpingMomentOfInertia/UnitsNet.NanoFramework.WarpingMomentOfInertia.nuspec b/UnitsNet.NanoFramework/GeneratedCode/WarpingMomentOfInertia/UnitsNet.NanoFramework.WarpingMomentOfInertia.nuspec index c8f74a22f9..7fb474ddd4 100644 --- a/UnitsNet.NanoFramework/GeneratedCode/WarpingMomentOfInertia/UnitsNet.NanoFramework.WarpingMomentOfInertia.nuspec +++ b/UnitsNet.NanoFramework/GeneratedCode/WarpingMomentOfInertia/UnitsNet.NanoFramework.WarpingMomentOfInertia.nuspec @@ -2,11 +2,11 @@ UnitsNet.nanoFramework.WarpingMomentOfInertia - 6.0.0-pre002 + 6.0.0-pre006 Units.NET WarpingMomentOfInertia - nanoFramework Andreas Gullberg Larsen,nanoframework UnitsNet - MIT + MIT-0 https://github.com/angularsen/UnitsNet false Adds WarpingMomentOfInertia units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead. diff --git a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToIrradiationExtensionsTest.g.cs b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToIrradiationExtensionsTest.g.cs index 23b0b7a841..50794ecd99 100644 --- a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToIrradiationExtensionsTest.g.cs +++ b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToIrradiationExtensionsTest.g.cs @@ -24,6 +24,10 @@ namespace UnitsNet.Tests { public class NumberToIrradiationExtensionsTests { + [Fact] + public void NumberToBtusPerSquareFootTest() => + Assert.Equal(Irradiation.FromBtusPerSquareFoot(2), 2.BtusPerSquareFoot()); + [Fact] public void NumberToJoulesPerSquareCentimeterTest() => Assert.Equal(Irradiation.FromJoulesPerSquareCentimeter(2), 2.JoulesPerSquareCentimeter()); @@ -36,6 +40,10 @@ public void NumberToJoulesPerSquareMeterTest() => public void NumberToJoulesPerSquareMillimeterTest() => Assert.Equal(Irradiation.FromJoulesPerSquareMillimeter(2), 2.JoulesPerSquareMillimeter()); + [Fact] + public void NumberToKilobtusPerSquareFootTest() => + Assert.Equal(Irradiation.FromKilobtusPerSquareFoot(2), 2.KilobtusPerSquareFoot()); + [Fact] public void NumberToKilojoulesPerSquareMeterTest() => Assert.Equal(Irradiation.FromKilojoulesPerSquareMeter(2), 2.KilojoulesPerSquareMeter()); diff --git a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToRadiationEquivalentDoseExtensionsTest.g.cs b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToRadiationEquivalentDoseExtensionsTest.g.cs new file mode 100644 index 0000000000..65aebc965b --- /dev/null +++ b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToRadiationEquivalentDoseExtensionsTest.g.cs @@ -0,0 +1,52 @@ +//------------------------------------------------------------------------------ +// +// 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 UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities. +// +// +//------------------------------------------------------------------------------ + +// Licensed under MIT No Attribution, see LICENSE file at the root. +// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. + +using UnitsNet.NumberExtensions.NumberToRadiationEquivalentDose; +using Xunit; + +namespace UnitsNet.Tests +{ + public class NumberToRadiationEquivalentDoseExtensionsTests + { + [Fact] + public void NumberToMicrosievertsTest() => + Assert.Equal(RadiationEquivalentDose.FromMicrosieverts(2), 2.Microsieverts()); + + [Fact] + public void NumberToMilliroentgensEquivalentManTest() => + Assert.Equal(RadiationEquivalentDose.FromMilliroentgensEquivalentMan(2), 2.MilliroentgensEquivalentMan()); + + [Fact] + public void NumberToMillisievertsTest() => + Assert.Equal(RadiationEquivalentDose.FromMillisieverts(2), 2.Millisieverts()); + + [Fact] + public void NumberToNanosievertsTest() => + Assert.Equal(RadiationEquivalentDose.FromNanosieverts(2), 2.Nanosieverts()); + + [Fact] + public void NumberToRoentgensEquivalentManTest() => + Assert.Equal(RadiationEquivalentDose.FromRoentgensEquivalentMan(2), 2.RoentgensEquivalentMan()); + + [Fact] + public void NumberToSievertsTest() => + Assert.Equal(RadiationEquivalentDose.FromSieverts(2), 2.Sieverts()); + + } +} diff --git a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToVolumeFlowExtensionsTest.g.cs b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToVolumeFlowExtensionsTest.g.cs index 13d1660359..028a366069 100644 --- a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToVolumeFlowExtensionsTest.g.cs +++ b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToVolumeFlowExtensionsTest.g.cs @@ -112,6 +112,22 @@ public void NumberToCubicYardsPerMinuteTest() => public void NumberToCubicYardsPerSecondTest() => Assert.Equal(VolumeFlow.FromCubicYardsPerSecond(2), 2.CubicYardsPerSecond()); + [Fact] + public void NumberToDecalitersPerDayTest() => + Assert.Equal(VolumeFlow.FromDecalitersPerDay(2), 2.DecalitersPerDay()); + + [Fact] + public void NumberToDecalitersPerHourTest() => + Assert.Equal(VolumeFlow.FromDecalitersPerHour(2), 2.DecalitersPerHour()); + + [Fact] + public void NumberToDecalitersPerMinuteTest() => + Assert.Equal(VolumeFlow.FromDecalitersPerMinute(2), 2.DecalitersPerMinute()); + + [Fact] + public void NumberToDecalitersPerSecondTest() => + Assert.Equal(VolumeFlow.FromDecalitersPerSecond(2), 2.DecalitersPerSecond()); + [Fact] public void NumberToDecilitersPerDayTest() => Assert.Equal(VolumeFlow.FromDecilitersPerDay(2), 2.DecilitersPerDay()); @@ -128,6 +144,22 @@ public void NumberToDecilitersPerMinuteTest() => public void NumberToDecilitersPerSecondTest() => Assert.Equal(VolumeFlow.FromDecilitersPerSecond(2), 2.DecilitersPerSecond()); + [Fact] + public void NumberToHectolitersPerDayTest() => + Assert.Equal(VolumeFlow.FromHectolitersPerDay(2), 2.HectolitersPerDay()); + + [Fact] + public void NumberToHectolitersPerHourTest() => + Assert.Equal(VolumeFlow.FromHectolitersPerHour(2), 2.HectolitersPerHour()); + + [Fact] + public void NumberToHectolitersPerMinuteTest() => + Assert.Equal(VolumeFlow.FromHectolitersPerMinute(2), 2.HectolitersPerMinute()); + + [Fact] + public void NumberToHectolitersPerSecondTest() => + Assert.Equal(VolumeFlow.FromHectolitersPerSecond(2), 2.HectolitersPerSecond()); + [Fact] public void NumberToKilolitersPerDayTest() => Assert.Equal(VolumeFlow.FromKilolitersPerDay(2), 2.KilolitersPerDay()); diff --git a/UnitsNet.NumberExtensions.Tests/UnitsNet.NumberExtensions.Tests.csproj b/UnitsNet.NumberExtensions.Tests/UnitsNet.NumberExtensions.Tests.csproj index 015498125f..e655661336 100644 --- a/UnitsNet.NumberExtensions.Tests/UnitsNet.NumberExtensions.Tests.csproj +++ b/UnitsNet.NumberExtensions.Tests/UnitsNet.NumberExtensions.Tests.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 UnitsNet.NumberExtensions.Tests latest enable @@ -25,10 +25,10 @@ - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToRadiationEquivalentDoseExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToRadiationEquivalentDoseExtensions.g.cs new file mode 100644 index 0000000000..b0c5b5946d --- /dev/null +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToRadiationEquivalentDoseExtensions.g.cs @@ -0,0 +1,84 @@ +//------------------------------------------------------------------------------ +// +// 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 UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities. +// +// +//------------------------------------------------------------------------------ + +// Licensed under MIT No Attribution, see LICENSE file at the root. +// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. + +using System; + +#if NET7_0_OR_GREATER +using System.Numerics; +#endif + +#nullable enable + +namespace UnitsNet.NumberExtensions.NumberToRadiationEquivalentDose +{ + /// + /// A number to RadiationEquivalentDose Extensions + /// + public static class NumberToRadiationEquivalentDoseExtensions + { + /// + public static RadiationEquivalentDose Microsieverts(this T value) + where T : notnull +#if NET7_0_OR_GREATER + , INumber +#endif + => RadiationEquivalentDose.FromMicrosieverts(Convert.ToDouble(value)); + + /// + public static RadiationEquivalentDose MilliroentgensEquivalentMan(this T value) + where T : notnull +#if NET7_0_OR_GREATER + , INumber +#endif + => RadiationEquivalentDose.FromMilliroentgensEquivalentMan(Convert.ToDouble(value)); + + /// + public static RadiationEquivalentDose Millisieverts(this T value) + where T : notnull +#if NET7_0_OR_GREATER + , INumber +#endif + => RadiationEquivalentDose.FromMillisieverts(Convert.ToDouble(value)); + + /// + public static RadiationEquivalentDose Nanosieverts(this T value) + where T : notnull +#if NET7_0_OR_GREATER + , INumber +#endif + => RadiationEquivalentDose.FromNanosieverts(Convert.ToDouble(value)); + + /// + public static RadiationEquivalentDose RoentgensEquivalentMan(this T value) + where T : notnull +#if NET7_0_OR_GREATER + , INumber +#endif + => RadiationEquivalentDose.FromRoentgensEquivalentMan(Convert.ToDouble(value)); + + /// + public static RadiationEquivalentDose Sieverts(this T value) + where T : notnull +#if NET7_0_OR_GREATER + , INumber +#endif + => RadiationEquivalentDose.FromSieverts(Convert.ToDouble(value)); + + } +} diff --git a/UnitsNet.NumberExtensions/UnitsNet.NumberExtensions.csproj b/UnitsNet.NumberExtensions/UnitsNet.NumberExtensions.csproj index ba02d95392..7511cb0810 100644 --- a/UnitsNet.NumberExtensions/UnitsNet.NumberExtensions.csproj +++ b/UnitsNet.NumberExtensions/UnitsNet.NumberExtensions.csproj @@ -2,7 +2,7 @@ UnitsNet.NumberExtensions - 6.0.0-pre002 + 6.0.0-pre006 Andreas Gullberg Larsen, Lu Li, Jon Suda Units.NET NumberExtensions Adds extension methods to number types to more easily create quantities, such as 5.Meters() instead of Length.FromMeters(5). @@ -12,7 +12,7 @@ logo-32.png https://raw.githubusercontent.com/angularsen/UnitsNet/ce85185429be345d77eb2ce09c99d59cc9ab8aed/Docs/Images/logo-32.png https://github.com/angularsen/UnitsNet - MIT + MIT-0 false UnitsNet Extensions NumberToExtensions NumberToUnitsExtensions NumberExtensions NumberToUnits convert conversion parse @@ -22,7 +22,7 @@ latest enable UnitsNet - netstandard2.0;net7.0 + netstandard2.0;net8.0 diff --git a/UnitsNet.Serialization.JsonNet.Tests/UnitsNet.Serialization.JsonNet.Tests.csproj b/UnitsNet.Serialization.JsonNet.Tests/UnitsNet.Serialization.JsonNet.Tests.csproj index 6bf0289d9d..17e328ca10 100644 --- a/UnitsNet.Serialization.JsonNet.Tests/UnitsNet.Serialization.JsonNet.Tests.csproj +++ b/UnitsNet.Serialization.JsonNet.Tests/UnitsNet.Serialization.JsonNet.Tests.csproj @@ -14,9 +14,9 @@ - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/UnitsNet.Serialization.JsonNet/UnitsNet.Serialization.JsonNet.csproj b/UnitsNet.Serialization.JsonNet/UnitsNet.Serialization.JsonNet.csproj index dd9fb58820..8c924ab00e 100644 --- a/UnitsNet.Serialization.JsonNet/UnitsNet.Serialization.JsonNet.csproj +++ b/UnitsNet.Serialization.JsonNet/UnitsNet.Serialization.JsonNet.csproj @@ -2,7 +2,7 @@ UnitsNet.Serialization.JsonNet - 6.0.0-pre002 + 6.0.0-pre006 Andreas Gullberg Larsen Units.NET Serialization with Json.NET A helper library for serializing and deserializing types in Units.NET using Json.NET. @@ -12,7 +12,7 @@ logo-32.png https://raw.githubusercontent.com/angularsen/UnitsNet/ce85185429be345d77eb2ce09c99d59cc9ab8aed/Docs/Images/logo-32.png https://github.com/angularsen/UnitsNet - MIT + MIT-0 false unit units measurement json Json.NET Newtonsoft serialize deserialize serialization deserialization Upgrade JSON.NET to 12.0.3. Support arrays. @@ -48,9 +48,9 @@ - - - + + + diff --git a/UnitsNet.Tests/CustomCode/AreaTests.cs b/UnitsNet.Tests/CustomCode/AreaTests.cs index 1f242fc05f..1a1d4c4bba 100644 --- a/UnitsNet.Tests/CustomCode/AreaTests.cs +++ b/UnitsNet.Tests/CustomCode/AreaTests.cs @@ -45,6 +45,13 @@ public void AreaDividedByLengthEqualsLength() Assert.Equal(length, Length.FromMeters(10)); } + [Fact] + public void AreaDividedByVolumeEqualsReciprocalLength() + { + ReciprocalLength reciprocalLength = Area.FromSquareMeters(50) / Volume.FromCubicMeters(5); + Assert.Equal(reciprocalLength, ReciprocalLength.FromInverseMeters(10)); + } + [Fact] public void AreaTimesMassFluxEqualsMassFlow() { diff --git a/UnitsNet.Tests/CustomCode/IrradiationTests.cs b/UnitsNet.Tests/CustomCode/IrradiationTests.cs index 91bb9b6e9a..3f25e2186f 100644 --- a/UnitsNet.Tests/CustomCode/IrradiationTests.cs +++ b/UnitsNet.Tests/CustomCode/IrradiationTests.cs @@ -41,5 +41,9 @@ public class IrradiationTests : IrradiationTestsBase protected override double WattHoursPerSquareMeterInOneJoulePerSquareMeter => 2.777777777777778e-4; protected override double KilowattHoursPerSquareMeterInOneJoulePerSquareMeter => 2.777777777777778e-7; + + protected override double BtusPerSquareFootInOneJoulePerSquareMeter => 8.805509170334624e-5; + + protected override double KilobtusPerSquareFootInOneJoulePerSquareMeter => 8.805509170334624e-8; } } diff --git a/UnitsNet.Tests/CustomCode/LengthTests.cs b/UnitsNet.Tests/CustomCode/LengthTests.cs index 8c3661e79c..2947aa4961 100644 --- a/UnitsNet.Tests/CustomCode/LengthTests.cs +++ b/UnitsNet.Tests/CustomCode/LengthTests.cs @@ -134,6 +134,20 @@ public void LengthDividedBySpeedEqualsDuration() Assert.Equal(Duration.FromSeconds(10), duration); } + [Fact] + public void LengthDividedByAreaEqualsReciprocalLength() + { + ReciprocalLength reciprocalLength = Length.FromMeters(20) / Area.FromSquareMeters(2); + Assert.Equal(ReciprocalLength.FromInverseMeters(10), reciprocalLength); + } + + [Fact] + public void LengthDividedByVolumeEqualsReciprocalArea() + { + ReciprocalArea reciprocalArea = Length.FromMeters(20) / Volume.FromCubicMeters(2); + Assert.Equal(ReciprocalArea.FromInverseSquareMeters(10), reciprocalArea); + } + [Fact] public void LengthTimesSpeedEqualsKinematicViscosity() { diff --git a/UnitsNet.Tests/CustomCode/RadiationEquivalentDoseTests.cs b/UnitsNet.Tests/CustomCode/RadiationEquivalentDoseTests.cs new file mode 100644 index 0000000000..717fc0410a --- /dev/null +++ b/UnitsNet.Tests/CustomCode/RadiationEquivalentDoseTests.cs @@ -0,0 +1,19 @@ +// Licensed under MIT No Attribution, see LICENSE file at the root. +// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. + +using System; + +namespace UnitsNet.Tests.CustomCode +{ + public class RadiationEquivalentDoseTests : RadiationEquivalentDoseTestsBase + { + protected override bool SupportsSIUnitSystem => true; + + protected override double SievertsInOneSievert => 1; + protected override double MillisievertsInOneSievert => 1e+3; + protected override double MicrosievertsInOneSievert => 1e+6; + protected override double NanosievertsInOneSievert => 1e+9; + protected override double MilliroentgensEquivalentManInOneSievert => 1e+5; + protected override double RoentgensEquivalentManInOneSievert => 100; + } +} diff --git a/UnitsNet.Tests/CustomCode/VolumeFlowTests.cs b/UnitsNet.Tests/CustomCode/VolumeFlowTests.cs index 2dee98eb47..3e1250dd38 100644 --- a/UnitsNet.Tests/CustomCode/VolumeFlowTests.cs +++ b/UnitsNet.Tests/CustomCode/VolumeFlowTests.cs @@ -165,6 +165,22 @@ public class VolumeFlowTests : VolumeFlowTestsBase protected override double UsGallonsPerSecondInOneCubicMeterPerSecond => 2.64172052358148E2; + protected override double DecalitersPerDayInOneCubicMeterPerSecond => 8.64E6; + + protected override double DecalitersPerHourInOneCubicMeterPerSecond => 360_000; + + protected override double DecalitersPerMinuteInOneCubicMeterPerSecond => 6_000; + + protected override double DecalitersPerSecondInOneCubicMeterPerSecond => 100; + + protected override double HectolitersPerDayInOneCubicMeterPerSecond => 864_000; + + protected override double HectolitersPerHourInOneCubicMeterPerSecond => 36_000; + + protected override double HectolitersPerMinuteInOneCubicMeterPerSecond => 600; + + protected override double HectolitersPerSecondInOneCubicMeterPerSecond => 10; + [Theory] [InlineData(20, 2, 40)] [InlineData(20, 62, 1240)] diff --git a/UnitsNet.Tests/CustomCode/VolumeTests.cs b/UnitsNet.Tests/CustomCode/VolumeTests.cs index 44d7e4e3e4..cb1d4ceea6 100644 --- a/UnitsNet.Tests/CustomCode/VolumeTests.cs +++ b/UnitsNet.Tests/CustomCode/VolumeTests.cs @@ -17,7 +17,7 @@ public class VolumeTests : VolumeTestsBase protected override double CubicFeetInOneCubicMeter => 35.314666721488590250438010354003; - protected override double CubicInchesInOneCubicMeter => 61023.98242; + protected override double CubicInchesInOneCubicMeter => 61_023.744094732283952756881891717; protected override double CubicKilometersInOneCubicMeter => 1E-9; diff --git a/UnitsNet.Tests/GeneratedCode/IQuantityTests.g.cs b/UnitsNet.Tests/GeneratedCode/IQuantityTests.g.cs index adfc1e4d48..7dc41682e2 100644 --- a/UnitsNet.Tests/GeneratedCode/IQuantityTests.g.cs +++ b/UnitsNet.Tests/GeneratedCode/IQuantityTests.g.cs @@ -118,6 +118,7 @@ void Assertion(int expectedValue, Enum expectedUnit, IQuantity quantity) Assertion(3, PowerRatioUnit.DecibelWatt, Quantity.From(3, PowerRatioUnit.DecibelWatt)); Assertion(3, PressureUnit.Torr, Quantity.From(3, PressureUnit.Torr)); Assertion(3, PressureChangeRateUnit.PoundForcePerSquareInchPerSecond, Quantity.From(3, PressureChangeRateUnit.PoundForcePerSquareInchPerSecond)); + Assertion(3, RadiationEquivalentDoseUnit.Sievert, Quantity.From(3, RadiationEquivalentDoseUnit.Sievert)); Assertion(3, RadiationExposureUnit.Roentgen, Quantity.From(3, RadiationExposureUnit.Roentgen)); Assertion(3, RadioactivityUnit.Terarutherford, Quantity.From(3, RadioactivityUnit.Terarutherford)); Assertion(3, RatioUnit.Percent, Quantity.From(3, RatioUnit.Percent)); @@ -248,6 +249,7 @@ public void QuantityInfo_IsSameAsStaticInfoProperty() Assertion(PowerRatio.Info, PowerRatio.Zero); Assertion(Pressure.Info, Pressure.Zero); Assertion(PressureChangeRate.Info, PressureChangeRate.Zero); + Assertion(RadiationEquivalentDose.Info, RadiationEquivalentDose.Zero); Assertion(RadiationExposure.Info, RadiationExposure.Zero); Assertion(Radioactivity.Info, Radioactivity.Zero); Assertion(Ratio.Info, Ratio.Zero); @@ -378,6 +380,7 @@ public void Dimensions_IsSameAsStaticBaseDimensions() Assertion(PowerRatio.BaseDimensions, PowerRatio.Zero); Assertion(Pressure.BaseDimensions, Pressure.Zero); Assertion(PressureChangeRate.BaseDimensions, PressureChangeRate.Zero); + Assertion(RadiationEquivalentDose.BaseDimensions, RadiationEquivalentDose.Zero); Assertion(RadiationExposure.BaseDimensions, RadiationExposure.Zero); Assertion(Radioactivity.BaseDimensions, Radioactivity.Zero); Assertion(Ratio.BaseDimensions, Ratio.Zero); diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RadiationEquivalentDoseTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RadiationEquivalentDoseTestsBase.g.cs new file mode 100644 index 0000000000..2c48678744 --- /dev/null +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RadiationEquivalentDoseTestsBase.g.cs @@ -0,0 +1,922 @@ +//------------------------------------------------------------------------------ +// +// 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 UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities. +// +// +//------------------------------------------------------------------------------ + +// Licensed under MIT No Attribution, see LICENSE file at the root. +// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Threading; +using UnitsNet.Tests.TestsBase; +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 RadiationEquivalentDose. + /// +// ReSharper disable once PartialTypeWithSinglePart + public abstract partial class RadiationEquivalentDoseTestsBase : QuantityTestsBase + { + protected abstract double MicrosievertsInOneSievert { get; } + protected abstract double MilliroentgensEquivalentManInOneSievert { get; } + protected abstract double MillisievertsInOneSievert { get; } + protected abstract double NanosievertsInOneSievert { get; } + protected abstract double RoentgensEquivalentManInOneSievert { get; } + protected abstract double SievertsInOneSievert { get; } + +// ReSharper disable VirtualMemberNeverOverriden.Global + protected virtual double MicrosievertsTolerance { get { return 1e-5; } } + protected virtual double MilliroentgensEquivalentManTolerance { get { return 1e-5; } } + protected virtual double MillisievertsTolerance { get { return 1e-5; } } + protected virtual double NanosievertsTolerance { get { return 1e-5; } } + protected virtual double RoentgensEquivalentManTolerance { get { return 1e-5; } } + protected virtual double SievertsTolerance { get { return 1e-5; } } +// ReSharper restore VirtualMemberNeverOverriden.Global + + protected (double UnitsInBaseUnit, double Tolerence) GetConversionFactor(RadiationEquivalentDoseUnit unit) + { + return unit switch + { + RadiationEquivalentDoseUnit.Microsievert => (MicrosievertsInOneSievert, MicrosievertsTolerance), + RadiationEquivalentDoseUnit.MilliroentgenEquivalentMan => (MilliroentgensEquivalentManInOneSievert, MilliroentgensEquivalentManTolerance), + RadiationEquivalentDoseUnit.Millisievert => (MillisievertsInOneSievert, MillisievertsTolerance), + RadiationEquivalentDoseUnit.Nanosievert => (NanosievertsInOneSievert, NanosievertsTolerance), + RadiationEquivalentDoseUnit.RoentgenEquivalentMan => (RoentgensEquivalentManInOneSievert, RoentgensEquivalentManTolerance), + RadiationEquivalentDoseUnit.Sievert => (SievertsInOneSievert, SievertsTolerance), + _ => throw new NotSupportedException() + }; + } + + public static IEnumerable UnitTypes = new List + { + new object[] { RadiationEquivalentDoseUnit.Microsievert }, + new object[] { RadiationEquivalentDoseUnit.MilliroentgenEquivalentMan }, + new object[] { RadiationEquivalentDoseUnit.Millisievert }, + new object[] { RadiationEquivalentDoseUnit.Nanosievert }, + new object[] { RadiationEquivalentDoseUnit.RoentgenEquivalentMan }, + new object[] { RadiationEquivalentDoseUnit.Sievert }, + }; + + [Fact] + public void DefaultCtor_ReturnsQuantityWithZeroValueAndBaseUnit() + { + var quantity = new RadiationEquivalentDose(); + Assert.Equal(0, quantity.Value); + Assert.Equal(RadiationEquivalentDoseUnit.Sievert, quantity.Unit); + } + + [Fact] + public void Ctor_WithInfinityValue_DoNotThrowsArgumentException() + { + var exception1 = Record.Exception(() => new RadiationEquivalentDose(double.PositiveInfinity, RadiationEquivalentDoseUnit.Sievert)); + var exception2 = Record.Exception(() => new RadiationEquivalentDose(double.NegativeInfinity, RadiationEquivalentDoseUnit.Sievert)); + + Assert.Null(exception1); + Assert.Null(exception2); + } + + [Fact] + public void Ctor_WithNaNValue_DoNotThrowsArgumentException() + { + var exception = Record.Exception(() => new RadiationEquivalentDose(double.NaN, RadiationEquivalentDoseUnit.Sievert)); + + Assert.Null(exception); + } + + [Fact] + public void Ctor_NullAsUnitSystem_ThrowsArgumentNullException() + { + Assert.Throws(() => new RadiationEquivalentDose(value: 1, unitSystem: null)); + } + + [Fact] + public void Ctor_SIUnitSystem_ThrowsArgumentExceptionIfNotSupported() + { + Func TestCode = () => new RadiationEquivalentDose(value: 1, unitSystem: UnitSystem.SI); + if (SupportsSIUnitSystem) + { + var quantity = (RadiationEquivalentDose) TestCode(); + Assert.Equal(1, quantity.Value); + } + else + { + Assert.Throws(TestCode); + } + } + + [Fact] + public void RadiationEquivalentDose_QuantityInfo_ReturnsQuantityInfoDescribingQuantity() + { + var quantity = new RadiationEquivalentDose(1, RadiationEquivalentDoseUnit.Sievert); + + QuantityInfo quantityInfo = quantity.QuantityInfo; + + Assert.Equal(RadiationEquivalentDose.Zero, quantityInfo.Zero); + Assert.Equal("RadiationEquivalentDose", quantityInfo.Name); + + var units = EnumUtils.GetEnumValues().OrderBy(x => x.ToString()).ToArray(); + var unitNames = units.Select(x => x.ToString()); + } + + [Fact] + public void SievertToRadiationEquivalentDoseUnits() + { + RadiationEquivalentDose sievert = RadiationEquivalentDose.FromSieverts(1); + AssertEx.EqualTolerance(MicrosievertsInOneSievert, sievert.Microsieverts, MicrosievertsTolerance); + AssertEx.EqualTolerance(MilliroentgensEquivalentManInOneSievert, sievert.MilliroentgensEquivalentMan, MilliroentgensEquivalentManTolerance); + AssertEx.EqualTolerance(MillisievertsInOneSievert, sievert.Millisieverts, MillisievertsTolerance); + AssertEx.EqualTolerance(NanosievertsInOneSievert, sievert.Nanosieverts, NanosievertsTolerance); + AssertEx.EqualTolerance(RoentgensEquivalentManInOneSievert, sievert.RoentgensEquivalentMan, RoentgensEquivalentManTolerance); + AssertEx.EqualTolerance(SievertsInOneSievert, sievert.Sieverts, SievertsTolerance); + } + + [Fact] + public void From_ValueAndUnit_ReturnsQuantityWithSameValueAndUnit() + { + var quantity00 = RadiationEquivalentDose.From(1, RadiationEquivalentDoseUnit.Microsievert); + AssertEx.EqualTolerance(1, quantity00.Microsieverts, MicrosievertsTolerance); + Assert.Equal(RadiationEquivalentDoseUnit.Microsievert, quantity00.Unit); + + var quantity01 = RadiationEquivalentDose.From(1, RadiationEquivalentDoseUnit.MilliroentgenEquivalentMan); + AssertEx.EqualTolerance(1, quantity01.MilliroentgensEquivalentMan, MilliroentgensEquivalentManTolerance); + Assert.Equal(RadiationEquivalentDoseUnit.MilliroentgenEquivalentMan, quantity01.Unit); + + var quantity02 = RadiationEquivalentDose.From(1, RadiationEquivalentDoseUnit.Millisievert); + AssertEx.EqualTolerance(1, quantity02.Millisieverts, MillisievertsTolerance); + Assert.Equal(RadiationEquivalentDoseUnit.Millisievert, quantity02.Unit); + + var quantity03 = RadiationEquivalentDose.From(1, RadiationEquivalentDoseUnit.Nanosievert); + AssertEx.EqualTolerance(1, quantity03.Nanosieverts, NanosievertsTolerance); + Assert.Equal(RadiationEquivalentDoseUnit.Nanosievert, quantity03.Unit); + + var quantity04 = RadiationEquivalentDose.From(1, RadiationEquivalentDoseUnit.RoentgenEquivalentMan); + AssertEx.EqualTolerance(1, quantity04.RoentgensEquivalentMan, RoentgensEquivalentManTolerance); + Assert.Equal(RadiationEquivalentDoseUnit.RoentgenEquivalentMan, quantity04.Unit); + + var quantity05 = RadiationEquivalentDose.From(1, RadiationEquivalentDoseUnit.Sievert); + AssertEx.EqualTolerance(1, quantity05.Sieverts, SievertsTolerance); + Assert.Equal(RadiationEquivalentDoseUnit.Sievert, quantity05.Unit); + + } + + [Fact] + public void FromSieverts_WithInfinityValue_DoNotThrowsArgumentException() + { + var exception1 = Record.Exception(() => RadiationEquivalentDose.FromSieverts(double.PositiveInfinity)); + var exception2 = Record.Exception(() => RadiationEquivalentDose.FromSieverts(double.NegativeInfinity)); + + Assert.Null(exception1); + Assert.Null(exception2); + } + + [Fact] + public void FromSieverts_WithNanValue_DoNotThrowsArgumentException() + { + var exception = Record.Exception(() => RadiationEquivalentDose.FromSieverts(double.NaN)); + + Assert.Null(exception); + } + + [Fact] + public void As() + { + var sievert = RadiationEquivalentDose.FromSieverts(1); + AssertEx.EqualTolerance(MicrosievertsInOneSievert, sievert.As(RadiationEquivalentDoseUnit.Microsievert), MicrosievertsTolerance); + AssertEx.EqualTolerance(MilliroentgensEquivalentManInOneSievert, sievert.As(RadiationEquivalentDoseUnit.MilliroentgenEquivalentMan), MilliroentgensEquivalentManTolerance); + AssertEx.EqualTolerance(MillisievertsInOneSievert, sievert.As(RadiationEquivalentDoseUnit.Millisievert), MillisievertsTolerance); + AssertEx.EqualTolerance(NanosievertsInOneSievert, sievert.As(RadiationEquivalentDoseUnit.Nanosievert), NanosievertsTolerance); + AssertEx.EqualTolerance(RoentgensEquivalentManInOneSievert, sievert.As(RadiationEquivalentDoseUnit.RoentgenEquivalentMan), RoentgensEquivalentManTolerance); + AssertEx.EqualTolerance(SievertsInOneSievert, sievert.As(RadiationEquivalentDoseUnit.Sievert), SievertsTolerance); + } + + [Fact] + public void As_SIUnitSystem_ThrowsArgumentExceptionIfNotSupported() + { + var quantity = new RadiationEquivalentDose(value: 1, unit: RadiationEquivalentDose.BaseUnit); + Func AsWithSIUnitSystem = () => quantity.As(UnitSystem.SI); + + if (SupportsSIUnitSystem) + { + var value = Convert.ToDouble(AsWithSIUnitSystem()); + Assert.Equal(1, value); + } + else + { + Assert.Throws(AsWithSIUnitSystem); + } + } + + [Fact] + public void Parse() + { + try + { + var parsed = RadiationEquivalentDose.Parse("1 µSv", CultureInfo.GetCultureInfo("en-US")); + AssertEx.EqualTolerance(1, parsed.Microsieverts, MicrosievertsTolerance); + Assert.Equal(RadiationEquivalentDoseUnit.Microsievert, parsed.Unit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsed = RadiationEquivalentDose.Parse("1 мкЗв", CultureInfo.GetCultureInfo("ru-RU")); + AssertEx.EqualTolerance(1, parsed.Microsieverts, MicrosievertsTolerance); + Assert.Equal(RadiationEquivalentDoseUnit.Microsievert, parsed.Unit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsed = RadiationEquivalentDose.Parse("1 mrem", CultureInfo.GetCultureInfo("en-US")); + AssertEx.EqualTolerance(1, parsed.MilliroentgensEquivalentMan, MilliroentgensEquivalentManTolerance); + Assert.Equal(RadiationEquivalentDoseUnit.MilliroentgenEquivalentMan, parsed.Unit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsed = RadiationEquivalentDose.Parse("1 mSv", CultureInfo.GetCultureInfo("en-US")); + AssertEx.EqualTolerance(1, parsed.Millisieverts, MillisievertsTolerance); + Assert.Equal(RadiationEquivalentDoseUnit.Millisievert, parsed.Unit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsed = RadiationEquivalentDose.Parse("1 мЗв", CultureInfo.GetCultureInfo("ru-RU")); + AssertEx.EqualTolerance(1, parsed.Millisieverts, MillisievertsTolerance); + Assert.Equal(RadiationEquivalentDoseUnit.Millisievert, parsed.Unit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsed = RadiationEquivalentDose.Parse("1 nSv", CultureInfo.GetCultureInfo("en-US")); + AssertEx.EqualTolerance(1, parsed.Nanosieverts, NanosievertsTolerance); + Assert.Equal(RadiationEquivalentDoseUnit.Nanosievert, parsed.Unit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsed = RadiationEquivalentDose.Parse("1 нЗв", CultureInfo.GetCultureInfo("ru-RU")); + AssertEx.EqualTolerance(1, parsed.Nanosieverts, NanosievertsTolerance); + Assert.Equal(RadiationEquivalentDoseUnit.Nanosievert, parsed.Unit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsed = RadiationEquivalentDose.Parse("1 rem", CultureInfo.GetCultureInfo("en-US")); + AssertEx.EqualTolerance(1, parsed.RoentgensEquivalentMan, RoentgensEquivalentManTolerance); + Assert.Equal(RadiationEquivalentDoseUnit.RoentgenEquivalentMan, parsed.Unit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsed = RadiationEquivalentDose.Parse("1 Sv", CultureInfo.GetCultureInfo("en-US")); + AssertEx.EqualTolerance(1, parsed.Sieverts, SievertsTolerance); + Assert.Equal(RadiationEquivalentDoseUnit.Sievert, parsed.Unit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsed = RadiationEquivalentDose.Parse("1 Зв", CultureInfo.GetCultureInfo("ru-RU")); + AssertEx.EqualTolerance(1, parsed.Sieverts, SievertsTolerance); + Assert.Equal(RadiationEquivalentDoseUnit.Sievert, parsed.Unit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + } + + [Fact] + public void TryParse() + { + { + Assert.True(RadiationEquivalentDose.TryParse("1 µSv", CultureInfo.GetCultureInfo("en-US"), out var parsed)); + AssertEx.EqualTolerance(1, parsed.Microsieverts, MicrosievertsTolerance); + Assert.Equal(RadiationEquivalentDoseUnit.Microsievert, parsed.Unit); + } + + { + Assert.True(RadiationEquivalentDose.TryParse("1 мкЗв", CultureInfo.GetCultureInfo("ru-RU"), out var parsed)); + AssertEx.EqualTolerance(1, parsed.Microsieverts, MicrosievertsTolerance); + Assert.Equal(RadiationEquivalentDoseUnit.Microsievert, parsed.Unit); + } + + { + Assert.True(RadiationEquivalentDose.TryParse("1 mrem", CultureInfo.GetCultureInfo("en-US"), out var parsed)); + AssertEx.EqualTolerance(1, parsed.MilliroentgensEquivalentMan, MilliroentgensEquivalentManTolerance); + Assert.Equal(RadiationEquivalentDoseUnit.MilliroentgenEquivalentMan, parsed.Unit); + } + + { + Assert.True(RadiationEquivalentDose.TryParse("1 mSv", CultureInfo.GetCultureInfo("en-US"), out var parsed)); + AssertEx.EqualTolerance(1, parsed.Millisieverts, MillisievertsTolerance); + Assert.Equal(RadiationEquivalentDoseUnit.Millisievert, parsed.Unit); + } + + { + Assert.True(RadiationEquivalentDose.TryParse("1 мЗв", CultureInfo.GetCultureInfo("ru-RU"), out var parsed)); + AssertEx.EqualTolerance(1, parsed.Millisieverts, MillisievertsTolerance); + Assert.Equal(RadiationEquivalentDoseUnit.Millisievert, parsed.Unit); + } + + { + Assert.True(RadiationEquivalentDose.TryParse("1 nSv", CultureInfo.GetCultureInfo("en-US"), out var parsed)); + AssertEx.EqualTolerance(1, parsed.Nanosieverts, NanosievertsTolerance); + Assert.Equal(RadiationEquivalentDoseUnit.Nanosievert, parsed.Unit); + } + + { + Assert.True(RadiationEquivalentDose.TryParse("1 нЗв", CultureInfo.GetCultureInfo("ru-RU"), out var parsed)); + AssertEx.EqualTolerance(1, parsed.Nanosieverts, NanosievertsTolerance); + Assert.Equal(RadiationEquivalentDoseUnit.Nanosievert, parsed.Unit); + } + + { + Assert.True(RadiationEquivalentDose.TryParse("1 rem", CultureInfo.GetCultureInfo("en-US"), out var parsed)); + AssertEx.EqualTolerance(1, parsed.RoentgensEquivalentMan, RoentgensEquivalentManTolerance); + Assert.Equal(RadiationEquivalentDoseUnit.RoentgenEquivalentMan, parsed.Unit); + } + + { + Assert.True(RadiationEquivalentDose.TryParse("1 Sv", CultureInfo.GetCultureInfo("en-US"), out var parsed)); + AssertEx.EqualTolerance(1, parsed.Sieverts, SievertsTolerance); + Assert.Equal(RadiationEquivalentDoseUnit.Sievert, parsed.Unit); + } + + { + Assert.True(RadiationEquivalentDose.TryParse("1 Зв", CultureInfo.GetCultureInfo("ru-RU"), out var parsed)); + AssertEx.EqualTolerance(1, parsed.Sieverts, SievertsTolerance); + Assert.Equal(RadiationEquivalentDoseUnit.Sievert, parsed.Unit); + } + + } + + [Fact] + public void ParseUnit() + { + try + { + var parsedUnit = RadiationEquivalentDose.ParseUnit("µSv", CultureInfo.GetCultureInfo("en-US")); + Assert.Equal(RadiationEquivalentDoseUnit.Microsievert, parsedUnit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsedUnit = RadiationEquivalentDose.ParseUnit("мкЗв", CultureInfo.GetCultureInfo("ru-RU")); + Assert.Equal(RadiationEquivalentDoseUnit.Microsievert, parsedUnit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsedUnit = RadiationEquivalentDose.ParseUnit("mrem", CultureInfo.GetCultureInfo("en-US")); + Assert.Equal(RadiationEquivalentDoseUnit.MilliroentgenEquivalentMan, parsedUnit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsedUnit = RadiationEquivalentDose.ParseUnit("mSv", CultureInfo.GetCultureInfo("en-US")); + Assert.Equal(RadiationEquivalentDoseUnit.Millisievert, parsedUnit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsedUnit = RadiationEquivalentDose.ParseUnit("мЗв", CultureInfo.GetCultureInfo("ru-RU")); + Assert.Equal(RadiationEquivalentDoseUnit.Millisievert, parsedUnit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsedUnit = RadiationEquivalentDose.ParseUnit("nSv", CultureInfo.GetCultureInfo("en-US")); + Assert.Equal(RadiationEquivalentDoseUnit.Nanosievert, parsedUnit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsedUnit = RadiationEquivalentDose.ParseUnit("нЗв", CultureInfo.GetCultureInfo("ru-RU")); + Assert.Equal(RadiationEquivalentDoseUnit.Nanosievert, parsedUnit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsedUnit = RadiationEquivalentDose.ParseUnit("rem", CultureInfo.GetCultureInfo("en-US")); + Assert.Equal(RadiationEquivalentDoseUnit.RoentgenEquivalentMan, parsedUnit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsedUnit = RadiationEquivalentDose.ParseUnit("Sv", CultureInfo.GetCultureInfo("en-US")); + Assert.Equal(RadiationEquivalentDoseUnit.Sievert, parsedUnit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsedUnit = RadiationEquivalentDose.ParseUnit("Зв", CultureInfo.GetCultureInfo("ru-RU")); + Assert.Equal(RadiationEquivalentDoseUnit.Sievert, parsedUnit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + } + + [Fact] + public void TryParseUnit() + { + { + Assert.True(RadiationEquivalentDose.TryParseUnit("µSv", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); + Assert.Equal(RadiationEquivalentDoseUnit.Microsievert, parsedUnit); + } + + { + Assert.True(RadiationEquivalentDose.TryParseUnit("мкЗв", CultureInfo.GetCultureInfo("ru-RU"), out var parsedUnit)); + Assert.Equal(RadiationEquivalentDoseUnit.Microsievert, parsedUnit); + } + + { + Assert.True(RadiationEquivalentDose.TryParseUnit("mrem", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); + Assert.Equal(RadiationEquivalentDoseUnit.MilliroentgenEquivalentMan, parsedUnit); + } + + { + Assert.True(RadiationEquivalentDose.TryParseUnit("mSv", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); + Assert.Equal(RadiationEquivalentDoseUnit.Millisievert, parsedUnit); + } + + { + Assert.True(RadiationEquivalentDose.TryParseUnit("мЗв", CultureInfo.GetCultureInfo("ru-RU"), out var parsedUnit)); + Assert.Equal(RadiationEquivalentDoseUnit.Millisievert, parsedUnit); + } + + { + Assert.True(RadiationEquivalentDose.TryParseUnit("nSv", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); + Assert.Equal(RadiationEquivalentDoseUnit.Nanosievert, parsedUnit); + } + + { + Assert.True(RadiationEquivalentDose.TryParseUnit("нЗв", CultureInfo.GetCultureInfo("ru-RU"), out var parsedUnit)); + Assert.Equal(RadiationEquivalentDoseUnit.Nanosievert, parsedUnit); + } + + { + Assert.True(RadiationEquivalentDose.TryParseUnit("rem", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); + Assert.Equal(RadiationEquivalentDoseUnit.RoentgenEquivalentMan, parsedUnit); + } + + { + Assert.True(RadiationEquivalentDose.TryParseUnit("Sv", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); + Assert.Equal(RadiationEquivalentDoseUnit.Sievert, parsedUnit); + } + + { + Assert.True(RadiationEquivalentDose.TryParseUnit("Зв", CultureInfo.GetCultureInfo("ru-RU"), out var parsedUnit)); + Assert.Equal(RadiationEquivalentDoseUnit.Sievert, parsedUnit); + } + + } + + [Theory] + [MemberData(nameof(UnitTypes))] + public void ToUnit(RadiationEquivalentDoseUnit unit) + { + var inBaseUnits = RadiationEquivalentDose.From(1.0, RadiationEquivalentDose.BaseUnit); + var converted = inBaseUnits.ToUnit(unit); + + var conversionFactor = GetConversionFactor(unit); + AssertEx.EqualTolerance(conversionFactor.UnitsInBaseUnit, converted.Value, conversionFactor.Tolerence); + Assert.Equal(unit, converted.Unit); + } + + [Theory] + [MemberData(nameof(UnitTypes))] + public void ToUnit_WithSameUnits_AreEqual(RadiationEquivalentDoseUnit unit) + { + var quantity = RadiationEquivalentDose.From(3.0, unit); + var toUnitWithSameUnit = quantity.ToUnit(unit); + Assert.Equal(quantity, toUnitWithSameUnit); + } + + [Theory] + [MemberData(nameof(UnitTypes))] + public void ToUnit_FromNonBaseUnit_ReturnsQuantityWithGivenUnit(RadiationEquivalentDoseUnit unit) + { + // See if there is a unit available that is not the base unit, fallback to base unit if it has only a single unit. + var fromUnit = RadiationEquivalentDose.Units.First(u => u != RadiationEquivalentDose.BaseUnit); + + var quantity = RadiationEquivalentDose.From(3.0, fromUnit); + var converted = quantity.ToUnit(unit); + Assert.Equal(converted.Unit, unit); + } + + [Theory] + [MemberData(nameof(UnitTypes))] + public virtual void ToUnit_FromDefaultQuantity_ReturnsQuantityWithGivenUnit(RadiationEquivalentDoseUnit unit) + { + var quantity = default(RadiationEquivalentDose); + var converted = quantity.ToUnit(unit); + Assert.Equal(converted.Unit, unit); + } + + [Fact] + public void ConversionRoundTrip() + { + RadiationEquivalentDose sievert = RadiationEquivalentDose.FromSieverts(1); + AssertEx.EqualTolerance(1, RadiationEquivalentDose.FromMicrosieverts(sievert.Microsieverts).Sieverts, MicrosievertsTolerance); + AssertEx.EqualTolerance(1, RadiationEquivalentDose.FromMilliroentgensEquivalentMan(sievert.MilliroentgensEquivalentMan).Sieverts, MilliroentgensEquivalentManTolerance); + AssertEx.EqualTolerance(1, RadiationEquivalentDose.FromMillisieverts(sievert.Millisieverts).Sieverts, MillisievertsTolerance); + AssertEx.EqualTolerance(1, RadiationEquivalentDose.FromNanosieverts(sievert.Nanosieverts).Sieverts, NanosievertsTolerance); + AssertEx.EqualTolerance(1, RadiationEquivalentDose.FromRoentgensEquivalentMan(sievert.RoentgensEquivalentMan).Sieverts, RoentgensEquivalentManTolerance); + AssertEx.EqualTolerance(1, RadiationEquivalentDose.FromSieverts(sievert.Sieverts).Sieverts, SievertsTolerance); + } + + [Fact] + public void ArithmeticOperators() + { + RadiationEquivalentDose v = RadiationEquivalentDose.FromSieverts(1); + AssertEx.EqualTolerance(-1, -v.Sieverts, SievertsTolerance); + AssertEx.EqualTolerance(2, (RadiationEquivalentDose.FromSieverts(3)-v).Sieverts, SievertsTolerance); + AssertEx.EqualTolerance(2, (v + v).Sieverts, SievertsTolerance); + AssertEx.EqualTolerance(10, (v*10).Sieverts, SievertsTolerance); + AssertEx.EqualTolerance(10, (10*v).Sieverts, SievertsTolerance); + AssertEx.EqualTolerance(2, (RadiationEquivalentDose.FromSieverts(10)/5).Sieverts, SievertsTolerance); + AssertEx.EqualTolerance(2, RadiationEquivalentDose.FromSieverts(10)/RadiationEquivalentDose.FromSieverts(5), SievertsTolerance); + } + + [Fact] + public void ComparisonOperators() + { + RadiationEquivalentDose oneSievert = RadiationEquivalentDose.FromSieverts(1); + RadiationEquivalentDose twoSieverts = RadiationEquivalentDose.FromSieverts(2); + + Assert.True(oneSievert < twoSieverts); + Assert.True(oneSievert <= twoSieverts); + Assert.True(twoSieverts > oneSievert); + Assert.True(twoSieverts >= oneSievert); + + Assert.False(oneSievert > twoSieverts); + Assert.False(oneSievert >= twoSieverts); + Assert.False(twoSieverts < oneSievert); + Assert.False(twoSieverts <= oneSievert); + } + + [Fact] + public void CompareToIsImplemented() + { + RadiationEquivalentDose sievert = RadiationEquivalentDose.FromSieverts(1); + Assert.Equal(0, sievert.CompareTo(sievert)); + Assert.True(sievert.CompareTo(RadiationEquivalentDose.Zero) > 0); + Assert.True(RadiationEquivalentDose.Zero.CompareTo(sievert) < 0); + } + + [Fact] + public void CompareToThrowsOnTypeMismatch() + { + RadiationEquivalentDose sievert = RadiationEquivalentDose.FromSieverts(1); + Assert.Throws(() => sievert.CompareTo(new object())); + } + + [Fact] + public void CompareToThrowsOnNull() + { + RadiationEquivalentDose sievert = RadiationEquivalentDose.FromSieverts(1); + Assert.Throws(() => sievert.CompareTo(null)); + } + + [Theory] + [InlineData(1, RadiationEquivalentDoseUnit.Sievert, 1, RadiationEquivalentDoseUnit.Sievert, true)] // Same value and unit. + [InlineData(1, RadiationEquivalentDoseUnit.Sievert, 2, RadiationEquivalentDoseUnit.Sievert, false)] // Different value. + [InlineData(2, RadiationEquivalentDoseUnit.Sievert, 1, RadiationEquivalentDoseUnit.Microsievert, false)] // Different value and unit. + [InlineData(1, RadiationEquivalentDoseUnit.Sievert, 1, RadiationEquivalentDoseUnit.Microsievert, false)] // Different unit. + public void Equals_ReturnsTrue_IfValueAndUnitAreEqual(double valueA, RadiationEquivalentDoseUnit unitA, double valueB, RadiationEquivalentDoseUnit unitB, bool expectEqual) + { + var a = new RadiationEquivalentDose(valueA, unitA); + var b = new RadiationEquivalentDose(valueB, unitB); + + // Operator overloads. + Assert.Equal(expectEqual, a == b); + Assert.Equal(expectEqual, b == a); + Assert.Equal(!expectEqual, a != b); + Assert.Equal(!expectEqual, b != a); + + // IEquatable + Assert.Equal(expectEqual, a.Equals(b)); + Assert.Equal(expectEqual, b.Equals(a)); + + // IEquatable + Assert.Equal(expectEqual, a.Equals((object)b)); + Assert.Equal(expectEqual, b.Equals((object)a)); + } + + [Fact] + public void Equals_Null_ReturnsFalse() + { + var a = RadiationEquivalentDose.Zero; + + Assert.False(a.Equals((object)null)); + + // "The result of the expression is always 'false'..." + #pragma warning disable CS8073 + Assert.False(a == null); + Assert.False(null == a); + Assert.True(a != null); + Assert.True(null != a); + #pragma warning restore CS8073 + } + + [Fact] + public void Equals_RelativeTolerance_IsImplemented() + { + var v = RadiationEquivalentDose.FromSieverts(1); + Assert.True(v.Equals(RadiationEquivalentDose.FromSieverts(1), SievertsTolerance, ComparisonType.Relative)); + Assert.False(v.Equals(RadiationEquivalentDose.Zero, SievertsTolerance, ComparisonType.Relative)); + } + + [Fact] + public void Equals_NegativeRelativeTolerance_ThrowsArgumentOutOfRangeException() + { + var v = RadiationEquivalentDose.FromSieverts(1); + Assert.Throws(() => v.Equals(RadiationEquivalentDose.FromSieverts(1), -1, ComparisonType.Relative)); + } + + [Fact] + public void EqualsReturnsFalseOnTypeMismatch() + { + RadiationEquivalentDose sievert = RadiationEquivalentDose.FromSieverts(1); + Assert.False(sievert.Equals(new object())); + } + + [Fact] + public void EqualsReturnsFalseOnNull() + { + RadiationEquivalentDose sievert = RadiationEquivalentDose.FromSieverts(1); + Assert.False(sievert.Equals(null)); + } + + [Fact] + public void HasAtLeastOneAbbreviationSpecified() + { + var units = Enum.GetValues(typeof(RadiationEquivalentDoseUnit)).Cast(); + foreach (var unit in units) + { + var defaultAbbreviation = UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit); + } + } + + [Fact] + public void BaseDimensionsShouldNeverBeNull() + { + Assert.False(RadiationEquivalentDose.BaseDimensions is null); + } + + [Fact] + public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() + { + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); + try { + Assert.Equal("1 µSv", new RadiationEquivalentDose(1, RadiationEquivalentDoseUnit.Microsievert).ToString()); + Assert.Equal("1 mrem", new RadiationEquivalentDose(1, RadiationEquivalentDoseUnit.MilliroentgenEquivalentMan).ToString()); + Assert.Equal("1 mSv", new RadiationEquivalentDose(1, RadiationEquivalentDoseUnit.Millisievert).ToString()); + Assert.Equal("1 nSv", new RadiationEquivalentDose(1, RadiationEquivalentDoseUnit.Nanosievert).ToString()); + Assert.Equal("1 rem", new RadiationEquivalentDose(1, RadiationEquivalentDoseUnit.RoentgenEquivalentMan).ToString()); + Assert.Equal("1 Sv", new RadiationEquivalentDose(1, RadiationEquivalentDoseUnit.Sievert).ToString()); + } + finally + { + Thread.CurrentThread.CurrentCulture = prevCulture; + } + } + + [Fact] + public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCultureSinceThereAreNoMappings() + { + // Chose this culture, because we don't currently have any abbreviations mapped for that culture and we expect the en-US to be used as fallback. + var swedishCulture = CultureInfo.GetCultureInfo("sv-SE"); + + Assert.Equal("1 µSv", new RadiationEquivalentDose(1, RadiationEquivalentDoseUnit.Microsievert).ToString(swedishCulture)); + Assert.Equal("1 mrem", new RadiationEquivalentDose(1, RadiationEquivalentDoseUnit.MilliroentgenEquivalentMan).ToString(swedishCulture)); + Assert.Equal("1 mSv", new RadiationEquivalentDose(1, RadiationEquivalentDoseUnit.Millisievert).ToString(swedishCulture)); + Assert.Equal("1 nSv", new RadiationEquivalentDose(1, RadiationEquivalentDoseUnit.Nanosievert).ToString(swedishCulture)); + Assert.Equal("1 rem", new RadiationEquivalentDose(1, RadiationEquivalentDoseUnit.RoentgenEquivalentMan).ToString(swedishCulture)); + Assert.Equal("1 Sv", new RadiationEquivalentDose(1, RadiationEquivalentDoseUnit.Sievert).ToString(swedishCulture)); + } + + [Fact] + public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() + { + var oldCulture = CultureInfo.CurrentCulture; + try + { + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; + Assert.Equal("0.1 Sv", new RadiationEquivalentDose(0.123456, RadiationEquivalentDoseUnit.Sievert).ToString("s1")); + Assert.Equal("0.12 Sv", new RadiationEquivalentDose(0.123456, RadiationEquivalentDoseUnit.Sievert).ToString("s2")); + Assert.Equal("0.123 Sv", new RadiationEquivalentDose(0.123456, RadiationEquivalentDoseUnit.Sievert).ToString("s3")); + Assert.Equal("0.1235 Sv", new RadiationEquivalentDose(0.123456, RadiationEquivalentDoseUnit.Sievert).ToString("s4")); + } + finally + { + CultureInfo.CurrentCulture = oldCulture; + } + } + + [Fact] + public void ToString_SFormatAndCulture_FormatsNumberWithGivenDigitsAfterRadixForGivenCulture() + { + var culture = CultureInfo.InvariantCulture; + Assert.Equal("0.1 Sv", new RadiationEquivalentDose(0.123456, RadiationEquivalentDoseUnit.Sievert).ToString("s1", culture)); + Assert.Equal("0.12 Sv", new RadiationEquivalentDose(0.123456, RadiationEquivalentDoseUnit.Sievert).ToString("s2", culture)); + Assert.Equal("0.123 Sv", new RadiationEquivalentDose(0.123456, RadiationEquivalentDoseUnit.Sievert).ToString("s3", culture)); + Assert.Equal("0.1235 Sv", new RadiationEquivalentDose(0.123456, RadiationEquivalentDoseUnit.Sievert).ToString("s4", culture)); + } + + [Theory] + [InlineData(null)] + [InlineData("en-US")] + public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) + { + var quantity = RadiationEquivalentDose.FromSieverts(1.0); + CultureInfo formatProvider = cultureName == null + ? null + : CultureInfo.GetCultureInfo(cultureName); + + Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider)); + } + + [Theory] + [InlineData(null)] + [InlineData("g")] + public void ToString_NullProvider_EqualsCurrentCulture(string format) + { + var quantity = RadiationEquivalentDose.FromSieverts(1.0); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); + } + + [Fact] + public void Convert_ToBool_ThrowsInvalidCastException() + { + var quantity = RadiationEquivalentDose.FromSieverts(1.0); + Assert.Throws(() => Convert.ToBoolean(quantity)); + } + + [Fact] + public void Convert_ToByte_EqualsValueAsSameType() + { + var quantity = RadiationEquivalentDose.FromSieverts(1.0); + Assert.Equal((byte)quantity.Value, Convert.ToByte(quantity)); + } + + [Fact] + public void Convert_ToChar_ThrowsInvalidCastException() + { + var quantity = RadiationEquivalentDose.FromSieverts(1.0); + Assert.Throws(() => Convert.ToChar(quantity)); + } + + [Fact] + public void Convert_ToDateTime_ThrowsInvalidCastException() + { + var quantity = RadiationEquivalentDose.FromSieverts(1.0); + Assert.Throws(() => Convert.ToDateTime(quantity)); + } + + [Fact] + public void Convert_ToDecimal_EqualsValueAsSameType() + { + var quantity = RadiationEquivalentDose.FromSieverts(1.0); + Assert.Equal((decimal)quantity.Value, Convert.ToDecimal(quantity)); + } + + [Fact] + public void Convert_ToDouble_EqualsValueAsSameType() + { + var quantity = RadiationEquivalentDose.FromSieverts(1.0); + Assert.Equal((double)quantity.Value, Convert.ToDouble(quantity)); + } + + [Fact] + public void Convert_ToInt16_EqualsValueAsSameType() + { + var quantity = RadiationEquivalentDose.FromSieverts(1.0); + Assert.Equal((short)quantity.Value, Convert.ToInt16(quantity)); + } + + [Fact] + public void Convert_ToInt32_EqualsValueAsSameType() + { + var quantity = RadiationEquivalentDose.FromSieverts(1.0); + Assert.Equal((int)quantity.Value, Convert.ToInt32(quantity)); + } + + [Fact] + public void Convert_ToInt64_EqualsValueAsSameType() + { + var quantity = RadiationEquivalentDose.FromSieverts(1.0); + Assert.Equal((long)quantity.Value, Convert.ToInt64(quantity)); + } + + [Fact] + public void Convert_ToSByte_EqualsValueAsSameType() + { + var quantity = RadiationEquivalentDose.FromSieverts(1.0); + Assert.Equal((sbyte)quantity.Value, Convert.ToSByte(quantity)); + } + + [Fact] + public void Convert_ToSingle_EqualsValueAsSameType() + { + var quantity = RadiationEquivalentDose.FromSieverts(1.0); + Assert.Equal((float)quantity.Value, Convert.ToSingle(quantity)); + } + + [Fact] + public void Convert_ToString_EqualsToString() + { + var quantity = RadiationEquivalentDose.FromSieverts(1.0); + Assert.Equal(quantity.ToString(), Convert.ToString(quantity)); + } + + [Fact] + public void Convert_ToUInt16_EqualsValueAsSameType() + { + var quantity = RadiationEquivalentDose.FromSieverts(1.0); + Assert.Equal((ushort)quantity.Value, Convert.ToUInt16(quantity)); + } + + [Fact] + public void Convert_ToUInt32_EqualsValueAsSameType() + { + var quantity = RadiationEquivalentDose.FromSieverts(1.0); + Assert.Equal((uint)quantity.Value, Convert.ToUInt32(quantity)); + } + + [Fact] + public void Convert_ToUInt64_EqualsValueAsSameType() + { + var quantity = RadiationEquivalentDose.FromSieverts(1.0); + Assert.Equal((ulong)quantity.Value, Convert.ToUInt64(quantity)); + } + + [Fact] + public void Convert_ChangeType_SelfType_EqualsSelf() + { + var quantity = RadiationEquivalentDose.FromSieverts(1.0); + Assert.Equal(quantity, Convert.ChangeType(quantity, typeof(RadiationEquivalentDose))); + } + + [Fact] + public void Convert_ChangeType_UnitType_EqualsUnit() + { + var quantity = RadiationEquivalentDose.FromSieverts(1.0); + Assert.Equal(quantity.Unit, Convert.ChangeType(quantity, typeof(RadiationEquivalentDoseUnit))); + } + + [Fact] + public void Convert_ChangeType_QuantityInfo_EqualsQuantityInfo() + { + var quantity = RadiationEquivalentDose.FromSieverts(1.0); + Assert.Equal(RadiationEquivalentDose.Info, Convert.ChangeType(quantity, typeof(QuantityInfo))); + } + + [Fact] + public void Convert_ChangeType_BaseDimensions_EqualsBaseDimensions() + { + var quantity = RadiationEquivalentDose.FromSieverts(1.0); + Assert.Equal(RadiationEquivalentDose.BaseDimensions, Convert.ChangeType(quantity, typeof(BaseDimensions))); + } + + [Fact] + public void Convert_ChangeType_InvalidType_ThrowsInvalidCastException() + { + var quantity = RadiationEquivalentDose.FromSieverts(1.0); + Assert.Throws(() => Convert.ChangeType(quantity, typeof(QuantityFormatter))); + } + + [Fact] + public void GetHashCode_Equals() + { + var quantity = RadiationEquivalentDose.FromSieverts(1.0); + Assert.Equal(new {RadiationEquivalentDose.Info.Name, quantity.Value, quantity.Unit}.GetHashCode(), quantity.GetHashCode()); + } + + [Theory] + [InlineData(1.0)] + [InlineData(-1.0)] + public void NegationOperator_ReturnsQuantity_WithNegatedValue(double value) + { + var quantity = RadiationEquivalentDose.FromSieverts(value); + Assert.Equal(RadiationEquivalentDose.FromSieverts(-value), -quantity); + } + } +} diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowTestsBase.g.cs index a043cccb19..6f3a994a0d 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowTestsBase.g.cs @@ -60,10 +60,18 @@ public abstract partial class VolumeFlowTestsBase : QuantityTestsBase protected abstract double CubicYardsPerHourInOneCubicMeterPerSecond { get; } protected abstract double CubicYardsPerMinuteInOneCubicMeterPerSecond { get; } protected abstract double CubicYardsPerSecondInOneCubicMeterPerSecond { get; } + protected abstract double DecalitersPerDayInOneCubicMeterPerSecond { get; } + protected abstract double DecalitersPerHourInOneCubicMeterPerSecond { get; } + protected abstract double DecalitersPerMinuteInOneCubicMeterPerSecond { get; } + protected abstract double DecalitersPerSecondInOneCubicMeterPerSecond { get; } protected abstract double DecilitersPerDayInOneCubicMeterPerSecond { get; } protected abstract double DecilitersPerHourInOneCubicMeterPerSecond { get; } protected abstract double DecilitersPerMinuteInOneCubicMeterPerSecond { get; } protected abstract double DecilitersPerSecondInOneCubicMeterPerSecond { get; } + protected abstract double HectolitersPerDayInOneCubicMeterPerSecond { get; } + protected abstract double HectolitersPerHourInOneCubicMeterPerSecond { get; } + protected abstract double HectolitersPerMinuteInOneCubicMeterPerSecond { get; } + protected abstract double HectolitersPerSecondInOneCubicMeterPerSecond { get; } protected abstract double KilolitersPerDayInOneCubicMeterPerSecond { get; } protected abstract double KilolitersPerHourInOneCubicMeterPerSecond { get; } protected abstract double KilolitersPerMinuteInOneCubicMeterPerSecond { get; } @@ -129,10 +137,18 @@ public abstract partial class VolumeFlowTestsBase : QuantityTestsBase protected virtual double CubicYardsPerHourTolerance { get { return 1e-5; } } protected virtual double CubicYardsPerMinuteTolerance { get { return 1e-5; } } protected virtual double CubicYardsPerSecondTolerance { get { return 1e-5; } } + protected virtual double DecalitersPerDayTolerance { get { return 1e-5; } } + protected virtual double DecalitersPerHourTolerance { get { return 1e-5; } } + protected virtual double DecalitersPerMinuteTolerance { get { return 1e-5; } } + protected virtual double DecalitersPerSecondTolerance { get { return 1e-5; } } protected virtual double DecilitersPerDayTolerance { get { return 1e-5; } } protected virtual double DecilitersPerHourTolerance { get { return 1e-5; } } protected virtual double DecilitersPerMinuteTolerance { get { return 1e-5; } } protected virtual double DecilitersPerSecondTolerance { get { return 1e-5; } } + protected virtual double HectolitersPerDayTolerance { get { return 1e-5; } } + protected virtual double HectolitersPerHourTolerance { get { return 1e-5; } } + protected virtual double HectolitersPerMinuteTolerance { get { return 1e-5; } } + protected virtual double HectolitersPerSecondTolerance { get { return 1e-5; } } protected virtual double KilolitersPerDayTolerance { get { return 1e-5; } } protected virtual double KilolitersPerHourTolerance { get { return 1e-5; } } protected virtual double KilolitersPerMinuteTolerance { get { return 1e-5; } } @@ -202,10 +218,18 @@ public abstract partial class VolumeFlowTestsBase : QuantityTestsBase VolumeFlowUnit.CubicYardPerHour => (CubicYardsPerHourInOneCubicMeterPerSecond, CubicYardsPerHourTolerance), VolumeFlowUnit.CubicYardPerMinute => (CubicYardsPerMinuteInOneCubicMeterPerSecond, CubicYardsPerMinuteTolerance), VolumeFlowUnit.CubicYardPerSecond => (CubicYardsPerSecondInOneCubicMeterPerSecond, CubicYardsPerSecondTolerance), + VolumeFlowUnit.DecaliterPerDay => (DecalitersPerDayInOneCubicMeterPerSecond, DecalitersPerDayTolerance), + VolumeFlowUnit.DecaliterPerHour => (DecalitersPerHourInOneCubicMeterPerSecond, DecalitersPerHourTolerance), + VolumeFlowUnit.DecaliterPerMinute => (DecalitersPerMinuteInOneCubicMeterPerSecond, DecalitersPerMinuteTolerance), + VolumeFlowUnit.DecaliterPerSecond => (DecalitersPerSecondInOneCubicMeterPerSecond, DecalitersPerSecondTolerance), VolumeFlowUnit.DeciliterPerDay => (DecilitersPerDayInOneCubicMeterPerSecond, DecilitersPerDayTolerance), VolumeFlowUnit.DeciliterPerHour => (DecilitersPerHourInOneCubicMeterPerSecond, DecilitersPerHourTolerance), VolumeFlowUnit.DeciliterPerMinute => (DecilitersPerMinuteInOneCubicMeterPerSecond, DecilitersPerMinuteTolerance), VolumeFlowUnit.DeciliterPerSecond => (DecilitersPerSecondInOneCubicMeterPerSecond, DecilitersPerSecondTolerance), + VolumeFlowUnit.HectoliterPerDay => (HectolitersPerDayInOneCubicMeterPerSecond, HectolitersPerDayTolerance), + VolumeFlowUnit.HectoliterPerHour => (HectolitersPerHourInOneCubicMeterPerSecond, HectolitersPerHourTolerance), + VolumeFlowUnit.HectoliterPerMinute => (HectolitersPerMinuteInOneCubicMeterPerSecond, HectolitersPerMinuteTolerance), + VolumeFlowUnit.HectoliterPerSecond => (HectolitersPerSecondInOneCubicMeterPerSecond, HectolitersPerSecondTolerance), VolumeFlowUnit.KiloliterPerDay => (KilolitersPerDayInOneCubicMeterPerSecond, KilolitersPerDayTolerance), VolumeFlowUnit.KiloliterPerHour => (KilolitersPerHourInOneCubicMeterPerSecond, KilolitersPerHourTolerance), VolumeFlowUnit.KiloliterPerMinute => (KilolitersPerMinuteInOneCubicMeterPerSecond, KilolitersPerMinuteTolerance), @@ -275,10 +299,18 @@ public abstract partial class VolumeFlowTestsBase : QuantityTestsBase new object[] { VolumeFlowUnit.CubicYardPerHour }, new object[] { VolumeFlowUnit.CubicYardPerMinute }, new object[] { VolumeFlowUnit.CubicYardPerSecond }, + new object[] { VolumeFlowUnit.DecaliterPerDay }, + new object[] { VolumeFlowUnit.DecaliterPerHour }, + new object[] { VolumeFlowUnit.DecaliterPerMinute }, + new object[] { VolumeFlowUnit.DecaliterPerSecond }, new object[] { VolumeFlowUnit.DeciliterPerDay }, new object[] { VolumeFlowUnit.DeciliterPerHour }, new object[] { VolumeFlowUnit.DeciliterPerMinute }, new object[] { VolumeFlowUnit.DeciliterPerSecond }, + new object[] { VolumeFlowUnit.HectoliterPerDay }, + new object[] { VolumeFlowUnit.HectoliterPerHour }, + new object[] { VolumeFlowUnit.HectoliterPerMinute }, + new object[] { VolumeFlowUnit.HectoliterPerSecond }, new object[] { VolumeFlowUnit.KiloliterPerDay }, new object[] { VolumeFlowUnit.KiloliterPerHour }, new object[] { VolumeFlowUnit.KiloliterPerMinute }, @@ -409,10 +441,18 @@ public void CubicMeterPerSecondToVolumeFlowUnits() AssertEx.EqualTolerance(CubicYardsPerHourInOneCubicMeterPerSecond, cubicmeterpersecond.CubicYardsPerHour, CubicYardsPerHourTolerance); AssertEx.EqualTolerance(CubicYardsPerMinuteInOneCubicMeterPerSecond, cubicmeterpersecond.CubicYardsPerMinute, CubicYardsPerMinuteTolerance); AssertEx.EqualTolerance(CubicYardsPerSecondInOneCubicMeterPerSecond, cubicmeterpersecond.CubicYardsPerSecond, CubicYardsPerSecondTolerance); + AssertEx.EqualTolerance(DecalitersPerDayInOneCubicMeterPerSecond, cubicmeterpersecond.DecalitersPerDay, DecalitersPerDayTolerance); + AssertEx.EqualTolerance(DecalitersPerHourInOneCubicMeterPerSecond, cubicmeterpersecond.DecalitersPerHour, DecalitersPerHourTolerance); + AssertEx.EqualTolerance(DecalitersPerMinuteInOneCubicMeterPerSecond, cubicmeterpersecond.DecalitersPerMinute, DecalitersPerMinuteTolerance); + AssertEx.EqualTolerance(DecalitersPerSecondInOneCubicMeterPerSecond, cubicmeterpersecond.DecalitersPerSecond, DecalitersPerSecondTolerance); AssertEx.EqualTolerance(DecilitersPerDayInOneCubicMeterPerSecond, cubicmeterpersecond.DecilitersPerDay, DecilitersPerDayTolerance); AssertEx.EqualTolerance(DecilitersPerHourInOneCubicMeterPerSecond, cubicmeterpersecond.DecilitersPerHour, DecilitersPerHourTolerance); AssertEx.EqualTolerance(DecilitersPerMinuteInOneCubicMeterPerSecond, cubicmeterpersecond.DecilitersPerMinute, DecilitersPerMinuteTolerance); AssertEx.EqualTolerance(DecilitersPerSecondInOneCubicMeterPerSecond, cubicmeterpersecond.DecilitersPerSecond, DecilitersPerSecondTolerance); + AssertEx.EqualTolerance(HectolitersPerDayInOneCubicMeterPerSecond, cubicmeterpersecond.HectolitersPerDay, HectolitersPerDayTolerance); + AssertEx.EqualTolerance(HectolitersPerHourInOneCubicMeterPerSecond, cubicmeterpersecond.HectolitersPerHour, HectolitersPerHourTolerance); + AssertEx.EqualTolerance(HectolitersPerMinuteInOneCubicMeterPerSecond, cubicmeterpersecond.HectolitersPerMinute, HectolitersPerMinuteTolerance); + AssertEx.EqualTolerance(HectolitersPerSecondInOneCubicMeterPerSecond, cubicmeterpersecond.HectolitersPerSecond, HectolitersPerSecondTolerance); AssertEx.EqualTolerance(KilolitersPerDayInOneCubicMeterPerSecond, cubicmeterpersecond.KilolitersPerDay, KilolitersPerDayTolerance); AssertEx.EqualTolerance(KilolitersPerHourInOneCubicMeterPerSecond, cubicmeterpersecond.KilolitersPerHour, KilolitersPerHourTolerance); AssertEx.EqualTolerance(KilolitersPerMinuteInOneCubicMeterPerSecond, cubicmeterpersecond.KilolitersPerMinute, KilolitersPerMinuteTolerance); @@ -547,185 +587,217 @@ public void From_ValueAndUnit_ReturnsQuantityWithSameValueAndUnit() AssertEx.EqualTolerance(1, quantity21.CubicYardsPerSecond, CubicYardsPerSecondTolerance); Assert.Equal(VolumeFlowUnit.CubicYardPerSecond, quantity21.Unit); - var quantity22 = VolumeFlow.From(1, VolumeFlowUnit.DeciliterPerDay); - AssertEx.EqualTolerance(1, quantity22.DecilitersPerDay, DecilitersPerDayTolerance); - Assert.Equal(VolumeFlowUnit.DeciliterPerDay, quantity22.Unit); + var quantity22 = VolumeFlow.From(1, VolumeFlowUnit.DecaliterPerDay); + AssertEx.EqualTolerance(1, quantity22.DecalitersPerDay, DecalitersPerDayTolerance); + Assert.Equal(VolumeFlowUnit.DecaliterPerDay, quantity22.Unit); - var quantity23 = VolumeFlow.From(1, VolumeFlowUnit.DeciliterPerHour); - AssertEx.EqualTolerance(1, quantity23.DecilitersPerHour, DecilitersPerHourTolerance); - Assert.Equal(VolumeFlowUnit.DeciliterPerHour, quantity23.Unit); + var quantity23 = VolumeFlow.From(1, VolumeFlowUnit.DecaliterPerHour); + AssertEx.EqualTolerance(1, quantity23.DecalitersPerHour, DecalitersPerHourTolerance); + Assert.Equal(VolumeFlowUnit.DecaliterPerHour, quantity23.Unit); - var quantity24 = VolumeFlow.From(1, VolumeFlowUnit.DeciliterPerMinute); - AssertEx.EqualTolerance(1, quantity24.DecilitersPerMinute, DecilitersPerMinuteTolerance); - Assert.Equal(VolumeFlowUnit.DeciliterPerMinute, quantity24.Unit); + var quantity24 = VolumeFlow.From(1, VolumeFlowUnit.DecaliterPerMinute); + AssertEx.EqualTolerance(1, quantity24.DecalitersPerMinute, DecalitersPerMinuteTolerance); + Assert.Equal(VolumeFlowUnit.DecaliterPerMinute, quantity24.Unit); - var quantity25 = VolumeFlow.From(1, VolumeFlowUnit.DeciliterPerSecond); - AssertEx.EqualTolerance(1, quantity25.DecilitersPerSecond, DecilitersPerSecondTolerance); - Assert.Equal(VolumeFlowUnit.DeciliterPerSecond, quantity25.Unit); + var quantity25 = VolumeFlow.From(1, VolumeFlowUnit.DecaliterPerSecond); + AssertEx.EqualTolerance(1, quantity25.DecalitersPerSecond, DecalitersPerSecondTolerance); + Assert.Equal(VolumeFlowUnit.DecaliterPerSecond, quantity25.Unit); - var quantity26 = VolumeFlow.From(1, VolumeFlowUnit.KiloliterPerDay); - AssertEx.EqualTolerance(1, quantity26.KilolitersPerDay, KilolitersPerDayTolerance); - Assert.Equal(VolumeFlowUnit.KiloliterPerDay, quantity26.Unit); + var quantity26 = VolumeFlow.From(1, VolumeFlowUnit.DeciliterPerDay); + AssertEx.EqualTolerance(1, quantity26.DecilitersPerDay, DecilitersPerDayTolerance); + Assert.Equal(VolumeFlowUnit.DeciliterPerDay, quantity26.Unit); - var quantity27 = VolumeFlow.From(1, VolumeFlowUnit.KiloliterPerHour); - AssertEx.EqualTolerance(1, quantity27.KilolitersPerHour, KilolitersPerHourTolerance); - Assert.Equal(VolumeFlowUnit.KiloliterPerHour, quantity27.Unit); + var quantity27 = VolumeFlow.From(1, VolumeFlowUnit.DeciliterPerHour); + AssertEx.EqualTolerance(1, quantity27.DecilitersPerHour, DecilitersPerHourTolerance); + Assert.Equal(VolumeFlowUnit.DeciliterPerHour, quantity27.Unit); - var quantity28 = VolumeFlow.From(1, VolumeFlowUnit.KiloliterPerMinute); - AssertEx.EqualTolerance(1, quantity28.KilolitersPerMinute, KilolitersPerMinuteTolerance); - Assert.Equal(VolumeFlowUnit.KiloliterPerMinute, quantity28.Unit); + var quantity28 = VolumeFlow.From(1, VolumeFlowUnit.DeciliterPerMinute); + AssertEx.EqualTolerance(1, quantity28.DecilitersPerMinute, DecilitersPerMinuteTolerance); + Assert.Equal(VolumeFlowUnit.DeciliterPerMinute, quantity28.Unit); - var quantity29 = VolumeFlow.From(1, VolumeFlowUnit.KiloliterPerSecond); - AssertEx.EqualTolerance(1, quantity29.KilolitersPerSecond, KilolitersPerSecondTolerance); - Assert.Equal(VolumeFlowUnit.KiloliterPerSecond, quantity29.Unit); + var quantity29 = VolumeFlow.From(1, VolumeFlowUnit.DeciliterPerSecond); + AssertEx.EqualTolerance(1, quantity29.DecilitersPerSecond, DecilitersPerSecondTolerance); + Assert.Equal(VolumeFlowUnit.DeciliterPerSecond, quantity29.Unit); - var quantity30 = VolumeFlow.From(1, VolumeFlowUnit.KilousGallonPerMinute); - AssertEx.EqualTolerance(1, quantity30.KilousGallonsPerMinute, KilousGallonsPerMinuteTolerance); - Assert.Equal(VolumeFlowUnit.KilousGallonPerMinute, quantity30.Unit); + var quantity30 = VolumeFlow.From(1, VolumeFlowUnit.HectoliterPerDay); + AssertEx.EqualTolerance(1, quantity30.HectolitersPerDay, HectolitersPerDayTolerance); + Assert.Equal(VolumeFlowUnit.HectoliterPerDay, quantity30.Unit); - var quantity31 = VolumeFlow.From(1, VolumeFlowUnit.LiterPerDay); - AssertEx.EqualTolerance(1, quantity31.LitersPerDay, LitersPerDayTolerance); - Assert.Equal(VolumeFlowUnit.LiterPerDay, quantity31.Unit); + var quantity31 = VolumeFlow.From(1, VolumeFlowUnit.HectoliterPerHour); + AssertEx.EqualTolerance(1, quantity31.HectolitersPerHour, HectolitersPerHourTolerance); + Assert.Equal(VolumeFlowUnit.HectoliterPerHour, quantity31.Unit); - var quantity32 = VolumeFlow.From(1, VolumeFlowUnit.LiterPerHour); - AssertEx.EqualTolerance(1, quantity32.LitersPerHour, LitersPerHourTolerance); - Assert.Equal(VolumeFlowUnit.LiterPerHour, quantity32.Unit); + var quantity32 = VolumeFlow.From(1, VolumeFlowUnit.HectoliterPerMinute); + AssertEx.EqualTolerance(1, quantity32.HectolitersPerMinute, HectolitersPerMinuteTolerance); + Assert.Equal(VolumeFlowUnit.HectoliterPerMinute, quantity32.Unit); - var quantity33 = VolumeFlow.From(1, VolumeFlowUnit.LiterPerMinute); - AssertEx.EqualTolerance(1, quantity33.LitersPerMinute, LitersPerMinuteTolerance); - Assert.Equal(VolumeFlowUnit.LiterPerMinute, quantity33.Unit); + var quantity33 = VolumeFlow.From(1, VolumeFlowUnit.HectoliterPerSecond); + AssertEx.EqualTolerance(1, quantity33.HectolitersPerSecond, HectolitersPerSecondTolerance); + Assert.Equal(VolumeFlowUnit.HectoliterPerSecond, quantity33.Unit); - var quantity34 = VolumeFlow.From(1, VolumeFlowUnit.LiterPerSecond); - AssertEx.EqualTolerance(1, quantity34.LitersPerSecond, LitersPerSecondTolerance); - Assert.Equal(VolumeFlowUnit.LiterPerSecond, quantity34.Unit); + var quantity34 = VolumeFlow.From(1, VolumeFlowUnit.KiloliterPerDay); + AssertEx.EqualTolerance(1, quantity34.KilolitersPerDay, KilolitersPerDayTolerance); + Assert.Equal(VolumeFlowUnit.KiloliterPerDay, quantity34.Unit); - var quantity35 = VolumeFlow.From(1, VolumeFlowUnit.MegaliterPerDay); - AssertEx.EqualTolerance(1, quantity35.MegalitersPerDay, MegalitersPerDayTolerance); - Assert.Equal(VolumeFlowUnit.MegaliterPerDay, quantity35.Unit); + var quantity35 = VolumeFlow.From(1, VolumeFlowUnit.KiloliterPerHour); + AssertEx.EqualTolerance(1, quantity35.KilolitersPerHour, KilolitersPerHourTolerance); + Assert.Equal(VolumeFlowUnit.KiloliterPerHour, quantity35.Unit); - var quantity36 = VolumeFlow.From(1, VolumeFlowUnit.MegaliterPerHour); - AssertEx.EqualTolerance(1, quantity36.MegalitersPerHour, MegalitersPerHourTolerance); - Assert.Equal(VolumeFlowUnit.MegaliterPerHour, quantity36.Unit); + var quantity36 = VolumeFlow.From(1, VolumeFlowUnit.KiloliterPerMinute); + AssertEx.EqualTolerance(1, quantity36.KilolitersPerMinute, KilolitersPerMinuteTolerance); + Assert.Equal(VolumeFlowUnit.KiloliterPerMinute, quantity36.Unit); - var quantity37 = VolumeFlow.From(1, VolumeFlowUnit.MegaliterPerMinute); - AssertEx.EqualTolerance(1, quantity37.MegalitersPerMinute, MegalitersPerMinuteTolerance); - Assert.Equal(VolumeFlowUnit.MegaliterPerMinute, quantity37.Unit); + var quantity37 = VolumeFlow.From(1, VolumeFlowUnit.KiloliterPerSecond); + AssertEx.EqualTolerance(1, quantity37.KilolitersPerSecond, KilolitersPerSecondTolerance); + Assert.Equal(VolumeFlowUnit.KiloliterPerSecond, quantity37.Unit); - var quantity38 = VolumeFlow.From(1, VolumeFlowUnit.MegaliterPerSecond); - AssertEx.EqualTolerance(1, quantity38.MegalitersPerSecond, MegalitersPerSecondTolerance); - Assert.Equal(VolumeFlowUnit.MegaliterPerSecond, quantity38.Unit); + var quantity38 = VolumeFlow.From(1, VolumeFlowUnit.KilousGallonPerMinute); + AssertEx.EqualTolerance(1, quantity38.KilousGallonsPerMinute, KilousGallonsPerMinuteTolerance); + Assert.Equal(VolumeFlowUnit.KilousGallonPerMinute, quantity38.Unit); - var quantity39 = VolumeFlow.From(1, VolumeFlowUnit.MegaukGallonPerDay); - AssertEx.EqualTolerance(1, quantity39.MegaukGallonsPerDay, MegaukGallonsPerDayTolerance); - Assert.Equal(VolumeFlowUnit.MegaukGallonPerDay, quantity39.Unit); + var quantity39 = VolumeFlow.From(1, VolumeFlowUnit.LiterPerDay); + AssertEx.EqualTolerance(1, quantity39.LitersPerDay, LitersPerDayTolerance); + Assert.Equal(VolumeFlowUnit.LiterPerDay, quantity39.Unit); - var quantity40 = VolumeFlow.From(1, VolumeFlowUnit.MegaukGallonPerSecond); - AssertEx.EqualTolerance(1, quantity40.MegaukGallonsPerSecond, MegaukGallonsPerSecondTolerance); - Assert.Equal(VolumeFlowUnit.MegaukGallonPerSecond, quantity40.Unit); + var quantity40 = VolumeFlow.From(1, VolumeFlowUnit.LiterPerHour); + AssertEx.EqualTolerance(1, quantity40.LitersPerHour, LitersPerHourTolerance); + Assert.Equal(VolumeFlowUnit.LiterPerHour, quantity40.Unit); - var quantity41 = VolumeFlow.From(1, VolumeFlowUnit.MegausGallonPerDay); - AssertEx.EqualTolerance(1, quantity41.MegausGallonsPerDay, MegausGallonsPerDayTolerance); - Assert.Equal(VolumeFlowUnit.MegausGallonPerDay, quantity41.Unit); + var quantity41 = VolumeFlow.From(1, VolumeFlowUnit.LiterPerMinute); + AssertEx.EqualTolerance(1, quantity41.LitersPerMinute, LitersPerMinuteTolerance); + Assert.Equal(VolumeFlowUnit.LiterPerMinute, quantity41.Unit); - var quantity42 = VolumeFlow.From(1, VolumeFlowUnit.MicroliterPerDay); - AssertEx.EqualTolerance(1, quantity42.MicrolitersPerDay, MicrolitersPerDayTolerance); - Assert.Equal(VolumeFlowUnit.MicroliterPerDay, quantity42.Unit); + var quantity42 = VolumeFlow.From(1, VolumeFlowUnit.LiterPerSecond); + AssertEx.EqualTolerance(1, quantity42.LitersPerSecond, LitersPerSecondTolerance); + Assert.Equal(VolumeFlowUnit.LiterPerSecond, quantity42.Unit); - var quantity43 = VolumeFlow.From(1, VolumeFlowUnit.MicroliterPerHour); - AssertEx.EqualTolerance(1, quantity43.MicrolitersPerHour, MicrolitersPerHourTolerance); - Assert.Equal(VolumeFlowUnit.MicroliterPerHour, quantity43.Unit); + var quantity43 = VolumeFlow.From(1, VolumeFlowUnit.MegaliterPerDay); + AssertEx.EqualTolerance(1, quantity43.MegalitersPerDay, MegalitersPerDayTolerance); + Assert.Equal(VolumeFlowUnit.MegaliterPerDay, quantity43.Unit); - var quantity44 = VolumeFlow.From(1, VolumeFlowUnit.MicroliterPerMinute); - AssertEx.EqualTolerance(1, quantity44.MicrolitersPerMinute, MicrolitersPerMinuteTolerance); - Assert.Equal(VolumeFlowUnit.MicroliterPerMinute, quantity44.Unit); + var quantity44 = VolumeFlow.From(1, VolumeFlowUnit.MegaliterPerHour); + AssertEx.EqualTolerance(1, quantity44.MegalitersPerHour, MegalitersPerHourTolerance); + Assert.Equal(VolumeFlowUnit.MegaliterPerHour, quantity44.Unit); - var quantity45 = VolumeFlow.From(1, VolumeFlowUnit.MicroliterPerSecond); - AssertEx.EqualTolerance(1, quantity45.MicrolitersPerSecond, MicrolitersPerSecondTolerance); - Assert.Equal(VolumeFlowUnit.MicroliterPerSecond, quantity45.Unit); + var quantity45 = VolumeFlow.From(1, VolumeFlowUnit.MegaliterPerMinute); + AssertEx.EqualTolerance(1, quantity45.MegalitersPerMinute, MegalitersPerMinuteTolerance); + Assert.Equal(VolumeFlowUnit.MegaliterPerMinute, quantity45.Unit); - var quantity46 = VolumeFlow.From(1, VolumeFlowUnit.MilliliterPerDay); - AssertEx.EqualTolerance(1, quantity46.MillilitersPerDay, MillilitersPerDayTolerance); - Assert.Equal(VolumeFlowUnit.MilliliterPerDay, quantity46.Unit); + var quantity46 = VolumeFlow.From(1, VolumeFlowUnit.MegaliterPerSecond); + AssertEx.EqualTolerance(1, quantity46.MegalitersPerSecond, MegalitersPerSecondTolerance); + Assert.Equal(VolumeFlowUnit.MegaliterPerSecond, quantity46.Unit); - var quantity47 = VolumeFlow.From(1, VolumeFlowUnit.MilliliterPerHour); - AssertEx.EqualTolerance(1, quantity47.MillilitersPerHour, MillilitersPerHourTolerance); - Assert.Equal(VolumeFlowUnit.MilliliterPerHour, quantity47.Unit); + var quantity47 = VolumeFlow.From(1, VolumeFlowUnit.MegaukGallonPerDay); + AssertEx.EqualTolerance(1, quantity47.MegaukGallonsPerDay, MegaukGallonsPerDayTolerance); + Assert.Equal(VolumeFlowUnit.MegaukGallonPerDay, quantity47.Unit); - var quantity48 = VolumeFlow.From(1, VolumeFlowUnit.MilliliterPerMinute); - AssertEx.EqualTolerance(1, quantity48.MillilitersPerMinute, MillilitersPerMinuteTolerance); - Assert.Equal(VolumeFlowUnit.MilliliterPerMinute, quantity48.Unit); + var quantity48 = VolumeFlow.From(1, VolumeFlowUnit.MegaukGallonPerSecond); + AssertEx.EqualTolerance(1, quantity48.MegaukGallonsPerSecond, MegaukGallonsPerSecondTolerance); + Assert.Equal(VolumeFlowUnit.MegaukGallonPerSecond, quantity48.Unit); - var quantity49 = VolumeFlow.From(1, VolumeFlowUnit.MilliliterPerSecond); - AssertEx.EqualTolerance(1, quantity49.MillilitersPerSecond, MillilitersPerSecondTolerance); - Assert.Equal(VolumeFlowUnit.MilliliterPerSecond, quantity49.Unit); + var quantity49 = VolumeFlow.From(1, VolumeFlowUnit.MegausGallonPerDay); + AssertEx.EqualTolerance(1, quantity49.MegausGallonsPerDay, MegausGallonsPerDayTolerance); + Assert.Equal(VolumeFlowUnit.MegausGallonPerDay, quantity49.Unit); - var quantity50 = VolumeFlow.From(1, VolumeFlowUnit.MillionUsGallonPerDay); - AssertEx.EqualTolerance(1, quantity50.MillionUsGallonsPerDay, MillionUsGallonsPerDayTolerance); - Assert.Equal(VolumeFlowUnit.MillionUsGallonPerDay, quantity50.Unit); + var quantity50 = VolumeFlow.From(1, VolumeFlowUnit.MicroliterPerDay); + AssertEx.EqualTolerance(1, quantity50.MicrolitersPerDay, MicrolitersPerDayTolerance); + Assert.Equal(VolumeFlowUnit.MicroliterPerDay, quantity50.Unit); - var quantity51 = VolumeFlow.From(1, VolumeFlowUnit.NanoliterPerDay); - AssertEx.EqualTolerance(1, quantity51.NanolitersPerDay, NanolitersPerDayTolerance); - Assert.Equal(VolumeFlowUnit.NanoliterPerDay, quantity51.Unit); + var quantity51 = VolumeFlow.From(1, VolumeFlowUnit.MicroliterPerHour); + AssertEx.EqualTolerance(1, quantity51.MicrolitersPerHour, MicrolitersPerHourTolerance); + Assert.Equal(VolumeFlowUnit.MicroliterPerHour, quantity51.Unit); - var quantity52 = VolumeFlow.From(1, VolumeFlowUnit.NanoliterPerHour); - AssertEx.EqualTolerance(1, quantity52.NanolitersPerHour, NanolitersPerHourTolerance); - Assert.Equal(VolumeFlowUnit.NanoliterPerHour, quantity52.Unit); + var quantity52 = VolumeFlow.From(1, VolumeFlowUnit.MicroliterPerMinute); + AssertEx.EqualTolerance(1, quantity52.MicrolitersPerMinute, MicrolitersPerMinuteTolerance); + Assert.Equal(VolumeFlowUnit.MicroliterPerMinute, quantity52.Unit); - var quantity53 = VolumeFlow.From(1, VolumeFlowUnit.NanoliterPerMinute); - AssertEx.EqualTolerance(1, quantity53.NanolitersPerMinute, NanolitersPerMinuteTolerance); - Assert.Equal(VolumeFlowUnit.NanoliterPerMinute, quantity53.Unit); + var quantity53 = VolumeFlow.From(1, VolumeFlowUnit.MicroliterPerSecond); + AssertEx.EqualTolerance(1, quantity53.MicrolitersPerSecond, MicrolitersPerSecondTolerance); + Assert.Equal(VolumeFlowUnit.MicroliterPerSecond, quantity53.Unit); - var quantity54 = VolumeFlow.From(1, VolumeFlowUnit.NanoliterPerSecond); - AssertEx.EqualTolerance(1, quantity54.NanolitersPerSecond, NanolitersPerSecondTolerance); - Assert.Equal(VolumeFlowUnit.NanoliterPerSecond, quantity54.Unit); + var quantity54 = VolumeFlow.From(1, VolumeFlowUnit.MilliliterPerDay); + AssertEx.EqualTolerance(1, quantity54.MillilitersPerDay, MillilitersPerDayTolerance); + Assert.Equal(VolumeFlowUnit.MilliliterPerDay, quantity54.Unit); - var quantity55 = VolumeFlow.From(1, VolumeFlowUnit.OilBarrelPerDay); - AssertEx.EqualTolerance(1, quantity55.OilBarrelsPerDay, OilBarrelsPerDayTolerance); - Assert.Equal(VolumeFlowUnit.OilBarrelPerDay, quantity55.Unit); + var quantity55 = VolumeFlow.From(1, VolumeFlowUnit.MilliliterPerHour); + AssertEx.EqualTolerance(1, quantity55.MillilitersPerHour, MillilitersPerHourTolerance); + Assert.Equal(VolumeFlowUnit.MilliliterPerHour, quantity55.Unit); - var quantity56 = VolumeFlow.From(1, VolumeFlowUnit.OilBarrelPerHour); - AssertEx.EqualTolerance(1, quantity56.OilBarrelsPerHour, OilBarrelsPerHourTolerance); - Assert.Equal(VolumeFlowUnit.OilBarrelPerHour, quantity56.Unit); + var quantity56 = VolumeFlow.From(1, VolumeFlowUnit.MilliliterPerMinute); + AssertEx.EqualTolerance(1, quantity56.MillilitersPerMinute, MillilitersPerMinuteTolerance); + Assert.Equal(VolumeFlowUnit.MilliliterPerMinute, quantity56.Unit); - var quantity57 = VolumeFlow.From(1, VolumeFlowUnit.OilBarrelPerMinute); - AssertEx.EqualTolerance(1, quantity57.OilBarrelsPerMinute, OilBarrelsPerMinuteTolerance); - Assert.Equal(VolumeFlowUnit.OilBarrelPerMinute, quantity57.Unit); + var quantity57 = VolumeFlow.From(1, VolumeFlowUnit.MilliliterPerSecond); + AssertEx.EqualTolerance(1, quantity57.MillilitersPerSecond, MillilitersPerSecondTolerance); + Assert.Equal(VolumeFlowUnit.MilliliterPerSecond, quantity57.Unit); - var quantity58 = VolumeFlow.From(1, VolumeFlowUnit.OilBarrelPerSecond); - AssertEx.EqualTolerance(1, quantity58.OilBarrelsPerSecond, OilBarrelsPerSecondTolerance); - Assert.Equal(VolumeFlowUnit.OilBarrelPerSecond, quantity58.Unit); + var quantity58 = VolumeFlow.From(1, VolumeFlowUnit.MillionUsGallonPerDay); + AssertEx.EqualTolerance(1, quantity58.MillionUsGallonsPerDay, MillionUsGallonsPerDayTolerance); + Assert.Equal(VolumeFlowUnit.MillionUsGallonPerDay, quantity58.Unit); - var quantity59 = VolumeFlow.From(1, VolumeFlowUnit.UkGallonPerDay); - AssertEx.EqualTolerance(1, quantity59.UkGallonsPerDay, UkGallonsPerDayTolerance); - Assert.Equal(VolumeFlowUnit.UkGallonPerDay, quantity59.Unit); + var quantity59 = VolumeFlow.From(1, VolumeFlowUnit.NanoliterPerDay); + AssertEx.EqualTolerance(1, quantity59.NanolitersPerDay, NanolitersPerDayTolerance); + Assert.Equal(VolumeFlowUnit.NanoliterPerDay, quantity59.Unit); - var quantity60 = VolumeFlow.From(1, VolumeFlowUnit.UkGallonPerHour); - AssertEx.EqualTolerance(1, quantity60.UkGallonsPerHour, UkGallonsPerHourTolerance); - Assert.Equal(VolumeFlowUnit.UkGallonPerHour, quantity60.Unit); + var quantity60 = VolumeFlow.From(1, VolumeFlowUnit.NanoliterPerHour); + AssertEx.EqualTolerance(1, quantity60.NanolitersPerHour, NanolitersPerHourTolerance); + Assert.Equal(VolumeFlowUnit.NanoliterPerHour, quantity60.Unit); - var quantity61 = VolumeFlow.From(1, VolumeFlowUnit.UkGallonPerMinute); - AssertEx.EqualTolerance(1, quantity61.UkGallonsPerMinute, UkGallonsPerMinuteTolerance); - Assert.Equal(VolumeFlowUnit.UkGallonPerMinute, quantity61.Unit); + var quantity61 = VolumeFlow.From(1, VolumeFlowUnit.NanoliterPerMinute); + AssertEx.EqualTolerance(1, quantity61.NanolitersPerMinute, NanolitersPerMinuteTolerance); + Assert.Equal(VolumeFlowUnit.NanoliterPerMinute, quantity61.Unit); - var quantity62 = VolumeFlow.From(1, VolumeFlowUnit.UkGallonPerSecond); - AssertEx.EqualTolerance(1, quantity62.UkGallonsPerSecond, UkGallonsPerSecondTolerance); - Assert.Equal(VolumeFlowUnit.UkGallonPerSecond, quantity62.Unit); + var quantity62 = VolumeFlow.From(1, VolumeFlowUnit.NanoliterPerSecond); + AssertEx.EqualTolerance(1, quantity62.NanolitersPerSecond, NanolitersPerSecondTolerance); + Assert.Equal(VolumeFlowUnit.NanoliterPerSecond, quantity62.Unit); - var quantity63 = VolumeFlow.From(1, VolumeFlowUnit.UsGallonPerDay); - AssertEx.EqualTolerance(1, quantity63.UsGallonsPerDay, UsGallonsPerDayTolerance); - Assert.Equal(VolumeFlowUnit.UsGallonPerDay, quantity63.Unit); + var quantity63 = VolumeFlow.From(1, VolumeFlowUnit.OilBarrelPerDay); + AssertEx.EqualTolerance(1, quantity63.OilBarrelsPerDay, OilBarrelsPerDayTolerance); + Assert.Equal(VolumeFlowUnit.OilBarrelPerDay, quantity63.Unit); - var quantity64 = VolumeFlow.From(1, VolumeFlowUnit.UsGallonPerHour); - AssertEx.EqualTolerance(1, quantity64.UsGallonsPerHour, UsGallonsPerHourTolerance); - Assert.Equal(VolumeFlowUnit.UsGallonPerHour, quantity64.Unit); + var quantity64 = VolumeFlow.From(1, VolumeFlowUnit.OilBarrelPerHour); + AssertEx.EqualTolerance(1, quantity64.OilBarrelsPerHour, OilBarrelsPerHourTolerance); + Assert.Equal(VolumeFlowUnit.OilBarrelPerHour, quantity64.Unit); - var quantity65 = VolumeFlow.From(1, VolumeFlowUnit.UsGallonPerMinute); - AssertEx.EqualTolerance(1, quantity65.UsGallonsPerMinute, UsGallonsPerMinuteTolerance); - Assert.Equal(VolumeFlowUnit.UsGallonPerMinute, quantity65.Unit); + var quantity65 = VolumeFlow.From(1, VolumeFlowUnit.OilBarrelPerMinute); + AssertEx.EqualTolerance(1, quantity65.OilBarrelsPerMinute, OilBarrelsPerMinuteTolerance); + Assert.Equal(VolumeFlowUnit.OilBarrelPerMinute, quantity65.Unit); - var quantity66 = VolumeFlow.From(1, VolumeFlowUnit.UsGallonPerSecond); - AssertEx.EqualTolerance(1, quantity66.UsGallonsPerSecond, UsGallonsPerSecondTolerance); - Assert.Equal(VolumeFlowUnit.UsGallonPerSecond, quantity66.Unit); + var quantity66 = VolumeFlow.From(1, VolumeFlowUnit.OilBarrelPerSecond); + AssertEx.EqualTolerance(1, quantity66.OilBarrelsPerSecond, OilBarrelsPerSecondTolerance); + Assert.Equal(VolumeFlowUnit.OilBarrelPerSecond, quantity66.Unit); + + var quantity67 = VolumeFlow.From(1, VolumeFlowUnit.UkGallonPerDay); + AssertEx.EqualTolerance(1, quantity67.UkGallonsPerDay, UkGallonsPerDayTolerance); + Assert.Equal(VolumeFlowUnit.UkGallonPerDay, quantity67.Unit); + + var quantity68 = VolumeFlow.From(1, VolumeFlowUnit.UkGallonPerHour); + AssertEx.EqualTolerance(1, quantity68.UkGallonsPerHour, UkGallonsPerHourTolerance); + Assert.Equal(VolumeFlowUnit.UkGallonPerHour, quantity68.Unit); + + var quantity69 = VolumeFlow.From(1, VolumeFlowUnit.UkGallonPerMinute); + AssertEx.EqualTolerance(1, quantity69.UkGallonsPerMinute, UkGallonsPerMinuteTolerance); + Assert.Equal(VolumeFlowUnit.UkGallonPerMinute, quantity69.Unit); + + var quantity70 = VolumeFlow.From(1, VolumeFlowUnit.UkGallonPerSecond); + AssertEx.EqualTolerance(1, quantity70.UkGallonsPerSecond, UkGallonsPerSecondTolerance); + Assert.Equal(VolumeFlowUnit.UkGallonPerSecond, quantity70.Unit); + + var quantity71 = VolumeFlow.From(1, VolumeFlowUnit.UsGallonPerDay); + AssertEx.EqualTolerance(1, quantity71.UsGallonsPerDay, UsGallonsPerDayTolerance); + Assert.Equal(VolumeFlowUnit.UsGallonPerDay, quantity71.Unit); + + var quantity72 = VolumeFlow.From(1, VolumeFlowUnit.UsGallonPerHour); + AssertEx.EqualTolerance(1, quantity72.UsGallonsPerHour, UsGallonsPerHourTolerance); + Assert.Equal(VolumeFlowUnit.UsGallonPerHour, quantity72.Unit); + + var quantity73 = VolumeFlow.From(1, VolumeFlowUnit.UsGallonPerMinute); + AssertEx.EqualTolerance(1, quantity73.UsGallonsPerMinute, UsGallonsPerMinuteTolerance); + Assert.Equal(VolumeFlowUnit.UsGallonPerMinute, quantity73.Unit); + + var quantity74 = VolumeFlow.From(1, VolumeFlowUnit.UsGallonPerSecond); + AssertEx.EqualTolerance(1, quantity74.UsGallonsPerSecond, UsGallonsPerSecondTolerance); + Assert.Equal(VolumeFlowUnit.UsGallonPerSecond, quantity74.Unit); } @@ -773,10 +845,18 @@ public void As() AssertEx.EqualTolerance(CubicYardsPerHourInOneCubicMeterPerSecond, cubicmeterpersecond.As(VolumeFlowUnit.CubicYardPerHour), CubicYardsPerHourTolerance); AssertEx.EqualTolerance(CubicYardsPerMinuteInOneCubicMeterPerSecond, cubicmeterpersecond.As(VolumeFlowUnit.CubicYardPerMinute), CubicYardsPerMinuteTolerance); AssertEx.EqualTolerance(CubicYardsPerSecondInOneCubicMeterPerSecond, cubicmeterpersecond.As(VolumeFlowUnit.CubicYardPerSecond), CubicYardsPerSecondTolerance); + AssertEx.EqualTolerance(DecalitersPerDayInOneCubicMeterPerSecond, cubicmeterpersecond.As(VolumeFlowUnit.DecaliterPerDay), DecalitersPerDayTolerance); + AssertEx.EqualTolerance(DecalitersPerHourInOneCubicMeterPerSecond, cubicmeterpersecond.As(VolumeFlowUnit.DecaliterPerHour), DecalitersPerHourTolerance); + AssertEx.EqualTolerance(DecalitersPerMinuteInOneCubicMeterPerSecond, cubicmeterpersecond.As(VolumeFlowUnit.DecaliterPerMinute), DecalitersPerMinuteTolerance); + AssertEx.EqualTolerance(DecalitersPerSecondInOneCubicMeterPerSecond, cubicmeterpersecond.As(VolumeFlowUnit.DecaliterPerSecond), DecalitersPerSecondTolerance); AssertEx.EqualTolerance(DecilitersPerDayInOneCubicMeterPerSecond, cubicmeterpersecond.As(VolumeFlowUnit.DeciliterPerDay), DecilitersPerDayTolerance); AssertEx.EqualTolerance(DecilitersPerHourInOneCubicMeterPerSecond, cubicmeterpersecond.As(VolumeFlowUnit.DeciliterPerHour), DecilitersPerHourTolerance); AssertEx.EqualTolerance(DecilitersPerMinuteInOneCubicMeterPerSecond, cubicmeterpersecond.As(VolumeFlowUnit.DeciliterPerMinute), DecilitersPerMinuteTolerance); AssertEx.EqualTolerance(DecilitersPerSecondInOneCubicMeterPerSecond, cubicmeterpersecond.As(VolumeFlowUnit.DeciliterPerSecond), DecilitersPerSecondTolerance); + AssertEx.EqualTolerance(HectolitersPerDayInOneCubicMeterPerSecond, cubicmeterpersecond.As(VolumeFlowUnit.HectoliterPerDay), HectolitersPerDayTolerance); + AssertEx.EqualTolerance(HectolitersPerHourInOneCubicMeterPerSecond, cubicmeterpersecond.As(VolumeFlowUnit.HectoliterPerHour), HectolitersPerHourTolerance); + AssertEx.EqualTolerance(HectolitersPerMinuteInOneCubicMeterPerSecond, cubicmeterpersecond.As(VolumeFlowUnit.HectoliterPerMinute), HectolitersPerMinuteTolerance); + AssertEx.EqualTolerance(HectolitersPerSecondInOneCubicMeterPerSecond, cubicmeterpersecond.As(VolumeFlowUnit.HectoliterPerSecond), HectolitersPerSecondTolerance); AssertEx.EqualTolerance(KilolitersPerDayInOneCubicMeterPerSecond, cubicmeterpersecond.As(VolumeFlowUnit.KiloliterPerDay), KilolitersPerDayTolerance); AssertEx.EqualTolerance(KilolitersPerHourInOneCubicMeterPerSecond, cubicmeterpersecond.As(VolumeFlowUnit.KiloliterPerHour), KilolitersPerHourTolerance); AssertEx.EqualTolerance(KilolitersPerMinuteInOneCubicMeterPerSecond, cubicmeterpersecond.As(VolumeFlowUnit.KiloliterPerMinute), KilolitersPerMinuteTolerance); @@ -1106,6 +1186,90 @@ public void Parse() Assert.Equal(VolumeFlowUnit.CubicYardPerSecond, parsed.Unit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + try + { + var parsed = VolumeFlow.Parse("1 dal/day", CultureInfo.GetCultureInfo("en-US")); + AssertEx.EqualTolerance(1, parsed.DecalitersPerDay, DecalitersPerDayTolerance); + Assert.Equal(VolumeFlowUnit.DecaliterPerDay, parsed.Unit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsed = VolumeFlow.Parse("1 daL/d", CultureInfo.GetCultureInfo("en-US")); + AssertEx.EqualTolerance(1, parsed.DecalitersPerDay, DecalitersPerDayTolerance); + Assert.Equal(VolumeFlowUnit.DecaliterPerDay, parsed.Unit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsed = VolumeFlow.Parse("1 daLPD", CultureInfo.GetCultureInfo("en-US")); + AssertEx.EqualTolerance(1, parsed.DecalitersPerDay, DecalitersPerDayTolerance); + Assert.Equal(VolumeFlowUnit.DecaliterPerDay, parsed.Unit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsed = VolumeFlow.Parse("1 daL/h", CultureInfo.GetCultureInfo("en-US")); + AssertEx.EqualTolerance(1, parsed.DecalitersPerHour, DecalitersPerHourTolerance); + Assert.Equal(VolumeFlowUnit.DecaliterPerHour, parsed.Unit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsed = VolumeFlow.Parse("1 daLPH", CultureInfo.GetCultureInfo("en-US")); + AssertEx.EqualTolerance(1, parsed.DecalitersPerHour, DecalitersPerHourTolerance); + Assert.Equal(VolumeFlowUnit.DecaliterPerHour, parsed.Unit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsed = VolumeFlow.Parse("1 дал/ч", CultureInfo.GetCultureInfo("ru-RU")); + AssertEx.EqualTolerance(1, parsed.DecalitersPerHour, DecalitersPerHourTolerance); + Assert.Equal(VolumeFlowUnit.DecaliterPerHour, parsed.Unit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsed = VolumeFlow.Parse("1 daL/min", CultureInfo.GetCultureInfo("en-US")); + AssertEx.EqualTolerance(1, parsed.DecalitersPerMinute, DecalitersPerMinuteTolerance); + Assert.Equal(VolumeFlowUnit.DecaliterPerMinute, parsed.Unit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsed = VolumeFlow.Parse("1 daLPM", CultureInfo.GetCultureInfo("en-US")); + AssertEx.EqualTolerance(1, parsed.DecalitersPerMinute, DecalitersPerMinuteTolerance); + Assert.Equal(VolumeFlowUnit.DecaliterPerMinute, parsed.Unit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsed = VolumeFlow.Parse("1 дал/мин", CultureInfo.GetCultureInfo("ru-RU")); + AssertEx.EqualTolerance(1, parsed.DecalitersPerMinute, DecalitersPerMinuteTolerance); + Assert.Equal(VolumeFlowUnit.DecaliterPerMinute, parsed.Unit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsed = VolumeFlow.Parse("1 daL/s", CultureInfo.GetCultureInfo("en-US")); + AssertEx.EqualTolerance(1, parsed.DecalitersPerSecond, DecalitersPerSecondTolerance); + Assert.Equal(VolumeFlowUnit.DecaliterPerSecond, parsed.Unit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsed = VolumeFlow.Parse("1 daLPS", CultureInfo.GetCultureInfo("en-US")); + AssertEx.EqualTolerance(1, parsed.DecalitersPerSecond, DecalitersPerSecondTolerance); + Assert.Equal(VolumeFlowUnit.DecaliterPerSecond, parsed.Unit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsed = VolumeFlow.Parse("1 дал/c", CultureInfo.GetCultureInfo("ru-RU")); + AssertEx.EqualTolerance(1, parsed.DecalitersPerSecond, DecalitersPerSecondTolerance); + Assert.Equal(VolumeFlowUnit.DecaliterPerSecond, parsed.Unit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + try { var parsed = VolumeFlow.Parse("1 dl/day", CultureInfo.GetCultureInfo("en-US")); @@ -1190,6 +1354,90 @@ public void Parse() Assert.Equal(VolumeFlowUnit.DeciliterPerSecond, parsed.Unit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + try + { + var parsed = VolumeFlow.Parse("1 hl/day", CultureInfo.GetCultureInfo("en-US")); + AssertEx.EqualTolerance(1, parsed.HectolitersPerDay, HectolitersPerDayTolerance); + Assert.Equal(VolumeFlowUnit.HectoliterPerDay, parsed.Unit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsed = VolumeFlow.Parse("1 hL/d", CultureInfo.GetCultureInfo("en-US")); + AssertEx.EqualTolerance(1, parsed.HectolitersPerDay, HectolitersPerDayTolerance); + Assert.Equal(VolumeFlowUnit.HectoliterPerDay, parsed.Unit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsed = VolumeFlow.Parse("1 hLPD", CultureInfo.GetCultureInfo("en-US")); + AssertEx.EqualTolerance(1, parsed.HectolitersPerDay, HectolitersPerDayTolerance); + Assert.Equal(VolumeFlowUnit.HectoliterPerDay, parsed.Unit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsed = VolumeFlow.Parse("1 hL/h", CultureInfo.GetCultureInfo("en-US")); + AssertEx.EqualTolerance(1, parsed.HectolitersPerHour, HectolitersPerHourTolerance); + Assert.Equal(VolumeFlowUnit.HectoliterPerHour, parsed.Unit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsed = VolumeFlow.Parse("1 hLPH", CultureInfo.GetCultureInfo("en-US")); + AssertEx.EqualTolerance(1, parsed.HectolitersPerHour, HectolitersPerHourTolerance); + Assert.Equal(VolumeFlowUnit.HectoliterPerHour, parsed.Unit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsed = VolumeFlow.Parse("1 гл/ч", CultureInfo.GetCultureInfo("ru-RU")); + AssertEx.EqualTolerance(1, parsed.HectolitersPerHour, HectolitersPerHourTolerance); + Assert.Equal(VolumeFlowUnit.HectoliterPerHour, parsed.Unit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsed = VolumeFlow.Parse("1 hL/min", CultureInfo.GetCultureInfo("en-US")); + AssertEx.EqualTolerance(1, parsed.HectolitersPerMinute, HectolitersPerMinuteTolerance); + Assert.Equal(VolumeFlowUnit.HectoliterPerMinute, parsed.Unit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsed = VolumeFlow.Parse("1 hLPM", CultureInfo.GetCultureInfo("en-US")); + AssertEx.EqualTolerance(1, parsed.HectolitersPerMinute, HectolitersPerMinuteTolerance); + Assert.Equal(VolumeFlowUnit.HectoliterPerMinute, parsed.Unit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsed = VolumeFlow.Parse("1 гл/мин", CultureInfo.GetCultureInfo("ru-RU")); + AssertEx.EqualTolerance(1, parsed.HectolitersPerMinute, HectolitersPerMinuteTolerance); + Assert.Equal(VolumeFlowUnit.HectoliterPerMinute, parsed.Unit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsed = VolumeFlow.Parse("1 hL/s", CultureInfo.GetCultureInfo("en-US")); + AssertEx.EqualTolerance(1, parsed.HectolitersPerSecond, HectolitersPerSecondTolerance); + Assert.Equal(VolumeFlowUnit.HectoliterPerSecond, parsed.Unit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsed = VolumeFlow.Parse("1 hLPS", CultureInfo.GetCultureInfo("en-US")); + AssertEx.EqualTolerance(1, parsed.HectolitersPerSecond, HectolitersPerSecondTolerance); + Assert.Equal(VolumeFlowUnit.HectoliterPerSecond, parsed.Unit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsed = VolumeFlow.Parse("1 гл/c", CultureInfo.GetCultureInfo("ru-RU")); + AssertEx.EqualTolerance(1, parsed.HectolitersPerSecond, HectolitersPerSecondTolerance); + Assert.Equal(VolumeFlowUnit.HectoliterPerSecond, parsed.Unit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + try { var parsed = VolumeFlow.Parse("1 kl/day", CultureInfo.GetCultureInfo("en-US")); @@ -2095,6 +2343,78 @@ public void TryParse() Assert.Equal(VolumeFlowUnit.CubicYardPerSecond, parsed.Unit); } + { + Assert.True(VolumeFlow.TryParse("1 dal/day", CultureInfo.GetCultureInfo("en-US"), out var parsed)); + AssertEx.EqualTolerance(1, parsed.DecalitersPerDay, DecalitersPerDayTolerance); + Assert.Equal(VolumeFlowUnit.DecaliterPerDay, parsed.Unit); + } + + { + Assert.True(VolumeFlow.TryParse("1 daL/d", CultureInfo.GetCultureInfo("en-US"), out var parsed)); + AssertEx.EqualTolerance(1, parsed.DecalitersPerDay, DecalitersPerDayTolerance); + Assert.Equal(VolumeFlowUnit.DecaliterPerDay, parsed.Unit); + } + + { + Assert.True(VolumeFlow.TryParse("1 daLPD", CultureInfo.GetCultureInfo("en-US"), out var parsed)); + AssertEx.EqualTolerance(1, parsed.DecalitersPerDay, DecalitersPerDayTolerance); + Assert.Equal(VolumeFlowUnit.DecaliterPerDay, parsed.Unit); + } + + { + Assert.True(VolumeFlow.TryParse("1 daL/h", CultureInfo.GetCultureInfo("en-US"), out var parsed)); + AssertEx.EqualTolerance(1, parsed.DecalitersPerHour, DecalitersPerHourTolerance); + Assert.Equal(VolumeFlowUnit.DecaliterPerHour, parsed.Unit); + } + + { + Assert.True(VolumeFlow.TryParse("1 daLPH", CultureInfo.GetCultureInfo("en-US"), out var parsed)); + AssertEx.EqualTolerance(1, parsed.DecalitersPerHour, DecalitersPerHourTolerance); + Assert.Equal(VolumeFlowUnit.DecaliterPerHour, parsed.Unit); + } + + { + Assert.True(VolumeFlow.TryParse("1 дал/ч", CultureInfo.GetCultureInfo("ru-RU"), out var parsed)); + AssertEx.EqualTolerance(1, parsed.DecalitersPerHour, DecalitersPerHourTolerance); + Assert.Equal(VolumeFlowUnit.DecaliterPerHour, parsed.Unit); + } + + { + Assert.True(VolumeFlow.TryParse("1 daL/min", CultureInfo.GetCultureInfo("en-US"), out var parsed)); + AssertEx.EqualTolerance(1, parsed.DecalitersPerMinute, DecalitersPerMinuteTolerance); + Assert.Equal(VolumeFlowUnit.DecaliterPerMinute, parsed.Unit); + } + + { + Assert.True(VolumeFlow.TryParse("1 daLPM", CultureInfo.GetCultureInfo("en-US"), out var parsed)); + AssertEx.EqualTolerance(1, parsed.DecalitersPerMinute, DecalitersPerMinuteTolerance); + Assert.Equal(VolumeFlowUnit.DecaliterPerMinute, parsed.Unit); + } + + { + Assert.True(VolumeFlow.TryParse("1 дал/мин", CultureInfo.GetCultureInfo("ru-RU"), out var parsed)); + AssertEx.EqualTolerance(1, parsed.DecalitersPerMinute, DecalitersPerMinuteTolerance); + Assert.Equal(VolumeFlowUnit.DecaliterPerMinute, parsed.Unit); + } + + { + Assert.True(VolumeFlow.TryParse("1 daL/s", CultureInfo.GetCultureInfo("en-US"), out var parsed)); + AssertEx.EqualTolerance(1, parsed.DecalitersPerSecond, DecalitersPerSecondTolerance); + Assert.Equal(VolumeFlowUnit.DecaliterPerSecond, parsed.Unit); + } + + { + Assert.True(VolumeFlow.TryParse("1 daLPS", CultureInfo.GetCultureInfo("en-US"), out var parsed)); + AssertEx.EqualTolerance(1, parsed.DecalitersPerSecond, DecalitersPerSecondTolerance); + Assert.Equal(VolumeFlowUnit.DecaliterPerSecond, parsed.Unit); + } + + { + Assert.True(VolumeFlow.TryParse("1 дал/c", CultureInfo.GetCultureInfo("ru-RU"), out var parsed)); + AssertEx.EqualTolerance(1, parsed.DecalitersPerSecond, DecalitersPerSecondTolerance); + Assert.Equal(VolumeFlowUnit.DecaliterPerSecond, parsed.Unit); + } + { Assert.True(VolumeFlow.TryParse("1 dl/day", CultureInfo.GetCultureInfo("en-US"), out var parsed)); AssertEx.EqualTolerance(1, parsed.DecilitersPerDay, DecilitersPerDayTolerance); @@ -2167,6 +2487,78 @@ public void TryParse() Assert.Equal(VolumeFlowUnit.DeciliterPerSecond, parsed.Unit); } + { + Assert.True(VolumeFlow.TryParse("1 hl/day", CultureInfo.GetCultureInfo("en-US"), out var parsed)); + AssertEx.EqualTolerance(1, parsed.HectolitersPerDay, HectolitersPerDayTolerance); + Assert.Equal(VolumeFlowUnit.HectoliterPerDay, parsed.Unit); + } + + { + Assert.True(VolumeFlow.TryParse("1 hL/d", CultureInfo.GetCultureInfo("en-US"), out var parsed)); + AssertEx.EqualTolerance(1, parsed.HectolitersPerDay, HectolitersPerDayTolerance); + Assert.Equal(VolumeFlowUnit.HectoliterPerDay, parsed.Unit); + } + + { + Assert.True(VolumeFlow.TryParse("1 hLPD", CultureInfo.GetCultureInfo("en-US"), out var parsed)); + AssertEx.EqualTolerance(1, parsed.HectolitersPerDay, HectolitersPerDayTolerance); + Assert.Equal(VolumeFlowUnit.HectoliterPerDay, parsed.Unit); + } + + { + Assert.True(VolumeFlow.TryParse("1 hL/h", CultureInfo.GetCultureInfo("en-US"), out var parsed)); + AssertEx.EqualTolerance(1, parsed.HectolitersPerHour, HectolitersPerHourTolerance); + Assert.Equal(VolumeFlowUnit.HectoliterPerHour, parsed.Unit); + } + + { + Assert.True(VolumeFlow.TryParse("1 hLPH", CultureInfo.GetCultureInfo("en-US"), out var parsed)); + AssertEx.EqualTolerance(1, parsed.HectolitersPerHour, HectolitersPerHourTolerance); + Assert.Equal(VolumeFlowUnit.HectoliterPerHour, parsed.Unit); + } + + { + Assert.True(VolumeFlow.TryParse("1 гл/ч", CultureInfo.GetCultureInfo("ru-RU"), out var parsed)); + AssertEx.EqualTolerance(1, parsed.HectolitersPerHour, HectolitersPerHourTolerance); + Assert.Equal(VolumeFlowUnit.HectoliterPerHour, parsed.Unit); + } + + { + Assert.True(VolumeFlow.TryParse("1 hL/min", CultureInfo.GetCultureInfo("en-US"), out var parsed)); + AssertEx.EqualTolerance(1, parsed.HectolitersPerMinute, HectolitersPerMinuteTolerance); + Assert.Equal(VolumeFlowUnit.HectoliterPerMinute, parsed.Unit); + } + + { + Assert.True(VolumeFlow.TryParse("1 hLPM", CultureInfo.GetCultureInfo("en-US"), out var parsed)); + AssertEx.EqualTolerance(1, parsed.HectolitersPerMinute, HectolitersPerMinuteTolerance); + Assert.Equal(VolumeFlowUnit.HectoliterPerMinute, parsed.Unit); + } + + { + Assert.True(VolumeFlow.TryParse("1 гл/мин", CultureInfo.GetCultureInfo("ru-RU"), out var parsed)); + AssertEx.EqualTolerance(1, parsed.HectolitersPerMinute, HectolitersPerMinuteTolerance); + Assert.Equal(VolumeFlowUnit.HectoliterPerMinute, parsed.Unit); + } + + { + Assert.True(VolumeFlow.TryParse("1 hL/s", CultureInfo.GetCultureInfo("en-US"), out var parsed)); + AssertEx.EqualTolerance(1, parsed.HectolitersPerSecond, HectolitersPerSecondTolerance); + Assert.Equal(VolumeFlowUnit.HectoliterPerSecond, parsed.Unit); + } + + { + Assert.True(VolumeFlow.TryParse("1 hLPS", CultureInfo.GetCultureInfo("en-US"), out var parsed)); + AssertEx.EqualTolerance(1, parsed.HectolitersPerSecond, HectolitersPerSecondTolerance); + Assert.Equal(VolumeFlowUnit.HectoliterPerSecond, parsed.Unit); + } + + { + Assert.True(VolumeFlow.TryParse("1 гл/c", CultureInfo.GetCultureInfo("ru-RU"), out var parsed)); + AssertEx.EqualTolerance(1, parsed.HectolitersPerSecond, HectolitersPerSecondTolerance); + Assert.Equal(VolumeFlowUnit.HectoliterPerSecond, parsed.Unit); + } + { Assert.True(VolumeFlow.TryParse("1 kl/day", CultureInfo.GetCultureInfo("en-US"), out var parsed)); AssertEx.EqualTolerance(1, parsed.KilolitersPerDay, KilolitersPerDayTolerance); @@ -2832,6 +3224,78 @@ public void ParseUnit() Assert.Equal(VolumeFlowUnit.CubicYardPerSecond, parsedUnit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + try + { + var parsedUnit = VolumeFlow.ParseUnit("dal/day", CultureInfo.GetCultureInfo("en-US")); + Assert.Equal(VolumeFlowUnit.DecaliterPerDay, parsedUnit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsedUnit = VolumeFlow.ParseUnit("daL/d", CultureInfo.GetCultureInfo("en-US")); + Assert.Equal(VolumeFlowUnit.DecaliterPerDay, parsedUnit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsedUnit = VolumeFlow.ParseUnit("daLPD", CultureInfo.GetCultureInfo("en-US")); + Assert.Equal(VolumeFlowUnit.DecaliterPerDay, parsedUnit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsedUnit = VolumeFlow.ParseUnit("daL/h", CultureInfo.GetCultureInfo("en-US")); + Assert.Equal(VolumeFlowUnit.DecaliterPerHour, parsedUnit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsedUnit = VolumeFlow.ParseUnit("daLPH", CultureInfo.GetCultureInfo("en-US")); + Assert.Equal(VolumeFlowUnit.DecaliterPerHour, parsedUnit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsedUnit = VolumeFlow.ParseUnit("дал/ч", CultureInfo.GetCultureInfo("ru-RU")); + Assert.Equal(VolumeFlowUnit.DecaliterPerHour, parsedUnit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsedUnit = VolumeFlow.ParseUnit("daL/min", CultureInfo.GetCultureInfo("en-US")); + Assert.Equal(VolumeFlowUnit.DecaliterPerMinute, parsedUnit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsedUnit = VolumeFlow.ParseUnit("daLPM", CultureInfo.GetCultureInfo("en-US")); + Assert.Equal(VolumeFlowUnit.DecaliterPerMinute, parsedUnit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsedUnit = VolumeFlow.ParseUnit("дал/мин", CultureInfo.GetCultureInfo("ru-RU")); + Assert.Equal(VolumeFlowUnit.DecaliterPerMinute, parsedUnit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsedUnit = VolumeFlow.ParseUnit("daL/s", CultureInfo.GetCultureInfo("en-US")); + Assert.Equal(VolumeFlowUnit.DecaliterPerSecond, parsedUnit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsedUnit = VolumeFlow.ParseUnit("daLPS", CultureInfo.GetCultureInfo("en-US")); + Assert.Equal(VolumeFlowUnit.DecaliterPerSecond, parsedUnit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsedUnit = VolumeFlow.ParseUnit("дал/c", CultureInfo.GetCultureInfo("ru-RU")); + Assert.Equal(VolumeFlowUnit.DecaliterPerSecond, parsedUnit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + try { var parsedUnit = VolumeFlow.ParseUnit("dl/day", CultureInfo.GetCultureInfo("en-US")); @@ -2904,6 +3368,78 @@ public void ParseUnit() Assert.Equal(VolumeFlowUnit.DeciliterPerSecond, parsedUnit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + try + { + var parsedUnit = VolumeFlow.ParseUnit("hl/day", CultureInfo.GetCultureInfo("en-US")); + Assert.Equal(VolumeFlowUnit.HectoliterPerDay, parsedUnit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsedUnit = VolumeFlow.ParseUnit("hL/d", CultureInfo.GetCultureInfo("en-US")); + Assert.Equal(VolumeFlowUnit.HectoliterPerDay, parsedUnit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsedUnit = VolumeFlow.ParseUnit("hLPD", CultureInfo.GetCultureInfo("en-US")); + Assert.Equal(VolumeFlowUnit.HectoliterPerDay, parsedUnit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsedUnit = VolumeFlow.ParseUnit("hL/h", CultureInfo.GetCultureInfo("en-US")); + Assert.Equal(VolumeFlowUnit.HectoliterPerHour, parsedUnit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsedUnit = VolumeFlow.ParseUnit("hLPH", CultureInfo.GetCultureInfo("en-US")); + Assert.Equal(VolumeFlowUnit.HectoliterPerHour, parsedUnit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsedUnit = VolumeFlow.ParseUnit("гл/ч", CultureInfo.GetCultureInfo("ru-RU")); + Assert.Equal(VolumeFlowUnit.HectoliterPerHour, parsedUnit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsedUnit = VolumeFlow.ParseUnit("hL/min", CultureInfo.GetCultureInfo("en-US")); + Assert.Equal(VolumeFlowUnit.HectoliterPerMinute, parsedUnit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsedUnit = VolumeFlow.ParseUnit("hLPM", CultureInfo.GetCultureInfo("en-US")); + Assert.Equal(VolumeFlowUnit.HectoliterPerMinute, parsedUnit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsedUnit = VolumeFlow.ParseUnit("гл/мин", CultureInfo.GetCultureInfo("ru-RU")); + Assert.Equal(VolumeFlowUnit.HectoliterPerMinute, parsedUnit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsedUnit = VolumeFlow.ParseUnit("hL/s", CultureInfo.GetCultureInfo("en-US")); + Assert.Equal(VolumeFlowUnit.HectoliterPerSecond, parsedUnit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsedUnit = VolumeFlow.ParseUnit("hLPS", CultureInfo.GetCultureInfo("en-US")); + Assert.Equal(VolumeFlowUnit.HectoliterPerSecond, parsedUnit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + + try + { + var parsedUnit = VolumeFlow.ParseUnit("гл/c", CultureInfo.GetCultureInfo("ru-RU")); + Assert.Equal(VolumeFlowUnit.HectoliterPerSecond, parsedUnit); + } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } + try { var parsedUnit = VolumeFlow.ParseUnit("kl/day", CultureInfo.GetCultureInfo("en-US")); @@ -3675,6 +4211,66 @@ public void TryParseUnit() Assert.Equal(VolumeFlowUnit.CubicYardPerSecond, parsedUnit); } + { + Assert.True(VolumeFlow.TryParseUnit("dal/day", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); + Assert.Equal(VolumeFlowUnit.DecaliterPerDay, parsedUnit); + } + + { + Assert.True(VolumeFlow.TryParseUnit("daL/d", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); + Assert.Equal(VolumeFlowUnit.DecaliterPerDay, parsedUnit); + } + + { + Assert.True(VolumeFlow.TryParseUnit("daLPD", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); + Assert.Equal(VolumeFlowUnit.DecaliterPerDay, parsedUnit); + } + + { + Assert.True(VolumeFlow.TryParseUnit("daL/h", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); + Assert.Equal(VolumeFlowUnit.DecaliterPerHour, parsedUnit); + } + + { + Assert.True(VolumeFlow.TryParseUnit("daLPH", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); + Assert.Equal(VolumeFlowUnit.DecaliterPerHour, parsedUnit); + } + + { + Assert.True(VolumeFlow.TryParseUnit("дал/ч", CultureInfo.GetCultureInfo("ru-RU"), out var parsedUnit)); + Assert.Equal(VolumeFlowUnit.DecaliterPerHour, parsedUnit); + } + + { + Assert.True(VolumeFlow.TryParseUnit("daL/min", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); + Assert.Equal(VolumeFlowUnit.DecaliterPerMinute, parsedUnit); + } + + { + Assert.True(VolumeFlow.TryParseUnit("daLPM", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); + Assert.Equal(VolumeFlowUnit.DecaliterPerMinute, parsedUnit); + } + + { + Assert.True(VolumeFlow.TryParseUnit("дал/мин", CultureInfo.GetCultureInfo("ru-RU"), out var parsedUnit)); + Assert.Equal(VolumeFlowUnit.DecaliterPerMinute, parsedUnit); + } + + { + Assert.True(VolumeFlow.TryParseUnit("daL/s", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); + Assert.Equal(VolumeFlowUnit.DecaliterPerSecond, parsedUnit); + } + + { + Assert.True(VolumeFlow.TryParseUnit("daLPS", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); + Assert.Equal(VolumeFlowUnit.DecaliterPerSecond, parsedUnit); + } + + { + Assert.True(VolumeFlow.TryParseUnit("дал/c", CultureInfo.GetCultureInfo("ru-RU"), out var parsedUnit)); + Assert.Equal(VolumeFlowUnit.DecaliterPerSecond, parsedUnit); + } + { Assert.True(VolumeFlow.TryParseUnit("dl/day", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); Assert.Equal(VolumeFlowUnit.DeciliterPerDay, parsedUnit); @@ -3735,6 +4331,66 @@ public void TryParseUnit() Assert.Equal(VolumeFlowUnit.DeciliterPerSecond, parsedUnit); } + { + Assert.True(VolumeFlow.TryParseUnit("hl/day", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); + Assert.Equal(VolumeFlowUnit.HectoliterPerDay, parsedUnit); + } + + { + Assert.True(VolumeFlow.TryParseUnit("hL/d", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); + Assert.Equal(VolumeFlowUnit.HectoliterPerDay, parsedUnit); + } + + { + Assert.True(VolumeFlow.TryParseUnit("hLPD", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); + Assert.Equal(VolumeFlowUnit.HectoliterPerDay, parsedUnit); + } + + { + Assert.True(VolumeFlow.TryParseUnit("hL/h", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); + Assert.Equal(VolumeFlowUnit.HectoliterPerHour, parsedUnit); + } + + { + Assert.True(VolumeFlow.TryParseUnit("hLPH", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); + Assert.Equal(VolumeFlowUnit.HectoliterPerHour, parsedUnit); + } + + { + Assert.True(VolumeFlow.TryParseUnit("гл/ч", CultureInfo.GetCultureInfo("ru-RU"), out var parsedUnit)); + Assert.Equal(VolumeFlowUnit.HectoliterPerHour, parsedUnit); + } + + { + Assert.True(VolumeFlow.TryParseUnit("hL/min", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); + Assert.Equal(VolumeFlowUnit.HectoliterPerMinute, parsedUnit); + } + + { + Assert.True(VolumeFlow.TryParseUnit("hLPM", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); + Assert.Equal(VolumeFlowUnit.HectoliterPerMinute, parsedUnit); + } + + { + Assert.True(VolumeFlow.TryParseUnit("гл/мин", CultureInfo.GetCultureInfo("ru-RU"), out var parsedUnit)); + Assert.Equal(VolumeFlowUnit.HectoliterPerMinute, parsedUnit); + } + + { + Assert.True(VolumeFlow.TryParseUnit("hL/s", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); + Assert.Equal(VolumeFlowUnit.HectoliterPerSecond, parsedUnit); + } + + { + Assert.True(VolumeFlow.TryParseUnit("hLPS", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); + Assert.Equal(VolumeFlowUnit.HectoliterPerSecond, parsedUnit); + } + + { + Assert.True(VolumeFlow.TryParseUnit("гл/c", CultureInfo.GetCultureInfo("ru-RU"), out var parsedUnit)); + Assert.Equal(VolumeFlowUnit.HectoliterPerSecond, parsedUnit); + } + { Assert.True(VolumeFlow.TryParseUnit("kl/day", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); Assert.Equal(VolumeFlowUnit.KiloliterPerDay, parsedUnit); @@ -4165,10 +4821,18 @@ public void ConversionRoundTrip() AssertEx.EqualTolerance(1, VolumeFlow.FromCubicYardsPerHour(cubicmeterpersecond.CubicYardsPerHour).CubicMetersPerSecond, CubicYardsPerHourTolerance); AssertEx.EqualTolerance(1, VolumeFlow.FromCubicYardsPerMinute(cubicmeterpersecond.CubicYardsPerMinute).CubicMetersPerSecond, CubicYardsPerMinuteTolerance); AssertEx.EqualTolerance(1, VolumeFlow.FromCubicYardsPerSecond(cubicmeterpersecond.CubicYardsPerSecond).CubicMetersPerSecond, CubicYardsPerSecondTolerance); + AssertEx.EqualTolerance(1, VolumeFlow.FromDecalitersPerDay(cubicmeterpersecond.DecalitersPerDay).CubicMetersPerSecond, DecalitersPerDayTolerance); + AssertEx.EqualTolerance(1, VolumeFlow.FromDecalitersPerHour(cubicmeterpersecond.DecalitersPerHour).CubicMetersPerSecond, DecalitersPerHourTolerance); + AssertEx.EqualTolerance(1, VolumeFlow.FromDecalitersPerMinute(cubicmeterpersecond.DecalitersPerMinute).CubicMetersPerSecond, DecalitersPerMinuteTolerance); + AssertEx.EqualTolerance(1, VolumeFlow.FromDecalitersPerSecond(cubicmeterpersecond.DecalitersPerSecond).CubicMetersPerSecond, DecalitersPerSecondTolerance); AssertEx.EqualTolerance(1, VolumeFlow.FromDecilitersPerDay(cubicmeterpersecond.DecilitersPerDay).CubicMetersPerSecond, DecilitersPerDayTolerance); AssertEx.EqualTolerance(1, VolumeFlow.FromDecilitersPerHour(cubicmeterpersecond.DecilitersPerHour).CubicMetersPerSecond, DecilitersPerHourTolerance); AssertEx.EqualTolerance(1, VolumeFlow.FromDecilitersPerMinute(cubicmeterpersecond.DecilitersPerMinute).CubicMetersPerSecond, DecilitersPerMinuteTolerance); AssertEx.EqualTolerance(1, VolumeFlow.FromDecilitersPerSecond(cubicmeterpersecond.DecilitersPerSecond).CubicMetersPerSecond, DecilitersPerSecondTolerance); + AssertEx.EqualTolerance(1, VolumeFlow.FromHectolitersPerDay(cubicmeterpersecond.HectolitersPerDay).CubicMetersPerSecond, HectolitersPerDayTolerance); + AssertEx.EqualTolerance(1, VolumeFlow.FromHectolitersPerHour(cubicmeterpersecond.HectolitersPerHour).CubicMetersPerSecond, HectolitersPerHourTolerance); + AssertEx.EqualTolerance(1, VolumeFlow.FromHectolitersPerMinute(cubicmeterpersecond.HectolitersPerMinute).CubicMetersPerSecond, HectolitersPerMinuteTolerance); + AssertEx.EqualTolerance(1, VolumeFlow.FromHectolitersPerSecond(cubicmeterpersecond.HectolitersPerSecond).CubicMetersPerSecond, HectolitersPerSecondTolerance); AssertEx.EqualTolerance(1, VolumeFlow.FromKilolitersPerDay(cubicmeterpersecond.KilolitersPerDay).CubicMetersPerSecond, KilolitersPerDayTolerance); AssertEx.EqualTolerance(1, VolumeFlow.FromKilolitersPerHour(cubicmeterpersecond.KilolitersPerHour).CubicMetersPerSecond, KilolitersPerHourTolerance); AssertEx.EqualTolerance(1, VolumeFlow.FromKilolitersPerMinute(cubicmeterpersecond.KilolitersPerMinute).CubicMetersPerSecond, KilolitersPerMinuteTolerance); @@ -4377,10 +5041,18 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 yd³/h", new VolumeFlow(1, VolumeFlowUnit.CubicYardPerHour).ToString()); Assert.Equal("1 yd³/min", new VolumeFlow(1, VolumeFlowUnit.CubicYardPerMinute).ToString()); Assert.Equal("1 yd³/s", new VolumeFlow(1, VolumeFlowUnit.CubicYardPerSecond).ToString()); + Assert.Equal("1 dal/day", new VolumeFlow(1, VolumeFlowUnit.DecaliterPerDay).ToString()); + Assert.Equal("1 daL/h", new VolumeFlow(1, VolumeFlowUnit.DecaliterPerHour).ToString()); + Assert.Equal("1 daL/min", new VolumeFlow(1, VolumeFlowUnit.DecaliterPerMinute).ToString()); + Assert.Equal("1 daL/s", new VolumeFlow(1, VolumeFlowUnit.DecaliterPerSecond).ToString()); Assert.Equal("1 dl/day", new VolumeFlow(1, VolumeFlowUnit.DeciliterPerDay).ToString()); Assert.Equal("1 dL/h", new VolumeFlow(1, VolumeFlowUnit.DeciliterPerHour).ToString()); Assert.Equal("1 dL/min", new VolumeFlow(1, VolumeFlowUnit.DeciliterPerMinute).ToString()); Assert.Equal("1 dL/s", new VolumeFlow(1, VolumeFlowUnit.DeciliterPerSecond).ToString()); + Assert.Equal("1 hl/day", new VolumeFlow(1, VolumeFlowUnit.HectoliterPerDay).ToString()); + Assert.Equal("1 hL/h", new VolumeFlow(1, VolumeFlowUnit.HectoliterPerHour).ToString()); + Assert.Equal("1 hL/min", new VolumeFlow(1, VolumeFlowUnit.HectoliterPerMinute).ToString()); + Assert.Equal("1 hL/s", new VolumeFlow(1, VolumeFlowUnit.HectoliterPerSecond).ToString()); Assert.Equal("1 kl/day", new VolumeFlow(1, VolumeFlowUnit.KiloliterPerDay).ToString()); Assert.Equal("1 kL/h", new VolumeFlow(1, VolumeFlowUnit.KiloliterPerHour).ToString()); Assert.Equal("1 kL/min", new VolumeFlow(1, VolumeFlowUnit.KiloliterPerMinute).ToString()); @@ -4457,10 +5129,18 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture Assert.Equal("1 yd³/h", new VolumeFlow(1, VolumeFlowUnit.CubicYardPerHour).ToString(swedishCulture)); Assert.Equal("1 yd³/min", new VolumeFlow(1, VolumeFlowUnit.CubicYardPerMinute).ToString(swedishCulture)); Assert.Equal("1 yd³/s", new VolumeFlow(1, VolumeFlowUnit.CubicYardPerSecond).ToString(swedishCulture)); + Assert.Equal("1 dal/day", new VolumeFlow(1, VolumeFlowUnit.DecaliterPerDay).ToString(swedishCulture)); + Assert.Equal("1 daL/h", new VolumeFlow(1, VolumeFlowUnit.DecaliterPerHour).ToString(swedishCulture)); + Assert.Equal("1 daL/min", new VolumeFlow(1, VolumeFlowUnit.DecaliterPerMinute).ToString(swedishCulture)); + Assert.Equal("1 daL/s", new VolumeFlow(1, VolumeFlowUnit.DecaliterPerSecond).ToString(swedishCulture)); Assert.Equal("1 dl/day", new VolumeFlow(1, VolumeFlowUnit.DeciliterPerDay).ToString(swedishCulture)); Assert.Equal("1 dL/h", new VolumeFlow(1, VolumeFlowUnit.DeciliterPerHour).ToString(swedishCulture)); Assert.Equal("1 dL/min", new VolumeFlow(1, VolumeFlowUnit.DeciliterPerMinute).ToString(swedishCulture)); Assert.Equal("1 dL/s", new VolumeFlow(1, VolumeFlowUnit.DeciliterPerSecond).ToString(swedishCulture)); + Assert.Equal("1 hl/day", new VolumeFlow(1, VolumeFlowUnit.HectoliterPerDay).ToString(swedishCulture)); + Assert.Equal("1 hL/h", new VolumeFlow(1, VolumeFlowUnit.HectoliterPerHour).ToString(swedishCulture)); + Assert.Equal("1 hL/min", new VolumeFlow(1, VolumeFlowUnit.HectoliterPerMinute).ToString(swedishCulture)); + Assert.Equal("1 hL/s", new VolumeFlow(1, VolumeFlowUnit.HectoliterPerSecond).ToString(swedishCulture)); Assert.Equal("1 kl/day", new VolumeFlow(1, VolumeFlowUnit.KiloliterPerDay).ToString(swedishCulture)); Assert.Equal("1 kL/h", new VolumeFlow(1, VolumeFlowUnit.KiloliterPerHour).ToString(swedishCulture)); Assert.Equal("1 kL/min", new VolumeFlow(1, VolumeFlowUnit.KiloliterPerMinute).ToString(swedishCulture)); diff --git a/UnitsNet.Tests/QuantityTests.cs b/UnitsNet.Tests/QuantityTests.cs index 3914dcbb05..d0ba4c9774 100644 --- a/UnitsNet.Tests/QuantityTests.cs +++ b/UnitsNet.Tests/QuantityTests.cs @@ -227,7 +227,7 @@ public void AllowSpecialValue() } catch (ArgumentException) { - Assert.True(false, "Special double values (NaN, -Inf, +Inf) must be allowed."); + Assert.Fail("Special double values (NaN, -Inf, +Inf) must be allowed."); } } diff --git a/UnitsNet.Tests/UnitMathTests.cs b/UnitsNet.Tests/UnitMathTests.cs index fbb4f1d16e..1972e6fdc5 100644 --- a/UnitsNet.Tests/UnitMathTests.cs +++ b/UnitsNet.Tests/UnitMathTests.cs @@ -45,14 +45,6 @@ public void AbsoluteValueOfNullReferenceThrowsException() Assert.Throws(() => quantity.Abs()); } - [Fact] - public void AverageOfDifferentUnitsThrowsException() - { - var units = new IQuantity[] {Length.FromMeters(1), Volume.FromLiters(50)}; - - Assert.Throws(() => units.Average(LengthUnit.Centimeter)); - } - [Fact] public void AverageOfEmptySourceThrowsException() { @@ -61,14 +53,6 @@ public void AverageOfEmptySourceThrowsException() Assert.Throws(() => units.Average(LengthUnit.Centimeter)); } - [Fact] - public void AverageOfLengthsWithNullValueThrowsException() - { - var units = new IQuantity[] {Length.FromMeters(1), null!}; - - Assert.Throws(() => units.Average(LengthUnit.Centimeter)); - } - [Fact] public void AverageOfLengthsCalculatesCorrectly() { @@ -119,22 +103,6 @@ public void MaxOfTwoLengthsReturnsTheLargestValue() Assert.Equal(LengthUnit.Meter, max.Unit); } - [Fact] - public void MaxOfDifferentUnitsThrowsException() - { - var units = new IQuantity[] {Length.FromMeters(1), Volume.FromLiters(50)}; - - Assert.Throws(() => units.Max(LengthUnit.Centimeter)); - } - - [Fact] - public void MaxOfLengthsWithNullValueThrowsException() - { - var units = new IQuantity[] {Length.FromMeters(1), null!}; - - Assert.Throws(() => units.Max(LengthUnit.Centimeter)); - } - [Fact] public void MaxOfEmptySourceThrowsException() { @@ -193,22 +161,6 @@ public void MinOfTwoLengthsReturnsTheSmallestValue() Assert.Equal(LengthUnit.Centimeter, min.Unit); } - [Fact] - public void MinOfDifferentUnitsThrowsException() - { - var units = new IQuantity[] {Length.FromMeters(1), Volume.FromLiters(50)}; - - Assert.Throws(() => units.Min(LengthUnit.Centimeter)); - } - - [Fact] - public void MinOfLengthsWithNullValueThrowsException() - { - var units = new IQuantity[] {Length.FromMeters(1), null!}; - - Assert.Throws(() => units.Min(LengthUnit.Centimeter)); - } - [Fact] public void MinOfEmptySourceThrowsException() { @@ -255,22 +207,6 @@ public void MinOfLengthsWithSelectorCalculatesCorrectly() Assert.Equal(LengthUnit.Centimeter, min.Unit); } - [Fact] - public void SumOfDifferentUnitsThrowsException() - { - var units = new IQuantity[] {Length.FromMeters(1), Volume.FromLiters(50)}; - - Assert.Throws(() => units.Sum(LengthUnit.Centimeter)); - } - - [Fact] - public void SumOfLengthsWithNullValueThrowsException() - { - var units = new IQuantity[] {Length.FromMeters(1), null!}; - - Assert.Throws(() => units.Sum(LengthUnit.Centimeter)); - } - [Fact] public void SumOfEmptySourceReturnsZero() { diff --git a/UnitsNet.Tests/UnitsNet.Tests.csproj b/UnitsNet.Tests/UnitsNet.Tests.csproj index 9fbd0a02f3..fe4c5610ba 100644 --- a/UnitsNet.Tests/UnitsNet.Tests.csproj +++ b/UnitsNet.Tests/UnitsNet.Tests.csproj @@ -1,7 +1,7 @@  - net7.0;net48 + net8.0 latest true CS0618 @@ -24,10 +24,10 @@ - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/UnitsNet/GeneratedCode/Quantities/Area.g.cs b/UnitsNet/GeneratedCode/Quantities/Area.g.cs index 482c54c084..6958a7a7a6 100644 --- a/UnitsNet/GeneratedCode/Quantities/Area.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Area.g.cs @@ -44,6 +44,7 @@ namespace UnitsNet IMultiplyOperators, IMultiplyOperators, IDivisionOperators, + IMultiplyOperators, IDivisionOperators, IMultiplyOperators, IMultiplyOperators, @@ -51,8 +52,10 @@ namespace UnitsNet IMultiplyOperators, IMultiplyOperators, IMultiplyOperators, + IDivisionOperators, IMultiplyOperators, IMultiplyOperators, + IDivisionOperators, IMultiplyOperators, #endif IComparable, @@ -685,6 +688,12 @@ public ReciprocalArea Inverse() return KinematicViscosity.FromSquareMetersPerSecond(area.SquareMeters / duration.Seconds); } + /// Get from * . + public static Length operator *(Area area, ReciprocalLength reciprocalLength) + { + return Length.FromMeters(area.SquareMeters * reciprocalLength.InverseMeters); + } + /// Get from / . public static Length operator /(Area area, Length length) { @@ -727,6 +736,12 @@ public ReciprocalArea Inverse() return Ratio.FromDecimalFractions(area.SquareMeters * reciprocalArea.InverseSquareMeters); } + /// Get from / . + public static ReciprocalLength operator /(Area area, Volume volume) + { + return ReciprocalLength.FromInverseMeters(area.SquareMeters / volume.CubicMeters); + } + /// Get from * . public static Torque operator *(Area area, ForcePerLength forcePerLength) { @@ -739,6 +754,12 @@ public ReciprocalArea Inverse() return Volume.FromCubicMeters(area.SquareMeters * length.Meters); } + /// Get from / . + public static Volume operator /(Area area, ReciprocalLength reciprocalLength) + { + return Volume.FromCubicMeters(area.SquareMeters / reciprocalLength.InverseMeters); + } + /// Get from * . public static VolumeFlow operator *(Area area, Speed speed) { diff --git a/UnitsNet/GeneratedCode/Quantities/Length.g.cs b/UnitsNet/GeneratedCode/Quantities/Length.g.cs index e04cbb454a..d8a6bb16e7 100644 --- a/UnitsNet/GeneratedCode/Quantities/Length.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Length.g.cs @@ -41,6 +41,7 @@ namespace UnitsNet IArithmeticQuantity, #if NET7_0_OR_GREATER IMultiplyOperators, + IDivisionOperators, IMultiplyOperators, IDivisionOperators, IMultiplyOperators, @@ -48,12 +49,15 @@ namespace UnitsNet IMultiplyOperators, IMultiplyOperators, IMultiplyOperators, + IDivisionOperators, IMultiplyOperators, + IDivisionOperators, IMultiplyOperators, IDivisionOperators, IMultiplyOperators, IMultiplyOperators, IMultiplyOperators, + IDivisionOperators, #endif IComparable, IComparable, @@ -1115,6 +1119,12 @@ public ReciprocalLength Inverse() return Area.FromSquareMeters(left.Meters * right.Meters); } + /// Get from / . + public static Area operator /(Length length, ReciprocalLength reciprocalLength) + { + return Area.FromSquareMeters(length.Meters / reciprocalLength.InverseMeters); + } + /// Get from * . public static AreaMomentOfInertia operator *(Length length, Volume volume) { @@ -1157,12 +1167,24 @@ public ReciprocalLength Inverse() return Pressure.FromPascals(length.Meters * specificWeight.NewtonsPerCubicMeter); } + /// Get from / . + public static ReciprocalArea operator /(Length length, Volume volume) + { + return ReciprocalArea.FromInverseSquareMeters(length.Meters / volume.CubicMeters); + } + /// Get from * . public static ReciprocalLength operator *(Length length, ReciprocalArea reciprocalArea) { return ReciprocalLength.FromInverseMeters(length.Meters * reciprocalArea.InverseSquareMeters); } + /// Get from / . + public static ReciprocalLength operator /(Length length, Area area) + { + return ReciprocalLength.FromInverseMeters(length.Meters / area.SquareMeters); + } + /// Get from * . public static RotationalStiffness operator *(Length length, RotationalStiffnessPerLength rotationalStiffnessPerLength) { @@ -1193,6 +1215,12 @@ public ReciprocalLength Inverse() return Volume.FromCubicMeters(length.Meters * area.SquareMeters); } + /// Get from / . + public static Volume operator /(Length length, ReciprocalArea reciprocalArea) + { + return Volume.FromCubicMeters(length.Meters / reciprocalArea.InverseSquareMeters); + } + #endregion #region Equality / IComparable diff --git a/UnitsNet/GeneratedCode/Quantities/RadiationEquivalentDose.g.cs b/UnitsNet/GeneratedCode/Quantities/RadiationEquivalentDose.g.cs new file mode 100644 index 0000000000..73199c6ace --- /dev/null +++ b/UnitsNet/GeneratedCode/Quantities/RadiationEquivalentDose.g.cs @@ -0,0 +1,996 @@ +//------------------------------------------------------------------------------ +// +// 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 UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities. +// +// +//------------------------------------------------------------------------------ + +// Licensed under MIT No Attribution, see LICENSE file at the root. +// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. + +using System; +using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.Linq; +using System.Runtime.Serialization; +using UnitsNet.InternalHelpers; +using UnitsNet.Units; + +#nullable enable + +// ReSharper disable once CheckNamespace + +namespace UnitsNet +{ + /// + /// + /// Equivalent dose is a dose quantity representing the stochastic health effects of low levels of ionizing radiation on the human body which represents the probability of radiation-induced cancer and genetic damage. + /// + [DataContract] + public readonly partial struct RadiationEquivalentDose : + IArithmeticQuantity, + IComparable, + IComparable, + IConvertible, + IEquatable, + IFormattable + { + /// + /// The numeric value this quantity was constructed with. + /// + [DataMember(Name = "Value", Order = 1)] + private readonly double _value; + + /// + /// The unit this quantity was constructed with. + /// + [DataMember(Name = "Unit", Order = 2)] + private readonly RadiationEquivalentDoseUnit? _unit; + + static RadiationEquivalentDose() + { + BaseDimensions = new BaseDimensions(2, 0, -2, 0, 0, 0, 0); + BaseUnit = RadiationEquivalentDoseUnit.Sievert; + Units = Enum.GetValues(typeof(RadiationEquivalentDoseUnit)).Cast().ToArray(); + Zero = new RadiationEquivalentDose(0, BaseUnit); + Info = new QuantityInfo("RadiationEquivalentDose", + new UnitInfo[] + { + new UnitInfo(RadiationEquivalentDoseUnit.Microsievert, "Microsieverts", BaseUnits.Undefined, "RadiationEquivalentDose"), + new UnitInfo(RadiationEquivalentDoseUnit.MilliroentgenEquivalentMan, "MilliroentgensEquivalentMan", BaseUnits.Undefined, "RadiationEquivalentDose"), + new UnitInfo(RadiationEquivalentDoseUnit.Millisievert, "Millisieverts", BaseUnits.Undefined, "RadiationEquivalentDose"), + new UnitInfo(RadiationEquivalentDoseUnit.Nanosievert, "Nanosieverts", BaseUnits.Undefined, "RadiationEquivalentDose"), + new UnitInfo(RadiationEquivalentDoseUnit.RoentgenEquivalentMan, "RoentgensEquivalentMan", BaseUnits.Undefined, "RadiationEquivalentDose"), + new UnitInfo(RadiationEquivalentDoseUnit.Sievert, "Sieverts", new BaseUnits(length: LengthUnit.Meter, time: DurationUnit.Second), "RadiationEquivalentDose"), + }, + BaseUnit, Zero, BaseDimensions); + + DefaultConversionFunctions = new UnitConverter(); + RegisterDefaultConversions(DefaultConversionFunctions); + } + + /// + /// Creates the quantity with the given numeric value and unit. + /// + /// The numeric value to construct this quantity with. + /// The unit representation to construct this quantity with. + public RadiationEquivalentDose(double value, RadiationEquivalentDoseUnit unit) + { + _value = value; + _unit = unit; + } + + /// + /// Creates an instance of the quantity with the given numeric value in units compatible with the given . + /// If multiple compatible units were found, the first match is used. + /// + /// The numeric value to construct this quantity with. + /// The unit system to create the quantity with. + /// The given is null. + /// No unit was found for the given . + public RadiationEquivalentDose(double value, UnitSystem unitSystem) + { + if (unitSystem is null) throw new ArgumentNullException(nameof(unitSystem)); + + var unitInfos = Info.GetUnitInfosFor(unitSystem.BaseUnits); + var firstUnitInfo = unitInfos.FirstOrDefault(); + + _value = value; + _unit = firstUnitInfo?.Value ?? throw new ArgumentException("No units were found for the given UnitSystem.", nameof(unitSystem)); + } + + #region Static Properties + + /// + /// The containing the default generated conversion functions for instances. + /// + public static UnitConverter DefaultConversionFunctions { get; } + + /// + public static QuantityInfo Info { get; } + + /// + /// The of this quantity. + /// + public static BaseDimensions BaseDimensions { get; } + + /// + /// The base unit of RadiationEquivalentDose, which is Sievert. All conversions go via this value. + /// + public static RadiationEquivalentDoseUnit BaseUnit { get; } + + /// + /// All units of measurement for the RadiationEquivalentDose quantity. + /// + public static RadiationEquivalentDoseUnit[] Units { get; } + + /// + /// Gets an instance of this quantity with a value of 0 in the base unit Sievert. + /// + public static RadiationEquivalentDose Zero { get; } + + /// + public static RadiationEquivalentDose AdditiveIdentity => Zero; + + #endregion + + #region Properties + + /// + /// The numeric value this quantity was constructed with. + /// + public double Value => _value; + + /// + double IQuantity.Value => _value; + + Enum IQuantity.Unit => Unit; + + /// + public RadiationEquivalentDoseUnit Unit => _unit.GetValueOrDefault(BaseUnit); + + /// + public QuantityInfo QuantityInfo => Info; + + /// + QuantityInfo IQuantity.QuantityInfo => Info; + + /// + /// The of this quantity. + /// + public BaseDimensions Dimensions => RadiationEquivalentDose.BaseDimensions; + + #endregion + + #region Conversion Properties + + /// + /// Gets a value of this quantity converted into + /// + public double Microsieverts => As(RadiationEquivalentDoseUnit.Microsievert); + + /// + /// Gets a value of this quantity converted into + /// + public double MilliroentgensEquivalentMan => As(RadiationEquivalentDoseUnit.MilliroentgenEquivalentMan); + + /// + /// Gets a value of this quantity converted into + /// + public double Millisieverts => As(RadiationEquivalentDoseUnit.Millisievert); + + /// + /// Gets a value of this quantity converted into + /// + public double Nanosieverts => As(RadiationEquivalentDoseUnit.Nanosievert); + + /// + /// Gets a value of this quantity converted into + /// + public double RoentgensEquivalentMan => As(RadiationEquivalentDoseUnit.RoentgenEquivalentMan); + + /// + /// Gets a value of this quantity converted into + /// + public double Sieverts => As(RadiationEquivalentDoseUnit.Sievert); + + #endregion + + #region Static Methods + + /// + /// Registers the default conversion functions in the given instance. + /// + /// The to register the default conversion functions in. + internal static void RegisterDefaultConversions(UnitConverter unitConverter) + { + // Register in unit converter: RadiationEquivalentDoseUnit -> BaseUnit + unitConverter.SetConversionFunction(RadiationEquivalentDoseUnit.Microsievert, RadiationEquivalentDoseUnit.Sievert, quantity => quantity.ToUnit(RadiationEquivalentDoseUnit.Sievert)); + unitConverter.SetConversionFunction(RadiationEquivalentDoseUnit.MilliroentgenEquivalentMan, RadiationEquivalentDoseUnit.Sievert, quantity => quantity.ToUnit(RadiationEquivalentDoseUnit.Sievert)); + unitConverter.SetConversionFunction(RadiationEquivalentDoseUnit.Millisievert, RadiationEquivalentDoseUnit.Sievert, quantity => quantity.ToUnit(RadiationEquivalentDoseUnit.Sievert)); + unitConverter.SetConversionFunction(RadiationEquivalentDoseUnit.Nanosievert, RadiationEquivalentDoseUnit.Sievert, quantity => quantity.ToUnit(RadiationEquivalentDoseUnit.Sievert)); + unitConverter.SetConversionFunction(RadiationEquivalentDoseUnit.RoentgenEquivalentMan, RadiationEquivalentDoseUnit.Sievert, quantity => quantity.ToUnit(RadiationEquivalentDoseUnit.Sievert)); + + // Register in unit converter: BaseUnit <-> BaseUnit + unitConverter.SetConversionFunction(RadiationEquivalentDoseUnit.Sievert, RadiationEquivalentDoseUnit.Sievert, quantity => quantity); + + // Register in unit converter: BaseUnit -> RadiationEquivalentDoseUnit + unitConverter.SetConversionFunction(RadiationEquivalentDoseUnit.Sievert, RadiationEquivalentDoseUnit.Microsievert, quantity => quantity.ToUnit(RadiationEquivalentDoseUnit.Microsievert)); + unitConverter.SetConversionFunction(RadiationEquivalentDoseUnit.Sievert, RadiationEquivalentDoseUnit.MilliroentgenEquivalentMan, quantity => quantity.ToUnit(RadiationEquivalentDoseUnit.MilliroentgenEquivalentMan)); + unitConverter.SetConversionFunction(RadiationEquivalentDoseUnit.Sievert, RadiationEquivalentDoseUnit.Millisievert, quantity => quantity.ToUnit(RadiationEquivalentDoseUnit.Millisievert)); + unitConverter.SetConversionFunction(RadiationEquivalentDoseUnit.Sievert, RadiationEquivalentDoseUnit.Nanosievert, quantity => quantity.ToUnit(RadiationEquivalentDoseUnit.Nanosievert)); + unitConverter.SetConversionFunction(RadiationEquivalentDoseUnit.Sievert, RadiationEquivalentDoseUnit.RoentgenEquivalentMan, quantity => quantity.ToUnit(RadiationEquivalentDoseUnit.RoentgenEquivalentMan)); + } + + /// + /// Get unit abbreviation string. + /// + /// Unit to get abbreviation for. + /// Unit abbreviation string. + public static string GetAbbreviation(RadiationEquivalentDoseUnit unit) + { + return GetAbbreviation(unit, null); + } + + /// + /// Get unit abbreviation string. + /// + /// Unit to get abbreviation for. + /// Unit abbreviation string. + /// Format to use for localization. Defaults to if null. + public static string GetAbbreviation(RadiationEquivalentDoseUnit unit, IFormatProvider? provider) + { + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + } + + #endregion + + #region Static Factory Methods + + /// + /// Creates a from . + /// + public static RadiationEquivalentDose FromMicrosieverts(double value) + { + return new RadiationEquivalentDose(value, RadiationEquivalentDoseUnit.Microsievert); + } + + /// + /// Creates a from . + /// + public static RadiationEquivalentDose FromMilliroentgensEquivalentMan(double value) + { + return new RadiationEquivalentDose(value, RadiationEquivalentDoseUnit.MilliroentgenEquivalentMan); + } + + /// + /// Creates a from . + /// + public static RadiationEquivalentDose FromMillisieverts(double value) + { + return new RadiationEquivalentDose(value, RadiationEquivalentDoseUnit.Millisievert); + } + + /// + /// Creates a from . + /// + public static RadiationEquivalentDose FromNanosieverts(double value) + { + return new RadiationEquivalentDose(value, RadiationEquivalentDoseUnit.Nanosievert); + } + + /// + /// Creates a from . + /// + public static RadiationEquivalentDose FromRoentgensEquivalentMan(double value) + { + return new RadiationEquivalentDose(value, RadiationEquivalentDoseUnit.RoentgenEquivalentMan); + } + + /// + /// Creates a from . + /// + public static RadiationEquivalentDose FromSieverts(double value) + { + return new RadiationEquivalentDose(value, RadiationEquivalentDoseUnit.Sievert); + } + + /// + /// Dynamically convert from value and unit enum to . + /// + /// Value to convert from. + /// Unit to convert from. + /// RadiationEquivalentDose unit value. + public static RadiationEquivalentDose From(double value, RadiationEquivalentDoseUnit fromUnit) + { + return new RadiationEquivalentDose(value, fromUnit); + } + + #endregion + + #region Static Parse Methods + + /// + /// 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", CultureInfo.GetCultureInfo("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 RadiationEquivalentDose 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} + /// + /// Length.Parse("5.5 m", CultureInfo.GetCultureInfo("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. + /// + /// Format to use when parsing number and unit. Defaults to if null. + public static RadiationEquivalentDose Parse(string str, IFormatProvider? provider) + { + return QuantityParser.Default.Parse( + str, + provider, + From); + } + + /// + /// 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", CultureInfo.GetCultureInfo("en-US")); + /// + public static bool TryParse(string? str, out RadiationEquivalentDose 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} + /// Resulting unit quantity if successful. + /// True if successful, otherwise false. + /// + /// Length.Parse("5.5 m", CultureInfo.GetCultureInfo("en-US")); + /// + /// Format to use when parsing number and unit. Defaults to if null. + public static bool TryParse(string? str, IFormatProvider? provider, out RadiationEquivalentDose result) + { + return QuantityParser.Default.TryParse( + str, + provider, + From, + out result); + } + + /// + /// Parse a unit string. + /// + /// String to parse. Typically in the form: {number} {unit} + /// + /// Length.ParseUnit("m", CultureInfo.GetCultureInfo("en-US")); + /// + /// The value of 'str' cannot be null. + /// Error parsing string. + public static RadiationEquivalentDoseUnit ParseUnit(string str) + { + return ParseUnit(str, null); + } + + /// + /// Parse a unit string. + /// + /// String to parse. Typically in the form: {number} {unit} + /// Format to use when parsing number and unit. Defaults to if null. + /// + /// Length.ParseUnit("m", CultureInfo.GetCultureInfo("en-US")); + /// + /// The value of 'str' cannot be null. + /// Error parsing string. + public static RadiationEquivalentDoseUnit ParseUnit(string str, IFormatProvider? provider) + { + return UnitParser.Default.Parse(str, provider); + } + + /// + public static bool TryParseUnit(string str, out RadiationEquivalentDoseUnit unit) + { + return TryParseUnit(str, null, out unit); + } + + /// + /// Parse a unit string. + /// + /// String to parse. Typically in the form: {number} {unit} + /// The parsed unit if successful. + /// True if successful, otherwise false. + /// + /// Length.TryParseUnit("m", CultureInfo.GetCultureInfo("en-US")); + /// + /// Format to use when parsing number and unit. Defaults to if null. + public static bool TryParseUnit(string str, IFormatProvider? provider, out RadiationEquivalentDoseUnit unit) + { + return UnitParser.Default.TryParse(str, provider, out unit); + } + + #endregion + + #region Arithmetic Operators + + /// Negate the value. + public static RadiationEquivalentDose operator -(RadiationEquivalentDose right) + { + return new RadiationEquivalentDose(-right.Value, right.Unit); + } + + /// Get from adding two . + public static RadiationEquivalentDose operator +(RadiationEquivalentDose left, RadiationEquivalentDose right) + { + return new RadiationEquivalentDose(left.Value + right.ToUnit(left.Unit).Value, left.Unit); + } + + /// Get from subtracting two . + public static RadiationEquivalentDose operator -(RadiationEquivalentDose left, RadiationEquivalentDose right) + { + return new RadiationEquivalentDose(left.Value - right.ToUnit(left.Unit).Value, left.Unit); + } + + /// Get from multiplying value and . + public static RadiationEquivalentDose operator *(double left, RadiationEquivalentDose right) + { + return new RadiationEquivalentDose(left * right.Value, right.Unit); + } + + /// Get from multiplying value and . + public static RadiationEquivalentDose operator *(RadiationEquivalentDose left, double right) + { + return new RadiationEquivalentDose(left.Value * right, left.Unit); + } + + /// Get from dividing by value. + public static RadiationEquivalentDose operator /(RadiationEquivalentDose left, double right) + { + return new RadiationEquivalentDose(left.Value / right, left.Unit); + } + + /// Get ratio value from dividing by . + public static double operator /(RadiationEquivalentDose left, RadiationEquivalentDose right) + { + return left.Sieverts / right.Sieverts; + } + + #endregion + + #region Equality / IComparable + + /// Returns true if less or equal to. + public static bool operator <=(RadiationEquivalentDose left, RadiationEquivalentDose right) + { + return left.Value <= right.ToUnit(left.Unit).Value; + } + + /// Returns true if greater than or equal to. + public static bool operator >=(RadiationEquivalentDose left, RadiationEquivalentDose right) + { + return left.Value >= right.ToUnit(left.Unit).Value; + } + + /// Returns true if less than. + public static bool operator <(RadiationEquivalentDose left, RadiationEquivalentDose right) + { + return left.Value < right.ToUnit(left.Unit).Value; + } + + /// Returns true if greater than. + public static bool operator >(RadiationEquivalentDose left, RadiationEquivalentDose right) + { + return left.Value > right.ToUnit(left.Unit).Value; + } + + // We use obsolete attribute to communicate the preferred equality members to use. + // CS0809: Obsolete member 'memberA' overrides non-obsolete member 'memberB'. + #pragma warning disable CS0809 + + /// Indicates strict equality of two quantities, where both and are exactly equal. + [Obsolete("For null checks, use `x is null` syntax to not invoke overloads. For equality checks, use Equals(RadiationEquivalentDose other, RadiationEquivalentDose tolerance) instead, to check equality across units and to specify the max tolerance for rounding errors due to floating-point arithmetic when converting between units.")] + public static bool operator ==(RadiationEquivalentDose left, RadiationEquivalentDose right) + { + return left.Equals(right); + } + + /// Indicates strict inequality of two quantities, where both and are exactly equal. + [Obsolete("For null checks, use `x is null` syntax to not invoke overloads. For equality checks, use Equals(RadiationEquivalentDose other, RadiationEquivalentDose tolerance) instead, to check equality across units and to specify the max tolerance for rounding errors due to floating-point arithmetic when converting between units.")] + public static bool operator !=(RadiationEquivalentDose left, RadiationEquivalentDose right) + { + return !(left == right); + } + + /// + /// Indicates strict equality of two quantities, where both and are exactly equal. + [Obsolete("Use Equals(RadiationEquivalentDose other, RadiationEquivalentDose tolerance) instead, to check equality across units and to specify the max tolerance for rounding errors due to floating-point arithmetic when converting between units.")] + public override bool Equals(object? obj) + { + if (obj is null || !(obj is RadiationEquivalentDose otherQuantity)) + return false; + + return Equals(otherQuantity); + } + + /// + /// Indicates strict equality of two quantities, where both and are exactly equal. + [Obsolete("Use Equals(RadiationEquivalentDose other, RadiationEquivalentDose tolerance) instead, to check equality across units and to specify the max tolerance for rounding errors due to floating-point arithmetic when converting between units.")] + public bool Equals(RadiationEquivalentDose other) + { + return new { Value, Unit }.Equals(new { other.Value, other.Unit }); + } + + #pragma warning restore CS0809 + + /// Compares the current with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other when converted to the same unit. + /// An object to compare with this instance. + /// + /// is not the same type as this instance. + /// + /// A value that indicates the relative order of the quantities being compared. The return value has these meanings: + /// + /// Value Meaning + /// Less than zero This instance precedes in the sort order. + /// Zero This instance occurs in the same position in the sort order as . + /// Greater than zero This instance follows in the sort order. + /// + /// + public int CompareTo(object? obj) + { + if (obj is null) throw new ArgumentNullException(nameof(obj)); + if (!(obj is RadiationEquivalentDose otherQuantity)) throw new ArgumentException("Expected type RadiationEquivalentDose.", nameof(obj)); + + return CompareTo(otherQuantity); + } + + /// Compares the current with another and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other when converted to the same unit. + /// A quantity to compare with this instance. + /// A value that indicates the relative order of the quantities being compared. The return value has these meanings: + /// + /// Value Meaning + /// Less than zero This instance precedes in the sort order. + /// Zero This instance occurs in the same position in the sort order as . + /// Greater than zero This instance follows in the sort order. + /// + /// + public int CompareTo(RadiationEquivalentDose other) + { + return _value.CompareTo(other.ToUnit(this.Unit).Value); + } + + /// + /// + /// Compare equality to another RadiationEquivalentDose within the given absolute or relative tolerance. + /// + /// + /// Relative tolerance is defined as the maximum allowable absolute difference between this quantity's value and + /// as a percentage of this quantity's value. will be converted into + /// this quantity's unit for comparison. A relative tolerance of 0.01 means the absolute difference must be within +/- 1% of + /// this quantity's value to be considered equal. + /// + /// In this example, the two quantities will be equal if the value of b is within +/- 1% of a (0.02m or 2cm). + /// + /// var a = Length.FromMeters(2.0); + /// var b = Length.FromInches(50.0); + /// a.Equals(b, 0.01, ComparisonType.Relative); + /// + /// + /// + /// + /// Absolute tolerance is defined as the maximum allowable absolute difference between this quantity's value and + /// as a fixed number in this quantity's unit. will be converted into + /// this quantity's unit for comparison. + /// + /// In this example, the two quantities will be equal if the value of b is within 0.01 of a (0.01m or 1cm). + /// + /// var a = Length.FromMeters(2.0); + /// var b = Length.FromInches(50.0); + /// a.Equals(b, 0.01, ComparisonType.Absolute); + /// + /// + /// + /// + /// Note that it is advised against specifying zero difference, due to the nature + /// of floating-point operations and using double internally. + /// + /// + /// The other quantity to compare to. + /// The absolute or relative tolerance value. Must be greater than or equal to 0. + /// The comparison type: either relative or absolute. + /// True if the absolute difference between the two values is not greater than the specified relative or absolute tolerance. + [Obsolete("Use Equals(RadiationEquivalentDose other, RadiationEquivalentDose tolerance) instead, to check equality across units and to specify the max tolerance for rounding errors due to floating-point arithmetic when converting between units.")] + public bool Equals(RadiationEquivalentDose other, double tolerance, ComparisonType comparisonType) + { + if (tolerance < 0) + throw new ArgumentOutOfRangeException(nameof(tolerance), "Tolerance must be greater than or equal to 0."); + + return UnitsNet.Comparison.Equals( + referenceValue: this.Value, + otherValue: other.As(this.Unit), + tolerance: tolerance, + comparisonType: ComparisonType.Absolute); + } + + /// + public bool Equals(IQuantity? other, IQuantity tolerance) + { + return other is RadiationEquivalentDose otherTyped + && (tolerance is RadiationEquivalentDose toleranceTyped + ? true + : throw new ArgumentException($"Tolerance quantity ({tolerance.QuantityInfo.Name}) did not match the other quantities of type 'RadiationEquivalentDose'.", nameof(tolerance))) + && Equals(otherTyped, toleranceTyped); + } + + /// + public bool Equals(RadiationEquivalentDose other, RadiationEquivalentDose tolerance) + { + return UnitsNet.Comparison.Equals( + referenceValue: this.Value, + otherValue: other.As(this.Unit), + tolerance: tolerance.As(this.Unit), + comparisonType: ComparisonType.Absolute); + } + + /// + /// Returns the hash code for this instance. + /// + /// A hash code for the current RadiationEquivalentDose. + public override int GetHashCode() + { + return new { Info.Name, Value, Unit }.GetHashCode(); + } + + #endregion + + #region Conversion Methods + + /// + /// Convert to the unit representation . + /// + /// Value converted to the specified unit. + public double As(RadiationEquivalentDoseUnit unit) + { + if (Unit == unit) + return Value; + + return ToUnit(unit).Value; + } + + /// + public double As(UnitSystem unitSystem) + { + if (unitSystem is null) + throw new ArgumentNullException(nameof(unitSystem)); + + var unitInfos = Info.GetUnitInfosFor(unitSystem.BaseUnits); + + var firstUnitInfo = unitInfos.FirstOrDefault(); + if (firstUnitInfo == null) + throw new ArgumentException("No units were found for the given UnitSystem.", nameof(unitSystem)); + + return As(firstUnitInfo.Value); + } + + /// + double IQuantity.As(Enum unit) + { + if (!(unit is RadiationEquivalentDoseUnit typedUnit)) + throw new ArgumentException($"The given unit is of type {unit.GetType()}. Only {typeof(RadiationEquivalentDoseUnit)} is supported.", nameof(unit)); + + return As(typedUnit); + } + + /// + /// Converts this RadiationEquivalentDose to another RadiationEquivalentDose with the unit representation . + /// + /// The unit to convert to. + /// A RadiationEquivalentDose with the specified unit. + public RadiationEquivalentDose ToUnit(RadiationEquivalentDoseUnit unit) + { + return ToUnit(unit, DefaultConversionFunctions); + } + + /// + /// Converts this to another using the given with the unit representation . + /// + /// The unit to convert to. + /// The to use for the conversion. + /// A RadiationEquivalentDose with the specified unit. + public RadiationEquivalentDose ToUnit(RadiationEquivalentDoseUnit unit, UnitConverter unitConverter) + { + if (TryToUnit(unit, out var converted)) + { + // Try to convert using the auto-generated conversion methods. + return converted!.Value; + } + else if (unitConverter.TryGetConversionFunction((typeof(RadiationEquivalentDose), Unit, typeof(RadiationEquivalentDose), unit), out var conversionFunction)) + { + // See if the unit converter has an extensibility conversion registered. + return (RadiationEquivalentDose)conversionFunction(this); + } + else if (Unit != BaseUnit) + { + // Conversion to requested unit NOT found. Try to convert to BaseUnit, and then from BaseUnit to requested unit. + var inBaseUnits = ToUnit(BaseUnit); + return inBaseUnits.ToUnit(unit); + } + else + { + // No possible conversion + throw new NotImplementedException($"Can not convert {Unit} to {unit}."); + } + } + + /// + /// Attempts to convert this to another with the unit representation . + /// + /// The unit to convert to. + /// The converted in , if successful. + /// True if successful, otherwise false. + private bool TryToUnit(RadiationEquivalentDoseUnit unit, [NotNullWhen(true)] out RadiationEquivalentDose? converted) + { + if (Unit == unit) + { + converted = this; + return true; + } + + RadiationEquivalentDose? convertedOrNull = (Unit, unit) switch + { + // RadiationEquivalentDoseUnit -> BaseUnit + (RadiationEquivalentDoseUnit.Microsievert, RadiationEquivalentDoseUnit.Sievert) => new RadiationEquivalentDose((_value) * 1e-6d, RadiationEquivalentDoseUnit.Sievert), + (RadiationEquivalentDoseUnit.MilliroentgenEquivalentMan, RadiationEquivalentDoseUnit.Sievert) => new RadiationEquivalentDose((_value / 100) * 1e-3d, RadiationEquivalentDoseUnit.Sievert), + (RadiationEquivalentDoseUnit.Millisievert, RadiationEquivalentDoseUnit.Sievert) => new RadiationEquivalentDose((_value) * 1e-3d, RadiationEquivalentDoseUnit.Sievert), + (RadiationEquivalentDoseUnit.Nanosievert, RadiationEquivalentDoseUnit.Sievert) => new RadiationEquivalentDose((_value) * 1e-9d, RadiationEquivalentDoseUnit.Sievert), + (RadiationEquivalentDoseUnit.RoentgenEquivalentMan, RadiationEquivalentDoseUnit.Sievert) => new RadiationEquivalentDose(_value / 100, RadiationEquivalentDoseUnit.Sievert), + + // BaseUnit -> RadiationEquivalentDoseUnit + (RadiationEquivalentDoseUnit.Sievert, RadiationEquivalentDoseUnit.Microsievert) => new RadiationEquivalentDose((_value) / 1e-6d, RadiationEquivalentDoseUnit.Microsievert), + (RadiationEquivalentDoseUnit.Sievert, RadiationEquivalentDoseUnit.MilliroentgenEquivalentMan) => new RadiationEquivalentDose((_value * 100) / 1e-3d, RadiationEquivalentDoseUnit.MilliroentgenEquivalentMan), + (RadiationEquivalentDoseUnit.Sievert, RadiationEquivalentDoseUnit.Millisievert) => new RadiationEquivalentDose((_value) / 1e-3d, RadiationEquivalentDoseUnit.Millisievert), + (RadiationEquivalentDoseUnit.Sievert, RadiationEquivalentDoseUnit.Nanosievert) => new RadiationEquivalentDose((_value) / 1e-9d, RadiationEquivalentDoseUnit.Nanosievert), + (RadiationEquivalentDoseUnit.Sievert, RadiationEquivalentDoseUnit.RoentgenEquivalentMan) => new RadiationEquivalentDose(_value * 100, RadiationEquivalentDoseUnit.RoentgenEquivalentMan), + + _ => null + }; + + if (convertedOrNull is null) + { + converted = default; + return false; + } + + converted = convertedOrNull.Value; + return true; + } + + /// + IQuantity IQuantity.ToUnit(Enum unit) + { + if (!(unit is RadiationEquivalentDoseUnit typedUnit)) + throw new ArgumentException($"The given unit is of type {unit.GetType()}. Only {typeof(RadiationEquivalentDoseUnit)} is supported.", nameof(unit)); + + return ToUnit(typedUnit, DefaultConversionFunctions); + } + + /// + public RadiationEquivalentDose ToUnit(UnitSystem unitSystem) + { + if (unitSystem is null) + throw new ArgumentNullException(nameof(unitSystem)); + + var unitInfos = Info.GetUnitInfosFor(unitSystem.BaseUnits); + + var firstUnitInfo = unitInfos.FirstOrDefault(); + if (firstUnitInfo == null) + throw new ArgumentException("No units were found for the given UnitSystem.", nameof(unitSystem)); + + return ToUnit(firstUnitInfo.Value); + } + + /// + IQuantity IQuantity.ToUnit(UnitSystem unitSystem) => ToUnit(unitSystem); + + /// + IQuantity IQuantity.ToUnit(RadiationEquivalentDoseUnit unit) => ToUnit(unit); + + /// + IQuantity IQuantity.ToUnit(UnitSystem unitSystem) => ToUnit(unitSystem); + + #endregion + + #region ToString Methods + + /// + /// Gets the default string representation of value and unit. + /// + /// String representation. + public override string ToString() + { + return ToString("g"); + } + + /// + /// Gets the default string representation of value and unit using the given format provider. + /// + /// String representation. + /// Format to use for localization and number formatting. Defaults to if null. + public string ToString(IFormatProvider? provider) + { + return ToString("g", provider); + } + + /// + /// + /// Gets the string representation of this instance in the specified format string using . + /// + /// The format string. + /// The string representation. + public string ToString(string? format) + { + return ToString(format, CultureInfo.CurrentCulture); + } + + /// + /// + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// + /// The format string. + /// Format to use for localization and number formatting. Defaults to if null. + /// The string representation. + public string ToString(string? format, IFormatProvider? provider) + { + return QuantityFormatter.Format(this, format, provider); + } + + #endregion + + #region IConvertible Methods + + TypeCode IConvertible.GetTypeCode() + { + return TypeCode.Object; + } + + bool IConvertible.ToBoolean(IFormatProvider? provider) + { + throw new InvalidCastException($"Converting {typeof(RadiationEquivalentDose)} to bool is not supported."); + } + + byte IConvertible.ToByte(IFormatProvider? provider) + { + return Convert.ToByte(_value); + } + + char IConvertible.ToChar(IFormatProvider? provider) + { + throw new InvalidCastException($"Converting {typeof(RadiationEquivalentDose)} to char is not supported."); + } + + DateTime IConvertible.ToDateTime(IFormatProvider? provider) + { + throw new InvalidCastException($"Converting {typeof(RadiationEquivalentDose)} to DateTime is not supported."); + } + + decimal IConvertible.ToDecimal(IFormatProvider? provider) + { + return Convert.ToDecimal(_value); + } + + double IConvertible.ToDouble(IFormatProvider? provider) + { + return Convert.ToDouble(_value); + } + + short IConvertible.ToInt16(IFormatProvider? provider) + { + return Convert.ToInt16(_value); + } + + int IConvertible.ToInt32(IFormatProvider? provider) + { + return Convert.ToInt32(_value); + } + + long IConvertible.ToInt64(IFormatProvider? provider) + { + return Convert.ToInt64(_value); + } + + sbyte IConvertible.ToSByte(IFormatProvider? provider) + { + return Convert.ToSByte(_value); + } + + float IConvertible.ToSingle(IFormatProvider? provider) + { + return Convert.ToSingle(_value); + } + + string IConvertible.ToString(IFormatProvider? provider) + { + return ToString("g", provider); + } + + object IConvertible.ToType(Type conversionType, IFormatProvider? provider) + { + if (conversionType == typeof(RadiationEquivalentDose)) + return this; + else if (conversionType == typeof(RadiationEquivalentDoseUnit)) + return Unit; + else if (conversionType == typeof(QuantityInfo)) + return RadiationEquivalentDose.Info; + else if (conversionType == typeof(BaseDimensions)) + return RadiationEquivalentDose.BaseDimensions; + else + throw new InvalidCastException($"Converting {typeof(RadiationEquivalentDose)} to {conversionType} is not supported."); + } + + ushort IConvertible.ToUInt16(IFormatProvider? provider) + { + return Convert.ToUInt16(_value); + } + + uint IConvertible.ToUInt32(IFormatProvider? provider) + { + return Convert.ToUInt32(_value); + } + + ulong IConvertible.ToUInt64(IFormatProvider? provider) + { + return Convert.ToUInt64(_value); + } + + #endregion + } +} diff --git a/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs b/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs index 995157edad..6b549f8d64 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs @@ -43,6 +43,7 @@ namespace UnitsNet public readonly partial struct ReciprocalArea : IArithmeticQuantity, #if NET7_0_OR_GREATER + IMultiplyOperators, IMultiplyOperators, IMultiplyOperators, IMultiplyOperators, @@ -606,6 +607,12 @@ public Area Inverse() return Area.FromSquareMeters(QuantityValue.Inverse(InverseSquareMeters)); } + /// Get from * . + public static Length operator *(ReciprocalArea reciprocalArea, Volume volume) + { + return Length.FromMeters(reciprocalArea.InverseSquareMeters * volume.CubicMeters); + } + /// Get from * . public static Pressure operator *(ReciprocalArea reciprocalArea, Force force) { diff --git a/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs b/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs index 813cb673f1..4830391a67 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs @@ -43,7 +43,9 @@ namespace UnitsNet public readonly partial struct ReciprocalLength : IArithmeticQuantity, #if NET7_0_OR_GREATER + IMultiplyOperators, IMultiplyOperators, + IMultiplyOperators, IDivisionOperators, IMultiplyOperators, IMultiplyOperators, @@ -591,12 +593,24 @@ public Length Inverse() return Length.FromMeters(QuantityValue.Inverse(InverseMeters)); } + /// Get from * . + public static Area operator *(ReciprocalLength reciprocalLength, Volume volume) + { + return Area.FromSquareMeters(reciprocalLength.InverseMeters * volume.CubicMeters); + } + /// Get from * . public static ForcePerLength operator *(ReciprocalLength reciprocalLength, Force force) { return ForcePerLength.FromNewtonsPerMeter(reciprocalLength.InverseMeters * force.Newtons); } + /// Get from * . + public static Length operator *(ReciprocalLength reciprocalLength, Area area) + { + return Length.FromMeters(reciprocalLength.InverseMeters * area.SquareMeters); + } + /// Get from / . public static Length operator /(ReciprocalLength reciprocalLength, ReciprocalArea reciprocalArea) { diff --git a/UnitsNet/GeneratedCode/Quantity.g.cs b/UnitsNet/GeneratedCode/Quantity.g.cs index 3f09a75aa4..9432eb50b6 100644 --- a/UnitsNet/GeneratedCode/Quantity.g.cs +++ b/UnitsNet/GeneratedCode/Quantity.g.cs @@ -122,6 +122,7 @@ public partial class Quantity { "PowerRatio", PowerRatio.Info }, { "Pressure", Pressure.Info }, { "PressureChangeRate", PressureChangeRate.Info }, + { "RadiationEquivalentDose", RadiationEquivalentDose.Info }, { "RadiationExposure", RadiationExposure.Info }, { "Radioactivity", Radioactivity.Info }, { "Ratio", Ratio.Info }, @@ -257,6 +258,7 @@ public static IQuantity FromQuantityInfo(QuantityInfo quantityInfo, QuantityValu "PowerRatio" => PowerRatio.From(value, PowerRatio.BaseUnit), "Pressure" => Pressure.From(value, Pressure.BaseUnit), "PressureChangeRate" => PressureChangeRate.From(value, PressureChangeRate.BaseUnit), + "RadiationEquivalentDose" => RadiationEquivalentDose.From(value, RadiationEquivalentDose.BaseUnit), "RadiationExposure" => RadiationExposure.From(value, RadiationExposure.BaseUnit), "Radioactivity" => Radioactivity.From(value, Radioactivity.BaseUnit), "Ratio" => Ratio.From(value, Ratio.BaseUnit), @@ -395,6 +397,7 @@ public static bool TryFrom(QuantityValue value, Enum? unit, [NotNullWhen(true)] PowerRatioUnit powerRatioUnit => PowerRatio.From(value, powerRatioUnit), PressureUnit pressureUnit => Pressure.From(value, pressureUnit), PressureChangeRateUnit pressureChangeRateUnit => PressureChangeRate.From(value, pressureChangeRateUnit), + RadiationEquivalentDoseUnit radiationEquivalentDoseUnit => RadiationEquivalentDose.From(value, radiationEquivalentDoseUnit), RadiationExposureUnit radiationExposureUnit => RadiationExposure.From(value, radiationExposureUnit), RadioactivityUnit radioactivityUnit => Radioactivity.From(value, radioactivityUnit), RatioUnit ratioUnit => Ratio.From(value, ratioUnit), @@ -543,6 +546,7 @@ public static bool TryParse(IFormatProvider? formatProvider, Type quantityType, Type _ when quantityType == typeof(PowerRatio) => parser.TryParse(quantityString, formatProvider, PowerRatio.From, out quantity), Type _ when quantityType == typeof(Pressure) => parser.TryParse(quantityString, formatProvider, Pressure.From, out quantity), Type _ when quantityType == typeof(PressureChangeRate) => parser.TryParse(quantityString, formatProvider, PressureChangeRate.From, out quantity), + Type _ when quantityType == typeof(RadiationEquivalentDose) => parser.TryParse(quantityString, formatProvider, RadiationEquivalentDose.From, out quantity), Type _ when quantityType == typeof(RadiationExposure) => parser.TryParse(quantityString, formatProvider, RadiationExposure.From, out quantity), Type _ when quantityType == typeof(Radioactivity) => parser.TryParse(quantityString, formatProvider, Radioactivity.From, out quantity), Type _ when quantityType == typeof(Ratio) => parser.TryParse(quantityString, formatProvider, Ratio.From, out quantity), @@ -672,6 +676,7 @@ internal static IEnumerable GetQuantityTypes() yield return typeof(PowerRatio); yield return typeof(Pressure); yield return typeof(PressureChangeRate); + yield return typeof(RadiationEquivalentDose); yield return typeof(RadiationExposure); yield return typeof(Radioactivity); yield return typeof(Ratio); diff --git a/UnitsNet/GeneratedCode/Resources/Irradiation.restext b/UnitsNet/GeneratedCode/Resources/Irradiation.restext index b2a605bb57..03acc1e02a 100644 --- a/UnitsNet/GeneratedCode/Resources/Irradiation.restext +++ b/UnitsNet/GeneratedCode/Resources/Irradiation.restext @@ -1,6 +1,8 @@ +BtusPerSquareFoot=Btu/ft² JoulesPerSquareCentimeter=J/cm² JoulesPerSquareMeter=J/m² JoulesPerSquareMillimeter=J/mm² +KilobtusPerSquareFoot=kBtu/ft² KilojoulesPerSquareMeter=kJ/m² KilowattHoursPerSquareMeter=kWh/m² MillijoulesPerSquareCentimeter=mJ/cm² diff --git a/UnitsNet/GeneratedCode/Resources/RadiationEquivalentDose.restext b/UnitsNet/GeneratedCode/Resources/RadiationEquivalentDose.restext new file mode 100644 index 0000000000..c7e8643b87 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/RadiationEquivalentDose.restext @@ -0,0 +1,6 @@ +Microsieverts=µSv +MilliroentgensEquivalentMan=mrem +Millisieverts=mSv +Nanosieverts=nSv +RoentgensEquivalentMan=rem +Sieverts=Sv diff --git a/UnitsNet/GeneratedCode/Resources/RadiationEquivalentDose.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/RadiationEquivalentDose.ru-RU.restext new file mode 100644 index 0000000000..4b8eaee757 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/RadiationEquivalentDose.ru-RU.restext @@ -0,0 +1,4 @@ +Microsieverts=мкЗв +Millisieverts=мЗв +Nanosieverts=нЗв +Sieverts=Зв diff --git a/UnitsNet/GeneratedCode/Resources/VolumeFlow.restext b/UnitsNet/GeneratedCode/Resources/VolumeFlow.restext index 73c8bc54e0..b071b56273 100644 --- a/UnitsNet/GeneratedCode/Resources/VolumeFlow.restext +++ b/UnitsNet/GeneratedCode/Resources/VolumeFlow.restext @@ -20,10 +20,18 @@ CubicYardsPerDay=cy/day CubicYardsPerHour=yd³/h CubicYardsPerMinute=yd³/min CubicYardsPerSecond=yd³/s +DecalitersPerDay=dal/day,daL/d,daLPD +DecalitersPerHour=daL/h,daLPH +DecalitersPerMinute=daL/min,daLPM +DecalitersPerSecond=daL/s,daLPS DecilitersPerDay=dl/day,dL/d,dLPD DecilitersPerHour=dL/h,dLPH DecilitersPerMinute=dL/min,dLPM DecilitersPerSecond=dL/s,dLPS +HectolitersPerDay=hl/day,hL/d,hLPD +HectolitersPerHour=hL/h,hLPH +HectolitersPerMinute=hL/min,hLPM +HectolitersPerSecond=hL/s,hLPS KilolitersPerDay=kl/day,kL/d,kLPD KilolitersPerHour=kL/h,kLPH KilolitersPerMinute=kL/min,kLPM diff --git a/UnitsNet/GeneratedCode/Resources/VolumeFlow.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/VolumeFlow.ru-RU.restext index 6e5a483b50..289ed120cc 100644 --- a/UnitsNet/GeneratedCode/Resources/VolumeFlow.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/VolumeFlow.ru-RU.restext @@ -7,9 +7,15 @@ CubicMetersPerHour=м³/ч CubicMetersPerMinute=м³/мин CubicMetersPerSecond=м³/с CubicMillimetersPerSecond=мм³/с +DecalitersPerHour=дал/ч +DecalitersPerMinute=дал/мин +DecalitersPerSecond=дал/c DecilitersPerHour=дл/ч DecilitersPerMinute=дл/мин DecilitersPerSecond=дл/c +HectolitersPerHour=гл/ч +HectolitersPerMinute=гл/мин +HectolitersPerSecond=гл/c KilolitersPerHour=кл/ч KilolitersPerMinute=кл/мин KilolitersPerSecond=кл/c diff --git a/UnitsNet/GeneratedCode/Units/IrradiationUnit.g.cs b/UnitsNet/GeneratedCode/Units/IrradiationUnit.g.cs index 449fdf2491..26d131063a 100644 --- a/UnitsNet/GeneratedCode/Units/IrradiationUnit.g.cs +++ b/UnitsNet/GeneratedCode/Units/IrradiationUnit.g.cs @@ -25,9 +25,11 @@ namespace UnitsNet.Units public enum IrradiationUnit { + BtuPerSquareFoot = 15, JoulePerSquareCentimeter = 1, JoulePerSquareMeter = 2, JoulePerSquareMillimeter = 3, + KilobtuPerSquareFoot = 9, KilojoulePerSquareMeter = 4, KilowattHourPerSquareMeter = 5, MillijoulePerSquareCentimeter = 6, diff --git a/UnitsNet/GeneratedCode/Units/RadiationEquivalentDoseUnit.g.cs b/UnitsNet/GeneratedCode/Units/RadiationEquivalentDoseUnit.g.cs new file mode 100644 index 0000000000..2095852833 --- /dev/null +++ b/UnitsNet/GeneratedCode/Units/RadiationEquivalentDoseUnit.g.cs @@ -0,0 +1,42 @@ +//------------------------------------------------------------------------------ +// +// 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 UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities. +// +// +//------------------------------------------------------------------------------ + +// Licensed under MIT No Attribution, see LICENSE file at the root. +// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. + +// ReSharper disable once CheckNamespace +namespace UnitsNet.Units +{ + // Disable missing XML comment warnings for the generated unit enums. + #pragma warning disable 1591 + + public enum RadiationEquivalentDoseUnit + { + Microsievert = 1, + MilliroentgenEquivalentMan = 2, + Millisievert = 7, + Nanosievert = 5, + RoentgenEquivalentMan = 4, + + /// + /// The sievert is a unit in the International System of Units (SI) intended to represent the stochastic health risk of ionizing radiation, which is defined as the probability of causing radiation-induced cancer and genetic damage. + /// + /// https://en.wikipedia.org/wiki/Sievert + Sievert = 9, + } + + #pragma warning restore 1591 +} diff --git a/UnitsNet/GeneratedCode/Units/VolumeFlowUnit.g.cs b/UnitsNet/GeneratedCode/Units/VolumeFlowUnit.g.cs index ab8b2bca49..6c14bc7b98 100644 --- a/UnitsNet/GeneratedCode/Units/VolumeFlowUnit.g.cs +++ b/UnitsNet/GeneratedCode/Units/VolumeFlowUnit.g.cs @@ -47,10 +47,18 @@ public enum VolumeFlowUnit CubicYardPerHour = 20, CubicYardPerMinute = 21, CubicYardPerSecond = 22, + DecaliterPerDay = 71, + DecaliterPerHour = 78, + DecaliterPerMinute = 67, + DecaliterPerSecond = 70, DeciliterPerDay = 23, DeciliterPerHour = 24, DeciliterPerMinute = 25, DeciliterPerSecond = 26, + HectoliterPerDay = 74, + HectoliterPerHour = 72, + HectoliterPerMinute = 75, + HectoliterPerSecond = 69, KiloliterPerDay = 27, KiloliterPerHour = 28, KiloliterPerMinute = 29, diff --git a/UnitsNet/UnitMath.cs b/UnitsNet/UnitMath.cs index 0b63a9a8df..a57083c18d 100644 --- a/UnitsNet/UnitMath.cs +++ b/UnitsNet/UnitMath.cs @@ -35,8 +35,9 @@ public static TQuantity Abs(this TQuantity value) where TQuantity : I /// /// source contains quantity types different from . /// - public static TQuantity Sum(this IEnumerable source, Enum unitType) - where TQuantity : IQuantity + public static TQuantity Sum(this IEnumerable source, TUnitType unitType) + where TUnitType : Enum + where TQuantity : IQuantity { return (TQuantity) Quantity.From(QuantityValue.FromDoubleRounded(source.Sum(x => x.As(unitType).ToDouble())), unitType); // TODO } @@ -49,7 +50,8 @@ public static TQuantity Sum(this IEnumerable source, Enum /// A transform function to apply to each element. /// The desired unit type for the resulting quantity /// The type of the elements of source. - /// The type of quantity that is produced by this operation + /// The type of quantity that is produced by this operation. + /// The type of unit enum. /// The sum of the projected values, represented in the specified unit type. /// /// source or selector is null. @@ -57,8 +59,9 @@ public static TQuantity Sum(this IEnumerable source, Enum /// /// source contains quantity types different from . /// - public static TQuantity Sum(this IEnumerable source, Func selector, Enum unitType) - where TQuantity : IQuantity + public static TQuantity Sum(this IEnumerable source, Func selector, TUnitType unitType) + where TUnitType : Enum + where TQuantity : IQuantity { return source.Select(selector).Sum(unitType); } @@ -84,8 +87,9 @@ public static TQuantity Min(TQuantity val1, TQuantity val2) where TQu /// /// source contains quantity types different from . /// - public static TQuantity Min(this IEnumerable source, Enum unitType) - where TQuantity : IQuantity + public static TQuantity Min(this IEnumerable source, TUnitType unitType) + where TUnitType : Enum + where TQuantity : IQuantity { return (TQuantity) Quantity.From(source.Min(x => x.As(unitType)), unitType); } @@ -98,7 +102,8 @@ public static TQuantity Min(this IEnumerable source, Enum /// A transform function to apply to each element. /// The desired unit type for the resulting quantity /// The type of the elements of source. - /// The type of quantity that is produced by this operation + /// The type of quantity that is produced by this operation. + /// The type of unit enum. /// The min of the projected values, represented in the specified unit type. /// /// source or selector is null. @@ -107,8 +112,9 @@ public static TQuantity Min(this IEnumerable source, Enum /// /// source contains quantity types different from . /// - public static TQuantity Min(this IEnumerable source, Func selector, Enum unitType) - where TQuantity : IQuantity + public static TQuantity Min(this IEnumerable source, Func selector, TUnitType unitType) + where TUnitType : Enum + where TQuantity : IQuantity { return source.Select(selector).Min(unitType); } @@ -134,8 +140,9 @@ public static TQuantity Max(TQuantity val1, TQuantity val2) where TQu /// /// source contains quantity types different from . /// - public static TQuantity Max(this IEnumerable source, Enum unitType) - where TQuantity : IQuantity + public static TQuantity Max(this IEnumerable source, TUnitType unitType) + where TUnitType : Enum + where TQuantity : IQuantity { return (TQuantity) Quantity.From(source.Max(x => x.As(unitType)), unitType); } @@ -148,7 +155,8 @@ public static TQuantity Max(this IEnumerable source, Enum /// A transform function to apply to each element. /// The desired unit type for the resulting quantity /// The type of the elements of source. - /// The type of quantity that is produced by this operation + /// The type of quantity that is produced by this operation. + /// The type of unit enum. /// The max of the projected values, represented in the specified unit type. /// /// source or selector is null. @@ -157,8 +165,9 @@ public static TQuantity Max(this IEnumerable source, Enum /// /// source contains quantity types different from . /// - public static TQuantity Max(this IEnumerable source, Func selector, Enum unitType) - where TQuantity : IQuantity + public static TQuantity Max(this IEnumerable source, Func selector, TUnitType unitType) + where TUnitType : Enum + where TQuantity : IQuantity { return source.Select(selector).Max(unitType); } @@ -174,8 +183,9 @@ public static TQuantity Max(this IEnumerable source /// /// source contains quantity types different from . /// - public static TQuantity Average(this IEnumerable source, Enum unitType) - where TQuantity : IQuantity + public static TQuantity Average(this IEnumerable source, TUnitType unitType) + where TUnitType : Enum + where TQuantity : IQuantity { return (TQuantity) Quantity.From(QuantityValue.FromDoubleRounded(source.Average(x => x.As(unitType).ToDouble())), unitType); // TODO } @@ -188,7 +198,8 @@ public static TQuantity Average(this IEnumerable source, E /// A transform function to apply to each element. /// The desired unit type for the resulting quantity /// The type of the elements of source. - /// The type of quantity that is produced by this operation + /// The type of quantity that is produced by this operation. + /// The type of unit enum. /// The average of the projected values, represented in the specified unit type. /// /// source or selector is null. @@ -197,8 +208,9 @@ public static TQuantity Average(this IEnumerable source, E /// /// source contains quantity types different from . /// - public static TQuantity Average(this IEnumerable source, Func selector, Enum unitType) - where TQuantity : IQuantity + public static TQuantity Average(this IEnumerable source, Func selector, TUnitType unitType) + where TUnitType : Enum + where TQuantity : IQuantity { return source.Select(selector).Average(unitType); } diff --git a/UnitsNet/UnitsNet.csproj b/UnitsNet/UnitsNet.csproj index de385cd110..7e67dcc177 100644 --- a/UnitsNet/UnitsNet.csproj +++ b/UnitsNet/UnitsNet.csproj @@ -2,7 +2,7 @@ UnitsNet - 6.0.0-pre002 + 6.0.0-pre006 Andreas Gullberg Larsen Units.NET Get all the common units of measurement and the conversions between them. It is light-weight and thoroughly tested. @@ -12,7 +12,7 @@ logo-32.png https://raw.githubusercontent.com/angularsen/UnitsNet/ce85185429be345d77eb2ce09c99d59cc9ab8aed/Docs/Images/logo-32.png https://github.com/angularsen/UnitsNet - MIT + MIT-0 false unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable README.md @@ -24,7 +24,7 @@ latest enable UnitsNet - netstandard2.0;net7.0 + netstandard2.0;net8.0 @@ -48,18 +48,10 @@ en-US - - - - - - - - - +