From 39ee5d564c57cb5030b06f27e6a9d44a902c4ff7 Mon Sep 17 00:00:00 2001 From: Andreas Gullberg Larsen Date: Mon, 28 Jan 2019 00:27:24 +0100 Subject: [PATCH 01/36] R#: Don't set namespace for CustomCode folder --- UnitsNet/UnitsNet.csproj.DotSettings | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 UnitsNet/UnitsNet.csproj.DotSettings diff --git a/UnitsNet/UnitsNet.csproj.DotSettings b/UnitsNet/UnitsNet.csproj.DotSettings new file mode 100644 index 0000000000..0b0edaecd0 --- /dev/null +++ b/UnitsNet/UnitsNet.csproj.DotSettings @@ -0,0 +1,2 @@ + + True \ No newline at end of file From 857bd7e9bb1455e48c57a7eb7f383b75abdea5be Mon Sep 17 00:00:00 2001 From: Andreas Gullberg Larsen Date: Sun, 16 Dec 2018 14:02:34 +0100 Subject: [PATCH 02/36] Add UnitsHelper with tests --- UnitsNet.Tests/UnitsHelperTest.cs | 90 +++++++++++++++++++++++++ UnitsNet/UnitsHelper.cs | 106 ++++++++++++++++++++++++++++++ 2 files changed, 196 insertions(+) create mode 100644 UnitsNet.Tests/UnitsHelperTest.cs create mode 100644 UnitsNet/UnitsHelper.cs diff --git a/UnitsNet.Tests/UnitsHelperTest.cs b/UnitsNet.Tests/UnitsHelperTest.cs new file mode 100644 index 0000000000..6324300ecd --- /dev/null +++ b/UnitsNet.Tests/UnitsHelperTest.cs @@ -0,0 +1,90 @@ +// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). +// https://github.com/angularsen/UnitsNet +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +using System; +using System.Linq; +using UnitsNet.Units; +using Xunit; + +namespace UnitsNet.Tests +{ + public class UnitsHelperTest + { + [Fact] + public void Quantities_ReturnsKnownQuantityTypes() + { + var knownQuantities = new[] {QuantityType.Length, QuantityType.Force, QuantityType.Mass}; + + Assert.Superset( + knownQuantities.ToHashSet(), + UnitsHelper.Quantities.ToHashSet()); + } + + [Fact] + public void QuantityNames_ReturnsKnownNames() + { + var knownNames = new[] {"Length", "Force", "Mass"}; + + Assert.Superset( + knownNames.ToHashSet(), + UnitsHelper.QuantityNames.ToHashSet()); + } + + [Fact] + public void GetUnitNamesForQuantity_ReturnsKnownUnitNames() + { + var knownLengthUnitNames = new[] {"Meter", "Centimeter", "Kilometer"}; + var knownMassUnitNames = new[] {"Kilogram", "Gram", "Tonne"}; + + Assert.Superset( + knownLengthUnitNames.ToHashSet(), + UnitsHelper.GetUnitNamesForQuantity(QuantityType.Length).ToHashSet()); + + Assert.Superset( + knownMassUnitNames.ToHashSet(), + UnitsHelper.GetUnitNamesForQuantity(QuantityType.Mass).ToHashSet()); + } + + [Fact] + public void GetUnitEnumValuesForQuantity_ReturnsKnownValues() + { + var knownLengthUnits = new object[] {LengthUnit.Meter, LengthUnit.Centimeter, LengthUnit.Kilometer}; + var knownMassUnits = new object[] {MassUnit.Kilogram, MassUnit.Gram, MassUnit.Tonne}; + + Assert.Superset( + knownLengthUnits.ToHashSet(), + UnitsHelper.GetUnitEnumValuesForQuantity(QuantityType.Length).ToHashSet()); + + Assert.Superset( + knownMassUnits.ToHashSet(), + UnitsHelper.GetUnitEnumValuesForQuantity(QuantityType.Mass).ToHashSet()); + } + + [Theory] + [InlineData(QuantityType.Length, typeof(LengthUnit))] + [InlineData(QuantityType.Mass, typeof(MassUnit))] + [InlineData(QuantityType.Force, typeof(ForceUnit))] + public void GetUnitType_ReturnsUnitTypeMatchingGivenQuantity(QuantityType quantityType, Type expectedUnitEnumType) + { + Assert.Equal(expectedUnitEnumType, UnitsHelper.GetUnitType(quantityType)); + } + } +} diff --git a/UnitsNet/UnitsHelper.cs b/UnitsNet/UnitsHelper.cs new file mode 100644 index 0000000000..a0f1b46086 --- /dev/null +++ b/UnitsNet/UnitsHelper.cs @@ -0,0 +1,106 @@ +// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). +// https://github.com/angularsen/UnitsNet +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using UnitsNet.Units; + +namespace UnitsNet +{ + /// + /// This class helps enumerating quantities and units at runtime. + /// + /// + public static class UnitsHelper + { + private static readonly string UnitEnumNamespace = typeof(LengthUnit).Namespace; + + private static readonly Type[] UnitEnumTypes = Assembly.GetAssembly(typeof(Length)) + .GetExportedTypes() + .Where(t => t.IsEnum && t.Namespace == UnitEnumNamespace) + .ToArray(); + + static UnitsHelper() + { + var quantityTypes = Enum.GetValues(typeof(QuantityType)).Cast().ToArray(); + Quantities = quantityTypes; + QuantityNames = Enum.GetNames(typeof(QuantityType)); + } + + /// + /// All enum values of , such as and . + /// + public static QuantityType[] Quantities { get; } + + /// + /// All enum value names of , such as "Length" and "Mass". + /// + public static string[] QuantityNames { get; } + + /// + /// Returns the enum values for the given , excluding the Undefined=0 value. + /// You can then use this for dynamic parsing in . + /// If you only need the unit names, use instead. + /// + /// + /// Given it will return all enum values of , + /// such as and . + /// + /// The quantity type. + /// Unit enum values. + public static IEnumerable GetUnitEnumValuesForQuantity(QuantityType quantity) + { + // QuantityType.Length => "UnitsNet.Units.LengthUnit" + Type unitEnumType = GetUnitType(quantity); + + // Skip Undefined, which is only really used to help catch uninitialized values + return Enum.GetValues(unitEnumType).Cast().Skip(1).ToArray(); + } + + /// + /// Returns the enum value names for the given . + /// For example, given it will return the names + /// of all enum values of , such as "Centimeter" and "Meter". + /// + /// The quantity type. + /// Unit enum values. + public static IEnumerable GetUnitNamesForQuantity(QuantityType quantity) + { + return GetUnitEnumValuesForQuantity(quantity).Select(unitEnumValue => unitEnumValue.ToString()); + } + + /// + /// Returns the enum type for the given . + /// + /// + /// Given it will return . + /// + /// + /// + public static Type GetUnitType(QuantityType quantity) + { + return UnitEnumTypes + .First(t => t.FullName == $"{UnitEnumNamespace}.{quantity}Unit"); + } + } +} From 64989042aaa8dadfe6389ec7e4c31692ae567242 Mon Sep 17 00:00:00 2001 From: Andreas Gullberg Larsen Date: Sun, 16 Dec 2018 14:17:28 +0100 Subject: [PATCH 03/36] README: Add pseudo code for converter app --- README.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7e0d49eaad..cd3f850fd0 100644 --- a/README.md +++ b/README.md @@ -156,7 +156,28 @@ For more examples on dynamic parsing and conversion, see the unit conversion app ![image](https://user-images.githubusercontent.com/787816/34920961-9b697004-f97b-11e7-9e9a-51ff7142969b.png) -This example shows how you can create a dynamic unit converter, where the user selects the quantity to convert, such as `Length` or `Mass`, then selects to convert from `Meter` to `Centimeter` and types in a value for how many meters. +This example shows how you can create a dynamic unit converter, where the user selects the quantity to convert, such as `Temperature`, then selects to convert from `DegreeCelsius` to `DegreeFahrenheit` and types in a numeric value for how many degrees Celsius to convert. + +Pseudo-code for converter app: +```c# +// Populate quantity selector ("Length", "Mass", "Force" etc) +string[] quantityNames = UnitsHelper.QuantityNames; + +string selectedQuantityName = "Temperature"; // Selected by user +QuantityType selectedQuantity = Enum.Parse(selectedQuantityName); // QuantityType.Temperature + +// Populate from/to unit selectors when quantity selection changes +string[] unitNames = UnitsHelper.GetUnitNamesForQuantity(selectedQuantity).ToArray(); +myGui.UpdateFromToListsOfUnits(unitNames); + +// Assign these from GUI selection +double fromValue = 25; +string fromUnitName = "DegreeCelsius"; +string toUnitName = "DegreeFahrenheit"; + +// Convert using from value and selected quantity/unit names +double convertedValue = UnitConverter.ConvertByName(fromValue, selectedQuantityName, fromUnitName, toUnitName); +``` NOTE: There are still some limitations in the library that requires reflection to enumerate units for quantity and getting the abbreviation for a unit, when we want to dynamically enumerate and convert between units. From 5cf8424c25b821ef68352e602649375636942091 Mon Sep 17 00:00:00 2001 From: Andreas Gullberg Larsen Date: Sun, 27 Jan 2019 18:20:02 +0100 Subject: [PATCH 04/36] Add QuantityInfo to IQuantity --- UnitsNet/IQuantity.cs | 35 +++++++------- UnitsNet/QuantityInfo.cs | 101 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 118 insertions(+), 18 deletions(-) create mode 100644 UnitsNet/QuantityInfo.cs diff --git a/UnitsNet/IQuantity.cs b/UnitsNet/IQuantity.cs index 2b499f4507..ad02c110d7 100644 --- a/UnitsNet/IQuantity.cs +++ b/UnitsNet/IQuantity.cs @@ -1,16 +1,16 @@ // Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). // https://github.com/angularsen/UnitsNet -// +// // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: -// +// // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. -// +// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -32,18 +32,17 @@ public partial interface IQuantity /// /// The of this quantity. /// - QuantityType Type - { - get; - } + QuantityType Type { get; } /// /// The of this quantity. /// - BaseDimensions Dimensions - { - get; - } + BaseDimensions Dimensions { get; } + + /// + /// Information about the quantity type, such as unit values and names. + /// + QuantityInfo QuantityInfo { get; } } #if !WINDOWS_UWP @@ -108,21 +107,21 @@ public partial interface IQuantity #if !WINDOWS_UWP - public interface IQuantity : IQuantity where UnitType : Enum + public interface IQuantity : IQuantity where TUnitType : Enum { /// - /// Convert to the unit representation . + /// Convert to the unit representation . /// /// Value converted to the specified unit. - double As(UnitType unit); + double As(TUnitType unit); /// /// The unit this quantity was constructed with or the BaseUnit if the default constructor was used. /// - UnitType Unit - { - get; - } + TUnitType Unit { get; } + + /// + new QuantityInfo QuantityInfo { get; } } #endif diff --git a/UnitsNet/QuantityInfo.cs b/UnitsNet/QuantityInfo.cs new file mode 100644 index 0000000000..a7bef17132 --- /dev/null +++ b/UnitsNet/QuantityInfo.cs @@ -0,0 +1,101 @@ +// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). +// https://github.com/angularsen/UnitsNet +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +using System; +using System.Linq; +using JetBrains.Annotations; +using UnitsNet.Units; + +namespace UnitsNet +{ + /// + /// Information about the quantity, such as names, unit values and zero quantity. + /// This is useful to enumerate units and present names with quantities and units + /// chose dynamically at runtime, such as unit conversion apps or allowing the user to change the + /// unit representation. + /// + /// + /// Typically you obtain this by looking it up via . + /// + public class QuantityInfo + { + public QuantityInfo(QuantityType quantityType, [NotNull] Enum[] units, [NotNull] IQuantity zero) + { + if (units == null) throw new ArgumentNullException(nameof(units)); + Name = quantityType.ToString(); + QuantityType = quantityType; + UnitNames = units.Select(u => u.ToString()).ToArray(); + Units = units; + Zero = zero ?? throw new ArgumentNullException(nameof(zero)); + } + + + /// + /// Quantity name, such as "Length" or "Mass". + /// + public string Name { get; } + + /// + /// Quantity type, such as or . + /// + public QuantityType QuantityType { get; } + + /// + /// All unit names for the quantity, such as ["Centimeter", "Decimeter", "Meter", ...]. + /// + public string[] UnitNames { get; } + + /// + /// All unit enum values for the quantity, such as [, + /// , , ...]. + /// + public Enum[] Units { get; } + + /// + /// Zero value of quantity, such as . + /// + public IQuantity Zero { get; } + } + + /// + /// + /// This is a specialization of , for when the unit type is known. + /// Typically you obtain this by looking it up statically from or + /// , or dynamically via . + /// + /// The unit enum type, such as . + public class QuantityInfo : QuantityInfo + where TUnit : Enum + { + public QuantityInfo(QuantityType quantityType, TUnit[] units, IQuantity zero) + : base(quantityType, units.Cast().ToArray(), zero) + { + Zero = zero; + Units = units; + } + + /// + public new TUnit[] Units { get; } + + /// + public new IQuantity Zero { get; } + } +} From 4ca4ee5602f3457ebb6b254b40997f3f4e4dff81 Mon Sep 17 00:00:00 2001 From: Andreas Gullberg Larsen Date: Sun, 27 Jan 2019 18:25:48 +0100 Subject: [PATCH 05/36] Add static and instance props for QuantityInfo --- .../Acceleration.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../AmountOfSubstance.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../AmplitudeRatio.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../Quantities/Angle.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../ApparentEnergy.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../ApparentPower.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../Quantities/Area.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../AreaDensity.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../AreaMomentOfInertia.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../Quantities/BitRate.WindowsRuntimeComponent.g.cs | 8 ++++++++ ...cificFuelConsumption.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../Capacitance.WindowsRuntimeComponent.g.cs | 8 ++++++++ ...ntOfThermalExpansion.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../Quantities/Density.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../Quantities/Duration.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../DynamicViscosity.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../ElectricAdmittance.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../ElectricCharge.WindowsRuntimeComponent.g.cs | 8 ++++++++ ...lectricChargeDensity.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../ElectricConductance.WindowsRuntimeComponent.g.cs | 8 ++++++++ ...ElectricConductivity.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../ElectricCurrent.WindowsRuntimeComponent.g.cs | 8 ++++++++ ...ectricCurrentDensity.WindowsRuntimeComponent.g.cs | 8 ++++++++ ...ctricCurrentGradient.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../ElectricField.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../ElectricInductance.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../ElectricPotential.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../ElectricPotentialAc.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../ElectricPotentialDc.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../ElectricResistance.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../ElectricResistivity.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../Quantities/Energy.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../Quantities/Entropy.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../Quantities/Force.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../ForceChangeRate.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../ForcePerLength.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../Frequency.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../Quantities/HeatFlux.WindowsRuntimeComponent.g.cs | 8 ++++++++ ...tTransferCoefficient.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../Illuminance.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../Information.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../Irradiance.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../Irradiation.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../KinematicViscosity.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../LapseRate.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../Quantities/Length.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../Quantities/Level.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../LinearDensity.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../LuminousFlux.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../LuminousIntensity.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../MagneticField.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../MagneticFlux.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../Magnetization.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../Quantities/Mass.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../Quantities/MassFlow.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../Quantities/MassFlux.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../MassMomentOfInertia.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../MolarEnergy.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../MolarEntropy.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../MolarMass.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../Quantities/Molarity.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../Permeability.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../Permittivity.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../Quantities/Power.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../PowerDensity.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../PowerRatio.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../Quantities/Pressure.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../PressureChangeRate.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../Quantities/Ratio.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../ReactiveEnergy.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../ReactivePower.WindowsRuntimeComponent.g.cs | 8 ++++++++ ...tationalAcceleration.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../RotationalSpeed.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../RotationalStiffness.WindowsRuntimeComponent.g.cs | 8 ++++++++ ...alStiffnessPerLength.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../SolidAngle.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../SpecificEnergy.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../SpecificEntropy.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../SpecificVolume.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../SpecificWeight.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../Quantities/Speed.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../Temperature.WindowsRuntimeComponent.g.cs | 8 ++++++++ ...emperatureChangeRate.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../TemperatureDelta.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../ThermalConductivity.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../ThermalResistance.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../Quantities/Torque.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../Quantities/VitaminA.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../Quantities/Volume.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../VolumeFlow.WindowsRuntimeComponent.g.cs | 8 ++++++++ .../Quantities/Acceleration.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/AmountOfSubstance.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/AmplitudeRatio.NetFramework.g.cs | 12 ++++++++++-- .../GeneratedCode/Quantities/Angle.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/ApparentEnergy.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/ApparentPower.NetFramework.g.cs | 12 ++++++++++-- .../GeneratedCode/Quantities/Area.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/AreaDensity.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/AreaMomentOfInertia.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/BitRate.NetFramework.g.cs | 12 ++++++++++-- .../BrakeSpecificFuelConsumption.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/Capacitance.NetFramework.g.cs | 12 ++++++++++-- .../CoefficientOfThermalExpansion.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/Density.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/Duration.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/DynamicViscosity.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/ElectricAdmittance.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/ElectricCharge.NetFramework.g.cs | 12 ++++++++++-- .../ElectricChargeDensity.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/ElectricConductance.NetFramework.g.cs | 12 ++++++++++-- .../ElectricConductivity.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/ElectricCurrent.NetFramework.g.cs | 12 ++++++++++-- .../ElectricCurrentDensity.NetFramework.g.cs | 12 ++++++++++-- .../ElectricCurrentGradient.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/ElectricField.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/ElectricInductance.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/ElectricPotential.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/ElectricPotentialAc.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/ElectricPotentialDc.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/ElectricResistance.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/ElectricResistivity.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/Energy.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/Entropy.NetFramework.g.cs | 12 ++++++++++-- .../GeneratedCode/Quantities/Force.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/ForceChangeRate.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/ForcePerLength.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/Frequency.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/HeatFlux.NetFramework.g.cs | 12 ++++++++++-- .../HeatTransferCoefficient.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/Illuminance.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/Information.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/Irradiance.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/Irradiation.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/KinematicViscosity.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/LapseRate.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/Length.NetFramework.g.cs | 12 ++++++++++-- .../GeneratedCode/Quantities/Level.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/LinearDensity.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/LuminousFlux.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/LuminousIntensity.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/MagneticField.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/MagneticFlux.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/Magnetization.NetFramework.g.cs | 12 ++++++++++-- .../GeneratedCode/Quantities/Mass.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/MassFlow.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/MassFlux.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/MassMomentOfInertia.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/MolarEnergy.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/MolarEntropy.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/MolarMass.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/Molarity.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/Permeability.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/Permittivity.NetFramework.g.cs | 12 ++++++++++-- .../GeneratedCode/Quantities/Power.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/PowerDensity.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/PowerRatio.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/Pressure.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/PressureChangeRate.NetFramework.g.cs | 12 ++++++++++-- .../GeneratedCode/Quantities/Ratio.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/ReactiveEnergy.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/ReactivePower.NetFramework.g.cs | 12 ++++++++++-- .../RotationalAcceleration.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/RotationalSpeed.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/RotationalStiffness.NetFramework.g.cs | 12 ++++++++++-- .../RotationalStiffnessPerLength.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/SolidAngle.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/SpecificEnergy.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/SpecificEntropy.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/SpecificVolume.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/SpecificWeight.NetFramework.g.cs | 12 ++++++++++-- .../GeneratedCode/Quantities/Speed.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/Temperature.NetFramework.g.cs | 12 ++++++++++-- .../TemperatureChangeRate.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/TemperatureDelta.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/ThermalConductivity.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/ThermalResistance.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/Torque.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/VitaminA.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/Volume.NetFramework.g.cs | 12 ++++++++++-- .../Quantities/VolumeFlow.NetFramework.g.cs | 12 ++++++++++-- ...nclude-GenerateQuantitySourceCodeNetFramework.ps1 | 12 ++++++++++-- 181 files changed, 1630 insertions(+), 182 deletions(-) diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Acceleration.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Acceleration.WindowsRuntimeComponent.g.cs index 683d1e5f9f..16770913d1 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Acceleration.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Acceleration.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class Acceleration : IQuantity static Acceleration() { BaseDimensions = new BaseDimensions(1, 0, -2, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.Acceleration, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit MeterPerSecondSquared. @@ -98,6 +99,9 @@ private Acceleration(double numericValue, AccelerationUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private Acceleration(double numericValue, AccelerationUnit unit) /// public AccelerationUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmountOfSubstance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmountOfSubstance.WindowsRuntimeComponent.g.cs index 289ef02cee..1c5c19c422 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmountOfSubstance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmountOfSubstance.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class AmountOfSubstance : IQuantity static AmountOfSubstance() { BaseDimensions = new BaseDimensions(0, 0, 0, 0, 0, 1, 0); + Info = new QuantityInfo(QuantityType.AmountOfSubstance, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit Mole. @@ -98,6 +99,9 @@ private AmountOfSubstance(double numericValue, AmountOfSubstanceUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private AmountOfSubstance(double numericValue, AmountOfSubstanceUnit unit) /// public AmountOfSubstanceUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmplitudeRatio.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmplitudeRatio.WindowsRuntimeComponent.g.cs index fd7bcd0813..f10ded8869 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmplitudeRatio.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmplitudeRatio.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class AmplitudeRatio : IQuantity static AmplitudeRatio() { BaseDimensions = BaseDimensions.Dimensionless; + Info = new QuantityInfo(QuantityType.AmplitudeRatio, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit DecibelVolt. @@ -98,6 +99,9 @@ private AmplitudeRatio(double numericValue, AmplitudeRatioUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private AmplitudeRatio(double numericValue, AmplitudeRatioUnit unit) /// public AmplitudeRatioUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Angle.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Angle.WindowsRuntimeComponent.g.cs index 00d0b13620..01c12db532 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Angle.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Angle.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class Angle : IQuantity static Angle() { BaseDimensions = BaseDimensions.Dimensionless; + Info = new QuantityInfo(QuantityType.Angle, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit Degree. @@ -98,6 +99,9 @@ private Angle(double numericValue, AngleUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private Angle(double numericValue, AngleUnit unit) /// public AngleUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentEnergy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentEnergy.WindowsRuntimeComponent.g.cs index cbc5a659c1..c0200eb565 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentEnergy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentEnergy.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class ApparentEnergy : IQuantity static ApparentEnergy() { BaseDimensions = new BaseDimensions(2, 1, -2, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.ApparentEnergy, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit VoltampereHour. @@ -98,6 +99,9 @@ private ApparentEnergy(double numericValue, ApparentEnergyUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private ApparentEnergy(double numericValue, ApparentEnergyUnit unit) /// public ApparentEnergyUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentPower.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentPower.WindowsRuntimeComponent.g.cs index daaf46e2cd..f55df009f8 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentPower.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentPower.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class ApparentPower : IQuantity static ApparentPower() { BaseDimensions = new BaseDimensions(2, 1, -3, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.ApparentPower, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit Voltampere. @@ -98,6 +99,9 @@ private ApparentPower(double numericValue, ApparentPowerUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private ApparentPower(double numericValue, ApparentPowerUnit unit) /// public ApparentPowerUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Area.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Area.WindowsRuntimeComponent.g.cs index a586b76c29..818c44ed35 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Area.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Area.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class Area : IQuantity static Area() { BaseDimensions = new BaseDimensions(2, 0, 0, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.Area, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit SquareMeter. @@ -98,6 +99,9 @@ private Area(double numericValue, AreaUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private Area(double numericValue, AreaUnit unit) /// public AreaUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaDensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaDensity.WindowsRuntimeComponent.g.cs index 10bf58c368..e624e0bfa1 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaDensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaDensity.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class AreaDensity : IQuantity static AreaDensity() { BaseDimensions = new BaseDimensions(-2, 1, 0, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.AreaDensity, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit KilogramPerSquareMeter. @@ -98,6 +99,9 @@ private AreaDensity(double numericValue, AreaDensityUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private AreaDensity(double numericValue, AreaDensityUnit unit) /// public AreaDensityUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaMomentOfInertia.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaMomentOfInertia.WindowsRuntimeComponent.g.cs index 88e609fde3..55bed2ae80 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaMomentOfInertia.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaMomentOfInertia.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class AreaMomentOfInertia : IQuantity static AreaMomentOfInertia() { BaseDimensions = new BaseDimensions(4, 0, 0, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.AreaMomentOfInertia, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit MeterToTheFourth. @@ -98,6 +99,9 @@ private AreaMomentOfInertia(double numericValue, AreaMomentOfInertiaUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private AreaMomentOfInertia(double numericValue, AreaMomentOfInertiaUnit unit) /// public AreaMomentOfInertiaUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BitRate.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BitRate.WindowsRuntimeComponent.g.cs index 9f94b2b184..da3d4e5463 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BitRate.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BitRate.WindowsRuntimeComponent.g.cs @@ -70,6 +70,7 @@ public sealed partial class BitRate : IQuantity static BitRate() { BaseDimensions = BaseDimensions.Dimensionless; + Info = new QuantityInfo(QuantityType.BitRate, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit BitPerSecond. @@ -101,6 +102,9 @@ private BitRate(decimal numericValue, BitRateUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -150,6 +154,10 @@ private BitRate(decimal numericValue, BitRateUnit unit) /// public BitRateUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.WindowsRuntimeComponent.g.cs index 7951122f05..cf6f354e53 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class BrakeSpecificFuelConsumption : IQuantity static BrakeSpecificFuelConsumption() { BaseDimensions = new BaseDimensions(-2, 0, 2, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.BrakeSpecificFuelConsumption, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit KilogramPerJoule. @@ -98,6 +99,9 @@ private BrakeSpecificFuelConsumption(double numericValue, BrakeSpecificFuelConsu #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private BrakeSpecificFuelConsumption(double numericValue, BrakeSpecificFuelConsu /// public BrakeSpecificFuelConsumptionUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Capacitance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Capacitance.WindowsRuntimeComponent.g.cs index e3c5e0539c..9cd8f29f30 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Capacitance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Capacitance.WindowsRuntimeComponent.g.cs @@ -70,6 +70,7 @@ public sealed partial class Capacitance : IQuantity static Capacitance() { BaseDimensions = new BaseDimensions(-2, -1, 4, 2, 0, 0, 0); + Info = new QuantityInfo(QuantityType.Capacitance, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit Farad. @@ -101,6 +102,9 @@ private Capacitance(double numericValue, CapacitanceUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -150,6 +154,10 @@ private Capacitance(double numericValue, CapacitanceUnit unit) /// public CapacitanceUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/CoefficientOfThermalExpansion.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/CoefficientOfThermalExpansion.WindowsRuntimeComponent.g.cs index 5fbf89f4fa..e0cd26f093 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/CoefficientOfThermalExpansion.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/CoefficientOfThermalExpansion.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class CoefficientOfThermalExpansion : IQuantity static CoefficientOfThermalExpansion() { BaseDimensions = new BaseDimensions(0, 0, 0, 0, -1, 0, 0); + Info = new QuantityInfo(QuantityType.CoefficientOfThermalExpansion, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit InverseKelvin. @@ -98,6 +99,9 @@ private CoefficientOfThermalExpansion(double numericValue, CoefficientOfThermalE #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private CoefficientOfThermalExpansion(double numericValue, CoefficientOfThermalE /// public CoefficientOfThermalExpansionUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Density.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Density.WindowsRuntimeComponent.g.cs index e0e50bf45c..abb5684de8 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Density.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Density.WindowsRuntimeComponent.g.cs @@ -70,6 +70,7 @@ public sealed partial class Density : IQuantity static Density() { BaseDimensions = new BaseDimensions(-3, 1, 0, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.Density, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit KilogramPerCubicMeter. @@ -101,6 +102,9 @@ private Density(double numericValue, DensityUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -150,6 +154,10 @@ private Density(double numericValue, DensityUnit unit) /// public DensityUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Duration.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Duration.WindowsRuntimeComponent.g.cs index e57ea85bbd..533e95f986 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Duration.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Duration.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class Duration : IQuantity static Duration() { BaseDimensions = new BaseDimensions(0, 0, 1, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.Duration, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit Second. @@ -98,6 +99,9 @@ private Duration(double numericValue, DurationUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private Duration(double numericValue, DurationUnit unit) /// public DurationUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/DynamicViscosity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/DynamicViscosity.WindowsRuntimeComponent.g.cs index 20534fd15c..57a34a63a9 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/DynamicViscosity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/DynamicViscosity.WindowsRuntimeComponent.g.cs @@ -70,6 +70,7 @@ public sealed partial class DynamicViscosity : IQuantity static DynamicViscosity() { BaseDimensions = new BaseDimensions(-1, 1, -1, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.DynamicViscosity, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit NewtonSecondPerMeterSquared. @@ -101,6 +102,9 @@ private DynamicViscosity(double numericValue, DynamicViscosityUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -150,6 +154,10 @@ private DynamicViscosity(double numericValue, DynamicViscosityUnit unit) /// public DynamicViscosityUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricAdmittance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricAdmittance.WindowsRuntimeComponent.g.cs index f22a5da97d..012fd3d61e 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricAdmittance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricAdmittance.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class ElectricAdmittance : IQuantity static ElectricAdmittance() { BaseDimensions = new BaseDimensions(-2, -1, 3, 2, 0, 0, 0); + Info = new QuantityInfo(QuantityType.ElectricAdmittance, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit Siemens. @@ -98,6 +99,9 @@ private ElectricAdmittance(double numericValue, ElectricAdmittanceUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private ElectricAdmittance(double numericValue, ElectricAdmittanceUnit unit) /// public ElectricAdmittanceUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCharge.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCharge.WindowsRuntimeComponent.g.cs index bb6f5726f4..d1228d5304 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCharge.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCharge.WindowsRuntimeComponent.g.cs @@ -70,6 +70,7 @@ public sealed partial class ElectricCharge : IQuantity static ElectricCharge() { BaseDimensions = new BaseDimensions(0, 0, 1, 1, 0, 0, 0); + Info = new QuantityInfo(QuantityType.ElectricCharge, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit Coulomb. @@ -101,6 +102,9 @@ private ElectricCharge(double numericValue, ElectricChargeUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -150,6 +154,10 @@ private ElectricCharge(double numericValue, ElectricChargeUnit unit) /// public ElectricChargeUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricChargeDensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricChargeDensity.WindowsRuntimeComponent.g.cs index 1bc6aa4bd2..77abfa7af8 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricChargeDensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricChargeDensity.WindowsRuntimeComponent.g.cs @@ -70,6 +70,7 @@ public sealed partial class ElectricChargeDensity : IQuantity static ElectricChargeDensity() { BaseDimensions = new BaseDimensions(-3, 0, 1, 1, 0, 0, 0); + Info = new QuantityInfo(QuantityType.ElectricChargeDensity, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit CoulombPerCubicMeter. @@ -101,6 +102,9 @@ private ElectricChargeDensity(double numericValue, ElectricChargeDensityUnit uni #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -150,6 +154,10 @@ private ElectricChargeDensity(double numericValue, ElectricChargeDensityUnit uni /// public ElectricChargeDensityUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductance.WindowsRuntimeComponent.g.cs index a8ea454d26..36e543eaf7 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductance.WindowsRuntimeComponent.g.cs @@ -70,6 +70,7 @@ public sealed partial class ElectricConductance : IQuantity static ElectricConductance() { BaseDimensions = new BaseDimensions(-2, -1, 3, 2, 0, 0, 0); + Info = new QuantityInfo(QuantityType.ElectricConductance, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit Siemens. @@ -101,6 +102,9 @@ private ElectricConductance(double numericValue, ElectricConductanceUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -150,6 +154,10 @@ private ElectricConductance(double numericValue, ElectricConductanceUnit unit) /// public ElectricConductanceUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductivity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductivity.WindowsRuntimeComponent.g.cs index 843805c29e..3ff5c11d80 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductivity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductivity.WindowsRuntimeComponent.g.cs @@ -70,6 +70,7 @@ public sealed partial class ElectricConductivity : IQuantity static ElectricConductivity() { BaseDimensions = new BaseDimensions(-3, -1, 3, 2, 0, 0, 0); + Info = new QuantityInfo(QuantityType.ElectricConductivity, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit SiemensPerMeter. @@ -101,6 +102,9 @@ private ElectricConductivity(double numericValue, ElectricConductivityUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -150,6 +154,10 @@ private ElectricConductivity(double numericValue, ElectricConductivityUnit unit) /// public ElectricConductivityUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrent.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrent.WindowsRuntimeComponent.g.cs index 31c19ff2db..aed77dcc70 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrent.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrent.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class ElectricCurrent : IQuantity static ElectricCurrent() { BaseDimensions = new BaseDimensions(0, 0, 0, 1, 0, 0, 0); + Info = new QuantityInfo(QuantityType.ElectricCurrent, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit Ampere. @@ -98,6 +99,9 @@ private ElectricCurrent(double numericValue, ElectricCurrentUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private ElectricCurrent(double numericValue, ElectricCurrentUnit unit) /// public ElectricCurrentUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentDensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentDensity.WindowsRuntimeComponent.g.cs index ba1566386b..138d98c607 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentDensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentDensity.WindowsRuntimeComponent.g.cs @@ -70,6 +70,7 @@ public sealed partial class ElectricCurrentDensity : IQuantity static ElectricCurrentDensity() { BaseDimensions = new BaseDimensions(-2, 0, 0, 1, 0, 0, 0); + Info = new QuantityInfo(QuantityType.ElectricCurrentDensity, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit AmperePerSquareMeter. @@ -101,6 +102,9 @@ private ElectricCurrentDensity(double numericValue, ElectricCurrentDensityUnit u #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -150,6 +154,10 @@ private ElectricCurrentDensity(double numericValue, ElectricCurrentDensityUnit u /// public ElectricCurrentDensityUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentGradient.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentGradient.WindowsRuntimeComponent.g.cs index 79a90f05ca..07021544c2 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentGradient.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentGradient.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class ElectricCurrentGradient : IQuantity static ElectricCurrentGradient() { BaseDimensions = new BaseDimensions(0, 0, -1, 1, 0, 0, 0); + Info = new QuantityInfo(QuantityType.ElectricCurrentGradient, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit AmperePerSecond. @@ -98,6 +99,9 @@ private ElectricCurrentGradient(double numericValue, ElectricCurrentGradientUnit #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private ElectricCurrentGradient(double numericValue, ElectricCurrentGradientUnit /// public ElectricCurrentGradientUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricField.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricField.WindowsRuntimeComponent.g.cs index 758928d9bf..bcc32778a8 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricField.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricField.WindowsRuntimeComponent.g.cs @@ -70,6 +70,7 @@ public sealed partial class ElectricField : IQuantity static ElectricField() { BaseDimensions = new BaseDimensions(1, 1, -3, -1, 0, 0, 0); + Info = new QuantityInfo(QuantityType.ElectricField, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit VoltPerMeter. @@ -101,6 +102,9 @@ private ElectricField(double numericValue, ElectricFieldUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -150,6 +154,10 @@ private ElectricField(double numericValue, ElectricFieldUnit unit) /// public ElectricFieldUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricInductance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricInductance.WindowsRuntimeComponent.g.cs index 6fee355e37..00d5abf728 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricInductance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricInductance.WindowsRuntimeComponent.g.cs @@ -70,6 +70,7 @@ public sealed partial class ElectricInductance : IQuantity static ElectricInductance() { BaseDimensions = new BaseDimensions(2, 1, -2, -2, 0, 0, 0); + Info = new QuantityInfo(QuantityType.ElectricInductance, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit Henry. @@ -101,6 +102,9 @@ private ElectricInductance(double numericValue, ElectricInductanceUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -150,6 +154,10 @@ private ElectricInductance(double numericValue, ElectricInductanceUnit unit) /// public ElectricInductanceUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotential.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotential.WindowsRuntimeComponent.g.cs index 546af6e12b..2f3adf96b5 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotential.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotential.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class ElectricPotential : IQuantity static ElectricPotential() { BaseDimensions = new BaseDimensions(2, 1, -3, -1, 0, 0, 0); + Info = new QuantityInfo(QuantityType.ElectricPotential, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit Volt. @@ -98,6 +99,9 @@ private ElectricPotential(double numericValue, ElectricPotentialUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private ElectricPotential(double numericValue, ElectricPotentialUnit unit) /// public ElectricPotentialUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialAc.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialAc.WindowsRuntimeComponent.g.cs index 153a1e0aa2..c33e43413a 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialAc.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialAc.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class ElectricPotentialAc : IQuantity static ElectricPotentialAc() { BaseDimensions = BaseDimensions.Dimensionless; + Info = new QuantityInfo(QuantityType.ElectricPotentialAc, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit VoltAc. @@ -98,6 +99,9 @@ private ElectricPotentialAc(double numericValue, ElectricPotentialAcUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private ElectricPotentialAc(double numericValue, ElectricPotentialAcUnit unit) /// public ElectricPotentialAcUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialDc.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialDc.WindowsRuntimeComponent.g.cs index adf9532fd1..a00d775f6d 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialDc.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialDc.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class ElectricPotentialDc : IQuantity static ElectricPotentialDc() { BaseDimensions = BaseDimensions.Dimensionless; + Info = new QuantityInfo(QuantityType.ElectricPotentialDc, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit VoltDc. @@ -98,6 +99,9 @@ private ElectricPotentialDc(double numericValue, ElectricPotentialDcUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private ElectricPotentialDc(double numericValue, ElectricPotentialDcUnit unit) /// public ElectricPotentialDcUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistance.WindowsRuntimeComponent.g.cs index 3784856cea..f5c8f9957d 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistance.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class ElectricResistance : IQuantity static ElectricResistance() { BaseDimensions = new BaseDimensions(2, 1, -3, -2, 0, 0, 0); + Info = new QuantityInfo(QuantityType.ElectricResistance, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit Ohm. @@ -98,6 +99,9 @@ private ElectricResistance(double numericValue, ElectricResistanceUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private ElectricResistance(double numericValue, ElectricResistanceUnit unit) /// public ElectricResistanceUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistivity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistivity.WindowsRuntimeComponent.g.cs index 48a115c831..6fc2fbc80a 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistivity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistivity.WindowsRuntimeComponent.g.cs @@ -70,6 +70,7 @@ public sealed partial class ElectricResistivity : IQuantity static ElectricResistivity() { BaseDimensions = new BaseDimensions(3, 1, -3, -2, 0, 0, 0); + Info = new QuantityInfo(QuantityType.ElectricResistivity, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit OhmMeter. @@ -101,6 +102,9 @@ private ElectricResistivity(double numericValue, ElectricResistivityUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -150,6 +154,10 @@ private ElectricResistivity(double numericValue, ElectricResistivityUnit unit) /// public ElectricResistivityUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Energy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Energy.WindowsRuntimeComponent.g.cs index 6003594404..318689a99b 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Energy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Energy.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class Energy : IQuantity static Energy() { BaseDimensions = new BaseDimensions(2, 1, -2, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.Energy, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit Joule. @@ -98,6 +99,9 @@ private Energy(double numericValue, EnergyUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private Energy(double numericValue, EnergyUnit unit) /// public EnergyUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Entropy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Entropy.WindowsRuntimeComponent.g.cs index 3bb85a46fd..1123e62f99 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Entropy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Entropy.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class Entropy : IQuantity static Entropy() { BaseDimensions = new BaseDimensions(2, 1, -2, 0, -1, 0, 0); + Info = new QuantityInfo(QuantityType.Entropy, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit JoulePerKelvin. @@ -98,6 +99,9 @@ private Entropy(double numericValue, EntropyUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private Entropy(double numericValue, EntropyUnit unit) /// public EntropyUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Force.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Force.WindowsRuntimeComponent.g.cs index f681bc23b8..a17fc4e795 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Force.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Force.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class Force : IQuantity static Force() { BaseDimensions = new BaseDimensions(1, 1, -2, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.Force, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit Newton. @@ -98,6 +99,9 @@ private Force(double numericValue, ForceUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private Force(double numericValue, ForceUnit unit) /// public ForceUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForceChangeRate.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForceChangeRate.WindowsRuntimeComponent.g.cs index 130bbaaab2..bd14952391 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForceChangeRate.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForceChangeRate.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class ForceChangeRate : IQuantity static ForceChangeRate() { BaseDimensions = new BaseDimensions(1, 1, -3, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.ForceChangeRate, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit NewtonPerSecond. @@ -98,6 +99,9 @@ private ForceChangeRate(double numericValue, ForceChangeRateUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private ForceChangeRate(double numericValue, ForceChangeRateUnit unit) /// public ForceChangeRateUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForcePerLength.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForcePerLength.WindowsRuntimeComponent.g.cs index 0d349719e1..bd1013b69b 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForcePerLength.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForcePerLength.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class ForcePerLength : IQuantity static ForcePerLength() { BaseDimensions = new BaseDimensions(0, 1, -2, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.ForcePerLength, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit NewtonPerMeter. @@ -98,6 +99,9 @@ private ForcePerLength(double numericValue, ForcePerLengthUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private ForcePerLength(double numericValue, ForcePerLengthUnit unit) /// public ForcePerLengthUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Frequency.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Frequency.WindowsRuntimeComponent.g.cs index 91e1b46e3d..5e690d402a 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Frequency.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Frequency.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class Frequency : IQuantity static Frequency() { BaseDimensions = new BaseDimensions(0, 0, -1, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.Frequency, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit Hertz. @@ -98,6 +99,9 @@ private Frequency(double numericValue, FrequencyUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private Frequency(double numericValue, FrequencyUnit unit) /// public FrequencyUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatFlux.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatFlux.WindowsRuntimeComponent.g.cs index b7451ac273..8cac7c3e95 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatFlux.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatFlux.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class HeatFlux : IQuantity static HeatFlux() { BaseDimensions = new BaseDimensions(0, 1, -3, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.HeatFlux, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit WattPerSquareMeter. @@ -98,6 +99,9 @@ private HeatFlux(double numericValue, HeatFluxUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private HeatFlux(double numericValue, HeatFluxUnit unit) /// public HeatFluxUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatTransferCoefficient.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatTransferCoefficient.WindowsRuntimeComponent.g.cs index 40413dc114..754d2aa5bd 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatTransferCoefficient.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatTransferCoefficient.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class HeatTransferCoefficient : IQuantity static HeatTransferCoefficient() { BaseDimensions = new BaseDimensions(0, 1, -3, 0, -1, 0, 0); + Info = new QuantityInfo(QuantityType.HeatTransferCoefficient, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit WattPerSquareMeterKelvin. @@ -98,6 +99,9 @@ private HeatTransferCoefficient(double numericValue, HeatTransferCoefficientUnit #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private HeatTransferCoefficient(double numericValue, HeatTransferCoefficientUnit /// public HeatTransferCoefficientUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Illuminance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Illuminance.WindowsRuntimeComponent.g.cs index a5f6ee518a..a4e7ae0997 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Illuminance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Illuminance.WindowsRuntimeComponent.g.cs @@ -70,6 +70,7 @@ public sealed partial class Illuminance : IQuantity static Illuminance() { BaseDimensions = new BaseDimensions(-2, 0, 0, 0, 0, 0, 1); + Info = new QuantityInfo(QuantityType.Illuminance, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit Lux. @@ -101,6 +102,9 @@ private Illuminance(double numericValue, IlluminanceUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -150,6 +154,10 @@ private Illuminance(double numericValue, IlluminanceUnit unit) /// public IlluminanceUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Information.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Information.WindowsRuntimeComponent.g.cs index 8e51a2ef3f..e6a47693c2 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Information.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Information.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class Information : IQuantity static Information() { BaseDimensions = BaseDimensions.Dimensionless; + Info = new QuantityInfo(QuantityType.Information, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit Bit. @@ -98,6 +99,9 @@ private Information(decimal numericValue, InformationUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private Information(decimal numericValue, InformationUnit unit) /// public InformationUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiance.WindowsRuntimeComponent.g.cs index 87612c4635..28860370fb 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiance.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class Irradiance : IQuantity static Irradiance() { BaseDimensions = new BaseDimensions(0, 1, -3, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.Irradiance, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit WattPerSquareMeter. @@ -98,6 +99,9 @@ private Irradiance(double numericValue, IrradianceUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private Irradiance(double numericValue, IrradianceUnit unit) /// public IrradianceUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiation.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiation.WindowsRuntimeComponent.g.cs index 598771539f..56a0132784 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiation.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiation.WindowsRuntimeComponent.g.cs @@ -70,6 +70,7 @@ public sealed partial class Irradiation : IQuantity static Irradiation() { BaseDimensions = new BaseDimensions(0, 1, -2, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.Irradiation, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit JoulePerSquareMeter. @@ -101,6 +102,9 @@ private Irradiation(double numericValue, IrradiationUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -150,6 +154,10 @@ private Irradiation(double numericValue, IrradiationUnit unit) /// public IrradiationUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/KinematicViscosity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/KinematicViscosity.WindowsRuntimeComponent.g.cs index f2944f61d5..254ea11a8c 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/KinematicViscosity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/KinematicViscosity.WindowsRuntimeComponent.g.cs @@ -70,6 +70,7 @@ public sealed partial class KinematicViscosity : IQuantity static KinematicViscosity() { BaseDimensions = new BaseDimensions(2, 0, -1, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.KinematicViscosity, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit SquareMeterPerSecond. @@ -101,6 +102,9 @@ private KinematicViscosity(double numericValue, KinematicViscosityUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -150,6 +154,10 @@ private KinematicViscosity(double numericValue, KinematicViscosityUnit unit) /// public KinematicViscosityUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LapseRate.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LapseRate.WindowsRuntimeComponent.g.cs index 1242a38c3d..8f3fdee68e 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LapseRate.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LapseRate.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class LapseRate : IQuantity static LapseRate() { BaseDimensions = new BaseDimensions(-1, 0, 0, 0, 1, 0, 0); + Info = new QuantityInfo(QuantityType.LapseRate, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit DegreeCelsiusPerKilometer. @@ -98,6 +99,9 @@ private LapseRate(double numericValue, LapseRateUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private LapseRate(double numericValue, LapseRateUnit unit) /// public LapseRateUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Length.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Length.WindowsRuntimeComponent.g.cs index c3caf25b5d..478f156e94 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Length.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Length.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class Length : IQuantity static Length() { BaseDimensions = new BaseDimensions(1, 0, 0, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.Length, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit Meter. @@ -98,6 +99,9 @@ private Length(double numericValue, LengthUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private Length(double numericValue, LengthUnit unit) /// public LengthUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Level.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Level.WindowsRuntimeComponent.g.cs index 67f61d03d0..504b0ffee1 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Level.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Level.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class Level : IQuantity static Level() { BaseDimensions = BaseDimensions.Dimensionless; + Info = new QuantityInfo(QuantityType.Level, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit Decibel. @@ -98,6 +99,9 @@ private Level(double numericValue, LevelUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private Level(double numericValue, LevelUnit unit) /// public LevelUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LinearDensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LinearDensity.WindowsRuntimeComponent.g.cs index 7dad64c701..b9426c9f06 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LinearDensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LinearDensity.WindowsRuntimeComponent.g.cs @@ -70,6 +70,7 @@ public sealed partial class LinearDensity : IQuantity static LinearDensity() { BaseDimensions = new BaseDimensions(-1, 1, 0, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.LinearDensity, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit KilogramPerMeter. @@ -101,6 +102,9 @@ private LinearDensity(double numericValue, LinearDensityUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -150,6 +154,10 @@ private LinearDensity(double numericValue, LinearDensityUnit unit) /// public LinearDensityUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousFlux.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousFlux.WindowsRuntimeComponent.g.cs index 9d867e79a5..4c06b42510 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousFlux.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousFlux.WindowsRuntimeComponent.g.cs @@ -70,6 +70,7 @@ public sealed partial class LuminousFlux : IQuantity static LuminousFlux() { BaseDimensions = new BaseDimensions(0, 0, 0, 0, 0, 0, 1); + Info = new QuantityInfo(QuantityType.LuminousFlux, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit Lumen. @@ -101,6 +102,9 @@ private LuminousFlux(double numericValue, LuminousFluxUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -150,6 +154,10 @@ private LuminousFlux(double numericValue, LuminousFluxUnit unit) /// public LuminousFluxUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousIntensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousIntensity.WindowsRuntimeComponent.g.cs index 6ba10e506e..b2731feb07 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousIntensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousIntensity.WindowsRuntimeComponent.g.cs @@ -70,6 +70,7 @@ public sealed partial class LuminousIntensity : IQuantity static LuminousIntensity() { BaseDimensions = new BaseDimensions(0, 0, 0, 0, 0, 0, 1); + Info = new QuantityInfo(QuantityType.LuminousIntensity, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit Candela. @@ -101,6 +102,9 @@ private LuminousIntensity(double numericValue, LuminousIntensityUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -150,6 +154,10 @@ private LuminousIntensity(double numericValue, LuminousIntensityUnit unit) /// public LuminousIntensityUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticField.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticField.WindowsRuntimeComponent.g.cs index 86caad02ba..f841c52ac2 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticField.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticField.WindowsRuntimeComponent.g.cs @@ -70,6 +70,7 @@ public sealed partial class MagneticField : IQuantity static MagneticField() { BaseDimensions = new BaseDimensions(0, 1, -2, -1, 0, 0, 0); + Info = new QuantityInfo(QuantityType.MagneticField, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit Tesla. @@ -101,6 +102,9 @@ private MagneticField(double numericValue, MagneticFieldUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -150,6 +154,10 @@ private MagneticField(double numericValue, MagneticFieldUnit unit) /// public MagneticFieldUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticFlux.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticFlux.WindowsRuntimeComponent.g.cs index ba0b4d1bb1..fb1f50cd93 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticFlux.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticFlux.WindowsRuntimeComponent.g.cs @@ -70,6 +70,7 @@ public sealed partial class MagneticFlux : IQuantity static MagneticFlux() { BaseDimensions = new BaseDimensions(2, 1, -2, -1, 0, 0, 0); + Info = new QuantityInfo(QuantityType.MagneticFlux, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit Weber. @@ -101,6 +102,9 @@ private MagneticFlux(double numericValue, MagneticFluxUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -150,6 +154,10 @@ private MagneticFlux(double numericValue, MagneticFluxUnit unit) /// public MagneticFluxUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Magnetization.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Magnetization.WindowsRuntimeComponent.g.cs index 0c3a26cf2d..e631b2b754 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Magnetization.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Magnetization.WindowsRuntimeComponent.g.cs @@ -70,6 +70,7 @@ public sealed partial class Magnetization : IQuantity static Magnetization() { BaseDimensions = new BaseDimensions(-1, 0, 0, 1, 0, 0, 0); + Info = new QuantityInfo(QuantityType.Magnetization, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit AmperePerMeter. @@ -101,6 +102,9 @@ private Magnetization(double numericValue, MagnetizationUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -150,6 +154,10 @@ private Magnetization(double numericValue, MagnetizationUnit unit) /// public MagnetizationUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Mass.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Mass.WindowsRuntimeComponent.g.cs index 6151a5f747..10022db38a 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Mass.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Mass.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class Mass : IQuantity static Mass() { BaseDimensions = new BaseDimensions(0, 1, 0, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.Mass, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit Kilogram. @@ -98,6 +99,9 @@ private Mass(double numericValue, MassUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private Mass(double numericValue, MassUnit unit) /// public MassUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlow.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlow.WindowsRuntimeComponent.g.cs index 201a361242..ea7c575cbf 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlow.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlow.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class MassFlow : IQuantity static MassFlow() { BaseDimensions = new BaseDimensions(0, 1, -1, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.MassFlow, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit GramPerSecond. @@ -98,6 +99,9 @@ private MassFlow(double numericValue, MassFlowUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private MassFlow(double numericValue, MassFlowUnit unit) /// public MassFlowUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlux.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlux.WindowsRuntimeComponent.g.cs index 32a8c1697c..a23ed66e8c 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlux.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlux.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class MassFlux : IQuantity static MassFlux() { BaseDimensions = new BaseDimensions(-2, 1, -1, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.MassFlux, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit KilogramPerSecondPerSquareMeter. @@ -98,6 +99,9 @@ private MassFlux(double numericValue, MassFluxUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private MassFlux(double numericValue, MassFluxUnit unit) /// public MassFluxUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassMomentOfInertia.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassMomentOfInertia.WindowsRuntimeComponent.g.cs index 39191b30f7..0585fab60d 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassMomentOfInertia.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassMomentOfInertia.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class MassMomentOfInertia : IQuantity static MassMomentOfInertia() { BaseDimensions = new BaseDimensions(2, 1, 0, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.MassMomentOfInertia, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit KilogramSquareMeter. @@ -98,6 +99,9 @@ private MassMomentOfInertia(double numericValue, MassMomentOfInertiaUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private MassMomentOfInertia(double numericValue, MassMomentOfInertiaUnit unit) /// public MassMomentOfInertiaUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEnergy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEnergy.WindowsRuntimeComponent.g.cs index e52392f58c..40714747ed 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEnergy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEnergy.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class MolarEnergy : IQuantity static MolarEnergy() { BaseDimensions = new BaseDimensions(2, 1, -2, 0, 0, -1, 0); + Info = new QuantityInfo(QuantityType.MolarEnergy, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit JoulePerMole. @@ -98,6 +99,9 @@ private MolarEnergy(double numericValue, MolarEnergyUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private MolarEnergy(double numericValue, MolarEnergyUnit unit) /// public MolarEnergyUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEntropy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEntropy.WindowsRuntimeComponent.g.cs index 8aeef88d13..aa15f6976b 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEntropy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEntropy.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class MolarEntropy : IQuantity static MolarEntropy() { BaseDimensions = new BaseDimensions(2, 1, -2, 0, -1, -1, 0); + Info = new QuantityInfo(QuantityType.MolarEntropy, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit JoulePerMoleKelvin. @@ -98,6 +99,9 @@ private MolarEntropy(double numericValue, MolarEntropyUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private MolarEntropy(double numericValue, MolarEntropyUnit unit) /// public MolarEntropyUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarMass.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarMass.WindowsRuntimeComponent.g.cs index 3c1d4158ed..4c0aff5e7f 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarMass.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarMass.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class MolarMass : IQuantity static MolarMass() { BaseDimensions = new BaseDimensions(0, 1, 0, 0, 0, -1, 0); + Info = new QuantityInfo(QuantityType.MolarMass, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit KilogramPerMole. @@ -98,6 +99,9 @@ private MolarMass(double numericValue, MolarMassUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private MolarMass(double numericValue, MolarMassUnit unit) /// public MolarMassUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Molarity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Molarity.WindowsRuntimeComponent.g.cs index f84d42c175..7956b61e36 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Molarity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Molarity.WindowsRuntimeComponent.g.cs @@ -70,6 +70,7 @@ public sealed partial class Molarity : IQuantity static Molarity() { BaseDimensions = new BaseDimensions(-3, 0, 0, 0, 0, 1, 0); + Info = new QuantityInfo(QuantityType.Molarity, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit MolesPerCubicMeter. @@ -101,6 +102,9 @@ private Molarity(double numericValue, MolarityUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -150,6 +154,10 @@ private Molarity(double numericValue, MolarityUnit unit) /// public MolarityUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permeability.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permeability.WindowsRuntimeComponent.g.cs index 2916a7cc26..4c27d95bd6 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permeability.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permeability.WindowsRuntimeComponent.g.cs @@ -70,6 +70,7 @@ public sealed partial class Permeability : IQuantity static Permeability() { BaseDimensions = new BaseDimensions(1, 1, -2, -2, 0, 0, 0); + Info = new QuantityInfo(QuantityType.Permeability, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit HenryPerMeter. @@ -101,6 +102,9 @@ private Permeability(double numericValue, PermeabilityUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -150,6 +154,10 @@ private Permeability(double numericValue, PermeabilityUnit unit) /// public PermeabilityUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permittivity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permittivity.WindowsRuntimeComponent.g.cs index 8ddb1a058e..64b6c01162 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permittivity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permittivity.WindowsRuntimeComponent.g.cs @@ -70,6 +70,7 @@ public sealed partial class Permittivity : IQuantity static Permittivity() { BaseDimensions = new BaseDimensions(-3, -1, 4, 2, 0, 0, 0); + Info = new QuantityInfo(QuantityType.Permittivity, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit FaradPerMeter. @@ -101,6 +102,9 @@ private Permittivity(double numericValue, PermittivityUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -150,6 +154,10 @@ private Permittivity(double numericValue, PermittivityUnit unit) /// public PermittivityUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Power.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Power.WindowsRuntimeComponent.g.cs index 142abfee8c..6ff941de30 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Power.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Power.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class Power : IQuantity static Power() { BaseDimensions = new BaseDimensions(2, 1, -3, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.Power, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit Watt. @@ -98,6 +99,9 @@ private Power(decimal numericValue, PowerUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private Power(decimal numericValue, PowerUnit unit) /// public PowerUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerDensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerDensity.WindowsRuntimeComponent.g.cs index 47ea186351..547a2a5100 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerDensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerDensity.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class PowerDensity : IQuantity static PowerDensity() { BaseDimensions = new BaseDimensions(-1, 1, -3, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.PowerDensity, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit WattPerCubicMeter. @@ -98,6 +99,9 @@ private PowerDensity(double numericValue, PowerDensityUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private PowerDensity(double numericValue, PowerDensityUnit unit) /// public PowerDensityUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerRatio.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerRatio.WindowsRuntimeComponent.g.cs index e603267b0e..3b29752381 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerRatio.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerRatio.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class PowerRatio : IQuantity static PowerRatio() { BaseDimensions = BaseDimensions.Dimensionless; + Info = new QuantityInfo(QuantityType.PowerRatio, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit DecibelWatt. @@ -98,6 +99,9 @@ private PowerRatio(double numericValue, PowerRatioUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private PowerRatio(double numericValue, PowerRatioUnit unit) /// public PowerRatioUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Pressure.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Pressure.WindowsRuntimeComponent.g.cs index 8785243aa8..d14cff6dfc 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Pressure.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Pressure.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class Pressure : IQuantity static Pressure() { BaseDimensions = new BaseDimensions(-1, 1, -2, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.Pressure, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit Pascal. @@ -98,6 +99,9 @@ private Pressure(double numericValue, PressureUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private Pressure(double numericValue, PressureUnit unit) /// public PressureUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PressureChangeRate.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PressureChangeRate.WindowsRuntimeComponent.g.cs index 8b74cbc58a..59753eafe1 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PressureChangeRate.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PressureChangeRate.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class PressureChangeRate : IQuantity static PressureChangeRate() { BaseDimensions = new BaseDimensions(-1, 1, -3, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.PressureChangeRate, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit PascalPerSecond. @@ -98,6 +99,9 @@ private PressureChangeRate(double numericValue, PressureChangeRateUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private PressureChangeRate(double numericValue, PressureChangeRateUnit unit) /// public PressureChangeRateUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Ratio.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Ratio.WindowsRuntimeComponent.g.cs index 8eb8809246..d8d5a39f71 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Ratio.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Ratio.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class Ratio : IQuantity static Ratio() { BaseDimensions = BaseDimensions.Dimensionless; + Info = new QuantityInfo(QuantityType.Ratio, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit DecimalFraction. @@ -98,6 +99,9 @@ private Ratio(double numericValue, RatioUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private Ratio(double numericValue, RatioUnit unit) /// public RatioUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactiveEnergy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactiveEnergy.WindowsRuntimeComponent.g.cs index 4416fafce4..c64852e303 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactiveEnergy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactiveEnergy.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class ReactiveEnergy : IQuantity static ReactiveEnergy() { BaseDimensions = new BaseDimensions(2, 1, -1, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.ReactiveEnergy, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit VoltampereReactiveHour. @@ -98,6 +99,9 @@ private ReactiveEnergy(double numericValue, ReactiveEnergyUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private ReactiveEnergy(double numericValue, ReactiveEnergyUnit unit) /// public ReactiveEnergyUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactivePower.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactivePower.WindowsRuntimeComponent.g.cs index 586c4fba33..34da3fdaf5 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactivePower.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactivePower.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class ReactivePower : IQuantity static ReactivePower() { BaseDimensions = new BaseDimensions(2, 1, -3, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.ReactivePower, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit VoltampereReactive. @@ -98,6 +99,9 @@ private ReactivePower(double numericValue, ReactivePowerUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private ReactivePower(double numericValue, ReactivePowerUnit unit) /// public ReactivePowerUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalAcceleration.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalAcceleration.WindowsRuntimeComponent.g.cs index f8b24a5ec0..cad1897a7f 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalAcceleration.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalAcceleration.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class RotationalAcceleration : IQuantity static RotationalAcceleration() { BaseDimensions = new BaseDimensions(0, 0, -2, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.RotationalAcceleration, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit RadianPerSecondSquared. @@ -98,6 +99,9 @@ private RotationalAcceleration(double numericValue, RotationalAccelerationUnit u #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private RotationalAcceleration(double numericValue, RotationalAccelerationUnit u /// public RotationalAccelerationUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalSpeed.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalSpeed.WindowsRuntimeComponent.g.cs index 9a2c78e98a..709d41b323 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalSpeed.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalSpeed.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class RotationalSpeed : IQuantity static RotationalSpeed() { BaseDimensions = new BaseDimensions(0, 0, -1, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.RotationalSpeed, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit RadianPerSecond. @@ -98,6 +99,9 @@ private RotationalSpeed(double numericValue, RotationalSpeedUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private RotationalSpeed(double numericValue, RotationalSpeedUnit unit) /// public RotationalSpeedUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffness.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffness.WindowsRuntimeComponent.g.cs index 61fc5c97dd..28d6854e7d 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffness.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffness.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class RotationalStiffness : IQuantity static RotationalStiffness() { BaseDimensions = new BaseDimensions(2, 1, -2, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.RotationalStiffness, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit NewtonMeterPerRadian. @@ -98,6 +99,9 @@ private RotationalStiffness(double numericValue, RotationalStiffnessUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private RotationalStiffness(double numericValue, RotationalStiffnessUnit unit) /// public RotationalStiffnessUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffnessPerLength.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffnessPerLength.WindowsRuntimeComponent.g.cs index 2e47b2cfe3..5c610b1d86 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffnessPerLength.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffnessPerLength.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class RotationalStiffnessPerLength : IQuantity static RotationalStiffnessPerLength() { BaseDimensions = new BaseDimensions(1, 1, -2, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.RotationalStiffnessPerLength, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit NewtonMeterPerRadianPerMeter. @@ -98,6 +99,9 @@ private RotationalStiffnessPerLength(double numericValue, RotationalStiffnessPer #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private RotationalStiffnessPerLength(double numericValue, RotationalStiffnessPer /// public RotationalStiffnessPerLengthUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SolidAngle.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SolidAngle.WindowsRuntimeComponent.g.cs index 77bdb7da20..9e9a93f12c 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SolidAngle.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SolidAngle.WindowsRuntimeComponent.g.cs @@ -70,6 +70,7 @@ public sealed partial class SolidAngle : IQuantity static SolidAngle() { BaseDimensions = BaseDimensions.Dimensionless; + Info = new QuantityInfo(QuantityType.SolidAngle, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit Steradian. @@ -101,6 +102,9 @@ private SolidAngle(double numericValue, SolidAngleUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -150,6 +154,10 @@ private SolidAngle(double numericValue, SolidAngleUnit unit) /// public SolidAngleUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEnergy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEnergy.WindowsRuntimeComponent.g.cs index 734fa9e4ca..506a6229ca 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEnergy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEnergy.WindowsRuntimeComponent.g.cs @@ -70,6 +70,7 @@ public sealed partial class SpecificEnergy : IQuantity static SpecificEnergy() { BaseDimensions = new BaseDimensions(2, 0, -2, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.SpecificEnergy, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit JoulePerKilogram. @@ -101,6 +102,9 @@ private SpecificEnergy(double numericValue, SpecificEnergyUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -150,6 +154,10 @@ private SpecificEnergy(double numericValue, SpecificEnergyUnit unit) /// public SpecificEnergyUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEntropy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEntropy.WindowsRuntimeComponent.g.cs index 2b5bad71d1..dcaa8eb092 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEntropy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEntropy.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class SpecificEntropy : IQuantity static SpecificEntropy() { BaseDimensions = new BaseDimensions(2, 0, -2, 0, -1, 0, 0); + Info = new QuantityInfo(QuantityType.SpecificEntropy, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit JoulePerKilogramKelvin. @@ -98,6 +99,9 @@ private SpecificEntropy(double numericValue, SpecificEntropyUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private SpecificEntropy(double numericValue, SpecificEntropyUnit unit) /// public SpecificEntropyUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificVolume.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificVolume.WindowsRuntimeComponent.g.cs index c139dbbd8a..6a18035612 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificVolume.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificVolume.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class SpecificVolume : IQuantity static SpecificVolume() { BaseDimensions = new BaseDimensions(3, -1, 0, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.SpecificVolume, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit CubicMeterPerKilogram. @@ -98,6 +99,9 @@ private SpecificVolume(double numericValue, SpecificVolumeUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private SpecificVolume(double numericValue, SpecificVolumeUnit unit) /// public SpecificVolumeUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificWeight.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificWeight.WindowsRuntimeComponent.g.cs index 6d8f47f547..50de99919c 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificWeight.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificWeight.WindowsRuntimeComponent.g.cs @@ -70,6 +70,7 @@ public sealed partial class SpecificWeight : IQuantity static SpecificWeight() { BaseDimensions = new BaseDimensions(-2, 1, -2, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.SpecificWeight, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit NewtonPerCubicMeter. @@ -101,6 +102,9 @@ private SpecificWeight(double numericValue, SpecificWeightUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -150,6 +154,10 @@ private SpecificWeight(double numericValue, SpecificWeightUnit unit) /// public SpecificWeightUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Speed.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Speed.WindowsRuntimeComponent.g.cs index c7b3ec280e..ea4260c32a 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Speed.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Speed.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class Speed : IQuantity static Speed() { BaseDimensions = new BaseDimensions(1, 0, -1, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.Speed, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit MeterPerSecond. @@ -98,6 +99,9 @@ private Speed(double numericValue, SpeedUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private Speed(double numericValue, SpeedUnit unit) /// public SpeedUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Temperature.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Temperature.WindowsRuntimeComponent.g.cs index 77796a121f..7a66df49e1 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Temperature.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Temperature.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class Temperature : IQuantity static Temperature() { BaseDimensions = new BaseDimensions(0, 0, 0, 0, 1, 0, 0); + Info = new QuantityInfo(QuantityType.Temperature, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit Kelvin. @@ -98,6 +99,9 @@ private Temperature(double numericValue, TemperatureUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private Temperature(double numericValue, TemperatureUnit unit) /// public TemperatureUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureChangeRate.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureChangeRate.WindowsRuntimeComponent.g.cs index 0c244aa4d8..4e719f2c0d 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureChangeRate.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureChangeRate.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class TemperatureChangeRate : IQuantity static TemperatureChangeRate() { BaseDimensions = new BaseDimensions(0, 0, -1, 0, 1, 0, 0); + Info = new QuantityInfo(QuantityType.TemperatureChangeRate, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit DegreeCelsiusPerSecond. @@ -98,6 +99,9 @@ private TemperatureChangeRate(double numericValue, TemperatureChangeRateUnit uni #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private TemperatureChangeRate(double numericValue, TemperatureChangeRateUnit uni /// public TemperatureChangeRateUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureDelta.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureDelta.WindowsRuntimeComponent.g.cs index f5343b234c..38996c22f7 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureDelta.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureDelta.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class TemperatureDelta : IQuantity static TemperatureDelta() { BaseDimensions = BaseDimensions.Dimensionless; + Info = new QuantityInfo(QuantityType.TemperatureDelta, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit Kelvin. @@ -98,6 +99,9 @@ private TemperatureDelta(double numericValue, TemperatureDeltaUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private TemperatureDelta(double numericValue, TemperatureDeltaUnit unit) /// public TemperatureDeltaUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalConductivity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalConductivity.WindowsRuntimeComponent.g.cs index aaa091df43..58a1f34d87 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalConductivity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalConductivity.WindowsRuntimeComponent.g.cs @@ -70,6 +70,7 @@ public sealed partial class ThermalConductivity : IQuantity static ThermalConductivity() { BaseDimensions = new BaseDimensions(1, 1, -3, 0, -1, 0, 0); + Info = new QuantityInfo(QuantityType.ThermalConductivity, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit WattPerMeterKelvin. @@ -101,6 +102,9 @@ private ThermalConductivity(double numericValue, ThermalConductivityUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -150,6 +154,10 @@ private ThermalConductivity(double numericValue, ThermalConductivityUnit unit) /// public ThermalConductivityUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalResistance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalResistance.WindowsRuntimeComponent.g.cs index ba41692a9b..155cf4e114 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalResistance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalResistance.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class ThermalResistance : IQuantity static ThermalResistance() { BaseDimensions = new BaseDimensions(0, -1, 3, 0, 1, 0, 0); + Info = new QuantityInfo(QuantityType.ThermalResistance, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit SquareMeterKelvinPerKilowatt. @@ -98,6 +99,9 @@ private ThermalResistance(double numericValue, ThermalResistanceUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private ThermalResistance(double numericValue, ThermalResistanceUnit unit) /// public ThermalResistanceUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Torque.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Torque.WindowsRuntimeComponent.g.cs index b94c2afb09..d0d5f4f0fd 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Torque.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Torque.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class Torque : IQuantity static Torque() { BaseDimensions = new BaseDimensions(2, 1, -2, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.Torque, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit NewtonMeter. @@ -98,6 +99,9 @@ private Torque(double numericValue, TorqueUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private Torque(double numericValue, TorqueUnit unit) /// public TorqueUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VitaminA.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VitaminA.WindowsRuntimeComponent.g.cs index ae58a1d057..002f89ed32 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VitaminA.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VitaminA.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class VitaminA : IQuantity static VitaminA() { BaseDimensions = BaseDimensions.Dimensionless; + Info = new QuantityInfo(QuantityType.VitaminA, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit InternationalUnit. @@ -98,6 +99,9 @@ private VitaminA(double numericValue, VitaminAUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private VitaminA(double numericValue, VitaminAUnit unit) /// public VitaminAUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Volume.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Volume.WindowsRuntimeComponent.g.cs index 84fa309611..25bc06be0f 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Volume.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Volume.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class Volume : IQuantity static Volume() { BaseDimensions = new BaseDimensions(3, 0, 0, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.Volume, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit CubicMeter. @@ -98,6 +99,9 @@ private Volume(double numericValue, VolumeUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private Volume(double numericValue, VolumeUnit unit) /// public VolumeUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VolumeFlow.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VolumeFlow.WindowsRuntimeComponent.g.cs index 21babd80b2..10db892180 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VolumeFlow.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VolumeFlow.WindowsRuntimeComponent.g.cs @@ -67,6 +67,7 @@ public sealed partial class VolumeFlow : IQuantity static VolumeFlow() { BaseDimensions = new BaseDimensions(3, 0, -1, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.VolumeFlow, Units, Zero); } /// /// Creates the quantity with a value of 0 in the base unit CubicMeterPerSecond. @@ -98,6 +99,9 @@ private VolumeFlow(double numericValue, VolumeFlowUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -147,6 +151,10 @@ private VolumeFlow(double numericValue, VolumeFlowUnit unit) /// public VolumeFlowUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// diff --git a/UnitsNet/GeneratedCode/Quantities/Acceleration.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Acceleration.NetFramework.g.cs index 84ccd613a6..53c9b8fde8 100644 --- a/UnitsNet/GeneratedCode/Quantities/Acceleration.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Acceleration.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct Acceleration : IQuantity, IEquatable(QuantityType.Acceleration, Units, Zero); } /// @@ -84,6 +85,9 @@ public Acceleration(double numericValue, AccelerationUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public Acceleration(double numericValue, AccelerationUnit unit) /// public AccelerationUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -576,12 +584,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Accele return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(Acceleration left, Acceleration right) + public static bool operator ==(Acceleration left, Acceleration right) { return left.Equals(right); } - public static bool operator !=(Acceleration left, Acceleration right) + public static bool operator !=(Acceleration left, Acceleration right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.NetFramework.g.cs index 90bf50a26d..612a5ada90 100644 --- a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct AmountOfSubstance : IQuantity, IEqu static AmountOfSubstance() { BaseDimensions = new BaseDimensions(0, 0, 0, 0, 0, 1, 0); + Info = new QuantityInfo(QuantityType.AmountOfSubstance, Units, Zero); } /// @@ -84,6 +85,9 @@ public AmountOfSubstance(double numericValue, AmountOfSubstanceUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public AmountOfSubstance(double numericValue, AmountOfSubstanceUnit unit) /// public AmountOfSubstanceUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -604,12 +612,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Amount return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(AmountOfSubstance left, AmountOfSubstance right) + public static bool operator ==(AmountOfSubstance left, AmountOfSubstance right) { return left.Equals(right); } - public static bool operator !=(AmountOfSubstance left, AmountOfSubstance right) + public static bool operator !=(AmountOfSubstance left, AmountOfSubstance right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.NetFramework.g.cs index 5c92424eee..5318b14bba 100644 --- a/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct AmplitudeRatio : IQuantity, IEquatable static AmplitudeRatio() { BaseDimensions = BaseDimensions.Dimensionless; + Info = new QuantityInfo(QuantityType.AmplitudeRatio, Units, Zero); } /// @@ -84,6 +85,9 @@ public AmplitudeRatio(double numericValue, AmplitudeRatioUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public AmplitudeRatio(double numericValue, AmplitudeRatioUnit unit) /// public AmplitudeRatioUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -458,12 +466,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Amplit return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(AmplitudeRatio left, AmplitudeRatio right) + public static bool operator ==(AmplitudeRatio left, AmplitudeRatio right) { return left.Equals(right); } - public static bool operator !=(AmplitudeRatio left, AmplitudeRatio right) + public static bool operator !=(AmplitudeRatio left, AmplitudeRatio right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/Angle.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Angle.NetFramework.g.cs index da67ba174f..b115d78ade 100644 --- a/UnitsNet/GeneratedCode/Quantities/Angle.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Angle.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct Angle : IQuantity, IEquatable, IComparab static Angle() { BaseDimensions = BaseDimensions.Dimensionless; + Info = new QuantityInfo(QuantityType.Angle, Units, Zero); } /// @@ -84,6 +85,9 @@ public Angle(double numericValue, AngleUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public Angle(double numericValue, AngleUnit unit) /// public AngleUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -590,12 +598,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out AngleU return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(Angle left, Angle right) + public static bool operator ==(Angle left, Angle right) { return left.Equals(right); } - public static bool operator !=(Angle left, Angle right) + public static bool operator !=(Angle left, Angle right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.NetFramework.g.cs index d9ffd9f485..8e5f353f24 100644 --- a/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct ApparentEnergy : IQuantity, IEquatable static ApparentEnergy() { BaseDimensions = new BaseDimensions(2, 1, -2, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.ApparentEnergy, Units, Zero); } /// @@ -84,6 +85,9 @@ public ApparentEnergy(double numericValue, ApparentEnergyUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public ApparentEnergy(double numericValue, ApparentEnergyUnit unit) /// public ApparentEnergyUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -436,12 +444,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Appare return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(ApparentEnergy left, ApparentEnergy right) + public static bool operator ==(ApparentEnergy left, ApparentEnergy right) { return left.Equals(right); } - public static bool operator !=(ApparentEnergy left, ApparentEnergy right) + public static bool operator !=(ApparentEnergy left, ApparentEnergy right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/ApparentPower.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ApparentPower.NetFramework.g.cs index 339f0a85ed..0fafe6e983 100644 --- a/UnitsNet/GeneratedCode/Quantities/ApparentPower.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ApparentPower.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct ApparentPower : IQuantity, IEquatable(QuantityType.ApparentPower, Units, Zero); } /// @@ -84,6 +85,9 @@ public ApparentPower(double numericValue, ApparentPowerUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public ApparentPower(double numericValue, ApparentPowerUnit unit) /// public ApparentPowerUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -450,12 +458,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Appare return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(ApparentPower left, ApparentPower right) + public static bool operator ==(ApparentPower left, ApparentPower right) { return left.Equals(right); } - public static bool operator !=(ApparentPower left, ApparentPower right) + public static bool operator !=(ApparentPower left, ApparentPower right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/Area.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Area.NetFramework.g.cs index 834ca4aa2e..a171a0149c 100644 --- a/UnitsNet/GeneratedCode/Quantities/Area.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Area.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct Area : IQuantity, IEquatable, IComparable, static Area() { BaseDimensions = new BaseDimensions(2, 0, 0, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.Area, Units, Zero); } /// @@ -84,6 +85,9 @@ public Area(double numericValue, AreaUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public Area(double numericValue, AreaUnit unit) /// public AreaUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -576,12 +584,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out AreaUn return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(Area left, Area right) + public static bool operator ==(Area left, Area right) { return left.Equals(right); } - public static bool operator !=(Area left, Area right) + public static bool operator !=(Area left, Area right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/AreaDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaDensity.NetFramework.g.cs index 4d2aa8e3c4..c1ca83d95c 100644 --- a/UnitsNet/GeneratedCode/Quantities/AreaDensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AreaDensity.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct AreaDensity : IQuantity, IEquatable(QuantityType.AreaDensity, Units, Zero); } /// @@ -84,6 +85,9 @@ public AreaDensity(double numericValue, AreaDensityUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public AreaDensity(double numericValue, AreaDensityUnit unit) /// public AreaDensityUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -408,12 +416,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out AreaDe return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(AreaDensity left, AreaDensity right) + public static bool operator ==(AreaDensity left, AreaDensity right) { return left.Equals(right); } - public static bool operator !=(AreaDensity left, AreaDensity right) + public static bool operator !=(AreaDensity left, AreaDensity right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.NetFramework.g.cs index df5403d431..373a807bb2 100644 --- a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct AreaMomentOfInertia : IQuantity, static AreaMomentOfInertia() { BaseDimensions = new BaseDimensions(4, 0, 0, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.AreaMomentOfInertia, Units, Zero); } /// @@ -84,6 +85,9 @@ public AreaMomentOfInertia(double numericValue, AreaMomentOfInertiaUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public AreaMomentOfInertia(double numericValue, AreaMomentOfInertiaUnit unit) /// public AreaMomentOfInertiaUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -478,12 +486,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out AreaMo return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(AreaMomentOfInertia left, AreaMomentOfInertia right) + public static bool operator ==(AreaMomentOfInertia left, AreaMomentOfInertia right) { return left.Equals(right); } - public static bool operator !=(AreaMomentOfInertia left, AreaMomentOfInertia right) + public static bool operator !=(AreaMomentOfInertia left, AreaMomentOfInertia right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/BitRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/BitRate.NetFramework.g.cs index bc9a4ed598..6486825163 100644 --- a/UnitsNet/GeneratedCode/Quantities/BitRate.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/BitRate.NetFramework.g.cs @@ -67,6 +67,7 @@ public partial struct BitRate : IQuantity, IEquatable, ICo static BitRate() { BaseDimensions = BaseDimensions.Dimensionless; + Info = new QuantityInfo(QuantityType.BitRate, Units, Zero); } /// @@ -87,6 +88,9 @@ public BitRate(decimal numericValue, BitRateUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -136,6 +140,10 @@ public BitRate(decimal numericValue, BitRateUnit unit) /// public BitRateUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -761,12 +769,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out BitRat return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(BitRate left, BitRate right) + public static bool operator ==(BitRate left, BitRate right) { return left.Equals(right); } - public static bool operator !=(BitRate left, BitRate right) + public static bool operator !=(BitRate left, BitRate right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.NetFramework.g.cs index 24001bf446..0fc334d934 100644 --- a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct BrakeSpecificFuelConsumption : IQuantity(QuantityType.BrakeSpecificFuelConsumption, Units, Zero); } /// @@ -84,6 +85,9 @@ public BrakeSpecificFuelConsumption(double numericValue, BrakeSpecificFuelConsum #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public BrakeSpecificFuelConsumption(double numericValue, BrakeSpecificFuelConsum /// public BrakeSpecificFuelConsumptionUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -436,12 +444,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out BrakeS return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(BrakeSpecificFuelConsumption left, BrakeSpecificFuelConsumption right) + public static bool operator ==(BrakeSpecificFuelConsumption left, BrakeSpecificFuelConsumption right) { return left.Equals(right); } - public static bool operator !=(BrakeSpecificFuelConsumption left, BrakeSpecificFuelConsumption right) + public static bool operator !=(BrakeSpecificFuelConsumption left, BrakeSpecificFuelConsumption right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/Capacitance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Capacitance.NetFramework.g.cs index 98506bea99..1366a723a4 100644 --- a/UnitsNet/GeneratedCode/Quantities/Capacitance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Capacitance.NetFramework.g.cs @@ -67,6 +67,7 @@ public partial struct Capacitance : IQuantity, IEquatable(QuantityType.Capacitance, Units, Zero); } /// @@ -87,6 +88,9 @@ public Capacitance(double numericValue, CapacitanceUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -136,6 +140,10 @@ public Capacitance(double numericValue, CapacitanceUnit unit) /// public CapacitanceUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -495,12 +503,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Capaci return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(Capacitance left, Capacitance right) + public static bool operator ==(Capacitance left, Capacitance right) { return left.Equals(right); } - public static bool operator !=(Capacitance left, Capacitance right) + public static bool operator !=(Capacitance left, Capacitance right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.NetFramework.g.cs index f0f973ddc0..90544e0db8 100644 --- a/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct CoefficientOfThermalExpansion : IQuantity(QuantityType.CoefficientOfThermalExpansion, Units, Zero); } /// @@ -84,6 +85,9 @@ public CoefficientOfThermalExpansion(double numericValue, CoefficientOfThermalEx #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public CoefficientOfThermalExpansion(double numericValue, CoefficientOfThermalEx /// public CoefficientOfThermalExpansionUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -436,12 +444,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Coeffi return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(CoefficientOfThermalExpansion left, CoefficientOfThermalExpansion right) + public static bool operator ==(CoefficientOfThermalExpansion left, CoefficientOfThermalExpansion right) { return left.Equals(right); } - public static bool operator !=(CoefficientOfThermalExpansion left, CoefficientOfThermalExpansion right) + public static bool operator !=(CoefficientOfThermalExpansion left, CoefficientOfThermalExpansion right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/Density.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Density.NetFramework.g.cs index dee1b4c8da..c8dc7d205d 100644 --- a/UnitsNet/GeneratedCode/Quantities/Density.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Density.NetFramework.g.cs @@ -67,6 +67,7 @@ public partial struct Density : IQuantity, IEquatable, ICo static Density() { BaseDimensions = new BaseDimensions(-3, 1, 0, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.Density, Units, Zero); } /// @@ -87,6 +88,9 @@ public Density(double numericValue, DensityUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -136,6 +140,10 @@ public Density(double numericValue, DensityUnit unit) /// public DensityUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -943,12 +951,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Densit return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(Density left, Density right) + public static bool operator ==(Density left, Density right) { return left.Equals(right); } - public static bool operator !=(Density left, Density right) + public static bool operator !=(Density left, Density right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/Duration.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Duration.NetFramework.g.cs index a492045fa3..0fc02b6591 100644 --- a/UnitsNet/GeneratedCode/Quantities/Duration.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Duration.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct Duration : IQuantity, IEquatable, static Duration() { BaseDimensions = new BaseDimensions(0, 0, 1, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.Duration, Units, Zero); } /// @@ -84,6 +85,9 @@ public Duration(double numericValue, DurationUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public Duration(double numericValue, DurationUnit unit) /// public DurationUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -534,12 +542,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Durati return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(Duration left, Duration right) + public static bool operator ==(Duration left, Duration right) { return left.Equals(right); } - public static bool operator !=(Duration left, Duration right) + public static bool operator !=(Duration left, Duration right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.NetFramework.g.cs index c6f68cbcb4..06bdd7f2bf 100644 --- a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.NetFramework.g.cs @@ -67,6 +67,7 @@ public partial struct DynamicViscosity : IQuantity, IEquat static DynamicViscosity() { BaseDimensions = new BaseDimensions(-1, 1, -1, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.DynamicViscosity, Units, Zero); } /// @@ -87,6 +88,9 @@ public DynamicViscosity(double numericValue, DynamicViscosityUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -136,6 +140,10 @@ public DynamicViscosity(double numericValue, DynamicViscosityUnit unit) /// public DynamicViscosityUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -481,12 +489,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Dynami return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(DynamicViscosity left, DynamicViscosity right) + public static bool operator ==(DynamicViscosity left, DynamicViscosity right) { return left.Equals(right); } - public static bool operator !=(DynamicViscosity left, DynamicViscosity right) + public static bool operator !=(DynamicViscosity left, DynamicViscosity right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.NetFramework.g.cs index 0aa8614684..6b08b94020 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct ElectricAdmittance : IQuantity, IE static ElectricAdmittance() { BaseDimensions = new BaseDimensions(-2, -1, 3, 2, 0, 0, 0); + Info = new QuantityInfo(QuantityType.ElectricAdmittance, Units, Zero); } /// @@ -84,6 +85,9 @@ public ElectricAdmittance(double numericValue, ElectricAdmittanceUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public ElectricAdmittance(double numericValue, ElectricAdmittanceUnit unit) /// public ElectricAdmittanceUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -450,12 +458,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(ElectricAdmittance left, ElectricAdmittance right) + public static bool operator ==(ElectricAdmittance left, ElectricAdmittance right) { return left.Equals(right); } - public static bool operator !=(ElectricAdmittance left, ElectricAdmittance right) + public static bool operator !=(ElectricAdmittance left, ElectricAdmittance right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.NetFramework.g.cs index ad8c89f4e9..994f568cc2 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.NetFramework.g.cs @@ -67,6 +67,7 @@ public partial struct ElectricCharge : IQuantity, IEquatable static ElectricCharge() { BaseDimensions = new BaseDimensions(0, 0, 1, 1, 0, 0, 0); + Info = new QuantityInfo(QuantityType.ElectricCharge, Units, Zero); } /// @@ -87,6 +88,9 @@ public ElectricCharge(double numericValue, ElectricChargeUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -136,6 +140,10 @@ public ElectricCharge(double numericValue, ElectricChargeUnit unit) /// public ElectricChargeUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -411,12 +419,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(ElectricCharge left, ElectricCharge right) + public static bool operator ==(ElectricCharge left, ElectricCharge right) { return left.Equals(right); } - public static bool operator !=(ElectricCharge left, ElectricCharge right) + public static bool operator !=(ElectricCharge left, ElectricCharge right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.NetFramework.g.cs index c7f07b4c82..c81185fcdb 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.NetFramework.g.cs @@ -67,6 +67,7 @@ public partial struct ElectricChargeDensity : IQuantity(QuantityType.ElectricChargeDensity, Units, Zero); } /// @@ -87,6 +88,9 @@ public ElectricChargeDensity(double numericValue, ElectricChargeDensityUnit unit #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -136,6 +140,10 @@ public ElectricChargeDensity(double numericValue, ElectricChargeDensityUnit unit /// public ElectricChargeDensityUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -411,12 +419,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(ElectricChargeDensity left, ElectricChargeDensity right) + public static bool operator ==(ElectricChargeDensity left, ElectricChargeDensity right) { return left.Equals(right); } - public static bool operator !=(ElectricChargeDensity left, ElectricChargeDensity right) + public static bool operator !=(ElectricChargeDensity left, ElectricChargeDensity right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricConductance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricConductance.NetFramework.g.cs index 055e85ca6e..34596fa1b8 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricConductance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductance.NetFramework.g.cs @@ -67,6 +67,7 @@ public partial struct ElectricConductance : IQuantity, static ElectricConductance() { BaseDimensions = new BaseDimensions(-2, -1, 3, 2, 0, 0, 0); + Info = new QuantityInfo(QuantityType.ElectricConductance, Units, Zero); } /// @@ -87,6 +88,9 @@ public ElectricConductance(double numericValue, ElectricConductanceUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -136,6 +140,10 @@ public ElectricConductance(double numericValue, ElectricConductanceUnit unit) /// public ElectricConductanceUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -439,12 +447,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(ElectricConductance left, ElectricConductance right) + public static bool operator ==(ElectricConductance left, ElectricConductance right) { return left.Equals(right); } - public static bool operator !=(ElectricConductance left, ElectricConductance right) + public static bool operator !=(ElectricConductance left, ElectricConductance right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.NetFramework.g.cs index 2bf2645bb3..3bdc8a042d 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.NetFramework.g.cs @@ -67,6 +67,7 @@ public partial struct ElectricConductivity : IQuantity static ElectricConductivity() { BaseDimensions = new BaseDimensions(-3, -1, 3, 2, 0, 0, 0); + Info = new QuantityInfo(QuantityType.ElectricConductivity, Units, Zero); } /// @@ -87,6 +88,9 @@ public ElectricConductivity(double numericValue, ElectricConductivityUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -136,6 +140,10 @@ public ElectricConductivity(double numericValue, ElectricConductivityUnit unit) /// public ElectricConductivityUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -411,12 +419,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(ElectricConductivity left, ElectricConductivity right) + public static bool operator ==(ElectricConductivity left, ElectricConductivity right) { return left.Equals(right); } - public static bool operator !=(ElectricConductivity left, ElectricConductivity right) + public static bool operator !=(ElectricConductivity left, ElectricConductivity right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.NetFramework.g.cs index 297cf7cb67..7de7c6bdba 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct ElectricCurrent : IQuantity, IEquatab static ElectricCurrent() { BaseDimensions = new BaseDimensions(0, 0, 0, 1, 0, 0, 0); + Info = new QuantityInfo(QuantityType.ElectricCurrent, Units, Zero); } /// @@ -84,6 +85,9 @@ public ElectricCurrent(double numericValue, ElectricCurrentUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public ElectricCurrent(double numericValue, ElectricCurrentUnit unit) /// public ElectricCurrentUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -506,12 +514,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(ElectricCurrent left, ElectricCurrent right) + public static bool operator ==(ElectricCurrent left, ElectricCurrent right) { return left.Equals(right); } - public static bool operator !=(ElectricCurrent left, ElectricCurrent right) + public static bool operator !=(ElectricCurrent left, ElectricCurrent right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.NetFramework.g.cs index 454421c96a..461a2ab18b 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.NetFramework.g.cs @@ -67,6 +67,7 @@ public partial struct ElectricCurrentDensity : IQuantity(QuantityType.ElectricCurrentDensity, Units, Zero); } /// @@ -87,6 +88,9 @@ public ElectricCurrentDensity(double numericValue, ElectricCurrentDensityUnit un #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -136,6 +140,10 @@ public ElectricCurrentDensity(double numericValue, ElectricCurrentDensityUnit un /// public ElectricCurrentDensityUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -411,12 +419,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(ElectricCurrentDensity left, ElectricCurrentDensity right) + public static bool operator ==(ElectricCurrentDensity left, ElectricCurrentDensity right) { return left.Equals(right); } - public static bool operator !=(ElectricCurrentDensity left, ElectricCurrentDensity right) + public static bool operator !=(ElectricCurrentDensity left, ElectricCurrentDensity right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.NetFramework.g.cs index 45c50ff74e..f20b37acb4 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct ElectricCurrentGradient : IQuantity(QuantityType.ElectricCurrentGradient, Units, Zero); } /// @@ -84,6 +85,9 @@ public ElectricCurrentGradient(double numericValue, ElectricCurrentGradientUnit #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public ElectricCurrentGradient(double numericValue, ElectricCurrentGradientUnit /// public ElectricCurrentGradientUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -408,12 +416,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(ElectricCurrentGradient left, ElectricCurrentGradient right) + public static bool operator ==(ElectricCurrentGradient left, ElectricCurrentGradient right) { return left.Equals(right); } - public static bool operator !=(ElectricCurrentGradient left, ElectricCurrentGradient right) + public static bool operator !=(ElectricCurrentGradient left, ElectricCurrentGradient right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricField.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricField.NetFramework.g.cs index 92ad660991..2d41495251 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricField.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricField.NetFramework.g.cs @@ -67,6 +67,7 @@ public partial struct ElectricField : IQuantity, IEquatable(QuantityType.ElectricField, Units, Zero); } /// @@ -87,6 +88,9 @@ public ElectricField(double numericValue, ElectricFieldUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -136,6 +140,10 @@ public ElectricField(double numericValue, ElectricFieldUnit unit) /// public ElectricFieldUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -411,12 +419,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(ElectricField left, ElectricField right) + public static bool operator ==(ElectricField left, ElectricField right) { return left.Equals(right); } - public static bool operator !=(ElectricField left, ElectricField right) + public static bool operator !=(ElectricField left, ElectricField right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricInductance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricInductance.NetFramework.g.cs index b8122cd354..42e92a5317 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricInductance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricInductance.NetFramework.g.cs @@ -67,6 +67,7 @@ public partial struct ElectricInductance : IQuantity, IE static ElectricInductance() { BaseDimensions = new BaseDimensions(2, 1, -2, -2, 0, 0, 0); + Info = new QuantityInfo(QuantityType.ElectricInductance, Units, Zero); } /// @@ -87,6 +88,9 @@ public ElectricInductance(double numericValue, ElectricInductanceUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -136,6 +140,10 @@ public ElectricInductance(double numericValue, ElectricInductanceUnit unit) /// public ElectricInductanceUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -453,12 +461,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(ElectricInductance left, ElectricInductance right) + public static bool operator ==(ElectricInductance left, ElectricInductance right) { return left.Equals(right); } - public static bool operator !=(ElectricInductance left, ElectricInductance right) + public static bool operator !=(ElectricInductance left, ElectricInductance right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.NetFramework.g.cs index 94bb36db61..56949211e9 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct ElectricPotential : IQuantity, IEqu static ElectricPotential() { BaseDimensions = new BaseDimensions(2, 1, -3, -1, 0, 0, 0); + Info = new QuantityInfo(QuantityType.ElectricPotential, Units, Zero); } /// @@ -84,6 +85,9 @@ public ElectricPotential(double numericValue, ElectricPotentialUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public ElectricPotential(double numericValue, ElectricPotentialUnit unit) /// public ElectricPotentialUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -464,12 +472,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(ElectricPotential left, ElectricPotential right) + public static bool operator ==(ElectricPotential left, ElectricPotential right) { return left.Equals(right); } - public static bool operator !=(ElectricPotential left, ElectricPotential right) + public static bool operator !=(ElectricPotential left, ElectricPotential right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.NetFramework.g.cs index decd51b7f0..c20421cc9d 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct ElectricPotentialAc : IQuantity, static ElectricPotentialAc() { BaseDimensions = BaseDimensions.Dimensionless; + Info = new QuantityInfo(QuantityType.ElectricPotentialAc, Units, Zero); } /// @@ -84,6 +85,9 @@ public ElectricPotentialAc(double numericValue, ElectricPotentialAcUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public ElectricPotentialAc(double numericValue, ElectricPotentialAcUnit unit) /// public ElectricPotentialAcUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -464,12 +472,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(ElectricPotentialAc left, ElectricPotentialAc right) + public static bool operator ==(ElectricPotentialAc left, ElectricPotentialAc right) { return left.Equals(right); } - public static bool operator !=(ElectricPotentialAc left, ElectricPotentialAc right) + public static bool operator !=(ElectricPotentialAc left, ElectricPotentialAc right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.NetFramework.g.cs index 8e52d3a11f..15e026929e 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct ElectricPotentialDc : IQuantity, static ElectricPotentialDc() { BaseDimensions = BaseDimensions.Dimensionless; + Info = new QuantityInfo(QuantityType.ElectricPotentialDc, Units, Zero); } /// @@ -84,6 +85,9 @@ public ElectricPotentialDc(double numericValue, ElectricPotentialDcUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public ElectricPotentialDc(double numericValue, ElectricPotentialDcUnit unit) /// public ElectricPotentialDcUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -464,12 +472,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(ElectricPotentialDc left, ElectricPotentialDc right) + public static bool operator ==(ElectricPotentialDc left, ElectricPotentialDc right) { return left.Equals(right); } - public static bool operator !=(ElectricPotentialDc left, ElectricPotentialDc right) + public static bool operator !=(ElectricPotentialDc left, ElectricPotentialDc right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.NetFramework.g.cs index 62a484bcd7..ae97e8a3dd 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct ElectricResistance : IQuantity, IE static ElectricResistance() { BaseDimensions = new BaseDimensions(2, 1, -3, -2, 0, 0, 0); + Info = new QuantityInfo(QuantityType.ElectricResistance, Units, Zero); } /// @@ -84,6 +85,9 @@ public ElectricResistance(double numericValue, ElectricResistanceUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public ElectricResistance(double numericValue, ElectricResistanceUnit unit) /// public ElectricResistanceUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -464,12 +472,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(ElectricResistance left, ElectricResistance right) + public static bool operator ==(ElectricResistance left, ElectricResistance right) { return left.Equals(right); } - public static bool operator !=(ElectricResistance left, ElectricResistance right) + public static bool operator !=(ElectricResistance left, ElectricResistance right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.NetFramework.g.cs index beacbd46fd..456660aeda 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.NetFramework.g.cs @@ -67,6 +67,7 @@ public partial struct ElectricResistivity : IQuantity, static ElectricResistivity() { BaseDimensions = new BaseDimensions(3, 1, -3, -2, 0, 0, 0); + Info = new QuantityInfo(QuantityType.ElectricResistivity, Units, Zero); } /// @@ -87,6 +88,9 @@ public ElectricResistivity(double numericValue, ElectricResistivityUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -136,6 +140,10 @@ public ElectricResistivity(double numericValue, ElectricResistivityUnit unit) /// public ElectricResistivityUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -593,12 +601,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(ElectricResistivity left, ElectricResistivity right) + public static bool operator ==(ElectricResistivity left, ElectricResistivity right) { return left.Equals(right); } - public static bool operator !=(ElectricResistivity left, ElectricResistivity right) + public static bool operator !=(ElectricResistivity left, ElectricResistivity right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/Energy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Energy.NetFramework.g.cs index 70dd0022b9..8e7d73c933 100644 --- a/UnitsNet/GeneratedCode/Quantities/Energy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Energy.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct Energy : IQuantity, IEquatable, ICompa static Energy() { BaseDimensions = new BaseDimensions(2, 1, -2, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.Energy, Units, Zero); } /// @@ -84,6 +85,9 @@ public Energy(double numericValue, EnergyUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public Energy(double numericValue, EnergyUnit unit) /// public EnergyUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -702,12 +710,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Energy return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(Energy left, Energy right) + public static bool operator ==(Energy left, Energy right) { return left.Equals(right); } - public static bool operator !=(Energy left, Energy right) + public static bool operator !=(Energy left, Energy right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/Entropy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Entropy.NetFramework.g.cs index d70b0e10ea..f9aed0426d 100644 --- a/UnitsNet/GeneratedCode/Quantities/Entropy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Entropy.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct Entropy : IQuantity, IEquatable, ICo static Entropy() { BaseDimensions = new BaseDimensions(2, 1, -2, 0, -1, 0, 0); + Info = new QuantityInfo(QuantityType.Entropy, Units, Zero); } /// @@ -84,6 +85,9 @@ public Entropy(double numericValue, EntropyUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public Entropy(double numericValue, EntropyUnit unit) /// public EntropyUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -492,12 +500,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Entrop return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(Entropy left, Entropy right) + public static bool operator ==(Entropy left, Entropy right) { return left.Equals(right); } - public static bool operator !=(Entropy left, Entropy right) + public static bool operator !=(Entropy left, Entropy right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/Force.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Force.NetFramework.g.cs index be24f8f69e..3c6bcfbb90 100644 --- a/UnitsNet/GeneratedCode/Quantities/Force.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Force.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct Force : IQuantity, IEquatable, IComparab static Force() { BaseDimensions = new BaseDimensions(1, 1, -2, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.Force, Units, Zero); } /// @@ -84,6 +85,9 @@ public Force(double numericValue, ForceUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public Force(double numericValue, ForceUnit unit) /// public ForceUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -576,12 +584,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out ForceU return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(Force left, Force right) + public static bool operator ==(Force left, Force right) { return left.Equals(right); } - public static bool operator !=(Force left, Force right) + public static bool operator !=(Force left, Force right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.NetFramework.g.cs index 0d6065acc8..6a0d757883 100644 --- a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct ForceChangeRate : IQuantity, IEquatab static ForceChangeRate() { BaseDimensions = new BaseDimensions(1, 1, -3, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.ForceChangeRate, Units, Zero); } /// @@ -84,6 +85,9 @@ public ForceChangeRate(double numericValue, ForceChangeRateUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public ForceChangeRate(double numericValue, ForceChangeRateUnit unit) /// public ForceChangeRateUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -548,12 +556,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out ForceC return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(ForceChangeRate left, ForceChangeRate right) + public static bool operator ==(ForceChangeRate left, ForceChangeRate right) { return left.Equals(right); } - public static bool operator !=(ForceChangeRate left, ForceChangeRate right) + public static bool operator !=(ForceChangeRate left, ForceChangeRate right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.NetFramework.g.cs index 1cf9184c55..7616174030 100644 --- a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct ForcePerLength : IQuantity, IEquatable static ForcePerLength() { BaseDimensions = new BaseDimensions(0, 1, -2, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.ForcePerLength, Units, Zero); } /// @@ -84,6 +85,9 @@ public ForcePerLength(double numericValue, ForcePerLengthUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public ForcePerLength(double numericValue, ForcePerLengthUnit unit) /// public ForcePerLengthUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -520,12 +528,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out ForceP return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(ForcePerLength left, ForcePerLength right) + public static bool operator ==(ForcePerLength left, ForcePerLength right) { return left.Equals(right); } - public static bool operator !=(ForcePerLength left, ForcePerLength right) + public static bool operator !=(ForcePerLength left, ForcePerLength right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/Frequency.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Frequency.NetFramework.g.cs index b3a24c9827..82d913bb77 100644 --- a/UnitsNet/GeneratedCode/Quantities/Frequency.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Frequency.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct Frequency : IQuantity, IEquatable(QuantityType.Frequency, Units, Zero); } /// @@ -84,6 +85,9 @@ public Frequency(double numericValue, FrequencyUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public Frequency(double numericValue, FrequencyUnit unit) /// public FrequencyUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -506,12 +514,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Freque return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(Frequency left, Frequency right) + public static bool operator ==(Frequency left, Frequency right) { return left.Equals(right); } - public static bool operator !=(Frequency left, Frequency right) + public static bool operator !=(Frequency left, Frequency right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/HeatFlux.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatFlux.NetFramework.g.cs index 81a2941027..69c3e3e8f2 100644 --- a/UnitsNet/GeneratedCode/Quantities/HeatFlux.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/HeatFlux.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct HeatFlux : IQuantity, IEquatable, static HeatFlux() { BaseDimensions = new BaseDimensions(0, 1, -3, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.HeatFlux, Units, Zero); } /// @@ -84,6 +85,9 @@ public HeatFlux(double numericValue, HeatFluxUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public HeatFlux(double numericValue, HeatFluxUnit unit) /// public HeatFluxUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -646,12 +654,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out HeatFl return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(HeatFlux left, HeatFlux right) + public static bool operator ==(HeatFlux left, HeatFlux right) { return left.Equals(right); } - public static bool operator !=(HeatFlux left, HeatFlux right) + public static bool operator !=(HeatFlux left, HeatFlux right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.NetFramework.g.cs index c355fb90d4..39b16d476b 100644 --- a/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct HeatTransferCoefficient : IQuantity(QuantityType.HeatTransferCoefficient, Units, Zero); } /// @@ -84,6 +85,9 @@ public HeatTransferCoefficient(double numericValue, HeatTransferCoefficientUnit #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public HeatTransferCoefficient(double numericValue, HeatTransferCoefficientUnit /// public HeatTransferCoefficientUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -422,12 +430,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out HeatTr return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(HeatTransferCoefficient left, HeatTransferCoefficient right) + public static bool operator ==(HeatTransferCoefficient left, HeatTransferCoefficient right) { return left.Equals(right); } - public static bool operator !=(HeatTransferCoefficient left, HeatTransferCoefficient right) + public static bool operator !=(HeatTransferCoefficient left, HeatTransferCoefficient right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/Illuminance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Illuminance.NetFramework.g.cs index c5da84031f..fef7fdda00 100644 --- a/UnitsNet/GeneratedCode/Quantities/Illuminance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Illuminance.NetFramework.g.cs @@ -67,6 +67,7 @@ public partial struct Illuminance : IQuantity, IEquatable(QuantityType.Illuminance, Units, Zero); } /// @@ -87,6 +88,9 @@ public Illuminance(double numericValue, IlluminanceUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -136,6 +140,10 @@ public Illuminance(double numericValue, IlluminanceUnit unit) /// public IlluminanceUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -453,12 +461,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Illumi return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(Illuminance left, Illuminance right) + public static bool operator ==(Illuminance left, Illuminance right) { return left.Equals(right); } - public static bool operator !=(Illuminance left, Illuminance right) + public static bool operator !=(Illuminance left, Illuminance right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/Information.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Information.NetFramework.g.cs index d713e80770..eba6f6bd9d 100644 --- a/UnitsNet/GeneratedCode/Quantities/Information.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Information.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct Information : IQuantity, IEquatable(QuantityType.Information, Units, Zero); } /// @@ -84,6 +85,9 @@ public Information(decimal numericValue, InformationUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public Information(decimal numericValue, InformationUnit unit) /// public InformationUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -758,12 +766,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Inform return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(Information left, Information right) + public static bool operator ==(Information left, Information right) { return left.Equals(right); } - public static bool operator !=(Information left, Information right) + public static bool operator !=(Information left, Information right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/Irradiance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Irradiance.NetFramework.g.cs index 0b844c8377..9f26cc348c 100644 --- a/UnitsNet/GeneratedCode/Quantities/Irradiance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Irradiance.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct Irradiance : IQuantity, IEquatable(QuantityType.Irradiance, Units, Zero); } /// @@ -84,6 +85,9 @@ public Irradiance(double numericValue, IrradianceUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public Irradiance(double numericValue, IrradianceUnit unit) /// public IrradianceUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -590,12 +598,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Irradi return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(Irradiance left, Irradiance right) + public static bool operator ==(Irradiance left, Irradiance right) { return left.Equals(right); } - public static bool operator !=(Irradiance left, Irradiance right) + public static bool operator !=(Irradiance left, Irradiance right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/Irradiation.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Irradiation.NetFramework.g.cs index 6a1b662c8d..c9e56ed994 100644 --- a/UnitsNet/GeneratedCode/Quantities/Irradiation.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Irradiation.NetFramework.g.cs @@ -67,6 +67,7 @@ public partial struct Irradiation : IQuantity, IEquatable(QuantityType.Irradiation, Units, Zero); } /// @@ -87,6 +88,9 @@ public Irradiation(double numericValue, IrradiationUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -136,6 +140,10 @@ public Irradiation(double numericValue, IrradiationUnit unit) /// public IrradiationUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -453,12 +461,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Irradi return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(Irradiation left, Irradiation right) + public static bool operator ==(Irradiation left, Irradiation right) { return left.Equals(right); } - public static bool operator !=(Irradiation left, Irradiation right) + public static bool operator !=(Irradiation left, Irradiation right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.NetFramework.g.cs index 7f291dac8a..985fdfc913 100644 --- a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.NetFramework.g.cs @@ -67,6 +67,7 @@ public partial struct KinematicViscosity : IQuantity, IE static KinematicViscosity() { BaseDimensions = new BaseDimensions(2, 0, -1, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.KinematicViscosity, Units, Zero); } /// @@ -87,6 +88,9 @@ public KinematicViscosity(double numericValue, KinematicViscosityUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -136,6 +140,10 @@ public KinematicViscosity(double numericValue, KinematicViscosityUnit unit) /// public KinematicViscosityUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -509,12 +517,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Kinema return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(KinematicViscosity left, KinematicViscosity right) + public static bool operator ==(KinematicViscosity left, KinematicViscosity right) { return left.Equals(right); } - public static bool operator !=(KinematicViscosity left, KinematicViscosity right) + public static bool operator !=(KinematicViscosity left, KinematicViscosity right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/LapseRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/LapseRate.NetFramework.g.cs index be4066d7f3..045f479bb4 100644 --- a/UnitsNet/GeneratedCode/Quantities/LapseRate.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LapseRate.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct LapseRate : IQuantity, IEquatable(QuantityType.LapseRate, Units, Zero); } /// @@ -84,6 +85,9 @@ public LapseRate(double numericValue, LapseRateUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public LapseRate(double numericValue, LapseRateUnit unit) /// public LapseRateUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -408,12 +416,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out LapseR return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(LapseRate left, LapseRate right) + public static bool operator ==(LapseRate left, LapseRate right) { return left.Equals(right); } - public static bool operator !=(LapseRate left, LapseRate right) + public static bool operator !=(LapseRate left, LapseRate right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/Length.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Length.NetFramework.g.cs index e03e322247..0be2315383 100644 --- a/UnitsNet/GeneratedCode/Quantities/Length.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Length.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct Length : IQuantity, IEquatable, ICompa static Length() { BaseDimensions = new BaseDimensions(1, 0, 0, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.Length, Units, Zero); } /// @@ -84,6 +85,9 @@ public Length(double numericValue, LengthUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public Length(double numericValue, LengthUnit unit) /// public LengthUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -702,12 +710,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Length return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(Length left, Length right) + public static bool operator ==(Length left, Length right) { return left.Equals(right); } - public static bool operator !=(Length left, Length right) + public static bool operator !=(Length left, Length right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/Level.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Level.NetFramework.g.cs index e35db5d5c1..550eda90a8 100644 --- a/UnitsNet/GeneratedCode/Quantities/Level.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Level.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct Level : IQuantity, IEquatable, IComparab static Level() { BaseDimensions = BaseDimensions.Dimensionless; + Info = new QuantityInfo(QuantityType.Level, Units, Zero); } /// @@ -84,6 +85,9 @@ public Level(double numericValue, LevelUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public Level(double numericValue, LevelUnit unit) /// public LevelUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -430,12 +438,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out LevelU return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(Level left, Level right) + public static bool operator ==(Level left, Level right) { return left.Equals(right); } - public static bool operator !=(Level left, Level right) + public static bool operator !=(Level left, Level right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/LinearDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/LinearDensity.NetFramework.g.cs index cbf5870f3b..9b9292eda5 100644 --- a/UnitsNet/GeneratedCode/Quantities/LinearDensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LinearDensity.NetFramework.g.cs @@ -67,6 +67,7 @@ public partial struct LinearDensity : IQuantity, IEquatable(QuantityType.LinearDensity, Units, Zero); } /// @@ -87,6 +88,9 @@ public LinearDensity(double numericValue, LinearDensityUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -136,6 +140,10 @@ public LinearDensity(double numericValue, LinearDensityUnit unit) /// public LinearDensityUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -439,12 +447,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Linear return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(LinearDensity left, LinearDensity right) + public static bool operator ==(LinearDensity left, LinearDensity right) { return left.Equals(right); } - public static bool operator !=(LinearDensity left, LinearDensity right) + public static bool operator !=(LinearDensity left, LinearDensity right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/LuminousFlux.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/LuminousFlux.NetFramework.g.cs index a7ee796bb5..916270ae24 100644 --- a/UnitsNet/GeneratedCode/Quantities/LuminousFlux.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LuminousFlux.NetFramework.g.cs @@ -67,6 +67,7 @@ public partial struct LuminousFlux : IQuantity, IEquatable(QuantityType.LuminousFlux, Units, Zero); } /// @@ -87,6 +88,9 @@ public LuminousFlux(double numericValue, LuminousFluxUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -136,6 +140,10 @@ public LuminousFlux(double numericValue, LuminousFluxUnit unit) /// public LuminousFluxUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -411,12 +419,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Lumino return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(LuminousFlux left, LuminousFlux right) + public static bool operator ==(LuminousFlux left, LuminousFlux right) { return left.Equals(right); } - public static bool operator !=(LuminousFlux left, LuminousFlux right) + public static bool operator !=(LuminousFlux left, LuminousFlux right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.NetFramework.g.cs index ebfd3b327e..71bdae13a5 100644 --- a/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.NetFramework.g.cs @@ -67,6 +67,7 @@ public partial struct LuminousIntensity : IQuantity, IEqu static LuminousIntensity() { BaseDimensions = new BaseDimensions(0, 0, 0, 0, 0, 0, 1); + Info = new QuantityInfo(QuantityType.LuminousIntensity, Units, Zero); } /// @@ -87,6 +88,9 @@ public LuminousIntensity(double numericValue, LuminousIntensityUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -136,6 +140,10 @@ public LuminousIntensity(double numericValue, LuminousIntensityUnit unit) /// public LuminousIntensityUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -411,12 +419,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Lumino return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(LuminousIntensity left, LuminousIntensity right) + public static bool operator ==(LuminousIntensity left, LuminousIntensity right) { return left.Equals(right); } - public static bool operator !=(LuminousIntensity left, LuminousIntensity right) + public static bool operator !=(LuminousIntensity left, LuminousIntensity right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/MagneticField.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MagneticField.NetFramework.g.cs index 3e218c9500..96f7f6aa43 100644 --- a/UnitsNet/GeneratedCode/Quantities/MagneticField.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MagneticField.NetFramework.g.cs @@ -67,6 +67,7 @@ public partial struct MagneticField : IQuantity, IEquatable(QuantityType.MagneticField, Units, Zero); } /// @@ -87,6 +88,9 @@ public MagneticField(double numericValue, MagneticFieldUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -136,6 +140,10 @@ public MagneticField(double numericValue, MagneticFieldUnit unit) /// public MagneticFieldUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -453,12 +461,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Magnet return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(MagneticField left, MagneticField right) + public static bool operator ==(MagneticField left, MagneticField right) { return left.Equals(right); } - public static bool operator !=(MagneticField left, MagneticField right) + public static bool operator !=(MagneticField left, MagneticField right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/MagneticFlux.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MagneticFlux.NetFramework.g.cs index 6758122032..1910f514d5 100644 --- a/UnitsNet/GeneratedCode/Quantities/MagneticFlux.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MagneticFlux.NetFramework.g.cs @@ -67,6 +67,7 @@ public partial struct MagneticFlux : IQuantity, IEquatable(QuantityType.MagneticFlux, Units, Zero); } /// @@ -87,6 +88,9 @@ public MagneticFlux(double numericValue, MagneticFluxUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -136,6 +140,10 @@ public MagneticFlux(double numericValue, MagneticFluxUnit unit) /// public MagneticFluxUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -411,12 +419,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Magnet return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(MagneticFlux left, MagneticFlux right) + public static bool operator ==(MagneticFlux left, MagneticFlux right) { return left.Equals(right); } - public static bool operator !=(MagneticFlux left, MagneticFlux right) + public static bool operator !=(MagneticFlux left, MagneticFlux right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/Magnetization.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Magnetization.NetFramework.g.cs index fb03bce307..4a6cee1baf 100644 --- a/UnitsNet/GeneratedCode/Quantities/Magnetization.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Magnetization.NetFramework.g.cs @@ -67,6 +67,7 @@ public partial struct Magnetization : IQuantity, IEquatable(QuantityType.Magnetization, Units, Zero); } /// @@ -87,6 +88,9 @@ public Magnetization(double numericValue, MagnetizationUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -136,6 +140,10 @@ public Magnetization(double numericValue, MagnetizationUnit unit) /// public MagnetizationUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -411,12 +419,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Magnet return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(Magnetization left, Magnetization right) + public static bool operator ==(Magnetization left, Magnetization right) { return left.Equals(right); } - public static bool operator !=(Magnetization left, Magnetization right) + public static bool operator !=(Magnetization left, Magnetization right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/Mass.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Mass.NetFramework.g.cs index eae1d5a933..aea5f278d4 100644 --- a/UnitsNet/GeneratedCode/Quantities/Mass.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Mass.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct Mass : IQuantity, IEquatable, IComparable, static Mass() { BaseDimensions = new BaseDimensions(0, 1, 0, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.Mass, Units, Zero); } /// @@ -84,6 +85,9 @@ public Mass(double numericValue, MassUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public Mass(double numericValue, MassUnit unit) /// public MassUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -716,12 +724,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out MassUn return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(Mass left, Mass right) + public static bool operator ==(Mass left, Mass right) { return left.Equals(right); } - public static bool operator !=(Mass left, Mass right) + public static bool operator !=(Mass left, Mass right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/MassFlow.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFlow.NetFramework.g.cs index 9f38386230..b254a0ba9d 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFlow.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFlow.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct MassFlow : IQuantity, IEquatable, static MassFlow() { BaseDimensions = new BaseDimensions(0, 1, -1, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.MassFlow, Units, Zero); } /// @@ -84,6 +85,9 @@ public MassFlow(double numericValue, MassFlowUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public MassFlow(double numericValue, MassFlowUnit unit) /// public MassFlowUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -814,12 +822,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out MassFl return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(MassFlow left, MassFlow right) + public static bool operator ==(MassFlow left, MassFlow right) { return left.Equals(right); } - public static bool operator !=(MassFlow left, MassFlow right) + public static bool operator !=(MassFlow left, MassFlow right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/MassFlux.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFlux.NetFramework.g.cs index 6e77cad9f0..deb8539de7 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFlux.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFlux.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct MassFlux : IQuantity, IEquatable, static MassFlux() { BaseDimensions = new BaseDimensions(-2, 1, -1, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.MassFlux, Units, Zero); } /// @@ -84,6 +85,9 @@ public MassFlux(double numericValue, MassFluxUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public MassFlux(double numericValue, MassFluxUnit unit) /// public MassFluxUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -422,12 +430,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out MassFl return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(MassFlux left, MassFlux right) + public static bool operator ==(MassFlux left, MassFlux right) { return left.Equals(right); } - public static bool operator !=(MassFlux left, MassFlux right) + public static bool operator !=(MassFlux left, MassFlux right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.NetFramework.g.cs index 8a99f8e914..0ae36a706f 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct MassMomentOfInertia : IQuantity, static MassMomentOfInertia() { BaseDimensions = new BaseDimensions(2, 1, 0, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.MassMomentOfInertia, Units, Zero); } /// @@ -84,6 +85,9 @@ public MassMomentOfInertia(double numericValue, MassMomentOfInertiaUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public MassMomentOfInertia(double numericValue, MassMomentOfInertiaUnit unit) /// public MassMomentOfInertiaUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -786,12 +794,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out MassMo return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(MassMomentOfInertia left, MassMomentOfInertia right) + public static bool operator ==(MassMomentOfInertia left, MassMomentOfInertia right) { return left.Equals(right); } - public static bool operator !=(MassMomentOfInertia left, MassMomentOfInertia right) + public static bool operator !=(MassMomentOfInertia left, MassMomentOfInertia right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/MolarEnergy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarEnergy.NetFramework.g.cs index a1e0c9befd..765147d2ff 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarEnergy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarEnergy.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct MolarEnergy : IQuantity, IEquatable(QuantityType.MolarEnergy, Units, Zero); } /// @@ -84,6 +85,9 @@ public MolarEnergy(double numericValue, MolarEnergyUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public MolarEnergy(double numericValue, MolarEnergyUnit unit) /// public MolarEnergyUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -436,12 +444,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out MolarE return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(MolarEnergy left, MolarEnergy right) + public static bool operator ==(MolarEnergy left, MolarEnergy right) { return left.Equals(right); } - public static bool operator !=(MolarEnergy left, MolarEnergy right) + public static bool operator !=(MolarEnergy left, MolarEnergy right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/MolarEntropy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarEntropy.NetFramework.g.cs index 807f2ef8b4..ccc8020ae4 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarEntropy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarEntropy.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct MolarEntropy : IQuantity, IEquatable(QuantityType.MolarEntropy, Units, Zero); } /// @@ -84,6 +85,9 @@ public MolarEntropy(double numericValue, MolarEntropyUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public MolarEntropy(double numericValue, MolarEntropyUnit unit) /// public MolarEntropyUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -436,12 +444,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out MolarE return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(MolarEntropy left, MolarEntropy right) + public static bool operator ==(MolarEntropy left, MolarEntropy right) { return left.Equals(right); } - public static bool operator !=(MolarEntropy left, MolarEntropy right) + public static bool operator !=(MolarEntropy left, MolarEntropy right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/MolarMass.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarMass.NetFramework.g.cs index a9ac972482..b91c7fc4bb 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarMass.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarMass.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct MolarMass : IQuantity, IEquatable(QuantityType.MolarMass, Units, Zero); } /// @@ -84,6 +85,9 @@ public MolarMass(double numericValue, MolarMassUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public MolarMass(double numericValue, MolarMassUnit unit) /// public MolarMassUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -562,12 +570,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out MolarM return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(MolarMass left, MolarMass right) + public static bool operator ==(MolarMass left, MolarMass right) { return left.Equals(right); } - public static bool operator !=(MolarMass left, MolarMass right) + public static bool operator !=(MolarMass left, MolarMass right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/Molarity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Molarity.NetFramework.g.cs index c3bb500b58..82a0463350 100644 --- a/UnitsNet/GeneratedCode/Quantities/Molarity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Molarity.NetFramework.g.cs @@ -67,6 +67,7 @@ public partial struct Molarity : IQuantity, IEquatable, static Molarity() { BaseDimensions = new BaseDimensions(-3, 0, 0, 0, 0, 1, 0); + Info = new QuantityInfo(QuantityType.Molarity, Units, Zero); } /// @@ -87,6 +88,9 @@ public Molarity(double numericValue, MolarityUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -136,6 +140,10 @@ public Molarity(double numericValue, MolarityUnit unit) /// public MolarityUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -509,12 +517,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Molari return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(Molarity left, Molarity right) + public static bool operator ==(Molarity left, Molarity right) { return left.Equals(right); } - public static bool operator !=(Molarity left, Molarity right) + public static bool operator !=(Molarity left, Molarity right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/Permeability.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Permeability.NetFramework.g.cs index c837854442..bc503ac510 100644 --- a/UnitsNet/GeneratedCode/Quantities/Permeability.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Permeability.NetFramework.g.cs @@ -67,6 +67,7 @@ public partial struct Permeability : IQuantity, IEquatable(QuantityType.Permeability, Units, Zero); } /// @@ -87,6 +88,9 @@ public Permeability(double numericValue, PermeabilityUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -136,6 +140,10 @@ public Permeability(double numericValue, PermeabilityUnit unit) /// public PermeabilityUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -411,12 +419,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Permea return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(Permeability left, Permeability right) + public static bool operator ==(Permeability left, Permeability right) { return left.Equals(right); } - public static bool operator !=(Permeability left, Permeability right) + public static bool operator !=(Permeability left, Permeability right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/Permittivity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Permittivity.NetFramework.g.cs index 0135c92d4c..10d765c1e0 100644 --- a/UnitsNet/GeneratedCode/Quantities/Permittivity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Permittivity.NetFramework.g.cs @@ -67,6 +67,7 @@ public partial struct Permittivity : IQuantity, IEquatable(QuantityType.Permittivity, Units, Zero); } /// @@ -87,6 +88,9 @@ public Permittivity(double numericValue, PermittivityUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -136,6 +140,10 @@ public Permittivity(double numericValue, PermittivityUnit unit) /// public PermittivityUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -411,12 +419,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Permit return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(Permittivity left, Permittivity right) + public static bool operator ==(Permittivity left, Permittivity right) { return left.Equals(right); } - public static bool operator !=(Permittivity left, Permittivity right) + public static bool operator !=(Permittivity left, Permittivity right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/Power.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Power.NetFramework.g.cs index 5af1aba2d9..59b3aa3f9f 100644 --- a/UnitsNet/GeneratedCode/Quantities/Power.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Power.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct Power : IQuantity, IEquatable, IComparab static Power() { BaseDimensions = new BaseDimensions(2, 1, -3, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.Power, Units, Zero); } /// @@ -84,6 +85,9 @@ public Power(decimal numericValue, PowerUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public Power(decimal numericValue, PowerUnit unit) /// public PowerUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -674,12 +682,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out PowerU return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(Power left, Power right) + public static bool operator ==(Power left, Power right) { return left.Equals(right); } - public static bool operator !=(Power left, Power right) + public static bool operator !=(Power left, Power right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/PowerDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/PowerDensity.NetFramework.g.cs index 0561b93c66..544dd90e84 100644 --- a/UnitsNet/GeneratedCode/Quantities/PowerDensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PowerDensity.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct PowerDensity : IQuantity, IEquatable(QuantityType.PowerDensity, Units, Zero); } /// @@ -84,6 +85,9 @@ public PowerDensity(double numericValue, PowerDensityUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public PowerDensity(double numericValue, PowerDensityUnit unit) /// public PowerDensityUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -1010,12 +1018,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out PowerD return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(PowerDensity left, PowerDensity right) + public static bool operator ==(PowerDensity left, PowerDensity right) { return left.Equals(right); } - public static bool operator !=(PowerDensity left, PowerDensity right) + public static bool operator !=(PowerDensity left, PowerDensity right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/PowerRatio.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/PowerRatio.NetFramework.g.cs index 3173544500..5d01e31312 100644 --- a/UnitsNet/GeneratedCode/Quantities/PowerRatio.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PowerRatio.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct PowerRatio : IQuantity, IEquatable(QuantityType.PowerRatio, Units, Zero); } /// @@ -84,6 +85,9 @@ public PowerRatio(double numericValue, PowerRatioUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public PowerRatio(double numericValue, PowerRatioUnit unit) /// public PowerRatioUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -430,12 +438,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out PowerR return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(PowerRatio left, PowerRatio right) + public static bool operator ==(PowerRatio left, PowerRatio right) { return left.Equals(right); } - public static bool operator !=(PowerRatio left, PowerRatio right) + public static bool operator !=(PowerRatio left, PowerRatio right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/Pressure.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Pressure.NetFramework.g.cs index 6f3c83bb1b..f9a2354814 100644 --- a/UnitsNet/GeneratedCode/Quantities/Pressure.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Pressure.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct Pressure : IQuantity, IEquatable, static Pressure() { BaseDimensions = new BaseDimensions(-1, 1, -2, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.Pressure, Units, Zero); } /// @@ -84,6 +85,9 @@ public Pressure(double numericValue, PressureUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public Pressure(double numericValue, PressureUnit unit) /// public PressureUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -982,12 +990,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Pressu return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(Pressure left, Pressure right) + public static bool operator ==(Pressure left, Pressure right) { return left.Equals(right); } - public static bool operator !=(Pressure left, Pressure right) + public static bool operator !=(Pressure left, Pressure right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.NetFramework.g.cs index fa8d86b36f..f958dcf7d1 100644 --- a/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct PressureChangeRate : IQuantity, IE static PressureChangeRate() { BaseDimensions = new BaseDimensions(-1, 1, -3, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.PressureChangeRate, Units, Zero); } /// @@ -84,6 +85,9 @@ public PressureChangeRate(double numericValue, PressureChangeRateUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public PressureChangeRate(double numericValue, PressureChangeRateUnit unit) /// public PressureChangeRateUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -492,12 +500,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Pressu return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(PressureChangeRate left, PressureChangeRate right) + public static bool operator ==(PressureChangeRate left, PressureChangeRate right) { return left.Equals(right); } - public static bool operator !=(PressureChangeRate left, PressureChangeRate right) + public static bool operator !=(PressureChangeRate left, PressureChangeRate right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/Ratio.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Ratio.NetFramework.g.cs index 3162555801..8a92945fd1 100644 --- a/UnitsNet/GeneratedCode/Quantities/Ratio.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Ratio.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct Ratio : IQuantity, IEquatable, IComparab static Ratio() { BaseDimensions = BaseDimensions.Dimensionless; + Info = new QuantityInfo(QuantityType.Ratio, Units, Zero); } /// @@ -84,6 +85,9 @@ public Ratio(double numericValue, RatioUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public Ratio(double numericValue, RatioUnit unit) /// public RatioUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -478,12 +486,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out RatioU return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(Ratio left, Ratio right) + public static bool operator ==(Ratio left, Ratio right) { return left.Equals(right); } - public static bool operator !=(Ratio left, Ratio right) + public static bool operator !=(Ratio left, Ratio right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.NetFramework.g.cs index 11a5edac93..c7b8176c35 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct ReactiveEnergy : IQuantity, IEquatable static ReactiveEnergy() { BaseDimensions = new BaseDimensions(2, 1, -1, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.ReactiveEnergy, Units, Zero); } /// @@ -84,6 +85,9 @@ public ReactiveEnergy(double numericValue, ReactiveEnergyUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public ReactiveEnergy(double numericValue, ReactiveEnergyUnit unit) /// public ReactiveEnergyUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -436,12 +444,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Reacti return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(ReactiveEnergy left, ReactiveEnergy right) + public static bool operator ==(ReactiveEnergy left, ReactiveEnergy right) { return left.Equals(right); } - public static bool operator !=(ReactiveEnergy left, ReactiveEnergy right) + public static bool operator !=(ReactiveEnergy left, ReactiveEnergy right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/ReactivePower.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ReactivePower.NetFramework.g.cs index aa09b88dd1..b251b0b912 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReactivePower.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReactivePower.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct ReactivePower : IQuantity, IEquatable(QuantityType.ReactivePower, Units, Zero); } /// @@ -84,6 +85,9 @@ public ReactivePower(double numericValue, ReactivePowerUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public ReactivePower(double numericValue, ReactivePowerUnit unit) /// public ReactivePowerUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -450,12 +458,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Reacti return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(ReactivePower left, ReactivePower right) + public static bool operator ==(ReactivePower left, ReactivePower right) { return left.Equals(right); } - public static bool operator !=(ReactivePower left, ReactivePower right) + public static bool operator !=(ReactivePower left, ReactivePower right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.NetFramework.g.cs index 687e2d4e0e..e11d672028 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct RotationalAcceleration : IQuantity(QuantityType.RotationalAcceleration, Units, Zero); } /// @@ -84,6 +85,9 @@ public RotationalAcceleration(double numericValue, RotationalAccelerationUnit un #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public RotationalAcceleration(double numericValue, RotationalAccelerationUnit un /// public RotationalAccelerationUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -436,12 +444,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Rotati return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(RotationalAcceleration left, RotationalAcceleration right) + public static bool operator ==(RotationalAcceleration left, RotationalAcceleration right) { return left.Equals(right); } - public static bool operator !=(RotationalAcceleration left, RotationalAcceleration right) + public static bool operator !=(RotationalAcceleration left, RotationalAcceleration right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.NetFramework.g.cs index 9757bcca37..6cff32fe56 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct RotationalSpeed : IQuantity, IEquatab static RotationalSpeed() { BaseDimensions = new BaseDimensions(0, 0, -1, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.RotationalSpeed, Units, Zero); } /// @@ -84,6 +85,9 @@ public RotationalSpeed(double numericValue, RotationalSpeedUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public RotationalSpeed(double numericValue, RotationalSpeedUnit unit) /// public RotationalSpeedUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -576,12 +584,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Rotati return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(RotationalSpeed left, RotationalSpeed right) + public static bool operator ==(RotationalSpeed left, RotationalSpeed right) { return left.Equals(right); } - public static bool operator !=(RotationalSpeed left, RotationalSpeed right) + public static bool operator !=(RotationalSpeed left, RotationalSpeed right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.NetFramework.g.cs index 083edb31ff..84d0ba2810 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct RotationalStiffness : IQuantity, static RotationalStiffness() { BaseDimensions = new BaseDimensions(2, 1, -2, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.RotationalStiffness, Units, Zero); } /// @@ -84,6 +85,9 @@ public RotationalStiffness(double numericValue, RotationalStiffnessUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public RotationalStiffness(double numericValue, RotationalStiffnessUnit unit) /// public RotationalStiffnessUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -436,12 +444,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Rotati return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(RotationalStiffness left, RotationalStiffness right) + public static bool operator ==(RotationalStiffness left, RotationalStiffness right) { return left.Equals(right); } - public static bool operator !=(RotationalStiffness left, RotationalStiffness right) + public static bool operator !=(RotationalStiffness left, RotationalStiffness right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.NetFramework.g.cs index 7c0d807bcc..d9b630ab9f 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct RotationalStiffnessPerLength : IQuantity(QuantityType.RotationalStiffnessPerLength, Units, Zero); } /// @@ -84,6 +85,9 @@ public RotationalStiffnessPerLength(double numericValue, RotationalStiffnessPerL #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public RotationalStiffnessPerLength(double numericValue, RotationalStiffnessPerL /// public RotationalStiffnessPerLengthUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -436,12 +444,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Rotati return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(RotationalStiffnessPerLength left, RotationalStiffnessPerLength right) + public static bool operator ==(RotationalStiffnessPerLength left, RotationalStiffnessPerLength right) { return left.Equals(right); } - public static bool operator !=(RotationalStiffnessPerLength left, RotationalStiffnessPerLength right) + public static bool operator !=(RotationalStiffnessPerLength left, RotationalStiffnessPerLength right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/SolidAngle.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/SolidAngle.NetFramework.g.cs index d8f03d8b08..2187a68c47 100644 --- a/UnitsNet/GeneratedCode/Quantities/SolidAngle.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SolidAngle.NetFramework.g.cs @@ -67,6 +67,7 @@ public partial struct SolidAngle : IQuantity, IEquatable(QuantityType.SolidAngle, Units, Zero); } /// @@ -87,6 +88,9 @@ public SolidAngle(double numericValue, SolidAngleUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -136,6 +140,10 @@ public SolidAngle(double numericValue, SolidAngleUnit unit) /// public SolidAngleUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -411,12 +419,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out SolidA return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(SolidAngle left, SolidAngle right) + public static bool operator ==(SolidAngle left, SolidAngle right) { return left.Equals(right); } - public static bool operator !=(SolidAngle left, SolidAngle right) + public static bool operator !=(SolidAngle left, SolidAngle right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.NetFramework.g.cs index 11422766f9..c01b09e032 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.NetFramework.g.cs @@ -67,6 +67,7 @@ public partial struct SpecificEnergy : IQuantity, IEquatable static SpecificEnergy() { BaseDimensions = new BaseDimensions(2, 0, -2, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.SpecificEnergy, Units, Zero); } /// @@ -87,6 +88,9 @@ public SpecificEnergy(double numericValue, SpecificEnergyUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -136,6 +140,10 @@ public SpecificEnergy(double numericValue, SpecificEnergyUnit unit) /// public SpecificEnergyUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -523,12 +531,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Specif return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(SpecificEnergy left, SpecificEnergy right) + public static bool operator ==(SpecificEnergy left, SpecificEnergy right) { return left.Equals(right); } - public static bool operator !=(SpecificEnergy left, SpecificEnergy right) + public static bool operator !=(SpecificEnergy left, SpecificEnergy right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.NetFramework.g.cs index b91712cb2e..9751102040 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct SpecificEntropy : IQuantity, IEquatab static SpecificEntropy() { BaseDimensions = new BaseDimensions(2, 0, -2, 0, -1, 0, 0); + Info = new QuantityInfo(QuantityType.SpecificEntropy, Units, Zero); } /// @@ -84,6 +85,9 @@ public SpecificEntropy(double numericValue, SpecificEntropyUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public SpecificEntropy(double numericValue, SpecificEntropyUnit unit) /// public SpecificEntropyUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -506,12 +514,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Specif return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(SpecificEntropy left, SpecificEntropy right) + public static bool operator ==(SpecificEntropy left, SpecificEntropy right) { return left.Equals(right); } - public static bool operator !=(SpecificEntropy left, SpecificEntropy right) + public static bool operator !=(SpecificEntropy left, SpecificEntropy right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificVolume.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificVolume.NetFramework.g.cs index 8932433b24..a1d16e0632 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificVolume.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificVolume.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct SpecificVolume : IQuantity, IEquatable static SpecificVolume() { BaseDimensions = new BaseDimensions(3, -1, 0, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.SpecificVolume, Units, Zero); } /// @@ -84,6 +85,9 @@ public SpecificVolume(double numericValue, SpecificVolumeUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public SpecificVolume(double numericValue, SpecificVolumeUnit unit) /// public SpecificVolumeUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -436,12 +444,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Specif return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(SpecificVolume left, SpecificVolume right) + public static bool operator ==(SpecificVolume left, SpecificVolume right) { return left.Equals(right); } - public static bool operator !=(SpecificVolume left, SpecificVolume right) + public static bool operator !=(SpecificVolume left, SpecificVolume right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificWeight.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificWeight.NetFramework.g.cs index ce31c9bb27..a81d4f9c11 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificWeight.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificWeight.NetFramework.g.cs @@ -67,6 +67,7 @@ public partial struct SpecificWeight : IQuantity, IEquatable static SpecificWeight() { BaseDimensions = new BaseDimensions(-2, 1, -2, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.SpecificWeight, Units, Zero); } /// @@ -87,6 +88,9 @@ public SpecificWeight(double numericValue, SpecificWeightUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -136,6 +140,10 @@ public SpecificWeight(double numericValue, SpecificWeightUnit unit) /// public SpecificWeightUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -635,12 +643,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Specif return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(SpecificWeight left, SpecificWeight right) + public static bool operator ==(SpecificWeight left, SpecificWeight right) { return left.Equals(right); } - public static bool operator !=(SpecificWeight left, SpecificWeight right) + public static bool operator !=(SpecificWeight left, SpecificWeight right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/Speed.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Speed.NetFramework.g.cs index a557138fe8..5cc1a5d5be 100644 --- a/UnitsNet/GeneratedCode/Quantities/Speed.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Speed.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct Speed : IQuantity, IEquatable, IComparab static Speed() { BaseDimensions = new BaseDimensions(1, 0, -1, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.Speed, Units, Zero); } /// @@ -84,6 +85,9 @@ public Speed(double numericValue, SpeedUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public Speed(double numericValue, SpeedUnit unit) /// public SpeedUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -842,12 +850,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out SpeedU return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(Speed left, Speed right) + public static bool operator ==(Speed left, Speed right) { return left.Equals(right); } - public static bool operator !=(Speed left, Speed right) + public static bool operator !=(Speed left, Speed right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/Temperature.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Temperature.NetFramework.g.cs index 6f4ad8306c..887cc3be49 100644 --- a/UnitsNet/GeneratedCode/Quantities/Temperature.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Temperature.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct Temperature : IQuantity, IEquatable(QuantityType.Temperature, Units, Zero); } /// @@ -84,6 +85,9 @@ public Temperature(double numericValue, TemperatureUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public Temperature(double numericValue, TemperatureUnit unit) /// public TemperatureUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -467,12 +475,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Temper return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(Temperature left, Temperature right) + public static bool operator ==(Temperature left, Temperature right) { return left.Equals(right); } - public static bool operator !=(Temperature left, Temperature right) + public static bool operator !=(Temperature left, Temperature right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.NetFramework.g.cs index 40a63cb355..8e8bfe60a1 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct TemperatureChangeRate : IQuantity(QuantityType.TemperatureChangeRate, Units, Zero); } /// @@ -84,6 +85,9 @@ public TemperatureChangeRate(double numericValue, TemperatureChangeRateUnit unit #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public TemperatureChangeRate(double numericValue, TemperatureChangeRateUnit unit /// public TemperatureChangeRateUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -534,12 +542,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Temper return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(TemperatureChangeRate left, TemperatureChangeRate right) + public static bool operator ==(TemperatureChangeRate left, TemperatureChangeRate right) { return left.Equals(right); } - public static bool operator !=(TemperatureChangeRate left, TemperatureChangeRate right) + public static bool operator !=(TemperatureChangeRate left, TemperatureChangeRate right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.NetFramework.g.cs index b30f38b0c6..aada16a09c 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct TemperatureDelta : IQuantity, IEquat static TemperatureDelta() { BaseDimensions = BaseDimensions.Dimensionless; + Info = new QuantityInfo(QuantityType.TemperatureDelta, Units, Zero); } /// @@ -84,6 +85,9 @@ public TemperatureDelta(double numericValue, TemperatureDeltaUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public TemperatureDelta(double numericValue, TemperatureDeltaUnit unit) /// public TemperatureDeltaUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -506,12 +514,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Temper return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(TemperatureDelta left, TemperatureDelta right) + public static bool operator ==(TemperatureDelta left, TemperatureDelta right) { return left.Equals(right); } - public static bool operator !=(TemperatureDelta left, TemperatureDelta right) + public static bool operator !=(TemperatureDelta left, TemperatureDelta right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.NetFramework.g.cs index 77ee8a8895..c8c919d7f0 100644 --- a/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.NetFramework.g.cs @@ -67,6 +67,7 @@ public partial struct ThermalConductivity : IQuantity, static ThermalConductivity() { BaseDimensions = new BaseDimensions(1, 1, -3, 0, -1, 0, 0); + Info = new QuantityInfo(QuantityType.ThermalConductivity, Units, Zero); } /// @@ -87,6 +88,9 @@ public ThermalConductivity(double numericValue, ThermalConductivityUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -136,6 +140,10 @@ public ThermalConductivity(double numericValue, ThermalConductivityUnit unit) /// public ThermalConductivityUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -425,12 +433,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Therma return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(ThermalConductivity left, ThermalConductivity right) + public static bool operator ==(ThermalConductivity left, ThermalConductivity right) { return left.Equals(right); } - public static bool operator !=(ThermalConductivity left, ThermalConductivity right) + public static bool operator !=(ThermalConductivity left, ThermalConductivity right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/ThermalResistance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ThermalResistance.NetFramework.g.cs index 1c7fd72572..b83bd0e05c 100644 --- a/UnitsNet/GeneratedCode/Quantities/ThermalResistance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ThermalResistance.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct ThermalResistance : IQuantity, IEqu static ThermalResistance() { BaseDimensions = new BaseDimensions(0, -1, 3, 0, 1, 0, 0); + Info = new QuantityInfo(QuantityType.ThermalResistance, Units, Zero); } /// @@ -84,6 +85,9 @@ public ThermalResistance(double numericValue, ThermalResistanceUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public ThermalResistance(double numericValue, ThermalResistanceUnit unit) /// public ThermalResistanceUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -464,12 +472,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Therma return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(ThermalResistance left, ThermalResistance right) + public static bool operator ==(ThermalResistance left, ThermalResistance right) { return left.Equals(right); } - public static bool operator !=(ThermalResistance left, ThermalResistance right) + public static bool operator !=(ThermalResistance left, ThermalResistance right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/Torque.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Torque.NetFramework.g.cs index a73e74b5fc..73e29b7028 100644 --- a/UnitsNet/GeneratedCode/Quantities/Torque.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Torque.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct Torque : IQuantity, IEquatable, ICompa static Torque() { BaseDimensions = new BaseDimensions(2, 1, -2, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.Torque, Units, Zero); } /// @@ -84,6 +85,9 @@ public Torque(double numericValue, TorqueUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public Torque(double numericValue, TorqueUnit unit) /// public TorqueUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -688,12 +696,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Torque return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(Torque left, Torque right) + public static bool operator ==(Torque left, Torque right) { return left.Equals(right); } - public static bool operator !=(Torque left, Torque right) + public static bool operator !=(Torque left, Torque right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/VitaminA.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/VitaminA.NetFramework.g.cs index e27bca2e83..6395c208f2 100644 --- a/UnitsNet/GeneratedCode/Quantities/VitaminA.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VitaminA.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct VitaminA : IQuantity, IEquatable, static VitaminA() { BaseDimensions = BaseDimensions.Dimensionless; + Info = new QuantityInfo(QuantityType.VitaminA, Units, Zero); } /// @@ -84,6 +85,9 @@ public VitaminA(double numericValue, VitaminAUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public VitaminA(double numericValue, VitaminAUnit unit) /// public VitaminAUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -408,12 +416,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Vitami return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(VitaminA left, VitaminA right) + public static bool operator ==(VitaminA left, VitaminA right) { return left.Equals(right); } - public static bool operator !=(VitaminA left, VitaminA right) + public static bool operator !=(VitaminA left, VitaminA right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/Volume.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Volume.NetFramework.g.cs index d15b9e90f2..eb626cbb5f 100644 --- a/UnitsNet/GeneratedCode/Quantities/Volume.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Volume.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct Volume : IQuantity, IEquatable, ICompa static Volume() { BaseDimensions = new BaseDimensions(3, 0, 0, 0, 0, 0, 0); + Info = new QuantityInfo(QuantityType.Volume, Units, Zero); } /// @@ -84,6 +85,9 @@ public Volume(double numericValue, VolumeUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public Volume(double numericValue, VolumeUnit unit) /// public VolumeUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -1024,12 +1032,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Volume return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(Volume left, Volume right) + public static bool operator ==(Volume left, Volume right) { return left.Equals(right); } - public static bool operator !=(Volume left, Volume right) + public static bool operator !=(Volume left, Volume right) { return !(left == right); } diff --git a/UnitsNet/GeneratedCode/Quantities/VolumeFlow.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumeFlow.NetFramework.g.cs index 041a2e0166..450aa2daf1 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumeFlow.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumeFlow.NetFramework.g.cs @@ -64,6 +64,7 @@ public partial struct VolumeFlow : IQuantity, IEquatable(QuantityType.VolumeFlow, Units, Zero); } /// @@ -84,6 +85,9 @@ public VolumeFlow(double numericValue, VolumeFlowUnit unit) #region Static Properties + /// + public static QuantityInfo Info { get; } + /// /// The of this quantity. /// @@ -133,6 +137,10 @@ public VolumeFlow(double numericValue, VolumeFlowUnit unit) /// public VolumeFlowUnit Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -1066,12 +1074,12 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Volume return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==(VolumeFlow left, VolumeFlow right) + public static bool operator ==(VolumeFlow left, VolumeFlow right) { return left.Equals(right); } - public static bool operator !=(VolumeFlow left, VolumeFlow right) + public static bool operator !=(VolumeFlow left, VolumeFlow right) { return !(left == right); } diff --git a/UnitsNet/Scripts/Include-GenerateQuantitySourceCodeNetFramework.ps1 b/UnitsNet/Scripts/Include-GenerateQuantitySourceCodeNetFramework.ps1 index d876ece7bb..43272d93d5 100644 --- a/UnitsNet/Scripts/Include-GenerateQuantitySourceCodeNetFramework.ps1 +++ b/UnitsNet/Scripts/Include-GenerateQuantitySourceCodeNetFramework.ps1 @@ -123,6 +123,7 @@ if ($obsoleteAttribute) BaseDimensions = new BaseDimensions($($baseDimensions.Length), $($baseDimensions.Mass), $($baseDimensions.Time), $($baseDimensions.ElectricCurrent), $($baseDimensions.Temperature), $($baseDimensions.AmountOfSubstance), $($baseDimensions.LuminousIntensity)); "@; } @" + Info = new QuantityInfo<$unitEnumName>(QuantityType.$quantityName, Units, Zero); } "@; # Windows Runtime Component requires a default constructor if ($wrc) {@" @@ -271,6 +272,9 @@ function GenerateStaticProperties([GeneratorArgs]$genArgs) #region Static Properties + /// + public static QuantityInfo<$unitEnumName> Info { get; } + /// /// The of this quantity. /// @@ -337,6 +341,10 @@ function GenerateProperties([GeneratorArgs]$genArgs) /// public $unitEnumName Unit => _unit.GetValueOrDefault(BaseUnit); + public QuantityInfo<$unitEnumName> QuantityInfo => Info; + + QuantityInfo IQuantity.QuantityInfo => Info; + /// /// The of this quantity. /// @@ -812,12 +820,12 @@ function GenerateEqualityAndComparison([GeneratorArgs]$genArgs) return left.Value > right.AsBaseNumericType(left.Unit); } - public static bool operator ==($quantityName left, $quantityName right) + public static bool operator ==($quantityName left, $quantityName right) { return left.Equals(right); } - public static bool operator !=($quantityName left, $quantityName right) + public static bool operator !=($quantityName left, $quantityName right) { return !(left == right); } From d8e73dd22db84c7ad2a8ce1362f9276224a51d35 Mon Sep 17 00:00:00 2001 From: Andreas Gullberg Larsen Date: Sun, 27 Jan 2019 20:40:44 +0100 Subject: [PATCH 06/36] Add tests --- UnitsNet.Tests/QuantityInfoTest.cs | 91 ++++++++++++++++++++++++++++++ UnitsNet.Tests/QuantityTests.cs | 39 ++++++++++++- 2 files changed, 127 insertions(+), 3 deletions(-) create mode 100644 UnitsNet.Tests/QuantityInfoTest.cs diff --git a/UnitsNet.Tests/QuantityInfoTest.cs b/UnitsNet.Tests/QuantityInfoTest.cs new file mode 100644 index 0000000000..191e9a35e9 --- /dev/null +++ b/UnitsNet.Tests/QuantityInfoTest.cs @@ -0,0 +1,91 @@ +// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). +// https://github.com/angularsen/UnitsNet +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +using System; +using System.Diagnostics.CodeAnalysis; +using UnitsNet.Units; +using Xunit; + +namespace UnitsNet.Tests +{ + public class QuantityInfoTest + { + [Fact] + public void Constructor_AssignsProperties() + { + var expectedZero = Length.FromCentimeters(10); + var expectedUnits = new Enum[] {LengthUnit.Centimeter, LengthUnit.Kilometer}; + var expectedQuantityType = QuantityType.Length; + + var info = new QuantityInfo(expectedQuantityType, expectedUnits, expectedZero); + + Assert.Equal(expectedZero, info.Zero); + Assert.Equal("Length", info.Name); + Assert.Equal(expectedUnits, info.Units); + Assert.Equal(new[]{"Centimeter", "Kilometer"}, info.UnitNames); + Assert.Equal(expectedQuantityType, info.QuantityType); + } + + [Fact] + public void GenericsConstructor_AssignsProperties() + { + var expectedZero = Length.FromCentimeters(10); + var expectedUnits = new[] {LengthUnit.Centimeter, LengthUnit.Kilometer}; + var expectedQuantityType = QuantityType.Length; + + var info = new QuantityInfo(expectedQuantityType, expectedUnits, expectedZero); + + Assert.Equal(expectedZero, info.Zero); + Assert.Equal("Length", info.Name); + Assert.Equal(expectedUnits, info.Units); + Assert.Equal(new[]{"Centimeter", "Kilometer"}, info.UnitNames); + Assert.Equal(expectedQuantityType, info.QuantityType); + } + + [Fact] + [SuppressMessage("ReSharper", "AssignNullToNotNullAttribute")] + public void Constructor_GivenNullAsUnits_ThrowsArgumentNullException() + { + Assert.Throws(() => new QuantityInfo(QuantityType.Length, null, null)); + } + + [Fact] + [SuppressMessage("ReSharper", "AssignNullToNotNullAttribute")] + public void GenericsConstructor_GivenNullAsUnits_ThrowsArgumentNullException() + { + Assert.Throws(() => new QuantityInfo(QuantityType.Length, null, null)); + } + + [Fact] + [SuppressMessage("ReSharper", "AssignNullToNotNullAttribute")] + public void Constructor_GivenNullAsZero_ThrowsArgumentNullException() + { + Assert.Throws(() => new QuantityInfo(QuantityType.Length, new Enum[0], null)); + } + + [Fact] + [SuppressMessage("ReSharper", "AssignNullToNotNullAttribute")] + public void GenericsConstructor_GivenNullAsZero_ThrowsArgumentNullException() + { + Assert.Throws(() => new QuantityInfo(QuantityType.Length, new LengthUnit[0], null)); + } + } +} diff --git a/UnitsNet.Tests/QuantityTests.cs b/UnitsNet.Tests/QuantityTests.cs index cec7093e68..f12f4ec8d7 100644 --- a/UnitsNet.Tests/QuantityTests.cs +++ b/UnitsNet.Tests/QuantityTests.cs @@ -1,16 +1,16 @@ // Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). // https://github.com/angularsen/UnitsNet -// +// // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: -// +// // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. -// +// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -19,6 +19,8 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +using System; +using System.Linq; using UnitsNet.Units; using Xunit; @@ -34,5 +36,36 @@ public void GetHashCodeForDifferentQuantitiesWithSameValuesAreNotEqual() Assert.NotEqual( length.GetHashCode(), area.GetHashCode() ); } + + [Fact] + public void Length_QuantityInfo_ReturnsQuantityInfoAboutLength() + { + var length = new Length(1, LengthUnit.Centimeter); + + QuantityInfo quantityInfo = length.QuantityInfo; + + AssertQuantityInfoRepresentsLength(quantityInfo); + } + + [Fact] + public void Length_Info_ReturnsQuantityInfoAboutLength() + { + QuantityInfo quantityInfo = Length.Info; + + AssertQuantityInfoRepresentsLength(quantityInfo); + } + + private static void AssertQuantityInfoRepresentsLength(QuantityInfo quantityInfo) + { + Assert.Equal(Length.Zero, quantityInfo.Zero); + Assert.Equal("Length", quantityInfo.Name); + + var lengthUnits = EnumUtils.GetEnumValues().Except(new[] {LengthUnit.Undefined}).ToArray(); + Assert.Equal(lengthUnits, quantityInfo.Units); + Assert.Equal(QuantityType.Length, quantityInfo.QuantityType); + + var lengthUnitNames = lengthUnits.Select(x => x.ToString()); + Assert.Equal(lengthUnitNames, quantityInfo.UnitNames); + } } } From 51c39c8d5c016d05bdff65f2f476f3bae42aaaf1 Mon Sep 17 00:00:00 2001 From: Andreas Gullberg Larsen Date: Sun, 27 Jan 2019 20:45:40 +0100 Subject: [PATCH 07/36] TEMP: Samples: Use UnitsNet instead of nuget --- .../ConsoleApp-NetCore.csproj | 4 ++-- Samples/Samples.sln | 18 ++++++++++++++++++ .../UnitConverter.Wpf/UnitConverter.Wpf.csproj | 9 ++++++--- .../UnitConverter.Wpf/packages.config | 1 - .../WpfMVVMSample/WpfMVVMSample.csproj | 9 ++++++--- .../WpfMVVMSample/packages.config | 1 - 6 files changed, 32 insertions(+), 10 deletions(-) diff --git a/Samples/ConsoleApp-NetCore/ConsoleApp-NetCore.csproj b/Samples/ConsoleApp-NetCore/ConsoleApp-NetCore.csproj index 593b33c624..22c9175392 100644 --- a/Samples/ConsoleApp-NetCore/ConsoleApp-NetCore.csproj +++ b/Samples/ConsoleApp-NetCore/ConsoleApp-NetCore.csproj @@ -7,11 +7,11 @@ - + - + diff --git a/Samples/Samples.sln b/Samples/Samples.sln index e125d7998a..6389e57af2 100644 --- a/Samples/Samples.sln +++ b/Samples/Samples.sln @@ -13,6 +13,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleConversionDemo.UWP.CS EndProject Project("{262852C6-CD72-467D-83FE-5EEB1973A190}") = "SimpleConversionDemo.UWP.WinJS", "SimpleConversionDemo.UWP.WinJS\SimpleConversionDemo.UWP.WinJS.jsproj", "{F5B26152-A64B-42A8-8F19-D2EAFB94CBD1}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitsNet", "..\UnitsNet\UnitsNet.csproj", "{A50F418C-55D4-4B24-87A3-AFB4B4336E1C}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -107,6 +109,22 @@ Global {F5B26152-A64B-42A8-8F19-D2EAFB94CBD1}.Release|x86.ActiveCfg = Release|x86 {F5B26152-A64B-42A8-8F19-D2EAFB94CBD1}.Release|x86.Build.0 = Release|x86 {F5B26152-A64B-42A8-8F19-D2EAFB94CBD1}.Release|x86.Deploy.0 = Release|x86 + {A50F418C-55D4-4B24-87A3-AFB4B4336E1C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A50F418C-55D4-4B24-87A3-AFB4B4336E1C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A50F418C-55D4-4B24-87A3-AFB4B4336E1C}.Debug|ARM.ActiveCfg = Debug|Any CPU + {A50F418C-55D4-4B24-87A3-AFB4B4336E1C}.Debug|ARM.Build.0 = Debug|Any CPU + {A50F418C-55D4-4B24-87A3-AFB4B4336E1C}.Debug|x64.ActiveCfg = Debug|Any CPU + {A50F418C-55D4-4B24-87A3-AFB4B4336E1C}.Debug|x64.Build.0 = Debug|Any CPU + {A50F418C-55D4-4B24-87A3-AFB4B4336E1C}.Debug|x86.ActiveCfg = Debug|Any CPU + {A50F418C-55D4-4B24-87A3-AFB4B4336E1C}.Debug|x86.Build.0 = Debug|Any CPU + {A50F418C-55D4-4B24-87A3-AFB4B4336E1C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A50F418C-55D4-4B24-87A3-AFB4B4336E1C}.Release|Any CPU.Build.0 = Release|Any CPU + {A50F418C-55D4-4B24-87A3-AFB4B4336E1C}.Release|ARM.ActiveCfg = Release|Any CPU + {A50F418C-55D4-4B24-87A3-AFB4B4336E1C}.Release|ARM.Build.0 = Release|Any CPU + {A50F418C-55D4-4B24-87A3-AFB4B4336E1C}.Release|x64.ActiveCfg = Release|Any CPU + {A50F418C-55D4-4B24-87A3-AFB4B4336E1C}.Release|x64.Build.0 = Release|Any CPU + {A50F418C-55D4-4B24-87A3-AFB4B4336E1C}.Release|x86.ActiveCfg = Release|Any CPU + {A50F418C-55D4-4B24-87A3-AFB4B4336E1C}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/UnitConverter.Wpf.csproj b/Samples/UnitConverter.Wpf/UnitConverter.Wpf/UnitConverter.Wpf.csproj index c8277e5abc..d5c5b0a733 100644 --- a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/UnitConverter.Wpf.csproj +++ b/Samples/UnitConverter.Wpf/UnitConverter.Wpf/UnitConverter.Wpf.csproj @@ -61,9 +61,6 @@ 4.0 - - ..\..\packages\UnitsNet.4.0.0-beta1\lib\net40\UnitsNet.dll - @@ -123,5 +120,11 @@ + + + {a50f418c-55d4-4b24-87a3-afb4b4336e1c} + UnitsNet + + \ No newline at end of file diff --git a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/packages.config b/Samples/UnitConverter.Wpf/UnitConverter.Wpf/packages.config index 95f5110bb3..f1c5939e55 100644 --- a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/packages.config +++ b/Samples/UnitConverter.Wpf/UnitConverter.Wpf/packages.config @@ -3,5 +3,4 @@ - \ No newline at end of file diff --git a/Samples/WpfMVVMSample/WpfMVVMSample/WpfMVVMSample.csproj b/Samples/WpfMVVMSample/WpfMVVMSample/WpfMVVMSample.csproj index 4e78b30474..e961a3b338 100644 --- a/Samples/WpfMVVMSample/WpfMVVMSample/WpfMVVMSample.csproj +++ b/Samples/WpfMVVMSample/WpfMVVMSample/WpfMVVMSample.csproj @@ -82,9 +82,6 @@ 4.0 - - ..\..\packages\UnitsNet.4.0.0-beta1\lib\net40\UnitsNet.dll - ..\..\packages\Unity.Abstractions.3.3.1\lib\net47\Unity.Abstractions.dll @@ -159,5 +156,11 @@ + + + {a50f418c-55d4-4b24-87a3-afb4b4336e1c} + UnitsNet + + \ No newline at end of file diff --git a/Samples/WpfMVVMSample/WpfMVVMSample/packages.config b/Samples/WpfMVVMSample/WpfMVVMSample/packages.config index 3e6672d6c5..f123320c99 100644 --- a/Samples/WpfMVVMSample/WpfMVVMSample/packages.config +++ b/Samples/WpfMVVMSample/WpfMVVMSample/packages.config @@ -10,7 +10,6 @@ - From 0d0c1db952ee2d990a8c3b160dc93ed5440c93fc Mon Sep 17 00:00:00 2001 From: Andreas Gullberg Larsen Date: Mon, 28 Jan 2019 00:30:06 +0100 Subject: [PATCH 08/36] Revert "TEMP: Samples: Use UnitsNet instead of nuget" This reverts commit 70c00d518e3139e8c2e441ce570b7b2628c23167. --- .../ConsoleApp-NetCore.csproj | 4 ++-- Samples/Samples.sln | 18 ------------------ .../UnitConverter.Wpf/UnitConverter.Wpf.csproj | 9 +++------ .../UnitConverter.Wpf/packages.config | 1 + .../WpfMVVMSample/WpfMVVMSample.csproj | 9 +++------ .../WpfMVVMSample/packages.config | 1 + 6 files changed, 10 insertions(+), 32 deletions(-) diff --git a/Samples/ConsoleApp-NetCore/ConsoleApp-NetCore.csproj b/Samples/ConsoleApp-NetCore/ConsoleApp-NetCore.csproj index 22c9175392..593b33c624 100644 --- a/Samples/ConsoleApp-NetCore/ConsoleApp-NetCore.csproj +++ b/Samples/ConsoleApp-NetCore/ConsoleApp-NetCore.csproj @@ -7,11 +7,11 @@ - + - + diff --git a/Samples/Samples.sln b/Samples/Samples.sln index 6389e57af2..e125d7998a 100644 --- a/Samples/Samples.sln +++ b/Samples/Samples.sln @@ -13,8 +13,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleConversionDemo.UWP.CS EndProject Project("{262852C6-CD72-467D-83FE-5EEB1973A190}") = "SimpleConversionDemo.UWP.WinJS", "SimpleConversionDemo.UWP.WinJS\SimpleConversionDemo.UWP.WinJS.jsproj", "{F5B26152-A64B-42A8-8F19-D2EAFB94CBD1}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitsNet", "..\UnitsNet\UnitsNet.csproj", "{A50F418C-55D4-4B24-87A3-AFB4B4336E1C}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -109,22 +107,6 @@ Global {F5B26152-A64B-42A8-8F19-D2EAFB94CBD1}.Release|x86.ActiveCfg = Release|x86 {F5B26152-A64B-42A8-8F19-D2EAFB94CBD1}.Release|x86.Build.0 = Release|x86 {F5B26152-A64B-42A8-8F19-D2EAFB94CBD1}.Release|x86.Deploy.0 = Release|x86 - {A50F418C-55D4-4B24-87A3-AFB4B4336E1C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A50F418C-55D4-4B24-87A3-AFB4B4336E1C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A50F418C-55D4-4B24-87A3-AFB4B4336E1C}.Debug|ARM.ActiveCfg = Debug|Any CPU - {A50F418C-55D4-4B24-87A3-AFB4B4336E1C}.Debug|ARM.Build.0 = Debug|Any CPU - {A50F418C-55D4-4B24-87A3-AFB4B4336E1C}.Debug|x64.ActiveCfg = Debug|Any CPU - {A50F418C-55D4-4B24-87A3-AFB4B4336E1C}.Debug|x64.Build.0 = Debug|Any CPU - {A50F418C-55D4-4B24-87A3-AFB4B4336E1C}.Debug|x86.ActiveCfg = Debug|Any CPU - {A50F418C-55D4-4B24-87A3-AFB4B4336E1C}.Debug|x86.Build.0 = Debug|Any CPU - {A50F418C-55D4-4B24-87A3-AFB4B4336E1C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A50F418C-55D4-4B24-87A3-AFB4B4336E1C}.Release|Any CPU.Build.0 = Release|Any CPU - {A50F418C-55D4-4B24-87A3-AFB4B4336E1C}.Release|ARM.ActiveCfg = Release|Any CPU - {A50F418C-55D4-4B24-87A3-AFB4B4336E1C}.Release|ARM.Build.0 = Release|Any CPU - {A50F418C-55D4-4B24-87A3-AFB4B4336E1C}.Release|x64.ActiveCfg = Release|Any CPU - {A50F418C-55D4-4B24-87A3-AFB4B4336E1C}.Release|x64.Build.0 = Release|Any CPU - {A50F418C-55D4-4B24-87A3-AFB4B4336E1C}.Release|x86.ActiveCfg = Release|Any CPU - {A50F418C-55D4-4B24-87A3-AFB4B4336E1C}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/UnitConverter.Wpf.csproj b/Samples/UnitConverter.Wpf/UnitConverter.Wpf/UnitConverter.Wpf.csproj index d5c5b0a733..c8277e5abc 100644 --- a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/UnitConverter.Wpf.csproj +++ b/Samples/UnitConverter.Wpf/UnitConverter.Wpf/UnitConverter.Wpf.csproj @@ -61,6 +61,9 @@ 4.0 + + ..\..\packages\UnitsNet.4.0.0-beta1\lib\net40\UnitsNet.dll + @@ -120,11 +123,5 @@ - - - {a50f418c-55d4-4b24-87a3-afb4b4336e1c} - UnitsNet - - \ No newline at end of file diff --git a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/packages.config b/Samples/UnitConverter.Wpf/UnitConverter.Wpf/packages.config index f1c5939e55..95f5110bb3 100644 --- a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/packages.config +++ b/Samples/UnitConverter.Wpf/UnitConverter.Wpf/packages.config @@ -3,4 +3,5 @@ + \ No newline at end of file diff --git a/Samples/WpfMVVMSample/WpfMVVMSample/WpfMVVMSample.csproj b/Samples/WpfMVVMSample/WpfMVVMSample/WpfMVVMSample.csproj index e961a3b338..4e78b30474 100644 --- a/Samples/WpfMVVMSample/WpfMVVMSample/WpfMVVMSample.csproj +++ b/Samples/WpfMVVMSample/WpfMVVMSample/WpfMVVMSample.csproj @@ -82,6 +82,9 @@ 4.0 + + ..\..\packages\UnitsNet.4.0.0-beta1\lib\net40\UnitsNet.dll + ..\..\packages\Unity.Abstractions.3.3.1\lib\net47\Unity.Abstractions.dll @@ -156,11 +159,5 @@ - - - {a50f418c-55d4-4b24-87a3-afb4b4336e1c} - UnitsNet - - \ No newline at end of file diff --git a/Samples/WpfMVVMSample/WpfMVVMSample/packages.config b/Samples/WpfMVVMSample/WpfMVVMSample/packages.config index f123320c99..3e6672d6c5 100644 --- a/Samples/WpfMVVMSample/WpfMVVMSample/packages.config +++ b/Samples/WpfMVVMSample/WpfMVVMSample/packages.config @@ -10,6 +10,7 @@ + From 063bfa1e035c4a77235bf354410de4164a36bb6a Mon Sep 17 00:00:00 2001 From: Andreas Gullberg Larsen Date: Sun, 27 Jan 2019 22:57:13 +0100 Subject: [PATCH 09/36] Add features to make sample apps not have to use reflection - Add As() and ToUnit() on IQuantity with Enum parameters - Add UnitConverter.Convert() and .TryConvert() with Enum parameters --- .../Acceleration.WindowsRuntimeComponent.g.cs | 6 ++ ...ntOfSubstance.WindowsRuntimeComponent.g.cs | 6 ++ ...mplitudeRatio.WindowsRuntimeComponent.g.cs | 6 ++ .../Angle.WindowsRuntimeComponent.g.cs | 6 ++ ...pparentEnergy.WindowsRuntimeComponent.g.cs | 6 ++ ...ApparentPower.WindowsRuntimeComponent.g.cs | 6 ++ .../Area.WindowsRuntimeComponent.g.cs | 6 ++ .../AreaDensity.WindowsRuntimeComponent.g.cs | 6 ++ ...mentOfInertia.WindowsRuntimeComponent.g.cs | 6 ++ .../BitRate.WindowsRuntimeComponent.g.cs | 6 ++ ...elConsumption.WindowsRuntimeComponent.g.cs | 6 ++ .../Capacitance.WindowsRuntimeComponent.g.cs | 6 ++ ...rmalExpansion.WindowsRuntimeComponent.g.cs | 6 ++ .../Density.WindowsRuntimeComponent.g.cs | 6 ++ .../Duration.WindowsRuntimeComponent.g.cs | 6 ++ ...amicViscosity.WindowsRuntimeComponent.g.cs | 6 ++ ...ricAdmittance.WindowsRuntimeComponent.g.cs | 6 ++ ...lectricCharge.WindowsRuntimeComponent.g.cs | 6 ++ ...ChargeDensity.WindowsRuntimeComponent.g.cs | 6 ++ ...icConductance.WindowsRuntimeComponent.g.cs | 6 ++ ...cConductivity.WindowsRuntimeComponent.g.cs | 6 ++ ...ectricCurrent.WindowsRuntimeComponent.g.cs | 6 ++ ...urrentDensity.WindowsRuntimeComponent.g.cs | 6 ++ ...rrentGradient.WindowsRuntimeComponent.g.cs | 6 ++ ...ElectricField.WindowsRuntimeComponent.g.cs | 6 ++ ...ricInductance.WindowsRuntimeComponent.g.cs | 6 ++ ...tricPotential.WindowsRuntimeComponent.g.cs | 6 ++ ...icPotentialAc.WindowsRuntimeComponent.g.cs | 6 ++ ...icPotentialDc.WindowsRuntimeComponent.g.cs | 6 ++ ...ricResistance.WindowsRuntimeComponent.g.cs | 6 ++ ...icResistivity.WindowsRuntimeComponent.g.cs | 6 ++ .../Energy.WindowsRuntimeComponent.g.cs | 6 ++ .../Entropy.WindowsRuntimeComponent.g.cs | 6 ++ .../Force.WindowsRuntimeComponent.g.cs | 6 ++ ...rceChangeRate.WindowsRuntimeComponent.g.cs | 6 ++ ...orcePerLength.WindowsRuntimeComponent.g.cs | 6 ++ .../Frequency.WindowsRuntimeComponent.g.cs | 6 ++ .../HeatFlux.WindowsRuntimeComponent.g.cs | 6 ++ ...erCoefficient.WindowsRuntimeComponent.g.cs | 6 ++ .../Illuminance.WindowsRuntimeComponent.g.cs | 6 ++ .../Information.WindowsRuntimeComponent.g.cs | 6 ++ .../Irradiance.WindowsRuntimeComponent.g.cs | 6 ++ .../Irradiation.WindowsRuntimeComponent.g.cs | 6 ++ ...aticViscosity.WindowsRuntimeComponent.g.cs | 6 ++ .../LapseRate.WindowsRuntimeComponent.g.cs | 6 ++ .../Length.WindowsRuntimeComponent.g.cs | 6 ++ .../Level.WindowsRuntimeComponent.g.cs | 6 ++ ...LinearDensity.WindowsRuntimeComponent.g.cs | 6 ++ .../LuminousFlux.WindowsRuntimeComponent.g.cs | 6 ++ ...nousIntensity.WindowsRuntimeComponent.g.cs | 6 ++ ...MagneticField.WindowsRuntimeComponent.g.cs | 6 ++ .../MagneticFlux.WindowsRuntimeComponent.g.cs | 6 ++ ...Magnetization.WindowsRuntimeComponent.g.cs | 6 ++ .../Mass.WindowsRuntimeComponent.g.cs | 6 ++ .../MassFlow.WindowsRuntimeComponent.g.cs | 6 ++ .../MassFlux.WindowsRuntimeComponent.g.cs | 6 ++ ...mentOfInertia.WindowsRuntimeComponent.g.cs | 6 ++ .../MolarEnergy.WindowsRuntimeComponent.g.cs | 6 ++ .../MolarEntropy.WindowsRuntimeComponent.g.cs | 6 ++ .../MolarMass.WindowsRuntimeComponent.g.cs | 6 ++ .../Molarity.WindowsRuntimeComponent.g.cs | 6 ++ .../Permeability.WindowsRuntimeComponent.g.cs | 6 ++ .../Permittivity.WindowsRuntimeComponent.g.cs | 6 ++ .../Power.WindowsRuntimeComponent.g.cs | 6 ++ .../PowerDensity.WindowsRuntimeComponent.g.cs | 6 ++ .../PowerRatio.WindowsRuntimeComponent.g.cs | 6 ++ .../Pressure.WindowsRuntimeComponent.g.cs | 6 ++ ...ureChangeRate.WindowsRuntimeComponent.g.cs | 6 ++ .../Ratio.WindowsRuntimeComponent.g.cs | 6 ++ ...eactiveEnergy.WindowsRuntimeComponent.g.cs | 6 ++ ...ReactivePower.WindowsRuntimeComponent.g.cs | 6 ++ ...lAcceleration.WindowsRuntimeComponent.g.cs | 6 ++ ...tationalSpeed.WindowsRuntimeComponent.g.cs | 6 ++ ...onalStiffness.WindowsRuntimeComponent.g.cs | 6 ++ ...nessPerLength.WindowsRuntimeComponent.g.cs | 6 ++ .../SolidAngle.WindowsRuntimeComponent.g.cs | 6 ++ ...pecificEnergy.WindowsRuntimeComponent.g.cs | 6 ++ ...ecificEntropy.WindowsRuntimeComponent.g.cs | 6 ++ ...pecificVolume.WindowsRuntimeComponent.g.cs | 6 ++ ...pecificWeight.WindowsRuntimeComponent.g.cs | 6 ++ .../Speed.WindowsRuntimeComponent.g.cs | 6 ++ .../Temperature.WindowsRuntimeComponent.g.cs | 6 ++ ...ureChangeRate.WindowsRuntimeComponent.g.cs | 6 ++ ...peratureDelta.WindowsRuntimeComponent.g.cs | 6 ++ ...lConductivity.WindowsRuntimeComponent.g.cs | 6 ++ ...malResistance.WindowsRuntimeComponent.g.cs | 6 ++ .../Torque.WindowsRuntimeComponent.g.cs | 6 ++ .../VitaminA.WindowsRuntimeComponent.g.cs | 6 ++ .../Volume.WindowsRuntimeComponent.g.cs | 6 ++ .../VolumeFlow.WindowsRuntimeComponent.g.cs | 6 ++ .../Quantities/Acceleration.NetFramework.g.cs | 6 ++ .../AmountOfSubstance.NetFramework.g.cs | 6 ++ .../AmplitudeRatio.NetFramework.g.cs | 6 ++ .../Quantities/Angle.NetFramework.g.cs | 6 ++ .../ApparentEnergy.NetFramework.g.cs | 6 ++ .../ApparentPower.NetFramework.g.cs | 6 ++ .../Quantities/Area.NetFramework.g.cs | 6 ++ .../Quantities/AreaDensity.NetFramework.g.cs | 6 ++ .../AreaMomentOfInertia.NetFramework.g.cs | 6 ++ .../Quantities/BitRate.NetFramework.g.cs | 6 ++ ...eSpecificFuelConsumption.NetFramework.g.cs | 6 ++ .../Quantities/Capacitance.NetFramework.g.cs | 6 ++ ...icientOfThermalExpansion.NetFramework.g.cs | 6 ++ .../Quantities/Density.NetFramework.g.cs | 6 ++ .../Quantities/Duration.NetFramework.g.cs | 6 ++ .../DynamicViscosity.NetFramework.g.cs | 6 ++ .../ElectricAdmittance.NetFramework.g.cs | 6 ++ .../ElectricCharge.NetFramework.g.cs | 6 ++ .../ElectricChargeDensity.NetFramework.g.cs | 6 ++ .../ElectricConductance.NetFramework.g.cs | 6 ++ .../ElectricConductivity.NetFramework.g.cs | 6 ++ .../ElectricCurrent.NetFramework.g.cs | 6 ++ .../ElectricCurrentDensity.NetFramework.g.cs | 6 ++ .../ElectricCurrentGradient.NetFramework.g.cs | 6 ++ .../ElectricField.NetFramework.g.cs | 6 ++ .../ElectricInductance.NetFramework.g.cs | 6 ++ .../ElectricPotential.NetFramework.g.cs | 6 ++ .../ElectricPotentialAc.NetFramework.g.cs | 6 ++ .../ElectricPotentialDc.NetFramework.g.cs | 6 ++ .../ElectricResistance.NetFramework.g.cs | 6 ++ .../ElectricResistivity.NetFramework.g.cs | 6 ++ .../Quantities/Energy.NetFramework.g.cs | 6 ++ .../Quantities/Entropy.NetFramework.g.cs | 6 ++ .../Quantities/Force.NetFramework.g.cs | 6 ++ .../ForceChangeRate.NetFramework.g.cs | 6 ++ .../ForcePerLength.NetFramework.g.cs | 6 ++ .../Quantities/Frequency.NetFramework.g.cs | 6 ++ .../Quantities/HeatFlux.NetFramework.g.cs | 6 ++ .../HeatTransferCoefficient.NetFramework.g.cs | 6 ++ .../Quantities/Illuminance.NetFramework.g.cs | 6 ++ .../Quantities/Information.NetFramework.g.cs | 6 ++ .../Quantities/Irradiance.NetFramework.g.cs | 6 ++ .../Quantities/Irradiation.NetFramework.g.cs | 6 ++ .../KinematicViscosity.NetFramework.g.cs | 6 ++ .../Quantities/LapseRate.NetFramework.g.cs | 6 ++ .../Quantities/Length.NetFramework.g.cs | 6 ++ .../Quantities/Level.NetFramework.g.cs | 6 ++ .../LinearDensity.NetFramework.g.cs | 6 ++ .../Quantities/LuminousFlux.NetFramework.g.cs | 6 ++ .../LuminousIntensity.NetFramework.g.cs | 6 ++ .../MagneticField.NetFramework.g.cs | 6 ++ .../Quantities/MagneticFlux.NetFramework.g.cs | 6 ++ .../Magnetization.NetFramework.g.cs | 6 ++ .../Quantities/Mass.NetFramework.g.cs | 6 ++ .../Quantities/MassFlow.NetFramework.g.cs | 6 ++ .../Quantities/MassFlux.NetFramework.g.cs | 6 ++ .../MassMomentOfInertia.NetFramework.g.cs | 6 ++ .../Quantities/MolarEnergy.NetFramework.g.cs | 6 ++ .../Quantities/MolarEntropy.NetFramework.g.cs | 6 ++ .../Quantities/MolarMass.NetFramework.g.cs | 6 ++ .../Quantities/Molarity.NetFramework.g.cs | 6 ++ .../Quantities/Permeability.NetFramework.g.cs | 6 ++ .../Quantities/Permittivity.NetFramework.g.cs | 6 ++ .../Quantities/Power.NetFramework.g.cs | 6 ++ .../Quantities/PowerDensity.NetFramework.g.cs | 6 ++ .../Quantities/PowerRatio.NetFramework.g.cs | 6 ++ .../Quantities/Pressure.NetFramework.g.cs | 6 ++ .../PressureChangeRate.NetFramework.g.cs | 6 ++ .../Quantities/Ratio.NetFramework.g.cs | 6 ++ .../ReactiveEnergy.NetFramework.g.cs | 6 ++ .../ReactivePower.NetFramework.g.cs | 6 ++ .../RotationalAcceleration.NetFramework.g.cs | 6 ++ .../RotationalSpeed.NetFramework.g.cs | 6 ++ .../RotationalStiffness.NetFramework.g.cs | 6 ++ ...tionalStiffnessPerLength.NetFramework.g.cs | 6 ++ .../Quantities/SolidAngle.NetFramework.g.cs | 6 ++ .../SpecificEnergy.NetFramework.g.cs | 6 ++ .../SpecificEntropy.NetFramework.g.cs | 6 ++ .../SpecificVolume.NetFramework.g.cs | 6 ++ .../SpecificWeight.NetFramework.g.cs | 6 ++ .../Quantities/Speed.NetFramework.g.cs | 6 ++ .../Quantities/Temperature.NetFramework.g.cs | 6 ++ .../TemperatureChangeRate.NetFramework.g.cs | 6 ++ .../TemperatureDelta.NetFramework.g.cs | 6 ++ .../ThermalConductivity.NetFramework.g.cs | 6 ++ .../ThermalResistance.NetFramework.g.cs | 6 ++ .../Quantities/Torque.NetFramework.g.cs | 6 ++ .../Quantities/VitaminA.NetFramework.g.cs | 6 ++ .../Quantities/Volume.NetFramework.g.cs | 6 ++ .../Quantities/VolumeFlow.NetFramework.g.cs | 6 ++ UnitsNet/GeneratedCode/Quantity.g.cs | 53 ++++++++++ UnitsNet/IQuantity.cs | 23 +++++ UnitsNet/QuantityInfo.cs | 12 +++ UnitsNet/QuantityValue.cs | 5 + ...GenerateQuantitySourceCodeNetFramework.ps1 | 6 ++ UnitsNet/UnitConverter.cs | 99 +++++++++++-------- UnitsNet/UnitsHelper.cs | 29 ++++-- 187 files changed, 1259 insertions(+), 48 deletions(-) create mode 100644 UnitsNet/GeneratedCode/Quantity.g.cs diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Acceleration.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Acceleration.WindowsRuntimeComponent.g.cs index 16770913d1..ae63b9a254 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Acceleration.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Acceleration.WindowsRuntimeComponent.g.cs @@ -664,6 +664,8 @@ public double As(AccelerationUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((AccelerationUnit) unit); + /// /// Converts this Acceleration to another Acceleration with the unit representation . /// @@ -674,6 +676,10 @@ public Acceleration ToUnit(AccelerationUnit unit) return new Acceleration(convertedValue, unit); } + IQuantity IQuantity.ToUnit(AccelerationUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((AccelerationUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmountOfSubstance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmountOfSubstance.WindowsRuntimeComponent.g.cs index 1c5c19c422..696110e23f 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmountOfSubstance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmountOfSubstance.WindowsRuntimeComponent.g.cs @@ -694,6 +694,8 @@ public double As(AmountOfSubstanceUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((AmountOfSubstanceUnit) unit); + /// /// Converts this AmountOfSubstance to another AmountOfSubstance with the unit representation . /// @@ -704,6 +706,10 @@ public AmountOfSubstance ToUnit(AmountOfSubstanceUnit unit) return new AmountOfSubstance(convertedValue, unit); } + IQuantity IQuantity.ToUnit(AmountOfSubstanceUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((AmountOfSubstanceUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmplitudeRatio.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmplitudeRatio.WindowsRuntimeComponent.g.cs index f10ded8869..c144556e06 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmplitudeRatio.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmplitudeRatio.WindowsRuntimeComponent.g.cs @@ -529,6 +529,8 @@ public double As(AmplitudeRatioUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((AmplitudeRatioUnit) unit); + /// /// Converts this AmplitudeRatio to another AmplitudeRatio with the unit representation . /// @@ -539,6 +541,10 @@ public AmplitudeRatio ToUnit(AmplitudeRatioUnit unit) return new AmplitudeRatio(convertedValue, unit); } + IQuantity IQuantity.ToUnit(AmplitudeRatioUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((AmplitudeRatioUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Angle.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Angle.WindowsRuntimeComponent.g.cs index 01c12db532..19cad413f3 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Angle.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Angle.WindowsRuntimeComponent.g.cs @@ -679,6 +679,8 @@ public double As(AngleUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((AngleUnit) unit); + /// /// Converts this Angle to another Angle with the unit representation . /// @@ -689,6 +691,10 @@ public Angle ToUnit(AngleUnit unit) return new Angle(convertedValue, unit); } + IQuantity IQuantity.ToUnit(AngleUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((AngleUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentEnergy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentEnergy.WindowsRuntimeComponent.g.cs index c0200eb565..cbf8d832d0 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentEnergy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentEnergy.WindowsRuntimeComponent.g.cs @@ -514,6 +514,8 @@ public double As(ApparentEnergyUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ApparentEnergyUnit) unit); + /// /// Converts this ApparentEnergy to another ApparentEnergy with the unit representation . /// @@ -524,6 +526,10 @@ public ApparentEnergy ToUnit(ApparentEnergyUnit unit) return new ApparentEnergy(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ApparentEnergyUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ApparentEnergyUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentPower.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentPower.WindowsRuntimeComponent.g.cs index f55df009f8..90eda04352 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentPower.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentPower.WindowsRuntimeComponent.g.cs @@ -529,6 +529,8 @@ public double As(ApparentPowerUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ApparentPowerUnit) unit); + /// /// Converts this ApparentPower to another ApparentPower with the unit representation . /// @@ -539,6 +541,10 @@ public ApparentPower ToUnit(ApparentPowerUnit unit) return new ApparentPower(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ApparentPowerUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ApparentPowerUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Area.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Area.WindowsRuntimeComponent.g.cs index 818c44ed35..718338e4b3 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Area.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Area.WindowsRuntimeComponent.g.cs @@ -664,6 +664,8 @@ public double As(AreaUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((AreaUnit) unit); + /// /// Converts this Area to another Area with the unit representation . /// @@ -674,6 +676,10 @@ public Area ToUnit(AreaUnit unit) return new Area(convertedValue, unit); } + IQuantity IQuantity.ToUnit(AreaUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((AreaUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaDensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaDensity.WindowsRuntimeComponent.g.cs index e624e0bfa1..2242cd140d 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaDensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaDensity.WindowsRuntimeComponent.g.cs @@ -484,6 +484,8 @@ public double As(AreaDensityUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((AreaDensityUnit) unit); + /// /// Converts this AreaDensity to another AreaDensity with the unit representation . /// @@ -494,6 +496,10 @@ public AreaDensity ToUnit(AreaDensityUnit unit) return new AreaDensity(convertedValue, unit); } + IQuantity IQuantity.ToUnit(AreaDensityUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((AreaDensityUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaMomentOfInertia.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaMomentOfInertia.WindowsRuntimeComponent.g.cs index 55bed2ae80..7803632d5e 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaMomentOfInertia.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaMomentOfInertia.WindowsRuntimeComponent.g.cs @@ -559,6 +559,8 @@ public double As(AreaMomentOfInertiaUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((AreaMomentOfInertiaUnit) unit); + /// /// Converts this AreaMomentOfInertia to another AreaMomentOfInertia with the unit representation . /// @@ -569,6 +571,10 @@ public AreaMomentOfInertia ToUnit(AreaMomentOfInertiaUnit unit) return new AreaMomentOfInertia(convertedValue, unit); } + IQuantity IQuantity.ToUnit(AreaMomentOfInertiaUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((AreaMomentOfInertiaUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BitRate.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BitRate.WindowsRuntimeComponent.g.cs index da3d4e5463..3f2d4d81bb 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BitRate.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BitRate.WindowsRuntimeComponent.g.cs @@ -862,6 +862,8 @@ public double As(BitRateUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((BitRateUnit) unit); + /// /// Converts this BitRate to another BitRate with the unit representation . /// @@ -872,6 +874,10 @@ public BitRate ToUnit(BitRateUnit unit) return new BitRate(convertedValue, unit); } + IQuantity IQuantity.ToUnit(BitRateUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((BitRateUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.WindowsRuntimeComponent.g.cs index cf6f354e53..a901eef7e2 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.WindowsRuntimeComponent.g.cs @@ -514,6 +514,8 @@ public double As(BrakeSpecificFuelConsumptionUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((BrakeSpecificFuelConsumptionUnit) unit); + /// /// Converts this BrakeSpecificFuelConsumption to another BrakeSpecificFuelConsumption with the unit representation . /// @@ -524,6 +526,10 @@ public BrakeSpecificFuelConsumption ToUnit(BrakeSpecificFuelConsumptionUnit unit return new BrakeSpecificFuelConsumption(convertedValue, unit); } + IQuantity IQuantity.ToUnit(BrakeSpecificFuelConsumptionUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((BrakeSpecificFuelConsumptionUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Capacitance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Capacitance.WindowsRuntimeComponent.g.cs index 9cd8f29f30..a2a185ebeb 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Capacitance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Capacitance.WindowsRuntimeComponent.g.cs @@ -577,6 +577,8 @@ public double As(CapacitanceUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((CapacitanceUnit) unit); + /// /// Converts this Capacitance to another Capacitance with the unit representation . /// @@ -587,6 +589,10 @@ public Capacitance ToUnit(CapacitanceUnit unit) return new Capacitance(convertedValue, unit); } + IQuantity IQuantity.ToUnit(CapacitanceUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((CapacitanceUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/CoefficientOfThermalExpansion.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/CoefficientOfThermalExpansion.WindowsRuntimeComponent.g.cs index e0cd26f093..f9bf801bd0 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/CoefficientOfThermalExpansion.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/CoefficientOfThermalExpansion.WindowsRuntimeComponent.g.cs @@ -514,6 +514,8 @@ public double As(CoefficientOfThermalExpansionUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((CoefficientOfThermalExpansionUnit) unit); + /// /// Converts this CoefficientOfThermalExpansion to another CoefficientOfThermalExpansion with the unit representation . /// @@ -524,6 +526,10 @@ public CoefficientOfThermalExpansion ToUnit(CoefficientOfThermalExpansionUnit un return new CoefficientOfThermalExpansion(convertedValue, unit); } + IQuantity IQuantity.ToUnit(CoefficientOfThermalExpansionUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((CoefficientOfThermalExpansionUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Density.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Density.WindowsRuntimeComponent.g.cs index abb5684de8..cbf585ff90 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Density.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Density.WindowsRuntimeComponent.g.cs @@ -1057,6 +1057,8 @@ public double As(DensityUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((DensityUnit) unit); + /// /// Converts this Density to another Density with the unit representation . /// @@ -1067,6 +1069,10 @@ public Density ToUnit(DensityUnit unit) return new Density(convertedValue, unit); } + IQuantity IQuantity.ToUnit(DensityUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((DensityUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Duration.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Duration.WindowsRuntimeComponent.g.cs index 533e95f986..e82a292810 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Duration.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Duration.WindowsRuntimeComponent.g.cs @@ -619,6 +619,8 @@ public double As(DurationUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((DurationUnit) unit); + /// /// Converts this Duration to another Duration with the unit representation . /// @@ -629,6 +631,10 @@ public Duration ToUnit(DurationUnit unit) return new Duration(convertedValue, unit); } + IQuantity IQuantity.ToUnit(DurationUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((DurationUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/DynamicViscosity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/DynamicViscosity.WindowsRuntimeComponent.g.cs index 57a34a63a9..5767c625a8 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/DynamicViscosity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/DynamicViscosity.WindowsRuntimeComponent.g.cs @@ -562,6 +562,8 @@ public double As(DynamicViscosityUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((DynamicViscosityUnit) unit); + /// /// Converts this DynamicViscosity to another DynamicViscosity with the unit representation . /// @@ -572,6 +574,10 @@ public DynamicViscosity ToUnit(DynamicViscosityUnit unit) return new DynamicViscosity(convertedValue, unit); } + IQuantity IQuantity.ToUnit(DynamicViscosityUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((DynamicViscosityUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricAdmittance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricAdmittance.WindowsRuntimeComponent.g.cs index 012fd3d61e..f63e1428dd 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricAdmittance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricAdmittance.WindowsRuntimeComponent.g.cs @@ -529,6 +529,8 @@ public double As(ElectricAdmittanceUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ElectricAdmittanceUnit) unit); + /// /// Converts this ElectricAdmittance to another ElectricAdmittance with the unit representation . /// @@ -539,6 +541,10 @@ public ElectricAdmittance ToUnit(ElectricAdmittanceUnit unit) return new ElectricAdmittance(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ElectricAdmittanceUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ElectricAdmittanceUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCharge.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCharge.WindowsRuntimeComponent.g.cs index d1228d5304..57baa5a875 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCharge.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCharge.WindowsRuntimeComponent.g.cs @@ -487,6 +487,8 @@ public double As(ElectricChargeUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ElectricChargeUnit) unit); + /// /// Converts this ElectricCharge to another ElectricCharge with the unit representation . /// @@ -497,6 +499,10 @@ public ElectricCharge ToUnit(ElectricChargeUnit unit) return new ElectricCharge(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ElectricChargeUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ElectricChargeUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricChargeDensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricChargeDensity.WindowsRuntimeComponent.g.cs index 77abfa7af8..27e9a3cdc2 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricChargeDensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricChargeDensity.WindowsRuntimeComponent.g.cs @@ -487,6 +487,8 @@ public double As(ElectricChargeDensityUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ElectricChargeDensityUnit) unit); + /// /// Converts this ElectricChargeDensity to another ElectricChargeDensity with the unit representation . /// @@ -497,6 +499,10 @@ public ElectricChargeDensity ToUnit(ElectricChargeDensityUnit unit) return new ElectricChargeDensity(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ElectricChargeDensityUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ElectricChargeDensityUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductance.WindowsRuntimeComponent.g.cs index 36e543eaf7..e692bd7327 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductance.WindowsRuntimeComponent.g.cs @@ -517,6 +517,8 @@ public double As(ElectricConductanceUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ElectricConductanceUnit) unit); + /// /// Converts this ElectricConductance to another ElectricConductance with the unit representation . /// @@ -527,6 +529,10 @@ public ElectricConductance ToUnit(ElectricConductanceUnit unit) return new ElectricConductance(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ElectricConductanceUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ElectricConductanceUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductivity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductivity.WindowsRuntimeComponent.g.cs index 3ff5c11d80..bfbe8e59bb 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductivity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductivity.WindowsRuntimeComponent.g.cs @@ -487,6 +487,8 @@ public double As(ElectricConductivityUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ElectricConductivityUnit) unit); + /// /// Converts this ElectricConductivity to another ElectricConductivity with the unit representation . /// @@ -497,6 +499,10 @@ public ElectricConductivity ToUnit(ElectricConductivityUnit unit) return new ElectricConductivity(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ElectricConductivityUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ElectricConductivityUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrent.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrent.WindowsRuntimeComponent.g.cs index aed77dcc70..598b51c983 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrent.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrent.WindowsRuntimeComponent.g.cs @@ -589,6 +589,8 @@ public double As(ElectricCurrentUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ElectricCurrentUnit) unit); + /// /// Converts this ElectricCurrent to another ElectricCurrent with the unit representation . /// @@ -599,6 +601,10 @@ public ElectricCurrent ToUnit(ElectricCurrentUnit unit) return new ElectricCurrent(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ElectricCurrentUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ElectricCurrentUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentDensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentDensity.WindowsRuntimeComponent.g.cs index 138d98c607..40a30d4cf5 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentDensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentDensity.WindowsRuntimeComponent.g.cs @@ -487,6 +487,8 @@ public double As(ElectricCurrentDensityUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ElectricCurrentDensityUnit) unit); + /// /// Converts this ElectricCurrentDensity to another ElectricCurrentDensity with the unit representation . /// @@ -497,6 +499,10 @@ public ElectricCurrentDensity ToUnit(ElectricCurrentDensityUnit unit) return new ElectricCurrentDensity(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ElectricCurrentDensityUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ElectricCurrentDensityUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentGradient.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentGradient.WindowsRuntimeComponent.g.cs index 07021544c2..eb2648e20b 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentGradient.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentGradient.WindowsRuntimeComponent.g.cs @@ -484,6 +484,8 @@ public double As(ElectricCurrentGradientUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ElectricCurrentGradientUnit) unit); + /// /// Converts this ElectricCurrentGradient to another ElectricCurrentGradient with the unit representation . /// @@ -494,6 +496,10 @@ public ElectricCurrentGradient ToUnit(ElectricCurrentGradientUnit unit) return new ElectricCurrentGradient(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ElectricCurrentGradientUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ElectricCurrentGradientUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricField.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricField.WindowsRuntimeComponent.g.cs index bcc32778a8..6dda665958 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricField.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricField.WindowsRuntimeComponent.g.cs @@ -487,6 +487,8 @@ public double As(ElectricFieldUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ElectricFieldUnit) unit); + /// /// Converts this ElectricField to another ElectricField with the unit representation . /// @@ -497,6 +499,10 @@ public ElectricField ToUnit(ElectricFieldUnit unit) return new ElectricField(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ElectricFieldUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ElectricFieldUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricInductance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricInductance.WindowsRuntimeComponent.g.cs index 00d5abf728..82847992de 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricInductance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricInductance.WindowsRuntimeComponent.g.cs @@ -532,6 +532,8 @@ public double As(ElectricInductanceUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ElectricInductanceUnit) unit); + /// /// Converts this ElectricInductance to another ElectricInductance with the unit representation . /// @@ -542,6 +544,10 @@ public ElectricInductance ToUnit(ElectricInductanceUnit unit) return new ElectricInductance(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ElectricInductanceUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ElectricInductanceUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotential.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotential.WindowsRuntimeComponent.g.cs index 2f3adf96b5..c4c88da9a0 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotential.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotential.WindowsRuntimeComponent.g.cs @@ -544,6 +544,8 @@ public double As(ElectricPotentialUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ElectricPotentialUnit) unit); + /// /// Converts this ElectricPotential to another ElectricPotential with the unit representation . /// @@ -554,6 +556,10 @@ public ElectricPotential ToUnit(ElectricPotentialUnit unit) return new ElectricPotential(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ElectricPotentialUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ElectricPotentialUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialAc.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialAc.WindowsRuntimeComponent.g.cs index c33e43413a..c485537d95 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialAc.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialAc.WindowsRuntimeComponent.g.cs @@ -544,6 +544,8 @@ public double As(ElectricPotentialAcUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ElectricPotentialAcUnit) unit); + /// /// Converts this ElectricPotentialAc to another ElectricPotentialAc with the unit representation . /// @@ -554,6 +556,10 @@ public ElectricPotentialAc ToUnit(ElectricPotentialAcUnit unit) return new ElectricPotentialAc(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ElectricPotentialAcUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ElectricPotentialAcUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialDc.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialDc.WindowsRuntimeComponent.g.cs index a00d775f6d..fe8feedac0 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialDc.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialDc.WindowsRuntimeComponent.g.cs @@ -544,6 +544,8 @@ public double As(ElectricPotentialDcUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ElectricPotentialDcUnit) unit); + /// /// Converts this ElectricPotentialDc to another ElectricPotentialDc with the unit representation . /// @@ -554,6 +556,10 @@ public ElectricPotentialDc ToUnit(ElectricPotentialDcUnit unit) return new ElectricPotentialDc(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ElectricPotentialDcUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ElectricPotentialDcUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistance.WindowsRuntimeComponent.g.cs index f5c8f9957d..ed9f89b5cb 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistance.WindowsRuntimeComponent.g.cs @@ -544,6 +544,8 @@ public double As(ElectricResistanceUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ElectricResistanceUnit) unit); + /// /// Converts this ElectricResistance to another ElectricResistance with the unit representation . /// @@ -554,6 +556,10 @@ public ElectricResistance ToUnit(ElectricResistanceUnit unit) return new ElectricResistance(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ElectricResistanceUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ElectricResistanceUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistivity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistivity.WindowsRuntimeComponent.g.cs index 6fc2fbc80a..64c0fae761 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistivity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistivity.WindowsRuntimeComponent.g.cs @@ -682,6 +682,8 @@ public double As(ElectricResistivityUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ElectricResistivityUnit) unit); + /// /// Converts this ElectricResistivity to another ElectricResistivity with the unit representation . /// @@ -692,6 +694,10 @@ public ElectricResistivity ToUnit(ElectricResistivityUnit unit) return new ElectricResistivity(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ElectricResistivityUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ElectricResistivityUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Energy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Energy.WindowsRuntimeComponent.g.cs index 318689a99b..f39e6ffef8 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Energy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Energy.WindowsRuntimeComponent.g.cs @@ -799,6 +799,8 @@ public double As(EnergyUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((EnergyUnit) unit); + /// /// Converts this Energy to another Energy with the unit representation . /// @@ -809,6 +811,10 @@ public Energy ToUnit(EnergyUnit unit) return new Energy(convertedValue, unit); } + IQuantity IQuantity.ToUnit(EnergyUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((EnergyUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Entropy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Entropy.WindowsRuntimeComponent.g.cs index 1123e62f99..c9c4e218f1 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Entropy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Entropy.WindowsRuntimeComponent.g.cs @@ -574,6 +574,8 @@ public double As(EntropyUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((EntropyUnit) unit); + /// /// Converts this Entropy to another Entropy with the unit representation . /// @@ -584,6 +586,10 @@ public Entropy ToUnit(EntropyUnit unit) return new Entropy(convertedValue, unit); } + IQuantity IQuantity.ToUnit(EntropyUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((EntropyUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Force.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Force.WindowsRuntimeComponent.g.cs index a17fc4e795..7bd1dcf139 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Force.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Force.WindowsRuntimeComponent.g.cs @@ -664,6 +664,8 @@ public double As(ForceUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ForceUnit) unit); + /// /// Converts this Force to another Force with the unit representation . /// @@ -674,6 +676,10 @@ public Force ToUnit(ForceUnit unit) return new Force(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ForceUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ForceUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForceChangeRate.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForceChangeRate.WindowsRuntimeComponent.g.cs index bd14952391..dc02f03aad 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForceChangeRate.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForceChangeRate.WindowsRuntimeComponent.g.cs @@ -634,6 +634,8 @@ public double As(ForceChangeRateUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ForceChangeRateUnit) unit); + /// /// Converts this ForceChangeRate to another ForceChangeRate with the unit representation . /// @@ -644,6 +646,10 @@ public ForceChangeRate ToUnit(ForceChangeRateUnit unit) return new ForceChangeRate(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ForceChangeRateUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ForceChangeRateUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForcePerLength.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForcePerLength.WindowsRuntimeComponent.g.cs index bd1013b69b..9b805aeb14 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForcePerLength.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForcePerLength.WindowsRuntimeComponent.g.cs @@ -604,6 +604,8 @@ public double As(ForcePerLengthUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ForcePerLengthUnit) unit); + /// /// Converts this ForcePerLength to another ForcePerLength with the unit representation . /// @@ -614,6 +616,10 @@ public ForcePerLength ToUnit(ForcePerLengthUnit unit) return new ForcePerLength(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ForcePerLengthUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ForcePerLengthUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Frequency.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Frequency.WindowsRuntimeComponent.g.cs index 5e690d402a..eda2fede3e 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Frequency.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Frequency.WindowsRuntimeComponent.g.cs @@ -589,6 +589,8 @@ public double As(FrequencyUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((FrequencyUnit) unit); + /// /// Converts this Frequency to another Frequency with the unit representation . /// @@ -599,6 +601,10 @@ public Frequency ToUnit(FrequencyUnit unit) return new Frequency(convertedValue, unit); } + IQuantity IQuantity.ToUnit(FrequencyUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((FrequencyUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatFlux.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatFlux.WindowsRuntimeComponent.g.cs index 8cac7c3e95..3bc33cb85e 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatFlux.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatFlux.WindowsRuntimeComponent.g.cs @@ -739,6 +739,8 @@ public double As(HeatFluxUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((HeatFluxUnit) unit); + /// /// Converts this HeatFlux to another HeatFlux with the unit representation . /// @@ -749,6 +751,10 @@ public HeatFlux ToUnit(HeatFluxUnit unit) return new HeatFlux(convertedValue, unit); } + IQuantity IQuantity.ToUnit(HeatFluxUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((HeatFluxUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatTransferCoefficient.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatTransferCoefficient.WindowsRuntimeComponent.g.cs index 754d2aa5bd..3fd3b1c8e2 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatTransferCoefficient.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatTransferCoefficient.WindowsRuntimeComponent.g.cs @@ -499,6 +499,8 @@ public double As(HeatTransferCoefficientUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((HeatTransferCoefficientUnit) unit); + /// /// Converts this HeatTransferCoefficient to another HeatTransferCoefficient with the unit representation . /// @@ -509,6 +511,10 @@ public HeatTransferCoefficient ToUnit(HeatTransferCoefficientUnit unit) return new HeatTransferCoefficient(convertedValue, unit); } + IQuantity IQuantity.ToUnit(HeatTransferCoefficientUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((HeatTransferCoefficientUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Illuminance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Illuminance.WindowsRuntimeComponent.g.cs index a4e7ae0997..80a398cda8 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Illuminance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Illuminance.WindowsRuntimeComponent.g.cs @@ -532,6 +532,8 @@ public double As(IlluminanceUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((IlluminanceUnit) unit); + /// /// Converts this Illuminance to another Illuminance with the unit representation . /// @@ -542,6 +544,10 @@ public Illuminance ToUnit(IlluminanceUnit unit) return new Illuminance(convertedValue, unit); } + IQuantity IQuantity.ToUnit(IlluminanceUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((IlluminanceUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Information.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Information.WindowsRuntimeComponent.g.cs index e6a47693c2..4a6be13c50 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Information.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Information.WindowsRuntimeComponent.g.cs @@ -859,6 +859,8 @@ public double As(InformationUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((InformationUnit) unit); + /// /// Converts this Information to another Information with the unit representation . /// @@ -869,6 +871,10 @@ public Information ToUnit(InformationUnit unit) return new Information(convertedValue, unit); } + IQuantity IQuantity.ToUnit(InformationUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((InformationUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiance.WindowsRuntimeComponent.g.cs index 28860370fb..c11241228f 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiance.WindowsRuntimeComponent.g.cs @@ -679,6 +679,8 @@ public double As(IrradianceUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((IrradianceUnit) unit); + /// /// Converts this Irradiance to another Irradiance with the unit representation . /// @@ -689,6 +691,10 @@ public Irradiance ToUnit(IrradianceUnit unit) return new Irradiance(convertedValue, unit); } + IQuantity IQuantity.ToUnit(IrradianceUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((IrradianceUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiation.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiation.WindowsRuntimeComponent.g.cs index 56a0132784..b20d58deaf 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiation.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiation.WindowsRuntimeComponent.g.cs @@ -532,6 +532,8 @@ public double As(IrradiationUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((IrradiationUnit) unit); + /// /// Converts this Irradiation to another Irradiation with the unit representation . /// @@ -542,6 +544,10 @@ public Irradiation ToUnit(IrradiationUnit unit) return new Irradiation(convertedValue, unit); } + IQuantity IQuantity.ToUnit(IrradiationUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((IrradiationUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/KinematicViscosity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/KinematicViscosity.WindowsRuntimeComponent.g.cs index 254ea11a8c..b9ade0594d 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/KinematicViscosity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/KinematicViscosity.WindowsRuntimeComponent.g.cs @@ -592,6 +592,8 @@ public double As(KinematicViscosityUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((KinematicViscosityUnit) unit); + /// /// Converts this KinematicViscosity to another KinematicViscosity with the unit representation . /// @@ -602,6 +604,10 @@ public KinematicViscosity ToUnit(KinematicViscosityUnit unit) return new KinematicViscosity(convertedValue, unit); } + IQuantity IQuantity.ToUnit(KinematicViscosityUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((KinematicViscosityUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LapseRate.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LapseRate.WindowsRuntimeComponent.g.cs index 8f3fdee68e..5ea94135bd 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LapseRate.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LapseRate.WindowsRuntimeComponent.g.cs @@ -484,6 +484,8 @@ public double As(LapseRateUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((LapseRateUnit) unit); + /// /// Converts this LapseRate to another LapseRate with the unit representation . /// @@ -494,6 +496,10 @@ public LapseRate ToUnit(LapseRateUnit unit) return new LapseRate(convertedValue, unit); } + IQuantity IQuantity.ToUnit(LapseRateUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((LapseRateUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Length.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Length.WindowsRuntimeComponent.g.cs index 478f156e94..adf1ed5693 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Length.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Length.WindowsRuntimeComponent.g.cs @@ -799,6 +799,8 @@ public double As(LengthUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((LengthUnit) unit); + /// /// Converts this Length to another Length with the unit representation . /// @@ -809,6 +811,10 @@ public Length ToUnit(LengthUnit unit) return new Length(convertedValue, unit); } + IQuantity IQuantity.ToUnit(LengthUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((LengthUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Level.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Level.WindowsRuntimeComponent.g.cs index 504b0ffee1..e2d19652f5 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Level.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Level.WindowsRuntimeComponent.g.cs @@ -499,6 +499,8 @@ public double As(LevelUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((LevelUnit) unit); + /// /// Converts this Level to another Level with the unit representation . /// @@ -509,6 +511,10 @@ public Level ToUnit(LevelUnit unit) return new Level(convertedValue, unit); } + IQuantity IQuantity.ToUnit(LevelUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((LevelUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LinearDensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LinearDensity.WindowsRuntimeComponent.g.cs index b9426c9f06..0a97676052 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LinearDensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LinearDensity.WindowsRuntimeComponent.g.cs @@ -517,6 +517,8 @@ public double As(LinearDensityUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((LinearDensityUnit) unit); + /// /// Converts this LinearDensity to another LinearDensity with the unit representation . /// @@ -527,6 +529,10 @@ public LinearDensity ToUnit(LinearDensityUnit unit) return new LinearDensity(convertedValue, unit); } + IQuantity IQuantity.ToUnit(LinearDensityUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((LinearDensityUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousFlux.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousFlux.WindowsRuntimeComponent.g.cs index 4c06b42510..b4e4176fbf 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousFlux.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousFlux.WindowsRuntimeComponent.g.cs @@ -487,6 +487,8 @@ public double As(LuminousFluxUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((LuminousFluxUnit) unit); + /// /// Converts this LuminousFlux to another LuminousFlux with the unit representation . /// @@ -497,6 +499,10 @@ public LuminousFlux ToUnit(LuminousFluxUnit unit) return new LuminousFlux(convertedValue, unit); } + IQuantity IQuantity.ToUnit(LuminousFluxUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((LuminousFluxUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousIntensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousIntensity.WindowsRuntimeComponent.g.cs index b2731feb07..1463fa1725 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousIntensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousIntensity.WindowsRuntimeComponent.g.cs @@ -487,6 +487,8 @@ public double As(LuminousIntensityUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((LuminousIntensityUnit) unit); + /// /// Converts this LuminousIntensity to another LuminousIntensity with the unit representation . /// @@ -497,6 +499,10 @@ public LuminousIntensity ToUnit(LuminousIntensityUnit unit) return new LuminousIntensity(convertedValue, unit); } + IQuantity IQuantity.ToUnit(LuminousIntensityUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((LuminousIntensityUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticField.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticField.WindowsRuntimeComponent.g.cs index f841c52ac2..ddfd0708ea 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticField.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticField.WindowsRuntimeComponent.g.cs @@ -532,6 +532,8 @@ public double As(MagneticFieldUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((MagneticFieldUnit) unit); + /// /// Converts this MagneticField to another MagneticField with the unit representation . /// @@ -542,6 +544,10 @@ public MagneticField ToUnit(MagneticFieldUnit unit) return new MagneticField(convertedValue, unit); } + IQuantity IQuantity.ToUnit(MagneticFieldUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((MagneticFieldUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticFlux.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticFlux.WindowsRuntimeComponent.g.cs index fb1f50cd93..1150703320 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticFlux.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticFlux.WindowsRuntimeComponent.g.cs @@ -487,6 +487,8 @@ public double As(MagneticFluxUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((MagneticFluxUnit) unit); + /// /// Converts this MagneticFlux to another MagneticFlux with the unit representation . /// @@ -497,6 +499,10 @@ public MagneticFlux ToUnit(MagneticFluxUnit unit) return new MagneticFlux(convertedValue, unit); } + IQuantity IQuantity.ToUnit(MagneticFluxUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((MagneticFluxUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Magnetization.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Magnetization.WindowsRuntimeComponent.g.cs index e631b2b754..cc66409d14 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Magnetization.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Magnetization.WindowsRuntimeComponent.g.cs @@ -487,6 +487,8 @@ public double As(MagnetizationUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((MagnetizationUnit) unit); + /// /// Converts this Magnetization to another Magnetization with the unit representation . /// @@ -497,6 +499,10 @@ public Magnetization ToUnit(MagnetizationUnit unit) return new Magnetization(convertedValue, unit); } + IQuantity IQuantity.ToUnit(MagnetizationUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((MagnetizationUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Mass.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Mass.WindowsRuntimeComponent.g.cs index 10022db38a..433f6fbbe7 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Mass.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Mass.WindowsRuntimeComponent.g.cs @@ -814,6 +814,8 @@ public double As(MassUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((MassUnit) unit); + /// /// Converts this Mass to another Mass with the unit representation . /// @@ -824,6 +826,10 @@ public Mass ToUnit(MassUnit unit) return new Mass(convertedValue, unit); } + IQuantity IQuantity.ToUnit(MassUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((MassUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlow.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlow.WindowsRuntimeComponent.g.cs index ea7c575cbf..be37fce653 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlow.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlow.WindowsRuntimeComponent.g.cs @@ -919,6 +919,8 @@ public double As(MassFlowUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((MassFlowUnit) unit); + /// /// Converts this MassFlow to another MassFlow with the unit representation . /// @@ -929,6 +931,10 @@ public MassFlow ToUnit(MassFlowUnit unit) return new MassFlow(convertedValue, unit); } + IQuantity IQuantity.ToUnit(MassFlowUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((MassFlowUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlux.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlux.WindowsRuntimeComponent.g.cs index a23ed66e8c..f2a9a4378e 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlux.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlux.WindowsRuntimeComponent.g.cs @@ -499,6 +499,8 @@ public double As(MassFluxUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((MassFluxUnit) unit); + /// /// Converts this MassFlux to another MassFlux with the unit representation . /// @@ -509,6 +511,10 @@ public MassFlux ToUnit(MassFluxUnit unit) return new MassFlux(convertedValue, unit); } + IQuantity IQuantity.ToUnit(MassFluxUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((MassFluxUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassMomentOfInertia.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassMomentOfInertia.WindowsRuntimeComponent.g.cs index 0585fab60d..07f39d2947 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassMomentOfInertia.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassMomentOfInertia.WindowsRuntimeComponent.g.cs @@ -889,6 +889,8 @@ public double As(MassMomentOfInertiaUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((MassMomentOfInertiaUnit) unit); + /// /// Converts this MassMomentOfInertia to another MassMomentOfInertia with the unit representation . /// @@ -899,6 +901,10 @@ public MassMomentOfInertia ToUnit(MassMomentOfInertiaUnit unit) return new MassMomentOfInertia(convertedValue, unit); } + IQuantity IQuantity.ToUnit(MassMomentOfInertiaUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((MassMomentOfInertiaUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEnergy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEnergy.WindowsRuntimeComponent.g.cs index 40714747ed..0e73f05ed0 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEnergy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEnergy.WindowsRuntimeComponent.g.cs @@ -514,6 +514,8 @@ public double As(MolarEnergyUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((MolarEnergyUnit) unit); + /// /// Converts this MolarEnergy to another MolarEnergy with the unit representation . /// @@ -524,6 +526,10 @@ public MolarEnergy ToUnit(MolarEnergyUnit unit) return new MolarEnergy(convertedValue, unit); } + IQuantity IQuantity.ToUnit(MolarEnergyUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((MolarEnergyUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEntropy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEntropy.WindowsRuntimeComponent.g.cs index aa15f6976b..66e1b3856e 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEntropy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEntropy.WindowsRuntimeComponent.g.cs @@ -514,6 +514,8 @@ public double As(MolarEntropyUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((MolarEntropyUnit) unit); + /// /// Converts this MolarEntropy to another MolarEntropy with the unit representation . /// @@ -524,6 +526,10 @@ public MolarEntropy ToUnit(MolarEntropyUnit unit) return new MolarEntropy(convertedValue, unit); } + IQuantity IQuantity.ToUnit(MolarEntropyUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((MolarEntropyUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarMass.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarMass.WindowsRuntimeComponent.g.cs index 4c0aff5e7f..9a51e42b69 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarMass.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarMass.WindowsRuntimeComponent.g.cs @@ -649,6 +649,8 @@ public double As(MolarMassUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((MolarMassUnit) unit); + /// /// Converts this MolarMass to another MolarMass with the unit representation . /// @@ -659,6 +661,10 @@ public MolarMass ToUnit(MolarMassUnit unit) return new MolarMass(convertedValue, unit); } + IQuantity IQuantity.ToUnit(MolarMassUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((MolarMassUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Molarity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Molarity.WindowsRuntimeComponent.g.cs index 7956b61e36..ad877a8144 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Molarity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Molarity.WindowsRuntimeComponent.g.cs @@ -592,6 +592,8 @@ public double As(MolarityUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((MolarityUnit) unit); + /// /// Converts this Molarity to another Molarity with the unit representation . /// @@ -602,6 +604,10 @@ public Molarity ToUnit(MolarityUnit unit) return new Molarity(convertedValue, unit); } + IQuantity IQuantity.ToUnit(MolarityUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((MolarityUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permeability.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permeability.WindowsRuntimeComponent.g.cs index 4c27d95bd6..49e01bbd30 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permeability.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permeability.WindowsRuntimeComponent.g.cs @@ -487,6 +487,8 @@ public double As(PermeabilityUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((PermeabilityUnit) unit); + /// /// Converts this Permeability to another Permeability with the unit representation . /// @@ -497,6 +499,10 @@ public Permeability ToUnit(PermeabilityUnit unit) return new Permeability(convertedValue, unit); } + IQuantity IQuantity.ToUnit(PermeabilityUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((PermeabilityUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permittivity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permittivity.WindowsRuntimeComponent.g.cs index 64b6c01162..aa4127fa53 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permittivity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permittivity.WindowsRuntimeComponent.g.cs @@ -487,6 +487,8 @@ public double As(PermittivityUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((PermittivityUnit) unit); + /// /// Converts this Permittivity to another Permittivity with the unit representation . /// @@ -497,6 +499,10 @@ public Permittivity ToUnit(PermittivityUnit unit) return new Permittivity(convertedValue, unit); } + IQuantity IQuantity.ToUnit(PermittivityUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((PermittivityUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Power.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Power.WindowsRuntimeComponent.g.cs index 6ff941de30..232452c8d8 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Power.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Power.WindowsRuntimeComponent.g.cs @@ -769,6 +769,8 @@ public double As(PowerUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((PowerUnit) unit); + /// /// Converts this Power to another Power with the unit representation . /// @@ -779,6 +781,10 @@ public Power ToUnit(PowerUnit unit) return new Power(convertedValue, unit); } + IQuantity IQuantity.ToUnit(PowerUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((PowerUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerDensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerDensity.WindowsRuntimeComponent.g.cs index 547a2a5100..9962562545 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerDensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerDensity.WindowsRuntimeComponent.g.cs @@ -1129,6 +1129,8 @@ public double As(PowerDensityUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((PowerDensityUnit) unit); + /// /// Converts this PowerDensity to another PowerDensity with the unit representation . /// @@ -1139,6 +1141,10 @@ public PowerDensity ToUnit(PowerDensityUnit unit) return new PowerDensity(convertedValue, unit); } + IQuantity IQuantity.ToUnit(PowerDensityUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((PowerDensityUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerRatio.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerRatio.WindowsRuntimeComponent.g.cs index 3b29752381..3a822e938e 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerRatio.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerRatio.WindowsRuntimeComponent.g.cs @@ -499,6 +499,8 @@ public double As(PowerRatioUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((PowerRatioUnit) unit); + /// /// Converts this PowerRatio to another PowerRatio with the unit representation . /// @@ -509,6 +511,10 @@ public PowerRatio ToUnit(PowerRatioUnit unit) return new PowerRatio(convertedValue, unit); } + IQuantity IQuantity.ToUnit(PowerRatioUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((PowerRatioUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Pressure.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Pressure.WindowsRuntimeComponent.g.cs index d14cff6dfc..4182be0042 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Pressure.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Pressure.WindowsRuntimeComponent.g.cs @@ -1099,6 +1099,8 @@ public double As(PressureUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((PressureUnit) unit); + /// /// Converts this Pressure to another Pressure with the unit representation . /// @@ -1109,6 +1111,10 @@ public Pressure ToUnit(PressureUnit unit) return new Pressure(convertedValue, unit); } + IQuantity IQuantity.ToUnit(PressureUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((PressureUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PressureChangeRate.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PressureChangeRate.WindowsRuntimeComponent.g.cs index 59753eafe1..aba1d119aa 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PressureChangeRate.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PressureChangeRate.WindowsRuntimeComponent.g.cs @@ -574,6 +574,8 @@ public double As(PressureChangeRateUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((PressureChangeRateUnit) unit); + /// /// Converts this PressureChangeRate to another PressureChangeRate with the unit representation . /// @@ -584,6 +586,10 @@ public PressureChangeRate ToUnit(PressureChangeRateUnit unit) return new PressureChangeRate(convertedValue, unit); } + IQuantity IQuantity.ToUnit(PressureChangeRateUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((PressureChangeRateUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Ratio.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Ratio.WindowsRuntimeComponent.g.cs index d8d5a39f71..cc065a2cf3 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Ratio.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Ratio.WindowsRuntimeComponent.g.cs @@ -559,6 +559,8 @@ public double As(RatioUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((RatioUnit) unit); + /// /// Converts this Ratio to another Ratio with the unit representation . /// @@ -569,6 +571,10 @@ public Ratio ToUnit(RatioUnit unit) return new Ratio(convertedValue, unit); } + IQuantity IQuantity.ToUnit(RatioUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((RatioUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactiveEnergy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactiveEnergy.WindowsRuntimeComponent.g.cs index c64852e303..07ca3ac831 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactiveEnergy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactiveEnergy.WindowsRuntimeComponent.g.cs @@ -514,6 +514,8 @@ public double As(ReactiveEnergyUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ReactiveEnergyUnit) unit); + /// /// Converts this ReactiveEnergy to another ReactiveEnergy with the unit representation . /// @@ -524,6 +526,10 @@ public ReactiveEnergy ToUnit(ReactiveEnergyUnit unit) return new ReactiveEnergy(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ReactiveEnergyUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ReactiveEnergyUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactivePower.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactivePower.WindowsRuntimeComponent.g.cs index 34da3fdaf5..ac37b6dc5f 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactivePower.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactivePower.WindowsRuntimeComponent.g.cs @@ -529,6 +529,8 @@ public double As(ReactivePowerUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ReactivePowerUnit) unit); + /// /// Converts this ReactivePower to another ReactivePower with the unit representation . /// @@ -539,6 +541,10 @@ public ReactivePower ToUnit(ReactivePowerUnit unit) return new ReactivePower(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ReactivePowerUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ReactivePowerUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalAcceleration.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalAcceleration.WindowsRuntimeComponent.g.cs index cad1897a7f..f7215a3c23 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalAcceleration.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalAcceleration.WindowsRuntimeComponent.g.cs @@ -514,6 +514,8 @@ public double As(RotationalAccelerationUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((RotationalAccelerationUnit) unit); + /// /// Converts this RotationalAcceleration to another RotationalAcceleration with the unit representation . /// @@ -524,6 +526,10 @@ public RotationalAcceleration ToUnit(RotationalAccelerationUnit unit) return new RotationalAcceleration(convertedValue, unit); } + IQuantity IQuantity.ToUnit(RotationalAccelerationUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((RotationalAccelerationUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalSpeed.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalSpeed.WindowsRuntimeComponent.g.cs index 709d41b323..2039b9ce8a 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalSpeed.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalSpeed.WindowsRuntimeComponent.g.cs @@ -664,6 +664,8 @@ public double As(RotationalSpeedUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((RotationalSpeedUnit) unit); + /// /// Converts this RotationalSpeed to another RotationalSpeed with the unit representation . /// @@ -674,6 +676,10 @@ public RotationalSpeed ToUnit(RotationalSpeedUnit unit) return new RotationalSpeed(convertedValue, unit); } + IQuantity IQuantity.ToUnit(RotationalSpeedUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((RotationalSpeedUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffness.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffness.WindowsRuntimeComponent.g.cs index 28d6854e7d..2043514096 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffness.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffness.WindowsRuntimeComponent.g.cs @@ -514,6 +514,8 @@ public double As(RotationalStiffnessUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((RotationalStiffnessUnit) unit); + /// /// Converts this RotationalStiffness to another RotationalStiffness with the unit representation . /// @@ -524,6 +526,10 @@ public RotationalStiffness ToUnit(RotationalStiffnessUnit unit) return new RotationalStiffness(convertedValue, unit); } + IQuantity IQuantity.ToUnit(RotationalStiffnessUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((RotationalStiffnessUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffnessPerLength.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffnessPerLength.WindowsRuntimeComponent.g.cs index 5c610b1d86..70133ac18f 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffnessPerLength.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffnessPerLength.WindowsRuntimeComponent.g.cs @@ -514,6 +514,8 @@ public double As(RotationalStiffnessPerLengthUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((RotationalStiffnessPerLengthUnit) unit); + /// /// Converts this RotationalStiffnessPerLength to another RotationalStiffnessPerLength with the unit representation . /// @@ -524,6 +526,10 @@ public RotationalStiffnessPerLength ToUnit(RotationalStiffnessPerLengthUnit unit return new RotationalStiffnessPerLength(convertedValue, unit); } + IQuantity IQuantity.ToUnit(RotationalStiffnessPerLengthUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((RotationalStiffnessPerLengthUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SolidAngle.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SolidAngle.WindowsRuntimeComponent.g.cs index 9e9a93f12c..c72735fc6b 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SolidAngle.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SolidAngle.WindowsRuntimeComponent.g.cs @@ -487,6 +487,8 @@ public double As(SolidAngleUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((SolidAngleUnit) unit); + /// /// Converts this SolidAngle to another SolidAngle with the unit representation . /// @@ -497,6 +499,10 @@ public SolidAngle ToUnit(SolidAngleUnit unit) return new SolidAngle(convertedValue, unit); } + IQuantity IQuantity.ToUnit(SolidAngleUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((SolidAngleUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEnergy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEnergy.WindowsRuntimeComponent.g.cs index 506a6229ca..16137a9ecc 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEnergy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEnergy.WindowsRuntimeComponent.g.cs @@ -607,6 +607,8 @@ public double As(SpecificEnergyUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((SpecificEnergyUnit) unit); + /// /// Converts this SpecificEnergy to another SpecificEnergy with the unit representation . /// @@ -617,6 +619,10 @@ public SpecificEnergy ToUnit(SpecificEnergyUnit unit) return new SpecificEnergy(convertedValue, unit); } + IQuantity IQuantity.ToUnit(SpecificEnergyUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((SpecificEnergyUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEntropy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEntropy.WindowsRuntimeComponent.g.cs index dcaa8eb092..93e541b4a8 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEntropy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEntropy.WindowsRuntimeComponent.g.cs @@ -589,6 +589,8 @@ public double As(SpecificEntropyUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((SpecificEntropyUnit) unit); + /// /// Converts this SpecificEntropy to another SpecificEntropy with the unit representation . /// @@ -599,6 +601,10 @@ public SpecificEntropy ToUnit(SpecificEntropyUnit unit) return new SpecificEntropy(convertedValue, unit); } + IQuantity IQuantity.ToUnit(SpecificEntropyUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((SpecificEntropyUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificVolume.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificVolume.WindowsRuntimeComponent.g.cs index 6a18035612..92df99a30f 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificVolume.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificVolume.WindowsRuntimeComponent.g.cs @@ -514,6 +514,8 @@ public double As(SpecificVolumeUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((SpecificVolumeUnit) unit); + /// /// Converts this SpecificVolume to another SpecificVolume with the unit representation . /// @@ -524,6 +526,10 @@ public SpecificVolume ToUnit(SpecificVolumeUnit unit) return new SpecificVolume(convertedValue, unit); } + IQuantity IQuantity.ToUnit(SpecificVolumeUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((SpecificVolumeUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificWeight.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificWeight.WindowsRuntimeComponent.g.cs index 50de99919c..9ea3396d00 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificWeight.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificWeight.WindowsRuntimeComponent.g.cs @@ -727,6 +727,8 @@ public double As(SpecificWeightUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((SpecificWeightUnit) unit); + /// /// Converts this SpecificWeight to another SpecificWeight with the unit representation . /// @@ -737,6 +739,10 @@ public SpecificWeight ToUnit(SpecificWeightUnit unit) return new SpecificWeight(convertedValue, unit); } + IQuantity IQuantity.ToUnit(SpecificWeightUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((SpecificWeightUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Speed.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Speed.WindowsRuntimeComponent.g.cs index ea4260c32a..e55b02b106 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Speed.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Speed.WindowsRuntimeComponent.g.cs @@ -949,6 +949,8 @@ public double As(SpeedUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((SpeedUnit) unit); + /// /// Converts this Speed to another Speed with the unit representation . /// @@ -959,6 +961,10 @@ public Speed ToUnit(SpeedUnit unit) return new Speed(convertedValue, unit); } + IQuantity IQuantity.ToUnit(SpeedUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((SpeedUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Temperature.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Temperature.WindowsRuntimeComponent.g.cs index 7a66df49e1..8cef557424 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Temperature.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Temperature.WindowsRuntimeComponent.g.cs @@ -589,6 +589,8 @@ public double As(TemperatureUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((TemperatureUnit) unit); + /// /// Converts this Temperature to another Temperature with the unit representation . /// @@ -599,6 +601,10 @@ public Temperature ToUnit(TemperatureUnit unit) return new Temperature(convertedValue, unit); } + IQuantity IQuantity.ToUnit(TemperatureUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((TemperatureUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureChangeRate.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureChangeRate.WindowsRuntimeComponent.g.cs index 4e719f2c0d..4958845010 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureChangeRate.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureChangeRate.WindowsRuntimeComponent.g.cs @@ -619,6 +619,8 @@ public double As(TemperatureChangeRateUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((TemperatureChangeRateUnit) unit); + /// /// Converts this TemperatureChangeRate to another TemperatureChangeRate with the unit representation . /// @@ -629,6 +631,10 @@ public TemperatureChangeRate ToUnit(TemperatureChangeRateUnit unit) return new TemperatureChangeRate(convertedValue, unit); } + IQuantity IQuantity.ToUnit(TemperatureChangeRateUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((TemperatureChangeRateUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureDelta.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureDelta.WindowsRuntimeComponent.g.cs index 38996c22f7..34042d33c1 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureDelta.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureDelta.WindowsRuntimeComponent.g.cs @@ -589,6 +589,8 @@ public double As(TemperatureDeltaUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((TemperatureDeltaUnit) unit); + /// /// Converts this TemperatureDelta to another TemperatureDelta with the unit representation . /// @@ -599,6 +601,10 @@ public TemperatureDelta ToUnit(TemperatureDeltaUnit unit) return new TemperatureDelta(convertedValue, unit); } + IQuantity IQuantity.ToUnit(TemperatureDeltaUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((TemperatureDeltaUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalConductivity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalConductivity.WindowsRuntimeComponent.g.cs index 58a1f34d87..0700efa263 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalConductivity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalConductivity.WindowsRuntimeComponent.g.cs @@ -502,6 +502,8 @@ public double As(ThermalConductivityUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ThermalConductivityUnit) unit); + /// /// Converts this ThermalConductivity to another ThermalConductivity with the unit representation . /// @@ -512,6 +514,10 @@ public ThermalConductivity ToUnit(ThermalConductivityUnit unit) return new ThermalConductivity(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ThermalConductivityUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ThermalConductivityUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalResistance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalResistance.WindowsRuntimeComponent.g.cs index 155cf4e114..fcb2ff3c01 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalResistance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalResistance.WindowsRuntimeComponent.g.cs @@ -544,6 +544,8 @@ public double As(ThermalResistanceUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ThermalResistanceUnit) unit); + /// /// Converts this ThermalResistance to another ThermalResistance with the unit representation . /// @@ -554,6 +556,10 @@ public ThermalResistance ToUnit(ThermalResistanceUnit unit) return new ThermalResistance(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ThermalResistanceUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ThermalResistanceUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Torque.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Torque.WindowsRuntimeComponent.g.cs index d0d5f4f0fd..b54adff350 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Torque.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Torque.WindowsRuntimeComponent.g.cs @@ -784,6 +784,8 @@ public double As(TorqueUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((TorqueUnit) unit); + /// /// Converts this Torque to another Torque with the unit representation . /// @@ -794,6 +796,10 @@ public Torque ToUnit(TorqueUnit unit) return new Torque(convertedValue, unit); } + IQuantity IQuantity.ToUnit(TorqueUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((TorqueUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VitaminA.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VitaminA.WindowsRuntimeComponent.g.cs index 002f89ed32..616b1278b6 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VitaminA.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VitaminA.WindowsRuntimeComponent.g.cs @@ -484,6 +484,8 @@ public double As(VitaminAUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((VitaminAUnit) unit); + /// /// Converts this VitaminA to another VitaminA with the unit representation . /// @@ -494,6 +496,10 @@ public VitaminA ToUnit(VitaminAUnit unit) return new VitaminA(convertedValue, unit); } + IQuantity IQuantity.ToUnit(VitaminAUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((VitaminAUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Volume.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Volume.WindowsRuntimeComponent.g.cs index 25bc06be0f..9bd2d3bef5 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Volume.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Volume.WindowsRuntimeComponent.g.cs @@ -1144,6 +1144,8 @@ public double As(VolumeUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((VolumeUnit) unit); + /// /// Converts this Volume to another Volume with the unit representation . /// @@ -1154,6 +1156,10 @@ public Volume ToUnit(VolumeUnit unit) return new Volume(convertedValue, unit); } + IQuantity IQuantity.ToUnit(VolumeUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((VolumeUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VolumeFlow.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VolumeFlow.WindowsRuntimeComponent.g.cs index 10db892180..c08026b051 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VolumeFlow.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VolumeFlow.WindowsRuntimeComponent.g.cs @@ -1189,6 +1189,8 @@ public double As(VolumeFlowUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((VolumeFlowUnit) unit); + /// /// Converts this VolumeFlow to another VolumeFlow with the unit representation . /// @@ -1199,6 +1201,10 @@ public VolumeFlow ToUnit(VolumeFlowUnit unit) return new VolumeFlow(convertedValue, unit); } + IQuantity IQuantity.ToUnit(VolumeFlowUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((VolumeFlowUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/Acceleration.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Acceleration.NetFramework.g.cs index 53c9b8fde8..156694a5c0 100644 --- a/UnitsNet/GeneratedCode/Quantities/Acceleration.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Acceleration.NetFramework.g.cs @@ -698,6 +698,8 @@ public double As(AccelerationUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((AccelerationUnit) unit); + /// /// Converts this Acceleration to another Acceleration with the unit representation . /// @@ -708,6 +710,10 @@ public Acceleration ToUnit(AccelerationUnit unit) return new Acceleration(convertedValue, unit); } + IQuantity IQuantity.ToUnit(AccelerationUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((AccelerationUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.NetFramework.g.cs index 612a5ada90..be7d9705f7 100644 --- a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.NetFramework.g.cs @@ -726,6 +726,8 @@ public double As(AmountOfSubstanceUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((AmountOfSubstanceUnit) unit); + /// /// Converts this AmountOfSubstance to another AmountOfSubstance with the unit representation . /// @@ -736,6 +738,10 @@ public AmountOfSubstance ToUnit(AmountOfSubstanceUnit unit) return new AmountOfSubstance(convertedValue, unit); } + IQuantity IQuantity.ToUnit(AmountOfSubstanceUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((AmountOfSubstanceUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.NetFramework.g.cs index 5318b14bba..bb91114529 100644 --- a/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.NetFramework.g.cs @@ -580,6 +580,8 @@ public double As(AmplitudeRatioUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((AmplitudeRatioUnit) unit); + /// /// Converts this AmplitudeRatio to another AmplitudeRatio with the unit representation . /// @@ -590,6 +592,10 @@ public AmplitudeRatio ToUnit(AmplitudeRatioUnit unit) return new AmplitudeRatio(convertedValue, unit); } + IQuantity IQuantity.ToUnit(AmplitudeRatioUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((AmplitudeRatioUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/Angle.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Angle.NetFramework.g.cs index b115d78ade..8612231c61 100644 --- a/UnitsNet/GeneratedCode/Quantities/Angle.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Angle.NetFramework.g.cs @@ -712,6 +712,8 @@ public double As(AngleUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((AngleUnit) unit); + /// /// Converts this Angle to another Angle with the unit representation . /// @@ -722,6 +724,10 @@ public Angle ToUnit(AngleUnit unit) return new Angle(convertedValue, unit); } + IQuantity IQuantity.ToUnit(AngleUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((AngleUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.NetFramework.g.cs index 8e5f353f24..4e84744390 100644 --- a/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.NetFramework.g.cs @@ -558,6 +558,8 @@ public double As(ApparentEnergyUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ApparentEnergyUnit) unit); + /// /// Converts this ApparentEnergy to another ApparentEnergy with the unit representation . /// @@ -568,6 +570,10 @@ public ApparentEnergy ToUnit(ApparentEnergyUnit unit) return new ApparentEnergy(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ApparentEnergyUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ApparentEnergyUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/ApparentPower.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ApparentPower.NetFramework.g.cs index 0fafe6e983..d58dd30f2e 100644 --- a/UnitsNet/GeneratedCode/Quantities/ApparentPower.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ApparentPower.NetFramework.g.cs @@ -572,6 +572,8 @@ public double As(ApparentPowerUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ApparentPowerUnit) unit); + /// /// Converts this ApparentPower to another ApparentPower with the unit representation . /// @@ -582,6 +584,10 @@ public ApparentPower ToUnit(ApparentPowerUnit unit) return new ApparentPower(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ApparentPowerUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ApparentPowerUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/Area.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Area.NetFramework.g.cs index a171a0149c..70a5c132d5 100644 --- a/UnitsNet/GeneratedCode/Quantities/Area.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Area.NetFramework.g.cs @@ -698,6 +698,8 @@ public double As(AreaUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((AreaUnit) unit); + /// /// Converts this Area to another Area with the unit representation . /// @@ -708,6 +710,10 @@ public Area ToUnit(AreaUnit unit) return new Area(convertedValue, unit); } + IQuantity IQuantity.ToUnit(AreaUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((AreaUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/AreaDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaDensity.NetFramework.g.cs index c1ca83d95c..bf08ebaf94 100644 --- a/UnitsNet/GeneratedCode/Quantities/AreaDensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AreaDensity.NetFramework.g.cs @@ -530,6 +530,8 @@ public double As(AreaDensityUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((AreaDensityUnit) unit); + /// /// Converts this AreaDensity to another AreaDensity with the unit representation . /// @@ -540,6 +542,10 @@ public AreaDensity ToUnit(AreaDensityUnit unit) return new AreaDensity(convertedValue, unit); } + IQuantity IQuantity.ToUnit(AreaDensityUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((AreaDensityUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.NetFramework.g.cs index 373a807bb2..c8dc1a6652 100644 --- a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.NetFramework.g.cs @@ -600,6 +600,8 @@ public double As(AreaMomentOfInertiaUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((AreaMomentOfInertiaUnit) unit); + /// /// Converts this AreaMomentOfInertia to another AreaMomentOfInertia with the unit representation . /// @@ -610,6 +612,10 @@ public AreaMomentOfInertia ToUnit(AreaMomentOfInertiaUnit unit) return new AreaMomentOfInertia(convertedValue, unit); } + IQuantity IQuantity.ToUnit(AreaMomentOfInertiaUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((AreaMomentOfInertiaUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/BitRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/BitRate.NetFramework.g.cs index 6486825163..6b46246d9b 100644 --- a/UnitsNet/GeneratedCode/Quantities/BitRate.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/BitRate.NetFramework.g.cs @@ -883,6 +883,8 @@ public double As(BitRateUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((BitRateUnit) unit); + /// /// Converts this BitRate to another BitRate with the unit representation . /// @@ -893,6 +895,10 @@ public BitRate ToUnit(BitRateUnit unit) return new BitRate(convertedValue, unit); } + IQuantity IQuantity.ToUnit(BitRateUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((BitRateUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.NetFramework.g.cs index 0fc334d934..efd9433a6b 100644 --- a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.NetFramework.g.cs @@ -558,6 +558,8 @@ public double As(BrakeSpecificFuelConsumptionUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((BrakeSpecificFuelConsumptionUnit) unit); + /// /// Converts this BrakeSpecificFuelConsumption to another BrakeSpecificFuelConsumption with the unit representation . /// @@ -568,6 +570,10 @@ public BrakeSpecificFuelConsumption ToUnit(BrakeSpecificFuelConsumptionUnit unit return new BrakeSpecificFuelConsumption(convertedValue, unit); } + IQuantity IQuantity.ToUnit(BrakeSpecificFuelConsumptionUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((BrakeSpecificFuelConsumptionUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/Capacitance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Capacitance.NetFramework.g.cs index 1366a723a4..0fbe85f188 100644 --- a/UnitsNet/GeneratedCode/Quantities/Capacitance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Capacitance.NetFramework.g.cs @@ -617,6 +617,8 @@ public double As(CapacitanceUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((CapacitanceUnit) unit); + /// /// Converts this Capacitance to another Capacitance with the unit representation . /// @@ -627,6 +629,10 @@ public Capacitance ToUnit(CapacitanceUnit unit) return new Capacitance(convertedValue, unit); } + IQuantity IQuantity.ToUnit(CapacitanceUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((CapacitanceUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.NetFramework.g.cs index 90544e0db8..011dbe3905 100644 --- a/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.NetFramework.g.cs @@ -558,6 +558,8 @@ public double As(CoefficientOfThermalExpansionUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((CoefficientOfThermalExpansionUnit) unit); + /// /// Converts this CoefficientOfThermalExpansion to another CoefficientOfThermalExpansion with the unit representation . /// @@ -568,6 +570,10 @@ public CoefficientOfThermalExpansion ToUnit(CoefficientOfThermalExpansionUnit un return new CoefficientOfThermalExpansion(convertedValue, unit); } + IQuantity IQuantity.ToUnit(CoefficientOfThermalExpansionUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((CoefficientOfThermalExpansionUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/Density.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Density.NetFramework.g.cs index c8dc7d205d..ebc88f244c 100644 --- a/UnitsNet/GeneratedCode/Quantities/Density.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Density.NetFramework.g.cs @@ -1065,6 +1065,8 @@ public double As(DensityUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((DensityUnit) unit); + /// /// Converts this Density to another Density with the unit representation . /// @@ -1075,6 +1077,10 @@ public Density ToUnit(DensityUnit unit) return new Density(convertedValue, unit); } + IQuantity IQuantity.ToUnit(DensityUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((DensityUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/Duration.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Duration.NetFramework.g.cs index 0fc02b6591..158ecfd475 100644 --- a/UnitsNet/GeneratedCode/Quantities/Duration.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Duration.NetFramework.g.cs @@ -656,6 +656,8 @@ public double As(DurationUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((DurationUnit) unit); + /// /// Converts this Duration to another Duration with the unit representation . /// @@ -666,6 +668,10 @@ public Duration ToUnit(DurationUnit unit) return new Duration(convertedValue, unit); } + IQuantity IQuantity.ToUnit(DurationUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((DurationUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.NetFramework.g.cs index 06bdd7f2bf..e6b3225760 100644 --- a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.NetFramework.g.cs @@ -603,6 +603,8 @@ public double As(DynamicViscosityUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((DynamicViscosityUnit) unit); + /// /// Converts this DynamicViscosity to another DynamicViscosity with the unit representation . /// @@ -613,6 +615,10 @@ public DynamicViscosity ToUnit(DynamicViscosityUnit unit) return new DynamicViscosity(convertedValue, unit); } + IQuantity IQuantity.ToUnit(DynamicViscosityUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((DynamicViscosityUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.NetFramework.g.cs index 6b08b94020..42b98707ef 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.NetFramework.g.cs @@ -572,6 +572,8 @@ public double As(ElectricAdmittanceUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ElectricAdmittanceUnit) unit); + /// /// Converts this ElectricAdmittance to another ElectricAdmittance with the unit representation . /// @@ -582,6 +584,10 @@ public ElectricAdmittance ToUnit(ElectricAdmittanceUnit unit) return new ElectricAdmittance(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ElectricAdmittanceUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ElectricAdmittanceUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.NetFramework.g.cs index 994f568cc2..b7fec45977 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.NetFramework.g.cs @@ -533,6 +533,8 @@ public double As(ElectricChargeUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ElectricChargeUnit) unit); + /// /// Converts this ElectricCharge to another ElectricCharge with the unit representation . /// @@ -543,6 +545,10 @@ public ElectricCharge ToUnit(ElectricChargeUnit unit) return new ElectricCharge(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ElectricChargeUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ElectricChargeUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.NetFramework.g.cs index c81185fcdb..a5a1551624 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.NetFramework.g.cs @@ -533,6 +533,8 @@ public double As(ElectricChargeDensityUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ElectricChargeDensityUnit) unit); + /// /// Converts this ElectricChargeDensity to another ElectricChargeDensity with the unit representation . /// @@ -543,6 +545,10 @@ public ElectricChargeDensity ToUnit(ElectricChargeDensityUnit unit) return new ElectricChargeDensity(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ElectricChargeDensityUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ElectricChargeDensityUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricConductance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricConductance.NetFramework.g.cs index 34596fa1b8..1fd7ad50fc 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricConductance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductance.NetFramework.g.cs @@ -561,6 +561,8 @@ public double As(ElectricConductanceUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ElectricConductanceUnit) unit); + /// /// Converts this ElectricConductance to another ElectricConductance with the unit representation . /// @@ -571,6 +573,10 @@ public ElectricConductance ToUnit(ElectricConductanceUnit unit) return new ElectricConductance(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ElectricConductanceUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ElectricConductanceUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.NetFramework.g.cs index 3bdc8a042d..9647447a91 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.NetFramework.g.cs @@ -533,6 +533,8 @@ public double As(ElectricConductivityUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ElectricConductivityUnit) unit); + /// /// Converts this ElectricConductivity to another ElectricConductivity with the unit representation . /// @@ -543,6 +545,10 @@ public ElectricConductivity ToUnit(ElectricConductivityUnit unit) return new ElectricConductivity(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ElectricConductivityUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ElectricConductivityUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.NetFramework.g.cs index 7de7c6bdba..e6932e9faf 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.NetFramework.g.cs @@ -628,6 +628,8 @@ public double As(ElectricCurrentUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ElectricCurrentUnit) unit); + /// /// Converts this ElectricCurrent to another ElectricCurrent with the unit representation . /// @@ -638,6 +640,10 @@ public ElectricCurrent ToUnit(ElectricCurrentUnit unit) return new ElectricCurrent(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ElectricCurrentUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ElectricCurrentUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.NetFramework.g.cs index 461a2ab18b..e229a241da 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.NetFramework.g.cs @@ -533,6 +533,8 @@ public double As(ElectricCurrentDensityUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ElectricCurrentDensityUnit) unit); + /// /// Converts this ElectricCurrentDensity to another ElectricCurrentDensity with the unit representation . /// @@ -543,6 +545,10 @@ public ElectricCurrentDensity ToUnit(ElectricCurrentDensityUnit unit) return new ElectricCurrentDensity(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ElectricCurrentDensityUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ElectricCurrentDensityUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.NetFramework.g.cs index f20b37acb4..fbc011335a 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.NetFramework.g.cs @@ -530,6 +530,8 @@ public double As(ElectricCurrentGradientUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ElectricCurrentGradientUnit) unit); + /// /// Converts this ElectricCurrentGradient to another ElectricCurrentGradient with the unit representation . /// @@ -540,6 +542,10 @@ public ElectricCurrentGradient ToUnit(ElectricCurrentGradientUnit unit) return new ElectricCurrentGradient(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ElectricCurrentGradientUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ElectricCurrentGradientUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricField.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricField.NetFramework.g.cs index 2d41495251..9da975c66b 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricField.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricField.NetFramework.g.cs @@ -533,6 +533,8 @@ public double As(ElectricFieldUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ElectricFieldUnit) unit); + /// /// Converts this ElectricField to another ElectricField with the unit representation . /// @@ -543,6 +545,10 @@ public ElectricField ToUnit(ElectricFieldUnit unit) return new ElectricField(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ElectricFieldUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ElectricFieldUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricInductance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricInductance.NetFramework.g.cs index 42e92a5317..9a0de55575 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricInductance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricInductance.NetFramework.g.cs @@ -575,6 +575,8 @@ public double As(ElectricInductanceUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ElectricInductanceUnit) unit); + /// /// Converts this ElectricInductance to another ElectricInductance with the unit representation . /// @@ -585,6 +587,10 @@ public ElectricInductance ToUnit(ElectricInductanceUnit unit) return new ElectricInductance(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ElectricInductanceUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ElectricInductanceUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.NetFramework.g.cs index 56949211e9..cd90bd73fb 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.NetFramework.g.cs @@ -586,6 +586,8 @@ public double As(ElectricPotentialUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ElectricPotentialUnit) unit); + /// /// Converts this ElectricPotential to another ElectricPotential with the unit representation . /// @@ -596,6 +598,10 @@ public ElectricPotential ToUnit(ElectricPotentialUnit unit) return new ElectricPotential(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ElectricPotentialUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ElectricPotentialUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.NetFramework.g.cs index c20421cc9d..2a54ce7034 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.NetFramework.g.cs @@ -586,6 +586,8 @@ public double As(ElectricPotentialAcUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ElectricPotentialAcUnit) unit); + /// /// Converts this ElectricPotentialAc to another ElectricPotentialAc with the unit representation . /// @@ -596,6 +598,10 @@ public ElectricPotentialAc ToUnit(ElectricPotentialAcUnit unit) return new ElectricPotentialAc(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ElectricPotentialAcUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ElectricPotentialAcUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.NetFramework.g.cs index 15e026929e..3599561230 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.NetFramework.g.cs @@ -586,6 +586,8 @@ public double As(ElectricPotentialDcUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ElectricPotentialDcUnit) unit); + /// /// Converts this ElectricPotentialDc to another ElectricPotentialDc with the unit representation . /// @@ -596,6 +598,10 @@ public ElectricPotentialDc ToUnit(ElectricPotentialDcUnit unit) return new ElectricPotentialDc(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ElectricPotentialDcUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ElectricPotentialDcUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.NetFramework.g.cs index ae97e8a3dd..b2f3a31db9 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.NetFramework.g.cs @@ -586,6 +586,8 @@ public double As(ElectricResistanceUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ElectricResistanceUnit) unit); + /// /// Converts this ElectricResistance to another ElectricResistance with the unit representation . /// @@ -596,6 +598,10 @@ public ElectricResistance ToUnit(ElectricResistanceUnit unit) return new ElectricResistance(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ElectricResistanceUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ElectricResistanceUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.NetFramework.g.cs index 456660aeda..73fbe8c235 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.NetFramework.g.cs @@ -715,6 +715,8 @@ public double As(ElectricResistivityUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ElectricResistivityUnit) unit); + /// /// Converts this ElectricResistivity to another ElectricResistivity with the unit representation . /// @@ -725,6 +727,10 @@ public ElectricResistivity ToUnit(ElectricResistivityUnit unit) return new ElectricResistivity(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ElectricResistivityUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ElectricResistivityUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/Energy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Energy.NetFramework.g.cs index 8e7d73c933..b7aef7ba4a 100644 --- a/UnitsNet/GeneratedCode/Quantities/Energy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Energy.NetFramework.g.cs @@ -824,6 +824,8 @@ public double As(EnergyUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((EnergyUnit) unit); + /// /// Converts this Energy to another Energy with the unit representation . /// @@ -834,6 +836,10 @@ public Energy ToUnit(EnergyUnit unit) return new Energy(convertedValue, unit); } + IQuantity IQuantity.ToUnit(EnergyUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((EnergyUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/Entropy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Entropy.NetFramework.g.cs index f9aed0426d..d5b905f130 100644 --- a/UnitsNet/GeneratedCode/Quantities/Entropy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Entropy.NetFramework.g.cs @@ -614,6 +614,8 @@ public double As(EntropyUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((EntropyUnit) unit); + /// /// Converts this Entropy to another Entropy with the unit representation . /// @@ -624,6 +626,10 @@ public Entropy ToUnit(EntropyUnit unit) return new Entropy(convertedValue, unit); } + IQuantity IQuantity.ToUnit(EntropyUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((EntropyUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/Force.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Force.NetFramework.g.cs index 3c6bcfbb90..00158fbd8e 100644 --- a/UnitsNet/GeneratedCode/Quantities/Force.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Force.NetFramework.g.cs @@ -698,6 +698,8 @@ public double As(ForceUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ForceUnit) unit); + /// /// Converts this Force to another Force with the unit representation . /// @@ -708,6 +710,10 @@ public Force ToUnit(ForceUnit unit) return new Force(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ForceUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ForceUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.NetFramework.g.cs index 6a0d757883..d844fa6f6e 100644 --- a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.NetFramework.g.cs @@ -670,6 +670,8 @@ public double As(ForceChangeRateUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ForceChangeRateUnit) unit); + /// /// Converts this ForceChangeRate to another ForceChangeRate with the unit representation . /// @@ -680,6 +682,10 @@ public ForceChangeRate ToUnit(ForceChangeRateUnit unit) return new ForceChangeRate(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ForceChangeRateUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ForceChangeRateUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.NetFramework.g.cs index 7616174030..cb198c65cc 100644 --- a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.NetFramework.g.cs @@ -642,6 +642,8 @@ public double As(ForcePerLengthUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ForcePerLengthUnit) unit); + /// /// Converts this ForcePerLength to another ForcePerLength with the unit representation . /// @@ -652,6 +654,10 @@ public ForcePerLength ToUnit(ForcePerLengthUnit unit) return new ForcePerLength(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ForcePerLengthUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ForcePerLengthUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/Frequency.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Frequency.NetFramework.g.cs index 82d913bb77..d16249ea87 100644 --- a/UnitsNet/GeneratedCode/Quantities/Frequency.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Frequency.NetFramework.g.cs @@ -628,6 +628,8 @@ public double As(FrequencyUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((FrequencyUnit) unit); + /// /// Converts this Frequency to another Frequency with the unit representation . /// @@ -638,6 +640,10 @@ public Frequency ToUnit(FrequencyUnit unit) return new Frequency(convertedValue, unit); } + IQuantity IQuantity.ToUnit(FrequencyUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((FrequencyUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/HeatFlux.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatFlux.NetFramework.g.cs index 69c3e3e8f2..e4f7403de9 100644 --- a/UnitsNet/GeneratedCode/Quantities/HeatFlux.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/HeatFlux.NetFramework.g.cs @@ -768,6 +768,8 @@ public double As(HeatFluxUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((HeatFluxUnit) unit); + /// /// Converts this HeatFlux to another HeatFlux with the unit representation . /// @@ -778,6 +780,10 @@ public HeatFlux ToUnit(HeatFluxUnit unit) return new HeatFlux(convertedValue, unit); } + IQuantity IQuantity.ToUnit(HeatFluxUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((HeatFluxUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.NetFramework.g.cs index 39b16d476b..bc924e8df1 100644 --- a/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.NetFramework.g.cs @@ -544,6 +544,8 @@ public double As(HeatTransferCoefficientUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((HeatTransferCoefficientUnit) unit); + /// /// Converts this HeatTransferCoefficient to another HeatTransferCoefficient with the unit representation . /// @@ -554,6 +556,10 @@ public HeatTransferCoefficient ToUnit(HeatTransferCoefficientUnit unit) return new HeatTransferCoefficient(convertedValue, unit); } + IQuantity IQuantity.ToUnit(HeatTransferCoefficientUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((HeatTransferCoefficientUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/Illuminance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Illuminance.NetFramework.g.cs index fef7fdda00..9eb08dfbe7 100644 --- a/UnitsNet/GeneratedCode/Quantities/Illuminance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Illuminance.NetFramework.g.cs @@ -575,6 +575,8 @@ public double As(IlluminanceUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((IlluminanceUnit) unit); + /// /// Converts this Illuminance to another Illuminance with the unit representation . /// @@ -585,6 +587,10 @@ public Illuminance ToUnit(IlluminanceUnit unit) return new Illuminance(convertedValue, unit); } + IQuantity IQuantity.ToUnit(IlluminanceUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((IlluminanceUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/Information.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Information.NetFramework.g.cs index eba6f6bd9d..20a2a6bf33 100644 --- a/UnitsNet/GeneratedCode/Quantities/Information.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Information.NetFramework.g.cs @@ -880,6 +880,8 @@ public double As(InformationUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((InformationUnit) unit); + /// /// Converts this Information to another Information with the unit representation . /// @@ -890,6 +892,10 @@ public Information ToUnit(InformationUnit unit) return new Information(convertedValue, unit); } + IQuantity IQuantity.ToUnit(InformationUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((InformationUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/Irradiance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Irradiance.NetFramework.g.cs index 9f26cc348c..dd680f97fa 100644 --- a/UnitsNet/GeneratedCode/Quantities/Irradiance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Irradiance.NetFramework.g.cs @@ -712,6 +712,8 @@ public double As(IrradianceUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((IrradianceUnit) unit); + /// /// Converts this Irradiance to another Irradiance with the unit representation . /// @@ -722,6 +724,10 @@ public Irradiance ToUnit(IrradianceUnit unit) return new Irradiance(convertedValue, unit); } + IQuantity IQuantity.ToUnit(IrradianceUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((IrradianceUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/Irradiation.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Irradiation.NetFramework.g.cs index c9e56ed994..28d89610cb 100644 --- a/UnitsNet/GeneratedCode/Quantities/Irradiation.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Irradiation.NetFramework.g.cs @@ -575,6 +575,8 @@ public double As(IrradiationUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((IrradiationUnit) unit); + /// /// Converts this Irradiation to another Irradiation with the unit representation . /// @@ -585,6 +587,10 @@ public Irradiation ToUnit(IrradiationUnit unit) return new Irradiation(convertedValue, unit); } + IQuantity IQuantity.ToUnit(IrradiationUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((IrradiationUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.NetFramework.g.cs index 985fdfc913..2e1f4385b3 100644 --- a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.NetFramework.g.cs @@ -631,6 +631,8 @@ public double As(KinematicViscosityUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((KinematicViscosityUnit) unit); + /// /// Converts this KinematicViscosity to another KinematicViscosity with the unit representation . /// @@ -641,6 +643,10 @@ public KinematicViscosity ToUnit(KinematicViscosityUnit unit) return new KinematicViscosity(convertedValue, unit); } + IQuantity IQuantity.ToUnit(KinematicViscosityUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((KinematicViscosityUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/LapseRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/LapseRate.NetFramework.g.cs index 045f479bb4..0d238c2846 100644 --- a/UnitsNet/GeneratedCode/Quantities/LapseRate.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LapseRate.NetFramework.g.cs @@ -530,6 +530,8 @@ public double As(LapseRateUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((LapseRateUnit) unit); + /// /// Converts this LapseRate to another LapseRate with the unit representation . /// @@ -540,6 +542,10 @@ public LapseRate ToUnit(LapseRateUnit unit) return new LapseRate(convertedValue, unit); } + IQuantity IQuantity.ToUnit(LapseRateUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((LapseRateUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/Length.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Length.NetFramework.g.cs index 0be2315383..ae8a66818d 100644 --- a/UnitsNet/GeneratedCode/Quantities/Length.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Length.NetFramework.g.cs @@ -824,6 +824,8 @@ public double As(LengthUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((LengthUnit) unit); + /// /// Converts this Length to another Length with the unit representation . /// @@ -834,6 +836,10 @@ public Length ToUnit(LengthUnit unit) return new Length(convertedValue, unit); } + IQuantity IQuantity.ToUnit(LengthUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((LengthUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/Level.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Level.NetFramework.g.cs index 550eda90a8..f091dae1cb 100644 --- a/UnitsNet/GeneratedCode/Quantities/Level.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Level.NetFramework.g.cs @@ -552,6 +552,8 @@ public double As(LevelUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((LevelUnit) unit); + /// /// Converts this Level to another Level with the unit representation . /// @@ -562,6 +564,10 @@ public Level ToUnit(LevelUnit unit) return new Level(convertedValue, unit); } + IQuantity IQuantity.ToUnit(LevelUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((LevelUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/LinearDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/LinearDensity.NetFramework.g.cs index 9b9292eda5..d2c6295ea2 100644 --- a/UnitsNet/GeneratedCode/Quantities/LinearDensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LinearDensity.NetFramework.g.cs @@ -561,6 +561,8 @@ public double As(LinearDensityUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((LinearDensityUnit) unit); + /// /// Converts this LinearDensity to another LinearDensity with the unit representation . /// @@ -571,6 +573,10 @@ public LinearDensity ToUnit(LinearDensityUnit unit) return new LinearDensity(convertedValue, unit); } + IQuantity IQuantity.ToUnit(LinearDensityUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((LinearDensityUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/LuminousFlux.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/LuminousFlux.NetFramework.g.cs index 916270ae24..6daa27eacf 100644 --- a/UnitsNet/GeneratedCode/Quantities/LuminousFlux.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LuminousFlux.NetFramework.g.cs @@ -533,6 +533,8 @@ public double As(LuminousFluxUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((LuminousFluxUnit) unit); + /// /// Converts this LuminousFlux to another LuminousFlux with the unit representation . /// @@ -543,6 +545,10 @@ public LuminousFlux ToUnit(LuminousFluxUnit unit) return new LuminousFlux(convertedValue, unit); } + IQuantity IQuantity.ToUnit(LuminousFluxUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((LuminousFluxUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.NetFramework.g.cs index 71bdae13a5..728e9d932d 100644 --- a/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.NetFramework.g.cs @@ -533,6 +533,8 @@ public double As(LuminousIntensityUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((LuminousIntensityUnit) unit); + /// /// Converts this LuminousIntensity to another LuminousIntensity with the unit representation . /// @@ -543,6 +545,10 @@ public LuminousIntensity ToUnit(LuminousIntensityUnit unit) return new LuminousIntensity(convertedValue, unit); } + IQuantity IQuantity.ToUnit(LuminousIntensityUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((LuminousIntensityUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/MagneticField.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MagneticField.NetFramework.g.cs index 96f7f6aa43..19be0a52ca 100644 --- a/UnitsNet/GeneratedCode/Quantities/MagneticField.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MagneticField.NetFramework.g.cs @@ -575,6 +575,8 @@ public double As(MagneticFieldUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((MagneticFieldUnit) unit); + /// /// Converts this MagneticField to another MagneticField with the unit representation . /// @@ -585,6 +587,10 @@ public MagneticField ToUnit(MagneticFieldUnit unit) return new MagneticField(convertedValue, unit); } + IQuantity IQuantity.ToUnit(MagneticFieldUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((MagneticFieldUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/MagneticFlux.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MagneticFlux.NetFramework.g.cs index 1910f514d5..d5f0a98c06 100644 --- a/UnitsNet/GeneratedCode/Quantities/MagneticFlux.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MagneticFlux.NetFramework.g.cs @@ -533,6 +533,8 @@ public double As(MagneticFluxUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((MagneticFluxUnit) unit); + /// /// Converts this MagneticFlux to another MagneticFlux with the unit representation . /// @@ -543,6 +545,10 @@ public MagneticFlux ToUnit(MagneticFluxUnit unit) return new MagneticFlux(convertedValue, unit); } + IQuantity IQuantity.ToUnit(MagneticFluxUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((MagneticFluxUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/Magnetization.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Magnetization.NetFramework.g.cs index 4a6cee1baf..e13f1fa479 100644 --- a/UnitsNet/GeneratedCode/Quantities/Magnetization.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Magnetization.NetFramework.g.cs @@ -533,6 +533,8 @@ public double As(MagnetizationUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((MagnetizationUnit) unit); + /// /// Converts this Magnetization to another Magnetization with the unit representation . /// @@ -543,6 +545,10 @@ public Magnetization ToUnit(MagnetizationUnit unit) return new Magnetization(convertedValue, unit); } + IQuantity IQuantity.ToUnit(MagnetizationUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((MagnetizationUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/Mass.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Mass.NetFramework.g.cs index aea5f278d4..17d7203f62 100644 --- a/UnitsNet/GeneratedCode/Quantities/Mass.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Mass.NetFramework.g.cs @@ -838,6 +838,8 @@ public double As(MassUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((MassUnit) unit); + /// /// Converts this Mass to another Mass with the unit representation . /// @@ -848,6 +850,10 @@ public Mass ToUnit(MassUnit unit) return new Mass(convertedValue, unit); } + IQuantity IQuantity.ToUnit(MassUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((MassUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/MassFlow.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFlow.NetFramework.g.cs index b254a0ba9d..7c3d8c9074 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFlow.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFlow.NetFramework.g.cs @@ -936,6 +936,8 @@ public double As(MassFlowUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((MassFlowUnit) unit); + /// /// Converts this MassFlow to another MassFlow with the unit representation . /// @@ -946,6 +948,10 @@ public MassFlow ToUnit(MassFlowUnit unit) return new MassFlow(convertedValue, unit); } + IQuantity IQuantity.ToUnit(MassFlowUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((MassFlowUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/MassFlux.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFlux.NetFramework.g.cs index deb8539de7..d76bc21360 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFlux.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFlux.NetFramework.g.cs @@ -544,6 +544,8 @@ public double As(MassFluxUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((MassFluxUnit) unit); + /// /// Converts this MassFlux to another MassFlux with the unit representation . /// @@ -554,6 +556,10 @@ public MassFlux ToUnit(MassFluxUnit unit) return new MassFlux(convertedValue, unit); } + IQuantity IQuantity.ToUnit(MassFluxUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((MassFluxUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.NetFramework.g.cs index 0ae36a706f..b0b5c25111 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.NetFramework.g.cs @@ -908,6 +908,8 @@ public double As(MassMomentOfInertiaUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((MassMomentOfInertiaUnit) unit); + /// /// Converts this MassMomentOfInertia to another MassMomentOfInertia with the unit representation . /// @@ -918,6 +920,10 @@ public MassMomentOfInertia ToUnit(MassMomentOfInertiaUnit unit) return new MassMomentOfInertia(convertedValue, unit); } + IQuantity IQuantity.ToUnit(MassMomentOfInertiaUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((MassMomentOfInertiaUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/MolarEnergy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarEnergy.NetFramework.g.cs index 765147d2ff..13cedb0784 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarEnergy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarEnergy.NetFramework.g.cs @@ -558,6 +558,8 @@ public double As(MolarEnergyUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((MolarEnergyUnit) unit); + /// /// Converts this MolarEnergy to another MolarEnergy with the unit representation . /// @@ -568,6 +570,10 @@ public MolarEnergy ToUnit(MolarEnergyUnit unit) return new MolarEnergy(convertedValue, unit); } + IQuantity IQuantity.ToUnit(MolarEnergyUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((MolarEnergyUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/MolarEntropy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarEntropy.NetFramework.g.cs index ccc8020ae4..2c965f59a7 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarEntropy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarEntropy.NetFramework.g.cs @@ -558,6 +558,8 @@ public double As(MolarEntropyUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((MolarEntropyUnit) unit); + /// /// Converts this MolarEntropy to another MolarEntropy with the unit representation . /// @@ -568,6 +570,10 @@ public MolarEntropy ToUnit(MolarEntropyUnit unit) return new MolarEntropy(convertedValue, unit); } + IQuantity IQuantity.ToUnit(MolarEntropyUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((MolarEntropyUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/MolarMass.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarMass.NetFramework.g.cs index b91c7fc4bb..99088ffee8 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarMass.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarMass.NetFramework.g.cs @@ -684,6 +684,8 @@ public double As(MolarMassUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((MolarMassUnit) unit); + /// /// Converts this MolarMass to another MolarMass with the unit representation . /// @@ -694,6 +696,10 @@ public MolarMass ToUnit(MolarMassUnit unit) return new MolarMass(convertedValue, unit); } + IQuantity IQuantity.ToUnit(MolarMassUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((MolarMassUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/Molarity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Molarity.NetFramework.g.cs index 82a0463350..300b82c6ea 100644 --- a/UnitsNet/GeneratedCode/Quantities/Molarity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Molarity.NetFramework.g.cs @@ -631,6 +631,8 @@ public double As(MolarityUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((MolarityUnit) unit); + /// /// Converts this Molarity to another Molarity with the unit representation . /// @@ -641,6 +643,10 @@ public Molarity ToUnit(MolarityUnit unit) return new Molarity(convertedValue, unit); } + IQuantity IQuantity.ToUnit(MolarityUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((MolarityUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/Permeability.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Permeability.NetFramework.g.cs index bc503ac510..b73449c468 100644 --- a/UnitsNet/GeneratedCode/Quantities/Permeability.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Permeability.NetFramework.g.cs @@ -533,6 +533,8 @@ public double As(PermeabilityUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((PermeabilityUnit) unit); + /// /// Converts this Permeability to another Permeability with the unit representation . /// @@ -543,6 +545,10 @@ public Permeability ToUnit(PermeabilityUnit unit) return new Permeability(convertedValue, unit); } + IQuantity IQuantity.ToUnit(PermeabilityUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((PermeabilityUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/Permittivity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Permittivity.NetFramework.g.cs index 10d765c1e0..428d00543c 100644 --- a/UnitsNet/GeneratedCode/Quantities/Permittivity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Permittivity.NetFramework.g.cs @@ -533,6 +533,8 @@ public double As(PermittivityUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((PermittivityUnit) unit); + /// /// Converts this Permittivity to another Permittivity with the unit representation . /// @@ -543,6 +545,10 @@ public Permittivity ToUnit(PermittivityUnit unit) return new Permittivity(convertedValue, unit); } + IQuantity IQuantity.ToUnit(PermittivityUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((PermittivityUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/Power.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Power.NetFramework.g.cs index 59b3aa3f9f..807fcd15ea 100644 --- a/UnitsNet/GeneratedCode/Quantities/Power.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Power.NetFramework.g.cs @@ -796,6 +796,8 @@ public double As(PowerUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((PowerUnit) unit); + /// /// Converts this Power to another Power with the unit representation . /// @@ -806,6 +808,10 @@ public Power ToUnit(PowerUnit unit) return new Power(convertedValue, unit); } + IQuantity IQuantity.ToUnit(PowerUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((PowerUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/PowerDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/PowerDensity.NetFramework.g.cs index 544dd90e84..c723aa8e00 100644 --- a/UnitsNet/GeneratedCode/Quantities/PowerDensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PowerDensity.NetFramework.g.cs @@ -1132,6 +1132,8 @@ public double As(PowerDensityUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((PowerDensityUnit) unit); + /// /// Converts this PowerDensity to another PowerDensity with the unit representation . /// @@ -1142,6 +1144,10 @@ public PowerDensity ToUnit(PowerDensityUnit unit) return new PowerDensity(convertedValue, unit); } + IQuantity IQuantity.ToUnit(PowerDensityUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((PowerDensityUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/PowerRatio.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/PowerRatio.NetFramework.g.cs index 5d01e31312..9c69781a53 100644 --- a/UnitsNet/GeneratedCode/Quantities/PowerRatio.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PowerRatio.NetFramework.g.cs @@ -552,6 +552,8 @@ public double As(PowerRatioUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((PowerRatioUnit) unit); + /// /// Converts this PowerRatio to another PowerRatio with the unit representation . /// @@ -562,6 +564,10 @@ public PowerRatio ToUnit(PowerRatioUnit unit) return new PowerRatio(convertedValue, unit); } + IQuantity IQuantity.ToUnit(PowerRatioUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((PowerRatioUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/Pressure.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Pressure.NetFramework.g.cs index f9a2354814..381df2a9f0 100644 --- a/UnitsNet/GeneratedCode/Quantities/Pressure.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Pressure.NetFramework.g.cs @@ -1104,6 +1104,8 @@ public double As(PressureUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((PressureUnit) unit); + /// /// Converts this Pressure to another Pressure with the unit representation . /// @@ -1114,6 +1116,10 @@ public Pressure ToUnit(PressureUnit unit) return new Pressure(convertedValue, unit); } + IQuantity IQuantity.ToUnit(PressureUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((PressureUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.NetFramework.g.cs index f958dcf7d1..4d319e6178 100644 --- a/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.NetFramework.g.cs @@ -614,6 +614,8 @@ public double As(PressureChangeRateUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((PressureChangeRateUnit) unit); + /// /// Converts this PressureChangeRate to another PressureChangeRate with the unit representation . /// @@ -624,6 +626,10 @@ public PressureChangeRate ToUnit(PressureChangeRateUnit unit) return new PressureChangeRate(convertedValue, unit); } + IQuantity IQuantity.ToUnit(PressureChangeRateUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((PressureChangeRateUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/Ratio.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Ratio.NetFramework.g.cs index 8a92945fd1..4e04ebb117 100644 --- a/UnitsNet/GeneratedCode/Quantities/Ratio.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Ratio.NetFramework.g.cs @@ -600,6 +600,8 @@ public double As(RatioUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((RatioUnit) unit); + /// /// Converts this Ratio to another Ratio with the unit representation . /// @@ -610,6 +612,10 @@ public Ratio ToUnit(RatioUnit unit) return new Ratio(convertedValue, unit); } + IQuantity IQuantity.ToUnit(RatioUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((RatioUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.NetFramework.g.cs index c7b8176c35..80309d691b 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.NetFramework.g.cs @@ -558,6 +558,8 @@ public double As(ReactiveEnergyUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ReactiveEnergyUnit) unit); + /// /// Converts this ReactiveEnergy to another ReactiveEnergy with the unit representation . /// @@ -568,6 +570,10 @@ public ReactiveEnergy ToUnit(ReactiveEnergyUnit unit) return new ReactiveEnergy(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ReactiveEnergyUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ReactiveEnergyUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/ReactivePower.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ReactivePower.NetFramework.g.cs index b251b0b912..55bf95c06a 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReactivePower.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReactivePower.NetFramework.g.cs @@ -572,6 +572,8 @@ public double As(ReactivePowerUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ReactivePowerUnit) unit); + /// /// Converts this ReactivePower to another ReactivePower with the unit representation . /// @@ -582,6 +584,10 @@ public ReactivePower ToUnit(ReactivePowerUnit unit) return new ReactivePower(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ReactivePowerUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ReactivePowerUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.NetFramework.g.cs index e11d672028..88a440894d 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.NetFramework.g.cs @@ -558,6 +558,8 @@ public double As(RotationalAccelerationUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((RotationalAccelerationUnit) unit); + /// /// Converts this RotationalAcceleration to another RotationalAcceleration with the unit representation . /// @@ -568,6 +570,10 @@ public RotationalAcceleration ToUnit(RotationalAccelerationUnit unit) return new RotationalAcceleration(convertedValue, unit); } + IQuantity IQuantity.ToUnit(RotationalAccelerationUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((RotationalAccelerationUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.NetFramework.g.cs index 6cff32fe56..1e64f96d6d 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.NetFramework.g.cs @@ -698,6 +698,8 @@ public double As(RotationalSpeedUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((RotationalSpeedUnit) unit); + /// /// Converts this RotationalSpeed to another RotationalSpeed with the unit representation . /// @@ -708,6 +710,10 @@ public RotationalSpeed ToUnit(RotationalSpeedUnit unit) return new RotationalSpeed(convertedValue, unit); } + IQuantity IQuantity.ToUnit(RotationalSpeedUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((RotationalSpeedUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.NetFramework.g.cs index 84d0ba2810..dd7e7e7245 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.NetFramework.g.cs @@ -558,6 +558,8 @@ public double As(RotationalStiffnessUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((RotationalStiffnessUnit) unit); + /// /// Converts this RotationalStiffness to another RotationalStiffness with the unit representation . /// @@ -568,6 +570,10 @@ public RotationalStiffness ToUnit(RotationalStiffnessUnit unit) return new RotationalStiffness(convertedValue, unit); } + IQuantity IQuantity.ToUnit(RotationalStiffnessUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((RotationalStiffnessUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.NetFramework.g.cs index d9b630ab9f..87aa25428c 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.NetFramework.g.cs @@ -558,6 +558,8 @@ public double As(RotationalStiffnessPerLengthUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((RotationalStiffnessPerLengthUnit) unit); + /// /// Converts this RotationalStiffnessPerLength to another RotationalStiffnessPerLength with the unit representation . /// @@ -568,6 +570,10 @@ public RotationalStiffnessPerLength ToUnit(RotationalStiffnessPerLengthUnit unit return new RotationalStiffnessPerLength(convertedValue, unit); } + IQuantity IQuantity.ToUnit(RotationalStiffnessPerLengthUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((RotationalStiffnessPerLengthUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/SolidAngle.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/SolidAngle.NetFramework.g.cs index 2187a68c47..238cd0f274 100644 --- a/UnitsNet/GeneratedCode/Quantities/SolidAngle.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SolidAngle.NetFramework.g.cs @@ -533,6 +533,8 @@ public double As(SolidAngleUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((SolidAngleUnit) unit); + /// /// Converts this SolidAngle to another SolidAngle with the unit representation . /// @@ -543,6 +545,10 @@ public SolidAngle ToUnit(SolidAngleUnit unit) return new SolidAngle(convertedValue, unit); } + IQuantity IQuantity.ToUnit(SolidAngleUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((SolidAngleUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.NetFramework.g.cs index c01b09e032..02657d707d 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.NetFramework.g.cs @@ -645,6 +645,8 @@ public double As(SpecificEnergyUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((SpecificEnergyUnit) unit); + /// /// Converts this SpecificEnergy to another SpecificEnergy with the unit representation . /// @@ -655,6 +657,10 @@ public SpecificEnergy ToUnit(SpecificEnergyUnit unit) return new SpecificEnergy(convertedValue, unit); } + IQuantity IQuantity.ToUnit(SpecificEnergyUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((SpecificEnergyUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.NetFramework.g.cs index 9751102040..9b0c765dc8 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.NetFramework.g.cs @@ -628,6 +628,8 @@ public double As(SpecificEntropyUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((SpecificEntropyUnit) unit); + /// /// Converts this SpecificEntropy to another SpecificEntropy with the unit representation . /// @@ -638,6 +640,10 @@ public SpecificEntropy ToUnit(SpecificEntropyUnit unit) return new SpecificEntropy(convertedValue, unit); } + IQuantity IQuantity.ToUnit(SpecificEntropyUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((SpecificEntropyUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificVolume.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificVolume.NetFramework.g.cs index a1d16e0632..db4632eba3 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificVolume.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificVolume.NetFramework.g.cs @@ -558,6 +558,8 @@ public double As(SpecificVolumeUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((SpecificVolumeUnit) unit); + /// /// Converts this SpecificVolume to another SpecificVolume with the unit representation . /// @@ -568,6 +570,10 @@ public SpecificVolume ToUnit(SpecificVolumeUnit unit) return new SpecificVolume(convertedValue, unit); } + IQuantity IQuantity.ToUnit(SpecificVolumeUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((SpecificVolumeUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificWeight.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificWeight.NetFramework.g.cs index a81d4f9c11..313ccd009a 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificWeight.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificWeight.NetFramework.g.cs @@ -757,6 +757,8 @@ public double As(SpecificWeightUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((SpecificWeightUnit) unit); + /// /// Converts this SpecificWeight to another SpecificWeight with the unit representation . /// @@ -767,6 +769,10 @@ public SpecificWeight ToUnit(SpecificWeightUnit unit) return new SpecificWeight(convertedValue, unit); } + IQuantity IQuantity.ToUnit(SpecificWeightUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((SpecificWeightUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/Speed.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Speed.NetFramework.g.cs index 5cc1a5d5be..82edd67d7d 100644 --- a/UnitsNet/GeneratedCode/Quantities/Speed.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Speed.NetFramework.g.cs @@ -964,6 +964,8 @@ public double As(SpeedUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((SpeedUnit) unit); + /// /// Converts this Speed to another Speed with the unit representation . /// @@ -974,6 +976,10 @@ public Speed ToUnit(SpeedUnit unit) return new Speed(convertedValue, unit); } + IQuantity IQuantity.ToUnit(SpeedUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((SpeedUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/Temperature.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Temperature.NetFramework.g.cs index 887cc3be49..5a981ccc01 100644 --- a/UnitsNet/GeneratedCode/Quantities/Temperature.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Temperature.NetFramework.g.cs @@ -589,6 +589,8 @@ public double As(TemperatureUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((TemperatureUnit) unit); + /// /// Converts this Temperature to another Temperature with the unit representation . /// @@ -599,6 +601,10 @@ public Temperature ToUnit(TemperatureUnit unit) return new Temperature(convertedValue, unit); } + IQuantity IQuantity.ToUnit(TemperatureUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((TemperatureUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.NetFramework.g.cs index 8e8bfe60a1..ff6c37e4e7 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.NetFramework.g.cs @@ -656,6 +656,8 @@ public double As(TemperatureChangeRateUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((TemperatureChangeRateUnit) unit); + /// /// Converts this TemperatureChangeRate to another TemperatureChangeRate with the unit representation . /// @@ -666,6 +668,10 @@ public TemperatureChangeRate ToUnit(TemperatureChangeRateUnit unit) return new TemperatureChangeRate(convertedValue, unit); } + IQuantity IQuantity.ToUnit(TemperatureChangeRateUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((TemperatureChangeRateUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.NetFramework.g.cs index aada16a09c..6b79c52d83 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.NetFramework.g.cs @@ -628,6 +628,8 @@ public double As(TemperatureDeltaUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((TemperatureDeltaUnit) unit); + /// /// Converts this TemperatureDelta to another TemperatureDelta with the unit representation . /// @@ -638,6 +640,10 @@ public TemperatureDelta ToUnit(TemperatureDeltaUnit unit) return new TemperatureDelta(convertedValue, unit); } + IQuantity IQuantity.ToUnit(TemperatureDeltaUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((TemperatureDeltaUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.NetFramework.g.cs index c8c919d7f0..5086d87eeb 100644 --- a/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.NetFramework.g.cs @@ -547,6 +547,8 @@ public double As(ThermalConductivityUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ThermalConductivityUnit) unit); + /// /// Converts this ThermalConductivity to another ThermalConductivity with the unit representation . /// @@ -557,6 +559,10 @@ public ThermalConductivity ToUnit(ThermalConductivityUnit unit) return new ThermalConductivity(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ThermalConductivityUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ThermalConductivityUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/ThermalResistance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ThermalResistance.NetFramework.g.cs index b83bd0e05c..33a975b7fe 100644 --- a/UnitsNet/GeneratedCode/Quantities/ThermalResistance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ThermalResistance.NetFramework.g.cs @@ -586,6 +586,8 @@ public double As(ThermalResistanceUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((ThermalResistanceUnit) unit); + /// /// Converts this ThermalResistance to another ThermalResistance with the unit representation . /// @@ -596,6 +598,10 @@ public ThermalResistance ToUnit(ThermalResistanceUnit unit) return new ThermalResistance(convertedValue, unit); } + IQuantity IQuantity.ToUnit(ThermalResistanceUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((ThermalResistanceUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/Torque.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Torque.NetFramework.g.cs index 73e29b7028..b40d2eb665 100644 --- a/UnitsNet/GeneratedCode/Quantities/Torque.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Torque.NetFramework.g.cs @@ -810,6 +810,8 @@ public double As(TorqueUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((TorqueUnit) unit); + /// /// Converts this Torque to another Torque with the unit representation . /// @@ -820,6 +822,10 @@ public Torque ToUnit(TorqueUnit unit) return new Torque(convertedValue, unit); } + IQuantity IQuantity.ToUnit(TorqueUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((TorqueUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/VitaminA.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/VitaminA.NetFramework.g.cs index 6395c208f2..cce58a3f26 100644 --- a/UnitsNet/GeneratedCode/Quantities/VitaminA.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VitaminA.NetFramework.g.cs @@ -530,6 +530,8 @@ public double As(VitaminAUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((VitaminAUnit) unit); + /// /// Converts this VitaminA to another VitaminA with the unit representation . /// @@ -540,6 +542,10 @@ public VitaminA ToUnit(VitaminAUnit unit) return new VitaminA(convertedValue, unit); } + IQuantity IQuantity.ToUnit(VitaminAUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((VitaminAUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/Volume.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Volume.NetFramework.g.cs index eb626cbb5f..348d9363ea 100644 --- a/UnitsNet/GeneratedCode/Quantities/Volume.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Volume.NetFramework.g.cs @@ -1146,6 +1146,8 @@ public double As(VolumeUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((VolumeUnit) unit); + /// /// Converts this Volume to another Volume with the unit representation . /// @@ -1156,6 +1158,10 @@ public Volume ToUnit(VolumeUnit unit) return new Volume(convertedValue, unit); } + IQuantity IQuantity.ToUnit(VolumeUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((VolumeUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantities/VolumeFlow.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumeFlow.NetFramework.g.cs index 450aa2daf1..2c37ce9ffc 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumeFlow.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumeFlow.NetFramework.g.cs @@ -1188,6 +1188,8 @@ public double As(VolumeFlowUnit unit) return Convert.ToDouble(converted); } + public double As(Enum unit) => As((VolumeFlowUnit) unit); + /// /// Converts this VolumeFlow to another VolumeFlow with the unit representation . /// @@ -1198,6 +1200,10 @@ public VolumeFlow ToUnit(VolumeFlowUnit unit) return new VolumeFlow(convertedValue, unit); } + IQuantity IQuantity.ToUnit(VolumeFlowUnit unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit((VolumeFlowUnit) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantity.g.cs b/UnitsNet/GeneratedCode/Quantity.g.cs new file mode 100644 index 0000000000..2e4b885326 --- /dev/null +++ b/UnitsNet/GeneratedCode/Quantity.g.cs @@ -0,0 +1,53 @@ +using System; +using System.Linq; +using UnitsNet.Units; + +namespace UnitsNet +{ + public static partial class Quantity + { + public static IQuantity From(QuantityValue value, Enum unit) + { + if (TryFrom(value, unit, out IQuantity quantity)) + return quantity; + + throw new ArgumentException( + $"Unit value {unit} of type {unit.GetType()} is not a known unit enum type. Expected types like UnitsNet.Units.LengthUnit. Did you pass in a third-party enum type defined outside UnitsNet library?"); + } + + public static bool TryFrom(QuantityValue value, Enum unit, out IQuantity quantity) + { + switch (unit) + { + case AngleUnit angleUnit: + quantity = Angle.From(value, angleUnit); + return true; + case LengthUnit lengthUnit: + quantity = Length.From(value, lengthUnit); + return true; + default: + { + quantity = default(IQuantity); + return false; + } + } + } + + public static IQuantity Parse(Type quantityType, string quantityString) + { + if (!typeof(IQuantity).IsAssignableFrom(quantityType)) + throw new ArgumentException($"Type {quantityType} must be of type UnitsNet.IQuantity."); + + if (quantityType == typeof(Angle)) return Angle.Parse(quantityString); + if (quantityType == typeof(Length)) return Length.Parse(quantityString); + + throw new ArgumentException( + $"Type {quantityType} is not a known quantity type. Did you pass in a third-party quantity type defined outside UnitsNet library?"); + } + + public static QuantityInfo GetInfo(QuantityType quantityType) + { + return UnitsHelper.QuantityInfos.First(qi => qi.QuantityType == quantityType); + } + } +} diff --git a/UnitsNet/IQuantity.cs b/UnitsNet/IQuantity.cs index ad02c110d7..c96b5e2680 100644 --- a/UnitsNet/IQuantity.cs +++ b/UnitsNet/IQuantity.cs @@ -21,6 +21,7 @@ using System; using JetBrains.Annotations; +using UnitsNet.Units; namespace UnitsNet { @@ -43,6 +44,21 @@ public partial interface IQuantity /// Information about the quantity type, such as unit values and names. /// QuantityInfo QuantityInfo { get; } + + /// + /// Dynamically convert to another unit representation. + /// + /// The unit enum value. The unit must be compatible, so for you should provide a value. + /// Value converted to the specified unit. + /// Wrong unit enum type was given. + double As(Enum unit); + + /// + /// Change the default unit representation of the quantity, which affects things like . + /// + /// The unit enum value. The unit must be compatible, so for you should provide a value. + /// A new quantity with the given unit as default unit representation. + IQuantity ToUnit(Enum unit); } #if !WINDOWS_UWP @@ -122,6 +138,13 @@ public interface IQuantity : IQuantity where TUnitType : Enum /// new QuantityInfo QuantityInfo { get; } + + /// + /// Change the default unit representation of the quantity, which affects things like . + /// + /// + /// + IQuantity ToUnit(TUnitType unit); } #endif diff --git a/UnitsNet/QuantityInfo.cs b/UnitsNet/QuantityInfo.cs index a7bef17132..e135f028c2 100644 --- a/UnitsNet/QuantityInfo.cs +++ b/UnitsNet/QuantityInfo.cs @@ -42,9 +42,11 @@ public QuantityInfo(QuantityType quantityType, [NotNull] Enum[] units, [NotNull] if (units == null) throw new ArgumentNullException(nameof(units)); Name = quantityType.ToString(); QuantityType = quantityType; + UnitType = UnitsHelper.GetUnitType(quantityType); UnitNames = units.Select(u => u.ToString()).ToArray(); Units = units; Zero = zero ?? throw new ArgumentNullException(nameof(zero)); + ValueType = zero.GetType(); } @@ -73,6 +75,16 @@ public QuantityInfo(QuantityType quantityType, [NotNull] Enum[] units, [NotNull] /// Zero value of quantity, such as . /// public IQuantity Zero { get; } + + /// + /// Unit enum type, such as or . + /// + public Type UnitType { get; } + + /// + /// Quantity value type, such as or . + /// + public Type ValueType { get; } } /// diff --git a/UnitsNet/QuantityValue.cs b/UnitsNet/QuantityValue.cs index 2838e37c50..e1385fa68e 100644 --- a/UnitsNet/QuantityValue.cs +++ b/UnitsNet/QuantityValue.cs @@ -103,6 +103,11 @@ public static explicit operator decimal(QuantityValue number) } #endregion + + public override string ToString() + { + return _value.HasValue ? _value.ToString() : _valueDecimal.ToString(); + } } } #endif diff --git a/UnitsNet/Scripts/Include-GenerateQuantitySourceCodeNetFramework.ps1 b/UnitsNet/Scripts/Include-GenerateQuantitySourceCodeNetFramework.ps1 index 43272d93d5..22a8639acf 100644 --- a/UnitsNet/Scripts/Include-GenerateQuantitySourceCodeNetFramework.ps1 +++ b/UnitsNet/Scripts/Include-GenerateQuantitySourceCodeNetFramework.ps1 @@ -950,6 +950,8 @@ function GenerateConversionMethods([GeneratorArgs]$genArgs) return Convert.ToDouble(converted); } + public double As(Enum unit) => As(($unitEnumName) unit); + /// /// Converts this $quantityName to another $quantityName with the unit representation . /// @@ -960,6 +962,10 @@ function GenerateConversionMethods([GeneratorArgs]$genArgs) return new $quantityName(convertedValue, unit); } + IQuantity<$unitEnumName> IQuantity<$unitEnumName>.ToUnit($unitEnumName unit) => ToUnit(unit); + + public IQuantity ToUnit(Enum unit) => ToUnit(($unitEnumName) unit); + /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/UnitConverter.cs b/UnitsNet/UnitConverter.cs index 6b83b9a630..856a085302 100644 --- a/UnitsNet/UnitConverter.cs +++ b/UnitsNet/UnitConverter.cs @@ -31,6 +31,7 @@ #else using Culture = System.IFormatProvider; using FromValue = UnitsNet.QuantityValue; + #endif namespace UnitsNet @@ -52,6 +53,37 @@ public static class UnitConverter .Where(x => x.Namespace == UnitTypeNamespace && x.IsEnum() && x.Name.EndsWith("Unit")) .ToArray(); + /// + /// Convert between any two quantity units given a numeric value and two unit enum values. + /// + /// Numeric value. + /// From unit enum value. + /// To unit enum value, must be compatible with . + /// The converted value in the new unit representation. + public static double Convert(QuantityValue fromValue, Enum fromUnitValue, Enum toUnitValue) + { + return Quantity + .From(fromValue, fromUnitValue) + .As(toUnitValue); + } + + public static bool TryConvert(QuantityValue fromValue, Enum fromUnitValue, Enum toUnitValue, out double convertedValue) + { + convertedValue = 0; + if (!Quantity.TryFrom(fromValue, fromUnitValue, out IQuantity from)) return false; + + try + { + // We're not going to implement TryAs() in all quantities, so let's just try-catch here + convertedValue = from.As(toUnitValue); + return true; + } + catch + { + return false; + } + } + /// /// Convert between any two quantity units by their names, such as converting a "Length" of N "Meter" to "Centimeter". /// This is particularly useful for creating things like a generated unit conversion UI, @@ -83,33 +115,24 @@ public static class UnitConverter /// More than one unit matches the abbreviation. public static double ConvertByName(FromValue fromValue, string quantityName, string fromUnit, string toUnit) { - if(!TryGetQuantityType(quantityName, out var quantityType)) - throw new QuantityNotFoundException($"The given quantity name was not found: {quantityName}"); - - if(!TryGetUnitType(quantityName, out var unitType)) + if (!TryGetUnitType(quantityName, out var unitType)) throw new UnitNotFoundException($"The unit type for the given quantity was not found: {quantityName}"); - if(!TryParseUnit(unitType, fromUnit, out var fromUnitValue)) // ex: LengthUnit.Meter + if (!TryParseUnit(unitType, fromUnit, out var fromUnitValue)) // ex: LengthUnit.Meter { var e = new UnitNotFoundException($"Unit not found [{fromUnit}]."); e.Data["unitName"] = fromUnit; throw e; } - if(!TryParseUnit(unitType, toUnit, out var toUnitValue)) // ex: LengthUnit.Centimeter + if (!TryParseUnit(unitType, toUnit, out var toUnitValue)) // ex: LengthUnit.Centimeter { var e = new UnitNotFoundException($"Unit not found [{toUnit}]."); e.Data["unitName"] = toUnit; throw e; } - var fromMethod = GetStaticFromMethod(quantityType, unitType); // ex: UnitsNet.Length.From(double inputValue, LengthUnit inputUnit) - var fromResult = fromMethod.Invoke(null, new[] {fromValue, fromUnitValue}); // ex: Length quantity = UnitsNet.Length.From(5, LengthUnit.Meter) - - var asMethod = GetAsMethod(quantityType, unitType); // ex: quantity.As(LengthUnit outputUnit) - var asResult = asMethod.Invoke(fromResult, new[] {toUnitValue}); // ex: double outputValue = quantity.As(LengthUnit.Centimeter) - - return (double)asResult; + return Convert(fromValue, fromUnitValue, toUnitValue); } /// @@ -143,25 +166,16 @@ public static bool TryConvertByName(FromValue inputValue, string quantityName, s { result = 0d; - if(!TryGetQuantityType(quantityName, out var quantityType)) + if (!TryGetUnitType(quantityName, out var unitType)) return false; - if(!TryGetUnitType(quantityName, out var unitType)) + if (!TryParseUnit(unitType, fromUnit, out var fromUnitValue)) // ex: LengthUnit.Meter return false; - if(!TryParseUnit(unitType, fromUnit, out var fromUnitValue)) // ex: LengthUnit.Meter + if (!TryParseUnit(unitType, toUnit, out var toUnitValue)) // ex: LengthUnit.Centimeter return false; - if(!TryParseUnit(unitType, toUnit, out var toUnitValue)) // ex: LengthUnit.Centimeter - return false; - - var fromMethod = GetStaticFromMethod(quantityType, unitType); // ex: UnitsNet.Length.From(double inputValue, LengthUnit inputUnit) - var fromResult = fromMethod.Invoke(null, new[] {inputValue, fromUnitValue}); // ex: Length quantity = UnitsNet.Length.From(5, LengthUnit.Meter) - - var asMethod = GetAsMethod(quantityType, unitType); // ex: quantity.As(LengthUnit outputUnit) - var asResult = asMethod.Invoke(fromResult, new[] {toUnitValue}); // ex: double outputValue = quantity.As(LengthUnit.Centimeter) - - result = (double)asResult; + result = Convert(inputValue, fromUnitValue, toUnitValue); return true; } @@ -225,18 +239,21 @@ public static double ConvertByAbbreviation(FromValue fromValue, string quantityN /// Culture to parse abbreviations with. /// double centimeters = ConvertByName(5, "Length", "m", "cm"); // 500 /// Output value as the result of converting to . - /// No quantity types match the . - /// No unit types match the prefix of or no units are mapped to the abbreviation. + /// No quantity types match the . + /// + /// No unit types match the prefix of or no units + /// are mapped to the abbreviation. + /// /// More than one unit matches the abbreviation. public static double ConvertByAbbreviation(FromValue fromValue, string quantityName, string fromUnitAbbrev, string toUnitAbbrev, string culture) { - if(!TryGetQuantityType(quantityName, out var quantityType)) + if (!TryGetQuantityType(quantityName, out var quantityType)) throw new QuantityNotFoundException($"The given quantity name was not found: {quantityName}"); - if(!TryGetUnitType(quantityName, out var unitType)) + if (!TryGetUnitType(quantityName, out var unitType)) throw new UnitNotFoundException($"The unit type for the given quantity was not found: {quantityName}"); - var cultureInfo = string.IsNullOrWhiteSpace(culture)? GlobalConfiguration.DefaultCulture : new CultureInfo(culture); + var cultureInfo = string.IsNullOrWhiteSpace(culture) ? GlobalConfiguration.DefaultCulture : new CultureInfo(culture); var fromUnitValue = UnitParser.Default.Parse(fromUnitAbbrev, unitType, cultureInfo); // ex: ("m", LengthUnit) => LengthUnit.Meter var toUnitValue = UnitParser.Default.Parse(toUnitAbbrev, unitType, cultureInfo); // ex:("cm", LengthUnit) => LengthUnit.Centimeter @@ -247,7 +264,7 @@ public static double ConvertByAbbreviation(FromValue fromValue, string quantityN var asMethod = GetAsMethod(quantityType, unitType); // ex: quantity.As(LengthUnit outputUnit) var asResult = asMethod.Invoke(fromResult, new[] {toUnitValue}); // ex: double outputValue = quantity.As(LengthUnit.Centimeter) - return (double)asResult; + return (double) asResult; } /// @@ -315,18 +332,18 @@ public static bool TryConvertByAbbreviation(FromValue fromValue, string quantity { result = 0d; - if(!TryGetQuantityType(quantityName, out var quantityType)) + if (!TryGetQuantityType(quantityName, out var quantityType)) return false; - if(!TryGetUnitType(quantityName, out var unitType)) + if (!TryGetUnitType(quantityName, out var unitType)) return false; - var cultureInfo = string.IsNullOrWhiteSpace(culture)? GlobalConfiguration.DefaultCulture : new CultureInfo(culture); + var cultureInfo = string.IsNullOrWhiteSpace(culture) ? GlobalConfiguration.DefaultCulture : new CultureInfo(culture); - if(!UnitParser.Default.TryParse(fromUnitAbbrev, unitType, cultureInfo, out var fromUnitValue)) // ex: ("m", LengthUnit) => LengthUnit.Meter + if (!UnitParser.Default.TryParse(fromUnitAbbrev, unitType, cultureInfo, out var fromUnitValue)) // ex: ("m", LengthUnit) => LengthUnit.Meter return false; - if(!UnitParser.Default.TryParse(toUnitAbbrev, unitType, cultureInfo, out var toUnitValue)) // ex:("cm", LengthUnit) => LengthUnit.Centimeter + if (!UnitParser.Default.TryParse(toUnitAbbrev, unitType, cultureInfo, out var toUnitValue)) // ex:("cm", LengthUnit) => LengthUnit.Centimeter return false; var fromMethod = GetStaticFromMethod(quantityType, unitType); // ex: UnitsNet.Length.From(double inputValue, LengthUnit inputUnit) @@ -335,7 +352,7 @@ public static bool TryConvertByAbbreviation(FromValue fromValue, string quantity var asMethod = GetAsMethod(quantityType, unitType); // ex: quantity.As(LengthUnit outputUnit) var asResult = asMethod.Invoke(fromResult, new[] {toUnitValue}); // ex: double outputValue = quantity.As(LengthUnit.Centimeter) - result = (double)asResult; + result = (double) asResult; return true; } @@ -389,15 +406,15 @@ private static bool HasParameterTypes(MethodInfo methodInfo, params Type[] expec /// The return enum value, such as boxed as an object. /// True if succeeded, otherwise false. /// No unit values match the . - private static bool TryParseUnit(Type unitType, string unitName, out object unitValue) + private static bool TryParseUnit(Type unitType, string unitName, out Enum unitValue) { unitValue = null; var eNames = Enum.GetNames(unitType); unitName = eNames.FirstOrDefault(x => x.Equals(unitName, StringComparison.OrdinalIgnoreCase)); - if(unitName == null) + if (unitName == null) return false; - unitValue = Enum.Parse(unitType, unitName); + unitValue = (Enum) Enum.Parse(unitType, unitName); return true; } diff --git a/UnitsNet/UnitsHelper.cs b/UnitsNet/UnitsHelper.cs index a0f1b46086..7c376c55c0 100644 --- a/UnitsNet/UnitsHelper.cs +++ b/UnitsNet/UnitsHelper.cs @@ -23,6 +23,7 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; +using UnitsNet.InternalHelpers; using UnitsNet.Units; namespace UnitsNet @@ -37,26 +38,41 @@ public static class UnitsHelper private static readonly Type[] UnitEnumTypes = Assembly.GetAssembly(typeof(Length)) .GetExportedTypes() - .Where(t => t.IsEnum && t.Namespace == UnitEnumNamespace) + .Where(t => t.IsEnum && t.Namespace == UnitEnumNamespace && t.Name.EndsWith("Unit")) .ToArray(); static UnitsHelper() { var quantityTypes = Enum.GetValues(typeof(QuantityType)).Cast().ToArray(); - Quantities = quantityTypes; + QuantityTypes = quantityTypes; QuantityNames = Enum.GetNames(typeof(QuantityType)); + + // A bunch of reflection to enumerate quantity types, instantiate with the default constructor and return its QuantityInfo property + QuantityInfos = Assembly.GetAssembly(typeof(Length)) + .GetExportedTypes() + .Where(typeof(IQuantity).IsAssignableFrom) + .Where(t => t.IsClass() || t.IsValueType()) // Future-proofing: Considering changing quantities from struct to class + .Select(Activator.CreateInstance) + .Cast() + .Select(quantity => quantity.QuantityInfo) + .ToArray(); } /// /// All enum values of , such as and . /// - public static QuantityType[] Quantities { get; } + public static QuantityType[] QuantityTypes { get; } /// /// All enum value names of , such as "Length" and "Mass". /// public static string[] QuantityNames { get; } + /// + /// All quantity information objects, such as and . + /// + public static QuantityInfo[] QuantityInfos { get; } + /// /// Returns the enum values for the given , excluding the Undefined=0 value. /// You can then use this for dynamic parsing in . @@ -68,13 +84,13 @@ static UnitsHelper() /// /// The quantity type. /// Unit enum values. - public static IEnumerable GetUnitEnumValuesForQuantity(QuantityType quantity) + public static IEnumerable GetUnitEnumValuesForQuantity(QuantityType quantity) { // QuantityType.Length => "UnitsNet.Units.LengthUnit" Type unitEnumType = GetUnitType(quantity); // Skip Undefined, which is only really used to help catch uninitialized values - return Enum.GetValues(unitEnumType).Cast().Skip(1).ToArray(); + return Enum.GetValues(unitEnumType).Cast().Skip(1).ToArray(); } /// @@ -99,8 +115,7 @@ public static IEnumerable GetUnitNamesForQuantity(QuantityType quantity) /// public static Type GetUnitType(QuantityType quantity) { - return UnitEnumTypes - .First(t => t.FullName == $"{UnitEnumNamespace}.{quantity}Unit"); + return UnitEnumTypes.First(t => t.Name == $"{quantity}Unit"); } } } From 1a51fd0abcc2c5d99b34e7d24972d31fb8bbc0c7 Mon Sep 17 00:00:00 2001 From: Andreas Gullberg Larsen Date: Sun, 27 Jan 2019 23:04:36 +0100 Subject: [PATCH 10/36] Update sample apps to not use reflection --- .../UnitConverter.Wpf/IMainWindowVm.cs | 2 +- .../UnitConverter.Wpf/MainWindowDesignVM.cs | 5 +- .../UnitConverter.Wpf/MainWindowVM.cs | 28 ++++---- .../UnitConverter.Wpf.csproj | 1 - .../UnitConverter.Wpf/UnitHelper.cs | 26 ------- .../UnitConverter.Wpf/UnitListItem.cs | 6 +- .../Converters/EnumBindingSource.cs | 23 +++---- .../Converters/UnitToStringConverter.cs | 68 ++++++++----------- .../WpfMVVMSample/Settings/SettingsManager.cs | 15 ++-- 9 files changed, 68 insertions(+), 106 deletions(-) delete mode 100644 Samples/UnitConverter.Wpf/UnitConverter.Wpf/UnitHelper.cs diff --git a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/IMainWindowVm.cs b/Samples/UnitConverter.Wpf/UnitConverter.Wpf/IMainWindowVm.cs index c062f6d460..dcf70b3d4d 100644 --- a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/IMainWindowVm.cs +++ b/Samples/UnitConverter.Wpf/UnitConverter.Wpf/IMainWindowVm.cs @@ -27,4 +27,4 @@ public interface IMainWindowVm : INotifyPropertyChanged decimal ToValue { get; } ICommand SwapCommand { get; } } -} \ No newline at end of file +} diff --git a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/MainWindowDesignVM.cs b/Samples/UnitConverter.Wpf/UnitConverter.Wpf/MainWindowDesignVM.cs index b97fe92bcb..6a72f812b8 100644 --- a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/MainWindowDesignVM.cs +++ b/Samples/UnitConverter.Wpf/UnitConverter.Wpf/MainWindowDesignVM.cs @@ -1,4 +1,3 @@ -using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; @@ -15,7 +14,7 @@ public sealed class MainWindowDesignVm : IMainWindowVm { public MainWindowDesignVm() { - Quantities = ToReadOnly(Enum.GetValues(typeof(QuantityType)).Cast().Skip(1)); + Quantities = ToReadOnly(UnitsHelper.QuantityTypes); Units = ToReadOnly(Length.Units.Select(u => new UnitListItem(u))); SelectedQuantity = QuantityType.Length; SelectedFromUnit = Units[1]; @@ -42,4 +41,4 @@ private static ReadOnlyObservableCollection ToReadOnly(IEnumerable item return new ReadOnlyObservableCollection(new ObservableCollection(items)); } } -} \ No newline at end of file +} diff --git a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/MainWindowVM.cs b/Samples/UnitConverter.Wpf/UnitConverter.Wpf/MainWindowVM.cs index bb4368201a..40f1169dd5 100644 --- a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/MainWindowVM.cs +++ b/Samples/UnitConverter.Wpf/UnitConverter.Wpf/MainWindowVM.cs @@ -29,7 +29,7 @@ public sealed class MainWindowVm : IMainWindowVm public MainWindowVm() { - Quantities = ToReadOnly(Enum.GetValues(typeof(QuantityType)).Cast().Skip(1)); + Quantities = ToReadOnly(UnitsHelper.QuantityTypes); _units = new ObservableCollection(); Units = new ReadOnlyObservableCollection(_units); @@ -131,21 +131,25 @@ private void UpdateResult() { if (SelectedFromUnit == null || SelectedToUnit == null) return; - ToValue = Convert.ToDecimal(UnitsNet.UnitConverter.ConvertByName(FromValue, - SelectedQuantity.ToString(), - SelectedFromUnit.UnitEnumValue.ToString(), - SelectedToUnit.UnitEnumValue.ToString())); + double convertedValue = UnitsNet.UnitConverter.Convert(FromValue, + SelectedFromUnit.UnitEnumValue, + SelectedToUnit.UnitEnumValue); + + ToValue = Convert.ToDecimal(convertedValue); } - private void OnSelectedQuantity(QuantityType quantity) + private void OnSelectedQuantity(QuantityType quantityType) { + QuantityInfo quantityInfo = Quantity.GetInfo(quantityType); + _units.Clear(); - IEnumerable unitValues = UnitHelper.GetUnits(quantity); - foreach (object unitValue in unitValues) _units.Add(new UnitListItem(unitValue)); + foreach (Enum unitValue in quantityInfo.Units) + { + _units.Add(new UnitListItem(unitValue)); + } - SelectedQuantity = quantity; - SelectedFromUnit = Units.FirstOrDefault(); - SelectedToUnit = Units.Skip(1).FirstOrDefault() ?? SelectedFromUnit; // Try to pick a different to-unit + SelectedFromUnit = _units.FirstOrDefault(); + SelectedToUnit = _units.Skip(1).FirstOrDefault() ?? SelectedFromUnit; // Try to pick a different to-unit } private static ReadOnlyObservableCollection ToReadOnly(IEnumerable items) @@ -159,4 +163,4 @@ private void OnPropertyChanged([CallerMemberName] string propertyName = null) PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); } } -} \ No newline at end of file +} diff --git a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/UnitConverter.Wpf.csproj b/Samples/UnitConverter.Wpf/UnitConverter.Wpf/UnitConverter.Wpf.csproj index c8277e5abc..6a7b657f4c 100644 --- a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/UnitConverter.Wpf.csproj +++ b/Samples/UnitConverter.Wpf/UnitConverter.Wpf/UnitConverter.Wpf.csproj @@ -73,7 +73,6 @@ MSBuild:Compile Designer - MSBuild:Compile diff --git a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/UnitHelper.cs b/Samples/UnitConverter.Wpf/UnitConverter.Wpf/UnitHelper.cs deleted file mode 100644 index 73feb754b3..0000000000 --- a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/UnitHelper.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; - -namespace UnitsNet.Samples.UnitConverter.Wpf -{ - /// - /// TODO Move me into the UnitsNet library. This will solve a pain point in generically enumerating units for a quantity. - /// - public static class UnitHelper - { - /// - /// Look up and cache all unit enum types once with reflection, such as LengthUnit and MassUnit. - /// - private static readonly Type[] UnitEnumTypes = - Assembly.GetAssembly(typeof(Length)).ExportedTypes.Where(t => t.IsEnum && t.Namespace == "UnitsNet.Units").ToArray(); - - public static IReadOnlyList GetUnits(QuantityType quantity) - { - // Ex: Find unit enum type UnitsNet.Units.LengthUnit from quantity enum name QuantityType.Length - Type unitEnumType = UnitEnumTypes.First(t => t.FullName == $"UnitsNet.Units.{quantity}Unit"); - return Enum.GetValues(unitEnumType).Cast().Skip(1).ToArray(); - } - } -} \ No newline at end of file diff --git a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/UnitListItem.cs b/Samples/UnitConverter.Wpf/UnitConverter.Wpf/UnitListItem.cs index 897361a0b3..555fc3195d 100644 --- a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/UnitListItem.cs +++ b/Samples/UnitConverter.Wpf/UnitConverter.Wpf/UnitListItem.cs @@ -9,10 +9,10 @@ namespace UnitsNet.Samples.UnitConverter.Wpf /// public sealed class UnitListItem { - public UnitListItem(object val) + public UnitListItem(Enum val) { UnitEnumValue = val; - UnitEnumValueInt = (int) val; + UnitEnumValueInt = Convert.ToInt32(val); UnitEnumType = val.GetType(); Abbreviation = UnitAbbreviationsCache.Default.GetDefaultAbbreviation(UnitEnumType, UnitEnumValueInt); @@ -20,7 +20,7 @@ public UnitListItem(object val) } public string Text { get; } - public object UnitEnumValue { get; } + public Enum UnitEnumValue { get; } public int UnitEnumValueInt { get; } public Type UnitEnumType { get; } public string Abbreviation { get; } diff --git a/Samples/WpfMVVMSample/WpfMVVMSample/Converters/EnumBindingSource.cs b/Samples/WpfMVVMSample/WpfMVVMSample/Converters/EnumBindingSource.cs index 02d87b7737..db5b223288 100644 --- a/Samples/WpfMVVMSample/WpfMVVMSample/Converters/EnumBindingSource.cs +++ b/Samples/WpfMVVMSample/WpfMVVMSample/Converters/EnumBindingSource.cs @@ -1,9 +1,6 @@ using System; using System.Collections.Generic; -using System.Collections.ObjectModel; using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Windows.Markup; namespace WpfMVVMSample.Converters @@ -13,10 +10,10 @@ public class EnumBindingSourceExtension : MarkupExtension private Type _enumType; private Type EnumType { - get { return this._enumType; } + get => _enumType; set { - if (value != this._enumType) + if (value != _enumType) { if (value != null) { @@ -26,27 +23,29 @@ private Type EnumType throw new ArgumentException("Type must be for an Enum."); } - this._enumType = value; + _enumType = value; } } } + // Instantiated by GUI + // ReSharper disable once UnusedMember.Global public EnumBindingSourceExtension() { } public EnumBindingSourceExtension(Type enumType) { - this.EnumType = enumType; + EnumType = enumType; } public override object ProvideValue(IServiceProvider serviceProvider) { - if (this._enumType== null) + if (_enumType== null) throw new InvalidOperationException("The EnumType must be specified."); - Type actualEnumType = Nullable.GetUnderlyingType(this._enumType) ?? this._enumType; - - //omits the first enum element, typically "undefined" - var enumValues = Enum.GetValues(actualEnumType).Cast().Skip(1); + Type actualEnumType = Nullable.GetUnderlyingType(_enumType) ?? _enumType; + + // Omits the first unit enum element, such as LengthUnit.Undefined + IEnumerable enumValues = Enum.GetValues(actualEnumType).Cast().Skip(1); return enumValues; } diff --git a/Samples/WpfMVVMSample/WpfMVVMSample/Converters/UnitToStringConverter.cs b/Samples/WpfMVVMSample/WpfMVVMSample/Converters/UnitToStringConverter.cs index d783152170..9632853ca5 100644 --- a/Samples/WpfMVVMSample/WpfMVVMSample/Converters/UnitToStringConverter.cs +++ b/Samples/WpfMVVMSample/WpfMVVMSample/Converters/UnitToStringConverter.cs @@ -1,6 +1,7 @@ using System; using System.ComponentModel; using System.Globalization; +using System.Linq; using System.Windows; using System.Windows.Controls; using System.Windows.Data; @@ -11,10 +12,10 @@ namespace WpfMVVMSample.Converters { - public class UnitToStringConverter :MarkupExtension, IValueConverter + public class UnitToStringConverter : MarkupExtension, IValueConverter { //http://www.thejoyofcode.com/WPF_Quick_Tip_Converters_as_MarkupExtensions.aspx - private SettingsManager _settings; + private readonly SettingsManager _settings; private static UnitToStringConverter _instance; public UnitToStringConverter() @@ -25,62 +26,51 @@ public UnitToStringConverter() } } - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { - var quantityType = value.GetType(); - var unitEnumType = quantityType.GetProperty("BaseUnit").PropertyType; - var unitEnumValue = _settings.GetDefaultUnit(unitEnumType); - var significantDigits = _settings.SignificantDigits; + if (!(value is IQuantity quantity)) + throw new ArgumentException("Expected value of type UnitsNet.IQuantity.", nameof(value)); + + Enum unitEnumValue = _settings.GetDefaultUnit(quantity.QuantityInfo.UnitType); + int significantDigits = _settings.SignificantDigits; - var quantityInUnit = - quantityType - .GetMethod("ToUnit", new[] {unitEnumType}) - .Invoke(value, new[] {unitEnumValue}); + IQuantity quantityInUnit = quantity.ToUnit(unitEnumValue); - var result = quantityType - .GetMethod("ToString", new[] {typeof(IFormatProvider), typeof(int)}) - .Invoke(quantityInUnit, new object[] {null, significantDigits}); + return quantityInUnit.ToString(null, significantDigits); - return result; } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { - var unitEnumType = targetType.GetProperty("BaseUnit").PropertyType; - var unitEnumValue = _settings.GetDefaultUnit(unitEnumType); + if (!typeof(IQuantity).IsAssignableFrom(targetType)) + throw new ArgumentException("Expected targetType of type UnitsNet.IQuantity.", nameof(value)); - if ((string)value == "") return 0.0; - - double number; - if (double.TryParse((string)value, out number)) - return ParseDouble(targetType, number, unitEnumType, unitEnumValue); + if (value == null || + !(value is string valueString) || + string.IsNullOrWhiteSpace(valueString)) + { + return new ValidationResult(false, "Input is not valid. Expected a number or a string like \"1.5 kg\"."); + } try { - return ParseUnit(value, targetType); + // If input is just a number, use the configured default unit + if (double.TryParse((string) value, out double number)) + { + Type unitEnumType = UnitsHelper.QuantityInfos.First(qi => qi.ValueType == targetType).UnitType; + Enum defaultUnit = _settings.GetDefaultUnit(unitEnumType); + return Quantity.From(number, defaultUnit); + } + + // Otherwise try to parse the string, such as "1.5 kg" + return Quantity.Parse(targetType, valueString); } catch (Exception e) { - return new ValidationResult(false, e.InnerException.Message); + return new ValidationResult(false, e.InnerException?.Message ?? e.Message); } } - - private static object ParseDouble(Type targetType, double number, Type unitEnumType, object unitEnumValue) - { - return targetType - .GetMethod("From", new[] { typeof(QuantityValue), unitEnumType }) - .Invoke(null, new object[] { (QuantityValue)number, unitEnumValue }); - } - - private static object ParseUnit(object value, Type targetType) - { - return targetType - .GetMethod("Parse", new[] { typeof(string) }) - .Invoke(null, new object[] { value }); - } - public override object ProvideValue(IServiceProvider serviceProvider) { return _instance ?? (_instance = new UnitToStringConverter()); diff --git a/Samples/WpfMVVMSample/WpfMVVMSample/Settings/SettingsManager.cs b/Samples/WpfMVVMSample/WpfMVVMSample/Settings/SettingsManager.cs index 9aa777ebf0..659865b724 100644 --- a/Samples/WpfMVVMSample/WpfMVVMSample/Settings/SettingsManager.cs +++ b/Samples/WpfMVVMSample/WpfMVVMSample/Settings/SettingsManager.cs @@ -1,27 +1,24 @@ using Prism.Mvvm; using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using UnitsNet.Units; namespace WpfMVVMSample.Settings { public class SettingsManager : BindableBase { - private Dictionary> _defaultUnitProviders; + private readonly Dictionary> _defaultUnitProviders; public SettingsManager() { DefaultMassUnit = MassUnit.Kilogram; DefaultAccelerationUnit = AccelerationUnit.MeterPerSecondSquared; DefaultForceUnit = ForceUnit.Newton; - _defaultUnitProviders = new Dictionary> + _defaultUnitProviders = new Dictionary> { - {typeof(MassUnit),()=> this.DefaultMassUnit }, - {typeof(AccelerationUnit),()=> this.DefaultAccelerationUnit }, - {typeof(ForceUnit),()=> this.DefaultForceUnit }, + {typeof(MassUnit), () => DefaultMassUnit}, + {typeof(AccelerationUnit), () => DefaultAccelerationUnit}, + {typeof(ForceUnit), () => DefaultForceUnit}, }; } @@ -46,7 +43,7 @@ public ForceUnit DefaultForceUnit set { SetProperty(ref _defaultForceUnit, value); } } - public object GetDefaultUnit(Type unitType) + public Enum GetDefaultUnit(Type unitType) { if (_defaultUnitProviders.ContainsKey(unitType)) { From 5e67b74239e40879241a4bc3445ee3d7a5687cd0 Mon Sep 17 00:00:00 2001 From: Andreas Gullberg Larsen Date: Mon, 28 Jan 2019 00:27:02 +0100 Subject: [PATCH 11/36] Rename UnitsHelper to Quantity, add dynamic TryParse() --- .../{UnitsHelperTest.cs => QuantityTest.cs} | 64 +- UnitsNet.Tests/QuantityTests.cs | 1 - .../Quantity.cs} | 42 +- UnitsNet/CustomCode/QuantityParser.cs | 21 + UnitsNet/GeneratedCode/Quantity.g.cs | 622 +++++++++++++++++- UnitsNet/QuantityInfo.cs | 2 +- UnitsNet/Scripts/GenerateUnits.ps1 | 15 + ...Include-GenerateQuantityTypeSourceCode.ps1 | 6 +- ...clude-GenerateStaticQuantitySourceCode.ps1 | 154 +++++ 9 files changed, 852 insertions(+), 75 deletions(-) rename UnitsNet.Tests/{UnitsHelperTest.cs => QuantityTest.cs} (63%) rename UnitsNet/{UnitsHelper.cs => CustomCode/Quantity.cs} (69%) create mode 100644 UnitsNet/Scripts/Include-GenerateStaticQuantitySourceCode.ps1 diff --git a/UnitsNet.Tests/UnitsHelperTest.cs b/UnitsNet.Tests/QuantityTest.cs similarity index 63% rename from UnitsNet.Tests/UnitsHelperTest.cs rename to UnitsNet.Tests/QuantityTest.cs index 6324300ecd..d79c9d260a 100644 --- a/UnitsNet.Tests/UnitsHelperTest.cs +++ b/UnitsNet.Tests/QuantityTest.cs @@ -26,26 +26,28 @@ namespace UnitsNet.Tests { - public class UnitsHelperTest + public class QuantityTest { - [Fact] - public void Quantities_ReturnsKnownQuantityTypes() + [Theory] + [InlineData(QuantityType.Length, typeof(LengthUnit))] + [InlineData(QuantityType.Mass, typeof(MassUnit))] + [InlineData(QuantityType.Force, typeof(ForceUnit))] + public void GetUnitType_ReturnsUnitTypeMatchingGivenQuantity(QuantityType quantityType, Type expectedUnitEnumType) { - var knownQuantities = new[] {QuantityType.Length, QuantityType.Force, QuantityType.Mass}; - - Assert.Superset( - knownQuantities.ToHashSet(), - UnitsHelper.Quantities.ToHashSet()); + Assert.Equal(expectedUnitEnumType, Quantity.GetUnitType(quantityType)); } [Fact] - public void QuantityNames_ReturnsKnownNames() + public void GetUnitEnumValuesForQuantity_ReturnsKnownValues() { - var knownNames = new[] {"Length", "Force", "Mass"}; + var knownLengthUnits = new Enum[] {LengthUnit.Meter, LengthUnit.Centimeter, LengthUnit.Kilometer}; + var knownMassUnits = new Enum[] {MassUnit.Kilogram, MassUnit.Gram, MassUnit.Tonne}; + + var lengthUnits = Quantity.GetUnitEnumValuesForQuantity(QuantityType.Length); + var massUnits = Quantity.GetUnitEnumValuesForQuantity(QuantityType.Mass); - Assert.Superset( - knownNames.ToHashSet(), - UnitsHelper.QuantityNames.ToHashSet()); + Assert.Superset(knownLengthUnits.ToHashSet(), lengthUnits.ToHashSet()); + Assert.Superset(knownMassUnits.ToHashSet(), massUnits.ToHashSet()); } [Fact] @@ -54,37 +56,31 @@ public void GetUnitNamesForQuantity_ReturnsKnownUnitNames() var knownLengthUnitNames = new[] {"Meter", "Centimeter", "Kilometer"}; var knownMassUnitNames = new[] {"Kilogram", "Gram", "Tonne"}; - Assert.Superset( - knownLengthUnitNames.ToHashSet(), - UnitsHelper.GetUnitNamesForQuantity(QuantityType.Length).ToHashSet()); + var lengthUnitNames = Quantity.GetUnitNamesForQuantity(QuantityType.Length); + var massUnitNames = Quantity.GetUnitNamesForQuantity(QuantityType.Mass); - Assert.Superset( - knownMassUnitNames.ToHashSet(), - UnitsHelper.GetUnitNamesForQuantity(QuantityType.Mass).ToHashSet()); + Assert.Superset(knownLengthUnitNames.ToHashSet(), lengthUnitNames.ToHashSet()); + Assert.Superset(knownMassUnitNames.ToHashSet(), massUnitNames.ToHashSet()); } [Fact] - public void GetUnitEnumValuesForQuantity_ReturnsKnownValues() + public void QuantityNames_ReturnsKnownNames() { - var knownLengthUnits = new object[] {LengthUnit.Meter, LengthUnit.Centimeter, LengthUnit.Kilometer}; - var knownMassUnits = new object[] {MassUnit.Kilogram, MassUnit.Gram, MassUnit.Tonne}; + var knownNames = new[] {"Length", "Force", "Mass"}; - Assert.Superset( - knownLengthUnits.ToHashSet(), - UnitsHelper.GetUnitEnumValuesForQuantity(QuantityType.Length).ToHashSet()); + var names = Quantity.Names; - Assert.Superset( - knownMassUnits.ToHashSet(), - UnitsHelper.GetUnitEnumValuesForQuantity(QuantityType.Mass).ToHashSet()); + Assert.Superset(knownNames.ToHashSet(), names.ToHashSet()); } - [Theory] - [InlineData(QuantityType.Length, typeof(LengthUnit))] - [InlineData(QuantityType.Mass, typeof(MassUnit))] - [InlineData(QuantityType.Force, typeof(ForceUnit))] - public void GetUnitType_ReturnsUnitTypeMatchingGivenQuantity(QuantityType quantityType, Type expectedUnitEnumType) + [Fact] + public void Types_ReturnsKnownQuantityTypes() { - Assert.Equal(expectedUnitEnumType, UnitsHelper.GetUnitType(quantityType)); + var knownQuantities = new[] {QuantityType.Length, QuantityType.Force, QuantityType.Mass}; + + var types = Quantity.Types; + + Assert.Superset(knownQuantities.ToHashSet(), types.ToHashSet()); } } } diff --git a/UnitsNet.Tests/QuantityTests.cs b/UnitsNet.Tests/QuantityTests.cs index f12f4ec8d7..d0521745f5 100644 --- a/UnitsNet.Tests/QuantityTests.cs +++ b/UnitsNet.Tests/QuantityTests.cs @@ -19,7 +19,6 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -using System; using System.Linq; using UnitsNet.Units; using Xunit; diff --git a/UnitsNet/UnitsHelper.cs b/UnitsNet/CustomCode/Quantity.cs similarity index 69% rename from UnitsNet/UnitsHelper.cs rename to UnitsNet/CustomCode/Quantity.cs index 7c376c55c0..350417e353 100644 --- a/UnitsNet/UnitsHelper.cs +++ b/UnitsNet/CustomCode/Quantity.cs @@ -1,24 +1,3 @@ -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - using System; using System.Collections.Generic; using System.Linq; @@ -28,11 +7,7 @@ namespace UnitsNet { - /// - /// This class helps enumerating quantities and units at runtime. - /// - /// - public static class UnitsHelper + public partial class Quantity { private static readonly string UnitEnumNamespace = typeof(LengthUnit).Namespace; @@ -41,14 +16,15 @@ public static class UnitsHelper .Where(t => t.IsEnum && t.Namespace == UnitEnumNamespace && t.Name.EndsWith("Unit")) .ToArray(); - static UnitsHelper() + + static Quantity() { var quantityTypes = Enum.GetValues(typeof(QuantityType)).Cast().ToArray(); - QuantityTypes = quantityTypes; - QuantityNames = Enum.GetNames(typeof(QuantityType)); + Types = quantityTypes; + Names = Enum.GetNames(typeof(QuantityType)); // A bunch of reflection to enumerate quantity types, instantiate with the default constructor and return its QuantityInfo property - QuantityInfos = Assembly.GetAssembly(typeof(Length)) + Infos = Assembly.GetAssembly(typeof(Length)) .GetExportedTypes() .Where(typeof(IQuantity).IsAssignableFrom) .Where(t => t.IsClass() || t.IsValueType()) // Future-proofing: Considering changing quantities from struct to class @@ -61,17 +37,17 @@ static UnitsHelper() /// /// All enum values of , such as and . /// - public static QuantityType[] QuantityTypes { get; } + public static QuantityType[] Types { get; } /// /// All enum value names of , such as "Length" and "Mass". /// - public static string[] QuantityNames { get; } + public static string[] Names { get; } /// /// All quantity information objects, such as and . /// - public static QuantityInfo[] QuantityInfos { get; } + public static QuantityInfo[] Infos { get; } /// /// Returns the enum values for the given , excluding the Undefined=0 value. diff --git a/UnitsNet/CustomCode/QuantityParser.cs b/UnitsNet/CustomCode/QuantityParser.cs index d6bedd5c92..d58df984a1 100644 --- a/UnitsNet/CustomCode/QuantityParser.cs +++ b/UnitsNet/CustomCode/QuantityParser.cs @@ -121,6 +121,27 @@ internal bool TryParse([NotNull] string str, return TryParseWithRegex(valueString, unitString, fromDelegate, formatProvider, out result); } + /// + /// Workaround for C# not allowing to pass on 'out' param from type Length to IQuantity, even though the are compatible. + /// + [SuppressMessage("ReSharper", "UseStringInterpolation")] + internal bool TryParse([NotNull] string str, + [CanBeNull] IFormatProvider formatProvider, + [NotNull] QuantityFromDelegate fromDelegate, + out IQuantity result) + where TQuantity : IQuantity + where TUnitType : Enum + { + if (TryParse(str, formatProvider, fromDelegate, out TQuantity parsedQuantity)) + { + result = parsedQuantity; + return true; + } + + result = default; + return false; + } + internal string CreateRegexPatternForUnit( TUnitType unit, IFormatProvider formatProvider, diff --git a/UnitsNet/GeneratedCode/Quantity.g.cs b/UnitsNet/GeneratedCode/Quantity.g.cs index 2e4b885326..9f47105e83 100644 --- a/UnitsNet/GeneratedCode/Quantity.g.cs +++ b/UnitsNet/GeneratedCode/Quantity.g.cs @@ -1,11 +1,58 @@ +//------------------------------------------------------------------------------ +// +// 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. +// +// +//------------------------------------------------------------------------------ + +// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). +// https://github.com/angularsen/UnitsNet +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + using System; using System.Linq; using UnitsNet.Units; namespace UnitsNet { + /// + /// Dynamically parse or construct quantities when types are only known at runtime. + /// public static partial class Quantity { + /// + /// Dynamically construct a quantity. + /// + /// Numeric value. + /// Unit enum value. + /// An object. + /// Unit value is not a know unit enum type. public static IQuantity From(QuantityValue value, Enum unit) { if (TryFrom(value, unit, out IQuantity quantity)) @@ -15,16 +62,286 @@ public static IQuantity From(QuantityValue value, Enum unit) $"Unit value {unit} of type {unit.GetType()} is not a known unit enum type. Expected types like UnitsNet.Units.LengthUnit. Did you pass in a third-party enum type defined outside UnitsNet library?"); } + /// + /// Try to dynamically construct a quantity. + /// + /// Numeric value. + /// Unit enum value. + /// True if successful with assigned the value, otherwise false. public static bool TryFrom(QuantityValue value, Enum unit, out IQuantity quantity) { switch (unit) { + case AccelerationUnit accelerationUnit: + quantity = Acceleration.From(value, accelerationUnit); + return true; + case AmountOfSubstanceUnit amountOfSubstanceUnit: + quantity = AmountOfSubstance.From(value, amountOfSubstanceUnit); + return true; + case AmplitudeRatioUnit amplitudeRatioUnit: + quantity = AmplitudeRatio.From(value, amplitudeRatioUnit); + return true; case AngleUnit angleUnit: quantity = Angle.From(value, angleUnit); return true; + case ApparentEnergyUnit apparentEnergyUnit: + quantity = ApparentEnergy.From(value, apparentEnergyUnit); + return true; + case ApparentPowerUnit apparentPowerUnit: + quantity = ApparentPower.From(value, apparentPowerUnit); + return true; + case AreaUnit areaUnit: + quantity = Area.From(value, areaUnit); + return true; + case AreaDensityUnit areaDensityUnit: + quantity = AreaDensity.From(value, areaDensityUnit); + return true; + case AreaMomentOfInertiaUnit areaMomentOfInertiaUnit: + quantity = AreaMomentOfInertia.From(value, areaMomentOfInertiaUnit); + return true; + case BitRateUnit bitRateUnit: + quantity = BitRate.From(value, bitRateUnit); + return true; + case BrakeSpecificFuelConsumptionUnit brakeSpecificFuelConsumptionUnit: + quantity = BrakeSpecificFuelConsumption.From(value, brakeSpecificFuelConsumptionUnit); + return true; + case CapacitanceUnit capacitanceUnit: + quantity = Capacitance.From(value, capacitanceUnit); + return true; + case CoefficientOfThermalExpansionUnit coefficientOfThermalExpansionUnit: + quantity = CoefficientOfThermalExpansion.From(value, coefficientOfThermalExpansionUnit); + return true; + case DensityUnit densityUnit: + quantity = Density.From(value, densityUnit); + return true; + case DurationUnit durationUnit: + quantity = Duration.From(value, durationUnit); + return true; + case DynamicViscosityUnit dynamicViscosityUnit: + quantity = DynamicViscosity.From(value, dynamicViscosityUnit); + return true; + case ElectricAdmittanceUnit electricAdmittanceUnit: + quantity = ElectricAdmittance.From(value, electricAdmittanceUnit); + return true; + case ElectricChargeUnit electricChargeUnit: + quantity = ElectricCharge.From(value, electricChargeUnit); + return true; + case ElectricChargeDensityUnit electricChargeDensityUnit: + quantity = ElectricChargeDensity.From(value, electricChargeDensityUnit); + return true; + case ElectricConductanceUnit electricConductanceUnit: + quantity = ElectricConductance.From(value, electricConductanceUnit); + return true; + case ElectricConductivityUnit electricConductivityUnit: + quantity = ElectricConductivity.From(value, electricConductivityUnit); + return true; + case ElectricCurrentUnit electricCurrentUnit: + quantity = ElectricCurrent.From(value, electricCurrentUnit); + return true; + case ElectricCurrentDensityUnit electricCurrentDensityUnit: + quantity = ElectricCurrentDensity.From(value, electricCurrentDensityUnit); + return true; + case ElectricCurrentGradientUnit electricCurrentGradientUnit: + quantity = ElectricCurrentGradient.From(value, electricCurrentGradientUnit); + return true; + case ElectricFieldUnit electricFieldUnit: + quantity = ElectricField.From(value, electricFieldUnit); + return true; + case ElectricInductanceUnit electricInductanceUnit: + quantity = ElectricInductance.From(value, electricInductanceUnit); + return true; + case ElectricPotentialUnit electricPotentialUnit: + quantity = ElectricPotential.From(value, electricPotentialUnit); + return true; + case ElectricPotentialAcUnit electricPotentialAcUnit: + quantity = ElectricPotentialAc.From(value, electricPotentialAcUnit); + return true; + case ElectricPotentialDcUnit electricPotentialDcUnit: + quantity = ElectricPotentialDc.From(value, electricPotentialDcUnit); + return true; + case ElectricResistanceUnit electricResistanceUnit: + quantity = ElectricResistance.From(value, electricResistanceUnit); + return true; + case ElectricResistivityUnit electricResistivityUnit: + quantity = ElectricResistivity.From(value, electricResistivityUnit); + return true; + case EnergyUnit energyUnit: + quantity = Energy.From(value, energyUnit); + return true; + case EntropyUnit entropyUnit: + quantity = Entropy.From(value, entropyUnit); + return true; + case ForceUnit forceUnit: + quantity = Force.From(value, forceUnit); + return true; + case ForceChangeRateUnit forceChangeRateUnit: + quantity = ForceChangeRate.From(value, forceChangeRateUnit); + return true; + case ForcePerLengthUnit forcePerLengthUnit: + quantity = ForcePerLength.From(value, forcePerLengthUnit); + return true; + case FrequencyUnit frequencyUnit: + quantity = Frequency.From(value, frequencyUnit); + return true; + case HeatFluxUnit heatFluxUnit: + quantity = HeatFlux.From(value, heatFluxUnit); + return true; + case HeatTransferCoefficientUnit heatTransferCoefficientUnit: + quantity = HeatTransferCoefficient.From(value, heatTransferCoefficientUnit); + return true; + case IlluminanceUnit illuminanceUnit: + quantity = Illuminance.From(value, illuminanceUnit); + return true; + case InformationUnit informationUnit: + quantity = Information.From(value, informationUnit); + return true; + case IrradianceUnit irradianceUnit: + quantity = Irradiance.From(value, irradianceUnit); + return true; + case IrradiationUnit irradiationUnit: + quantity = Irradiation.From(value, irradiationUnit); + return true; + case KinematicViscosityUnit kinematicViscosityUnit: + quantity = KinematicViscosity.From(value, kinematicViscosityUnit); + return true; + case LapseRateUnit lapseRateUnit: + quantity = LapseRate.From(value, lapseRateUnit); + return true; case LengthUnit lengthUnit: quantity = Length.From(value, lengthUnit); return true; + case LevelUnit levelUnit: + quantity = Level.From(value, levelUnit); + return true; + case LinearDensityUnit linearDensityUnit: + quantity = LinearDensity.From(value, linearDensityUnit); + return true; + case LuminousFluxUnit luminousFluxUnit: + quantity = LuminousFlux.From(value, luminousFluxUnit); + return true; + case LuminousIntensityUnit luminousIntensityUnit: + quantity = LuminousIntensity.From(value, luminousIntensityUnit); + return true; + case MagneticFieldUnit magneticFieldUnit: + quantity = MagneticField.From(value, magneticFieldUnit); + return true; + case MagneticFluxUnit magneticFluxUnit: + quantity = MagneticFlux.From(value, magneticFluxUnit); + return true; + case MagnetizationUnit magnetizationUnit: + quantity = Magnetization.From(value, magnetizationUnit); + return true; + case MassUnit massUnit: + quantity = Mass.From(value, massUnit); + return true; + case MassFlowUnit massFlowUnit: + quantity = MassFlow.From(value, massFlowUnit); + return true; + case MassFluxUnit massFluxUnit: + quantity = MassFlux.From(value, massFluxUnit); + return true; + case MassMomentOfInertiaUnit massMomentOfInertiaUnit: + quantity = MassMomentOfInertia.From(value, massMomentOfInertiaUnit); + return true; + case MolarEnergyUnit molarEnergyUnit: + quantity = MolarEnergy.From(value, molarEnergyUnit); + return true; + case MolarEntropyUnit molarEntropyUnit: + quantity = MolarEntropy.From(value, molarEntropyUnit); + return true; + case MolarityUnit molarityUnit: + quantity = Molarity.From(value, molarityUnit); + return true; + case MolarMassUnit molarMassUnit: + quantity = MolarMass.From(value, molarMassUnit); + return true; + case PermeabilityUnit permeabilityUnit: + quantity = Permeability.From(value, permeabilityUnit); + return true; + case PermittivityUnit permittivityUnit: + quantity = Permittivity.From(value, permittivityUnit); + return true; + case PowerUnit powerUnit: + quantity = Power.From(value, powerUnit); + return true; + case PowerDensityUnit powerDensityUnit: + quantity = PowerDensity.From(value, powerDensityUnit); + return true; + case PowerRatioUnit powerRatioUnit: + quantity = PowerRatio.From(value, powerRatioUnit); + return true; + case PressureUnit pressureUnit: + quantity = Pressure.From(value, pressureUnit); + return true; + case PressureChangeRateUnit pressureChangeRateUnit: + quantity = PressureChangeRate.From(value, pressureChangeRateUnit); + return true; + case RatioUnit ratioUnit: + quantity = Ratio.From(value, ratioUnit); + return true; + case ReactiveEnergyUnit reactiveEnergyUnit: + quantity = ReactiveEnergy.From(value, reactiveEnergyUnit); + return true; + case ReactivePowerUnit reactivePowerUnit: + quantity = ReactivePower.From(value, reactivePowerUnit); + return true; + case RotationalAccelerationUnit rotationalAccelerationUnit: + quantity = RotationalAcceleration.From(value, rotationalAccelerationUnit); + return true; + case RotationalSpeedUnit rotationalSpeedUnit: + quantity = RotationalSpeed.From(value, rotationalSpeedUnit); + return true; + case RotationalStiffnessUnit rotationalStiffnessUnit: + quantity = RotationalStiffness.From(value, rotationalStiffnessUnit); + return true; + case RotationalStiffnessPerLengthUnit rotationalStiffnessPerLengthUnit: + quantity = RotationalStiffnessPerLength.From(value, rotationalStiffnessPerLengthUnit); + return true; + case SolidAngleUnit solidAngleUnit: + quantity = SolidAngle.From(value, solidAngleUnit); + return true; + case SpecificEnergyUnit specificEnergyUnit: + quantity = SpecificEnergy.From(value, specificEnergyUnit); + return true; + case SpecificEntropyUnit specificEntropyUnit: + quantity = SpecificEntropy.From(value, specificEntropyUnit); + return true; + case SpecificVolumeUnit specificVolumeUnit: + quantity = SpecificVolume.From(value, specificVolumeUnit); + return true; + case SpecificWeightUnit specificWeightUnit: + quantity = SpecificWeight.From(value, specificWeightUnit); + return true; + case SpeedUnit speedUnit: + quantity = Speed.From(value, speedUnit); + return true; + case TemperatureUnit temperatureUnit: + quantity = Temperature.From(value, temperatureUnit); + return true; + case TemperatureChangeRateUnit temperatureChangeRateUnit: + quantity = TemperatureChangeRate.From(value, temperatureChangeRateUnit); + return true; + case TemperatureDeltaUnit temperatureDeltaUnit: + quantity = TemperatureDelta.From(value, temperatureDeltaUnit); + return true; + case ThermalConductivityUnit thermalConductivityUnit: + quantity = ThermalConductivity.From(value, thermalConductivityUnit); + return true; + case ThermalResistanceUnit thermalResistanceUnit: + quantity = ThermalResistance.From(value, thermalResistanceUnit); + return true; + case TorqueUnit torqueUnit: + quantity = Torque.From(value, torqueUnit); + return true; + case VitaminAUnit vitaminAUnit: + quantity = VitaminA.From(value, vitaminAUnit); + return true; + case VolumeUnit volumeUnit: + quantity = Volume.From(value, volumeUnit); + return true; + case VolumeFlowUnit volumeFlowUnit: + quantity = VolumeFlow.From(value, volumeFlowUnit); + return true; default: { quantity = default(IQuantity); @@ -33,21 +350,320 @@ public static bool TryFrom(QuantityValue value, Enum unit, out IQuantity quantit } } + /// + /// Dynamically parse a quantity string representation. + /// + /// Type of quantity, such as . + /// Quantity string representation, such as "1.5 kg". Must be compatible with given quantity type. + /// The parsed quantity. + /// Type must be of type UnitsNet.IQuantity -or- Type is not a known quantity type. public static IQuantity Parse(Type quantityType, string quantityString) { if (!typeof(IQuantity).IsAssignableFrom(quantityType)) throw new ArgumentException($"Type {quantityType} must be of type UnitsNet.IQuantity."); - if (quantityType == typeof(Angle)) return Angle.Parse(quantityString); - if (quantityType == typeof(Length)) return Length.Parse(quantityString); + if (TryParse(quantityType, quantityString, out IQuantity quantity)) return quantity; + + throw new ArgumentException($"Quantity string could not be parsed to quantity {quantityType}."); + } + + /// + /// Try to dynamically parse a quantity string representation. + /// + /// Type of quantity, such as . + /// Quantity string representation, such as "1.5 kg". Must be compatible with given quantity type. + /// The parsed quantity. + public static bool TryParse(Type quantityType, string quantityString, out IQuantity quantity) + { + quantity = default(IQuantity); + + if (!typeof(IQuantity).IsAssignableFrom(quantityType)) + return false; + + var parser = QuantityParser.Default; + + if (quantityType == typeof(Acceleration)) + return parser.TryParse(quantityString, null, Acceleration.From, out quantity); + + if (quantityType == typeof(AmountOfSubstance)) + return parser.TryParse(quantityString, null, AmountOfSubstance.From, out quantity); + + if (quantityType == typeof(AmplitudeRatio)) + return parser.TryParse(quantityString, null, AmplitudeRatio.From, out quantity); + + if (quantityType == typeof(Angle)) + return parser.TryParse(quantityString, null, Angle.From, out quantity); + + if (quantityType == typeof(ApparentEnergy)) + return parser.TryParse(quantityString, null, ApparentEnergy.From, out quantity); + + if (quantityType == typeof(ApparentPower)) + return parser.TryParse(quantityString, null, ApparentPower.From, out quantity); + + if (quantityType == typeof(Area)) + return parser.TryParse(quantityString, null, Area.From, out quantity); + + if (quantityType == typeof(AreaDensity)) + return parser.TryParse(quantityString, null, AreaDensity.From, out quantity); + + if (quantityType == typeof(AreaMomentOfInertia)) + return parser.TryParse(quantityString, null, AreaMomentOfInertia.From, out quantity); + + if (quantityType == typeof(BitRate)) + return parser.TryParse(quantityString, null, BitRate.From, out quantity); + + if (quantityType == typeof(BrakeSpecificFuelConsumption)) + return parser.TryParse(quantityString, null, BrakeSpecificFuelConsumption.From, out quantity); + + if (quantityType == typeof(Capacitance)) + return parser.TryParse(quantityString, null, Capacitance.From, out quantity); + + if (quantityType == typeof(CoefficientOfThermalExpansion)) + return parser.TryParse(quantityString, null, CoefficientOfThermalExpansion.From, out quantity); + + if (quantityType == typeof(Density)) + return parser.TryParse(quantityString, null, Density.From, out quantity); + + if (quantityType == typeof(Duration)) + return parser.TryParse(quantityString, null, Duration.From, out quantity); + + if (quantityType == typeof(DynamicViscosity)) + return parser.TryParse(quantityString, null, DynamicViscosity.From, out quantity); + + if (quantityType == typeof(ElectricAdmittance)) + return parser.TryParse(quantityString, null, ElectricAdmittance.From, out quantity); + + if (quantityType == typeof(ElectricCharge)) + return parser.TryParse(quantityString, null, ElectricCharge.From, out quantity); + + if (quantityType == typeof(ElectricChargeDensity)) + return parser.TryParse(quantityString, null, ElectricChargeDensity.From, out quantity); + + if (quantityType == typeof(ElectricConductance)) + return parser.TryParse(quantityString, null, ElectricConductance.From, out quantity); + + if (quantityType == typeof(ElectricConductivity)) + return parser.TryParse(quantityString, null, ElectricConductivity.From, out quantity); + + if (quantityType == typeof(ElectricCurrent)) + return parser.TryParse(quantityString, null, ElectricCurrent.From, out quantity); + + if (quantityType == typeof(ElectricCurrentDensity)) + return parser.TryParse(quantityString, null, ElectricCurrentDensity.From, out quantity); + + if (quantityType == typeof(ElectricCurrentGradient)) + return parser.TryParse(quantityString, null, ElectricCurrentGradient.From, out quantity); + + if (quantityType == typeof(ElectricField)) + return parser.TryParse(quantityString, null, ElectricField.From, out quantity); + + if (quantityType == typeof(ElectricInductance)) + return parser.TryParse(quantityString, null, ElectricInductance.From, out quantity); + + if (quantityType == typeof(ElectricPotential)) + return parser.TryParse(quantityString, null, ElectricPotential.From, out quantity); + + if (quantityType == typeof(ElectricPotentialAc)) + return parser.TryParse(quantityString, null, ElectricPotentialAc.From, out quantity); + + if (quantityType == typeof(ElectricPotentialDc)) + return parser.TryParse(quantityString, null, ElectricPotentialDc.From, out quantity); + + if (quantityType == typeof(ElectricResistance)) + return parser.TryParse(quantityString, null, ElectricResistance.From, out quantity); + + if (quantityType == typeof(ElectricResistivity)) + return parser.TryParse(quantityString, null, ElectricResistivity.From, out quantity); + + if (quantityType == typeof(Energy)) + return parser.TryParse(quantityString, null, Energy.From, out quantity); + + if (quantityType == typeof(Entropy)) + return parser.TryParse(quantityString, null, Entropy.From, out quantity); + + if (quantityType == typeof(Force)) + return parser.TryParse(quantityString, null, Force.From, out quantity); + + if (quantityType == typeof(ForceChangeRate)) + return parser.TryParse(quantityString, null, ForceChangeRate.From, out quantity); + + if (quantityType == typeof(ForcePerLength)) + return parser.TryParse(quantityString, null, ForcePerLength.From, out quantity); + + if (quantityType == typeof(Frequency)) + return parser.TryParse(quantityString, null, Frequency.From, out quantity); + + if (quantityType == typeof(HeatFlux)) + return parser.TryParse(quantityString, null, HeatFlux.From, out quantity); + + if (quantityType == typeof(HeatTransferCoefficient)) + return parser.TryParse(quantityString, null, HeatTransferCoefficient.From, out quantity); + + if (quantityType == typeof(Illuminance)) + return parser.TryParse(quantityString, null, Illuminance.From, out quantity); + + if (quantityType == typeof(Information)) + return parser.TryParse(quantityString, null, Information.From, out quantity); + + if (quantityType == typeof(Irradiance)) + return parser.TryParse(quantityString, null, Irradiance.From, out quantity); + + if (quantityType == typeof(Irradiation)) + return parser.TryParse(quantityString, null, Irradiation.From, out quantity); + + if (quantityType == typeof(KinematicViscosity)) + return parser.TryParse(quantityString, null, KinematicViscosity.From, out quantity); + + if (quantityType == typeof(LapseRate)) + return parser.TryParse(quantityString, null, LapseRate.From, out quantity); + + if (quantityType == typeof(Length)) + return parser.TryParse(quantityString, null, Length.From, out quantity); + + if (quantityType == typeof(Level)) + return parser.TryParse(quantityString, null, Level.From, out quantity); + + if (quantityType == typeof(LinearDensity)) + return parser.TryParse(quantityString, null, LinearDensity.From, out quantity); + + if (quantityType == typeof(LuminousFlux)) + return parser.TryParse(quantityString, null, LuminousFlux.From, out quantity); + + if (quantityType == typeof(LuminousIntensity)) + return parser.TryParse(quantityString, null, LuminousIntensity.From, out quantity); + + if (quantityType == typeof(MagneticField)) + return parser.TryParse(quantityString, null, MagneticField.From, out quantity); + + if (quantityType == typeof(MagneticFlux)) + return parser.TryParse(quantityString, null, MagneticFlux.From, out quantity); + + if (quantityType == typeof(Magnetization)) + return parser.TryParse(quantityString, null, Magnetization.From, out quantity); + + if (quantityType == typeof(Mass)) + return parser.TryParse(quantityString, null, Mass.From, out quantity); + + if (quantityType == typeof(MassFlow)) + return parser.TryParse(quantityString, null, MassFlow.From, out quantity); + + if (quantityType == typeof(MassFlux)) + return parser.TryParse(quantityString, null, MassFlux.From, out quantity); + + if (quantityType == typeof(MassMomentOfInertia)) + return parser.TryParse(quantityString, null, MassMomentOfInertia.From, out quantity); + + if (quantityType == typeof(MolarEnergy)) + return parser.TryParse(quantityString, null, MolarEnergy.From, out quantity); + + if (quantityType == typeof(MolarEntropy)) + return parser.TryParse(quantityString, null, MolarEntropy.From, out quantity); + + if (quantityType == typeof(Molarity)) + return parser.TryParse(quantityString, null, Molarity.From, out quantity); + + if (quantityType == typeof(MolarMass)) + return parser.TryParse(quantityString, null, MolarMass.From, out quantity); + + if (quantityType == typeof(Permeability)) + return parser.TryParse(quantityString, null, Permeability.From, out quantity); + + if (quantityType == typeof(Permittivity)) + return parser.TryParse(quantityString, null, Permittivity.From, out quantity); + + if (quantityType == typeof(Power)) + return parser.TryParse(quantityString, null, Power.From, out quantity); + + if (quantityType == typeof(PowerDensity)) + return parser.TryParse(quantityString, null, PowerDensity.From, out quantity); + + if (quantityType == typeof(PowerRatio)) + return parser.TryParse(quantityString, null, PowerRatio.From, out quantity); + + if (quantityType == typeof(Pressure)) + return parser.TryParse(quantityString, null, Pressure.From, out quantity); + + if (quantityType == typeof(PressureChangeRate)) + return parser.TryParse(quantityString, null, PressureChangeRate.From, out quantity); + + if (quantityType == typeof(Ratio)) + return parser.TryParse(quantityString, null, Ratio.From, out quantity); + + if (quantityType == typeof(ReactiveEnergy)) + return parser.TryParse(quantityString, null, ReactiveEnergy.From, out quantity); + + if (quantityType == typeof(ReactivePower)) + return parser.TryParse(quantityString, null, ReactivePower.From, out quantity); + + if (quantityType == typeof(RotationalAcceleration)) + return parser.TryParse(quantityString, null, RotationalAcceleration.From, out quantity); + + if (quantityType == typeof(RotationalSpeed)) + return parser.TryParse(quantityString, null, RotationalSpeed.From, out quantity); + + if (quantityType == typeof(RotationalStiffness)) + return parser.TryParse(quantityString, null, RotationalStiffness.From, out quantity); + + if (quantityType == typeof(RotationalStiffnessPerLength)) + return parser.TryParse(quantityString, null, RotationalStiffnessPerLength.From, out quantity); + + if (quantityType == typeof(SolidAngle)) + return parser.TryParse(quantityString, null, SolidAngle.From, out quantity); + + if (quantityType == typeof(SpecificEnergy)) + return parser.TryParse(quantityString, null, SpecificEnergy.From, out quantity); + + if (quantityType == typeof(SpecificEntropy)) + return parser.TryParse(quantityString, null, SpecificEntropy.From, out quantity); + + if (quantityType == typeof(SpecificVolume)) + return parser.TryParse(quantityString, null, SpecificVolume.From, out quantity); + + if (quantityType == typeof(SpecificWeight)) + return parser.TryParse(quantityString, null, SpecificWeight.From, out quantity); + + if (quantityType == typeof(Speed)) + return parser.TryParse(quantityString, null, Speed.From, out quantity); + + if (quantityType == typeof(Temperature)) + return parser.TryParse(quantityString, null, Temperature.From, out quantity); + + if (quantityType == typeof(TemperatureChangeRate)) + return parser.TryParse(quantityString, null, TemperatureChangeRate.From, out quantity); + + if (quantityType == typeof(TemperatureDelta)) + return parser.TryParse(quantityString, null, TemperatureDelta.From, out quantity); + + if (quantityType == typeof(ThermalConductivity)) + return parser.TryParse(quantityString, null, ThermalConductivity.From, out quantity); + + if (quantityType == typeof(ThermalResistance)) + return parser.TryParse(quantityString, null, ThermalResistance.From, out quantity); + + if (quantityType == typeof(Torque)) + return parser.TryParse(quantityString, null, Torque.From, out quantity); + + if (quantityType == typeof(VitaminA)) + return parser.TryParse(quantityString, null, VitaminA.From, out quantity); + + if (quantityType == typeof(Volume)) + return parser.TryParse(quantityString, null, Volume.From, out quantity); + + if (quantityType == typeof(VolumeFlow)) + return parser.TryParse(quantityString, null, VolumeFlow.From, out quantity); throw new ArgumentException( $"Type {quantityType} is not a known quantity type. Did you pass in a third-party quantity type defined outside UnitsNet library?"); } + /// + /// Get information about the given quantity type. + /// + /// The quantity type enum value. + /// Information about the quantity and its units. public static QuantityInfo GetInfo(QuantityType quantityType) { - return UnitsHelper.QuantityInfos.First(qi => qi.QuantityType == quantityType); + return Infos.First(qi => qi.QuantityType == quantityType); } } } diff --git a/UnitsNet/QuantityInfo.cs b/UnitsNet/QuantityInfo.cs index e135f028c2..abe264b75d 100644 --- a/UnitsNet/QuantityInfo.cs +++ b/UnitsNet/QuantityInfo.cs @@ -42,7 +42,7 @@ public QuantityInfo(QuantityType quantityType, [NotNull] Enum[] units, [NotNull] if (units == null) throw new ArgumentNullException(nameof(units)); Name = quantityType.ToString(); QuantityType = quantityType; - UnitType = UnitsHelper.GetUnitType(quantityType); + UnitType = Quantity.GetUnitType(quantityType); UnitNames = units.Select(u => u.ToString()).ToArray(); Units = units; Zero = zero ?? throw new ArgumentNullException(nameof(zero)); diff --git a/UnitsNet/Scripts/GenerateUnits.ps1 b/UnitsNet/Scripts/GenerateUnits.ps1 index 1b305d79a5..f894375b99 100644 --- a/UnitsNet/Scripts/GenerateUnits.ps1 +++ b/UnitsNet/Scripts/GenerateUnits.ps1 @@ -95,6 +95,19 @@ function GenerateQuantityType($quantities, $outDir) Write-Host "(OK) " } +function GenerateStaticQuantity($quantities, $outDir) +{ + Write-Host -NoNewline "Quantity.g.cs: " + $outFileName = "$outDir/Quantity.g.cs" + + GenerateStaticQuantitySourceCode $quantities | Out-File -Encoding "UTF8" -Force $outFileName | Out-Null + if (!$?) { + Write-Host "(error) " + exit 1 + } + Write-Host "(OK) " +} + function EnsureDirExists([String] $dirPath) { New-Item -ItemType Directory -Force -Path $dirPath | Out-Null if (!$?) { @@ -229,6 +242,7 @@ function Add-InheritedUnits([Quantity]$quantity, $quantities) { . "$PSScriptRoot/Include-GenerateTemplates.ps1" . "$PSScriptRoot/Include-GenerateUnitSystemDefaultSourceCode.ps1" . "$PSScriptRoot/Include-GenerateQuantityTypeSourceCode.ps1" +. "$PSScriptRoot/Include-GenerateStaticQuantitySourceCode.ps1" . "$PSScriptRoot/Include-GenerateQuantitySourceCodeNetFramework.ps1" . "$PSScriptRoot/Include-GenerateUnitTypeSourceCode.ps1" . "$PSScriptRoot/Include-GenerateUnitTestBaseClassSourceCode.ps1" @@ -311,6 +325,7 @@ foreach ($quantity in $quantities) { Write-Host "" GenerateUnitSystemDefault $quantities $unitSystemDir GenerateQuantityType $quantities $unitSystemDir +GenerateStaticQuantity $quantities $unitSystemDir $unitCount = ($quantities | %{$_.Units.Count} | Measure -Sum).Sum diff --git a/UnitsNet/Scripts/Include-GenerateQuantityTypeSourceCode.ps1 b/UnitsNet/Scripts/Include-GenerateQuantityTypeSourceCode.ps1 index a480e56f37..11b0c4933e 100644 --- a/UnitsNet/Scripts/Include-GenerateQuantityTypeSourceCode.ps1 +++ b/UnitsNet/Scripts/Include-GenerateQuantityTypeSourceCode.ps1 @@ -1,4 +1,4 @@ -function GenerateQuantityTypeSourceCode($quantityNames) +function GenerateQuantityTypeSourceCode($quantities) { @" //------------------------------------------------------------------------------ @@ -51,9 +51,9 @@ namespace UnitsNet public enum QuantityType { Undefined = 0, -"@; foreach ($quantityName in $quantityNames) { +"@; foreach ($quantity in $quantities) { @" - $($quantityName.Name), + $($quantity.Name), "@; }@" } } diff --git a/UnitsNet/Scripts/Include-GenerateStaticQuantitySourceCode.ps1 b/UnitsNet/Scripts/Include-GenerateStaticQuantitySourceCode.ps1 new file mode 100644 index 0000000000..a13feee09f --- /dev/null +++ b/UnitsNet/Scripts/Include-GenerateStaticQuantitySourceCode.ps1 @@ -0,0 +1,154 @@ +using module ".\Types.psm1" + +function GenerateStaticQuantitySourceCode([Quantity[]]$quantities) +{ +@" +//------------------------------------------------------------------------------ +// +// 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. +// +// +//------------------------------------------------------------------------------ + +// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). +// https://github.com/angularsen/UnitsNet +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +using System; +using System.Linq; +using UnitsNet.Units; + +namespace UnitsNet +{ + /// + /// Dynamically parse or construct quantities when types are only known at runtime. + /// + public static partial class Quantity + { + /// + /// Dynamically construct a quantity. + /// + /// Numeric value. + /// Unit enum value. + /// An object. + /// Unit value is not a know unit enum type. + public static IQuantity From(QuantityValue value, Enum unit) + { + if (TryFrom(value, unit, out IQuantity quantity)) + return quantity; + + throw new ArgumentException( + $"Unit value {unit} of type {unit.GetType()} is not a known unit enum type. Expected types like UnitsNet.Units.LengthUnit. Did you pass in a third-party enum type defined outside UnitsNet library?"); + } + + /// + /// Try to dynamically construct a quantity. + /// + /// Numeric value. + /// Unit enum value. + /// True if successful with assigned the value, otherwise false. + public static bool TryFrom(QuantityValue value, Enum unit, out IQuantity quantity) + { + switch (unit) + { +"@; foreach ($quantity in $quantities) { + $quantityName = $quantity.Name + $unitTypeName = $quantityName + "Unit" + $unitValue = toCamelCase($unitTypeName);@" + case $unitTypeName $($unitValue): + quantity = $quantityName.From(value, $unitValue); + return true; +"@; }@" + default: + { + quantity = default(IQuantity); + return false; + } + } + } + + /// + /// Dynamically parse a quantity string representation. + /// + /// Type of quantity, such as . + /// Quantity string representation, such as "1.5 kg". Must be compatible with given quantity type. + /// The parsed quantity. + /// Type must be of type UnitsNet.IQuantity -or- Type is not a known quantity type. + public static IQuantity Parse(Type quantityType, string quantityString) + { + if (!typeof(IQuantity).IsAssignableFrom(quantityType)) + throw new ArgumentException($"Type {quantityType} must be of type UnitsNet.IQuantity."); + + if (TryParse(quantityType, quantityString, out IQuantity quantity)) return quantity; + + throw new ArgumentException($"Quantity string could not be parsed to quantity {quantityType}."); + } + + /// + /// Try to dynamically parse a quantity string representation. + /// + /// Type of quantity, such as . + /// Quantity string representation, such as "1.5 kg". Must be compatible with given quantity type. + /// The parsed quantity. + public static bool TryParse(Type quantityType, string quantityString, out IQuantity quantity) + { + quantity = default(IQuantity); + + if (!typeof(IQuantity).IsAssignableFrom(quantityType)) + return false; + + var parser = QuantityParser.Default; + +"@; foreach ($quantity in $quantities) { + $quantityName = $quantity.Name;@" + if (quantityType == typeof($quantityName)) + return parser.TryParse<$quantityName, $($quantityName)Unit>(quantityString, null, $quantityName.From, out quantity); + +"@; }@" + throw new ArgumentException( + $"Type {quantityType} is not a known quantity type. Did you pass in a third-party quantity type defined outside UnitsNet library?"); + } + + /// + /// Get information about the given quantity type. + /// + /// The quantity type enum value. + /// Information about the quantity and its units. + public static QuantityInfo GetInfo(QuantityType quantityType) + { + return UnitsHelper.QuantityInfos.First(qi => qi.QuantityType == quantityType); + } + } +} +"@; +} + +function toCamelCase([string] $str) { + return [char]::ToLower($str[0]) + $str.Substring(1) +} From d87690876a40068cf7780bc5d5b43a562ee2128e Mon Sep 17 00:00:00 2001 From: Andreas Gullberg Larsen Date: Mon, 28 Jan 2019 00:27:09 +0100 Subject: [PATCH 12/36] Update sample apps again --- .../UnitConverter.Wpf/UnitConverter.Wpf/MainWindowDesignVM.cs | 2 +- Samples/UnitConverter.Wpf/UnitConverter.Wpf/MainWindowVM.cs | 2 +- .../WpfMVVMSample/Converters/UnitToStringConverter.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/MainWindowDesignVM.cs b/Samples/UnitConverter.Wpf/UnitConverter.Wpf/MainWindowDesignVM.cs index 6a72f812b8..7d159ecb03 100644 --- a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/MainWindowDesignVM.cs +++ b/Samples/UnitConverter.Wpf/UnitConverter.Wpf/MainWindowDesignVM.cs @@ -14,7 +14,7 @@ public sealed class MainWindowDesignVm : IMainWindowVm { public MainWindowDesignVm() { - Quantities = ToReadOnly(UnitsHelper.QuantityTypes); + Quantities = ToReadOnly(Quantity.Types); Units = ToReadOnly(Length.Units.Select(u => new UnitListItem(u))); SelectedQuantity = QuantityType.Length; SelectedFromUnit = Units[1]; diff --git a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/MainWindowVM.cs b/Samples/UnitConverter.Wpf/UnitConverter.Wpf/MainWindowVM.cs index 40f1169dd5..a8203a22a5 100644 --- a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/MainWindowVM.cs +++ b/Samples/UnitConverter.Wpf/UnitConverter.Wpf/MainWindowVM.cs @@ -29,7 +29,7 @@ public sealed class MainWindowVm : IMainWindowVm public MainWindowVm() { - Quantities = ToReadOnly(UnitsHelper.QuantityTypes); + Quantities = ToReadOnly(Quantity.Types); _units = new ObservableCollection(); Units = new ReadOnlyObservableCollection(_units); diff --git a/Samples/WpfMVVMSample/WpfMVVMSample/Converters/UnitToStringConverter.cs b/Samples/WpfMVVMSample/WpfMVVMSample/Converters/UnitToStringConverter.cs index 9632853ca5..b0023fd6f9 100644 --- a/Samples/WpfMVVMSample/WpfMVVMSample/Converters/UnitToStringConverter.cs +++ b/Samples/WpfMVVMSample/WpfMVVMSample/Converters/UnitToStringConverter.cs @@ -57,7 +57,7 @@ public object ConvertBack(object value, Type targetType, object parameter, Cultu // If input is just a number, use the configured default unit if (double.TryParse((string) value, out double number)) { - Type unitEnumType = UnitsHelper.QuantityInfos.First(qi => qi.ValueType == targetType).UnitType; + Type unitEnumType = Quantity.Infos.First(qi => qi.ValueType == targetType).UnitType; Enum defaultUnit = _settings.GetDefaultUnit(unitEnumType); return Quantity.From(number, defaultUnit); } From 1460bc8bae5f6411721f2f84434493a5faa3c221 Mon Sep 17 00:00:00 2001 From: Andreas Gullberg Larsen Date: Mon, 28 Jan 2019 00:29:46 +0100 Subject: [PATCH 13/36] Fix test case --- UnitsNet.Tests/UnitConverterTest.cs | 12 ++++++------ UnitsNet/UnitConverter.cs | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/UnitsNet.Tests/UnitConverterTest.cs b/UnitsNet.Tests/UnitConverterTest.cs index 75ce44a1b6..5af66cbef3 100644 --- a/UnitsNet.Tests/UnitConverterTest.cs +++ b/UnitsNet.Tests/UnitConverterTest.cs @@ -1,16 +1,16 @@ // Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). // https://github.com/angularsen/UnitsNet -// +// // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: -// +// // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. -// +// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -50,9 +50,9 @@ public void ConvertByName_UnitTypeCaseInsensitive() [Theory] [InlineData(1, "UnknownQuantity", "Meter", "Centimeter")] - public void ConvertByName_ThrowsQuantityNotFoundExceptionOnUnknownQuantity(double inputValue, string quantityTypeName, string fromUnit, string toUnit) + public void ConvertByName_ThrowsUnitNotFoundExceptionOnUnknownQuantity(double inputValue, string quantityTypeName, string fromUnit, string toUnit) { - Assert.Throws(() => UnitConverter.ConvertByName(inputValue, quantityTypeName, fromUnit, toUnit)); + Assert.Throws(() => UnitConverter.ConvertByName(inputValue, quantityTypeName, fromUnit, toUnit)); } [Theory] @@ -132,4 +132,4 @@ public void TryConvertByAbbreviation_ReturnsTrueOnSuccessAndOutputsResult(double Assert.Equal(expectedValue, result); } } -} \ No newline at end of file +} diff --git a/UnitsNet/UnitConverter.cs b/UnitsNet/UnitConverter.cs index 856a085302..f90ee3ce0c 100644 --- a/UnitsNet/UnitConverter.cs +++ b/UnitsNet/UnitConverter.cs @@ -115,17 +115,17 @@ public static bool TryConvert(QuantityValue fromValue, Enum fromUnitValue, Enum /// More than one unit matches the abbreviation. public static double ConvertByName(FromValue fromValue, string quantityName, string fromUnit, string toUnit) { - if (!TryGetUnitType(quantityName, out var unitType)) + if (!TryGetUnitType(quantityName, out Type unitType)) throw new UnitNotFoundException($"The unit type for the given quantity was not found: {quantityName}"); - if (!TryParseUnit(unitType, fromUnit, out var fromUnitValue)) // ex: LengthUnit.Meter + if (!TryParseUnit(unitType, fromUnit, out Enum fromUnitValue)) // ex: LengthUnit.Meter { var e = new UnitNotFoundException($"Unit not found [{fromUnit}]."); e.Data["unitName"] = fromUnit; throw e; } - if (!TryParseUnit(unitType, toUnit, out var toUnitValue)) // ex: LengthUnit.Centimeter + if (!TryParseUnit(unitType, toUnit, out Enum toUnitValue)) // ex: LengthUnit.Centimeter { var e = new UnitNotFoundException($"Unit not found [{toUnit}]."); e.Data["unitName"] = toUnit; From 022b4d78a74bf2beab7a66f93323a47fbe8f07ba Mon Sep 17 00:00:00 2001 From: Andreas Gullberg Larsen Date: Mon, 28 Jan 2019 00:44:55 +0100 Subject: [PATCH 14/36] Update README --- README.md | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index cd3f850fd0..f4017f5f4f 100644 --- a/README.md +++ b/README.md @@ -131,6 +131,8 @@ There are three classes to help with this: - [UnitParser](UnitsNet/CustomCode/UnitParser.cs) for parsing unit abbreviation strings like `cm` to `LengthUnit.Centimeter` - [UnitAbbreviationsCache](UnitsNet/CustomCode/UnitAbbreviationsCache.cs) for looking up unit abbreviations like `cm` given type `LengthUnit` and value `1` (`Centimeter`) - [UnitConverter](UnitsNet/UnitConverter.cs) for converting values given a quantity name `Length`, a value `1` and from/to unit names `Centimeter` and `Meter` +- [Quantity](UnitsNet/CustomCode/Quantity.cs) for parsing and constructing quantities as well as looking up units, names and quantity information dynamically. +- [QuantityInfo](UnitsNet/QuantityInfo.cs) for representing information about a quantity, such as names, units and conversion functions. ```c# // This type was perhaps selected by the user in GUI from a list of units @@ -161,13 +163,13 @@ This example shows how you can create a dynamic unit converter, where the user s Pseudo-code for converter app: ```c# // Populate quantity selector ("Length", "Mass", "Force" etc) -string[] quantityNames = UnitsHelper.QuantityNames; +string[] quantityNames = Quantity.Names; string selectedQuantityName = "Temperature"; // Selected by user QuantityType selectedQuantity = Enum.Parse(selectedQuantityName); // QuantityType.Temperature // Populate from/to unit selectors when quantity selection changes -string[] unitNames = UnitsHelper.GetUnitNamesForQuantity(selectedQuantity).ToArray(); +string[] unitNames = Quantity.GetUnitNamesForQuantity(selectedQuantity).ToArray(); myGui.UpdateFromToListsOfUnits(unitNames); // Assign these from GUI selection @@ -179,8 +181,6 @@ string toUnitName = "DegreeFahrenheit"; double convertedValue = UnitConverter.ConvertByName(fromValue, selectedQuantityName, fromUnitName, toUnitName); ``` -NOTE: There are still some limitations in the library that requires reflection to enumerate units for quantity and getting the abbreviation for a unit, when we want to dynamically enumerate and convert between units. - ### Example: Creating a unit converter app with hard coded quantities If you can live with hard coding what quantities to convert between, then the following code snippet shows you one way to go about it: @@ -204,11 +204,8 @@ Src: [Samples/WpfMVVMSample](https://github.com/angularsen/UnitsNet/tree/master/ ![wpfmvvmsample_219w](https://user-images.githubusercontent.com/787816/34913417-094332e2-f8fd-11e7-9d8a-92db105fbbc9.png) - The purpose of this app is to show how to create an `IValueConverter` in order to bind XAML to quantities. -NOTE: A lot of reflection and complexity were introduced due to not having a base type. See #371 for discussion on adding base types. - ### Precision and Accuracy A base unit is chosen for each unit class, represented by a double value (64-bit), and all conversions go via this unit. This means that there will always be a small error in both representing other units than the base unit as well as converting between units. From 626c8c297b6f18cd929bb23f0b18142c34ae4c58 Mon Sep 17 00:00:00 2001 From: Andreas Gullberg Larsen Date: Mon, 28 Jan 2019 01:15:15 +0100 Subject: [PATCH 15/36] Fix static racing condition --- UnitsNet/CustomCode/Quantity.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/UnitsNet/CustomCode/Quantity.cs b/UnitsNet/CustomCode/Quantity.cs index 350417e353..d9b6665fe8 100644 --- a/UnitsNet/CustomCode/Quantity.cs +++ b/UnitsNet/CustomCode/Quantity.cs @@ -24,14 +24,15 @@ static Quantity() Names = Enum.GetNames(typeof(QuantityType)); // A bunch of reflection to enumerate quantity types, instantiate with the default constructor and return its QuantityInfo property - Infos = Assembly.GetAssembly(typeof(Length)) + InfosLazy = new Lazy(() => Assembly.GetAssembly(typeof(Length)) .GetExportedTypes() .Where(typeof(IQuantity).IsAssignableFrom) .Where(t => t.IsClass() || t.IsValueType()) // Future-proofing: Considering changing quantities from struct to class .Select(Activator.CreateInstance) .Cast() - .Select(quantity => quantity.QuantityInfo) - .ToArray(); + .Select(q => q.QuantityInfo) + .OrderBy(q => q.Name) + .ToArray()); } /// @@ -47,7 +48,9 @@ static Quantity() /// /// All quantity information objects, such as and . /// - public static QuantityInfo[] Infos { get; } + public static QuantityInfo[] Infos => InfosLazy.Value; + + private static readonly Lazy InfosLazy; /// /// Returns the enum values for the given , excluding the Undefined=0 value. From d323bd150d012b94d665464e8e2a32355757f754 Mon Sep 17 00:00:00 2001 From: Andreas Gullberg Larsen Date: Mon, 28 Jan 2019 01:15:31 +0100 Subject: [PATCH 16/36] Fix missing code generation --- UnitsNet/Scripts/Include-GenerateStaticQuantitySourceCode.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UnitsNet/Scripts/Include-GenerateStaticQuantitySourceCode.ps1 b/UnitsNet/Scripts/Include-GenerateStaticQuantitySourceCode.ps1 index a13feee09f..6f435454e0 100644 --- a/UnitsNet/Scripts/Include-GenerateStaticQuantitySourceCode.ps1 +++ b/UnitsNet/Scripts/Include-GenerateStaticQuantitySourceCode.ps1 @@ -142,7 +142,7 @@ namespace UnitsNet /// Information about the quantity and its units. public static QuantityInfo GetInfo(QuantityType quantityType) { - return UnitsHelper.QuantityInfos.First(qi => qi.QuantityType == quantityType); + return Infos.First(qi => qi.QuantityType == quantityType); } } } From 0e87df102bb7b728fe3ddf3131e9d702372e4489 Mon Sep 17 00:00:00 2001 From: Andreas Gullberg Larsen Date: Mon, 28 Jan 2019 01:15:43 +0100 Subject: [PATCH 17/36] Mute warnings in sample app --- .../UnitConverter.Wpf/UnitConverter.Wpf/DelegateCommand.cs | 5 ++++- .../UnitConverter.Wpf/MainWindowDesignVM.cs | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/DelegateCommand.cs b/Samples/UnitConverter.Wpf/UnitConverter.Wpf/DelegateCommand.cs index b45ce23107..7a771fc722 100644 --- a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/DelegateCommand.cs +++ b/Samples/UnitConverter.Wpf/UnitConverter.Wpf/DelegateCommand.cs @@ -26,6 +26,9 @@ public void Execute(object parameter) _commandDelegate.Invoke(); } + // Is never used +#pragma warning disable CS0067 public event EventHandler CanExecuteChanged; +#pragma warning restore CS0067 } -} \ No newline at end of file +} diff --git a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/MainWindowDesignVM.cs b/Samples/UnitConverter.Wpf/UnitConverter.Wpf/MainWindowDesignVM.cs index 7d159ecb03..379acaa380 100644 --- a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/MainWindowDesignVM.cs +++ b/Samples/UnitConverter.Wpf/UnitConverter.Wpf/MainWindowDesignVM.cs @@ -2,6 +2,7 @@ using System.Collections.ObjectModel; using System.ComponentModel; using System.Linq; +using System.Runtime.CompilerServices; using System.Windows.Input; namespace UnitsNet.Samples.UnitConverter.Wpf @@ -21,6 +22,7 @@ public MainWindowDesignVm() SelectedToUnit = Units[2]; } + public ReadOnlyObservableCollection Quantities { get; } public ReadOnlyObservableCollection Units { get; } public QuantityType SelectedQuantity { get; set; } @@ -34,7 +36,10 @@ public MainWindowDesignVm() public ICommand SwapCommand { get; } = new RoutedCommand(); + // Is never used +#pragma warning disable CS0067 public event PropertyChangedEventHandler PropertyChanged; +#pragma warning restore CS0067 private static ReadOnlyObservableCollection ToReadOnly(IEnumerable items) { From 46eea136cd9b1b89979545b8293886b004213a4f Mon Sep 17 00:00:00 2001 From: Andreas Gullberg Larsen Date: Mon, 28 Jan 2019 01:15:49 +0100 Subject: [PATCH 18/36] Minor cleanup --- .../WpfMVVMSample/Converters/UnitToStringConverter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Samples/WpfMVVMSample/WpfMVVMSample/Converters/UnitToStringConverter.cs b/Samples/WpfMVVMSample/WpfMVVMSample/Converters/UnitToStringConverter.cs index b0023fd6f9..e1d5842eaf 100644 --- a/Samples/WpfMVVMSample/WpfMVVMSample/Converters/UnitToStringConverter.cs +++ b/Samples/WpfMVVMSample/WpfMVVMSample/Converters/UnitToStringConverter.cs @@ -55,7 +55,7 @@ public object ConvertBack(object value, Type targetType, object parameter, Cultu try { // If input is just a number, use the configured default unit - if (double.TryParse((string) value, out double number)) + if (double.TryParse(valueString, out double number)) { Type unitEnumType = Quantity.Infos.First(qi => qi.ValueType == targetType).UnitType; Enum defaultUnit = _settings.GetDefaultUnit(unitEnumType); From 78cf0e5be7d666a93f5bb6412557636514c422da Mon Sep 17 00:00:00 2001 From: Andreas Gullberg Larsen Date: Mon, 28 Jan 2019 01:17:21 +0100 Subject: [PATCH 19/36] Fix code generation --- UnitsNet/GeneratedCode/Quantity.g.cs | 2 ++ UnitsNet/Scripts/Include-GenerateStaticQuantitySourceCode.ps1 | 2 ++ 2 files changed, 4 insertions(+) diff --git a/UnitsNet/GeneratedCode/Quantity.g.cs b/UnitsNet/GeneratedCode/Quantity.g.cs index 9f47105e83..df37ffac1f 100644 --- a/UnitsNet/GeneratedCode/Quantity.g.cs +++ b/UnitsNet/GeneratedCode/Quantity.g.cs @@ -67,6 +67,7 @@ public static IQuantity From(QuantityValue value, Enum unit) /// /// Numeric value. /// Unit enum value. + /// The resulting quantity if successful, otherwise default. /// True if successful with assigned the value, otherwise false. public static bool TryFrom(QuantityValue value, Enum unit, out IQuantity quantity) { @@ -372,6 +373,7 @@ public static IQuantity Parse(Type quantityType, string quantityString) /// /// Type of quantity, such as . /// Quantity string representation, such as "1.5 kg". Must be compatible with given quantity type. + /// The resulting quantity if successful, otherwise default. /// The parsed quantity. public static bool TryParse(Type quantityType, string quantityString, out IQuantity quantity) { diff --git a/UnitsNet/Scripts/Include-GenerateStaticQuantitySourceCode.ps1 b/UnitsNet/Scripts/Include-GenerateStaticQuantitySourceCode.ps1 index 6f435454e0..ae3a27cd1c 100644 --- a/UnitsNet/Scripts/Include-GenerateStaticQuantitySourceCode.ps1 +++ b/UnitsNet/Scripts/Include-GenerateStaticQuantitySourceCode.ps1 @@ -72,6 +72,7 @@ namespace UnitsNet /// /// Numeric value. /// Unit enum value. + /// The resulting quantity if successful, otherwise default. /// True if successful with assigned the value, otherwise false. public static bool TryFrom(QuantityValue value, Enum unit, out IQuantity quantity) { @@ -115,6 +116,7 @@ namespace UnitsNet /// /// Type of quantity, such as . /// Quantity string representation, such as "1.5 kg". Must be compatible with given quantity type. + /// The resulting quantity if successful, otherwise default. /// The parsed quantity. public static bool TryParse(Type quantityType, string quantityString, out IQuantity quantity) { From 5a4af8e16aa0909cd374b9ecc8c13bb465bead6e Mon Sep 17 00:00:00 2001 From: Andreas Gullberg Larsen Date: Mon, 28 Jan 2019 01:45:09 +0100 Subject: [PATCH 20/36] Rename code generator script --- UnitsNet/Scripts/GenerateUnits.ps1 | 6 +++--- ...Framework.ps1 => Include-GenerateQuantitySourceCode.ps1} | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) rename UnitsNet/Scripts/{Include-GenerateQuantitySourceCodeNetFramework.ps1 => Include-GenerateQuantitySourceCode.ps1} (99%) diff --git a/UnitsNet/Scripts/GenerateUnits.ps1 b/UnitsNet/Scripts/GenerateUnits.ps1 index f894375b99..56191e7025 100644 --- a/UnitsNet/Scripts/GenerateUnits.ps1 +++ b/UnitsNet/Scripts/GenerateUnits.ps1 @@ -19,12 +19,12 @@ function ValueOrDefault($value, $defaultValue){ function GenerateQuantity([Quantity]$quantity, $outDir) { $outFileName = "$outDir/$($quantity.Name).NetFramework.g.cs" - GenerateQuantitySourceCodeNetFramework $quantity "NetFramework" | Out-File -Encoding "UTF8" $outFileName | Out-Null + GenerateQuantitySourceCode $quantity "NetFramework" | Out-File -Encoding "UTF8" $outFileName | Out-Null if (!$?) { exit 1 } Write-Host -NoNewline "quantity .NET(OK) " $outFileName = "$outDir/../../../UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/$($quantity.Name).WindowsRuntimeComponent.g.cs" - GenerateQuantitySourceCodeNetFramework $quantity "WindowsRuntimeComponent" | Out-File -Encoding "UTF8" $outFileName | Out-Null + GenerateQuantitySourceCode $quantity "WindowsRuntimeComponent" | Out-File -Encoding "UTF8" $outFileName | Out-Null if (!$?) { exit 1 } Write-Host -NoNewline "quantity WRC(OK) " } @@ -243,7 +243,7 @@ function Add-InheritedUnits([Quantity]$quantity, $quantities) { . "$PSScriptRoot/Include-GenerateUnitSystemDefaultSourceCode.ps1" . "$PSScriptRoot/Include-GenerateQuantityTypeSourceCode.ps1" . "$PSScriptRoot/Include-GenerateStaticQuantitySourceCode.ps1" -. "$PSScriptRoot/Include-GenerateQuantitySourceCodeNetFramework.ps1" +. "$PSScriptRoot/Include-GenerateQuantitySourceCode.ps1" . "$PSScriptRoot/Include-GenerateUnitTypeSourceCode.ps1" . "$PSScriptRoot/Include-GenerateUnitTestBaseClassSourceCode.ps1" . "$PSScriptRoot/Include-GenerateUnitTestPlaceholderSourceCode.ps1" diff --git a/UnitsNet/Scripts/Include-GenerateQuantitySourceCodeNetFramework.ps1 b/UnitsNet/Scripts/Include-GenerateQuantitySourceCode.ps1 similarity index 99% rename from UnitsNet/Scripts/Include-GenerateQuantitySourceCodeNetFramework.ps1 rename to UnitsNet/Scripts/Include-GenerateQuantitySourceCode.ps1 index 22a8639acf..599cf86849 100644 --- a/UnitsNet/Scripts/Include-GenerateQuantitySourceCodeNetFramework.ps1 +++ b/UnitsNet/Scripts/Include-GenerateQuantitySourceCode.ps1 @@ -8,7 +8,7 @@ class GeneratorArgs [boolean]$TargetIsWindowsRuntimeComponent } -function GenerateQuantitySourceCodeNetFramework([Quantity]$quantity, [string]$target) +function GenerateQuantitySourceCode([Quantity]$quantity, [string]$target) { $quantityName = $quantity.Name; $units = $quantity.Units; From 67b5e69d484f78aae0bf1033a1dc1f6c0985d703 Mon Sep 17 00:00:00 2001 From: Andreas Gullberg Larsen Date: Mon, 28 Jan 2019 01:50:03 +0100 Subject: [PATCH 21/36] Remove IQuantity typed member in WRC --- .../Quantities/Acceleration.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/AmountOfSubstance.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/AmplitudeRatio.WindowsRuntimeComponent.g.cs | 2 -- .../GeneratedCode/Quantities/Angle.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/ApparentEnergy.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/ApparentPower.WindowsRuntimeComponent.g.cs | 2 -- .../GeneratedCode/Quantities/Area.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/AreaDensity.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/AreaMomentOfInertia.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/BitRate.WindowsRuntimeComponent.g.cs | 2 -- .../BrakeSpecificFuelConsumption.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/Capacitance.WindowsRuntimeComponent.g.cs | 2 -- .../CoefficientOfThermalExpansion.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/Density.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/Duration.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/DynamicViscosity.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/ElectricAdmittance.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/ElectricCharge.WindowsRuntimeComponent.g.cs | 2 -- .../ElectricChargeDensity.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/ElectricConductance.WindowsRuntimeComponent.g.cs | 2 -- .../ElectricConductivity.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/ElectricCurrent.WindowsRuntimeComponent.g.cs | 2 -- .../ElectricCurrentDensity.WindowsRuntimeComponent.g.cs | 2 -- .../ElectricCurrentGradient.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/ElectricField.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/ElectricInductance.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/ElectricPotential.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/ElectricPotentialAc.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/ElectricPotentialDc.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/ElectricResistance.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/ElectricResistivity.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/Energy.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/Entropy.WindowsRuntimeComponent.g.cs | 2 -- .../GeneratedCode/Quantities/Force.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/ForceChangeRate.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/ForcePerLength.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/Frequency.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/HeatFlux.WindowsRuntimeComponent.g.cs | 2 -- .../HeatTransferCoefficient.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/Illuminance.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/Information.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/Irradiance.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/Irradiation.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/KinematicViscosity.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/LapseRate.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/Length.WindowsRuntimeComponent.g.cs | 2 -- .../GeneratedCode/Quantities/Level.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/LinearDensity.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/LuminousFlux.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/LuminousIntensity.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/MagneticField.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/MagneticFlux.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/Magnetization.WindowsRuntimeComponent.g.cs | 2 -- .../GeneratedCode/Quantities/Mass.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/MassFlow.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/MassFlux.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/MassMomentOfInertia.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/MolarEnergy.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/MolarEntropy.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/MolarMass.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/Molarity.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/Permeability.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/Permittivity.WindowsRuntimeComponent.g.cs | 2 -- .../GeneratedCode/Quantities/Power.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/PowerDensity.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/PowerRatio.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/Pressure.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/PressureChangeRate.WindowsRuntimeComponent.g.cs | 2 -- .../GeneratedCode/Quantities/Ratio.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/ReactiveEnergy.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/ReactivePower.WindowsRuntimeComponent.g.cs | 2 -- .../RotationalAcceleration.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/RotationalSpeed.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/RotationalStiffness.WindowsRuntimeComponent.g.cs | 2 -- .../RotationalStiffnessPerLength.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/SolidAngle.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/SpecificEnergy.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/SpecificEntropy.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/SpecificVolume.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/SpecificWeight.WindowsRuntimeComponent.g.cs | 2 -- .../GeneratedCode/Quantities/Speed.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/Temperature.WindowsRuntimeComponent.g.cs | 2 -- .../TemperatureChangeRate.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/TemperatureDelta.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/ThermalConductivity.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/ThermalResistance.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/Torque.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/VitaminA.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/Volume.WindowsRuntimeComponent.g.cs | 2 -- .../Quantities/VolumeFlow.WindowsRuntimeComponent.g.cs | 2 -- UnitsNet/Scripts/Include-GenerateQuantitySourceCode.ps1 | 2 ++ 91 files changed, 2 insertions(+), 180 deletions(-) diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Acceleration.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Acceleration.WindowsRuntimeComponent.g.cs index ae63b9a254..2a75a0fcd8 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Acceleration.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Acceleration.WindowsRuntimeComponent.g.cs @@ -676,8 +676,6 @@ public Acceleration ToUnit(AccelerationUnit unit) return new Acceleration(convertedValue, unit); } - IQuantity IQuantity.ToUnit(AccelerationUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((AccelerationUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmountOfSubstance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmountOfSubstance.WindowsRuntimeComponent.g.cs index 696110e23f..802f396f78 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmountOfSubstance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmountOfSubstance.WindowsRuntimeComponent.g.cs @@ -706,8 +706,6 @@ public AmountOfSubstance ToUnit(AmountOfSubstanceUnit unit) return new AmountOfSubstance(convertedValue, unit); } - IQuantity IQuantity.ToUnit(AmountOfSubstanceUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((AmountOfSubstanceUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmplitudeRatio.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmplitudeRatio.WindowsRuntimeComponent.g.cs index c144556e06..010aa34b09 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmplitudeRatio.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmplitudeRatio.WindowsRuntimeComponent.g.cs @@ -541,8 +541,6 @@ public AmplitudeRatio ToUnit(AmplitudeRatioUnit unit) return new AmplitudeRatio(convertedValue, unit); } - IQuantity IQuantity.ToUnit(AmplitudeRatioUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((AmplitudeRatioUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Angle.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Angle.WindowsRuntimeComponent.g.cs index 19cad413f3..3387777657 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Angle.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Angle.WindowsRuntimeComponent.g.cs @@ -691,8 +691,6 @@ public Angle ToUnit(AngleUnit unit) return new Angle(convertedValue, unit); } - IQuantity IQuantity.ToUnit(AngleUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((AngleUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentEnergy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentEnergy.WindowsRuntimeComponent.g.cs index cbf8d832d0..efde2159d7 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentEnergy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentEnergy.WindowsRuntimeComponent.g.cs @@ -526,8 +526,6 @@ public ApparentEnergy ToUnit(ApparentEnergyUnit unit) return new ApparentEnergy(convertedValue, unit); } - IQuantity IQuantity.ToUnit(ApparentEnergyUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((ApparentEnergyUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentPower.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentPower.WindowsRuntimeComponent.g.cs index 90eda04352..c2fb55e12b 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentPower.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentPower.WindowsRuntimeComponent.g.cs @@ -541,8 +541,6 @@ public ApparentPower ToUnit(ApparentPowerUnit unit) return new ApparentPower(convertedValue, unit); } - IQuantity IQuantity.ToUnit(ApparentPowerUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((ApparentPowerUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Area.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Area.WindowsRuntimeComponent.g.cs index 718338e4b3..de393a3799 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Area.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Area.WindowsRuntimeComponent.g.cs @@ -676,8 +676,6 @@ public Area ToUnit(AreaUnit unit) return new Area(convertedValue, unit); } - IQuantity IQuantity.ToUnit(AreaUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((AreaUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaDensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaDensity.WindowsRuntimeComponent.g.cs index 2242cd140d..bc0a8dcd9a 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaDensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaDensity.WindowsRuntimeComponent.g.cs @@ -496,8 +496,6 @@ public AreaDensity ToUnit(AreaDensityUnit unit) return new AreaDensity(convertedValue, unit); } - IQuantity IQuantity.ToUnit(AreaDensityUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((AreaDensityUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaMomentOfInertia.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaMomentOfInertia.WindowsRuntimeComponent.g.cs index 7803632d5e..707eb3a63e 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaMomentOfInertia.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaMomentOfInertia.WindowsRuntimeComponent.g.cs @@ -571,8 +571,6 @@ public AreaMomentOfInertia ToUnit(AreaMomentOfInertiaUnit unit) return new AreaMomentOfInertia(convertedValue, unit); } - IQuantity IQuantity.ToUnit(AreaMomentOfInertiaUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((AreaMomentOfInertiaUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BitRate.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BitRate.WindowsRuntimeComponent.g.cs index 3f2d4d81bb..57c3f11367 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BitRate.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BitRate.WindowsRuntimeComponent.g.cs @@ -874,8 +874,6 @@ public BitRate ToUnit(BitRateUnit unit) return new BitRate(convertedValue, unit); } - IQuantity IQuantity.ToUnit(BitRateUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((BitRateUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.WindowsRuntimeComponent.g.cs index a901eef7e2..6840a96b4c 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.WindowsRuntimeComponent.g.cs @@ -526,8 +526,6 @@ public BrakeSpecificFuelConsumption ToUnit(BrakeSpecificFuelConsumptionUnit unit return new BrakeSpecificFuelConsumption(convertedValue, unit); } - IQuantity IQuantity.ToUnit(BrakeSpecificFuelConsumptionUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((BrakeSpecificFuelConsumptionUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Capacitance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Capacitance.WindowsRuntimeComponent.g.cs index a2a185ebeb..1038872a72 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Capacitance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Capacitance.WindowsRuntimeComponent.g.cs @@ -589,8 +589,6 @@ public Capacitance ToUnit(CapacitanceUnit unit) return new Capacitance(convertedValue, unit); } - IQuantity IQuantity.ToUnit(CapacitanceUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((CapacitanceUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/CoefficientOfThermalExpansion.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/CoefficientOfThermalExpansion.WindowsRuntimeComponent.g.cs index f9bf801bd0..16295f1651 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/CoefficientOfThermalExpansion.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/CoefficientOfThermalExpansion.WindowsRuntimeComponent.g.cs @@ -526,8 +526,6 @@ public CoefficientOfThermalExpansion ToUnit(CoefficientOfThermalExpansionUnit un return new CoefficientOfThermalExpansion(convertedValue, unit); } - IQuantity IQuantity.ToUnit(CoefficientOfThermalExpansionUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((CoefficientOfThermalExpansionUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Density.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Density.WindowsRuntimeComponent.g.cs index cbf585ff90..9c35985847 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Density.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Density.WindowsRuntimeComponent.g.cs @@ -1069,8 +1069,6 @@ public Density ToUnit(DensityUnit unit) return new Density(convertedValue, unit); } - IQuantity IQuantity.ToUnit(DensityUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((DensityUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Duration.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Duration.WindowsRuntimeComponent.g.cs index e82a292810..3d14c3b98b 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Duration.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Duration.WindowsRuntimeComponent.g.cs @@ -631,8 +631,6 @@ public Duration ToUnit(DurationUnit unit) return new Duration(convertedValue, unit); } - IQuantity IQuantity.ToUnit(DurationUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((DurationUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/DynamicViscosity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/DynamicViscosity.WindowsRuntimeComponent.g.cs index 5767c625a8..fa8fb48c1f 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/DynamicViscosity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/DynamicViscosity.WindowsRuntimeComponent.g.cs @@ -574,8 +574,6 @@ public DynamicViscosity ToUnit(DynamicViscosityUnit unit) return new DynamicViscosity(convertedValue, unit); } - IQuantity IQuantity.ToUnit(DynamicViscosityUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((DynamicViscosityUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricAdmittance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricAdmittance.WindowsRuntimeComponent.g.cs index f63e1428dd..07e1695109 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricAdmittance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricAdmittance.WindowsRuntimeComponent.g.cs @@ -541,8 +541,6 @@ public ElectricAdmittance ToUnit(ElectricAdmittanceUnit unit) return new ElectricAdmittance(convertedValue, unit); } - IQuantity IQuantity.ToUnit(ElectricAdmittanceUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((ElectricAdmittanceUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCharge.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCharge.WindowsRuntimeComponent.g.cs index 57baa5a875..487862833d 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCharge.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCharge.WindowsRuntimeComponent.g.cs @@ -499,8 +499,6 @@ public ElectricCharge ToUnit(ElectricChargeUnit unit) return new ElectricCharge(convertedValue, unit); } - IQuantity IQuantity.ToUnit(ElectricChargeUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((ElectricChargeUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricChargeDensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricChargeDensity.WindowsRuntimeComponent.g.cs index 27e9a3cdc2..ac29e394c0 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricChargeDensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricChargeDensity.WindowsRuntimeComponent.g.cs @@ -499,8 +499,6 @@ public ElectricChargeDensity ToUnit(ElectricChargeDensityUnit unit) return new ElectricChargeDensity(convertedValue, unit); } - IQuantity IQuantity.ToUnit(ElectricChargeDensityUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((ElectricChargeDensityUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductance.WindowsRuntimeComponent.g.cs index e692bd7327..f76539cf0b 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductance.WindowsRuntimeComponent.g.cs @@ -529,8 +529,6 @@ public ElectricConductance ToUnit(ElectricConductanceUnit unit) return new ElectricConductance(convertedValue, unit); } - IQuantity IQuantity.ToUnit(ElectricConductanceUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((ElectricConductanceUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductivity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductivity.WindowsRuntimeComponent.g.cs index bfbe8e59bb..017a4826ca 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductivity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductivity.WindowsRuntimeComponent.g.cs @@ -499,8 +499,6 @@ public ElectricConductivity ToUnit(ElectricConductivityUnit unit) return new ElectricConductivity(convertedValue, unit); } - IQuantity IQuantity.ToUnit(ElectricConductivityUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((ElectricConductivityUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrent.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrent.WindowsRuntimeComponent.g.cs index 598b51c983..7035fc44c6 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrent.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrent.WindowsRuntimeComponent.g.cs @@ -601,8 +601,6 @@ public ElectricCurrent ToUnit(ElectricCurrentUnit unit) return new ElectricCurrent(convertedValue, unit); } - IQuantity IQuantity.ToUnit(ElectricCurrentUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((ElectricCurrentUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentDensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentDensity.WindowsRuntimeComponent.g.cs index 40a30d4cf5..0c478d0d28 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentDensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentDensity.WindowsRuntimeComponent.g.cs @@ -499,8 +499,6 @@ public ElectricCurrentDensity ToUnit(ElectricCurrentDensityUnit unit) return new ElectricCurrentDensity(convertedValue, unit); } - IQuantity IQuantity.ToUnit(ElectricCurrentDensityUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((ElectricCurrentDensityUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentGradient.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentGradient.WindowsRuntimeComponent.g.cs index eb2648e20b..93fb9e9207 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentGradient.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentGradient.WindowsRuntimeComponent.g.cs @@ -496,8 +496,6 @@ public ElectricCurrentGradient ToUnit(ElectricCurrentGradientUnit unit) return new ElectricCurrentGradient(convertedValue, unit); } - IQuantity IQuantity.ToUnit(ElectricCurrentGradientUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((ElectricCurrentGradientUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricField.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricField.WindowsRuntimeComponent.g.cs index 6dda665958..d785a65f41 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricField.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricField.WindowsRuntimeComponent.g.cs @@ -499,8 +499,6 @@ public ElectricField ToUnit(ElectricFieldUnit unit) return new ElectricField(convertedValue, unit); } - IQuantity IQuantity.ToUnit(ElectricFieldUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((ElectricFieldUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricInductance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricInductance.WindowsRuntimeComponent.g.cs index 82847992de..a3139eb4c1 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricInductance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricInductance.WindowsRuntimeComponent.g.cs @@ -544,8 +544,6 @@ public ElectricInductance ToUnit(ElectricInductanceUnit unit) return new ElectricInductance(convertedValue, unit); } - IQuantity IQuantity.ToUnit(ElectricInductanceUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((ElectricInductanceUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotential.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotential.WindowsRuntimeComponent.g.cs index c4c88da9a0..bbbd04a14b 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotential.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotential.WindowsRuntimeComponent.g.cs @@ -556,8 +556,6 @@ public ElectricPotential ToUnit(ElectricPotentialUnit unit) return new ElectricPotential(convertedValue, unit); } - IQuantity IQuantity.ToUnit(ElectricPotentialUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((ElectricPotentialUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialAc.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialAc.WindowsRuntimeComponent.g.cs index c485537d95..0cc5b4cfc6 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialAc.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialAc.WindowsRuntimeComponent.g.cs @@ -556,8 +556,6 @@ public ElectricPotentialAc ToUnit(ElectricPotentialAcUnit unit) return new ElectricPotentialAc(convertedValue, unit); } - IQuantity IQuantity.ToUnit(ElectricPotentialAcUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((ElectricPotentialAcUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialDc.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialDc.WindowsRuntimeComponent.g.cs index fe8feedac0..e3b5cfc69a 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialDc.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialDc.WindowsRuntimeComponent.g.cs @@ -556,8 +556,6 @@ public ElectricPotentialDc ToUnit(ElectricPotentialDcUnit unit) return new ElectricPotentialDc(convertedValue, unit); } - IQuantity IQuantity.ToUnit(ElectricPotentialDcUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((ElectricPotentialDcUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistance.WindowsRuntimeComponent.g.cs index ed9f89b5cb..1e9053c174 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistance.WindowsRuntimeComponent.g.cs @@ -556,8 +556,6 @@ public ElectricResistance ToUnit(ElectricResistanceUnit unit) return new ElectricResistance(convertedValue, unit); } - IQuantity IQuantity.ToUnit(ElectricResistanceUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((ElectricResistanceUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistivity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistivity.WindowsRuntimeComponent.g.cs index 64c0fae761..50354e1930 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistivity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistivity.WindowsRuntimeComponent.g.cs @@ -694,8 +694,6 @@ public ElectricResistivity ToUnit(ElectricResistivityUnit unit) return new ElectricResistivity(convertedValue, unit); } - IQuantity IQuantity.ToUnit(ElectricResistivityUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((ElectricResistivityUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Energy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Energy.WindowsRuntimeComponent.g.cs index f39e6ffef8..c04f90848d 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Energy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Energy.WindowsRuntimeComponent.g.cs @@ -811,8 +811,6 @@ public Energy ToUnit(EnergyUnit unit) return new Energy(convertedValue, unit); } - IQuantity IQuantity.ToUnit(EnergyUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((EnergyUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Entropy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Entropy.WindowsRuntimeComponent.g.cs index c9c4e218f1..0ac75d57ae 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Entropy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Entropy.WindowsRuntimeComponent.g.cs @@ -586,8 +586,6 @@ public Entropy ToUnit(EntropyUnit unit) return new Entropy(convertedValue, unit); } - IQuantity IQuantity.ToUnit(EntropyUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((EntropyUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Force.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Force.WindowsRuntimeComponent.g.cs index 7bd1dcf139..2e8619bb83 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Force.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Force.WindowsRuntimeComponent.g.cs @@ -676,8 +676,6 @@ public Force ToUnit(ForceUnit unit) return new Force(convertedValue, unit); } - IQuantity IQuantity.ToUnit(ForceUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((ForceUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForceChangeRate.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForceChangeRate.WindowsRuntimeComponent.g.cs index dc02f03aad..c7c403714e 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForceChangeRate.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForceChangeRate.WindowsRuntimeComponent.g.cs @@ -646,8 +646,6 @@ public ForceChangeRate ToUnit(ForceChangeRateUnit unit) return new ForceChangeRate(convertedValue, unit); } - IQuantity IQuantity.ToUnit(ForceChangeRateUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((ForceChangeRateUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForcePerLength.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForcePerLength.WindowsRuntimeComponent.g.cs index 9b805aeb14..95bdacd3c7 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForcePerLength.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForcePerLength.WindowsRuntimeComponent.g.cs @@ -616,8 +616,6 @@ public ForcePerLength ToUnit(ForcePerLengthUnit unit) return new ForcePerLength(convertedValue, unit); } - IQuantity IQuantity.ToUnit(ForcePerLengthUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((ForcePerLengthUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Frequency.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Frequency.WindowsRuntimeComponent.g.cs index eda2fede3e..7377181a05 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Frequency.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Frequency.WindowsRuntimeComponent.g.cs @@ -601,8 +601,6 @@ public Frequency ToUnit(FrequencyUnit unit) return new Frequency(convertedValue, unit); } - IQuantity IQuantity.ToUnit(FrequencyUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((FrequencyUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatFlux.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatFlux.WindowsRuntimeComponent.g.cs index 3bc33cb85e..ae1fa61cf1 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatFlux.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatFlux.WindowsRuntimeComponent.g.cs @@ -751,8 +751,6 @@ public HeatFlux ToUnit(HeatFluxUnit unit) return new HeatFlux(convertedValue, unit); } - IQuantity IQuantity.ToUnit(HeatFluxUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((HeatFluxUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatTransferCoefficient.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatTransferCoefficient.WindowsRuntimeComponent.g.cs index 3fd3b1c8e2..803c2e5943 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatTransferCoefficient.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatTransferCoefficient.WindowsRuntimeComponent.g.cs @@ -511,8 +511,6 @@ public HeatTransferCoefficient ToUnit(HeatTransferCoefficientUnit unit) return new HeatTransferCoefficient(convertedValue, unit); } - IQuantity IQuantity.ToUnit(HeatTransferCoefficientUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((HeatTransferCoefficientUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Illuminance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Illuminance.WindowsRuntimeComponent.g.cs index 80a398cda8..608a30e8cf 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Illuminance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Illuminance.WindowsRuntimeComponent.g.cs @@ -544,8 +544,6 @@ public Illuminance ToUnit(IlluminanceUnit unit) return new Illuminance(convertedValue, unit); } - IQuantity IQuantity.ToUnit(IlluminanceUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((IlluminanceUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Information.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Information.WindowsRuntimeComponent.g.cs index 4a6be13c50..564bf17f86 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Information.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Information.WindowsRuntimeComponent.g.cs @@ -871,8 +871,6 @@ public Information ToUnit(InformationUnit unit) return new Information(convertedValue, unit); } - IQuantity IQuantity.ToUnit(InformationUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((InformationUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiance.WindowsRuntimeComponent.g.cs index c11241228f..df7be11a48 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiance.WindowsRuntimeComponent.g.cs @@ -691,8 +691,6 @@ public Irradiance ToUnit(IrradianceUnit unit) return new Irradiance(convertedValue, unit); } - IQuantity IQuantity.ToUnit(IrradianceUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((IrradianceUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiation.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiation.WindowsRuntimeComponent.g.cs index b20d58deaf..e831148790 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiation.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiation.WindowsRuntimeComponent.g.cs @@ -544,8 +544,6 @@ public Irradiation ToUnit(IrradiationUnit unit) return new Irradiation(convertedValue, unit); } - IQuantity IQuantity.ToUnit(IrradiationUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((IrradiationUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/KinematicViscosity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/KinematicViscosity.WindowsRuntimeComponent.g.cs index b9ade0594d..3aecd9c9c2 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/KinematicViscosity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/KinematicViscosity.WindowsRuntimeComponent.g.cs @@ -604,8 +604,6 @@ public KinematicViscosity ToUnit(KinematicViscosityUnit unit) return new KinematicViscosity(convertedValue, unit); } - IQuantity IQuantity.ToUnit(KinematicViscosityUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((KinematicViscosityUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LapseRate.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LapseRate.WindowsRuntimeComponent.g.cs index 5ea94135bd..ecd33d3e0b 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LapseRate.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LapseRate.WindowsRuntimeComponent.g.cs @@ -496,8 +496,6 @@ public LapseRate ToUnit(LapseRateUnit unit) return new LapseRate(convertedValue, unit); } - IQuantity IQuantity.ToUnit(LapseRateUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((LapseRateUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Length.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Length.WindowsRuntimeComponent.g.cs index adf1ed5693..36565b5d2f 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Length.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Length.WindowsRuntimeComponent.g.cs @@ -811,8 +811,6 @@ public Length ToUnit(LengthUnit unit) return new Length(convertedValue, unit); } - IQuantity IQuantity.ToUnit(LengthUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((LengthUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Level.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Level.WindowsRuntimeComponent.g.cs index e2d19652f5..5db319ea21 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Level.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Level.WindowsRuntimeComponent.g.cs @@ -511,8 +511,6 @@ public Level ToUnit(LevelUnit unit) return new Level(convertedValue, unit); } - IQuantity IQuantity.ToUnit(LevelUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((LevelUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LinearDensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LinearDensity.WindowsRuntimeComponent.g.cs index 0a97676052..00e24a258d 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LinearDensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LinearDensity.WindowsRuntimeComponent.g.cs @@ -529,8 +529,6 @@ public LinearDensity ToUnit(LinearDensityUnit unit) return new LinearDensity(convertedValue, unit); } - IQuantity IQuantity.ToUnit(LinearDensityUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((LinearDensityUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousFlux.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousFlux.WindowsRuntimeComponent.g.cs index b4e4176fbf..47b29fd170 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousFlux.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousFlux.WindowsRuntimeComponent.g.cs @@ -499,8 +499,6 @@ public LuminousFlux ToUnit(LuminousFluxUnit unit) return new LuminousFlux(convertedValue, unit); } - IQuantity IQuantity.ToUnit(LuminousFluxUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((LuminousFluxUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousIntensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousIntensity.WindowsRuntimeComponent.g.cs index 1463fa1725..19e61758ba 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousIntensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousIntensity.WindowsRuntimeComponent.g.cs @@ -499,8 +499,6 @@ public LuminousIntensity ToUnit(LuminousIntensityUnit unit) return new LuminousIntensity(convertedValue, unit); } - IQuantity IQuantity.ToUnit(LuminousIntensityUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((LuminousIntensityUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticField.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticField.WindowsRuntimeComponent.g.cs index ddfd0708ea..0db4367169 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticField.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticField.WindowsRuntimeComponent.g.cs @@ -544,8 +544,6 @@ public MagneticField ToUnit(MagneticFieldUnit unit) return new MagneticField(convertedValue, unit); } - IQuantity IQuantity.ToUnit(MagneticFieldUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((MagneticFieldUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticFlux.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticFlux.WindowsRuntimeComponent.g.cs index 1150703320..7fb7a3a601 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticFlux.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticFlux.WindowsRuntimeComponent.g.cs @@ -499,8 +499,6 @@ public MagneticFlux ToUnit(MagneticFluxUnit unit) return new MagneticFlux(convertedValue, unit); } - IQuantity IQuantity.ToUnit(MagneticFluxUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((MagneticFluxUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Magnetization.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Magnetization.WindowsRuntimeComponent.g.cs index cc66409d14..ab949d7f49 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Magnetization.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Magnetization.WindowsRuntimeComponent.g.cs @@ -499,8 +499,6 @@ public Magnetization ToUnit(MagnetizationUnit unit) return new Magnetization(convertedValue, unit); } - IQuantity IQuantity.ToUnit(MagnetizationUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((MagnetizationUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Mass.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Mass.WindowsRuntimeComponent.g.cs index 433f6fbbe7..730355f3e4 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Mass.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Mass.WindowsRuntimeComponent.g.cs @@ -826,8 +826,6 @@ public Mass ToUnit(MassUnit unit) return new Mass(convertedValue, unit); } - IQuantity IQuantity.ToUnit(MassUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((MassUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlow.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlow.WindowsRuntimeComponent.g.cs index be37fce653..7feb10d37c 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlow.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlow.WindowsRuntimeComponent.g.cs @@ -931,8 +931,6 @@ public MassFlow ToUnit(MassFlowUnit unit) return new MassFlow(convertedValue, unit); } - IQuantity IQuantity.ToUnit(MassFlowUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((MassFlowUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlux.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlux.WindowsRuntimeComponent.g.cs index f2a9a4378e..9532abdbe7 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlux.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlux.WindowsRuntimeComponent.g.cs @@ -511,8 +511,6 @@ public MassFlux ToUnit(MassFluxUnit unit) return new MassFlux(convertedValue, unit); } - IQuantity IQuantity.ToUnit(MassFluxUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((MassFluxUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassMomentOfInertia.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassMomentOfInertia.WindowsRuntimeComponent.g.cs index 07f39d2947..78129a04e2 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassMomentOfInertia.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassMomentOfInertia.WindowsRuntimeComponent.g.cs @@ -901,8 +901,6 @@ public MassMomentOfInertia ToUnit(MassMomentOfInertiaUnit unit) return new MassMomentOfInertia(convertedValue, unit); } - IQuantity IQuantity.ToUnit(MassMomentOfInertiaUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((MassMomentOfInertiaUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEnergy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEnergy.WindowsRuntimeComponent.g.cs index 0e73f05ed0..a05dcdf02f 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEnergy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEnergy.WindowsRuntimeComponent.g.cs @@ -526,8 +526,6 @@ public MolarEnergy ToUnit(MolarEnergyUnit unit) return new MolarEnergy(convertedValue, unit); } - IQuantity IQuantity.ToUnit(MolarEnergyUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((MolarEnergyUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEntropy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEntropy.WindowsRuntimeComponent.g.cs index 66e1b3856e..f97b47f551 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEntropy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEntropy.WindowsRuntimeComponent.g.cs @@ -526,8 +526,6 @@ public MolarEntropy ToUnit(MolarEntropyUnit unit) return new MolarEntropy(convertedValue, unit); } - IQuantity IQuantity.ToUnit(MolarEntropyUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((MolarEntropyUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarMass.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarMass.WindowsRuntimeComponent.g.cs index 9a51e42b69..8e08a60eb5 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarMass.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarMass.WindowsRuntimeComponent.g.cs @@ -661,8 +661,6 @@ public MolarMass ToUnit(MolarMassUnit unit) return new MolarMass(convertedValue, unit); } - IQuantity IQuantity.ToUnit(MolarMassUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((MolarMassUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Molarity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Molarity.WindowsRuntimeComponent.g.cs index ad877a8144..38e586ac81 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Molarity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Molarity.WindowsRuntimeComponent.g.cs @@ -604,8 +604,6 @@ public Molarity ToUnit(MolarityUnit unit) return new Molarity(convertedValue, unit); } - IQuantity IQuantity.ToUnit(MolarityUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((MolarityUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permeability.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permeability.WindowsRuntimeComponent.g.cs index 49e01bbd30..36be0cc9ea 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permeability.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permeability.WindowsRuntimeComponent.g.cs @@ -499,8 +499,6 @@ public Permeability ToUnit(PermeabilityUnit unit) return new Permeability(convertedValue, unit); } - IQuantity IQuantity.ToUnit(PermeabilityUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((PermeabilityUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permittivity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permittivity.WindowsRuntimeComponent.g.cs index aa4127fa53..fa5d3c8415 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permittivity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permittivity.WindowsRuntimeComponent.g.cs @@ -499,8 +499,6 @@ public Permittivity ToUnit(PermittivityUnit unit) return new Permittivity(convertedValue, unit); } - IQuantity IQuantity.ToUnit(PermittivityUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((PermittivityUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Power.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Power.WindowsRuntimeComponent.g.cs index 232452c8d8..17bfbe412d 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Power.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Power.WindowsRuntimeComponent.g.cs @@ -781,8 +781,6 @@ public Power ToUnit(PowerUnit unit) return new Power(convertedValue, unit); } - IQuantity IQuantity.ToUnit(PowerUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((PowerUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerDensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerDensity.WindowsRuntimeComponent.g.cs index 9962562545..469be5191a 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerDensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerDensity.WindowsRuntimeComponent.g.cs @@ -1141,8 +1141,6 @@ public PowerDensity ToUnit(PowerDensityUnit unit) return new PowerDensity(convertedValue, unit); } - IQuantity IQuantity.ToUnit(PowerDensityUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((PowerDensityUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerRatio.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerRatio.WindowsRuntimeComponent.g.cs index 3a822e938e..af372f426b 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerRatio.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerRatio.WindowsRuntimeComponent.g.cs @@ -511,8 +511,6 @@ public PowerRatio ToUnit(PowerRatioUnit unit) return new PowerRatio(convertedValue, unit); } - IQuantity IQuantity.ToUnit(PowerRatioUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((PowerRatioUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Pressure.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Pressure.WindowsRuntimeComponent.g.cs index 4182be0042..5055250a60 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Pressure.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Pressure.WindowsRuntimeComponent.g.cs @@ -1111,8 +1111,6 @@ public Pressure ToUnit(PressureUnit unit) return new Pressure(convertedValue, unit); } - IQuantity IQuantity.ToUnit(PressureUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((PressureUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PressureChangeRate.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PressureChangeRate.WindowsRuntimeComponent.g.cs index aba1d119aa..97c300b6ad 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PressureChangeRate.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PressureChangeRate.WindowsRuntimeComponent.g.cs @@ -586,8 +586,6 @@ public PressureChangeRate ToUnit(PressureChangeRateUnit unit) return new PressureChangeRate(convertedValue, unit); } - IQuantity IQuantity.ToUnit(PressureChangeRateUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((PressureChangeRateUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Ratio.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Ratio.WindowsRuntimeComponent.g.cs index cc065a2cf3..133f55e7fe 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Ratio.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Ratio.WindowsRuntimeComponent.g.cs @@ -571,8 +571,6 @@ public Ratio ToUnit(RatioUnit unit) return new Ratio(convertedValue, unit); } - IQuantity IQuantity.ToUnit(RatioUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((RatioUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactiveEnergy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactiveEnergy.WindowsRuntimeComponent.g.cs index 07ca3ac831..16bbc66a05 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactiveEnergy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactiveEnergy.WindowsRuntimeComponent.g.cs @@ -526,8 +526,6 @@ public ReactiveEnergy ToUnit(ReactiveEnergyUnit unit) return new ReactiveEnergy(convertedValue, unit); } - IQuantity IQuantity.ToUnit(ReactiveEnergyUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((ReactiveEnergyUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactivePower.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactivePower.WindowsRuntimeComponent.g.cs index ac37b6dc5f..8a7e4e713c 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactivePower.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactivePower.WindowsRuntimeComponent.g.cs @@ -541,8 +541,6 @@ public ReactivePower ToUnit(ReactivePowerUnit unit) return new ReactivePower(convertedValue, unit); } - IQuantity IQuantity.ToUnit(ReactivePowerUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((ReactivePowerUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalAcceleration.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalAcceleration.WindowsRuntimeComponent.g.cs index f7215a3c23..f3dd425743 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalAcceleration.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalAcceleration.WindowsRuntimeComponent.g.cs @@ -526,8 +526,6 @@ public RotationalAcceleration ToUnit(RotationalAccelerationUnit unit) return new RotationalAcceleration(convertedValue, unit); } - IQuantity IQuantity.ToUnit(RotationalAccelerationUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((RotationalAccelerationUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalSpeed.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalSpeed.WindowsRuntimeComponent.g.cs index 2039b9ce8a..2f013902e2 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalSpeed.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalSpeed.WindowsRuntimeComponent.g.cs @@ -676,8 +676,6 @@ public RotationalSpeed ToUnit(RotationalSpeedUnit unit) return new RotationalSpeed(convertedValue, unit); } - IQuantity IQuantity.ToUnit(RotationalSpeedUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((RotationalSpeedUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffness.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffness.WindowsRuntimeComponent.g.cs index 2043514096..94ebd4c87c 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffness.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffness.WindowsRuntimeComponent.g.cs @@ -526,8 +526,6 @@ public RotationalStiffness ToUnit(RotationalStiffnessUnit unit) return new RotationalStiffness(convertedValue, unit); } - IQuantity IQuantity.ToUnit(RotationalStiffnessUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((RotationalStiffnessUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffnessPerLength.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffnessPerLength.WindowsRuntimeComponent.g.cs index 70133ac18f..8de78cf8b9 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffnessPerLength.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffnessPerLength.WindowsRuntimeComponent.g.cs @@ -526,8 +526,6 @@ public RotationalStiffnessPerLength ToUnit(RotationalStiffnessPerLengthUnit unit return new RotationalStiffnessPerLength(convertedValue, unit); } - IQuantity IQuantity.ToUnit(RotationalStiffnessPerLengthUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((RotationalStiffnessPerLengthUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SolidAngle.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SolidAngle.WindowsRuntimeComponent.g.cs index c72735fc6b..d1d63c44dd 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SolidAngle.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SolidAngle.WindowsRuntimeComponent.g.cs @@ -499,8 +499,6 @@ public SolidAngle ToUnit(SolidAngleUnit unit) return new SolidAngle(convertedValue, unit); } - IQuantity IQuantity.ToUnit(SolidAngleUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((SolidAngleUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEnergy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEnergy.WindowsRuntimeComponent.g.cs index 16137a9ecc..afb8107df8 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEnergy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEnergy.WindowsRuntimeComponent.g.cs @@ -619,8 +619,6 @@ public SpecificEnergy ToUnit(SpecificEnergyUnit unit) return new SpecificEnergy(convertedValue, unit); } - IQuantity IQuantity.ToUnit(SpecificEnergyUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((SpecificEnergyUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEntropy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEntropy.WindowsRuntimeComponent.g.cs index 93e541b4a8..845dd910a3 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEntropy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEntropy.WindowsRuntimeComponent.g.cs @@ -601,8 +601,6 @@ public SpecificEntropy ToUnit(SpecificEntropyUnit unit) return new SpecificEntropy(convertedValue, unit); } - IQuantity IQuantity.ToUnit(SpecificEntropyUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((SpecificEntropyUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificVolume.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificVolume.WindowsRuntimeComponent.g.cs index 92df99a30f..8aa23ae595 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificVolume.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificVolume.WindowsRuntimeComponent.g.cs @@ -526,8 +526,6 @@ public SpecificVolume ToUnit(SpecificVolumeUnit unit) return new SpecificVolume(convertedValue, unit); } - IQuantity IQuantity.ToUnit(SpecificVolumeUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((SpecificVolumeUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificWeight.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificWeight.WindowsRuntimeComponent.g.cs index 9ea3396d00..6145a9a8b9 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificWeight.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificWeight.WindowsRuntimeComponent.g.cs @@ -739,8 +739,6 @@ public SpecificWeight ToUnit(SpecificWeightUnit unit) return new SpecificWeight(convertedValue, unit); } - IQuantity IQuantity.ToUnit(SpecificWeightUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((SpecificWeightUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Speed.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Speed.WindowsRuntimeComponent.g.cs index e55b02b106..9d3c70aa14 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Speed.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Speed.WindowsRuntimeComponent.g.cs @@ -961,8 +961,6 @@ public Speed ToUnit(SpeedUnit unit) return new Speed(convertedValue, unit); } - IQuantity IQuantity.ToUnit(SpeedUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((SpeedUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Temperature.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Temperature.WindowsRuntimeComponent.g.cs index 8cef557424..225613546f 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Temperature.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Temperature.WindowsRuntimeComponent.g.cs @@ -601,8 +601,6 @@ public Temperature ToUnit(TemperatureUnit unit) return new Temperature(convertedValue, unit); } - IQuantity IQuantity.ToUnit(TemperatureUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((TemperatureUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureChangeRate.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureChangeRate.WindowsRuntimeComponent.g.cs index 4958845010..33df31d8f0 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureChangeRate.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureChangeRate.WindowsRuntimeComponent.g.cs @@ -631,8 +631,6 @@ public TemperatureChangeRate ToUnit(TemperatureChangeRateUnit unit) return new TemperatureChangeRate(convertedValue, unit); } - IQuantity IQuantity.ToUnit(TemperatureChangeRateUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((TemperatureChangeRateUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureDelta.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureDelta.WindowsRuntimeComponent.g.cs index 34042d33c1..0d996522c4 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureDelta.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureDelta.WindowsRuntimeComponent.g.cs @@ -601,8 +601,6 @@ public TemperatureDelta ToUnit(TemperatureDeltaUnit unit) return new TemperatureDelta(convertedValue, unit); } - IQuantity IQuantity.ToUnit(TemperatureDeltaUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((TemperatureDeltaUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalConductivity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalConductivity.WindowsRuntimeComponent.g.cs index 0700efa263..02c35658ba 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalConductivity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalConductivity.WindowsRuntimeComponent.g.cs @@ -514,8 +514,6 @@ public ThermalConductivity ToUnit(ThermalConductivityUnit unit) return new ThermalConductivity(convertedValue, unit); } - IQuantity IQuantity.ToUnit(ThermalConductivityUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((ThermalConductivityUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalResistance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalResistance.WindowsRuntimeComponent.g.cs index fcb2ff3c01..78f9dad32f 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalResistance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalResistance.WindowsRuntimeComponent.g.cs @@ -556,8 +556,6 @@ public ThermalResistance ToUnit(ThermalResistanceUnit unit) return new ThermalResistance(convertedValue, unit); } - IQuantity IQuantity.ToUnit(ThermalResistanceUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((ThermalResistanceUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Torque.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Torque.WindowsRuntimeComponent.g.cs index b54adff350..b8cb53e782 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Torque.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Torque.WindowsRuntimeComponent.g.cs @@ -796,8 +796,6 @@ public Torque ToUnit(TorqueUnit unit) return new Torque(convertedValue, unit); } - IQuantity IQuantity.ToUnit(TorqueUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((TorqueUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VitaminA.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VitaminA.WindowsRuntimeComponent.g.cs index 616b1278b6..defbba19ad 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VitaminA.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VitaminA.WindowsRuntimeComponent.g.cs @@ -496,8 +496,6 @@ public VitaminA ToUnit(VitaminAUnit unit) return new VitaminA(convertedValue, unit); } - IQuantity IQuantity.ToUnit(VitaminAUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((VitaminAUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Volume.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Volume.WindowsRuntimeComponent.g.cs index 9bd2d3bef5..325c19bf1a 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Volume.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Volume.WindowsRuntimeComponent.g.cs @@ -1156,8 +1156,6 @@ public Volume ToUnit(VolumeUnit unit) return new Volume(convertedValue, unit); } - IQuantity IQuantity.ToUnit(VolumeUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((VolumeUnit) unit); /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VolumeFlow.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VolumeFlow.WindowsRuntimeComponent.g.cs index c08026b051..7b51e20ee2 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VolumeFlow.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VolumeFlow.WindowsRuntimeComponent.g.cs @@ -1201,8 +1201,6 @@ public VolumeFlow ToUnit(VolumeFlowUnit unit) return new VolumeFlow(convertedValue, unit); } - IQuantity IQuantity.ToUnit(VolumeFlowUnit unit) => ToUnit(unit); - public IQuantity ToUnit(Enum unit) => ToUnit((VolumeFlowUnit) unit); /// diff --git a/UnitsNet/Scripts/Include-GenerateQuantitySourceCode.ps1 b/UnitsNet/Scripts/Include-GenerateQuantitySourceCode.ps1 index 599cf86849..03a0c96db0 100644 --- a/UnitsNet/Scripts/Include-GenerateQuantitySourceCode.ps1 +++ b/UnitsNet/Scripts/Include-GenerateQuantitySourceCode.ps1 @@ -962,8 +962,10 @@ function GenerateConversionMethods([GeneratorArgs]$genArgs) return new $quantityName(convertedValue, unit); } +"@; if (-not $wrc) {@" IQuantity<$unitEnumName> IQuantity<$unitEnumName>.ToUnit($unitEnumName unit) => ToUnit(unit); +"@; }@" public IQuantity ToUnit(Enum unit) => ToUnit(($unitEnumName) unit); /// From e30ea071bcfe0793b36386e82c497949374cc469 Mon Sep 17 00:00:00 2001 From: Andreas Gullberg Larsen Date: Mon, 28 Jan 2019 02:26:29 +0100 Subject: [PATCH 22/36] WIF Fix WRC compile errors, not done --- .../Acceleration.WindowsRuntimeComponent.g.cs | 8 ++------ ...mountOfSubstance.WindowsRuntimeComponent.g.cs | 8 ++------ .../AmplitudeRatio.WindowsRuntimeComponent.g.cs | 8 ++------ .../Angle.WindowsRuntimeComponent.g.cs | 8 ++------ .../ApparentEnergy.WindowsRuntimeComponent.g.cs | 8 ++------ .../ApparentPower.WindowsRuntimeComponent.g.cs | 8 ++------ .../Quantities/Area.WindowsRuntimeComponent.g.cs | 8 ++------ .../AreaDensity.WindowsRuntimeComponent.g.cs | 8 ++------ ...aMomentOfInertia.WindowsRuntimeComponent.g.cs | 8 ++------ .../BitRate.WindowsRuntimeComponent.g.cs | 8 ++------ ...cFuelConsumption.WindowsRuntimeComponent.g.cs | 8 ++------ .../Capacitance.WindowsRuntimeComponent.g.cs | 8 ++------ ...ThermalExpansion.WindowsRuntimeComponent.g.cs | 8 ++------ .../Density.WindowsRuntimeComponent.g.cs | 8 ++------ .../Duration.WindowsRuntimeComponent.g.cs | 8 ++------ ...DynamicViscosity.WindowsRuntimeComponent.g.cs | 8 ++------ ...ectricAdmittance.WindowsRuntimeComponent.g.cs | 8 ++------ .../ElectricCharge.WindowsRuntimeComponent.g.cs | 8 ++------ ...ricChargeDensity.WindowsRuntimeComponent.g.cs | 8 ++------ ...ctricConductance.WindowsRuntimeComponent.g.cs | 8 ++------ ...tricConductivity.WindowsRuntimeComponent.g.cs | 8 ++------ .../ElectricCurrent.WindowsRuntimeComponent.g.cs | 8 ++------ ...icCurrentDensity.WindowsRuntimeComponent.g.cs | 8 ++------ ...cCurrentGradient.WindowsRuntimeComponent.g.cs | 8 ++------ .../ElectricField.WindowsRuntimeComponent.g.cs | 8 ++------ ...ectricInductance.WindowsRuntimeComponent.g.cs | 8 ++------ ...lectricPotential.WindowsRuntimeComponent.g.cs | 8 ++------ ...ctricPotentialAc.WindowsRuntimeComponent.g.cs | 8 ++------ ...ctricPotentialDc.WindowsRuntimeComponent.g.cs | 8 ++------ ...ectricResistance.WindowsRuntimeComponent.g.cs | 8 ++------ ...ctricResistivity.WindowsRuntimeComponent.g.cs | 8 ++------ .../Energy.WindowsRuntimeComponent.g.cs | 8 ++------ .../Entropy.WindowsRuntimeComponent.g.cs | 8 ++------ .../Force.WindowsRuntimeComponent.g.cs | 8 ++------ .../ForceChangeRate.WindowsRuntimeComponent.g.cs | 8 ++------ .../ForcePerLength.WindowsRuntimeComponent.g.cs | 8 ++------ .../Frequency.WindowsRuntimeComponent.g.cs | 8 ++------ .../HeatFlux.WindowsRuntimeComponent.g.cs | 8 ++------ ...nsferCoefficient.WindowsRuntimeComponent.g.cs | 8 ++------ .../Illuminance.WindowsRuntimeComponent.g.cs | 8 ++------ .../Information.WindowsRuntimeComponent.g.cs | 8 ++------ .../Irradiance.WindowsRuntimeComponent.g.cs | 8 ++------ .../Irradiation.WindowsRuntimeComponent.g.cs | 8 ++------ ...nematicViscosity.WindowsRuntimeComponent.g.cs | 8 ++------ .../LapseRate.WindowsRuntimeComponent.g.cs | 8 ++------ .../Length.WindowsRuntimeComponent.g.cs | 8 ++------ .../Level.WindowsRuntimeComponent.g.cs | 8 ++------ .../LinearDensity.WindowsRuntimeComponent.g.cs | 8 ++------ .../LuminousFlux.WindowsRuntimeComponent.g.cs | 8 ++------ ...uminousIntensity.WindowsRuntimeComponent.g.cs | 8 ++------ .../MagneticField.WindowsRuntimeComponent.g.cs | 8 ++------ .../MagneticFlux.WindowsRuntimeComponent.g.cs | 8 ++------ .../Magnetization.WindowsRuntimeComponent.g.cs | 8 ++------ .../Quantities/Mass.WindowsRuntimeComponent.g.cs | 8 ++------ .../MassFlow.WindowsRuntimeComponent.g.cs | 8 ++------ .../MassFlux.WindowsRuntimeComponent.g.cs | 8 ++------ ...sMomentOfInertia.WindowsRuntimeComponent.g.cs | 8 ++------ .../MolarEnergy.WindowsRuntimeComponent.g.cs | 8 ++------ .../MolarEntropy.WindowsRuntimeComponent.g.cs | 8 ++------ .../MolarMass.WindowsRuntimeComponent.g.cs | 8 ++------ .../Molarity.WindowsRuntimeComponent.g.cs | 8 ++------ .../Permeability.WindowsRuntimeComponent.g.cs | 8 ++------ .../Permittivity.WindowsRuntimeComponent.g.cs | 8 ++------ .../Power.WindowsRuntimeComponent.g.cs | 8 ++------ .../PowerDensity.WindowsRuntimeComponent.g.cs | 8 ++------ .../PowerRatio.WindowsRuntimeComponent.g.cs | 8 ++------ .../Pressure.WindowsRuntimeComponent.g.cs | 8 ++------ ...essureChangeRate.WindowsRuntimeComponent.g.cs | 8 ++------ .../Ratio.WindowsRuntimeComponent.g.cs | 8 ++------ .../ReactiveEnergy.WindowsRuntimeComponent.g.cs | 8 ++------ .../ReactivePower.WindowsRuntimeComponent.g.cs | 8 ++------ ...onalAcceleration.WindowsRuntimeComponent.g.cs | 8 ++------ .../RotationalSpeed.WindowsRuntimeComponent.g.cs | 8 ++------ ...ationalStiffness.WindowsRuntimeComponent.g.cs | 8 ++------ ...iffnessPerLength.WindowsRuntimeComponent.g.cs | 8 ++------ .../SolidAngle.WindowsRuntimeComponent.g.cs | 8 ++------ .../SpecificEnergy.WindowsRuntimeComponent.g.cs | 8 ++------ .../SpecificEntropy.WindowsRuntimeComponent.g.cs | 8 ++------ .../SpecificVolume.WindowsRuntimeComponent.g.cs | 8 ++------ .../SpecificWeight.WindowsRuntimeComponent.g.cs | 8 ++------ .../Speed.WindowsRuntimeComponent.g.cs | 8 ++------ .../Temperature.WindowsRuntimeComponent.g.cs | 8 ++------ ...ratureChangeRate.WindowsRuntimeComponent.g.cs | 8 ++------ ...TemperatureDelta.WindowsRuntimeComponent.g.cs | 8 ++------ ...rmalConductivity.WindowsRuntimeComponent.g.cs | 8 ++------ ...hermalResistance.WindowsRuntimeComponent.g.cs | 8 ++------ .../Torque.WindowsRuntimeComponent.g.cs | 8 ++------ .../VitaminA.WindowsRuntimeComponent.g.cs | 8 ++------ .../Volume.WindowsRuntimeComponent.g.cs | 8 ++------ .../VolumeFlow.WindowsRuntimeComponent.g.cs | 8 ++------ UnitsNet/GeneratedCode/Quantity.g.cs | 12 ++++++++++-- UnitsNet/IQuantity.cs | 13 ++++++++----- UnitsNet/QuantityInfo.cs | 16 +++++++++++++--- .../Include-GenerateQuantitySourceCode.ps1 | 11 ++++++----- .../Include-GenerateStaticQuantitySourceCode.ps1 | 12 ++++++++++-- UnitsNet/UnitConverter.cs | 6 +++--- 96 files changed, 230 insertions(+), 560 deletions(-) diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Acceleration.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Acceleration.WindowsRuntimeComponent.g.cs index 2a75a0fcd8..5a2dee4c52 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Acceleration.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Acceleration.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private Acceleration(double numericValue, AccelerationUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private Acceleration(double numericValue, AccelerationUnit unit) /// public AccelerationUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -664,8 +664,6 @@ public double As(AccelerationUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((AccelerationUnit) unit); - /// /// Converts this Acceleration to another Acceleration with the unit representation . /// @@ -676,8 +674,6 @@ public Acceleration ToUnit(AccelerationUnit unit) return new Acceleration(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((AccelerationUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmountOfSubstance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmountOfSubstance.WindowsRuntimeComponent.g.cs index 802f396f78..decf8e8424 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmountOfSubstance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmountOfSubstance.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private AmountOfSubstance(double numericValue, AmountOfSubstanceUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private AmountOfSubstance(double numericValue, AmountOfSubstanceUnit unit) /// public AmountOfSubstanceUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -694,8 +694,6 @@ public double As(AmountOfSubstanceUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((AmountOfSubstanceUnit) unit); - /// /// Converts this AmountOfSubstance to another AmountOfSubstance with the unit representation . /// @@ -706,8 +704,6 @@ public AmountOfSubstance ToUnit(AmountOfSubstanceUnit unit) return new AmountOfSubstance(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((AmountOfSubstanceUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmplitudeRatio.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmplitudeRatio.WindowsRuntimeComponent.g.cs index 010aa34b09..82f6a28dad 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmplitudeRatio.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmplitudeRatio.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private AmplitudeRatio(double numericValue, AmplitudeRatioUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private AmplitudeRatio(double numericValue, AmplitudeRatioUnit unit) /// public AmplitudeRatioUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -529,8 +529,6 @@ public double As(AmplitudeRatioUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((AmplitudeRatioUnit) unit); - /// /// Converts this AmplitudeRatio to another AmplitudeRatio with the unit representation . /// @@ -541,8 +539,6 @@ public AmplitudeRatio ToUnit(AmplitudeRatioUnit unit) return new AmplitudeRatio(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((AmplitudeRatioUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Angle.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Angle.WindowsRuntimeComponent.g.cs index 3387777657..d212af1083 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Angle.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Angle.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private Angle(double numericValue, AngleUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private Angle(double numericValue, AngleUnit unit) /// public AngleUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -679,8 +679,6 @@ public double As(AngleUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((AngleUnit) unit); - /// /// Converts this Angle to another Angle with the unit representation . /// @@ -691,8 +689,6 @@ public Angle ToUnit(AngleUnit unit) return new Angle(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((AngleUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentEnergy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentEnergy.WindowsRuntimeComponent.g.cs index efde2159d7..c34d49274c 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentEnergy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentEnergy.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private ApparentEnergy(double numericValue, ApparentEnergyUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private ApparentEnergy(double numericValue, ApparentEnergyUnit unit) /// public ApparentEnergyUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -514,8 +514,6 @@ public double As(ApparentEnergyUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((ApparentEnergyUnit) unit); - /// /// Converts this ApparentEnergy to another ApparentEnergy with the unit representation . /// @@ -526,8 +524,6 @@ public ApparentEnergy ToUnit(ApparentEnergyUnit unit) return new ApparentEnergy(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((ApparentEnergyUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentPower.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentPower.WindowsRuntimeComponent.g.cs index c2fb55e12b..083cbdc642 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentPower.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentPower.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private ApparentPower(double numericValue, ApparentPowerUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private ApparentPower(double numericValue, ApparentPowerUnit unit) /// public ApparentPowerUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -529,8 +529,6 @@ public double As(ApparentPowerUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((ApparentPowerUnit) unit); - /// /// Converts this ApparentPower to another ApparentPower with the unit representation . /// @@ -541,8 +539,6 @@ public ApparentPower ToUnit(ApparentPowerUnit unit) return new ApparentPower(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((ApparentPowerUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Area.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Area.WindowsRuntimeComponent.g.cs index de393a3799..11e1a1e15b 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Area.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Area.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private Area(double numericValue, AreaUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private Area(double numericValue, AreaUnit unit) /// public AreaUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -664,8 +664,6 @@ public double As(AreaUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((AreaUnit) unit); - /// /// Converts this Area to another Area with the unit representation . /// @@ -676,8 +674,6 @@ public Area ToUnit(AreaUnit unit) return new Area(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((AreaUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaDensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaDensity.WindowsRuntimeComponent.g.cs index bc0a8dcd9a..6cf18426bb 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaDensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaDensity.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private AreaDensity(double numericValue, AreaDensityUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private AreaDensity(double numericValue, AreaDensityUnit unit) /// public AreaDensityUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -484,8 +484,6 @@ public double As(AreaDensityUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((AreaDensityUnit) unit); - /// /// Converts this AreaDensity to another AreaDensity with the unit representation . /// @@ -496,8 +494,6 @@ public AreaDensity ToUnit(AreaDensityUnit unit) return new AreaDensity(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((AreaDensityUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaMomentOfInertia.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaMomentOfInertia.WindowsRuntimeComponent.g.cs index 707eb3a63e..89cfafb054 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaMomentOfInertia.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaMomentOfInertia.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private AreaMomentOfInertia(double numericValue, AreaMomentOfInertiaUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private AreaMomentOfInertia(double numericValue, AreaMomentOfInertiaUnit unit) /// public AreaMomentOfInertiaUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -559,8 +559,6 @@ public double As(AreaMomentOfInertiaUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((AreaMomentOfInertiaUnit) unit); - /// /// Converts this AreaMomentOfInertia to another AreaMomentOfInertia with the unit representation . /// @@ -571,8 +569,6 @@ public AreaMomentOfInertia ToUnit(AreaMomentOfInertiaUnit unit) return new AreaMomentOfInertia(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((AreaMomentOfInertiaUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BitRate.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BitRate.WindowsRuntimeComponent.g.cs index 57c3f11367..baedc5dc90 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BitRate.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BitRate.WindowsRuntimeComponent.g.cs @@ -103,7 +103,7 @@ private BitRate(decimal numericValue, BitRateUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,7 +154,7 @@ private BitRate(decimal numericValue, BitRateUnit unit) /// public BitRateUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -862,8 +862,6 @@ public double As(BitRateUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((BitRateUnit) unit); - /// /// Converts this BitRate to another BitRate with the unit representation . /// @@ -874,8 +872,6 @@ public BitRate ToUnit(BitRateUnit unit) return new BitRate(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((BitRateUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.WindowsRuntimeComponent.g.cs index 6840a96b4c..59860c8da4 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private BrakeSpecificFuelConsumption(double numericValue, BrakeSpecificFuelConsu #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private BrakeSpecificFuelConsumption(double numericValue, BrakeSpecificFuelConsu /// public BrakeSpecificFuelConsumptionUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -514,8 +514,6 @@ public double As(BrakeSpecificFuelConsumptionUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((BrakeSpecificFuelConsumptionUnit) unit); - /// /// Converts this BrakeSpecificFuelConsumption to another BrakeSpecificFuelConsumption with the unit representation . /// @@ -526,8 +524,6 @@ public BrakeSpecificFuelConsumption ToUnit(BrakeSpecificFuelConsumptionUnit unit return new BrakeSpecificFuelConsumption(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((BrakeSpecificFuelConsumptionUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Capacitance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Capacitance.WindowsRuntimeComponent.g.cs index 1038872a72..e9cf19d4d3 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Capacitance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Capacitance.WindowsRuntimeComponent.g.cs @@ -103,7 +103,7 @@ private Capacitance(double numericValue, CapacitanceUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,7 +154,7 @@ private Capacitance(double numericValue, CapacitanceUnit unit) /// public CapacitanceUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -577,8 +577,6 @@ public double As(CapacitanceUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((CapacitanceUnit) unit); - /// /// Converts this Capacitance to another Capacitance with the unit representation . /// @@ -589,8 +587,6 @@ public Capacitance ToUnit(CapacitanceUnit unit) return new Capacitance(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((CapacitanceUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/CoefficientOfThermalExpansion.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/CoefficientOfThermalExpansion.WindowsRuntimeComponent.g.cs index 16295f1651..7ef4549592 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/CoefficientOfThermalExpansion.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/CoefficientOfThermalExpansion.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private CoefficientOfThermalExpansion(double numericValue, CoefficientOfThermalE #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private CoefficientOfThermalExpansion(double numericValue, CoefficientOfThermalE /// public CoefficientOfThermalExpansionUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -514,8 +514,6 @@ public double As(CoefficientOfThermalExpansionUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((CoefficientOfThermalExpansionUnit) unit); - /// /// Converts this CoefficientOfThermalExpansion to another CoefficientOfThermalExpansion with the unit representation . /// @@ -526,8 +524,6 @@ public CoefficientOfThermalExpansion ToUnit(CoefficientOfThermalExpansionUnit un return new CoefficientOfThermalExpansion(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((CoefficientOfThermalExpansionUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Density.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Density.WindowsRuntimeComponent.g.cs index 9c35985847..e1e622e111 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Density.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Density.WindowsRuntimeComponent.g.cs @@ -103,7 +103,7 @@ private Density(double numericValue, DensityUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,7 +154,7 @@ private Density(double numericValue, DensityUnit unit) /// public DensityUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -1057,8 +1057,6 @@ public double As(DensityUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((DensityUnit) unit); - /// /// Converts this Density to another Density with the unit representation . /// @@ -1069,8 +1067,6 @@ public Density ToUnit(DensityUnit unit) return new Density(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((DensityUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Duration.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Duration.WindowsRuntimeComponent.g.cs index 3d14c3b98b..87f827919d 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Duration.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Duration.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private Duration(double numericValue, DurationUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private Duration(double numericValue, DurationUnit unit) /// public DurationUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -619,8 +619,6 @@ public double As(DurationUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((DurationUnit) unit); - /// /// Converts this Duration to another Duration with the unit representation . /// @@ -631,8 +629,6 @@ public Duration ToUnit(DurationUnit unit) return new Duration(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((DurationUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/DynamicViscosity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/DynamicViscosity.WindowsRuntimeComponent.g.cs index fa8fb48c1f..378dbbe2e2 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/DynamicViscosity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/DynamicViscosity.WindowsRuntimeComponent.g.cs @@ -103,7 +103,7 @@ private DynamicViscosity(double numericValue, DynamicViscosityUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,7 +154,7 @@ private DynamicViscosity(double numericValue, DynamicViscosityUnit unit) /// public DynamicViscosityUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -562,8 +562,6 @@ public double As(DynamicViscosityUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((DynamicViscosityUnit) unit); - /// /// Converts this DynamicViscosity to another DynamicViscosity with the unit representation . /// @@ -574,8 +572,6 @@ public DynamicViscosity ToUnit(DynamicViscosityUnit unit) return new DynamicViscosity(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((DynamicViscosityUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricAdmittance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricAdmittance.WindowsRuntimeComponent.g.cs index 07e1695109..2b8cbdc709 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricAdmittance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricAdmittance.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private ElectricAdmittance(double numericValue, ElectricAdmittanceUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private ElectricAdmittance(double numericValue, ElectricAdmittanceUnit unit) /// public ElectricAdmittanceUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -529,8 +529,6 @@ public double As(ElectricAdmittanceUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((ElectricAdmittanceUnit) unit); - /// /// Converts this ElectricAdmittance to another ElectricAdmittance with the unit representation . /// @@ -541,8 +539,6 @@ public ElectricAdmittance ToUnit(ElectricAdmittanceUnit unit) return new ElectricAdmittance(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((ElectricAdmittanceUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCharge.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCharge.WindowsRuntimeComponent.g.cs index 487862833d..6957a73e37 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCharge.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCharge.WindowsRuntimeComponent.g.cs @@ -103,7 +103,7 @@ private ElectricCharge(double numericValue, ElectricChargeUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,7 +154,7 @@ private ElectricCharge(double numericValue, ElectricChargeUnit unit) /// public ElectricChargeUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -487,8 +487,6 @@ public double As(ElectricChargeUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((ElectricChargeUnit) unit); - /// /// Converts this ElectricCharge to another ElectricCharge with the unit representation . /// @@ -499,8 +497,6 @@ public ElectricCharge ToUnit(ElectricChargeUnit unit) return new ElectricCharge(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((ElectricChargeUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricChargeDensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricChargeDensity.WindowsRuntimeComponent.g.cs index ac29e394c0..883401f2b8 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricChargeDensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricChargeDensity.WindowsRuntimeComponent.g.cs @@ -103,7 +103,7 @@ private ElectricChargeDensity(double numericValue, ElectricChargeDensityUnit uni #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,7 +154,7 @@ private ElectricChargeDensity(double numericValue, ElectricChargeDensityUnit uni /// public ElectricChargeDensityUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -487,8 +487,6 @@ public double As(ElectricChargeDensityUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((ElectricChargeDensityUnit) unit); - /// /// Converts this ElectricChargeDensity to another ElectricChargeDensity with the unit representation . /// @@ -499,8 +497,6 @@ public ElectricChargeDensity ToUnit(ElectricChargeDensityUnit unit) return new ElectricChargeDensity(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((ElectricChargeDensityUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductance.WindowsRuntimeComponent.g.cs index f76539cf0b..6de7760d99 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductance.WindowsRuntimeComponent.g.cs @@ -103,7 +103,7 @@ private ElectricConductance(double numericValue, ElectricConductanceUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,7 +154,7 @@ private ElectricConductance(double numericValue, ElectricConductanceUnit unit) /// public ElectricConductanceUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -517,8 +517,6 @@ public double As(ElectricConductanceUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((ElectricConductanceUnit) unit); - /// /// Converts this ElectricConductance to another ElectricConductance with the unit representation . /// @@ -529,8 +527,6 @@ public ElectricConductance ToUnit(ElectricConductanceUnit unit) return new ElectricConductance(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((ElectricConductanceUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductivity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductivity.WindowsRuntimeComponent.g.cs index 017a4826ca..befd6576fd 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductivity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductivity.WindowsRuntimeComponent.g.cs @@ -103,7 +103,7 @@ private ElectricConductivity(double numericValue, ElectricConductivityUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,7 +154,7 @@ private ElectricConductivity(double numericValue, ElectricConductivityUnit unit) /// public ElectricConductivityUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -487,8 +487,6 @@ public double As(ElectricConductivityUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((ElectricConductivityUnit) unit); - /// /// Converts this ElectricConductivity to another ElectricConductivity with the unit representation . /// @@ -499,8 +497,6 @@ public ElectricConductivity ToUnit(ElectricConductivityUnit unit) return new ElectricConductivity(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((ElectricConductivityUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrent.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrent.WindowsRuntimeComponent.g.cs index 7035fc44c6..151ad1674f 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrent.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrent.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private ElectricCurrent(double numericValue, ElectricCurrentUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private ElectricCurrent(double numericValue, ElectricCurrentUnit unit) /// public ElectricCurrentUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -589,8 +589,6 @@ public double As(ElectricCurrentUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((ElectricCurrentUnit) unit); - /// /// Converts this ElectricCurrent to another ElectricCurrent with the unit representation . /// @@ -601,8 +599,6 @@ public ElectricCurrent ToUnit(ElectricCurrentUnit unit) return new ElectricCurrent(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((ElectricCurrentUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentDensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentDensity.WindowsRuntimeComponent.g.cs index 0c478d0d28..423790c102 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentDensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentDensity.WindowsRuntimeComponent.g.cs @@ -103,7 +103,7 @@ private ElectricCurrentDensity(double numericValue, ElectricCurrentDensityUnit u #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,7 +154,7 @@ private ElectricCurrentDensity(double numericValue, ElectricCurrentDensityUnit u /// public ElectricCurrentDensityUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -487,8 +487,6 @@ public double As(ElectricCurrentDensityUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((ElectricCurrentDensityUnit) unit); - /// /// Converts this ElectricCurrentDensity to another ElectricCurrentDensity with the unit representation . /// @@ -499,8 +497,6 @@ public ElectricCurrentDensity ToUnit(ElectricCurrentDensityUnit unit) return new ElectricCurrentDensity(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((ElectricCurrentDensityUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentGradient.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentGradient.WindowsRuntimeComponent.g.cs index 93fb9e9207..8d9876e9be 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentGradient.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentGradient.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private ElectricCurrentGradient(double numericValue, ElectricCurrentGradientUnit #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private ElectricCurrentGradient(double numericValue, ElectricCurrentGradientUnit /// public ElectricCurrentGradientUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -484,8 +484,6 @@ public double As(ElectricCurrentGradientUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((ElectricCurrentGradientUnit) unit); - /// /// Converts this ElectricCurrentGradient to another ElectricCurrentGradient with the unit representation . /// @@ -496,8 +494,6 @@ public ElectricCurrentGradient ToUnit(ElectricCurrentGradientUnit unit) return new ElectricCurrentGradient(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((ElectricCurrentGradientUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricField.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricField.WindowsRuntimeComponent.g.cs index d785a65f41..0a78639342 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricField.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricField.WindowsRuntimeComponent.g.cs @@ -103,7 +103,7 @@ private ElectricField(double numericValue, ElectricFieldUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,7 +154,7 @@ private ElectricField(double numericValue, ElectricFieldUnit unit) /// public ElectricFieldUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -487,8 +487,6 @@ public double As(ElectricFieldUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((ElectricFieldUnit) unit); - /// /// Converts this ElectricField to another ElectricField with the unit representation . /// @@ -499,8 +497,6 @@ public ElectricField ToUnit(ElectricFieldUnit unit) return new ElectricField(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((ElectricFieldUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricInductance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricInductance.WindowsRuntimeComponent.g.cs index a3139eb4c1..fe5646bb86 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricInductance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricInductance.WindowsRuntimeComponent.g.cs @@ -103,7 +103,7 @@ private ElectricInductance(double numericValue, ElectricInductanceUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,7 +154,7 @@ private ElectricInductance(double numericValue, ElectricInductanceUnit unit) /// public ElectricInductanceUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -532,8 +532,6 @@ public double As(ElectricInductanceUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((ElectricInductanceUnit) unit); - /// /// Converts this ElectricInductance to another ElectricInductance with the unit representation . /// @@ -544,8 +542,6 @@ public ElectricInductance ToUnit(ElectricInductanceUnit unit) return new ElectricInductance(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((ElectricInductanceUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotential.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotential.WindowsRuntimeComponent.g.cs index bbbd04a14b..6bc75989e7 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotential.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotential.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private ElectricPotential(double numericValue, ElectricPotentialUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private ElectricPotential(double numericValue, ElectricPotentialUnit unit) /// public ElectricPotentialUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -544,8 +544,6 @@ public double As(ElectricPotentialUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((ElectricPotentialUnit) unit); - /// /// Converts this ElectricPotential to another ElectricPotential with the unit representation . /// @@ -556,8 +554,6 @@ public ElectricPotential ToUnit(ElectricPotentialUnit unit) return new ElectricPotential(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((ElectricPotentialUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialAc.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialAc.WindowsRuntimeComponent.g.cs index 0cc5b4cfc6..aea1b4978c 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialAc.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialAc.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private ElectricPotentialAc(double numericValue, ElectricPotentialAcUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private ElectricPotentialAc(double numericValue, ElectricPotentialAcUnit unit) /// public ElectricPotentialAcUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -544,8 +544,6 @@ public double As(ElectricPotentialAcUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((ElectricPotentialAcUnit) unit); - /// /// Converts this ElectricPotentialAc to another ElectricPotentialAc with the unit representation . /// @@ -556,8 +554,6 @@ public ElectricPotentialAc ToUnit(ElectricPotentialAcUnit unit) return new ElectricPotentialAc(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((ElectricPotentialAcUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialDc.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialDc.WindowsRuntimeComponent.g.cs index e3b5cfc69a..f490bb66db 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialDc.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialDc.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private ElectricPotentialDc(double numericValue, ElectricPotentialDcUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private ElectricPotentialDc(double numericValue, ElectricPotentialDcUnit unit) /// public ElectricPotentialDcUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -544,8 +544,6 @@ public double As(ElectricPotentialDcUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((ElectricPotentialDcUnit) unit); - /// /// Converts this ElectricPotentialDc to another ElectricPotentialDc with the unit representation . /// @@ -556,8 +554,6 @@ public ElectricPotentialDc ToUnit(ElectricPotentialDcUnit unit) return new ElectricPotentialDc(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((ElectricPotentialDcUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistance.WindowsRuntimeComponent.g.cs index 1e9053c174..c3705345a8 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistance.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private ElectricResistance(double numericValue, ElectricResistanceUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private ElectricResistance(double numericValue, ElectricResistanceUnit unit) /// public ElectricResistanceUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -544,8 +544,6 @@ public double As(ElectricResistanceUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((ElectricResistanceUnit) unit); - /// /// Converts this ElectricResistance to another ElectricResistance with the unit representation . /// @@ -556,8 +554,6 @@ public ElectricResistance ToUnit(ElectricResistanceUnit unit) return new ElectricResistance(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((ElectricResistanceUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistivity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistivity.WindowsRuntimeComponent.g.cs index 50354e1930..ba6bfc4560 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistivity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistivity.WindowsRuntimeComponent.g.cs @@ -103,7 +103,7 @@ private ElectricResistivity(double numericValue, ElectricResistivityUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,7 +154,7 @@ private ElectricResistivity(double numericValue, ElectricResistivityUnit unit) /// public ElectricResistivityUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -682,8 +682,6 @@ public double As(ElectricResistivityUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((ElectricResistivityUnit) unit); - /// /// Converts this ElectricResistivity to another ElectricResistivity with the unit representation . /// @@ -694,8 +692,6 @@ public ElectricResistivity ToUnit(ElectricResistivityUnit unit) return new ElectricResistivity(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((ElectricResistivityUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Energy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Energy.WindowsRuntimeComponent.g.cs index c04f90848d..cc8d68a0a1 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Energy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Energy.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private Energy(double numericValue, EnergyUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private Energy(double numericValue, EnergyUnit unit) /// public EnergyUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -799,8 +799,6 @@ public double As(EnergyUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((EnergyUnit) unit); - /// /// Converts this Energy to another Energy with the unit representation . /// @@ -811,8 +809,6 @@ public Energy ToUnit(EnergyUnit unit) return new Energy(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((EnergyUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Entropy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Entropy.WindowsRuntimeComponent.g.cs index 0ac75d57ae..d18e9cc35e 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Entropy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Entropy.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private Entropy(double numericValue, EntropyUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private Entropy(double numericValue, EntropyUnit unit) /// public EntropyUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -574,8 +574,6 @@ public double As(EntropyUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((EntropyUnit) unit); - /// /// Converts this Entropy to another Entropy with the unit representation . /// @@ -586,8 +584,6 @@ public Entropy ToUnit(EntropyUnit unit) return new Entropy(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((EntropyUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Force.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Force.WindowsRuntimeComponent.g.cs index 2e8619bb83..2b3d10f691 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Force.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Force.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private Force(double numericValue, ForceUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private Force(double numericValue, ForceUnit unit) /// public ForceUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -664,8 +664,6 @@ public double As(ForceUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((ForceUnit) unit); - /// /// Converts this Force to another Force with the unit representation . /// @@ -676,8 +674,6 @@ public Force ToUnit(ForceUnit unit) return new Force(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((ForceUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForceChangeRate.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForceChangeRate.WindowsRuntimeComponent.g.cs index c7c403714e..0306557864 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForceChangeRate.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForceChangeRate.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private ForceChangeRate(double numericValue, ForceChangeRateUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private ForceChangeRate(double numericValue, ForceChangeRateUnit unit) /// public ForceChangeRateUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -634,8 +634,6 @@ public double As(ForceChangeRateUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((ForceChangeRateUnit) unit); - /// /// Converts this ForceChangeRate to another ForceChangeRate with the unit representation . /// @@ -646,8 +644,6 @@ public ForceChangeRate ToUnit(ForceChangeRateUnit unit) return new ForceChangeRate(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((ForceChangeRateUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForcePerLength.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForcePerLength.WindowsRuntimeComponent.g.cs index 95bdacd3c7..d39eb24002 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForcePerLength.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForcePerLength.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private ForcePerLength(double numericValue, ForcePerLengthUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private ForcePerLength(double numericValue, ForcePerLengthUnit unit) /// public ForcePerLengthUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -604,8 +604,6 @@ public double As(ForcePerLengthUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((ForcePerLengthUnit) unit); - /// /// Converts this ForcePerLength to another ForcePerLength with the unit representation . /// @@ -616,8 +614,6 @@ public ForcePerLength ToUnit(ForcePerLengthUnit unit) return new ForcePerLength(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((ForcePerLengthUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Frequency.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Frequency.WindowsRuntimeComponent.g.cs index 7377181a05..6efc55e701 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Frequency.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Frequency.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private Frequency(double numericValue, FrequencyUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private Frequency(double numericValue, FrequencyUnit unit) /// public FrequencyUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -589,8 +589,6 @@ public double As(FrequencyUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((FrequencyUnit) unit); - /// /// Converts this Frequency to another Frequency with the unit representation . /// @@ -601,8 +599,6 @@ public Frequency ToUnit(FrequencyUnit unit) return new Frequency(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((FrequencyUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatFlux.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatFlux.WindowsRuntimeComponent.g.cs index ae1fa61cf1..296fc66ce4 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatFlux.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatFlux.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private HeatFlux(double numericValue, HeatFluxUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private HeatFlux(double numericValue, HeatFluxUnit unit) /// public HeatFluxUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -739,8 +739,6 @@ public double As(HeatFluxUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((HeatFluxUnit) unit); - /// /// Converts this HeatFlux to another HeatFlux with the unit representation . /// @@ -751,8 +749,6 @@ public HeatFlux ToUnit(HeatFluxUnit unit) return new HeatFlux(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((HeatFluxUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatTransferCoefficient.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatTransferCoefficient.WindowsRuntimeComponent.g.cs index 803c2e5943..25048bfeac 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatTransferCoefficient.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatTransferCoefficient.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private HeatTransferCoefficient(double numericValue, HeatTransferCoefficientUnit #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private HeatTransferCoefficient(double numericValue, HeatTransferCoefficientUnit /// public HeatTransferCoefficientUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -499,8 +499,6 @@ public double As(HeatTransferCoefficientUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((HeatTransferCoefficientUnit) unit); - /// /// Converts this HeatTransferCoefficient to another HeatTransferCoefficient with the unit representation . /// @@ -511,8 +509,6 @@ public HeatTransferCoefficient ToUnit(HeatTransferCoefficientUnit unit) return new HeatTransferCoefficient(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((HeatTransferCoefficientUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Illuminance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Illuminance.WindowsRuntimeComponent.g.cs index 608a30e8cf..ae35568f4d 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Illuminance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Illuminance.WindowsRuntimeComponent.g.cs @@ -103,7 +103,7 @@ private Illuminance(double numericValue, IlluminanceUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,7 +154,7 @@ private Illuminance(double numericValue, IlluminanceUnit unit) /// public IlluminanceUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -532,8 +532,6 @@ public double As(IlluminanceUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((IlluminanceUnit) unit); - /// /// Converts this Illuminance to another Illuminance with the unit representation . /// @@ -544,8 +542,6 @@ public Illuminance ToUnit(IlluminanceUnit unit) return new Illuminance(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((IlluminanceUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Information.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Information.WindowsRuntimeComponent.g.cs index 564bf17f86..3ea537f05c 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Information.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Information.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private Information(decimal numericValue, InformationUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private Information(decimal numericValue, InformationUnit unit) /// public InformationUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -859,8 +859,6 @@ public double As(InformationUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((InformationUnit) unit); - /// /// Converts this Information to another Information with the unit representation . /// @@ -871,8 +869,6 @@ public Information ToUnit(InformationUnit unit) return new Information(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((InformationUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiance.WindowsRuntimeComponent.g.cs index df7be11a48..4dbb5dd4a6 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiance.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private Irradiance(double numericValue, IrradianceUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private Irradiance(double numericValue, IrradianceUnit unit) /// public IrradianceUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -679,8 +679,6 @@ public double As(IrradianceUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((IrradianceUnit) unit); - /// /// Converts this Irradiance to another Irradiance with the unit representation . /// @@ -691,8 +689,6 @@ public Irradiance ToUnit(IrradianceUnit unit) return new Irradiance(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((IrradianceUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiation.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiation.WindowsRuntimeComponent.g.cs index e831148790..f69dd7166b 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiation.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiation.WindowsRuntimeComponent.g.cs @@ -103,7 +103,7 @@ private Irradiation(double numericValue, IrradiationUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,7 +154,7 @@ private Irradiation(double numericValue, IrradiationUnit unit) /// public IrradiationUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -532,8 +532,6 @@ public double As(IrradiationUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((IrradiationUnit) unit); - /// /// Converts this Irradiation to another Irradiation with the unit representation . /// @@ -544,8 +542,6 @@ public Irradiation ToUnit(IrradiationUnit unit) return new Irradiation(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((IrradiationUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/KinematicViscosity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/KinematicViscosity.WindowsRuntimeComponent.g.cs index 3aecd9c9c2..bab18abaf1 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/KinematicViscosity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/KinematicViscosity.WindowsRuntimeComponent.g.cs @@ -103,7 +103,7 @@ private KinematicViscosity(double numericValue, KinematicViscosityUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,7 +154,7 @@ private KinematicViscosity(double numericValue, KinematicViscosityUnit unit) /// public KinematicViscosityUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -592,8 +592,6 @@ public double As(KinematicViscosityUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((KinematicViscosityUnit) unit); - /// /// Converts this KinematicViscosity to another KinematicViscosity with the unit representation . /// @@ -604,8 +602,6 @@ public KinematicViscosity ToUnit(KinematicViscosityUnit unit) return new KinematicViscosity(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((KinematicViscosityUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LapseRate.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LapseRate.WindowsRuntimeComponent.g.cs index ecd33d3e0b..6bd38bbb16 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LapseRate.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LapseRate.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private LapseRate(double numericValue, LapseRateUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private LapseRate(double numericValue, LapseRateUnit unit) /// public LapseRateUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -484,8 +484,6 @@ public double As(LapseRateUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((LapseRateUnit) unit); - /// /// Converts this LapseRate to another LapseRate with the unit representation . /// @@ -496,8 +494,6 @@ public LapseRate ToUnit(LapseRateUnit unit) return new LapseRate(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((LapseRateUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Length.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Length.WindowsRuntimeComponent.g.cs index 36565b5d2f..361b6ee4ad 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Length.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Length.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private Length(double numericValue, LengthUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private Length(double numericValue, LengthUnit unit) /// public LengthUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -799,8 +799,6 @@ public double As(LengthUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((LengthUnit) unit); - /// /// Converts this Length to another Length with the unit representation . /// @@ -811,8 +809,6 @@ public Length ToUnit(LengthUnit unit) return new Length(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((LengthUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Level.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Level.WindowsRuntimeComponent.g.cs index 5db319ea21..ffd70ccc5e 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Level.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Level.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private Level(double numericValue, LevelUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private Level(double numericValue, LevelUnit unit) /// public LevelUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -499,8 +499,6 @@ public double As(LevelUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((LevelUnit) unit); - /// /// Converts this Level to another Level with the unit representation . /// @@ -511,8 +509,6 @@ public Level ToUnit(LevelUnit unit) return new Level(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((LevelUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LinearDensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LinearDensity.WindowsRuntimeComponent.g.cs index 00e24a258d..f33f8d5378 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LinearDensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LinearDensity.WindowsRuntimeComponent.g.cs @@ -103,7 +103,7 @@ private LinearDensity(double numericValue, LinearDensityUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,7 +154,7 @@ private LinearDensity(double numericValue, LinearDensityUnit unit) /// public LinearDensityUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -517,8 +517,6 @@ public double As(LinearDensityUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((LinearDensityUnit) unit); - /// /// Converts this LinearDensity to another LinearDensity with the unit representation . /// @@ -529,8 +527,6 @@ public LinearDensity ToUnit(LinearDensityUnit unit) return new LinearDensity(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((LinearDensityUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousFlux.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousFlux.WindowsRuntimeComponent.g.cs index 47b29fd170..11cbc28acd 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousFlux.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousFlux.WindowsRuntimeComponent.g.cs @@ -103,7 +103,7 @@ private LuminousFlux(double numericValue, LuminousFluxUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,7 +154,7 @@ private LuminousFlux(double numericValue, LuminousFluxUnit unit) /// public LuminousFluxUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -487,8 +487,6 @@ public double As(LuminousFluxUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((LuminousFluxUnit) unit); - /// /// Converts this LuminousFlux to another LuminousFlux with the unit representation . /// @@ -499,8 +497,6 @@ public LuminousFlux ToUnit(LuminousFluxUnit unit) return new LuminousFlux(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((LuminousFluxUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousIntensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousIntensity.WindowsRuntimeComponent.g.cs index 19e61758ba..492db01a56 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousIntensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousIntensity.WindowsRuntimeComponent.g.cs @@ -103,7 +103,7 @@ private LuminousIntensity(double numericValue, LuminousIntensityUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,7 +154,7 @@ private LuminousIntensity(double numericValue, LuminousIntensityUnit unit) /// public LuminousIntensityUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -487,8 +487,6 @@ public double As(LuminousIntensityUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((LuminousIntensityUnit) unit); - /// /// Converts this LuminousIntensity to another LuminousIntensity with the unit representation . /// @@ -499,8 +497,6 @@ public LuminousIntensity ToUnit(LuminousIntensityUnit unit) return new LuminousIntensity(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((LuminousIntensityUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticField.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticField.WindowsRuntimeComponent.g.cs index 0db4367169..db29e5f0aa 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticField.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticField.WindowsRuntimeComponent.g.cs @@ -103,7 +103,7 @@ private MagneticField(double numericValue, MagneticFieldUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,7 +154,7 @@ private MagneticField(double numericValue, MagneticFieldUnit unit) /// public MagneticFieldUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -532,8 +532,6 @@ public double As(MagneticFieldUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((MagneticFieldUnit) unit); - /// /// Converts this MagneticField to another MagneticField with the unit representation . /// @@ -544,8 +542,6 @@ public MagneticField ToUnit(MagneticFieldUnit unit) return new MagneticField(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((MagneticFieldUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticFlux.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticFlux.WindowsRuntimeComponent.g.cs index 7fb7a3a601..c37e4235f5 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticFlux.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticFlux.WindowsRuntimeComponent.g.cs @@ -103,7 +103,7 @@ private MagneticFlux(double numericValue, MagneticFluxUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,7 +154,7 @@ private MagneticFlux(double numericValue, MagneticFluxUnit unit) /// public MagneticFluxUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -487,8 +487,6 @@ public double As(MagneticFluxUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((MagneticFluxUnit) unit); - /// /// Converts this MagneticFlux to another MagneticFlux with the unit representation . /// @@ -499,8 +497,6 @@ public MagneticFlux ToUnit(MagneticFluxUnit unit) return new MagneticFlux(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((MagneticFluxUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Magnetization.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Magnetization.WindowsRuntimeComponent.g.cs index ab949d7f49..5c392d8187 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Magnetization.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Magnetization.WindowsRuntimeComponent.g.cs @@ -103,7 +103,7 @@ private Magnetization(double numericValue, MagnetizationUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,7 +154,7 @@ private Magnetization(double numericValue, MagnetizationUnit unit) /// public MagnetizationUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -487,8 +487,6 @@ public double As(MagnetizationUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((MagnetizationUnit) unit); - /// /// Converts this Magnetization to another Magnetization with the unit representation . /// @@ -499,8 +497,6 @@ public Magnetization ToUnit(MagnetizationUnit unit) return new Magnetization(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((MagnetizationUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Mass.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Mass.WindowsRuntimeComponent.g.cs index 730355f3e4..6040027470 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Mass.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Mass.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private Mass(double numericValue, MassUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private Mass(double numericValue, MassUnit unit) /// public MassUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -814,8 +814,6 @@ public double As(MassUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((MassUnit) unit); - /// /// Converts this Mass to another Mass with the unit representation . /// @@ -826,8 +824,6 @@ public Mass ToUnit(MassUnit unit) return new Mass(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((MassUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlow.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlow.WindowsRuntimeComponent.g.cs index 7feb10d37c..1e4f8e7ed7 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlow.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlow.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private MassFlow(double numericValue, MassFlowUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private MassFlow(double numericValue, MassFlowUnit unit) /// public MassFlowUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -919,8 +919,6 @@ public double As(MassFlowUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((MassFlowUnit) unit); - /// /// Converts this MassFlow to another MassFlow with the unit representation . /// @@ -931,8 +929,6 @@ public MassFlow ToUnit(MassFlowUnit unit) return new MassFlow(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((MassFlowUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlux.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlux.WindowsRuntimeComponent.g.cs index 9532abdbe7..d4ac0e4e04 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlux.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlux.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private MassFlux(double numericValue, MassFluxUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private MassFlux(double numericValue, MassFluxUnit unit) /// public MassFluxUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -499,8 +499,6 @@ public double As(MassFluxUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((MassFluxUnit) unit); - /// /// Converts this MassFlux to another MassFlux with the unit representation . /// @@ -511,8 +509,6 @@ public MassFlux ToUnit(MassFluxUnit unit) return new MassFlux(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((MassFluxUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassMomentOfInertia.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassMomentOfInertia.WindowsRuntimeComponent.g.cs index 78129a04e2..21b635fac5 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassMomentOfInertia.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassMomentOfInertia.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private MassMomentOfInertia(double numericValue, MassMomentOfInertiaUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private MassMomentOfInertia(double numericValue, MassMomentOfInertiaUnit unit) /// public MassMomentOfInertiaUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -889,8 +889,6 @@ public double As(MassMomentOfInertiaUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((MassMomentOfInertiaUnit) unit); - /// /// Converts this MassMomentOfInertia to another MassMomentOfInertia with the unit representation . /// @@ -901,8 +899,6 @@ public MassMomentOfInertia ToUnit(MassMomentOfInertiaUnit unit) return new MassMomentOfInertia(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((MassMomentOfInertiaUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEnergy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEnergy.WindowsRuntimeComponent.g.cs index a05dcdf02f..c0de2f86ca 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEnergy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEnergy.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private MolarEnergy(double numericValue, MolarEnergyUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private MolarEnergy(double numericValue, MolarEnergyUnit unit) /// public MolarEnergyUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -514,8 +514,6 @@ public double As(MolarEnergyUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((MolarEnergyUnit) unit); - /// /// Converts this MolarEnergy to another MolarEnergy with the unit representation . /// @@ -526,8 +524,6 @@ public MolarEnergy ToUnit(MolarEnergyUnit unit) return new MolarEnergy(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((MolarEnergyUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEntropy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEntropy.WindowsRuntimeComponent.g.cs index f97b47f551..af272398d8 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEntropy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEntropy.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private MolarEntropy(double numericValue, MolarEntropyUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private MolarEntropy(double numericValue, MolarEntropyUnit unit) /// public MolarEntropyUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -514,8 +514,6 @@ public double As(MolarEntropyUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((MolarEntropyUnit) unit); - /// /// Converts this MolarEntropy to another MolarEntropy with the unit representation . /// @@ -526,8 +524,6 @@ public MolarEntropy ToUnit(MolarEntropyUnit unit) return new MolarEntropy(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((MolarEntropyUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarMass.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarMass.WindowsRuntimeComponent.g.cs index 8e08a60eb5..1a5cd2ed47 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarMass.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarMass.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private MolarMass(double numericValue, MolarMassUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private MolarMass(double numericValue, MolarMassUnit unit) /// public MolarMassUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -649,8 +649,6 @@ public double As(MolarMassUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((MolarMassUnit) unit); - /// /// Converts this MolarMass to another MolarMass with the unit representation . /// @@ -661,8 +659,6 @@ public MolarMass ToUnit(MolarMassUnit unit) return new MolarMass(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((MolarMassUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Molarity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Molarity.WindowsRuntimeComponent.g.cs index 38e586ac81..06c5aa63d1 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Molarity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Molarity.WindowsRuntimeComponent.g.cs @@ -103,7 +103,7 @@ private Molarity(double numericValue, MolarityUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,7 +154,7 @@ private Molarity(double numericValue, MolarityUnit unit) /// public MolarityUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -592,8 +592,6 @@ public double As(MolarityUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((MolarityUnit) unit); - /// /// Converts this Molarity to another Molarity with the unit representation . /// @@ -604,8 +602,6 @@ public Molarity ToUnit(MolarityUnit unit) return new Molarity(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((MolarityUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permeability.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permeability.WindowsRuntimeComponent.g.cs index 36be0cc9ea..7b5f34781a 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permeability.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permeability.WindowsRuntimeComponent.g.cs @@ -103,7 +103,7 @@ private Permeability(double numericValue, PermeabilityUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,7 +154,7 @@ private Permeability(double numericValue, PermeabilityUnit unit) /// public PermeabilityUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -487,8 +487,6 @@ public double As(PermeabilityUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((PermeabilityUnit) unit); - /// /// Converts this Permeability to another Permeability with the unit representation . /// @@ -499,8 +497,6 @@ public Permeability ToUnit(PermeabilityUnit unit) return new Permeability(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((PermeabilityUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permittivity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permittivity.WindowsRuntimeComponent.g.cs index fa5d3c8415..d4c013c797 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permittivity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permittivity.WindowsRuntimeComponent.g.cs @@ -103,7 +103,7 @@ private Permittivity(double numericValue, PermittivityUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,7 +154,7 @@ private Permittivity(double numericValue, PermittivityUnit unit) /// public PermittivityUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -487,8 +487,6 @@ public double As(PermittivityUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((PermittivityUnit) unit); - /// /// Converts this Permittivity to another Permittivity with the unit representation . /// @@ -499,8 +497,6 @@ public Permittivity ToUnit(PermittivityUnit unit) return new Permittivity(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((PermittivityUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Power.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Power.WindowsRuntimeComponent.g.cs index 17bfbe412d..20cbd7b6bf 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Power.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Power.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private Power(decimal numericValue, PowerUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private Power(decimal numericValue, PowerUnit unit) /// public PowerUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -769,8 +769,6 @@ public double As(PowerUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((PowerUnit) unit); - /// /// Converts this Power to another Power with the unit representation . /// @@ -781,8 +779,6 @@ public Power ToUnit(PowerUnit unit) return new Power(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((PowerUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerDensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerDensity.WindowsRuntimeComponent.g.cs index 469be5191a..41a7904aee 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerDensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerDensity.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private PowerDensity(double numericValue, PowerDensityUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private PowerDensity(double numericValue, PowerDensityUnit unit) /// public PowerDensityUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -1129,8 +1129,6 @@ public double As(PowerDensityUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((PowerDensityUnit) unit); - /// /// Converts this PowerDensity to another PowerDensity with the unit representation . /// @@ -1141,8 +1139,6 @@ public PowerDensity ToUnit(PowerDensityUnit unit) return new PowerDensity(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((PowerDensityUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerRatio.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerRatio.WindowsRuntimeComponent.g.cs index af372f426b..3b7518fe5d 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerRatio.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerRatio.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private PowerRatio(double numericValue, PowerRatioUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private PowerRatio(double numericValue, PowerRatioUnit unit) /// public PowerRatioUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -499,8 +499,6 @@ public double As(PowerRatioUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((PowerRatioUnit) unit); - /// /// Converts this PowerRatio to another PowerRatio with the unit representation . /// @@ -511,8 +509,6 @@ public PowerRatio ToUnit(PowerRatioUnit unit) return new PowerRatio(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((PowerRatioUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Pressure.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Pressure.WindowsRuntimeComponent.g.cs index 5055250a60..dacb74676d 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Pressure.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Pressure.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private Pressure(double numericValue, PressureUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private Pressure(double numericValue, PressureUnit unit) /// public PressureUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -1099,8 +1099,6 @@ public double As(PressureUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((PressureUnit) unit); - /// /// Converts this Pressure to another Pressure with the unit representation . /// @@ -1111,8 +1109,6 @@ public Pressure ToUnit(PressureUnit unit) return new Pressure(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((PressureUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PressureChangeRate.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PressureChangeRate.WindowsRuntimeComponent.g.cs index 97c300b6ad..760668824a 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PressureChangeRate.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PressureChangeRate.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private PressureChangeRate(double numericValue, PressureChangeRateUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private PressureChangeRate(double numericValue, PressureChangeRateUnit unit) /// public PressureChangeRateUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -574,8 +574,6 @@ public double As(PressureChangeRateUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((PressureChangeRateUnit) unit); - /// /// Converts this PressureChangeRate to another PressureChangeRate with the unit representation . /// @@ -586,8 +584,6 @@ public PressureChangeRate ToUnit(PressureChangeRateUnit unit) return new PressureChangeRate(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((PressureChangeRateUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Ratio.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Ratio.WindowsRuntimeComponent.g.cs index 133f55e7fe..465e41420a 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Ratio.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Ratio.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private Ratio(double numericValue, RatioUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private Ratio(double numericValue, RatioUnit unit) /// public RatioUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -559,8 +559,6 @@ public double As(RatioUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((RatioUnit) unit); - /// /// Converts this Ratio to another Ratio with the unit representation . /// @@ -571,8 +569,6 @@ public Ratio ToUnit(RatioUnit unit) return new Ratio(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((RatioUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactiveEnergy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactiveEnergy.WindowsRuntimeComponent.g.cs index 16bbc66a05..2fe9c333b0 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactiveEnergy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactiveEnergy.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private ReactiveEnergy(double numericValue, ReactiveEnergyUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private ReactiveEnergy(double numericValue, ReactiveEnergyUnit unit) /// public ReactiveEnergyUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -514,8 +514,6 @@ public double As(ReactiveEnergyUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((ReactiveEnergyUnit) unit); - /// /// Converts this ReactiveEnergy to another ReactiveEnergy with the unit representation . /// @@ -526,8 +524,6 @@ public ReactiveEnergy ToUnit(ReactiveEnergyUnit unit) return new ReactiveEnergy(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((ReactiveEnergyUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactivePower.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactivePower.WindowsRuntimeComponent.g.cs index 8a7e4e713c..0142267097 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactivePower.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactivePower.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private ReactivePower(double numericValue, ReactivePowerUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private ReactivePower(double numericValue, ReactivePowerUnit unit) /// public ReactivePowerUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -529,8 +529,6 @@ public double As(ReactivePowerUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((ReactivePowerUnit) unit); - /// /// Converts this ReactivePower to another ReactivePower with the unit representation . /// @@ -541,8 +539,6 @@ public ReactivePower ToUnit(ReactivePowerUnit unit) return new ReactivePower(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((ReactivePowerUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalAcceleration.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalAcceleration.WindowsRuntimeComponent.g.cs index f3dd425743..a41e08f011 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalAcceleration.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalAcceleration.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private RotationalAcceleration(double numericValue, RotationalAccelerationUnit u #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private RotationalAcceleration(double numericValue, RotationalAccelerationUnit u /// public RotationalAccelerationUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -514,8 +514,6 @@ public double As(RotationalAccelerationUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((RotationalAccelerationUnit) unit); - /// /// Converts this RotationalAcceleration to another RotationalAcceleration with the unit representation . /// @@ -526,8 +524,6 @@ public RotationalAcceleration ToUnit(RotationalAccelerationUnit unit) return new RotationalAcceleration(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((RotationalAccelerationUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalSpeed.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalSpeed.WindowsRuntimeComponent.g.cs index 2f013902e2..c09f299289 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalSpeed.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalSpeed.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private RotationalSpeed(double numericValue, RotationalSpeedUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private RotationalSpeed(double numericValue, RotationalSpeedUnit unit) /// public RotationalSpeedUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -664,8 +664,6 @@ public double As(RotationalSpeedUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((RotationalSpeedUnit) unit); - /// /// Converts this RotationalSpeed to another RotationalSpeed with the unit representation . /// @@ -676,8 +674,6 @@ public RotationalSpeed ToUnit(RotationalSpeedUnit unit) return new RotationalSpeed(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((RotationalSpeedUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffness.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffness.WindowsRuntimeComponent.g.cs index 94ebd4c87c..1fb598ad57 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffness.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffness.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private RotationalStiffness(double numericValue, RotationalStiffnessUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private RotationalStiffness(double numericValue, RotationalStiffnessUnit unit) /// public RotationalStiffnessUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -514,8 +514,6 @@ public double As(RotationalStiffnessUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((RotationalStiffnessUnit) unit); - /// /// Converts this RotationalStiffness to another RotationalStiffness with the unit representation . /// @@ -526,8 +524,6 @@ public RotationalStiffness ToUnit(RotationalStiffnessUnit unit) return new RotationalStiffness(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((RotationalStiffnessUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffnessPerLength.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffnessPerLength.WindowsRuntimeComponent.g.cs index 8de78cf8b9..2ecce5060e 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffnessPerLength.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffnessPerLength.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private RotationalStiffnessPerLength(double numericValue, RotationalStiffnessPer #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private RotationalStiffnessPerLength(double numericValue, RotationalStiffnessPer /// public RotationalStiffnessPerLengthUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -514,8 +514,6 @@ public double As(RotationalStiffnessPerLengthUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((RotationalStiffnessPerLengthUnit) unit); - /// /// Converts this RotationalStiffnessPerLength to another RotationalStiffnessPerLength with the unit representation . /// @@ -526,8 +524,6 @@ public RotationalStiffnessPerLength ToUnit(RotationalStiffnessPerLengthUnit unit return new RotationalStiffnessPerLength(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((RotationalStiffnessPerLengthUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SolidAngle.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SolidAngle.WindowsRuntimeComponent.g.cs index d1d63c44dd..b12d58e0ce 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SolidAngle.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SolidAngle.WindowsRuntimeComponent.g.cs @@ -103,7 +103,7 @@ private SolidAngle(double numericValue, SolidAngleUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,7 +154,7 @@ private SolidAngle(double numericValue, SolidAngleUnit unit) /// public SolidAngleUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -487,8 +487,6 @@ public double As(SolidAngleUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((SolidAngleUnit) unit); - /// /// Converts this SolidAngle to another SolidAngle with the unit representation . /// @@ -499,8 +497,6 @@ public SolidAngle ToUnit(SolidAngleUnit unit) return new SolidAngle(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((SolidAngleUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEnergy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEnergy.WindowsRuntimeComponent.g.cs index afb8107df8..2023cfc29a 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEnergy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEnergy.WindowsRuntimeComponent.g.cs @@ -103,7 +103,7 @@ private SpecificEnergy(double numericValue, SpecificEnergyUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,7 +154,7 @@ private SpecificEnergy(double numericValue, SpecificEnergyUnit unit) /// public SpecificEnergyUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -607,8 +607,6 @@ public double As(SpecificEnergyUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((SpecificEnergyUnit) unit); - /// /// Converts this SpecificEnergy to another SpecificEnergy with the unit representation . /// @@ -619,8 +617,6 @@ public SpecificEnergy ToUnit(SpecificEnergyUnit unit) return new SpecificEnergy(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((SpecificEnergyUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEntropy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEntropy.WindowsRuntimeComponent.g.cs index 845dd910a3..6c995f02df 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEntropy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEntropy.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private SpecificEntropy(double numericValue, SpecificEntropyUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private SpecificEntropy(double numericValue, SpecificEntropyUnit unit) /// public SpecificEntropyUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -589,8 +589,6 @@ public double As(SpecificEntropyUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((SpecificEntropyUnit) unit); - /// /// Converts this SpecificEntropy to another SpecificEntropy with the unit representation . /// @@ -601,8 +599,6 @@ public SpecificEntropy ToUnit(SpecificEntropyUnit unit) return new SpecificEntropy(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((SpecificEntropyUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificVolume.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificVolume.WindowsRuntimeComponent.g.cs index 8aa23ae595..50b8424057 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificVolume.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificVolume.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private SpecificVolume(double numericValue, SpecificVolumeUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private SpecificVolume(double numericValue, SpecificVolumeUnit unit) /// public SpecificVolumeUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -514,8 +514,6 @@ public double As(SpecificVolumeUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((SpecificVolumeUnit) unit); - /// /// Converts this SpecificVolume to another SpecificVolume with the unit representation . /// @@ -526,8 +524,6 @@ public SpecificVolume ToUnit(SpecificVolumeUnit unit) return new SpecificVolume(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((SpecificVolumeUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificWeight.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificWeight.WindowsRuntimeComponent.g.cs index 6145a9a8b9..8f87d63ddd 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificWeight.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificWeight.WindowsRuntimeComponent.g.cs @@ -103,7 +103,7 @@ private SpecificWeight(double numericValue, SpecificWeightUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,7 +154,7 @@ private SpecificWeight(double numericValue, SpecificWeightUnit unit) /// public SpecificWeightUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -727,8 +727,6 @@ public double As(SpecificWeightUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((SpecificWeightUnit) unit); - /// /// Converts this SpecificWeight to another SpecificWeight with the unit representation . /// @@ -739,8 +737,6 @@ public SpecificWeight ToUnit(SpecificWeightUnit unit) return new SpecificWeight(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((SpecificWeightUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Speed.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Speed.WindowsRuntimeComponent.g.cs index 9d3c70aa14..0ba5028d2f 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Speed.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Speed.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private Speed(double numericValue, SpeedUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private Speed(double numericValue, SpeedUnit unit) /// public SpeedUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -949,8 +949,6 @@ public double As(SpeedUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((SpeedUnit) unit); - /// /// Converts this Speed to another Speed with the unit representation . /// @@ -961,8 +959,6 @@ public Speed ToUnit(SpeedUnit unit) return new Speed(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((SpeedUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Temperature.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Temperature.WindowsRuntimeComponent.g.cs index 225613546f..1fdf8935af 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Temperature.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Temperature.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private Temperature(double numericValue, TemperatureUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private Temperature(double numericValue, TemperatureUnit unit) /// public TemperatureUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -589,8 +589,6 @@ public double As(TemperatureUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((TemperatureUnit) unit); - /// /// Converts this Temperature to another Temperature with the unit representation . /// @@ -601,8 +599,6 @@ public Temperature ToUnit(TemperatureUnit unit) return new Temperature(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((TemperatureUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureChangeRate.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureChangeRate.WindowsRuntimeComponent.g.cs index 33df31d8f0..a15b40fa0d 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureChangeRate.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureChangeRate.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private TemperatureChangeRate(double numericValue, TemperatureChangeRateUnit uni #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private TemperatureChangeRate(double numericValue, TemperatureChangeRateUnit uni /// public TemperatureChangeRateUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -619,8 +619,6 @@ public double As(TemperatureChangeRateUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((TemperatureChangeRateUnit) unit); - /// /// Converts this TemperatureChangeRate to another TemperatureChangeRate with the unit representation . /// @@ -631,8 +629,6 @@ public TemperatureChangeRate ToUnit(TemperatureChangeRateUnit unit) return new TemperatureChangeRate(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((TemperatureChangeRateUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureDelta.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureDelta.WindowsRuntimeComponent.g.cs index 0d996522c4..d2e9b6b030 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureDelta.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureDelta.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private TemperatureDelta(double numericValue, TemperatureDeltaUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private TemperatureDelta(double numericValue, TemperatureDeltaUnit unit) /// public TemperatureDeltaUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -589,8 +589,6 @@ public double As(TemperatureDeltaUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((TemperatureDeltaUnit) unit); - /// /// Converts this TemperatureDelta to another TemperatureDelta with the unit representation . /// @@ -601,8 +599,6 @@ public TemperatureDelta ToUnit(TemperatureDeltaUnit unit) return new TemperatureDelta(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((TemperatureDeltaUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalConductivity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalConductivity.WindowsRuntimeComponent.g.cs index 02c35658ba..57a708ab3a 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalConductivity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalConductivity.WindowsRuntimeComponent.g.cs @@ -103,7 +103,7 @@ private ThermalConductivity(double numericValue, ThermalConductivityUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,7 +154,7 @@ private ThermalConductivity(double numericValue, ThermalConductivityUnit unit) /// public ThermalConductivityUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -502,8 +502,6 @@ public double As(ThermalConductivityUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((ThermalConductivityUnit) unit); - /// /// Converts this ThermalConductivity to another ThermalConductivity with the unit representation . /// @@ -514,8 +512,6 @@ public ThermalConductivity ToUnit(ThermalConductivityUnit unit) return new ThermalConductivity(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((ThermalConductivityUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalResistance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalResistance.WindowsRuntimeComponent.g.cs index 78f9dad32f..bd9561abff 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalResistance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalResistance.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private ThermalResistance(double numericValue, ThermalResistanceUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private ThermalResistance(double numericValue, ThermalResistanceUnit unit) /// public ThermalResistanceUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -544,8 +544,6 @@ public double As(ThermalResistanceUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((ThermalResistanceUnit) unit); - /// /// Converts this ThermalResistance to another ThermalResistance with the unit representation . /// @@ -556,8 +554,6 @@ public ThermalResistance ToUnit(ThermalResistanceUnit unit) return new ThermalResistance(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((ThermalResistanceUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Torque.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Torque.WindowsRuntimeComponent.g.cs index b8cb53e782..fdbd92906e 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Torque.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Torque.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private Torque(double numericValue, TorqueUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private Torque(double numericValue, TorqueUnit unit) /// public TorqueUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -784,8 +784,6 @@ public double As(TorqueUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((TorqueUnit) unit); - /// /// Converts this Torque to another Torque with the unit representation . /// @@ -796,8 +794,6 @@ public Torque ToUnit(TorqueUnit unit) return new Torque(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((TorqueUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VitaminA.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VitaminA.WindowsRuntimeComponent.g.cs index defbba19ad..51d0f5ab57 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VitaminA.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VitaminA.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private VitaminA(double numericValue, VitaminAUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private VitaminA(double numericValue, VitaminAUnit unit) /// public VitaminAUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -484,8 +484,6 @@ public double As(VitaminAUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((VitaminAUnit) unit); - /// /// Converts this VitaminA to another VitaminA with the unit representation . /// @@ -496,8 +494,6 @@ public VitaminA ToUnit(VitaminAUnit unit) return new VitaminA(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((VitaminAUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Volume.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Volume.WindowsRuntimeComponent.g.cs index 325c19bf1a..a12d6b639d 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Volume.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Volume.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private Volume(double numericValue, VolumeUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private Volume(double numericValue, VolumeUnit unit) /// public VolumeUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -1144,8 +1144,6 @@ public double As(VolumeUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((VolumeUnit) unit); - /// /// Converts this Volume to another Volume with the unit representation . /// @@ -1156,8 +1154,6 @@ public Volume ToUnit(VolumeUnit unit) return new Volume(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((VolumeUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VolumeFlow.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VolumeFlow.WindowsRuntimeComponent.g.cs index 7b51e20ee2..164ec35964 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VolumeFlow.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VolumeFlow.WindowsRuntimeComponent.g.cs @@ -100,7 +100,7 @@ private VolumeFlow(double numericValue, VolumeFlowUnit unit) #region Static Properties /// - public static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,7 +151,7 @@ private VolumeFlow(double numericValue, VolumeFlowUnit unit) /// public VolumeFlowUnit Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -1189,8 +1189,6 @@ public double As(VolumeFlowUnit unit) return Convert.ToDouble(converted); } - public double As(Enum unit) => As((VolumeFlowUnit) unit); - /// /// Converts this VolumeFlow to another VolumeFlow with the unit representation . /// @@ -1201,8 +1199,6 @@ public VolumeFlow ToUnit(VolumeFlowUnit unit) return new VolumeFlow(convertedValue, unit); } - public IQuantity ToUnit(Enum unit) => ToUnit((VolumeFlowUnit) unit); - /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/GeneratedCode/Quantity.g.cs b/UnitsNet/GeneratedCode/Quantity.g.cs index df37ffac1f..6281ee632d 100644 --- a/UnitsNet/GeneratedCode/Quantity.g.cs +++ b/UnitsNet/GeneratedCode/Quantity.g.cs @@ -39,6 +39,14 @@ using System.Linq; using UnitsNet.Units; +#if WINDOWS_UWP +using Culture = System.String; +using FromValue = System.Double; +#else +using Culture = System.IFormatProvider; +using FromValue = UnitsNet.QuantityValue; +#endif + namespace UnitsNet { /// @@ -53,7 +61,7 @@ public static partial class Quantity /// Unit enum value. /// An object. /// Unit value is not a know unit enum type. - public static IQuantity From(QuantityValue value, Enum unit) + public static IQuantity From(FromValue value, Enum unit) { if (TryFrom(value, unit, out IQuantity quantity)) return quantity; @@ -69,7 +77,7 @@ public static IQuantity From(QuantityValue value, Enum unit) /// Unit enum value. /// The resulting quantity if successful, otherwise default. /// True if successful with assigned the value, otherwise false. - public static bool TryFrom(QuantityValue value, Enum unit, out IQuantity quantity) + public static bool TryFrom(FromValue value, Enum unit, out IQuantity quantity) { switch (unit) { diff --git a/UnitsNet/IQuantity.cs b/UnitsNet/IQuantity.cs index c96b5e2680..d9311bdd56 100644 --- a/UnitsNet/IQuantity.cs +++ b/UnitsNet/IQuantity.cs @@ -44,6 +44,7 @@ public partial interface IQuantity /// Information about the quantity type, such as unit values and names. /// QuantityInfo QuantityInfo { get; } +#if !WINDOWS_UWP /// /// Dynamically convert to another unit representation. @@ -59,6 +60,7 @@ public partial interface IQuantity /// The unit enum value. The unit must be compatible, so for you should provide a value. /// A new quantity with the given unit as default unit representation. IQuantity ToUnit(Enum unit); +#endif } #if !WINDOWS_UWP @@ -121,9 +123,12 @@ public partial interface IQuantity #endif -#if !WINDOWS_UWP - - public interface IQuantity : IQuantity where TUnitType : Enum +#if WINDOWS_UWP + internal +#else + public +#endif + interface IQuantity : IQuantity where TUnitType : Enum { /// /// Convert to the unit representation . @@ -146,6 +151,4 @@ public interface IQuantity : IQuantity where TUnitType : Enum /// IQuantity ToUnit(TUnitType unit); } - -#endif } diff --git a/UnitsNet/QuantityInfo.cs b/UnitsNet/QuantityInfo.cs index abe264b75d..73bbc225cf 100644 --- a/UnitsNet/QuantityInfo.cs +++ b/UnitsNet/QuantityInfo.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). +// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). // https://github.com/angularsen/UnitsNet // // Permission is hereby granted, free of charge, to any person obtaining a copy @@ -35,7 +35,12 @@ namespace UnitsNet /// /// Typically you obtain this by looking it up via . /// - public class QuantityInfo +#if WINDOWS_UWP + public +#else + public +#endif + class QuantityInfo { public QuantityInfo(QuantityType quantityType, [NotNull] Enum[] units, [NotNull] IQuantity zero) { @@ -94,7 +99,12 @@ public QuantityInfo(QuantityType quantityType, [NotNull] Enum[] units, [NotNull] /// , or dynamically via . /// /// The unit enum type, such as . - public class QuantityInfo : QuantityInfo +#if WINDOWS_UWP + internal +#else + public +#endif + class QuantityInfo : QuantityInfo where TUnit : Enum { public QuantityInfo(QuantityType quantityType, TUnit[] units, IQuantity zero) diff --git a/UnitsNet/Scripts/Include-GenerateQuantitySourceCode.ps1 b/UnitsNet/Scripts/Include-GenerateQuantitySourceCode.ps1 index 03a0c96db0..f5b4b04bec 100644 --- a/UnitsNet/Scripts/Include-GenerateQuantitySourceCode.ps1 +++ b/UnitsNet/Scripts/Include-GenerateQuantitySourceCode.ps1 @@ -19,6 +19,7 @@ function GenerateQuantitySourceCode([Quantity]$quantity, [string]$target) $unitEnumName = "$quantityName" + "Unit" $wrc = $target -eq "WindowsRuntimeComponent" $privateAccessModifierIfWrc = if ($wrc) { "private" } else { "public" } + $accessModifier = if ($wrc) { "internal" } else { "public" } $baseDimensions = $quantity.BaseDimensions; $isDimensionless = $baseDimensions -eq $null -or ( $baseDimensions.Length -eq 0 -and $baseDimensions.Mass -eq 0 -and $baseDimensions.Time -eq 0 -and $baseDimensions.ElectricCurrent -eq 0 -and $baseDimensions.Temperature -eq 0 -and $baseDimensions.AmountOfSubstance -eq 0 -and $baseDimensions.LuminousIntensity -eq 0 ) @@ -273,7 +274,7 @@ function GenerateStaticProperties([GeneratorArgs]$genArgs) #region Static Properties /// - public static QuantityInfo<$unitEnumName> Info { get; } + $accessModifier static QuantityInfo<$unitEnumName> Info { get; } /// /// The of this quantity. @@ -341,7 +342,7 @@ function GenerateProperties([GeneratorArgs]$genArgs) /// public $unitEnumName Unit => _unit.GetValueOrDefault(BaseUnit); - public QuantityInfo<$unitEnumName> QuantityInfo => Info; + $accessModifier QuantityInfo<$unitEnumName> QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; @@ -839,8 +840,6 @@ function GenerateEqualityAndComparison([GeneratorArgs]$genArgs) return CompareTo(obj$quantityName); } -"@; # Windows Runtime Component does not support overloads with same number of parameters -$accessModifier = if ($wrc) { "internal" } else { "public" } @" // Windows Runtime Component does not allow public methods/ctors with same number of parameters: https://msdn.microsoft.com/en-us/library/br230301.aspx#Overloaded methods $accessModifier int CompareTo($quantityName other) { @@ -950,8 +949,10 @@ function GenerateConversionMethods([GeneratorArgs]$genArgs) return Convert.ToDouble(converted); } +"@; if (-not $wrc) {@" public double As(Enum unit) => As(($unitEnumName) unit); +"@; }@" /// /// Converts this $quantityName to another $quantityName with the unit representation . /// @@ -965,9 +966,9 @@ function GenerateConversionMethods([GeneratorArgs]$genArgs) "@; if (-not $wrc) {@" IQuantity<$unitEnumName> IQuantity<$unitEnumName>.ToUnit($unitEnumName unit) => ToUnit(unit); -"@; }@" public IQuantity ToUnit(Enum unit) => ToUnit(($unitEnumName) unit); +"@; }@" /// /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. diff --git a/UnitsNet/Scripts/Include-GenerateStaticQuantitySourceCode.ps1 b/UnitsNet/Scripts/Include-GenerateStaticQuantitySourceCode.ps1 index ae3a27cd1c..a3e7472135 100644 --- a/UnitsNet/Scripts/Include-GenerateStaticQuantitySourceCode.ps1 +++ b/UnitsNet/Scripts/Include-GenerateStaticQuantitySourceCode.ps1 @@ -44,6 +44,14 @@ using System; using System.Linq; using UnitsNet.Units; +#if WINDOWS_UWP +using Culture = System.String; +using FromValue = System.Double; +#else +using Culture = System.IFormatProvider; +using FromValue = UnitsNet.QuantityValue; +#endif + namespace UnitsNet { /// @@ -58,7 +66,7 @@ namespace UnitsNet /// Unit enum value. /// An object. /// Unit value is not a know unit enum type. - public static IQuantity From(QuantityValue value, Enum unit) + public static IQuantity From(FromValue value, Enum unit) { if (TryFrom(value, unit, out IQuantity quantity)) return quantity; @@ -74,7 +82,7 @@ namespace UnitsNet /// Unit enum value. /// The resulting quantity if successful, otherwise default. /// True if successful with assigned the value, otherwise false. - public static bool TryFrom(QuantityValue value, Enum unit, out IQuantity quantity) + public static bool TryFrom(FromValue value, Enum unit, out IQuantity quantity) { switch (unit) { diff --git a/UnitsNet/UnitConverter.cs b/UnitsNet/UnitConverter.cs index f90ee3ce0c..0393def02e 100644 --- a/UnitsNet/UnitConverter.cs +++ b/UnitsNet/UnitConverter.cs @@ -25,13 +25,13 @@ using System.Reflection; using UnitsNet.InternalHelpers; using UnitsNet.Units; + #if WINDOWS_UWP using Culture = System.String; using FromValue = System.Double; #else using Culture = System.IFormatProvider; using FromValue = UnitsNet.QuantityValue; - #endif namespace UnitsNet @@ -60,14 +60,14 @@ public static class UnitConverter /// From unit enum value. /// To unit enum value, must be compatible with . /// The converted value in the new unit representation. - public static double Convert(QuantityValue fromValue, Enum fromUnitValue, Enum toUnitValue) + public static double Convert(FromValue fromValue, Enum fromUnitValue, Enum toUnitValue) { return Quantity .From(fromValue, fromUnitValue) .As(toUnitValue); } - public static bool TryConvert(QuantityValue fromValue, Enum fromUnitValue, Enum toUnitValue, out double convertedValue) + public static bool TryConvert(FromValue fromValue, Enum fromUnitValue, Enum toUnitValue, out double convertedValue) { convertedValue = 0; if (!Quantity.TryFrom(fromValue, fromUnitValue, out IQuantity from)) return false; From 6eced4b802d0edd19e0f7e1df3d24f3af5288fa2 Mon Sep 17 00:00:00 2001 From: Andreas Gullberg Larsen Date: Mon, 28 Jan 2019 21:43:58 +0100 Subject: [PATCH 23/36] Fix remaining test cases --- UnitsNet.Tests/QuantityTest.cs | 135 ++++++++++++++--- UnitsNet/CustomCode/Quantity.cs | 59 +------- UnitsNet/GeneratedCode/Quantity.g.cs | 209 +++++++++++++++------------ UnitsNet/QuantityInfo.cs | 11 +- 4 files changed, 246 insertions(+), 168 deletions(-) diff --git a/UnitsNet.Tests/QuantityTest.cs b/UnitsNet.Tests/QuantityTest.cs index d79c9d260a..d5593f93ad 100644 --- a/UnitsNet.Tests/QuantityTest.cs +++ b/UnitsNet.Tests/QuantityTest.cs @@ -20,6 +20,7 @@ // THE SOFTWARE. using System; +using System.Globalization; using System.Linq; using UnitsNet.Units; using Xunit; @@ -28,39 +29,98 @@ namespace UnitsNet.Tests { public class QuantityTest { + // Exclude Undefined value + private static readonly int QuantityCount = Enum.GetValues(typeof(QuantityType)).Length - 1; + + [Theory] + [InlineData(double.NaN)] + [InlineData(double.PositiveInfinity)] + [InlineData(double.NegativeInfinity)] + public void From_GivenNaNOrInfinity_ThrowsArgumentException(double value) + { + Assert.Throws(() => Quantity.From(value, LengthUnit.Centimeter)); + } + [Theory] - [InlineData(QuantityType.Length, typeof(LengthUnit))] - [InlineData(QuantityType.Mass, typeof(MassUnit))] - [InlineData(QuantityType.Force, typeof(ForceUnit))] - public void GetUnitType_ReturnsUnitTypeMatchingGivenQuantity(QuantityType quantityType, Type expectedUnitEnumType) + [InlineData(double.NaN)] + [InlineData(double.PositiveInfinity)] + [InlineData(double.NegativeInfinity)] + public void TryFrom_GivenNaNOrInfinity_ReturnsFalseAndNullQuantity(double value) { - Assert.Equal(expectedUnitEnumType, Quantity.GetUnitType(quantityType)); + Assert.False(Quantity.TryFrom(value, LengthUnit.Centimeter, out IQuantity parsedLength)); + Assert.Null(parsedLength); } [Fact] - public void GetUnitEnumValuesForQuantity_ReturnsKnownValues() + public void From_GivenValueAndUnit_ReturnsQuantity() + { + Assert.Equal(Length.FromCentimeters(3), Quantity.From(3, LengthUnit.Centimeter)); + Assert.Equal(Mass.FromTonnes(3), Quantity.From(3, MassUnit.Tonne)); + Assert.Equal(Pressure.FromMegabars(3), Quantity.From(3, PressureUnit.Megabar)); + } + + [Fact] + public void GetInfo_GivenLength_ReturnsQuantityInfoForLength() { var knownLengthUnits = new Enum[] {LengthUnit.Meter, LengthUnit.Centimeter, LengthUnit.Kilometer}; - var knownMassUnits = new Enum[] {MassUnit.Kilogram, MassUnit.Gram, MassUnit.Tonne}; + var knownLengthUnitNames = new[] {"Meter", "Centimeter", "Kilometer"}; + var lengthUnitCount = Enum.GetValues(typeof(LengthUnit)).Length - 1; // Exclude LengthUnit.Undefined - var lengthUnits = Quantity.GetUnitEnumValuesForQuantity(QuantityType.Length); - var massUnits = Quantity.GetUnitEnumValuesForQuantity(QuantityType.Mass); + QuantityInfo quantityInfo = Quantity.GetInfo(QuantityType.Length); - Assert.Superset(knownLengthUnits.ToHashSet(), lengthUnits.ToHashSet()); - Assert.Superset(knownMassUnits.ToHashSet(), massUnits.ToHashSet()); + Assert.Equal("Length", quantityInfo.Name); + Assert.Equal(QuantityType.Length, quantityInfo.QuantityType); + Assert.Superset(knownLengthUnitNames.ToHashSet(), quantityInfo.UnitNames.ToHashSet()); + Assert.Superset(knownLengthUnits.ToHashSet(), quantityInfo.Units.ToHashSet()); + Assert.Equal(lengthUnitCount, quantityInfo.UnitNames.Length); + Assert.Equal(lengthUnitCount, quantityInfo.Units.Length); + Assert.Equal(typeof(LengthUnit), quantityInfo.UnitType); + Assert.Equal(typeof(Length), quantityInfo.ValueType); + Assert.Equal(Length.Zero, quantityInfo.Zero); } [Fact] - public void GetUnitNamesForQuantity_ReturnsKnownUnitNames() + public void GetInfo_GivenMass_ReturnsQuantityInfoForMass() { - var knownLengthUnitNames = new[] {"Meter", "Centimeter", "Kilometer"}; + var knownMassUnits = new Enum[] {MassUnit.Kilogram, MassUnit.Gram, MassUnit.Tonne}; var knownMassUnitNames = new[] {"Kilogram", "Gram", "Tonne"}; + var massUnitCount = Enum.GetValues(typeof(MassUnit)).Length - 1; // Exclude MassUnit.Undefined + + QuantityInfo quantityInfo = Quantity.GetInfo(QuantityType.Mass); + + Assert.Equal("Mass", quantityInfo.Name); + Assert.Equal(QuantityType.Mass, quantityInfo.QuantityType); + Assert.Superset(knownMassUnitNames.ToHashSet(), quantityInfo.UnitNames.ToHashSet()); + Assert.Superset(knownMassUnits.ToHashSet(), quantityInfo.Units.ToHashSet()); + Assert.Equal(massUnitCount, quantityInfo.UnitNames.Length); + Assert.Equal(massUnitCount, quantityInfo.Units.Length); + Assert.Equal(typeof(MassUnit), quantityInfo.UnitType); + Assert.Equal(typeof(Mass), quantityInfo.ValueType); + Assert.Equal(Mass.Zero, quantityInfo.Zero); + } - var lengthUnitNames = Quantity.GetUnitNamesForQuantity(QuantityType.Length); - var massUnitNames = Quantity.GetUnitNamesForQuantity(QuantityType.Mass); + [Fact] + public void Infos_ReturnsKnownQuantityInfoObjects() + { + var knownQuantityInfos = new[] + { + Quantity.GetInfo(QuantityType.Length), + Quantity.GetInfo(QuantityType.Force), + Quantity.GetInfo(QuantityType.Mass) + }; + + var infos = Quantity.Infos; - Assert.Superset(knownLengthUnitNames.ToHashSet(), lengthUnitNames.ToHashSet()); - Assert.Superset(knownMassUnitNames.ToHashSet(), massUnitNames.ToHashSet()); + Assert.Superset(knownQuantityInfos.ToHashSet(), infos.ToHashSet()); + Assert.Equal(QuantityCount, infos.Length); + } + + [Fact] + public void Parse_GivenValueAndUnit_ReturnsQuantity() + { + Assert.Equal(Length.FromCentimeters(3), Quantity.Parse(CultureInfo.InvariantCulture, typeof(Length), "3 cm")); + Assert.Equal(Mass.FromTonnes(3), Quantity.Parse(CultureInfo.InvariantCulture, typeof(Mass), "03t")); + Assert.Equal(Pressure.FromMegabars(3), Quantity.Parse(CultureInfo.InvariantCulture, typeof(Pressure), "3.0 Mbar")); } [Fact] @@ -71,6 +131,46 @@ public void QuantityNames_ReturnsKnownNames() var names = Quantity.Names; Assert.Superset(knownNames.ToHashSet(), names.ToHashSet()); + Assert.Equal(QuantityCount, names.Length); + } + + [Fact] + public void TryFrom_GivenValueAndUnit_ReturnsQuantity() + { + Assert.True(Quantity.TryFrom(3, LengthUnit.Centimeter, out IQuantity parsedLength)); + Assert.Equal(Length.FromCentimeters(3), parsedLength); + + Assert.True(Quantity.TryFrom(3, MassUnit.Tonne, out IQuantity parsedMass)); + Assert.Equal(Mass.FromTonnes(3), parsedMass); + + Assert.True(Quantity.TryFrom(3, PressureUnit.Megabar, out IQuantity parsedPressure)); + Assert.Equal(Pressure.FromMegabars(3), parsedPressure); + } + + [Fact] + public void TryParse_GivenInvalidString_ReturnsFalseAndNullQuantity() + { + Assert.False(Quantity.TryParse(typeof(Length), "x cm", out IQuantity parsedLength)); + Assert.Null(parsedLength); + + Assert.False(Quantity.TryParse(typeof(Mass), "xt", out IQuantity parsedMass)); + Assert.Null(parsedMass); + + Assert.False(Quantity.TryParse(typeof(Pressure), "foo", out IQuantity parsedPressure)); + Assert.Null(parsedPressure); + } + + [Fact] + public void TryParse_GivenValueAndUnit_ReturnsQuantity() + { + Assert.True(Quantity.TryParse(typeof(Length), "3 cm", out IQuantity parsedLength)); + Assert.Equal(Length.FromCentimeters(3), parsedLength); + + Assert.True(Quantity.TryParse(typeof(Mass), "03t", out IQuantity parsedMass)); + Assert.Equal(Mass.FromTonnes(3), parsedMass); + + Assert.True(Quantity.TryParse(typeof(Pressure), "3.0 Mbar", out IQuantity parsedPressure)); + Assert.Equal(Pressure.FromMegabars(3), parsedPressure); } [Fact] @@ -81,6 +181,7 @@ public void Types_ReturnsKnownQuantityTypes() var types = Quantity.Types; Assert.Superset(knownQuantities.ToHashSet(), types.ToHashSet()); + Assert.Equal(QuantityCount, types.Length); } } } diff --git a/UnitsNet/CustomCode/Quantity.cs b/UnitsNet/CustomCode/Quantity.cs index d9b6665fe8..8bba568359 100644 --- a/UnitsNet/CustomCode/Quantity.cs +++ b/UnitsNet/CustomCode/Quantity.cs @@ -1,27 +1,17 @@ using System; -using System.Collections.Generic; using System.Linq; using System.Reflection; using UnitsNet.InternalHelpers; -using UnitsNet.Units; namespace UnitsNet { public partial class Quantity { - private static readonly string UnitEnumNamespace = typeof(LengthUnit).Namespace; - - private static readonly Type[] UnitEnumTypes = Assembly.GetAssembly(typeof(Length)) - .GetExportedTypes() - .Where(t => t.IsEnum && t.Namespace == UnitEnumNamespace && t.Name.EndsWith("Unit")) - .ToArray(); - - static Quantity() { - var quantityTypes = Enum.GetValues(typeof(QuantityType)).Cast().ToArray(); + var quantityTypes = Enum.GetValues(typeof(QuantityType)).Cast().Except(new[] {QuantityType.Undefined}).ToArray(); Types = quantityTypes; - Names = Enum.GetNames(typeof(QuantityType)); + Names = quantityTypes.Select(qt => qt.ToString()).ToArray(); // A bunch of reflection to enumerate quantity types, instantiate with the default constructor and return its QuantityInfo property InfosLazy = new Lazy(() => Assembly.GetAssembly(typeof(Length)) @@ -51,50 +41,5 @@ static Quantity() public static QuantityInfo[] Infos => InfosLazy.Value; private static readonly Lazy InfosLazy; - - /// - /// Returns the enum values for the given , excluding the Undefined=0 value. - /// You can then use this for dynamic parsing in . - /// If you only need the unit names, use instead. - /// - /// - /// Given it will return all enum values of , - /// such as and . - /// - /// The quantity type. - /// Unit enum values. - public static IEnumerable GetUnitEnumValuesForQuantity(QuantityType quantity) - { - // QuantityType.Length => "UnitsNet.Units.LengthUnit" - Type unitEnumType = GetUnitType(quantity); - - // Skip Undefined, which is only really used to help catch uninitialized values - return Enum.GetValues(unitEnumType).Cast().Skip(1).ToArray(); - } - - /// - /// Returns the enum value names for the given . - /// For example, given it will return the names - /// of all enum values of , such as "Centimeter" and "Meter". - /// - /// The quantity type. - /// Unit enum values. - public static IEnumerable GetUnitNamesForQuantity(QuantityType quantity) - { - return GetUnitEnumValuesForQuantity(quantity).Select(unitEnumValue => unitEnumValue.ToString()); - } - - /// - /// Returns the enum type for the given . - /// - /// - /// Given it will return . - /// - /// - /// - public static Type GetUnitType(QuantityType quantity) - { - return UnitEnumTypes.First(t => t.Name == $"{quantity}Unit"); - } } } diff --git a/UnitsNet/GeneratedCode/Quantity.g.cs b/UnitsNet/GeneratedCode/Quantity.g.cs index 6281ee632d..e90977fe49 100644 --- a/UnitsNet/GeneratedCode/Quantity.g.cs +++ b/UnitsNet/GeneratedCode/Quantity.g.cs @@ -37,6 +37,8 @@ using System; using System.Linq; +using JetBrains.Annotations; +using UnitsNet.InternalHelpers; using UnitsNet.Units; #if WINDOWS_UWP @@ -70,6 +72,20 @@ public static IQuantity From(FromValue value, Enum unit) $"Unit value {unit} of type {unit.GetType()} is not a known unit enum type. Expected types like UnitsNet.Units.LengthUnit. Did you pass in a third-party enum type defined outside UnitsNet library?"); } + /// + public static bool TryFrom(double value, Enum unit, out IQuantity quantity) + { + // Implicit cast to FromValue would prevent TryFrom from being called, + // so we need to explicitly check this here for double arguments. + if (double.IsNaN(value) || double.IsInfinity(value)) + { + quantity = default(IQuantity); + return false; + } + + return TryFrom((FromValue) value, unit, out quantity); + } + /// /// Try to dynamically construct a quantity. /// @@ -359,6 +375,9 @@ public static bool TryFrom(FromValue value, Enum unit, out IQuantity quantity) } } + /// + public static IQuantity Parse(Type quantityType, string quantityString) => Parse(null, quantityType, quantityString); + /// /// Dynamically parse a quantity string representation. /// @@ -366,16 +385,20 @@ public static bool TryFrom(FromValue value, Enum unit, out IQuantity quantity) /// Quantity string representation, such as "1.5 kg". Must be compatible with given quantity type. /// The parsed quantity. /// Type must be of type UnitsNet.IQuantity -or- Type is not a known quantity type. - public static IQuantity Parse(Type quantityType, string quantityString) + public static IQuantity Parse([CanBeNull] IFormatProvider formatProvider, Type quantityType, string quantityString) { if (!typeof(IQuantity).IsAssignableFrom(quantityType)) throw new ArgumentException($"Type {quantityType} must be of type UnitsNet.IQuantity."); - if (TryParse(quantityType, quantityString, out IQuantity quantity)) return quantity; + if (TryParse(formatProvider, quantityType, quantityString, out IQuantity quantity)) return quantity; throw new ArgumentException($"Quantity string could not be parsed to quantity {quantityType}."); } + /// + public static bool TryParse(Type quantityType, string quantityString, out IQuantity quantity) => + TryParse(null, quantityType, quantityString, out quantity); + /// /// Try to dynamically parse a quantity string representation. /// @@ -383,7 +406,7 @@ public static IQuantity Parse(Type quantityType, string quantityString) /// Quantity string representation, such as "1.5 kg". Must be compatible with given quantity type. /// The resulting quantity if successful, otherwise default. /// The parsed quantity. - public static bool TryParse(Type quantityType, string quantityString, out IQuantity quantity) + public static bool TryParse([CanBeNull] IFormatProvider formatProvider, Type quantityType, string quantityString, out IQuantity quantity) { quantity = default(IQuantity); @@ -393,274 +416,274 @@ public static bool TryParse(Type quantityType, string quantityString, out IQuant var parser = QuantityParser.Default; if (quantityType == typeof(Acceleration)) - return parser.TryParse(quantityString, null, Acceleration.From, out quantity); + return parser.TryParse(quantityString, formatProvider, Acceleration.From, out quantity); if (quantityType == typeof(AmountOfSubstance)) - return parser.TryParse(quantityString, null, AmountOfSubstance.From, out quantity); + return parser.TryParse(quantityString, formatProvider, AmountOfSubstance.From, out quantity); if (quantityType == typeof(AmplitudeRatio)) - return parser.TryParse(quantityString, null, AmplitudeRatio.From, out quantity); + return parser.TryParse(quantityString, formatProvider, AmplitudeRatio.From, out quantity); if (quantityType == typeof(Angle)) - return parser.TryParse(quantityString, null, Angle.From, out quantity); + return parser.TryParse(quantityString, formatProvider, Angle.From, out quantity); if (quantityType == typeof(ApparentEnergy)) - return parser.TryParse(quantityString, null, ApparentEnergy.From, out quantity); + return parser.TryParse(quantityString, formatProvider, ApparentEnergy.From, out quantity); if (quantityType == typeof(ApparentPower)) - return parser.TryParse(quantityString, null, ApparentPower.From, out quantity); + return parser.TryParse(quantityString, formatProvider, ApparentPower.From, out quantity); if (quantityType == typeof(Area)) - return parser.TryParse(quantityString, null, Area.From, out quantity); + return parser.TryParse(quantityString, formatProvider, Area.From, out quantity); if (quantityType == typeof(AreaDensity)) - return parser.TryParse(quantityString, null, AreaDensity.From, out quantity); + return parser.TryParse(quantityString, formatProvider, AreaDensity.From, out quantity); if (quantityType == typeof(AreaMomentOfInertia)) - return parser.TryParse(quantityString, null, AreaMomentOfInertia.From, out quantity); + return parser.TryParse(quantityString, formatProvider, AreaMomentOfInertia.From, out quantity); if (quantityType == typeof(BitRate)) - return parser.TryParse(quantityString, null, BitRate.From, out quantity); + return parser.TryParse(quantityString, formatProvider, BitRate.From, out quantity); if (quantityType == typeof(BrakeSpecificFuelConsumption)) - return parser.TryParse(quantityString, null, BrakeSpecificFuelConsumption.From, out quantity); + return parser.TryParse(quantityString, formatProvider, BrakeSpecificFuelConsumption.From, out quantity); if (quantityType == typeof(Capacitance)) - return parser.TryParse(quantityString, null, Capacitance.From, out quantity); + return parser.TryParse(quantityString, formatProvider, Capacitance.From, out quantity); if (quantityType == typeof(CoefficientOfThermalExpansion)) - return parser.TryParse(quantityString, null, CoefficientOfThermalExpansion.From, out quantity); + return parser.TryParse(quantityString, formatProvider, CoefficientOfThermalExpansion.From, out quantity); if (quantityType == typeof(Density)) - return parser.TryParse(quantityString, null, Density.From, out quantity); + return parser.TryParse(quantityString, formatProvider, Density.From, out quantity); if (quantityType == typeof(Duration)) - return parser.TryParse(quantityString, null, Duration.From, out quantity); + return parser.TryParse(quantityString, formatProvider, Duration.From, out quantity); if (quantityType == typeof(DynamicViscosity)) - return parser.TryParse(quantityString, null, DynamicViscosity.From, out quantity); + return parser.TryParse(quantityString, formatProvider, DynamicViscosity.From, out quantity); if (quantityType == typeof(ElectricAdmittance)) - return parser.TryParse(quantityString, null, ElectricAdmittance.From, out quantity); + return parser.TryParse(quantityString, formatProvider, ElectricAdmittance.From, out quantity); if (quantityType == typeof(ElectricCharge)) - return parser.TryParse(quantityString, null, ElectricCharge.From, out quantity); + return parser.TryParse(quantityString, formatProvider, ElectricCharge.From, out quantity); if (quantityType == typeof(ElectricChargeDensity)) - return parser.TryParse(quantityString, null, ElectricChargeDensity.From, out quantity); + return parser.TryParse(quantityString, formatProvider, ElectricChargeDensity.From, out quantity); if (quantityType == typeof(ElectricConductance)) - return parser.TryParse(quantityString, null, ElectricConductance.From, out quantity); + return parser.TryParse(quantityString, formatProvider, ElectricConductance.From, out quantity); if (quantityType == typeof(ElectricConductivity)) - return parser.TryParse(quantityString, null, ElectricConductivity.From, out quantity); + return parser.TryParse(quantityString, formatProvider, ElectricConductivity.From, out quantity); if (quantityType == typeof(ElectricCurrent)) - return parser.TryParse(quantityString, null, ElectricCurrent.From, out quantity); + return parser.TryParse(quantityString, formatProvider, ElectricCurrent.From, out quantity); if (quantityType == typeof(ElectricCurrentDensity)) - return parser.TryParse(quantityString, null, ElectricCurrentDensity.From, out quantity); + return parser.TryParse(quantityString, formatProvider, ElectricCurrentDensity.From, out quantity); if (quantityType == typeof(ElectricCurrentGradient)) - return parser.TryParse(quantityString, null, ElectricCurrentGradient.From, out quantity); + return parser.TryParse(quantityString, formatProvider, ElectricCurrentGradient.From, out quantity); if (quantityType == typeof(ElectricField)) - return parser.TryParse(quantityString, null, ElectricField.From, out quantity); + return parser.TryParse(quantityString, formatProvider, ElectricField.From, out quantity); if (quantityType == typeof(ElectricInductance)) - return parser.TryParse(quantityString, null, ElectricInductance.From, out quantity); + return parser.TryParse(quantityString, formatProvider, ElectricInductance.From, out quantity); if (quantityType == typeof(ElectricPotential)) - return parser.TryParse(quantityString, null, ElectricPotential.From, out quantity); + return parser.TryParse(quantityString, formatProvider, ElectricPotential.From, out quantity); if (quantityType == typeof(ElectricPotentialAc)) - return parser.TryParse(quantityString, null, ElectricPotentialAc.From, out quantity); + return parser.TryParse(quantityString, formatProvider, ElectricPotentialAc.From, out quantity); if (quantityType == typeof(ElectricPotentialDc)) - return parser.TryParse(quantityString, null, ElectricPotentialDc.From, out quantity); + return parser.TryParse(quantityString, formatProvider, ElectricPotentialDc.From, out quantity); if (quantityType == typeof(ElectricResistance)) - return parser.TryParse(quantityString, null, ElectricResistance.From, out quantity); + return parser.TryParse(quantityString, formatProvider, ElectricResistance.From, out quantity); if (quantityType == typeof(ElectricResistivity)) - return parser.TryParse(quantityString, null, ElectricResistivity.From, out quantity); + return parser.TryParse(quantityString, formatProvider, ElectricResistivity.From, out quantity); if (quantityType == typeof(Energy)) - return parser.TryParse(quantityString, null, Energy.From, out quantity); + return parser.TryParse(quantityString, formatProvider, Energy.From, out quantity); if (quantityType == typeof(Entropy)) - return parser.TryParse(quantityString, null, Entropy.From, out quantity); + return parser.TryParse(quantityString, formatProvider, Entropy.From, out quantity); if (quantityType == typeof(Force)) - return parser.TryParse(quantityString, null, Force.From, out quantity); + return parser.TryParse(quantityString, formatProvider, Force.From, out quantity); if (quantityType == typeof(ForceChangeRate)) - return parser.TryParse(quantityString, null, ForceChangeRate.From, out quantity); + return parser.TryParse(quantityString, formatProvider, ForceChangeRate.From, out quantity); if (quantityType == typeof(ForcePerLength)) - return parser.TryParse(quantityString, null, ForcePerLength.From, out quantity); + return parser.TryParse(quantityString, formatProvider, ForcePerLength.From, out quantity); if (quantityType == typeof(Frequency)) - return parser.TryParse(quantityString, null, Frequency.From, out quantity); + return parser.TryParse(quantityString, formatProvider, Frequency.From, out quantity); if (quantityType == typeof(HeatFlux)) - return parser.TryParse(quantityString, null, HeatFlux.From, out quantity); + return parser.TryParse(quantityString, formatProvider, HeatFlux.From, out quantity); if (quantityType == typeof(HeatTransferCoefficient)) - return parser.TryParse(quantityString, null, HeatTransferCoefficient.From, out quantity); + return parser.TryParse(quantityString, formatProvider, HeatTransferCoefficient.From, out quantity); if (quantityType == typeof(Illuminance)) - return parser.TryParse(quantityString, null, Illuminance.From, out quantity); + return parser.TryParse(quantityString, formatProvider, Illuminance.From, out quantity); if (quantityType == typeof(Information)) - return parser.TryParse(quantityString, null, Information.From, out quantity); + return parser.TryParse(quantityString, formatProvider, Information.From, out quantity); if (quantityType == typeof(Irradiance)) - return parser.TryParse(quantityString, null, Irradiance.From, out quantity); + return parser.TryParse(quantityString, formatProvider, Irradiance.From, out quantity); if (quantityType == typeof(Irradiation)) - return parser.TryParse(quantityString, null, Irradiation.From, out quantity); + return parser.TryParse(quantityString, formatProvider, Irradiation.From, out quantity); if (quantityType == typeof(KinematicViscosity)) - return parser.TryParse(quantityString, null, KinematicViscosity.From, out quantity); + return parser.TryParse(quantityString, formatProvider, KinematicViscosity.From, out quantity); if (quantityType == typeof(LapseRate)) - return parser.TryParse(quantityString, null, LapseRate.From, out quantity); + return parser.TryParse(quantityString, formatProvider, LapseRate.From, out quantity); if (quantityType == typeof(Length)) - return parser.TryParse(quantityString, null, Length.From, out quantity); + return parser.TryParse(quantityString, formatProvider, Length.From, out quantity); if (quantityType == typeof(Level)) - return parser.TryParse(quantityString, null, Level.From, out quantity); + return parser.TryParse(quantityString, formatProvider, Level.From, out quantity); if (quantityType == typeof(LinearDensity)) - return parser.TryParse(quantityString, null, LinearDensity.From, out quantity); + return parser.TryParse(quantityString, formatProvider, LinearDensity.From, out quantity); if (quantityType == typeof(LuminousFlux)) - return parser.TryParse(quantityString, null, LuminousFlux.From, out quantity); + return parser.TryParse(quantityString, formatProvider, LuminousFlux.From, out quantity); if (quantityType == typeof(LuminousIntensity)) - return parser.TryParse(quantityString, null, LuminousIntensity.From, out quantity); + return parser.TryParse(quantityString, formatProvider, LuminousIntensity.From, out quantity); if (quantityType == typeof(MagneticField)) - return parser.TryParse(quantityString, null, MagneticField.From, out quantity); + return parser.TryParse(quantityString, formatProvider, MagneticField.From, out quantity); if (quantityType == typeof(MagneticFlux)) - return parser.TryParse(quantityString, null, MagneticFlux.From, out quantity); + return parser.TryParse(quantityString, formatProvider, MagneticFlux.From, out quantity); if (quantityType == typeof(Magnetization)) - return parser.TryParse(quantityString, null, Magnetization.From, out quantity); + return parser.TryParse(quantityString, formatProvider, Magnetization.From, out quantity); if (quantityType == typeof(Mass)) - return parser.TryParse(quantityString, null, Mass.From, out quantity); + return parser.TryParse(quantityString, formatProvider, Mass.From, out quantity); if (quantityType == typeof(MassFlow)) - return parser.TryParse(quantityString, null, MassFlow.From, out quantity); + return parser.TryParse(quantityString, formatProvider, MassFlow.From, out quantity); if (quantityType == typeof(MassFlux)) - return parser.TryParse(quantityString, null, MassFlux.From, out quantity); + return parser.TryParse(quantityString, formatProvider, MassFlux.From, out quantity); if (quantityType == typeof(MassMomentOfInertia)) - return parser.TryParse(quantityString, null, MassMomentOfInertia.From, out quantity); + return parser.TryParse(quantityString, formatProvider, MassMomentOfInertia.From, out quantity); if (quantityType == typeof(MolarEnergy)) - return parser.TryParse(quantityString, null, MolarEnergy.From, out quantity); + return parser.TryParse(quantityString, formatProvider, MolarEnergy.From, out quantity); if (quantityType == typeof(MolarEntropy)) - return parser.TryParse(quantityString, null, MolarEntropy.From, out quantity); + return parser.TryParse(quantityString, formatProvider, MolarEntropy.From, out quantity); if (quantityType == typeof(Molarity)) - return parser.TryParse(quantityString, null, Molarity.From, out quantity); + return parser.TryParse(quantityString, formatProvider, Molarity.From, out quantity); if (quantityType == typeof(MolarMass)) - return parser.TryParse(quantityString, null, MolarMass.From, out quantity); + return parser.TryParse(quantityString, formatProvider, MolarMass.From, out quantity); if (quantityType == typeof(Permeability)) - return parser.TryParse(quantityString, null, Permeability.From, out quantity); + return parser.TryParse(quantityString, formatProvider, Permeability.From, out quantity); if (quantityType == typeof(Permittivity)) - return parser.TryParse(quantityString, null, Permittivity.From, out quantity); + return parser.TryParse(quantityString, formatProvider, Permittivity.From, out quantity); if (quantityType == typeof(Power)) - return parser.TryParse(quantityString, null, Power.From, out quantity); + return parser.TryParse(quantityString, formatProvider, Power.From, out quantity); if (quantityType == typeof(PowerDensity)) - return parser.TryParse(quantityString, null, PowerDensity.From, out quantity); + return parser.TryParse(quantityString, formatProvider, PowerDensity.From, out quantity); if (quantityType == typeof(PowerRatio)) - return parser.TryParse(quantityString, null, PowerRatio.From, out quantity); + return parser.TryParse(quantityString, formatProvider, PowerRatio.From, out quantity); if (quantityType == typeof(Pressure)) - return parser.TryParse(quantityString, null, Pressure.From, out quantity); + return parser.TryParse(quantityString, formatProvider, Pressure.From, out quantity); if (quantityType == typeof(PressureChangeRate)) - return parser.TryParse(quantityString, null, PressureChangeRate.From, out quantity); + return parser.TryParse(quantityString, formatProvider, PressureChangeRate.From, out quantity); if (quantityType == typeof(Ratio)) - return parser.TryParse(quantityString, null, Ratio.From, out quantity); + return parser.TryParse(quantityString, formatProvider, Ratio.From, out quantity); if (quantityType == typeof(ReactiveEnergy)) - return parser.TryParse(quantityString, null, ReactiveEnergy.From, out quantity); + return parser.TryParse(quantityString, formatProvider, ReactiveEnergy.From, out quantity); if (quantityType == typeof(ReactivePower)) - return parser.TryParse(quantityString, null, ReactivePower.From, out quantity); + return parser.TryParse(quantityString, formatProvider, ReactivePower.From, out quantity); if (quantityType == typeof(RotationalAcceleration)) - return parser.TryParse(quantityString, null, RotationalAcceleration.From, out quantity); + return parser.TryParse(quantityString, formatProvider, RotationalAcceleration.From, out quantity); if (quantityType == typeof(RotationalSpeed)) - return parser.TryParse(quantityString, null, RotationalSpeed.From, out quantity); + return parser.TryParse(quantityString, formatProvider, RotationalSpeed.From, out quantity); if (quantityType == typeof(RotationalStiffness)) - return parser.TryParse(quantityString, null, RotationalStiffness.From, out quantity); + return parser.TryParse(quantityString, formatProvider, RotationalStiffness.From, out quantity); if (quantityType == typeof(RotationalStiffnessPerLength)) - return parser.TryParse(quantityString, null, RotationalStiffnessPerLength.From, out quantity); + return parser.TryParse(quantityString, formatProvider, RotationalStiffnessPerLength.From, out quantity); if (quantityType == typeof(SolidAngle)) - return parser.TryParse(quantityString, null, SolidAngle.From, out quantity); + return parser.TryParse(quantityString, formatProvider, SolidAngle.From, out quantity); if (quantityType == typeof(SpecificEnergy)) - return parser.TryParse(quantityString, null, SpecificEnergy.From, out quantity); + return parser.TryParse(quantityString, formatProvider, SpecificEnergy.From, out quantity); if (quantityType == typeof(SpecificEntropy)) - return parser.TryParse(quantityString, null, SpecificEntropy.From, out quantity); + return parser.TryParse(quantityString, formatProvider, SpecificEntropy.From, out quantity); if (quantityType == typeof(SpecificVolume)) - return parser.TryParse(quantityString, null, SpecificVolume.From, out quantity); + return parser.TryParse(quantityString, formatProvider, SpecificVolume.From, out quantity); if (quantityType == typeof(SpecificWeight)) - return parser.TryParse(quantityString, null, SpecificWeight.From, out quantity); + return parser.TryParse(quantityString, formatProvider, SpecificWeight.From, out quantity); if (quantityType == typeof(Speed)) - return parser.TryParse(quantityString, null, Speed.From, out quantity); + return parser.TryParse(quantityString, formatProvider, Speed.From, out quantity); if (quantityType == typeof(Temperature)) - return parser.TryParse(quantityString, null, Temperature.From, out quantity); + return parser.TryParse(quantityString, formatProvider, Temperature.From, out quantity); if (quantityType == typeof(TemperatureChangeRate)) - return parser.TryParse(quantityString, null, TemperatureChangeRate.From, out quantity); + return parser.TryParse(quantityString, formatProvider, TemperatureChangeRate.From, out quantity); if (quantityType == typeof(TemperatureDelta)) - return parser.TryParse(quantityString, null, TemperatureDelta.From, out quantity); + return parser.TryParse(quantityString, formatProvider, TemperatureDelta.From, out quantity); if (quantityType == typeof(ThermalConductivity)) - return parser.TryParse(quantityString, null, ThermalConductivity.From, out quantity); + return parser.TryParse(quantityString, formatProvider, ThermalConductivity.From, out quantity); if (quantityType == typeof(ThermalResistance)) - return parser.TryParse(quantityString, null, ThermalResistance.From, out quantity); + return parser.TryParse(quantityString, formatProvider, ThermalResistance.From, out quantity); if (quantityType == typeof(Torque)) - return parser.TryParse(quantityString, null, Torque.From, out quantity); + return parser.TryParse(quantityString, formatProvider, Torque.From, out quantity); if (quantityType == typeof(VitaminA)) - return parser.TryParse(quantityString, null, VitaminA.From, out quantity); + return parser.TryParse(quantityString, formatProvider, VitaminA.From, out quantity); if (quantityType == typeof(Volume)) - return parser.TryParse(quantityString, null, Volume.From, out quantity); + return parser.TryParse(quantityString, formatProvider, Volume.From, out quantity); if (quantityType == typeof(VolumeFlow)) - return parser.TryParse(quantityString, null, VolumeFlow.From, out quantity); + return parser.TryParse(quantityString, formatProvider, VolumeFlow.From, out quantity); throw new ArgumentException( $"Type {quantityType} is not a known quantity type. Did you pass in a third-party quantity type defined outside UnitsNet library?"); diff --git a/UnitsNet/QuantityInfo.cs b/UnitsNet/QuantityInfo.cs index 73bbc225cf..08dcc86593 100644 --- a/UnitsNet/QuantityInfo.cs +++ b/UnitsNet/QuantityInfo.cs @@ -21,6 +21,7 @@ using System; using System.Linq; +using System.Reflection; using JetBrains.Annotations; using UnitsNet.Units; @@ -42,12 +43,20 @@ namespace UnitsNet #endif class QuantityInfo { + private static readonly string UnitEnumNamespace = typeof(LengthUnit).Namespace; + + private static readonly Type[] UnitEnumTypes = Assembly.GetAssembly(typeof(Length)) + .GetExportedTypes() + .Where(t => t.IsEnum && t.Namespace == UnitEnumNamespace && t.Name.EndsWith("Unit")) + .ToArray(); + public QuantityInfo(QuantityType quantityType, [NotNull] Enum[] units, [NotNull] IQuantity zero) { if (units == null) throw new ArgumentNullException(nameof(units)); + Name = quantityType.ToString(); QuantityType = quantityType; - UnitType = Quantity.GetUnitType(quantityType); + UnitType = UnitEnumTypes.First(t => t.Name == $"{quantityType}Unit"); UnitNames = units.Select(u => u.ToString()).ToArray(); Units = units; Zero = zero ?? throw new ArgumentNullException(nameof(zero)); From 6c419e9162bad0f11b00f0e903e39a7fb46ddd22 Mon Sep 17 00:00:00 2001 From: Andreas Gullberg Larsen Date: Mon, 28 Jan 2019 22:28:33 +0100 Subject: [PATCH 24/36] Return Enum in UnitParser.Parse(Type) --- UnitsNet/CustomCode/UnitParser.cs | 24 ++++++------------------ UnitsNet/UnitConverter.cs | 8 ++++---- 2 files changed, 10 insertions(+), 22 deletions(-) diff --git a/UnitsNet/CustomCode/UnitParser.cs b/UnitsNet/CustomCode/UnitParser.cs index 808b18b44f..016760c190 100644 --- a/UnitsNet/CustomCode/UnitParser.cs +++ b/UnitsNet/CustomCode/UnitParser.cs @@ -22,7 +22,6 @@ using System; using System.Linq; using JetBrains.Annotations; -using UnitsNet.InternalHelpers; using UnitsNet.Units; // ReSharper disable once CheckNamespace @@ -82,7 +81,7 @@ TUnitType Parse(string unitAbbreviation, [CanBeNull] IFormatProvider #else public #endif - object Parse([NotNull] string unitAbbreviation, Type unitType, [CanBeNull] IFormatProvider formatProvider = null) + Enum Parse([NotNull] string unitAbbreviation, Type unitType, [CanBeNull] IFormatProvider formatProvider = null) { if (unitAbbreviation == null) throw new ArgumentNullException(nameof(unitAbbreviation)); unitAbbreviation = unitAbbreviation.Trim(); @@ -99,7 +98,7 @@ object Parse([NotNull] string unitAbbreviation, Type unitType, [CanBeNull] IForm switch (unitIntValues.Count) { case 1: - return unitIntValues[0]; + return (Enum) Enum.ToObject(unitType, unitIntValues[0]); case 0: throw new UnitNotFoundException($"Unit not found with abbreviation [{unitAbbreviation}] for unit type [{unitType}]."); default: @@ -162,7 +161,7 @@ bool TryParse(string unitAbbreviation, [CanBeNull] IFormatProvider fo /// The unit enum value as out result. /// True if successful. [PublicAPI] - public bool TryParse(string unitAbbreviation, Type unitType, out object unit) + public bool TryParse(string unitAbbreviation, Type unitType, out Enum unit) { return TryParse(unitAbbreviation, unitType, null, out unit); } @@ -181,7 +180,7 @@ public bool TryParse(string unitAbbreviation, Type unitType, out object unit) #else public #endif - bool TryParse(string unitAbbreviation, Type unitType, [CanBeNull] IFormatProvider formatProvider, out object unit) + bool TryParse(string unitAbbreviation, Type unitType, [CanBeNull] IFormatProvider formatProvider, out Enum unit) { if (unitAbbreviation == null) { @@ -190,7 +189,7 @@ bool TryParse(string unitAbbreviation, Type unitType, [CanBeNull] IFormatProvide } unitAbbreviation = unitAbbreviation.Trim(); - unit = GetDefault(unitType); + unit = default; if(!_unitAbbreviationsCache.TryGetUnitValueAbbreviationLookup(unitType, formatProvider, out var abbreviations)) return false; @@ -204,19 +203,8 @@ bool TryParse(string unitAbbreviation, Type unitType, [CanBeNull] IFormatProvide if(unitIntValues.Count != 1) return false; - unit = unitIntValues[0]; + unit = (Enum)Enum.ToObject(unitType, unitIntValues[0]); return true; } - - /// - /// Get default(Type) of - /// - /// . - /// Null for reference types, 0 for numeric types and default constructor for the rest. - /// - private static object GetDefault(Type type) - { - return type.IsValueType() ? Activator.CreateInstance(type): null; - } } } diff --git a/UnitsNet/UnitConverter.cs b/UnitsNet/UnitConverter.cs index 0393def02e..851b992b72 100644 --- a/UnitsNet/UnitConverter.cs +++ b/UnitsNet/UnitConverter.cs @@ -259,10 +259,10 @@ public static double ConvertByAbbreviation(FromValue fromValue, string quantityN var toUnitValue = UnitParser.Default.Parse(toUnitAbbrev, unitType, cultureInfo); // ex:("cm", LengthUnit) => LengthUnit.Centimeter var fromMethod = GetStaticFromMethod(quantityType, unitType); // ex: UnitsNet.Length.From(double inputValue, LengthUnit inputUnit) - var fromResult = fromMethod.Invoke(null, new[] {fromValue, fromUnitValue}); // ex: Length quantity = UnitsNet.Length.From(5, LengthUnit.Meter) + var fromResult = fromMethod.Invoke(null, new object[] {fromValue, fromUnitValue}); // ex: Length quantity = UnitsNet.Length.From(5, LengthUnit.Meter) var asMethod = GetAsMethod(quantityType, unitType); // ex: quantity.As(LengthUnit outputUnit) - var asResult = asMethod.Invoke(fromResult, new[] {toUnitValue}); // ex: double outputValue = quantity.As(LengthUnit.Centimeter) + var asResult = asMethod.Invoke(fromResult, new object[] {toUnitValue}); // ex: double outputValue = quantity.As(LengthUnit.Centimeter) return (double) asResult; } @@ -347,10 +347,10 @@ public static bool TryConvertByAbbreviation(FromValue fromValue, string quantity return false; var fromMethod = GetStaticFromMethod(quantityType, unitType); // ex: UnitsNet.Length.From(double inputValue, LengthUnit inputUnit) - var fromResult = fromMethod.Invoke(null, new[] {fromValue, fromUnitValue}); // ex: Length quantity = UnitsNet.Length.From(5, LengthUnit.Meter) + var fromResult = fromMethod.Invoke(null, new object[] {fromValue, fromUnitValue}); // ex: Length quantity = UnitsNet.Length.From(5, LengthUnit.Meter) var asMethod = GetAsMethod(quantityType, unitType); // ex: quantity.As(LengthUnit outputUnit) - var asResult = asMethod.Invoke(fromResult, new[] {toUnitValue}); // ex: double outputValue = quantity.As(LengthUnit.Centimeter) + var asResult = asMethod.Invoke(fromResult, new object[] {toUnitValue}); // ex: double outputValue = quantity.As(LengthUnit.Centimeter) result = (double) asResult; return true; From a16a78d57312ccc673b97edae16dc41b6ce02a63 Mon Sep 17 00:00:00 2001 From: Andreas Gullberg Larsen Date: Mon, 28 Jan 2019 23:30:06 +0100 Subject: [PATCH 25/36] Generated code: Manually add xmldoc --- UnitsNet/GeneratedCode/Quantity.g.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/UnitsNet/GeneratedCode/Quantity.g.cs b/UnitsNet/GeneratedCode/Quantity.g.cs index e90977fe49..377512c97b 100644 --- a/UnitsNet/GeneratedCode/Quantity.g.cs +++ b/UnitsNet/GeneratedCode/Quantity.g.cs @@ -383,6 +383,7 @@ public static bool TryFrom(FromValue value, Enum unit, out IQuantity quantity) /// /// Type of quantity, such as . /// Quantity string representation, such as "1.5 kg". Must be compatible with given quantity type. + /// The format provider to use for lookup. Defaults to if null. /// The parsed quantity. /// Type must be of type UnitsNet.IQuantity -or- Type is not a known quantity type. public static IQuantity Parse([CanBeNull] IFormatProvider formatProvider, Type quantityType, string quantityString) @@ -405,6 +406,7 @@ public static bool TryParse(Type quantityType, string quantityString, out IQuant /// Type of quantity, such as . /// Quantity string representation, such as "1.5 kg". Must be compatible with given quantity type. /// The resulting quantity if successful, otherwise default. + /// The format provider to use for lookup. Defaults to if null. /// The parsed quantity. public static bool TryParse([CanBeNull] IFormatProvider formatProvider, Type quantityType, string quantityString, out IQuantity quantity) { From 372a098f259c16de81ca2774f5d4032ff1aa90c6 Mon Sep 17 00:00:00 2001 From: Andreas Gullberg Larsen Date: Mon, 28 Jan 2019 23:30:18 +0100 Subject: [PATCH 26/36] Update README with more sections --- README.md | 102 ++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 87 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index f4017f5f4f..01130c99d3 100644 --- a/README.md +++ b/README.md @@ -127,29 +127,101 @@ Example: ### Dynamically Parsing and Converting Quantities Sometimes you need to work with quantities and units at runtime, such as parsing user input. -There are three classes to help with this: -- [UnitParser](UnitsNet/CustomCode/UnitParser.cs) for parsing unit abbreviation strings like `cm` to `LengthUnit.Centimeter` -- [UnitAbbreviationsCache](UnitsNet/CustomCode/UnitAbbreviationsCache.cs) for looking up unit abbreviations like `cm` given type `LengthUnit` and value `1` (`Centimeter`) -- [UnitConverter](UnitsNet/UnitConverter.cs) for converting values given a quantity name `Length`, a value `1` and from/to unit names `Centimeter` and `Meter` +There are a handful of classes to help with this: + - [Quantity](UnitsNet/CustomCode/Quantity.cs) for parsing and constructing quantities as well as looking up units, names and quantity information dynamically. -- [QuantityInfo](UnitsNet/QuantityInfo.cs) for representing information about a quantity, such as names, units and conversion functions. +- [UnitConverter](UnitsNet/UnitConverter.cs) for converting values to a different unit, with only strings or enum values +- [UnitParser](UnitsNet/CustomCode/UnitParser.cs) for parsing unit abbreviation strings, such as `"cm"` to `LengthUnit.Centimeter` + +#### Enumerate quantities and units +`Quantity` is the go-to class for looking up information about quantities at runtime. +```c# +string[] Quantity.Names; // ["Length", "Mass", ...] +QuantityType[] Quantity.Types; // [QuantityType.Length, QuantityType.Mass, ...] +QuantityInfo[] Quantity.Infos; // Information about all quantities and their units, types, values etc., see more below +QuantityInfo Quantity.GetInfo(QuantityType.Length); // Get information about Length +``` + +#### Quantity info +`QuantityInfo` makes it easy to enumerate names, units, types and values for the quantity type. +This is useful for populating lists of quantities and units for the user to choose. + +```c# +QuantityInfo lengthInfo = Quantity.GetInfo(QuantityType.Length); // You can get it statically here +lengthInfo = Length.Info; // or statically per quantity +lengthInfo = Length.Zero.QuantityInfo; // or dynamically from quantity instances + +lengthInfo.Name.Dump(); // "Length" +lengthInfo.QuantityType.Dump(); // QuantityType.Length +lengthInfo.UnitNames.Dump(); // ["Centimeter", "Meter", ...] +lengthInfo.Units.Dump(); // [LengthUnit.Centimeter, LengthUnit.Meter, ...] +lengthInfo.UnitType.Dump(); // typeof(LengthUnit) +lengthInfo.ValueType.Dump(); // typeof(Length) +lengthInfo.Zero.Dump(); // Length.Zero +``` + +#### Construct quantity +All you need is the value and the unit enum value. ```c# -// This type was perhaps selected by the user in GUI from a list of units -Type lengthUnitType = typeof(LengthUnit); // Selected by user in GUI from a list of units +IQuantity quantity = Quantity.From(3, LengthUnit.Centimeter); // Length -// Parse units dynamically -UnitParser parser = UnitParser.Default; -int fromUnitValue = (int)parser.Parse("cm", lengthUnitType); // LengthUnit.Centimeter == 1 +if (Quantity.TryFrom(3, LengthUnit.Centimeter, out IQuantity quantity2)) +{ +} +``` +#### Parse quantity +Parse any string to a quantity instance of the given the quantity type. -// Get unit abbreviations dynamically -var cache = UnitAbbreviationsCache.Default; -string fromUnitAbbreviation = cache.GetDefaultAbbreviation(lengthUnitType, 1); // "cm" +```c# +IQuantity quantity = Quantity.Parse(typeof(Length), "3 cm"); // Length -double centimeters = UnitConverter.ConvertByName(1, "Length", "Meter", "Centimeter"); // 100 +if (Quantity.TryParse(typeof(Length), "3cm", out IQuantity quantity2) +{ +} ``` -For more examples on dynamic parsing and conversion, see the unit conversion applications below. +#### Parse unit +[UnitParser](UnitsNet/CustomCode/UnitParser.cs) parses unit abbreviation strings to unit enum values. + +```c# +Enum unit = UnitParser.Default.Parse("cm", typeof(LengthUnit)); // LengthUnit.Centimeter + +if (UnitParser.Default.TryParse("cm", typeof(LengthUnit), out Enum unit2)) +{ + // Use unit2 as LengthUnit.Centimeter +} +``` + +#### Convert quantity to unit - IQuantity and Enum +Convert any `IQuantity` instance to a different unit by providing a target unit enum value. +```c# +// Assume these are passed in at runtime, we don't know their values or type +Enum userSelectedUnit = LengthUnit.Millimeter; +IQuantity quantity = Length.FromCentimeters(3); + +// Later we convert to a unit +quantity.ToUnit(userSelectedUnit).Value; // 30 +quantity.ToUnit(userSelectedUnit).Unit; // LengthUnit.Millimeter +quantity.ToUnit(userSelectedUnit).ToString(); // "30 mm" +quantity.ToUnit(PressureUnit.Pascal); // Throws exception, not compatible +quantity.As(userSelectedUnit); // 30 +``` + +#### Convert quantity to unit - From/To Enums +Useful when populating lists with unit enum values for the user to choose. + +```c# +UnitConverter.Convert(1, LengthUnit.Centimeter, LengthUnit.Millimeter); // 10 mm +``` + +#### Convert quantity to unit - Names or abbreviation strings +Sometimes you only have strings to work with, that works too! + +```c# +UnitConverter.ConvertByName(1, "Length", "Centimeter", "Millimeter"); // 10 mm +UnitConverter.ConvertByAbbreviation(1, "Length", "cm", "mm"); // 10 mm +``` ### Example: Creating a dynamic unit converter app [Source code](https://github.com/angularsen/UnitsNet/tree/master/Samples/UnitConverter.Wpf) for `Samples/UnitConverter.Wpf`
From b84219bb6039d434f756d4d13f508d13119bd957 Mon Sep 17 00:00:00 2001 From: Andreas Gullberg Larsen Date: Mon, 28 Jan 2019 23:48:09 +0100 Subject: [PATCH 27/36] Update README with sample app sections --- README.md | 44 ++++++++++++-------------------------------- 1 file changed, 12 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 01130c99d3..bdae8cddaf 100644 --- a/README.md +++ b/README.md @@ -232,43 +232,23 @@ UnitConverter.ConvertByAbbreviation(1, "Length", "cm", "mm"); // 10 mm This example shows how you can create a dynamic unit converter, where the user selects the quantity to convert, such as `Temperature`, then selects to convert from `DegreeCelsius` to `DegreeFahrenheit` and types in a numeric value for how many degrees Celsius to convert. -Pseudo-code for converter app: -```c# -// Populate quantity selector ("Length", "Mass", "Force" etc) -string[] quantityNames = Quantity.Names; - -string selectedQuantityName = "Temperature"; // Selected by user -QuantityType selectedQuantity = Enum.Parse(selectedQuantityName); // QuantityType.Temperature - -// Populate from/to unit selectors when quantity selection changes -string[] unitNames = Quantity.GetUnitNamesForQuantity(selectedQuantity).ToArray(); -myGui.UpdateFromToListsOfUnits(unitNames); - -// Assign these from GUI selection -double fromValue = 25; -string fromUnitName = "DegreeCelsius"; -string toUnitName = "DegreeFahrenheit"; +#### Populate quantity selector +Use `Quantity` to enumerate all quantity type enum values, such as `QuantityType.Length` and `QuantityType.Mass`. -// Convert using from value and selected quantity/unit names -double convertedValue = UnitConverter.ConvertByName(fromValue, selectedQuantityName, fromUnitName, toUnitName); -``` - -### Example: Creating a unit converter app with hard coded quantities +**TODO Update me with new hash after merging PR.** +https://github.com/angularsen/UnitsNet/blob/82eed32d6bc607eeaf09a54958d566561ab19017/Samples/UnitConverter.Wpf/UnitConverter.Wpf/MainWindowVM.cs#L32 -If you can live with hard coding what quantities to convert between, then the following code snippet shows you one way to go about it: +#### Update unit lists when selecting new quantity +So user can only choose from/to units compatible with the quantity type. -```C# -// Get quantities for populating quantity UI selector -QuantityType[] quantityTypes = Enum.GetValues(typeof(QuantityType)).Cast().ToArray(); +**TODO Update me with new hash after merging PR.** +https://github.com/angularsen/UnitsNet/blob/82eed32d6bc607eeaf09a54958d566561ab19017/Samples/UnitConverter.Wpf/UnitConverter.Wpf/MainWindowVM.cs#L140-L149 -// If Length is selected, get length units for populating from/to UI selectors -LengthUnit[] lengthUnits = Length.Units; +#### Update calculation on unit selection changed +Using `UnitConverter` to convert by quantity name such as `"Length"` and unit names like `"Centimeter"` and `"Meter"`. -// Perform conversion using input value and selected from/to units -double inputValue; // Obtain from textbox -LengthUnit fromUnit, toUnit; // Obtain from ListBox selections -double resultValue = Length.From(inputValue, fromUnit).As(toUnit); -``` +**TODO Update me with new hash after merging PR.** +https://github.com/angularsen/UnitsNet/blob/82eed32d6bc607eeaf09a54958d566561ab19017/Samples/UnitConverter.Wpf/UnitConverter.Wpf/MainWindowVM.cs#L130-L138 ### Example: WPF app using IValueConverter to parse quantities from input From 504fbaddcca4dbdb4ebfd2eda5ef30381710ea62 Mon Sep 17 00:00:00 2001 From: Andreas Gullberg Larsen Date: Tue, 29 Jan 2019 00:00:20 +0100 Subject: [PATCH 28/36] Fix README --- README.md | 54 ++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index bdae8cddaf..01fa508e5f 100644 --- a/README.md +++ b/README.md @@ -125,8 +125,9 @@ Unfortunately there is no built-in way to avoid this, either you need to ensure Example: `Length.Parse("1 pt")` throws `AmbiguousUnitParseException` with message `Cannot parse "pt" since it could be either of these: DtpPoint, PrinterPoint`. -### Dynamically Parsing and Converting Quantities +### Dynamically Parse Quantities and Convert Units Sometimes you need to work with quantities and units at runtime, such as parsing user input. + There are a handful of classes to help with this: - [Quantity](UnitsNet/CustomCode/Quantity.cs) for parsing and constructing quantities as well as looking up units, names and quantity information dynamically. @@ -142,7 +143,7 @@ QuantityInfo[] Quantity.Infos; // Information about all quantities and their uni QuantityInfo Quantity.GetInfo(QuantityType.Length); // Get information about Length ``` -#### Quantity info +#### Information about quantity type `QuantityInfo` makes it easy to enumerate names, units, types and values for the quantity type. This is useful for populating lists of quantities and units for the user to choose. @@ -151,13 +152,13 @@ QuantityInfo lengthInfo = Quantity.GetInfo(QuantityType.Length); // You can get lengthInfo = Length.Info; // or statically per quantity lengthInfo = Length.Zero.QuantityInfo; // or dynamically from quantity instances -lengthInfo.Name.Dump(); // "Length" -lengthInfo.QuantityType.Dump(); // QuantityType.Length -lengthInfo.UnitNames.Dump(); // ["Centimeter", "Meter", ...] -lengthInfo.Units.Dump(); // [LengthUnit.Centimeter, LengthUnit.Meter, ...] -lengthInfo.UnitType.Dump(); // typeof(LengthUnit) -lengthInfo.ValueType.Dump(); // typeof(Length) -lengthInfo.Zero.Dump(); // Length.Zero +lengthInfo.Name; // "Length" +lengthInfo.QuantityType; // QuantityType.Length +lengthInfo.UnitNames; // ["Centimeter", "Meter", ...] +lengthInfo.Units; // [LengthUnit.Centimeter, LengthUnit.Meter, ...] +lengthInfo.UnitType; // typeof(LengthUnit) +lengthInfo.ValueType; // typeof(Length) +lengthInfo.Zero; // Length.Zero ``` #### Construct quantity @@ -201,11 +202,11 @@ Enum userSelectedUnit = LengthUnit.Millimeter; IQuantity quantity = Length.FromCentimeters(3); // Later we convert to a unit -quantity.ToUnit(userSelectedUnit).Value; // 30 -quantity.ToUnit(userSelectedUnit).Unit; // LengthUnit.Millimeter +quantity.ToUnit(userSelectedUnit).Value; // 30 +quantity.ToUnit(userSelectedUnit).Unit; // LengthUnit.Millimeter quantity.ToUnit(userSelectedUnit).ToString(); // "30 mm" -quantity.ToUnit(PressureUnit.Pascal); // Throws exception, not compatible -quantity.As(userSelectedUnit); // 30 +quantity.ToUnit(PressureUnit.Pascal); // Throws exception, not compatible +quantity.As(userSelectedUnit); // 30 ``` #### Convert quantity to unit - From/To Enums @@ -231,24 +232,37 @@ UnitConverter.ConvertByAbbreviation(1, "Length", "cm", "mm"); // 10 mm This example shows how you can create a dynamic unit converter, where the user selects the quantity to convert, such as `Temperature`, then selects to convert from `DegreeCelsius` to `DegreeFahrenheit` and types in a numeric value for how many degrees Celsius to convert. +The quantity list box contains `QuantityType` values such as `QuantityType.Length` and the two unit list boxes contain `Enum` values, such as `LengthUnit.Meter`. #### Populate quantity selector Use `Quantity` to enumerate all quantity type enum values, such as `QuantityType.Length` and `QuantityType.Mass`. -**TODO Update me with new hash after merging PR.** -https://github.com/angularsen/UnitsNet/blob/82eed32d6bc607eeaf09a54958d566561ab19017/Samples/UnitConverter.Wpf/UnitConverter.Wpf/MainWindowVM.cs#L32 +```c# +this.Quantities = Quantity.Types; // QuantityType[] +``` #### Update unit lists when selecting new quantity So user can only choose from/to units compatible with the quantity type. -**TODO Update me with new hash after merging PR.** -https://github.com/angularsen/UnitsNet/blob/82eed32d6bc607eeaf09a54958d566561ab19017/Samples/UnitConverter.Wpf/UnitConverter.Wpf/MainWindowVM.cs#L140-L149 +```c# +QuantityInfo quantityInfo = Quantity.GetInfo(quantityType); + +_units.Clear(); +foreach (Enum unitValue in quantityInfo.Units) +{ + _units.Add(unitValue); +} +``` #### Update calculation on unit selection changed -Using `UnitConverter` to convert by quantity name such as `"Length"` and unit names like `"Centimeter"` and `"Meter"`. +Using `UnitConverter` to convert by unit enum values as given by the list selection `"Length"` and unit names like `"Centimeter"` and `"Meter"`. -**TODO Update me with new hash after merging PR.** -https://github.com/angularsen/UnitsNet/blob/82eed32d6bc607eeaf09a54958d566561ab19017/Samples/UnitConverter.Wpf/UnitConverter.Wpf/MainWindowVM.cs#L130-L138 +```c# +double convertedValue = UnitConverter.Convert( + FromValue, // numeric value + SelectedFromUnit.UnitEnumValue, // Enum, such as LengthUnit.Meter + SelectedToUnit.UnitEnumValue); // Enum, such as LengthUnit.Centimeter +``` ### Example: WPF app using IValueConverter to parse quantities from input From c170ec19f5c471687501406be7f93a412e2a3ecc Mon Sep 17 00:00:00 2001 From: Andreas Gullberg Larsen Date: Tue, 29 Jan 2019 00:03:31 +0100 Subject: [PATCH 29/36] Yet more README --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 01fa508e5f..3f606ccbf2 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ See [Upgrading from 3.x to 4.x](https://github.com/angularsen/UnitsNet/wiki/Upgr * [Statically typed quantities and units](#static-typing) to avoid mistakes and communicate intent * [Operator overloads](#operator-overloads) for arithmetic on quantities * [Parse and ToString()](#culture) supports cultures and localization -* [Dynamically parsing and converting](#dynamic-parsing) quantities and units +* [Dynamically parse and convert](#dynamic-parsing) quantities and units * [Example: Creating a unit converter app](#example-app) * [Example: WPF app using IValueConverter to parse quantities from input](#example-wpf-app-using-ivalueconverter-to-parse-quantities-from-input) * [Precision and accuracy](#precision) @@ -125,12 +125,12 @@ Unfortunately there is no built-in way to avoid this, either you need to ensure Example: `Length.Parse("1 pt")` throws `AmbiguousUnitParseException` with message `Cannot parse "pt" since it could be either of these: DtpPoint, PrinterPoint`. -### Dynamically Parse Quantities and Convert Units +### Dynamically Parse Quantities and Convert to Units Sometimes you need to work with quantities and units at runtime, such as parsing user input. There are a handful of classes to help with this: -- [Quantity](UnitsNet/CustomCode/Quantity.cs) for parsing and constructing quantities as well as looking up units, names and quantity information dynamically. +- [Quantity](UnitsNet/CustomCode/Quantity.cs) for parsing and constructing quantities as well as looking up units, names and quantity information dynamically - [UnitConverter](UnitsNet/UnitConverter.cs) for converting values to a different unit, with only strings or enum values - [UnitParser](UnitsNet/CustomCode/UnitParser.cs) for parsing unit abbreviation strings, such as `"cm"` to `LengthUnit.Centimeter` @@ -140,6 +140,7 @@ There are a handful of classes to help with this: string[] Quantity.Names; // ["Length", "Mass", ...] QuantityType[] Quantity.Types; // [QuantityType.Length, QuantityType.Mass, ...] QuantityInfo[] Quantity.Infos; // Information about all quantities and their units, types, values etc., see more below + QuantityInfo Quantity.GetInfo(QuantityType.Length); // Get information about Length ``` From e9875fbb101587ae4702a6e2c274f7ed7e081ad2 Mon Sep 17 00:00:00 2001 From: Andreas Gullberg Larsen Date: Tue, 29 Jan 2019 00:20:57 +0100 Subject: [PATCH 30/36] Fix code generation --- UnitsNet/GeneratedCode/Quantity.g.cs | 11 ++++-- ...clude-GenerateStaticQuantitySourceCode.ps1 | 38 +++++++++++++++++-- 2 files changed, 42 insertions(+), 7 deletions(-) diff --git a/UnitsNet/GeneratedCode/Quantity.g.cs b/UnitsNet/GeneratedCode/Quantity.g.cs index 377512c97b..10c6f23a9c 100644 --- a/UnitsNet/GeneratedCode/Quantity.g.cs +++ b/UnitsNet/GeneratedCode/Quantity.g.cs @@ -73,7 +73,12 @@ public static IQuantity From(FromValue value, Enum unit) } /// - public static bool TryFrom(double value, Enum unit, out IQuantity quantity) +#if WINDOWS_UWP + internal +#else + public +#endif + static bool TryFrom(double value, Enum unit, out IQuantity quantity) { // Implicit cast to FromValue would prevent TryFrom from being called, // so we need to explicitly check this here for double arguments. @@ -381,9 +386,9 @@ public static bool TryFrom(FromValue value, Enum unit, out IQuantity quantity) /// /// Dynamically parse a quantity string representation. /// + /// The format provider to use for lookup. Defaults to if null. /// Type of quantity, such as . /// Quantity string representation, such as "1.5 kg". Must be compatible with given quantity type. - /// The format provider to use for lookup. Defaults to if null. /// The parsed quantity. /// Type must be of type UnitsNet.IQuantity -or- Type is not a known quantity type. public static IQuantity Parse([CanBeNull] IFormatProvider formatProvider, Type quantityType, string quantityString) @@ -403,10 +408,10 @@ public static bool TryParse(Type quantityType, string quantityString, out IQuant /// /// Try to dynamically parse a quantity string representation. /// + /// The format provider to use for lookup. Defaults to if null. /// Type of quantity, such as . /// Quantity string representation, such as "1.5 kg". Must be compatible with given quantity type. /// The resulting quantity if successful, otherwise default. - /// The format provider to use for lookup. Defaults to if null. /// The parsed quantity. public static bool TryParse([CanBeNull] IFormatProvider formatProvider, Type quantityType, string quantityString, out IQuantity quantity) { diff --git a/UnitsNet/Scripts/Include-GenerateStaticQuantitySourceCode.ps1 b/UnitsNet/Scripts/Include-GenerateStaticQuantitySourceCode.ps1 index a3e7472135..e260b1ddca 100644 --- a/UnitsNet/Scripts/Include-GenerateStaticQuantitySourceCode.ps1 +++ b/UnitsNet/Scripts/Include-GenerateStaticQuantitySourceCode.ps1 @@ -42,6 +42,8 @@ function GenerateStaticQuantitySourceCode([Quantity[]]$quantities) using System; using System.Linq; +using JetBrains.Annotations; +using UnitsNet.InternalHelpers; using UnitsNet.Units; #if WINDOWS_UWP @@ -75,6 +77,25 @@ namespace UnitsNet $"Unit value {unit} of type {unit.GetType()} is not a known unit enum type. Expected types like UnitsNet.Units.LengthUnit. Did you pass in a third-party enum type defined outside UnitsNet library?"); } + /// +#if WINDOWS_UWP + internal +#else + public +#endif + static bool TryFrom(double value, Enum unit, out IQuantity quantity) + { + // Implicit cast to FromValue would prevent TryFrom from being called, + // so we need to explicitly check this here for double arguments. + if (double.IsNaN(value) || double.IsInfinity(value)) + { + quantity = default(IQuantity); + return false; + } + + return TryFrom((FromValue) value, unit, out quantity); + } + /// /// Try to dynamically construct a quantity. /// @@ -102,31 +123,40 @@ namespace UnitsNet } } + /// + public static IQuantity Parse(Type quantityType, string quantityString) => Parse(null, quantityType, quantityString); + /// /// Dynamically parse a quantity string representation. /// + /// The format provider to use for lookup. Defaults to if null. /// Type of quantity, such as . /// Quantity string representation, such as "1.5 kg". Must be compatible with given quantity type. /// The parsed quantity. /// Type must be of type UnitsNet.IQuantity -or- Type is not a known quantity type. - public static IQuantity Parse(Type quantityType, string quantityString) + public static IQuantity Parse([CanBeNull] IFormatProvider formatProvider, Type quantityType, string quantityString) { if (!typeof(IQuantity).IsAssignableFrom(quantityType)) throw new ArgumentException($"Type {quantityType} must be of type UnitsNet.IQuantity."); - if (TryParse(quantityType, quantityString, out IQuantity quantity)) return quantity; + if (TryParse(formatProvider, quantityType, quantityString, out IQuantity quantity)) return quantity; throw new ArgumentException($"Quantity string could not be parsed to quantity {quantityType}."); } + /// + public static bool TryParse(Type quantityType, string quantityString, out IQuantity quantity) => + TryParse(null, quantityType, quantityString, out quantity); + /// /// Try to dynamically parse a quantity string representation. /// + /// The format provider to use for lookup. Defaults to if null. /// Type of quantity, such as . /// Quantity string representation, such as "1.5 kg". Must be compatible with given quantity type. /// The resulting quantity if successful, otherwise default. /// The parsed quantity. - public static bool TryParse(Type quantityType, string quantityString, out IQuantity quantity) + public static bool TryParse([CanBeNull] IFormatProvider formatProvider, Type quantityType, string quantityString, out IQuantity quantity) { quantity = default(IQuantity); @@ -138,7 +168,7 @@ namespace UnitsNet "@; foreach ($quantity in $quantities) { $quantityName = $quantity.Name;@" if (quantityType == typeof($quantityName)) - return parser.TryParse<$quantityName, $($quantityName)Unit>(quantityString, null, $quantityName.From, out quantity); + return parser.TryParse<$quantityName, $($quantityName)Unit>(quantityString, formatProvider, $quantityName.From, out quantity); "@; }@" throw new ArgumentException( From 34a5ee08a2629ff809cfbb26e5ead5f8d920de20 Mon Sep 17 00:00:00 2001 From: Tristan Milnthorp Date: Tue, 29 Jan 2019 11:06:33 -0500 Subject: [PATCH 31/36] Adding BaseDimensions to QuantityInfo --- UnitsNet.Tests/QuantityInfoTest.cs | 45 ++++++++++++++++--- .../Acceleration.WindowsRuntimeComponent.g.cs | 2 +- ...ntOfSubstance.WindowsRuntimeComponent.g.cs | 2 +- ...mplitudeRatio.WindowsRuntimeComponent.g.cs | 2 +- .../Angle.WindowsRuntimeComponent.g.cs | 2 +- ...pparentEnergy.WindowsRuntimeComponent.g.cs | 2 +- ...ApparentPower.WindowsRuntimeComponent.g.cs | 2 +- .../Area.WindowsRuntimeComponent.g.cs | 2 +- .../AreaDensity.WindowsRuntimeComponent.g.cs | 2 +- ...mentOfInertia.WindowsRuntimeComponent.g.cs | 2 +- .../BitRate.WindowsRuntimeComponent.g.cs | 2 +- ...elConsumption.WindowsRuntimeComponent.g.cs | 2 +- .../Capacitance.WindowsRuntimeComponent.g.cs | 2 +- ...rmalExpansion.WindowsRuntimeComponent.g.cs | 2 +- .../Density.WindowsRuntimeComponent.g.cs | 2 +- .../Duration.WindowsRuntimeComponent.g.cs | 2 +- ...amicViscosity.WindowsRuntimeComponent.g.cs | 2 +- ...ricAdmittance.WindowsRuntimeComponent.g.cs | 2 +- ...lectricCharge.WindowsRuntimeComponent.g.cs | 2 +- ...ChargeDensity.WindowsRuntimeComponent.g.cs | 2 +- ...icConductance.WindowsRuntimeComponent.g.cs | 2 +- ...cConductivity.WindowsRuntimeComponent.g.cs | 2 +- ...ectricCurrent.WindowsRuntimeComponent.g.cs | 2 +- ...urrentDensity.WindowsRuntimeComponent.g.cs | 2 +- ...rrentGradient.WindowsRuntimeComponent.g.cs | 2 +- ...ElectricField.WindowsRuntimeComponent.g.cs | 2 +- ...ricInductance.WindowsRuntimeComponent.g.cs | 2 +- ...tricPotential.WindowsRuntimeComponent.g.cs | 2 +- ...icPotentialAc.WindowsRuntimeComponent.g.cs | 2 +- ...icPotentialDc.WindowsRuntimeComponent.g.cs | 2 +- ...ricResistance.WindowsRuntimeComponent.g.cs | 2 +- ...icResistivity.WindowsRuntimeComponent.g.cs | 2 +- .../Energy.WindowsRuntimeComponent.g.cs | 2 +- .../Entropy.WindowsRuntimeComponent.g.cs | 2 +- .../Force.WindowsRuntimeComponent.g.cs | 2 +- ...rceChangeRate.WindowsRuntimeComponent.g.cs | 2 +- ...orcePerLength.WindowsRuntimeComponent.g.cs | 2 +- .../Frequency.WindowsRuntimeComponent.g.cs | 2 +- .../HeatFlux.WindowsRuntimeComponent.g.cs | 2 +- ...erCoefficient.WindowsRuntimeComponent.g.cs | 2 +- .../Illuminance.WindowsRuntimeComponent.g.cs | 2 +- .../Information.WindowsRuntimeComponent.g.cs | 2 +- .../Irradiance.WindowsRuntimeComponent.g.cs | 2 +- .../Irradiation.WindowsRuntimeComponent.g.cs | 2 +- ...aticViscosity.WindowsRuntimeComponent.g.cs | 2 +- .../LapseRate.WindowsRuntimeComponent.g.cs | 2 +- .../Length.WindowsRuntimeComponent.g.cs | 2 +- .../Level.WindowsRuntimeComponent.g.cs | 2 +- ...LinearDensity.WindowsRuntimeComponent.g.cs | 2 +- .../LuminousFlux.WindowsRuntimeComponent.g.cs | 2 +- ...nousIntensity.WindowsRuntimeComponent.g.cs | 2 +- ...MagneticField.WindowsRuntimeComponent.g.cs | 2 +- .../MagneticFlux.WindowsRuntimeComponent.g.cs | 2 +- ...Magnetization.WindowsRuntimeComponent.g.cs | 2 +- .../Mass.WindowsRuntimeComponent.g.cs | 2 +- .../MassFlow.WindowsRuntimeComponent.g.cs | 2 +- .../MassFlux.WindowsRuntimeComponent.g.cs | 2 +- ...mentOfInertia.WindowsRuntimeComponent.g.cs | 2 +- .../MolarEnergy.WindowsRuntimeComponent.g.cs | 2 +- .../MolarEntropy.WindowsRuntimeComponent.g.cs | 2 +- .../MolarMass.WindowsRuntimeComponent.g.cs | 2 +- .../Molarity.WindowsRuntimeComponent.g.cs | 2 +- .../Permeability.WindowsRuntimeComponent.g.cs | 2 +- .../Permittivity.WindowsRuntimeComponent.g.cs | 2 +- .../Power.WindowsRuntimeComponent.g.cs | 2 +- .../PowerDensity.WindowsRuntimeComponent.g.cs | 2 +- .../PowerRatio.WindowsRuntimeComponent.g.cs | 2 +- .../Pressure.WindowsRuntimeComponent.g.cs | 2 +- ...ureChangeRate.WindowsRuntimeComponent.g.cs | 2 +- .../Ratio.WindowsRuntimeComponent.g.cs | 2 +- ...eactiveEnergy.WindowsRuntimeComponent.g.cs | 2 +- ...ReactivePower.WindowsRuntimeComponent.g.cs | 2 +- ...lAcceleration.WindowsRuntimeComponent.g.cs | 2 +- ...tationalSpeed.WindowsRuntimeComponent.g.cs | 2 +- ...onalStiffness.WindowsRuntimeComponent.g.cs | 2 +- ...nessPerLength.WindowsRuntimeComponent.g.cs | 2 +- .../SolidAngle.WindowsRuntimeComponent.g.cs | 2 +- ...pecificEnergy.WindowsRuntimeComponent.g.cs | 2 +- ...ecificEntropy.WindowsRuntimeComponent.g.cs | 2 +- ...pecificVolume.WindowsRuntimeComponent.g.cs | 2 +- ...pecificWeight.WindowsRuntimeComponent.g.cs | 2 +- .../Speed.WindowsRuntimeComponent.g.cs | 2 +- .../Temperature.WindowsRuntimeComponent.g.cs | 2 +- ...ureChangeRate.WindowsRuntimeComponent.g.cs | 2 +- ...peratureDelta.WindowsRuntimeComponent.g.cs | 2 +- ...lConductivity.WindowsRuntimeComponent.g.cs | 2 +- ...malResistance.WindowsRuntimeComponent.g.cs | 2 +- .../Torque.WindowsRuntimeComponent.g.cs | 2 +- .../VitaminA.WindowsRuntimeComponent.g.cs | 2 +- .../Volume.WindowsRuntimeComponent.g.cs | 2 +- .../VolumeFlow.WindowsRuntimeComponent.g.cs | 2 +- .../Quantities/Acceleration.NetFramework.g.cs | 2 +- .../AmountOfSubstance.NetFramework.g.cs | 2 +- .../AmplitudeRatio.NetFramework.g.cs | 2 +- .../Quantities/Angle.NetFramework.g.cs | 2 +- .../ApparentEnergy.NetFramework.g.cs | 2 +- .../ApparentPower.NetFramework.g.cs | 2 +- .../Quantities/Area.NetFramework.g.cs | 2 +- .../Quantities/AreaDensity.NetFramework.g.cs | 2 +- .../AreaMomentOfInertia.NetFramework.g.cs | 2 +- .../Quantities/BitRate.NetFramework.g.cs | 2 +- ...eSpecificFuelConsumption.NetFramework.g.cs | 2 +- .../Quantities/Capacitance.NetFramework.g.cs | 2 +- ...icientOfThermalExpansion.NetFramework.g.cs | 2 +- .../Quantities/Density.NetFramework.g.cs | 2 +- .../Quantities/Duration.NetFramework.g.cs | 2 +- .../DynamicViscosity.NetFramework.g.cs | 2 +- .../ElectricAdmittance.NetFramework.g.cs | 2 +- .../ElectricCharge.NetFramework.g.cs | 2 +- .../ElectricChargeDensity.NetFramework.g.cs | 2 +- .../ElectricConductance.NetFramework.g.cs | 2 +- .../ElectricConductivity.NetFramework.g.cs | 2 +- .../ElectricCurrent.NetFramework.g.cs | 2 +- .../ElectricCurrentDensity.NetFramework.g.cs | 2 +- .../ElectricCurrentGradient.NetFramework.g.cs | 2 +- .../ElectricField.NetFramework.g.cs | 2 +- .../ElectricInductance.NetFramework.g.cs | 2 +- .../ElectricPotential.NetFramework.g.cs | 2 +- .../ElectricPotentialAc.NetFramework.g.cs | 2 +- .../ElectricPotentialDc.NetFramework.g.cs | 2 +- .../ElectricResistance.NetFramework.g.cs | 2 +- .../ElectricResistivity.NetFramework.g.cs | 2 +- .../Quantities/Energy.NetFramework.g.cs | 2 +- .../Quantities/Entropy.NetFramework.g.cs | 2 +- .../Quantities/Force.NetFramework.g.cs | 2 +- .../ForceChangeRate.NetFramework.g.cs | 2 +- .../ForcePerLength.NetFramework.g.cs | 2 +- .../Quantities/Frequency.NetFramework.g.cs | 2 +- .../Quantities/HeatFlux.NetFramework.g.cs | 2 +- .../HeatTransferCoefficient.NetFramework.g.cs | 2 +- .../Quantities/Illuminance.NetFramework.g.cs | 2 +- .../Quantities/Information.NetFramework.g.cs | 2 +- .../Quantities/Irradiance.NetFramework.g.cs | 2 +- .../Quantities/Irradiation.NetFramework.g.cs | 2 +- .../KinematicViscosity.NetFramework.g.cs | 2 +- .../Quantities/LapseRate.NetFramework.g.cs | 2 +- .../Quantities/Length.NetFramework.g.cs | 2 +- .../Quantities/Level.NetFramework.g.cs | 2 +- .../LinearDensity.NetFramework.g.cs | 2 +- .../Quantities/LuminousFlux.NetFramework.g.cs | 2 +- .../LuminousIntensity.NetFramework.g.cs | 2 +- .../MagneticField.NetFramework.g.cs | 2 +- .../Quantities/MagneticFlux.NetFramework.g.cs | 2 +- .../Magnetization.NetFramework.g.cs | 2 +- .../Quantities/Mass.NetFramework.g.cs | 2 +- .../Quantities/MassFlow.NetFramework.g.cs | 2 +- .../Quantities/MassFlux.NetFramework.g.cs | 2 +- .../MassMomentOfInertia.NetFramework.g.cs | 2 +- .../Quantities/MolarEnergy.NetFramework.g.cs | 2 +- .../Quantities/MolarEntropy.NetFramework.g.cs | 2 +- .../Quantities/MolarMass.NetFramework.g.cs | 2 +- .../Quantities/Molarity.NetFramework.g.cs | 2 +- .../Quantities/Permeability.NetFramework.g.cs | 2 +- .../Quantities/Permittivity.NetFramework.g.cs | 2 +- .../Quantities/Power.NetFramework.g.cs | 2 +- .../Quantities/PowerDensity.NetFramework.g.cs | 2 +- .../Quantities/PowerRatio.NetFramework.g.cs | 2 +- .../Quantities/Pressure.NetFramework.g.cs | 2 +- .../PressureChangeRate.NetFramework.g.cs | 2 +- .../Quantities/Ratio.NetFramework.g.cs | 2 +- .../ReactiveEnergy.NetFramework.g.cs | 2 +- .../ReactivePower.NetFramework.g.cs | 2 +- .../RotationalAcceleration.NetFramework.g.cs | 2 +- .../RotationalSpeed.NetFramework.g.cs | 2 +- .../RotationalStiffness.NetFramework.g.cs | 2 +- ...tionalStiffnessPerLength.NetFramework.g.cs | 2 +- .../Quantities/SolidAngle.NetFramework.g.cs | 2 +- .../SpecificEnergy.NetFramework.g.cs | 2 +- .../SpecificEntropy.NetFramework.g.cs | 2 +- .../SpecificVolume.NetFramework.g.cs | 2 +- .../SpecificWeight.NetFramework.g.cs | 2 +- .../Quantities/Speed.NetFramework.g.cs | 2 +- .../Quantities/Temperature.NetFramework.g.cs | 2 +- .../TemperatureChangeRate.NetFramework.g.cs | 2 +- .../TemperatureDelta.NetFramework.g.cs | 2 +- .../ThermalConductivity.NetFramework.g.cs | 2 +- .../ThermalResistance.NetFramework.g.cs | 2 +- .../Quantities/Torque.NetFramework.g.cs | 2 +- .../Quantities/VitaminA.NetFramework.g.cs | 2 +- .../Quantities/Volume.NetFramework.g.cs | 2 +- .../Quantities/VolumeFlow.NetFramework.g.cs | 2 +- UnitsNet/QuantityInfo.cs | 18 +++++--- .../Include-GenerateQuantitySourceCode.ps1 | 2 +- 183 files changed, 232 insertions(+), 193 deletions(-) diff --git a/UnitsNet.Tests/QuantityInfoTest.cs b/UnitsNet.Tests/QuantityInfoTest.cs index 191e9a35e9..b3818c342e 100644 --- a/UnitsNet.Tests/QuantityInfoTest.cs +++ b/UnitsNet.Tests/QuantityInfoTest.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). +// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). // https://github.com/angularsen/UnitsNet // // Permission is hereby granted, free of charge, to any person obtaining a copy @@ -21,6 +21,7 @@ using System; using System.Diagnostics.CodeAnalysis; +using System.Linq; using UnitsNet.Units; using Xunit; @@ -34,14 +35,16 @@ public void Constructor_AssignsProperties() var expectedZero = Length.FromCentimeters(10); var expectedUnits = new Enum[] {LengthUnit.Centimeter, LengthUnit.Kilometer}; var expectedQuantityType = QuantityType.Length; + var expectedBaseDimensions = Length.BaseDimensions; - var info = new QuantityInfo(expectedQuantityType, expectedUnits, expectedZero); + var info = new QuantityInfo(expectedQuantityType, expectedUnits, expectedZero, expectedBaseDimensions); Assert.Equal(expectedZero, info.Zero); Assert.Equal("Length", info.Name); Assert.Equal(expectedUnits, info.Units); Assert.Equal(new[]{"Centimeter", "Kilometer"}, info.UnitNames); Assert.Equal(expectedQuantityType, info.QuantityType); + Assert.Equal(expectedBaseDimensions, info.BaseDimensions); } [Fact] @@ -50,42 +53,70 @@ public void GenericsConstructor_AssignsProperties() var expectedZero = Length.FromCentimeters(10); var expectedUnits = new[] {LengthUnit.Centimeter, LengthUnit.Kilometer}; var expectedQuantityType = QuantityType.Length; + var expectedBaseDimensions = Length.BaseDimensions; - var info = new QuantityInfo(expectedQuantityType, expectedUnits, expectedZero); + var info = new QuantityInfo(expectedQuantityType, expectedUnits, expectedZero, expectedBaseDimensions); Assert.Equal(expectedZero, info.Zero); Assert.Equal("Length", info.Name); Assert.Equal(expectedUnits, info.Units); Assert.Equal(new[]{"Centimeter", "Kilometer"}, info.UnitNames); Assert.Equal(expectedQuantityType, info.QuantityType); + Assert.Equal(expectedBaseDimensions, info.BaseDimensions); + } + + [Fact] + public void Constructor_GivenNullAsQuantityType_ThrowsArgumentException() + { + Assert.Throws(() => new QuantityInfo(QuantityType.Undefined, new Enum[0], Length.Zero, Length.BaseDimensions)); + } + + [Fact] + public void GenericsConstructor_GivenNullAsQuantityType_ThrowsArgumentException() + { + Assert.Throws(() => new QuantityInfo(QuantityType.Undefined, Length.Units, Length.Zero, Length.BaseDimensions)); } [Fact] [SuppressMessage("ReSharper", "AssignNullToNotNullAttribute")] public void Constructor_GivenNullAsUnits_ThrowsArgumentNullException() { - Assert.Throws(() => new QuantityInfo(QuantityType.Length, null, null)); + Assert.Throws(() => new QuantityInfo(QuantityType.Length, null, Length.Zero, Length.BaseDimensions)); } [Fact] [SuppressMessage("ReSharper", "AssignNullToNotNullAttribute")] public void GenericsConstructor_GivenNullAsUnits_ThrowsArgumentNullException() { - Assert.Throws(() => new QuantityInfo(QuantityType.Length, null, null)); + Assert.Throws(() => new QuantityInfo(QuantityType.Length, null, Length.Zero, Length.BaseDimensions)); } [Fact] [SuppressMessage("ReSharper", "AssignNullToNotNullAttribute")] public void Constructor_GivenNullAsZero_ThrowsArgumentNullException() { - Assert.Throws(() => new QuantityInfo(QuantityType.Length, new Enum[0], null)); + Assert.Throws(() => new QuantityInfo(QuantityType.Length, new Enum[0], null, Length.BaseDimensions)); } [Fact] [SuppressMessage("ReSharper", "AssignNullToNotNullAttribute")] public void GenericsConstructor_GivenNullAsZero_ThrowsArgumentNullException() { - Assert.Throws(() => new QuantityInfo(QuantityType.Length, new LengthUnit[0], null)); + Assert.Throws(() => new QuantityInfo(QuantityType.Length, Length.Units, null, Length.BaseDimensions)); + } + + [Fact] + [SuppressMessage("ReSharper", "AssignNullToNotNullAttribute")] + public void Constructor_GivenNullAsBaseDimensions_ThrowsArgumentNullException() + { + Assert.Throws(() => new QuantityInfo(QuantityType.Length, new Enum[0], Length.Zero, null)); + } + + [Fact] + [SuppressMessage("ReSharper", "AssignNullToNotNullAttribute")] + public void GenericsConstructor_GivenNullAsBaseDimensions_ThrowsArgumentNullException() + { + Assert.Throws(() => new QuantityInfo(QuantityType.Length, Length.Units, Length.Zero, null)); } } } diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Acceleration.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Acceleration.WindowsRuntimeComponent.g.cs index 5a2dee4c52..ce45887762 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Acceleration.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Acceleration.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Acceleration : IQuantity static Acceleration() { BaseDimensions = new BaseDimensions(1, 0, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Acceleration, Units, Zero); + Info = new QuantityInfo(QuantityType.Acceleration, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit MeterPerSecondSquared. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmountOfSubstance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmountOfSubstance.WindowsRuntimeComponent.g.cs index decf8e8424..cd74aaa42c 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmountOfSubstance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmountOfSubstance.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class AmountOfSubstance : IQuantity static AmountOfSubstance() { BaseDimensions = new BaseDimensions(0, 0, 0, 0, 0, 1, 0); - Info = new QuantityInfo(QuantityType.AmountOfSubstance, Units, Zero); + Info = new QuantityInfo(QuantityType.AmountOfSubstance, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Mole. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmplitudeRatio.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmplitudeRatio.WindowsRuntimeComponent.g.cs index 82f6a28dad..9f2a696ebe 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmplitudeRatio.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmplitudeRatio.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class AmplitudeRatio : IQuantity static AmplitudeRatio() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.AmplitudeRatio, Units, Zero); + Info = new QuantityInfo(QuantityType.AmplitudeRatio, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit DecibelVolt. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Angle.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Angle.WindowsRuntimeComponent.g.cs index d212af1083..64763965a3 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Angle.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Angle.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Angle : IQuantity static Angle() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.Angle, Units, Zero); + Info = new QuantityInfo(QuantityType.Angle, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Degree. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentEnergy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentEnergy.WindowsRuntimeComponent.g.cs index c34d49274c..9a44fea18c 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentEnergy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentEnergy.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class ApparentEnergy : IQuantity static ApparentEnergy() { BaseDimensions = new BaseDimensions(2, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ApparentEnergy, Units, Zero); + Info = new QuantityInfo(QuantityType.ApparentEnergy, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit VoltampereHour. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentPower.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentPower.WindowsRuntimeComponent.g.cs index 083cbdc642..4b6436d7b2 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentPower.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentPower.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class ApparentPower : IQuantity static ApparentPower() { BaseDimensions = new BaseDimensions(2, 1, -3, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ApparentPower, Units, Zero); + Info = new QuantityInfo(QuantityType.ApparentPower, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Voltampere. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Area.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Area.WindowsRuntimeComponent.g.cs index 11e1a1e15b..15a5433c56 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Area.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Area.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Area : IQuantity static Area() { BaseDimensions = new BaseDimensions(2, 0, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Area, Units, Zero); + Info = new QuantityInfo(QuantityType.Area, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit SquareMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaDensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaDensity.WindowsRuntimeComponent.g.cs index 6cf18426bb..0e7dd23efc 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaDensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaDensity.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class AreaDensity : IQuantity static AreaDensity() { BaseDimensions = new BaseDimensions(-2, 1, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.AreaDensity, Units, Zero); + Info = new QuantityInfo(QuantityType.AreaDensity, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit KilogramPerSquareMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaMomentOfInertia.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaMomentOfInertia.WindowsRuntimeComponent.g.cs index 89cfafb054..d9bd58c5d3 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaMomentOfInertia.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaMomentOfInertia.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class AreaMomentOfInertia : IQuantity static AreaMomentOfInertia() { BaseDimensions = new BaseDimensions(4, 0, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.AreaMomentOfInertia, Units, Zero); + Info = new QuantityInfo(QuantityType.AreaMomentOfInertia, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit MeterToTheFourth. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BitRate.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BitRate.WindowsRuntimeComponent.g.cs index baedc5dc90..28ca7a79f8 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BitRate.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BitRate.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class BitRate : IQuantity static BitRate() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.BitRate, Units, Zero); + Info = new QuantityInfo(QuantityType.BitRate, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit BitPerSecond. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.WindowsRuntimeComponent.g.cs index 59860c8da4..4a9f8d5d55 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class BrakeSpecificFuelConsumption : IQuantity static BrakeSpecificFuelConsumption() { BaseDimensions = new BaseDimensions(-2, 0, 2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.BrakeSpecificFuelConsumption, Units, Zero); + Info = new QuantityInfo(QuantityType.BrakeSpecificFuelConsumption, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit KilogramPerJoule. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Capacitance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Capacitance.WindowsRuntimeComponent.g.cs index e9cf19d4d3..dfede8b9d2 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Capacitance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Capacitance.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class Capacitance : IQuantity static Capacitance() { BaseDimensions = new BaseDimensions(-2, -1, 4, 2, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Capacitance, Units, Zero); + Info = new QuantityInfo(QuantityType.Capacitance, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Farad. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/CoefficientOfThermalExpansion.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/CoefficientOfThermalExpansion.WindowsRuntimeComponent.g.cs index 7ef4549592..af7283a25f 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/CoefficientOfThermalExpansion.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/CoefficientOfThermalExpansion.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class CoefficientOfThermalExpansion : IQuantity static CoefficientOfThermalExpansion() { BaseDimensions = new BaseDimensions(0, 0, 0, 0, -1, 0, 0); - Info = new QuantityInfo(QuantityType.CoefficientOfThermalExpansion, Units, Zero); + Info = new QuantityInfo(QuantityType.CoefficientOfThermalExpansion, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit InverseKelvin. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Density.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Density.WindowsRuntimeComponent.g.cs index e1e622e111..58c3d20912 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Density.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Density.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class Density : IQuantity static Density() { BaseDimensions = new BaseDimensions(-3, 1, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Density, Units, Zero); + Info = new QuantityInfo(QuantityType.Density, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit KilogramPerCubicMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Duration.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Duration.WindowsRuntimeComponent.g.cs index 87f827919d..44211c8066 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Duration.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Duration.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Duration : IQuantity static Duration() { BaseDimensions = new BaseDimensions(0, 0, 1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Duration, Units, Zero); + Info = new QuantityInfo(QuantityType.Duration, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Second. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/DynamicViscosity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/DynamicViscosity.WindowsRuntimeComponent.g.cs index 378dbbe2e2..3627a562ba 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/DynamicViscosity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/DynamicViscosity.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class DynamicViscosity : IQuantity static DynamicViscosity() { BaseDimensions = new BaseDimensions(-1, 1, -1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.DynamicViscosity, Units, Zero); + Info = new QuantityInfo(QuantityType.DynamicViscosity, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit NewtonSecondPerMeterSquared. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricAdmittance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricAdmittance.WindowsRuntimeComponent.g.cs index 2b8cbdc709..d392948c32 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricAdmittance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricAdmittance.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class ElectricAdmittance : IQuantity static ElectricAdmittance() { BaseDimensions = new BaseDimensions(-2, -1, 3, 2, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricAdmittance, Units, Zero); + Info = new QuantityInfo(QuantityType.ElectricAdmittance, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Siemens. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCharge.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCharge.WindowsRuntimeComponent.g.cs index 6957a73e37..a09cffff7c 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCharge.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCharge.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class ElectricCharge : IQuantity static ElectricCharge() { BaseDimensions = new BaseDimensions(0, 0, 1, 1, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricCharge, Units, Zero); + Info = new QuantityInfo(QuantityType.ElectricCharge, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Coulomb. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricChargeDensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricChargeDensity.WindowsRuntimeComponent.g.cs index 883401f2b8..ff05b31e21 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricChargeDensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricChargeDensity.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class ElectricChargeDensity : IQuantity static ElectricChargeDensity() { BaseDimensions = new BaseDimensions(-3, 0, 1, 1, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricChargeDensity, Units, Zero); + Info = new QuantityInfo(QuantityType.ElectricChargeDensity, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit CoulombPerCubicMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductance.WindowsRuntimeComponent.g.cs index 6de7760d99..99b15c866d 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductance.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class ElectricConductance : IQuantity static ElectricConductance() { BaseDimensions = new BaseDimensions(-2, -1, 3, 2, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricConductance, Units, Zero); + Info = new QuantityInfo(QuantityType.ElectricConductance, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Siemens. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductivity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductivity.WindowsRuntimeComponent.g.cs index befd6576fd..f721c6c71d 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductivity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductivity.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class ElectricConductivity : IQuantity static ElectricConductivity() { BaseDimensions = new BaseDimensions(-3, -1, 3, 2, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricConductivity, Units, Zero); + Info = new QuantityInfo(QuantityType.ElectricConductivity, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit SiemensPerMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrent.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrent.WindowsRuntimeComponent.g.cs index 151ad1674f..cbdc41c317 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrent.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrent.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class ElectricCurrent : IQuantity static ElectricCurrent() { BaseDimensions = new BaseDimensions(0, 0, 0, 1, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricCurrent, Units, Zero); + Info = new QuantityInfo(QuantityType.ElectricCurrent, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Ampere. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentDensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentDensity.WindowsRuntimeComponent.g.cs index 423790c102..e3d7ff6c62 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentDensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentDensity.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class ElectricCurrentDensity : IQuantity static ElectricCurrentDensity() { BaseDimensions = new BaseDimensions(-2, 0, 0, 1, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricCurrentDensity, Units, Zero); + Info = new QuantityInfo(QuantityType.ElectricCurrentDensity, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit AmperePerSquareMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentGradient.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentGradient.WindowsRuntimeComponent.g.cs index 8d9876e9be..7af0c00e1f 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentGradient.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentGradient.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class ElectricCurrentGradient : IQuantity static ElectricCurrentGradient() { BaseDimensions = new BaseDimensions(0, 0, -1, 1, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricCurrentGradient, Units, Zero); + Info = new QuantityInfo(QuantityType.ElectricCurrentGradient, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit AmperePerSecond. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricField.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricField.WindowsRuntimeComponent.g.cs index 0a78639342..b2a7bf14a1 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricField.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricField.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class ElectricField : IQuantity static ElectricField() { BaseDimensions = new BaseDimensions(1, 1, -3, -1, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricField, Units, Zero); + Info = new QuantityInfo(QuantityType.ElectricField, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit VoltPerMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricInductance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricInductance.WindowsRuntimeComponent.g.cs index fe5646bb86..ac81283755 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricInductance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricInductance.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class ElectricInductance : IQuantity static ElectricInductance() { BaseDimensions = new BaseDimensions(2, 1, -2, -2, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricInductance, Units, Zero); + Info = new QuantityInfo(QuantityType.ElectricInductance, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Henry. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotential.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotential.WindowsRuntimeComponent.g.cs index 6bc75989e7..dce16864d7 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotential.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotential.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class ElectricPotential : IQuantity static ElectricPotential() { BaseDimensions = new BaseDimensions(2, 1, -3, -1, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricPotential, Units, Zero); + Info = new QuantityInfo(QuantityType.ElectricPotential, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Volt. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialAc.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialAc.WindowsRuntimeComponent.g.cs index aea1b4978c..fc672fb1fd 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialAc.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialAc.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class ElectricPotentialAc : IQuantity static ElectricPotentialAc() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.ElectricPotentialAc, Units, Zero); + Info = new QuantityInfo(QuantityType.ElectricPotentialAc, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit VoltAc. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialDc.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialDc.WindowsRuntimeComponent.g.cs index f490bb66db..c3307a2dea 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialDc.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialDc.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class ElectricPotentialDc : IQuantity static ElectricPotentialDc() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.ElectricPotentialDc, Units, Zero); + Info = new QuantityInfo(QuantityType.ElectricPotentialDc, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit VoltDc. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistance.WindowsRuntimeComponent.g.cs index c3705345a8..8a5158df14 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistance.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class ElectricResistance : IQuantity static ElectricResistance() { BaseDimensions = new BaseDimensions(2, 1, -3, -2, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricResistance, Units, Zero); + Info = new QuantityInfo(QuantityType.ElectricResistance, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Ohm. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistivity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistivity.WindowsRuntimeComponent.g.cs index ba6bfc4560..bb14eb0728 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistivity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistivity.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class ElectricResistivity : IQuantity static ElectricResistivity() { BaseDimensions = new BaseDimensions(3, 1, -3, -2, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricResistivity, Units, Zero); + Info = new QuantityInfo(QuantityType.ElectricResistivity, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit OhmMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Energy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Energy.WindowsRuntimeComponent.g.cs index cc8d68a0a1..a0617b8d46 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Energy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Energy.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Energy : IQuantity static Energy() { BaseDimensions = new BaseDimensions(2, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Energy, Units, Zero); + Info = new QuantityInfo(QuantityType.Energy, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Joule. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Entropy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Entropy.WindowsRuntimeComponent.g.cs index d18e9cc35e..471f0f9171 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Entropy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Entropy.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Entropy : IQuantity static Entropy() { BaseDimensions = new BaseDimensions(2, 1, -2, 0, -1, 0, 0); - Info = new QuantityInfo(QuantityType.Entropy, Units, Zero); + Info = new QuantityInfo(QuantityType.Entropy, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit JoulePerKelvin. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Force.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Force.WindowsRuntimeComponent.g.cs index 2b3d10f691..d5a6e4a92c 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Force.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Force.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Force : IQuantity static Force() { BaseDimensions = new BaseDimensions(1, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Force, Units, Zero); + Info = new QuantityInfo(QuantityType.Force, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Newton. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForceChangeRate.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForceChangeRate.WindowsRuntimeComponent.g.cs index 0306557864..b49ba37aae 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForceChangeRate.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForceChangeRate.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class ForceChangeRate : IQuantity static ForceChangeRate() { BaseDimensions = new BaseDimensions(1, 1, -3, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ForceChangeRate, Units, Zero); + Info = new QuantityInfo(QuantityType.ForceChangeRate, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit NewtonPerSecond. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForcePerLength.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForcePerLength.WindowsRuntimeComponent.g.cs index d39eb24002..8f1ef88b83 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForcePerLength.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForcePerLength.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class ForcePerLength : IQuantity static ForcePerLength() { BaseDimensions = new BaseDimensions(0, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ForcePerLength, Units, Zero); + Info = new QuantityInfo(QuantityType.ForcePerLength, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit NewtonPerMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Frequency.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Frequency.WindowsRuntimeComponent.g.cs index 6efc55e701..150960699a 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Frequency.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Frequency.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Frequency : IQuantity static Frequency() { BaseDimensions = new BaseDimensions(0, 0, -1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Frequency, Units, Zero); + Info = new QuantityInfo(QuantityType.Frequency, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Hertz. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatFlux.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatFlux.WindowsRuntimeComponent.g.cs index 296fc66ce4..8fb3a5d0e4 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatFlux.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatFlux.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class HeatFlux : IQuantity static HeatFlux() { BaseDimensions = new BaseDimensions(0, 1, -3, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.HeatFlux, Units, Zero); + Info = new QuantityInfo(QuantityType.HeatFlux, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit WattPerSquareMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatTransferCoefficient.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatTransferCoefficient.WindowsRuntimeComponent.g.cs index 25048bfeac..82c5a0cbf4 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatTransferCoefficient.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatTransferCoefficient.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class HeatTransferCoefficient : IQuantity static HeatTransferCoefficient() { BaseDimensions = new BaseDimensions(0, 1, -3, 0, -1, 0, 0); - Info = new QuantityInfo(QuantityType.HeatTransferCoefficient, Units, Zero); + Info = new QuantityInfo(QuantityType.HeatTransferCoefficient, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit WattPerSquareMeterKelvin. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Illuminance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Illuminance.WindowsRuntimeComponent.g.cs index ae35568f4d..645a6066f4 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Illuminance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Illuminance.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class Illuminance : IQuantity static Illuminance() { BaseDimensions = new BaseDimensions(-2, 0, 0, 0, 0, 0, 1); - Info = new QuantityInfo(QuantityType.Illuminance, Units, Zero); + Info = new QuantityInfo(QuantityType.Illuminance, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Lux. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Information.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Information.WindowsRuntimeComponent.g.cs index 3ea537f05c..2dce531387 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Information.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Information.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Information : IQuantity static Information() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.Information, Units, Zero); + Info = new QuantityInfo(QuantityType.Information, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Bit. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiance.WindowsRuntimeComponent.g.cs index 4dbb5dd4a6..ac0d21b651 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiance.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Irradiance : IQuantity static Irradiance() { BaseDimensions = new BaseDimensions(0, 1, -3, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Irradiance, Units, Zero); + Info = new QuantityInfo(QuantityType.Irradiance, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit WattPerSquareMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiation.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiation.WindowsRuntimeComponent.g.cs index f69dd7166b..8c95c7244a 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiation.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiation.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class Irradiation : IQuantity static Irradiation() { BaseDimensions = new BaseDimensions(0, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Irradiation, Units, Zero); + Info = new QuantityInfo(QuantityType.Irradiation, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit JoulePerSquareMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/KinematicViscosity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/KinematicViscosity.WindowsRuntimeComponent.g.cs index bab18abaf1..2bfb548c50 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/KinematicViscosity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/KinematicViscosity.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class KinematicViscosity : IQuantity static KinematicViscosity() { BaseDimensions = new BaseDimensions(2, 0, -1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.KinematicViscosity, Units, Zero); + Info = new QuantityInfo(QuantityType.KinematicViscosity, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit SquareMeterPerSecond. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LapseRate.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LapseRate.WindowsRuntimeComponent.g.cs index 6bd38bbb16..e670f4086f 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LapseRate.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LapseRate.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class LapseRate : IQuantity static LapseRate() { BaseDimensions = new BaseDimensions(-1, 0, 0, 0, 1, 0, 0); - Info = new QuantityInfo(QuantityType.LapseRate, Units, Zero); + Info = new QuantityInfo(QuantityType.LapseRate, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit DegreeCelsiusPerKilometer. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Length.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Length.WindowsRuntimeComponent.g.cs index 361b6ee4ad..bcbb2ca968 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Length.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Length.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Length : IQuantity static Length() { BaseDimensions = new BaseDimensions(1, 0, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Length, Units, Zero); + Info = new QuantityInfo(QuantityType.Length, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Meter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Level.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Level.WindowsRuntimeComponent.g.cs index ffd70ccc5e..611fc4e971 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Level.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Level.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Level : IQuantity static Level() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.Level, Units, Zero); + Info = new QuantityInfo(QuantityType.Level, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Decibel. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LinearDensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LinearDensity.WindowsRuntimeComponent.g.cs index f33f8d5378..86af4ab528 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LinearDensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LinearDensity.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class LinearDensity : IQuantity static LinearDensity() { BaseDimensions = new BaseDimensions(-1, 1, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.LinearDensity, Units, Zero); + Info = new QuantityInfo(QuantityType.LinearDensity, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit KilogramPerMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousFlux.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousFlux.WindowsRuntimeComponent.g.cs index 11cbc28acd..accdc79634 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousFlux.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousFlux.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class LuminousFlux : IQuantity static LuminousFlux() { BaseDimensions = new BaseDimensions(0, 0, 0, 0, 0, 0, 1); - Info = new QuantityInfo(QuantityType.LuminousFlux, Units, Zero); + Info = new QuantityInfo(QuantityType.LuminousFlux, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Lumen. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousIntensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousIntensity.WindowsRuntimeComponent.g.cs index 492db01a56..1b47b3e7e4 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousIntensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousIntensity.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class LuminousIntensity : IQuantity static LuminousIntensity() { BaseDimensions = new BaseDimensions(0, 0, 0, 0, 0, 0, 1); - Info = new QuantityInfo(QuantityType.LuminousIntensity, Units, Zero); + Info = new QuantityInfo(QuantityType.LuminousIntensity, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Candela. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticField.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticField.WindowsRuntimeComponent.g.cs index db29e5f0aa..aa88ba8af8 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticField.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticField.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class MagneticField : IQuantity static MagneticField() { BaseDimensions = new BaseDimensions(0, 1, -2, -1, 0, 0, 0); - Info = new QuantityInfo(QuantityType.MagneticField, Units, Zero); + Info = new QuantityInfo(QuantityType.MagneticField, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Tesla. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticFlux.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticFlux.WindowsRuntimeComponent.g.cs index c37e4235f5..c119bae1fa 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticFlux.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticFlux.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class MagneticFlux : IQuantity static MagneticFlux() { BaseDimensions = new BaseDimensions(2, 1, -2, -1, 0, 0, 0); - Info = new QuantityInfo(QuantityType.MagneticFlux, Units, Zero); + Info = new QuantityInfo(QuantityType.MagneticFlux, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Weber. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Magnetization.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Magnetization.WindowsRuntimeComponent.g.cs index 5c392d8187..0fdd89580f 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Magnetization.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Magnetization.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class Magnetization : IQuantity static Magnetization() { BaseDimensions = new BaseDimensions(-1, 0, 0, 1, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Magnetization, Units, Zero); + Info = new QuantityInfo(QuantityType.Magnetization, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit AmperePerMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Mass.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Mass.WindowsRuntimeComponent.g.cs index 6040027470..b6e28b33d7 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Mass.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Mass.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Mass : IQuantity static Mass() { BaseDimensions = new BaseDimensions(0, 1, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Mass, Units, Zero); + Info = new QuantityInfo(QuantityType.Mass, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Kilogram. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlow.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlow.WindowsRuntimeComponent.g.cs index 1e4f8e7ed7..542e98a4c5 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlow.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlow.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class MassFlow : IQuantity static MassFlow() { BaseDimensions = new BaseDimensions(0, 1, -1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.MassFlow, Units, Zero); + Info = new QuantityInfo(QuantityType.MassFlow, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit GramPerSecond. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlux.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlux.WindowsRuntimeComponent.g.cs index d4ac0e4e04..68f8245d16 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlux.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlux.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class MassFlux : IQuantity static MassFlux() { BaseDimensions = new BaseDimensions(-2, 1, -1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.MassFlux, Units, Zero); + Info = new QuantityInfo(QuantityType.MassFlux, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit KilogramPerSecondPerSquareMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassMomentOfInertia.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassMomentOfInertia.WindowsRuntimeComponent.g.cs index 21b635fac5..ada4f3bc10 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassMomentOfInertia.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassMomentOfInertia.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class MassMomentOfInertia : IQuantity static MassMomentOfInertia() { BaseDimensions = new BaseDimensions(2, 1, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.MassMomentOfInertia, Units, Zero); + Info = new QuantityInfo(QuantityType.MassMomentOfInertia, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit KilogramSquareMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEnergy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEnergy.WindowsRuntimeComponent.g.cs index c0de2f86ca..fe8d407b04 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEnergy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEnergy.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class MolarEnergy : IQuantity static MolarEnergy() { BaseDimensions = new BaseDimensions(2, 1, -2, 0, 0, -1, 0); - Info = new QuantityInfo(QuantityType.MolarEnergy, Units, Zero); + Info = new QuantityInfo(QuantityType.MolarEnergy, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit JoulePerMole. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEntropy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEntropy.WindowsRuntimeComponent.g.cs index af272398d8..0d31bfce35 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEntropy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEntropy.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class MolarEntropy : IQuantity static MolarEntropy() { BaseDimensions = new BaseDimensions(2, 1, -2, 0, -1, -1, 0); - Info = new QuantityInfo(QuantityType.MolarEntropy, Units, Zero); + Info = new QuantityInfo(QuantityType.MolarEntropy, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit JoulePerMoleKelvin. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarMass.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarMass.WindowsRuntimeComponent.g.cs index 1a5cd2ed47..d960cc66f9 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarMass.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarMass.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class MolarMass : IQuantity static MolarMass() { BaseDimensions = new BaseDimensions(0, 1, 0, 0, 0, -1, 0); - Info = new QuantityInfo(QuantityType.MolarMass, Units, Zero); + Info = new QuantityInfo(QuantityType.MolarMass, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit KilogramPerMole. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Molarity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Molarity.WindowsRuntimeComponent.g.cs index 06c5aa63d1..eff01830d3 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Molarity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Molarity.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class Molarity : IQuantity static Molarity() { BaseDimensions = new BaseDimensions(-3, 0, 0, 0, 0, 1, 0); - Info = new QuantityInfo(QuantityType.Molarity, Units, Zero); + Info = new QuantityInfo(QuantityType.Molarity, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit MolesPerCubicMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permeability.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permeability.WindowsRuntimeComponent.g.cs index 7b5f34781a..a2036addb7 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permeability.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permeability.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class Permeability : IQuantity static Permeability() { BaseDimensions = new BaseDimensions(1, 1, -2, -2, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Permeability, Units, Zero); + Info = new QuantityInfo(QuantityType.Permeability, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit HenryPerMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permittivity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permittivity.WindowsRuntimeComponent.g.cs index d4c013c797..f25fa969f3 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permittivity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permittivity.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class Permittivity : IQuantity static Permittivity() { BaseDimensions = new BaseDimensions(-3, -1, 4, 2, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Permittivity, Units, Zero); + Info = new QuantityInfo(QuantityType.Permittivity, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit FaradPerMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Power.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Power.WindowsRuntimeComponent.g.cs index 20cbd7b6bf..c876fc930c 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Power.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Power.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Power : IQuantity static Power() { BaseDimensions = new BaseDimensions(2, 1, -3, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Power, Units, Zero); + Info = new QuantityInfo(QuantityType.Power, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Watt. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerDensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerDensity.WindowsRuntimeComponent.g.cs index 41a7904aee..e30aa0393a 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerDensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerDensity.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class PowerDensity : IQuantity static PowerDensity() { BaseDimensions = new BaseDimensions(-1, 1, -3, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.PowerDensity, Units, Zero); + Info = new QuantityInfo(QuantityType.PowerDensity, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit WattPerCubicMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerRatio.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerRatio.WindowsRuntimeComponent.g.cs index 3b7518fe5d..e1b3290771 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerRatio.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerRatio.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class PowerRatio : IQuantity static PowerRatio() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.PowerRatio, Units, Zero); + Info = new QuantityInfo(QuantityType.PowerRatio, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit DecibelWatt. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Pressure.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Pressure.WindowsRuntimeComponent.g.cs index dacb74676d..8dc940e806 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Pressure.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Pressure.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Pressure : IQuantity static Pressure() { BaseDimensions = new BaseDimensions(-1, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Pressure, Units, Zero); + Info = new QuantityInfo(QuantityType.Pressure, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Pascal. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PressureChangeRate.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PressureChangeRate.WindowsRuntimeComponent.g.cs index 760668824a..236a6c7f83 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PressureChangeRate.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PressureChangeRate.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class PressureChangeRate : IQuantity static PressureChangeRate() { BaseDimensions = new BaseDimensions(-1, 1, -3, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.PressureChangeRate, Units, Zero); + Info = new QuantityInfo(QuantityType.PressureChangeRate, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit PascalPerSecond. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Ratio.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Ratio.WindowsRuntimeComponent.g.cs index 465e41420a..5f0d092054 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Ratio.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Ratio.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Ratio : IQuantity static Ratio() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.Ratio, Units, Zero); + Info = new QuantityInfo(QuantityType.Ratio, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit DecimalFraction. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactiveEnergy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactiveEnergy.WindowsRuntimeComponent.g.cs index 2fe9c333b0..841193fede 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactiveEnergy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactiveEnergy.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class ReactiveEnergy : IQuantity static ReactiveEnergy() { BaseDimensions = new BaseDimensions(2, 1, -1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ReactiveEnergy, Units, Zero); + Info = new QuantityInfo(QuantityType.ReactiveEnergy, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit VoltampereReactiveHour. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactivePower.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactivePower.WindowsRuntimeComponent.g.cs index 0142267097..fcfe1a8362 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactivePower.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactivePower.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class ReactivePower : IQuantity static ReactivePower() { BaseDimensions = new BaseDimensions(2, 1, -3, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ReactivePower, Units, Zero); + Info = new QuantityInfo(QuantityType.ReactivePower, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit VoltampereReactive. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalAcceleration.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalAcceleration.WindowsRuntimeComponent.g.cs index a41e08f011..9dda547135 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalAcceleration.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalAcceleration.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class RotationalAcceleration : IQuantity static RotationalAcceleration() { BaseDimensions = new BaseDimensions(0, 0, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.RotationalAcceleration, Units, Zero); + Info = new QuantityInfo(QuantityType.RotationalAcceleration, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit RadianPerSecondSquared. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalSpeed.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalSpeed.WindowsRuntimeComponent.g.cs index c09f299289..5d212c16d1 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalSpeed.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalSpeed.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class RotationalSpeed : IQuantity static RotationalSpeed() { BaseDimensions = new BaseDimensions(0, 0, -1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.RotationalSpeed, Units, Zero); + Info = new QuantityInfo(QuantityType.RotationalSpeed, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit RadianPerSecond. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffness.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffness.WindowsRuntimeComponent.g.cs index 1fb598ad57..42a4ab6bba 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffness.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffness.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class RotationalStiffness : IQuantity static RotationalStiffness() { BaseDimensions = new BaseDimensions(2, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.RotationalStiffness, Units, Zero); + Info = new QuantityInfo(QuantityType.RotationalStiffness, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit NewtonMeterPerRadian. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffnessPerLength.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffnessPerLength.WindowsRuntimeComponent.g.cs index 2ecce5060e..f982900708 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffnessPerLength.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffnessPerLength.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class RotationalStiffnessPerLength : IQuantity static RotationalStiffnessPerLength() { BaseDimensions = new BaseDimensions(1, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.RotationalStiffnessPerLength, Units, Zero); + Info = new QuantityInfo(QuantityType.RotationalStiffnessPerLength, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit NewtonMeterPerRadianPerMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SolidAngle.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SolidAngle.WindowsRuntimeComponent.g.cs index b12d58e0ce..35d60e4714 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SolidAngle.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SolidAngle.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class SolidAngle : IQuantity static SolidAngle() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.SolidAngle, Units, Zero); + Info = new QuantityInfo(QuantityType.SolidAngle, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Steradian. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEnergy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEnergy.WindowsRuntimeComponent.g.cs index 2023cfc29a..bd361f87bb 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEnergy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEnergy.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class SpecificEnergy : IQuantity static SpecificEnergy() { BaseDimensions = new BaseDimensions(2, 0, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.SpecificEnergy, Units, Zero); + Info = new QuantityInfo(QuantityType.SpecificEnergy, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit JoulePerKilogram. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEntropy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEntropy.WindowsRuntimeComponent.g.cs index 6c995f02df..1a73dd84df 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEntropy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEntropy.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class SpecificEntropy : IQuantity static SpecificEntropy() { BaseDimensions = new BaseDimensions(2, 0, -2, 0, -1, 0, 0); - Info = new QuantityInfo(QuantityType.SpecificEntropy, Units, Zero); + Info = new QuantityInfo(QuantityType.SpecificEntropy, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit JoulePerKilogramKelvin. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificVolume.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificVolume.WindowsRuntimeComponent.g.cs index 50b8424057..583709747a 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificVolume.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificVolume.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class SpecificVolume : IQuantity static SpecificVolume() { BaseDimensions = new BaseDimensions(3, -1, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.SpecificVolume, Units, Zero); + Info = new QuantityInfo(QuantityType.SpecificVolume, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit CubicMeterPerKilogram. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificWeight.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificWeight.WindowsRuntimeComponent.g.cs index 8f87d63ddd..9775009344 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificWeight.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificWeight.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class SpecificWeight : IQuantity static SpecificWeight() { BaseDimensions = new BaseDimensions(-2, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.SpecificWeight, Units, Zero); + Info = new QuantityInfo(QuantityType.SpecificWeight, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit NewtonPerCubicMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Speed.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Speed.WindowsRuntimeComponent.g.cs index 0ba5028d2f..bc5eea851b 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Speed.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Speed.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Speed : IQuantity static Speed() { BaseDimensions = new BaseDimensions(1, 0, -1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Speed, Units, Zero); + Info = new QuantityInfo(QuantityType.Speed, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit MeterPerSecond. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Temperature.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Temperature.WindowsRuntimeComponent.g.cs index 1fdf8935af..64d961e1bc 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Temperature.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Temperature.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Temperature : IQuantity static Temperature() { BaseDimensions = new BaseDimensions(0, 0, 0, 0, 1, 0, 0); - Info = new QuantityInfo(QuantityType.Temperature, Units, Zero); + Info = new QuantityInfo(QuantityType.Temperature, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Kelvin. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureChangeRate.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureChangeRate.WindowsRuntimeComponent.g.cs index a15b40fa0d..452ec58b03 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureChangeRate.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureChangeRate.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class TemperatureChangeRate : IQuantity static TemperatureChangeRate() { BaseDimensions = new BaseDimensions(0, 0, -1, 0, 1, 0, 0); - Info = new QuantityInfo(QuantityType.TemperatureChangeRate, Units, Zero); + Info = new QuantityInfo(QuantityType.TemperatureChangeRate, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit DegreeCelsiusPerSecond. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureDelta.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureDelta.WindowsRuntimeComponent.g.cs index d2e9b6b030..d9332fda45 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureDelta.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureDelta.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class TemperatureDelta : IQuantity static TemperatureDelta() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.TemperatureDelta, Units, Zero); + Info = new QuantityInfo(QuantityType.TemperatureDelta, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Kelvin. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalConductivity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalConductivity.WindowsRuntimeComponent.g.cs index 57a708ab3a..538aff31b2 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalConductivity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalConductivity.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class ThermalConductivity : IQuantity static ThermalConductivity() { BaseDimensions = new BaseDimensions(1, 1, -3, 0, -1, 0, 0); - Info = new QuantityInfo(QuantityType.ThermalConductivity, Units, Zero); + Info = new QuantityInfo(QuantityType.ThermalConductivity, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit WattPerMeterKelvin. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalResistance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalResistance.WindowsRuntimeComponent.g.cs index bd9561abff..63fcd8277d 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalResistance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalResistance.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class ThermalResistance : IQuantity static ThermalResistance() { BaseDimensions = new BaseDimensions(0, -1, 3, 0, 1, 0, 0); - Info = new QuantityInfo(QuantityType.ThermalResistance, Units, Zero); + Info = new QuantityInfo(QuantityType.ThermalResistance, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit SquareMeterKelvinPerKilowatt. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Torque.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Torque.WindowsRuntimeComponent.g.cs index fdbd92906e..fcaa4018a4 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Torque.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Torque.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Torque : IQuantity static Torque() { BaseDimensions = new BaseDimensions(2, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Torque, Units, Zero); + Info = new QuantityInfo(QuantityType.Torque, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit NewtonMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VitaminA.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VitaminA.WindowsRuntimeComponent.g.cs index 51d0f5ab57..5d92327835 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VitaminA.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VitaminA.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class VitaminA : IQuantity static VitaminA() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.VitaminA, Units, Zero); + Info = new QuantityInfo(QuantityType.VitaminA, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit InternationalUnit. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Volume.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Volume.WindowsRuntimeComponent.g.cs index a12d6b639d..113ec034e3 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Volume.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Volume.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Volume : IQuantity static Volume() { BaseDimensions = new BaseDimensions(3, 0, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Volume, Units, Zero); + Info = new QuantityInfo(QuantityType.Volume, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit CubicMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VolumeFlow.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VolumeFlow.WindowsRuntimeComponent.g.cs index 164ec35964..533a91708b 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VolumeFlow.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VolumeFlow.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class VolumeFlow : IQuantity static VolumeFlow() { BaseDimensions = new BaseDimensions(3, 0, -1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.VolumeFlow, Units, Zero); + Info = new QuantityInfo(QuantityType.VolumeFlow, Units, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit CubicMeterPerSecond. diff --git a/UnitsNet/GeneratedCode/Quantities/Acceleration.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Acceleration.NetFramework.g.cs index 156694a5c0..7e06c4514b 100644 --- a/UnitsNet/GeneratedCode/Quantities/Acceleration.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Acceleration.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct Acceleration : IQuantity, IEquatable(QuantityType.Acceleration, Units, Zero); + Info = new QuantityInfo(QuantityType.Acceleration, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.NetFramework.g.cs index be7d9705f7..0b5c98a978 100644 --- a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct AmountOfSubstance : IQuantity, IEqu static AmountOfSubstance() { BaseDimensions = new BaseDimensions(0, 0, 0, 0, 0, 1, 0); - Info = new QuantityInfo(QuantityType.AmountOfSubstance, Units, Zero); + Info = new QuantityInfo(QuantityType.AmountOfSubstance, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.NetFramework.g.cs index bb91114529..c242d24e98 100644 --- a/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct AmplitudeRatio : IQuantity, IEquatable static AmplitudeRatio() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.AmplitudeRatio, Units, Zero); + Info = new QuantityInfo(QuantityType.AmplitudeRatio, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Angle.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Angle.NetFramework.g.cs index 8612231c61..c471a4fd31 100644 --- a/UnitsNet/GeneratedCode/Quantities/Angle.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Angle.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct Angle : IQuantity, IEquatable, IComparab static Angle() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.Angle, Units, Zero); + Info = new QuantityInfo(QuantityType.Angle, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.NetFramework.g.cs index 4e84744390..d3b90a42fe 100644 --- a/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct ApparentEnergy : IQuantity, IEquatable static ApparentEnergy() { BaseDimensions = new BaseDimensions(2, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ApparentEnergy, Units, Zero); + Info = new QuantityInfo(QuantityType.ApparentEnergy, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ApparentPower.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ApparentPower.NetFramework.g.cs index d58dd30f2e..cf34d5b7ed 100644 --- a/UnitsNet/GeneratedCode/Quantities/ApparentPower.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ApparentPower.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct ApparentPower : IQuantity, IEquatable(QuantityType.ApparentPower, Units, Zero); + Info = new QuantityInfo(QuantityType.ApparentPower, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Area.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Area.NetFramework.g.cs index 70a5c132d5..d55d834833 100644 --- a/UnitsNet/GeneratedCode/Quantities/Area.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Area.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct Area : IQuantity, IEquatable, IComparable, static Area() { BaseDimensions = new BaseDimensions(2, 0, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Area, Units, Zero); + Info = new QuantityInfo(QuantityType.Area, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/AreaDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaDensity.NetFramework.g.cs index bf08ebaf94..70639a0bf5 100644 --- a/UnitsNet/GeneratedCode/Quantities/AreaDensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AreaDensity.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct AreaDensity : IQuantity, IEquatable(QuantityType.AreaDensity, Units, Zero); + Info = new QuantityInfo(QuantityType.AreaDensity, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.NetFramework.g.cs index c8dc1a6652..88907be813 100644 --- a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct AreaMomentOfInertia : IQuantity, static AreaMomentOfInertia() { BaseDimensions = new BaseDimensions(4, 0, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.AreaMomentOfInertia, Units, Zero); + Info = new QuantityInfo(QuantityType.AreaMomentOfInertia, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/BitRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/BitRate.NetFramework.g.cs index 6b46246d9b..29fc7acb83 100644 --- a/UnitsNet/GeneratedCode/Quantities/BitRate.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/BitRate.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct BitRate : IQuantity, IEquatable, ICo static BitRate() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.BitRate, Units, Zero); + Info = new QuantityInfo(QuantityType.BitRate, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.NetFramework.g.cs index efd9433a6b..56f3ef2b15 100644 --- a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct BrakeSpecificFuelConsumption : IQuantity(QuantityType.BrakeSpecificFuelConsumption, Units, Zero); + Info = new QuantityInfo(QuantityType.BrakeSpecificFuelConsumption, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Capacitance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Capacitance.NetFramework.g.cs index 0fbe85f188..ba7b3f8aa2 100644 --- a/UnitsNet/GeneratedCode/Quantities/Capacitance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Capacitance.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct Capacitance : IQuantity, IEquatable(QuantityType.Capacitance, Units, Zero); + Info = new QuantityInfo(QuantityType.Capacitance, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.NetFramework.g.cs index 011dbe3905..a2f060e325 100644 --- a/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct CoefficientOfThermalExpansion : IQuantity(QuantityType.CoefficientOfThermalExpansion, Units, Zero); + Info = new QuantityInfo(QuantityType.CoefficientOfThermalExpansion, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Density.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Density.NetFramework.g.cs index ebc88f244c..092be48991 100644 --- a/UnitsNet/GeneratedCode/Quantities/Density.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Density.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct Density : IQuantity, IEquatable, ICo static Density() { BaseDimensions = new BaseDimensions(-3, 1, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Density, Units, Zero); + Info = new QuantityInfo(QuantityType.Density, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Duration.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Duration.NetFramework.g.cs index 158ecfd475..c6602030a6 100644 --- a/UnitsNet/GeneratedCode/Quantities/Duration.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Duration.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct Duration : IQuantity, IEquatable, static Duration() { BaseDimensions = new BaseDimensions(0, 0, 1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Duration, Units, Zero); + Info = new QuantityInfo(QuantityType.Duration, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.NetFramework.g.cs index e6b3225760..28ba357792 100644 --- a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct DynamicViscosity : IQuantity, IEquat static DynamicViscosity() { BaseDimensions = new BaseDimensions(-1, 1, -1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.DynamicViscosity, Units, Zero); + Info = new QuantityInfo(QuantityType.DynamicViscosity, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.NetFramework.g.cs index 42b98707ef..aa7f9b3815 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct ElectricAdmittance : IQuantity, IE static ElectricAdmittance() { BaseDimensions = new BaseDimensions(-2, -1, 3, 2, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricAdmittance, Units, Zero); + Info = new QuantityInfo(QuantityType.ElectricAdmittance, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.NetFramework.g.cs index b7fec45977..35a8e09120 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct ElectricCharge : IQuantity, IEquatable static ElectricCharge() { BaseDimensions = new BaseDimensions(0, 0, 1, 1, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricCharge, Units, Zero); + Info = new QuantityInfo(QuantityType.ElectricCharge, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.NetFramework.g.cs index a5a1551624..95266fa6f8 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct ElectricChargeDensity : IQuantity(QuantityType.ElectricChargeDensity, Units, Zero); + Info = new QuantityInfo(QuantityType.ElectricChargeDensity, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricConductance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricConductance.NetFramework.g.cs index 1fd7ad50fc..cb0e42aa59 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricConductance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductance.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct ElectricConductance : IQuantity, static ElectricConductance() { BaseDimensions = new BaseDimensions(-2, -1, 3, 2, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricConductance, Units, Zero); + Info = new QuantityInfo(QuantityType.ElectricConductance, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.NetFramework.g.cs index 9647447a91..d0bb9ff374 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct ElectricConductivity : IQuantity static ElectricConductivity() { BaseDimensions = new BaseDimensions(-3, -1, 3, 2, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricConductivity, Units, Zero); + Info = new QuantityInfo(QuantityType.ElectricConductivity, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.NetFramework.g.cs index e6932e9faf..1651ab26ab 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct ElectricCurrent : IQuantity, IEquatab static ElectricCurrent() { BaseDimensions = new BaseDimensions(0, 0, 0, 1, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricCurrent, Units, Zero); + Info = new QuantityInfo(QuantityType.ElectricCurrent, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.NetFramework.g.cs index e229a241da..037c43a8d8 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct ElectricCurrentDensity : IQuantity(QuantityType.ElectricCurrentDensity, Units, Zero); + Info = new QuantityInfo(QuantityType.ElectricCurrentDensity, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.NetFramework.g.cs index fbc011335a..6309ffd257 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct ElectricCurrentGradient : IQuantity(QuantityType.ElectricCurrentGradient, Units, Zero); + Info = new QuantityInfo(QuantityType.ElectricCurrentGradient, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricField.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricField.NetFramework.g.cs index 9da975c66b..1f1a7a3918 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricField.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricField.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct ElectricField : IQuantity, IEquatable(QuantityType.ElectricField, Units, Zero); + Info = new QuantityInfo(QuantityType.ElectricField, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricInductance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricInductance.NetFramework.g.cs index 9a0de55575..36f7926c4c 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricInductance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricInductance.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct ElectricInductance : IQuantity, IE static ElectricInductance() { BaseDimensions = new BaseDimensions(2, 1, -2, -2, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricInductance, Units, Zero); + Info = new QuantityInfo(QuantityType.ElectricInductance, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.NetFramework.g.cs index cd90bd73fb..5303dd6e87 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct ElectricPotential : IQuantity, IEqu static ElectricPotential() { BaseDimensions = new BaseDimensions(2, 1, -3, -1, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricPotential, Units, Zero); + Info = new QuantityInfo(QuantityType.ElectricPotential, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.NetFramework.g.cs index 2a54ce7034..243e2f88ef 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct ElectricPotentialAc : IQuantity, static ElectricPotentialAc() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.ElectricPotentialAc, Units, Zero); + Info = new QuantityInfo(QuantityType.ElectricPotentialAc, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.NetFramework.g.cs index 3599561230..479084d535 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct ElectricPotentialDc : IQuantity, static ElectricPotentialDc() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.ElectricPotentialDc, Units, Zero); + Info = new QuantityInfo(QuantityType.ElectricPotentialDc, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.NetFramework.g.cs index b2f3a31db9..661bba43a2 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct ElectricResistance : IQuantity, IE static ElectricResistance() { BaseDimensions = new BaseDimensions(2, 1, -3, -2, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricResistance, Units, Zero); + Info = new QuantityInfo(QuantityType.ElectricResistance, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.NetFramework.g.cs index 73fbe8c235..87f37bbc66 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct ElectricResistivity : IQuantity, static ElectricResistivity() { BaseDimensions = new BaseDimensions(3, 1, -3, -2, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricResistivity, Units, Zero); + Info = new QuantityInfo(QuantityType.ElectricResistivity, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Energy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Energy.NetFramework.g.cs index b7aef7ba4a..05fbd6c42d 100644 --- a/UnitsNet/GeneratedCode/Quantities/Energy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Energy.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct Energy : IQuantity, IEquatable, ICompa static Energy() { BaseDimensions = new BaseDimensions(2, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Energy, Units, Zero); + Info = new QuantityInfo(QuantityType.Energy, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Entropy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Entropy.NetFramework.g.cs index d5b905f130..aeca1b40a6 100644 --- a/UnitsNet/GeneratedCode/Quantities/Entropy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Entropy.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct Entropy : IQuantity, IEquatable, ICo static Entropy() { BaseDimensions = new BaseDimensions(2, 1, -2, 0, -1, 0, 0); - Info = new QuantityInfo(QuantityType.Entropy, Units, Zero); + Info = new QuantityInfo(QuantityType.Entropy, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Force.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Force.NetFramework.g.cs index 00158fbd8e..98e0641a83 100644 --- a/UnitsNet/GeneratedCode/Quantities/Force.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Force.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct Force : IQuantity, IEquatable, IComparab static Force() { BaseDimensions = new BaseDimensions(1, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Force, Units, Zero); + Info = new QuantityInfo(QuantityType.Force, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.NetFramework.g.cs index d844fa6f6e..90cbd463a7 100644 --- a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct ForceChangeRate : IQuantity, IEquatab static ForceChangeRate() { BaseDimensions = new BaseDimensions(1, 1, -3, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ForceChangeRate, Units, Zero); + Info = new QuantityInfo(QuantityType.ForceChangeRate, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.NetFramework.g.cs index cb198c65cc..39e717105b 100644 --- a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct ForcePerLength : IQuantity, IEquatable static ForcePerLength() { BaseDimensions = new BaseDimensions(0, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ForcePerLength, Units, Zero); + Info = new QuantityInfo(QuantityType.ForcePerLength, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Frequency.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Frequency.NetFramework.g.cs index d16249ea87..81c14d2100 100644 --- a/UnitsNet/GeneratedCode/Quantities/Frequency.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Frequency.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct Frequency : IQuantity, IEquatable(QuantityType.Frequency, Units, Zero); + Info = new QuantityInfo(QuantityType.Frequency, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/HeatFlux.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatFlux.NetFramework.g.cs index e4f7403de9..49f6633707 100644 --- a/UnitsNet/GeneratedCode/Quantities/HeatFlux.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/HeatFlux.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct HeatFlux : IQuantity, IEquatable, static HeatFlux() { BaseDimensions = new BaseDimensions(0, 1, -3, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.HeatFlux, Units, Zero); + Info = new QuantityInfo(QuantityType.HeatFlux, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.NetFramework.g.cs index bc924e8df1..8c2f194749 100644 --- a/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct HeatTransferCoefficient : IQuantity(QuantityType.HeatTransferCoefficient, Units, Zero); + Info = new QuantityInfo(QuantityType.HeatTransferCoefficient, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Illuminance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Illuminance.NetFramework.g.cs index 9eb08dfbe7..0764531f29 100644 --- a/UnitsNet/GeneratedCode/Quantities/Illuminance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Illuminance.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct Illuminance : IQuantity, IEquatable(QuantityType.Illuminance, Units, Zero); + Info = new QuantityInfo(QuantityType.Illuminance, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Information.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Information.NetFramework.g.cs index 20a2a6bf33..bf0d7c4fb5 100644 --- a/UnitsNet/GeneratedCode/Quantities/Information.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Information.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct Information : IQuantity, IEquatable(QuantityType.Information, Units, Zero); + Info = new QuantityInfo(QuantityType.Information, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Irradiance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Irradiance.NetFramework.g.cs index dd680f97fa..e842d091e3 100644 --- a/UnitsNet/GeneratedCode/Quantities/Irradiance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Irradiance.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct Irradiance : IQuantity, IEquatable(QuantityType.Irradiance, Units, Zero); + Info = new QuantityInfo(QuantityType.Irradiance, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Irradiation.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Irradiation.NetFramework.g.cs index 28d89610cb..f510ff8b23 100644 --- a/UnitsNet/GeneratedCode/Quantities/Irradiation.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Irradiation.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct Irradiation : IQuantity, IEquatable(QuantityType.Irradiation, Units, Zero); + Info = new QuantityInfo(QuantityType.Irradiation, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.NetFramework.g.cs index 2e1f4385b3..7f4525c38c 100644 --- a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct KinematicViscosity : IQuantity, IE static KinematicViscosity() { BaseDimensions = new BaseDimensions(2, 0, -1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.KinematicViscosity, Units, Zero); + Info = new QuantityInfo(QuantityType.KinematicViscosity, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/LapseRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/LapseRate.NetFramework.g.cs index 0d238c2846..4c5178899a 100644 --- a/UnitsNet/GeneratedCode/Quantities/LapseRate.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LapseRate.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct LapseRate : IQuantity, IEquatable(QuantityType.LapseRate, Units, Zero); + Info = new QuantityInfo(QuantityType.LapseRate, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Length.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Length.NetFramework.g.cs index ae8a66818d..9da084946d 100644 --- a/UnitsNet/GeneratedCode/Quantities/Length.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Length.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct Length : IQuantity, IEquatable, ICompa static Length() { BaseDimensions = new BaseDimensions(1, 0, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Length, Units, Zero); + Info = new QuantityInfo(QuantityType.Length, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Level.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Level.NetFramework.g.cs index f091dae1cb..4e16a043ee 100644 --- a/UnitsNet/GeneratedCode/Quantities/Level.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Level.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct Level : IQuantity, IEquatable, IComparab static Level() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.Level, Units, Zero); + Info = new QuantityInfo(QuantityType.Level, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/LinearDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/LinearDensity.NetFramework.g.cs index d2c6295ea2..788889905a 100644 --- a/UnitsNet/GeneratedCode/Quantities/LinearDensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LinearDensity.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct LinearDensity : IQuantity, IEquatable(QuantityType.LinearDensity, Units, Zero); + Info = new QuantityInfo(QuantityType.LinearDensity, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/LuminousFlux.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/LuminousFlux.NetFramework.g.cs index 6daa27eacf..d320671b90 100644 --- a/UnitsNet/GeneratedCode/Quantities/LuminousFlux.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LuminousFlux.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct LuminousFlux : IQuantity, IEquatable(QuantityType.LuminousFlux, Units, Zero); + Info = new QuantityInfo(QuantityType.LuminousFlux, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.NetFramework.g.cs index 728e9d932d..be914e1a3d 100644 --- a/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct LuminousIntensity : IQuantity, IEqu static LuminousIntensity() { BaseDimensions = new BaseDimensions(0, 0, 0, 0, 0, 0, 1); - Info = new QuantityInfo(QuantityType.LuminousIntensity, Units, Zero); + Info = new QuantityInfo(QuantityType.LuminousIntensity, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/MagneticField.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MagneticField.NetFramework.g.cs index 19be0a52ca..e5b33f9cac 100644 --- a/UnitsNet/GeneratedCode/Quantities/MagneticField.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MagneticField.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct MagneticField : IQuantity, IEquatable(QuantityType.MagneticField, Units, Zero); + Info = new QuantityInfo(QuantityType.MagneticField, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/MagneticFlux.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MagneticFlux.NetFramework.g.cs index d5f0a98c06..f1f79e0fe5 100644 --- a/UnitsNet/GeneratedCode/Quantities/MagneticFlux.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MagneticFlux.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct MagneticFlux : IQuantity, IEquatable(QuantityType.MagneticFlux, Units, Zero); + Info = new QuantityInfo(QuantityType.MagneticFlux, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Magnetization.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Magnetization.NetFramework.g.cs index e13f1fa479..eae2e8d0d9 100644 --- a/UnitsNet/GeneratedCode/Quantities/Magnetization.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Magnetization.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct Magnetization : IQuantity, IEquatable(QuantityType.Magnetization, Units, Zero); + Info = new QuantityInfo(QuantityType.Magnetization, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Mass.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Mass.NetFramework.g.cs index 17d7203f62..511396af33 100644 --- a/UnitsNet/GeneratedCode/Quantities/Mass.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Mass.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct Mass : IQuantity, IEquatable, IComparable, static Mass() { BaseDimensions = new BaseDimensions(0, 1, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Mass, Units, Zero); + Info = new QuantityInfo(QuantityType.Mass, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/MassFlow.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFlow.NetFramework.g.cs index 7c3d8c9074..057451228d 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFlow.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFlow.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct MassFlow : IQuantity, IEquatable, static MassFlow() { BaseDimensions = new BaseDimensions(0, 1, -1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.MassFlow, Units, Zero); + Info = new QuantityInfo(QuantityType.MassFlow, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/MassFlux.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFlux.NetFramework.g.cs index d76bc21360..d4daeb7f2f 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFlux.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFlux.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct MassFlux : IQuantity, IEquatable, static MassFlux() { BaseDimensions = new BaseDimensions(-2, 1, -1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.MassFlux, Units, Zero); + Info = new QuantityInfo(QuantityType.MassFlux, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.NetFramework.g.cs index b0b5c25111..7bb31e9de7 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct MassMomentOfInertia : IQuantity, static MassMomentOfInertia() { BaseDimensions = new BaseDimensions(2, 1, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.MassMomentOfInertia, Units, Zero); + Info = new QuantityInfo(QuantityType.MassMomentOfInertia, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/MolarEnergy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarEnergy.NetFramework.g.cs index 13cedb0784..e2c5ed8cc2 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarEnergy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarEnergy.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct MolarEnergy : IQuantity, IEquatable(QuantityType.MolarEnergy, Units, Zero); + Info = new QuantityInfo(QuantityType.MolarEnergy, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/MolarEntropy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarEntropy.NetFramework.g.cs index 2c965f59a7..f3514417f6 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarEntropy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarEntropy.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct MolarEntropy : IQuantity, IEquatable(QuantityType.MolarEntropy, Units, Zero); + Info = new QuantityInfo(QuantityType.MolarEntropy, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/MolarMass.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarMass.NetFramework.g.cs index 99088ffee8..1323671ca4 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarMass.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarMass.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct MolarMass : IQuantity, IEquatable(QuantityType.MolarMass, Units, Zero); + Info = new QuantityInfo(QuantityType.MolarMass, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Molarity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Molarity.NetFramework.g.cs index 300b82c6ea..b52a7676fc 100644 --- a/UnitsNet/GeneratedCode/Quantities/Molarity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Molarity.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct Molarity : IQuantity, IEquatable, static Molarity() { BaseDimensions = new BaseDimensions(-3, 0, 0, 0, 0, 1, 0); - Info = new QuantityInfo(QuantityType.Molarity, Units, Zero); + Info = new QuantityInfo(QuantityType.Molarity, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Permeability.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Permeability.NetFramework.g.cs index b73449c468..abd728697b 100644 --- a/UnitsNet/GeneratedCode/Quantities/Permeability.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Permeability.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct Permeability : IQuantity, IEquatable(QuantityType.Permeability, Units, Zero); + Info = new QuantityInfo(QuantityType.Permeability, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Permittivity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Permittivity.NetFramework.g.cs index 428d00543c..8d496507aa 100644 --- a/UnitsNet/GeneratedCode/Quantities/Permittivity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Permittivity.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct Permittivity : IQuantity, IEquatable(QuantityType.Permittivity, Units, Zero); + Info = new QuantityInfo(QuantityType.Permittivity, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Power.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Power.NetFramework.g.cs index 807fcd15ea..a6aff3f3bd 100644 --- a/UnitsNet/GeneratedCode/Quantities/Power.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Power.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct Power : IQuantity, IEquatable, IComparab static Power() { BaseDimensions = new BaseDimensions(2, 1, -3, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Power, Units, Zero); + Info = new QuantityInfo(QuantityType.Power, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/PowerDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/PowerDensity.NetFramework.g.cs index c723aa8e00..346c971207 100644 --- a/UnitsNet/GeneratedCode/Quantities/PowerDensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PowerDensity.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct PowerDensity : IQuantity, IEquatable(QuantityType.PowerDensity, Units, Zero); + Info = new QuantityInfo(QuantityType.PowerDensity, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/PowerRatio.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/PowerRatio.NetFramework.g.cs index 9c69781a53..436253f576 100644 --- a/UnitsNet/GeneratedCode/Quantities/PowerRatio.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PowerRatio.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct PowerRatio : IQuantity, IEquatable(QuantityType.PowerRatio, Units, Zero); + Info = new QuantityInfo(QuantityType.PowerRatio, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Pressure.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Pressure.NetFramework.g.cs index 381df2a9f0..b6b1d2cfe5 100644 --- a/UnitsNet/GeneratedCode/Quantities/Pressure.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Pressure.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct Pressure : IQuantity, IEquatable, static Pressure() { BaseDimensions = new BaseDimensions(-1, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Pressure, Units, Zero); + Info = new QuantityInfo(QuantityType.Pressure, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.NetFramework.g.cs index 4d319e6178..e518048765 100644 --- a/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct PressureChangeRate : IQuantity, IE static PressureChangeRate() { BaseDimensions = new BaseDimensions(-1, 1, -3, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.PressureChangeRate, Units, Zero); + Info = new QuantityInfo(QuantityType.PressureChangeRate, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Ratio.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Ratio.NetFramework.g.cs index 4e04ebb117..6df0acf11d 100644 --- a/UnitsNet/GeneratedCode/Quantities/Ratio.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Ratio.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct Ratio : IQuantity, IEquatable, IComparab static Ratio() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.Ratio, Units, Zero); + Info = new QuantityInfo(QuantityType.Ratio, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.NetFramework.g.cs index 80309d691b..5d989168e1 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct ReactiveEnergy : IQuantity, IEquatable static ReactiveEnergy() { BaseDimensions = new BaseDimensions(2, 1, -1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ReactiveEnergy, Units, Zero); + Info = new QuantityInfo(QuantityType.ReactiveEnergy, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ReactivePower.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ReactivePower.NetFramework.g.cs index 55bf95c06a..e16e94cc40 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReactivePower.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReactivePower.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct ReactivePower : IQuantity, IEquatable(QuantityType.ReactivePower, Units, Zero); + Info = new QuantityInfo(QuantityType.ReactivePower, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.NetFramework.g.cs index 88a440894d..38b3d1ed7a 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct RotationalAcceleration : IQuantity(QuantityType.RotationalAcceleration, Units, Zero); + Info = new QuantityInfo(QuantityType.RotationalAcceleration, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.NetFramework.g.cs index 1e64f96d6d..01fffadb29 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct RotationalSpeed : IQuantity, IEquatab static RotationalSpeed() { BaseDimensions = new BaseDimensions(0, 0, -1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.RotationalSpeed, Units, Zero); + Info = new QuantityInfo(QuantityType.RotationalSpeed, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.NetFramework.g.cs index dd7e7e7245..d4506f58ce 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct RotationalStiffness : IQuantity, static RotationalStiffness() { BaseDimensions = new BaseDimensions(2, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.RotationalStiffness, Units, Zero); + Info = new QuantityInfo(QuantityType.RotationalStiffness, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.NetFramework.g.cs index 87aa25428c..4d93da2dd1 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct RotationalStiffnessPerLength : IQuantity(QuantityType.RotationalStiffnessPerLength, Units, Zero); + Info = new QuantityInfo(QuantityType.RotationalStiffnessPerLength, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/SolidAngle.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/SolidAngle.NetFramework.g.cs index 238cd0f274..7256350e3e 100644 --- a/UnitsNet/GeneratedCode/Quantities/SolidAngle.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SolidAngle.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct SolidAngle : IQuantity, IEquatable(QuantityType.SolidAngle, Units, Zero); + Info = new QuantityInfo(QuantityType.SolidAngle, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.NetFramework.g.cs index 02657d707d..a83798dad4 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct SpecificEnergy : IQuantity, IEquatable static SpecificEnergy() { BaseDimensions = new BaseDimensions(2, 0, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.SpecificEnergy, Units, Zero); + Info = new QuantityInfo(QuantityType.SpecificEnergy, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.NetFramework.g.cs index 9b0c765dc8..6236fe293c 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct SpecificEntropy : IQuantity, IEquatab static SpecificEntropy() { BaseDimensions = new BaseDimensions(2, 0, -2, 0, -1, 0, 0); - Info = new QuantityInfo(QuantityType.SpecificEntropy, Units, Zero); + Info = new QuantityInfo(QuantityType.SpecificEntropy, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificVolume.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificVolume.NetFramework.g.cs index db4632eba3..657fb44c42 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificVolume.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificVolume.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct SpecificVolume : IQuantity, IEquatable static SpecificVolume() { BaseDimensions = new BaseDimensions(3, -1, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.SpecificVolume, Units, Zero); + Info = new QuantityInfo(QuantityType.SpecificVolume, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificWeight.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificWeight.NetFramework.g.cs index 313ccd009a..0daa20bd6a 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificWeight.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificWeight.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct SpecificWeight : IQuantity, IEquatable static SpecificWeight() { BaseDimensions = new BaseDimensions(-2, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.SpecificWeight, Units, Zero); + Info = new QuantityInfo(QuantityType.SpecificWeight, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Speed.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Speed.NetFramework.g.cs index 82edd67d7d..c0d4eb0962 100644 --- a/UnitsNet/GeneratedCode/Quantities/Speed.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Speed.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct Speed : IQuantity, IEquatable, IComparab static Speed() { BaseDimensions = new BaseDimensions(1, 0, -1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Speed, Units, Zero); + Info = new QuantityInfo(QuantityType.Speed, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Temperature.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Temperature.NetFramework.g.cs index 5a981ccc01..e8c08f061b 100644 --- a/UnitsNet/GeneratedCode/Quantities/Temperature.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Temperature.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct Temperature : IQuantity, IEquatable(QuantityType.Temperature, Units, Zero); + Info = new QuantityInfo(QuantityType.Temperature, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.NetFramework.g.cs index ff6c37e4e7..039521beb1 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct TemperatureChangeRate : IQuantity(QuantityType.TemperatureChangeRate, Units, Zero); + Info = new QuantityInfo(QuantityType.TemperatureChangeRate, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.NetFramework.g.cs index 6b79c52d83..acb2be3bc5 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct TemperatureDelta : IQuantity, IEquat static TemperatureDelta() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.TemperatureDelta, Units, Zero); + Info = new QuantityInfo(QuantityType.TemperatureDelta, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.NetFramework.g.cs index 5086d87eeb..a834370a85 100644 --- a/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct ThermalConductivity : IQuantity, static ThermalConductivity() { BaseDimensions = new BaseDimensions(1, 1, -3, 0, -1, 0, 0); - Info = new QuantityInfo(QuantityType.ThermalConductivity, Units, Zero); + Info = new QuantityInfo(QuantityType.ThermalConductivity, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ThermalResistance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ThermalResistance.NetFramework.g.cs index 33a975b7fe..3f8285a503 100644 --- a/UnitsNet/GeneratedCode/Quantities/ThermalResistance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ThermalResistance.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct ThermalResistance : IQuantity, IEqu static ThermalResistance() { BaseDimensions = new BaseDimensions(0, -1, 3, 0, 1, 0, 0); - Info = new QuantityInfo(QuantityType.ThermalResistance, Units, Zero); + Info = new QuantityInfo(QuantityType.ThermalResistance, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Torque.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Torque.NetFramework.g.cs index b40d2eb665..a814f1acf3 100644 --- a/UnitsNet/GeneratedCode/Quantities/Torque.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Torque.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct Torque : IQuantity, IEquatable, ICompa static Torque() { BaseDimensions = new BaseDimensions(2, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Torque, Units, Zero); + Info = new QuantityInfo(QuantityType.Torque, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/VitaminA.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/VitaminA.NetFramework.g.cs index cce58a3f26..e2beb55546 100644 --- a/UnitsNet/GeneratedCode/Quantities/VitaminA.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VitaminA.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct VitaminA : IQuantity, IEquatable, static VitaminA() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.VitaminA, Units, Zero); + Info = new QuantityInfo(QuantityType.VitaminA, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Volume.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Volume.NetFramework.g.cs index 348d9363ea..4b6d26e7a4 100644 --- a/UnitsNet/GeneratedCode/Quantities/Volume.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Volume.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct Volume : IQuantity, IEquatable, ICompa static Volume() { BaseDimensions = new BaseDimensions(3, 0, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Volume, Units, Zero); + Info = new QuantityInfo(QuantityType.Volume, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/VolumeFlow.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumeFlow.NetFramework.g.cs index 2c37ce9ffc..24ce457a1f 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumeFlow.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumeFlow.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct VolumeFlow : IQuantity, IEquatable(QuantityType.VolumeFlow, Units, Zero); + Info = new QuantityInfo(QuantityType.VolumeFlow, Units, Zero, BaseDimensions); } /// diff --git a/UnitsNet/QuantityInfo.cs b/UnitsNet/QuantityInfo.cs index 08dcc86593..4ac3bc8159 100644 --- a/UnitsNet/QuantityInfo.cs +++ b/UnitsNet/QuantityInfo.cs @@ -50,20 +50,23 @@ class QuantityInfo .Where(t => t.IsEnum && t.Namespace == UnitEnumNamespace && t.Name.EndsWith("Unit")) .ToArray(); - public QuantityInfo(QuantityType quantityType, [NotNull] Enum[] units, [NotNull] IQuantity zero) + public QuantityInfo(QuantityType quantityType, [NotNull] Enum[] units, [NotNull] IQuantity zero, [NotNull] BaseDimensions baseDimensions) { + if(quantityType == QuantityType.Undefined) throw new ArgumentException("Quantity type can not be undefined.", nameof(quantityType)); if (units == null) throw new ArgumentNullException(nameof(units)); + if (zero == null) throw new ArgumentNullException(nameof(zero)); + if (baseDimensions == null) throw new ArgumentNullException(nameof(baseDimensions)); Name = quantityType.ToString(); QuantityType = quantityType; UnitType = UnitEnumTypes.First(t => t.Name == $"{quantityType}Unit"); UnitNames = units.Select(u => u.ToString()).ToArray(); Units = units; - Zero = zero ?? throw new ArgumentNullException(nameof(zero)); + Zero = zero; ValueType = zero.GetType(); + BaseDimensions = baseDimensions; } - /// /// Quantity name, such as "Length" or "Mass". /// @@ -99,6 +102,11 @@ public QuantityInfo(QuantityType quantityType, [NotNull] Enum[] units, [NotNull] /// Quantity value type, such as or . /// public Type ValueType { get; } + + /// + /// The for a quantity. + /// + public BaseDimensions BaseDimensions { get; } } /// @@ -116,8 +124,8 @@ public QuantityInfo(QuantityType quantityType, [NotNull] Enum[] units, [NotNull] class QuantityInfo : QuantityInfo where TUnit : Enum { - public QuantityInfo(QuantityType quantityType, TUnit[] units, IQuantity zero) - : base(quantityType, units.Cast().ToArray(), zero) + public QuantityInfo(QuantityType quantityType, TUnit[] units, IQuantity zero, BaseDimensions baseDimensions) + : base(quantityType, units.Cast().ToArray(), zero, baseDimensions) { Zero = zero; Units = units; diff --git a/UnitsNet/Scripts/Include-GenerateQuantitySourceCode.ps1 b/UnitsNet/Scripts/Include-GenerateQuantitySourceCode.ps1 index f5b4b04bec..d7a845d3a8 100644 --- a/UnitsNet/Scripts/Include-GenerateQuantitySourceCode.ps1 +++ b/UnitsNet/Scripts/Include-GenerateQuantitySourceCode.ps1 @@ -124,7 +124,7 @@ if ($obsoleteAttribute) BaseDimensions = new BaseDimensions($($baseDimensions.Length), $($baseDimensions.Mass), $($baseDimensions.Time), $($baseDimensions.ElectricCurrent), $($baseDimensions.Temperature), $($baseDimensions.AmountOfSubstance), $($baseDimensions.LuminousIntensity)); "@; } @" - Info = new QuantityInfo<$unitEnumName>(QuantityType.$quantityName, Units, Zero); + Info = new QuantityInfo<$unitEnumName>(QuantityType.$quantityName, Units, Zero, BaseDimensions); } "@; # Windows Runtime Component requires a default constructor if ($wrc) {@" From ef5665f6230d19e715b4b9f1dc8ab2f425d2038e Mon Sep 17 00:00:00 2001 From: Andreas Gullberg Larsen Date: Wed, 30 Jan 2019 23:35:02 +0100 Subject: [PATCH 32/36] Add TypeWrapper to help with reflection code It was not a good idea to use extension methods with similar names as some of the targets. A wrapper type avoids this problem. --- UnitsNet/CustomCode/Quantity.cs | 8 +- UnitsNet/CustomCode/UnitAbbreviationsCache.cs | 2 +- .../ReflectionBridgeExtensions.cs | 108 +++++++++--------- UnitsNet/QuantityInfo.cs | 7 +- UnitsNet/UnitConverter.cs | 12 +- 5 files changed, 70 insertions(+), 67 deletions(-) diff --git a/UnitsNet/CustomCode/Quantity.cs b/UnitsNet/CustomCode/Quantity.cs index 8bba568359..b327fbebb2 100644 --- a/UnitsNet/CustomCode/Quantity.cs +++ b/UnitsNet/CustomCode/Quantity.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Linq; using System.Reflection; using UnitsNet.InternalHelpers; @@ -14,10 +14,12 @@ static Quantity() Names = quantityTypes.Select(qt => qt.ToString()).ToArray(); // A bunch of reflection to enumerate quantity types, instantiate with the default constructor and return its QuantityInfo property - InfosLazy = new Lazy(() => Assembly.GetAssembly(typeof(Length)) + InfosLazy = new Lazy(() => typeof(Length) + .Wrap() + .Assembly .GetExportedTypes() .Where(typeof(IQuantity).IsAssignableFrom) - .Where(t => t.IsClass() || t.IsValueType()) // Future-proofing: Considering changing quantities from struct to class + .Where(t => t.Wrap().IsClass || t.Wrap().IsValueType) // Future-proofing: Considering changing quantities from struct to class .Select(Activator.CreateInstance) .Cast() .Select(q => q.QuantityInfo) diff --git a/UnitsNet/CustomCode/UnitAbbreviationsCache.cs b/UnitsNet/CustomCode/UnitAbbreviationsCache.cs index 25c12c7b55..6e2ab49532 100644 --- a/UnitsNet/CustomCode/UnitAbbreviationsCache.cs +++ b/UnitsNet/CustomCode/UnitAbbreviationsCache.cs @@ -208,7 +208,7 @@ void MapUnitToDefaultAbbreviation(Type unitType, int unitValue, IFormatProvider private void PerformAbbreviationMapping(Type unitType, int unitValue, IFormatProvider formatProvider, bool setAsDefault, [NotNull] params string[] abbreviations) { - if (!unitType.IsEnum()) + if (!unitType.Wrap().IsEnum) throw new ArgumentException("Must be an enum type.", nameof(unitType)); if (abbreviations == null) diff --git a/UnitsNet/InternalHelpers/ReflectionBridgeExtensions.cs b/UnitsNet/InternalHelpers/ReflectionBridgeExtensions.cs index e57aa2429e..bbc2d8bf6d 100644 --- a/UnitsNet/InternalHelpers/ReflectionBridgeExtensions.cs +++ b/UnitsNet/InternalHelpers/ReflectionBridgeExtensions.cs @@ -19,91 +19,89 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -using System.Runtime.CompilerServices; using System; using System.Collections.Generic; using System.Reflection; +using System.Runtime.CompilerServices; +#if NET40 || NET35 || NET20 || SILVERLIGHT +using UniformTypeInfo = System.Type; +#else +using UniformTypeInfo = System.Reflection.TypeInfo; +#endif -[assembly: InternalsVisibleTo("UnitsNet.Serialization.JsonNet, PublicKey=002400000480000094000000060200000024000052534131000400000100010089abdcb0025f7d1c4c766686dd852b978ca5bb9fd80bba9d3539e8399b01170ae0ea10c0c3baa301b1d13090d5aff770532de00c88b67c4b24669fde7f9d87218f1c6c073a09016cbb2f87119b94227c2301f4e2a096043e30f7c47c872bbd8e0b80d924952e6b36990f13f847e83e9efb107ec2121fe39d7edaaa4e235af8c4")] +[assembly: + InternalsVisibleTo( + "UnitsNet.Serialization.JsonNet, PublicKey=002400000480000094000000060200000024000052534131000400000100010089abdcb0025f7d1c4c766686dd852b978ca5bb9fd80bba9d3539e8399b01170ae0ea10c0c3baa301b1d13090d5aff770532de00c88b67c4b24669fde7f9d87218f1c6c073a09016cbb2f87119b94227c2301f4e2a096043e30f7c47c872bbd8e0b80d924952e6b36990f13f847e83e9efb107ec2121fe39d7edaaa4e235af8c4")] // Based on // https://github.com/StefH/ReflectionBridge/blob/c1e34e57fe3fc93507e83d5cebc1677396645397/ReflectionBridge/src/ReflectionBridge/Extensions/ReflectionBridgeExtensions.cs // MIT license namespace UnitsNet.InternalHelpers { - internal static class ReflectionBridgeExtensions + internal struct TypeWrapper { - internal static Assembly GetAssembly(this Type type) - { -#if !(NET40 || NET35 || NET20 || SILVERLIGHT) - return type.GetTypeInfo().Assembly; -#else - return type.Assembly; -#endif - } + private readonly Type _type; - internal static bool IsEnum(this Type type) + public TypeWrapper(Type type) { -#if !(NET40 || NET35 || NET20 || SILVERLIGHT) - return type.GetTypeInfo().IsEnum; -#else - return type.IsEnum; -#endif + _type = type; } - internal static bool IsClass(this Type type) + internal Assembly Assembly => _type.ToUniformType().Assembly; + internal bool IsEnum => _type.ToUniformType().IsEnum; + internal bool IsClass => _type.ToUniformType().IsClass; + internal bool IsAssignableFrom(Type other) => _type.ToUniformType().IsAssignableFrom(other.ToUniformType()); + internal bool IsValueType => _type.ToUniformType().IsValueType; + + internal PropertyInfo GetProperty(string name) { -#if !(NET40 || NET35 || NET20 || SILVERLIGHT) - return type.GetTypeInfo().IsClass; +#if NET40 || NET35 || NET20 || SILVERLIGHT + return _type.GetProperty(name); #else - return type.IsClass; + return _type.GetTypeInfo().GetDeclaredProperty(name); #endif } - internal static bool IsValueType(this Type type) + internal IEnumerable GetDeclaredMethods() { -#if !(NET40 || NET35 || NET20 || SILVERLIGHT) - return type.GetTypeInfo().IsValueType; + var t = _type.ToUniformType(); + while (t != null) + { +#if NET40 || NET35 || NET20 || SILVERLIGHT + foreach (MethodInfo m in t.GetMethods()) #else - return type.IsValueType; + foreach (MethodInfo m in t.DeclaredMethods) #endif + yield return m; + + t = t.BaseType.ToUniformType(); + } } + } - internal static PropertyInfo GetPropety(this Type type, string name) + internal static class ReflectionBridgeExtensions + { + /// + /// Wrap the type to make it .NET agnostic using Type for old targets and the newer TypeInfo for newer targets. + /// + public static TypeWrapper Wrap(this Type type) { -#if (NET40 || NET35 || NET20 || SILVERLIGHT) - return type.GetProperty(name); - -#else - return type.GetTypeInfo().GetDeclaredProperty(name); -#endif + return new TypeWrapper(type); } -#if !(NET40 || NET35 || NET20 || SILVERLIGHT) - // Ambiguous method conflict with GetMethods() name when targeting WindowsRuntimeComponent, so use GetDeclaredMethods() instead - internal static IEnumerable GetDeclaredMethods(this Type someType) + /// + /// Returns the type or type info object depending on compile target, such as TypeInfo for .NET 4.5+ and Type for .NET + /// 4.0 and older. + /// The APIs of these two objects are similar, but obtaining them is slightly different. + /// The idea is to get fewer #if pragma statements in the code. + /// + public static UniformTypeInfo ToUniformType(this Type type) { - Type t = someType; - while (t != null) - { - TypeInfo ti = t.GetTypeInfo(); - foreach (MethodInfo m in ti.DeclaredMethods) - yield return m; - t = ti.BaseType; - } - } +#if NET40 || NET35 || NET20 || SILVERLIGHT + return type; #else -// Ambiguous method conflict with GetMethods() name WindowsRuntimeComponent, so use GetDeclaredMethods() instead - internal static IEnumerable GetDeclaredMethods(this Type someType) - { - Type t = someType; - while (t != null) - { - foreach (MethodInfo m in t.GetMethods()) - yield return m; - t = t.BaseType; - } - } + return type.GetTypeInfo(); #endif + } } } diff --git a/UnitsNet/QuantityInfo.cs b/UnitsNet/QuantityInfo.cs index 4ac3bc8159..57a341a82f 100644 --- a/UnitsNet/QuantityInfo.cs +++ b/UnitsNet/QuantityInfo.cs @@ -23,6 +23,7 @@ using System.Linq; using System.Reflection; using JetBrains.Annotations; +using UnitsNet.InternalHelpers; using UnitsNet.Units; namespace UnitsNet @@ -45,9 +46,11 @@ class QuantityInfo { private static readonly string UnitEnumNamespace = typeof(LengthUnit).Namespace; - private static readonly Type[] UnitEnumTypes = Assembly.GetAssembly(typeof(Length)) + private static readonly Type[] UnitEnumTypes = typeof(Length) + .Wrap() + .Assembly .GetExportedTypes() - .Where(t => t.IsEnum && t.Namespace == UnitEnumNamespace && t.Name.EndsWith("Unit")) + .Where(t => t.Wrap().IsEnum && t.Namespace == UnitEnumNamespace && t.Name.EndsWith("Unit")) .ToArray(); public QuantityInfo(QuantityType quantityType, [NotNull] Enum[] units, [NotNull] IQuantity zero, [NotNull] BaseDimensions baseDimensions) diff --git a/UnitsNet/UnitConverter.cs b/UnitsNet/UnitConverter.cs index 851b992b72..7ebd251315 100644 --- a/UnitsNet/UnitConverter.cs +++ b/UnitsNet/UnitConverter.cs @@ -42,15 +42,15 @@ namespace UnitsNet public static class UnitConverter { private static readonly string UnitTypeNamespace = typeof(LengthUnit).Namespace; - private static readonly Assembly UnitsNetAssembly = typeof(Length).GetAssembly(); + private static readonly Assembly UnitsNetAssembly = typeof(Length).Wrap().Assembly; private static readonly Type[] QuantityTypes = UnitsNetAssembly.GetTypes() - .Where(typeof(IQuantity).IsAssignableFrom) - .Where(x => x.IsClass() || x.IsValueType()) // Future-proofing: we are discussing changing quantities from struct to class + .Where(typeof(IQuantity).Wrap().IsAssignableFrom) + .Where(x => x.Wrap().IsClass || x.Wrap().IsValueType) // Future-proofing: we are discussing changing quantities from struct to class .ToArray(); private static readonly Type[] UnitTypes = UnitsNetAssembly.GetTypes() - .Where(x => x.Namespace == UnitTypeNamespace && x.IsEnum() && x.Name.EndsWith("Unit")) + .Where(x => x.Namespace == UnitTypeNamespace && x.Wrap().IsEnum && x.Name.EndsWith("Unit")) .ToArray(); /// @@ -360,7 +360,7 @@ private static MethodInfo GetAsMethod(Type quantityType, Type unitType) { // Only a single As() method as of this writing, but let's safe-guard a bit for future-proofing // ex: double result = quantity.As(LengthUnit outputUnit); - return quantityType.GetDeclaredMethods() + return quantityType.Wrap().GetDeclaredMethods() .Single(m => m.Name == "As" && !m.IsStatic && m.IsPublic && @@ -372,7 +372,7 @@ private static MethodInfo GetStaticFromMethod(Type quantityType, Type unitType) { // Want to match: Length l = UnitsNet.Length.From(double inputValue, LengthUnit inputUnit) // Do NOT match : Length? UnitsNet.Length.From(double? inputValue, LengthUnit inputUnit) - return quantityType.GetDeclaredMethods() + return quantityType.Wrap().GetDeclaredMethods() .Single(m => m.Name == "From" && m.IsStatic && m.IsPublic && From c274223b8e70ef4596d698beff690f5e0077bb99 Mon Sep 17 00:00:00 2001 From: Andreas Gullberg Larsen Date: Wed, 30 Jan 2019 23:35:48 +0100 Subject: [PATCH 33/36] WRC and .NET now compiles --- .../Acceleration.WindowsRuntimeComponent.g.cs | 10 +-- ...ntOfSubstance.WindowsRuntimeComponent.g.cs | 10 +-- ...mplitudeRatio.WindowsRuntimeComponent.g.cs | 10 +-- .../Angle.WindowsRuntimeComponent.g.cs | 10 +-- ...pparentEnergy.WindowsRuntimeComponent.g.cs | 10 +-- ...ApparentPower.WindowsRuntimeComponent.g.cs | 10 +-- .../Area.WindowsRuntimeComponent.g.cs | 10 +-- .../AreaDensity.WindowsRuntimeComponent.g.cs | 10 +-- ...mentOfInertia.WindowsRuntimeComponent.g.cs | 10 +-- .../BitRate.WindowsRuntimeComponent.g.cs | 10 +-- ...elConsumption.WindowsRuntimeComponent.g.cs | 10 +-- .../Capacitance.WindowsRuntimeComponent.g.cs | 10 +-- ...rmalExpansion.WindowsRuntimeComponent.g.cs | 10 +-- .../Density.WindowsRuntimeComponent.g.cs | 10 +-- .../Duration.WindowsRuntimeComponent.g.cs | 10 +-- ...amicViscosity.WindowsRuntimeComponent.g.cs | 10 +-- ...ricAdmittance.WindowsRuntimeComponent.g.cs | 10 +-- ...lectricCharge.WindowsRuntimeComponent.g.cs | 10 +-- ...ChargeDensity.WindowsRuntimeComponent.g.cs | 10 +-- ...icConductance.WindowsRuntimeComponent.g.cs | 10 +-- ...cConductivity.WindowsRuntimeComponent.g.cs | 10 +-- ...ectricCurrent.WindowsRuntimeComponent.g.cs | 10 +-- ...urrentDensity.WindowsRuntimeComponent.g.cs | 10 +-- ...rrentGradient.WindowsRuntimeComponent.g.cs | 10 +-- ...ElectricField.WindowsRuntimeComponent.g.cs | 10 +-- ...ricInductance.WindowsRuntimeComponent.g.cs | 10 +-- ...tricPotential.WindowsRuntimeComponent.g.cs | 10 +-- ...icPotentialAc.WindowsRuntimeComponent.g.cs | 10 +-- ...icPotentialDc.WindowsRuntimeComponent.g.cs | 10 +-- ...ricResistance.WindowsRuntimeComponent.g.cs | 10 +-- ...icResistivity.WindowsRuntimeComponent.g.cs | 10 +-- .../Energy.WindowsRuntimeComponent.g.cs | 10 +-- .../Entropy.WindowsRuntimeComponent.g.cs | 10 +-- .../Force.WindowsRuntimeComponent.g.cs | 10 +-- ...rceChangeRate.WindowsRuntimeComponent.g.cs | 10 +-- ...orcePerLength.WindowsRuntimeComponent.g.cs | 10 +-- .../Frequency.WindowsRuntimeComponent.g.cs | 10 +-- .../HeatFlux.WindowsRuntimeComponent.g.cs | 10 +-- ...erCoefficient.WindowsRuntimeComponent.g.cs | 10 +-- .../Illuminance.WindowsRuntimeComponent.g.cs | 10 +-- .../Information.WindowsRuntimeComponent.g.cs | 10 +-- .../Irradiance.WindowsRuntimeComponent.g.cs | 10 +-- .../Irradiation.WindowsRuntimeComponent.g.cs | 10 +-- ...aticViscosity.WindowsRuntimeComponent.g.cs | 10 +-- .../LapseRate.WindowsRuntimeComponent.g.cs | 10 +-- .../Length.WindowsRuntimeComponent.g.cs | 10 +-- .../Level.WindowsRuntimeComponent.g.cs | 10 +-- ...LinearDensity.WindowsRuntimeComponent.g.cs | 10 +-- .../LuminousFlux.WindowsRuntimeComponent.g.cs | 10 +-- ...nousIntensity.WindowsRuntimeComponent.g.cs | 10 +-- ...MagneticField.WindowsRuntimeComponent.g.cs | 10 +-- .../MagneticFlux.WindowsRuntimeComponent.g.cs | 10 +-- ...Magnetization.WindowsRuntimeComponent.g.cs | 10 +-- .../Mass.WindowsRuntimeComponent.g.cs | 10 +-- .../MassFlow.WindowsRuntimeComponent.g.cs | 10 +-- .../MassFlux.WindowsRuntimeComponent.g.cs | 10 +-- ...mentOfInertia.WindowsRuntimeComponent.g.cs | 10 +-- .../MolarEnergy.WindowsRuntimeComponent.g.cs | 10 +-- .../MolarEntropy.WindowsRuntimeComponent.g.cs | 10 +-- .../MolarMass.WindowsRuntimeComponent.g.cs | 10 +-- .../Molarity.WindowsRuntimeComponent.g.cs | 10 +-- .../Permeability.WindowsRuntimeComponent.g.cs | 10 +-- .../Permittivity.WindowsRuntimeComponent.g.cs | 10 +-- .../Power.WindowsRuntimeComponent.g.cs | 10 +-- .../PowerDensity.WindowsRuntimeComponent.g.cs | 10 +-- .../PowerRatio.WindowsRuntimeComponent.g.cs | 10 +-- .../Pressure.WindowsRuntimeComponent.g.cs | 10 +-- ...ureChangeRate.WindowsRuntimeComponent.g.cs | 10 +-- .../Ratio.WindowsRuntimeComponent.g.cs | 10 +-- ...eactiveEnergy.WindowsRuntimeComponent.g.cs | 10 +-- ...ReactivePower.WindowsRuntimeComponent.g.cs | 10 +-- ...lAcceleration.WindowsRuntimeComponent.g.cs | 10 +-- ...tationalSpeed.WindowsRuntimeComponent.g.cs | 10 +-- ...onalStiffness.WindowsRuntimeComponent.g.cs | 10 +-- ...nessPerLength.WindowsRuntimeComponent.g.cs | 10 +-- .../SolidAngle.WindowsRuntimeComponent.g.cs | 10 +-- ...pecificEnergy.WindowsRuntimeComponent.g.cs | 10 +-- ...ecificEntropy.WindowsRuntimeComponent.g.cs | 10 +-- ...pecificVolume.WindowsRuntimeComponent.g.cs | 10 +-- ...pecificWeight.WindowsRuntimeComponent.g.cs | 10 +-- .../Speed.WindowsRuntimeComponent.g.cs | 10 +-- .../Temperature.WindowsRuntimeComponent.g.cs | 10 +-- ...ureChangeRate.WindowsRuntimeComponent.g.cs | 10 +-- ...peratureDelta.WindowsRuntimeComponent.g.cs | 10 +-- ...lConductivity.WindowsRuntimeComponent.g.cs | 10 +-- ...malResistance.WindowsRuntimeComponent.g.cs | 10 +-- .../Torque.WindowsRuntimeComponent.g.cs | 10 +-- .../VitaminA.WindowsRuntimeComponent.g.cs | 10 +-- .../Volume.WindowsRuntimeComponent.g.cs | 10 +-- .../VolumeFlow.WindowsRuntimeComponent.g.cs | 10 +-- UnitsNet/CustomCode/Quantity.cs | 41 +++++++++- UnitsNet/CustomCode/UnitParser.cs | 7 +- .../Quantities/Acceleration.NetFramework.g.cs | 2 + .../AmountOfSubstance.NetFramework.g.cs | 2 + .../AmplitudeRatio.NetFramework.g.cs | 2 + .../Quantities/Angle.NetFramework.g.cs | 2 + .../ApparentEnergy.NetFramework.g.cs | 2 + .../ApparentPower.NetFramework.g.cs | 2 + .../Quantities/Area.NetFramework.g.cs | 2 + .../Quantities/AreaDensity.NetFramework.g.cs | 2 + .../AreaMomentOfInertia.NetFramework.g.cs | 2 + .../Quantities/BitRate.NetFramework.g.cs | 2 + ...eSpecificFuelConsumption.NetFramework.g.cs | 2 + .../Quantities/Capacitance.NetFramework.g.cs | 2 + ...icientOfThermalExpansion.NetFramework.g.cs | 2 + .../Quantities/Density.NetFramework.g.cs | 2 + .../Quantities/Duration.NetFramework.g.cs | 2 + .../DynamicViscosity.NetFramework.g.cs | 2 + .../ElectricAdmittance.NetFramework.g.cs | 2 + .../ElectricCharge.NetFramework.g.cs | 2 + .../ElectricChargeDensity.NetFramework.g.cs | 2 + .../ElectricConductance.NetFramework.g.cs | 2 + .../ElectricConductivity.NetFramework.g.cs | 2 + .../ElectricCurrent.NetFramework.g.cs | 2 + .../ElectricCurrentDensity.NetFramework.g.cs | 2 + .../ElectricCurrentGradient.NetFramework.g.cs | 2 + .../ElectricField.NetFramework.g.cs | 2 + .../ElectricInductance.NetFramework.g.cs | 2 + .../ElectricPotential.NetFramework.g.cs | 2 + .../ElectricPotentialAc.NetFramework.g.cs | 2 + .../ElectricPotentialDc.NetFramework.g.cs | 2 + .../ElectricResistance.NetFramework.g.cs | 2 + .../ElectricResistivity.NetFramework.g.cs | 2 + .../Quantities/Energy.NetFramework.g.cs | 2 + .../Quantities/Entropy.NetFramework.g.cs | 2 + .../Quantities/Force.NetFramework.g.cs | 2 + .../ForceChangeRate.NetFramework.g.cs | 2 + .../ForcePerLength.NetFramework.g.cs | 2 + .../Quantities/Frequency.NetFramework.g.cs | 2 + .../Quantities/HeatFlux.NetFramework.g.cs | 2 + .../HeatTransferCoefficient.NetFramework.g.cs | 2 + .../Quantities/Illuminance.NetFramework.g.cs | 2 + .../Quantities/Information.NetFramework.g.cs | 2 + .../Quantities/Irradiance.NetFramework.g.cs | 2 + .../Quantities/Irradiation.NetFramework.g.cs | 2 + .../KinematicViscosity.NetFramework.g.cs | 2 + .../Quantities/LapseRate.NetFramework.g.cs | 2 + .../Quantities/Length.NetFramework.g.cs | 2 + .../Quantities/Level.NetFramework.g.cs | 2 + .../LinearDensity.NetFramework.g.cs | 2 + .../Quantities/LuminousFlux.NetFramework.g.cs | 2 + .../LuminousIntensity.NetFramework.g.cs | 2 + .../MagneticField.NetFramework.g.cs | 2 + .../Quantities/MagneticFlux.NetFramework.g.cs | 2 + .../Magnetization.NetFramework.g.cs | 2 + .../Quantities/Mass.NetFramework.g.cs | 2 + .../Quantities/MassFlow.NetFramework.g.cs | 2 + .../Quantities/MassFlux.NetFramework.g.cs | 2 + .../MassMomentOfInertia.NetFramework.g.cs | 2 + .../Quantities/MolarEnergy.NetFramework.g.cs | 2 + .../Quantities/MolarEntropy.NetFramework.g.cs | 2 + .../Quantities/MolarMass.NetFramework.g.cs | 2 + .../Quantities/Molarity.NetFramework.g.cs | 2 + .../Quantities/Permeability.NetFramework.g.cs | 2 + .../Quantities/Permittivity.NetFramework.g.cs | 2 + .../Quantities/Power.NetFramework.g.cs | 2 + .../Quantities/PowerDensity.NetFramework.g.cs | 2 + .../Quantities/PowerRatio.NetFramework.g.cs | 2 + .../Quantities/Pressure.NetFramework.g.cs | 2 + .../PressureChangeRate.NetFramework.g.cs | 2 + .../Quantities/Ratio.NetFramework.g.cs | 2 + .../ReactiveEnergy.NetFramework.g.cs | 2 + .../ReactivePower.NetFramework.g.cs | 2 + .../RotationalAcceleration.NetFramework.g.cs | 2 + .../RotationalSpeed.NetFramework.g.cs | 2 + .../RotationalStiffness.NetFramework.g.cs | 2 + ...tionalStiffnessPerLength.NetFramework.g.cs | 2 + .../Quantities/SolidAngle.NetFramework.g.cs | 2 + .../SpecificEnergy.NetFramework.g.cs | 2 + .../SpecificEntropy.NetFramework.g.cs | 2 + .../SpecificVolume.NetFramework.g.cs | 2 + .../SpecificWeight.NetFramework.g.cs | 2 + .../Quantities/Speed.NetFramework.g.cs | 2 + .../Quantities/Temperature.NetFramework.g.cs | 2 + .../TemperatureChangeRate.NetFramework.g.cs | 2 + .../TemperatureDelta.NetFramework.g.cs | 2 + .../ThermalConductivity.NetFramework.g.cs | 2 + .../ThermalResistance.NetFramework.g.cs | 2 + .../Quantities/Torque.NetFramework.g.cs | 2 + .../Quantities/VitaminA.NetFramework.g.cs | 2 + .../Quantities/Volume.NetFramework.g.cs | 2 + .../Quantities/VolumeFlow.NetFramework.g.cs | 2 + UnitsNet/GeneratedCode/Quantity.g.cs | 73 ++++++++++-------- UnitsNet/IQuantity.cs | 19 +++-- UnitsNet/QuantityInfo.cs | 11 +-- .../Include-GenerateQuantitySourceCode.ps1 | 22 +++++- ...clude-GenerateStaticQuantitySourceCode.ps1 | 75 +++++++++++-------- UnitsNet/UnitConverter.cs | 4 +- 188 files changed, 795 insertions(+), 537 deletions(-) diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Acceleration.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Acceleration.WindowsRuntimeComponent.g.cs index ce45887762..3ffa44f67b 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Acceleration.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Acceleration.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Acceleration : IQuantity static Acceleration() { BaseDimensions = new BaseDimensions(1, 0, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Acceleration, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Acceleration, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit MeterPerSecondSquared. @@ -100,7 +100,7 @@ private Acceleration(double numericValue, AccelerationUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private Acceleration(double numericValue, AccelerationUnit unit) /// public AccelerationUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -651,6 +649,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((AccelerationUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmountOfSubstance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmountOfSubstance.WindowsRuntimeComponent.g.cs index cd74aaa42c..0eceeacc01 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmountOfSubstance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmountOfSubstance.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class AmountOfSubstance : IQuantity static AmountOfSubstance() { BaseDimensions = new BaseDimensions(0, 0, 0, 0, 0, 1, 0); - Info = new QuantityInfo(QuantityType.AmountOfSubstance, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.AmountOfSubstance, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Mole. @@ -100,7 +100,7 @@ private AmountOfSubstance(double numericValue, AmountOfSubstanceUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private AmountOfSubstance(double numericValue, AmountOfSubstanceUnit unit) /// public AmountOfSubstanceUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -681,6 +679,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((AmountOfSubstanceUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmplitudeRatio.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmplitudeRatio.WindowsRuntimeComponent.g.cs index 9f2a696ebe..5f92e97e25 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmplitudeRatio.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmplitudeRatio.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class AmplitudeRatio : IQuantity static AmplitudeRatio() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.AmplitudeRatio, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.AmplitudeRatio, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit DecibelVolt. @@ -100,7 +100,7 @@ private AmplitudeRatio(double numericValue, AmplitudeRatioUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private AmplitudeRatio(double numericValue, AmplitudeRatioUnit unit) /// public AmplitudeRatioUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -516,6 +514,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((AmplitudeRatioUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Angle.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Angle.WindowsRuntimeComponent.g.cs index 64763965a3..764b704112 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Angle.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Angle.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Angle : IQuantity static Angle() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.Angle, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Angle, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Degree. @@ -100,7 +100,7 @@ private Angle(double numericValue, AngleUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private Angle(double numericValue, AngleUnit unit) /// public AngleUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -666,6 +664,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((AngleUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentEnergy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentEnergy.WindowsRuntimeComponent.g.cs index 9a44fea18c..c2e818b615 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentEnergy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentEnergy.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class ApparentEnergy : IQuantity static ApparentEnergy() { BaseDimensions = new BaseDimensions(2, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ApparentEnergy, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ApparentEnergy, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit VoltampereHour. @@ -100,7 +100,7 @@ private ApparentEnergy(double numericValue, ApparentEnergyUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private ApparentEnergy(double numericValue, ApparentEnergyUnit unit) /// public ApparentEnergyUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -501,6 +499,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((ApparentEnergyUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentPower.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentPower.WindowsRuntimeComponent.g.cs index 4b6436d7b2..5903bb54e3 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentPower.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentPower.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class ApparentPower : IQuantity static ApparentPower() { BaseDimensions = new BaseDimensions(2, 1, -3, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ApparentPower, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ApparentPower, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Voltampere. @@ -100,7 +100,7 @@ private ApparentPower(double numericValue, ApparentPowerUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private ApparentPower(double numericValue, ApparentPowerUnit unit) /// public ApparentPowerUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -516,6 +514,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((ApparentPowerUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Area.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Area.WindowsRuntimeComponent.g.cs index 15a5433c56..3387f02f7e 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Area.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Area.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Area : IQuantity static Area() { BaseDimensions = new BaseDimensions(2, 0, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Area, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Area, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit SquareMeter. @@ -100,7 +100,7 @@ private Area(double numericValue, AreaUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private Area(double numericValue, AreaUnit unit) /// public AreaUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -651,6 +649,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((AreaUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaDensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaDensity.WindowsRuntimeComponent.g.cs index 0e7dd23efc..fe6f9c0665 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaDensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaDensity.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class AreaDensity : IQuantity static AreaDensity() { BaseDimensions = new BaseDimensions(-2, 1, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.AreaDensity, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.AreaDensity, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit KilogramPerSquareMeter. @@ -100,7 +100,7 @@ private AreaDensity(double numericValue, AreaDensityUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private AreaDensity(double numericValue, AreaDensityUnit unit) /// public AreaDensityUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -471,6 +469,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((AreaDensityUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaMomentOfInertia.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaMomentOfInertia.WindowsRuntimeComponent.g.cs index d9bd58c5d3..148f389359 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaMomentOfInertia.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaMomentOfInertia.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class AreaMomentOfInertia : IQuantity static AreaMomentOfInertia() { BaseDimensions = new BaseDimensions(4, 0, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.AreaMomentOfInertia, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.AreaMomentOfInertia, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit MeterToTheFourth. @@ -100,7 +100,7 @@ private AreaMomentOfInertia(double numericValue, AreaMomentOfInertiaUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private AreaMomentOfInertia(double numericValue, AreaMomentOfInertiaUnit unit) /// public AreaMomentOfInertiaUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -546,6 +544,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((AreaMomentOfInertiaUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BitRate.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BitRate.WindowsRuntimeComponent.g.cs index 28ca7a79f8..5be72003dd 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BitRate.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BitRate.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class BitRate : IQuantity static BitRate() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.BitRate, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.BitRate, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit BitPerSecond. @@ -103,7 +103,7 @@ private BitRate(decimal numericValue, BitRateUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,9 +154,7 @@ private BitRate(decimal numericValue, BitRateUnit unit) /// public BitRateUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -849,6 +847,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((BitRateUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.WindowsRuntimeComponent.g.cs index 4a9f8d5d55..0e5e580966 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class BrakeSpecificFuelConsumption : IQuantity static BrakeSpecificFuelConsumption() { BaseDimensions = new BaseDimensions(-2, 0, 2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.BrakeSpecificFuelConsumption, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.BrakeSpecificFuelConsumption, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit KilogramPerJoule. @@ -100,7 +100,7 @@ private BrakeSpecificFuelConsumption(double numericValue, BrakeSpecificFuelConsu #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private BrakeSpecificFuelConsumption(double numericValue, BrakeSpecificFuelConsu /// public BrakeSpecificFuelConsumptionUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -501,6 +499,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((BrakeSpecificFuelConsumptionUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Capacitance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Capacitance.WindowsRuntimeComponent.g.cs index dfede8b9d2..f5dd548463 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Capacitance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Capacitance.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class Capacitance : IQuantity static Capacitance() { BaseDimensions = new BaseDimensions(-2, -1, 4, 2, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Capacitance, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Capacitance, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Farad. @@ -103,7 +103,7 @@ private Capacitance(double numericValue, CapacitanceUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,9 +154,7 @@ private Capacitance(double numericValue, CapacitanceUnit unit) /// public CapacitanceUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -564,6 +562,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((CapacitanceUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/CoefficientOfThermalExpansion.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/CoefficientOfThermalExpansion.WindowsRuntimeComponent.g.cs index af7283a25f..af8590d2ba 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/CoefficientOfThermalExpansion.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/CoefficientOfThermalExpansion.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class CoefficientOfThermalExpansion : IQuantity static CoefficientOfThermalExpansion() { BaseDimensions = new BaseDimensions(0, 0, 0, 0, -1, 0, 0); - Info = new QuantityInfo(QuantityType.CoefficientOfThermalExpansion, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.CoefficientOfThermalExpansion, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit InverseKelvin. @@ -100,7 +100,7 @@ private CoefficientOfThermalExpansion(double numericValue, CoefficientOfThermalE #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private CoefficientOfThermalExpansion(double numericValue, CoefficientOfThermalE /// public CoefficientOfThermalExpansionUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -501,6 +499,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((CoefficientOfThermalExpansionUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Density.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Density.WindowsRuntimeComponent.g.cs index 58c3d20912..f68e2f20ae 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Density.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Density.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class Density : IQuantity static Density() { BaseDimensions = new BaseDimensions(-3, 1, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Density, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Density, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit KilogramPerCubicMeter. @@ -103,7 +103,7 @@ private Density(double numericValue, DensityUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,9 +154,7 @@ private Density(double numericValue, DensityUnit unit) /// public DensityUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -1044,6 +1042,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((DensityUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Duration.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Duration.WindowsRuntimeComponent.g.cs index 44211c8066..ece7635a40 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Duration.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Duration.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Duration : IQuantity static Duration() { BaseDimensions = new BaseDimensions(0, 0, 1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Duration, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Duration, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Second. @@ -100,7 +100,7 @@ private Duration(double numericValue, DurationUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private Duration(double numericValue, DurationUnit unit) /// public DurationUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -606,6 +604,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((DurationUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/DynamicViscosity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/DynamicViscosity.WindowsRuntimeComponent.g.cs index 3627a562ba..9267c39baf 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/DynamicViscosity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/DynamicViscosity.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class DynamicViscosity : IQuantity static DynamicViscosity() { BaseDimensions = new BaseDimensions(-1, 1, -1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.DynamicViscosity, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.DynamicViscosity, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit NewtonSecondPerMeterSquared. @@ -103,7 +103,7 @@ private DynamicViscosity(double numericValue, DynamicViscosityUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,9 +154,7 @@ private DynamicViscosity(double numericValue, DynamicViscosityUnit unit) /// public DynamicViscosityUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -549,6 +547,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((DynamicViscosityUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricAdmittance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricAdmittance.WindowsRuntimeComponent.g.cs index d392948c32..0d7ca00648 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricAdmittance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricAdmittance.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class ElectricAdmittance : IQuantity static ElectricAdmittance() { BaseDimensions = new BaseDimensions(-2, -1, 3, 2, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricAdmittance, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricAdmittance, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Siemens. @@ -100,7 +100,7 @@ private ElectricAdmittance(double numericValue, ElectricAdmittanceUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private ElectricAdmittance(double numericValue, ElectricAdmittanceUnit unit) /// public ElectricAdmittanceUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -516,6 +514,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((ElectricAdmittanceUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCharge.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCharge.WindowsRuntimeComponent.g.cs index a09cffff7c..5f0a4abb19 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCharge.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCharge.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class ElectricCharge : IQuantity static ElectricCharge() { BaseDimensions = new BaseDimensions(0, 0, 1, 1, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricCharge, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricCharge, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Coulomb. @@ -103,7 +103,7 @@ private ElectricCharge(double numericValue, ElectricChargeUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,9 +154,7 @@ private ElectricCharge(double numericValue, ElectricChargeUnit unit) /// public ElectricChargeUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -474,6 +472,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((ElectricChargeUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricChargeDensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricChargeDensity.WindowsRuntimeComponent.g.cs index ff05b31e21..e7b875437e 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricChargeDensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricChargeDensity.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class ElectricChargeDensity : IQuantity static ElectricChargeDensity() { BaseDimensions = new BaseDimensions(-3, 0, 1, 1, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricChargeDensity, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricChargeDensity, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit CoulombPerCubicMeter. @@ -103,7 +103,7 @@ private ElectricChargeDensity(double numericValue, ElectricChargeDensityUnit uni #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,9 +154,7 @@ private ElectricChargeDensity(double numericValue, ElectricChargeDensityUnit uni /// public ElectricChargeDensityUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -474,6 +472,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((ElectricChargeDensityUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductance.WindowsRuntimeComponent.g.cs index 99b15c866d..e8e630a889 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductance.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class ElectricConductance : IQuantity static ElectricConductance() { BaseDimensions = new BaseDimensions(-2, -1, 3, 2, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricConductance, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricConductance, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Siemens. @@ -103,7 +103,7 @@ private ElectricConductance(double numericValue, ElectricConductanceUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,9 +154,7 @@ private ElectricConductance(double numericValue, ElectricConductanceUnit unit) /// public ElectricConductanceUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -504,6 +502,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((ElectricConductanceUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductivity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductivity.WindowsRuntimeComponent.g.cs index f721c6c71d..d2d73de0b5 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductivity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductivity.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class ElectricConductivity : IQuantity static ElectricConductivity() { BaseDimensions = new BaseDimensions(-3, -1, 3, 2, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricConductivity, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricConductivity, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit SiemensPerMeter. @@ -103,7 +103,7 @@ private ElectricConductivity(double numericValue, ElectricConductivityUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,9 +154,7 @@ private ElectricConductivity(double numericValue, ElectricConductivityUnit unit) /// public ElectricConductivityUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -474,6 +472,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((ElectricConductivityUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrent.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrent.WindowsRuntimeComponent.g.cs index cbdc41c317..3e069cfe80 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrent.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrent.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class ElectricCurrent : IQuantity static ElectricCurrent() { BaseDimensions = new BaseDimensions(0, 0, 0, 1, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricCurrent, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricCurrent, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Ampere. @@ -100,7 +100,7 @@ private ElectricCurrent(double numericValue, ElectricCurrentUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private ElectricCurrent(double numericValue, ElectricCurrentUnit unit) /// public ElectricCurrentUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -576,6 +574,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((ElectricCurrentUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentDensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentDensity.WindowsRuntimeComponent.g.cs index e3d7ff6c62..aa48cd19bf 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentDensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentDensity.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class ElectricCurrentDensity : IQuantity static ElectricCurrentDensity() { BaseDimensions = new BaseDimensions(-2, 0, 0, 1, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricCurrentDensity, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricCurrentDensity, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit AmperePerSquareMeter. @@ -103,7 +103,7 @@ private ElectricCurrentDensity(double numericValue, ElectricCurrentDensityUnit u #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,9 +154,7 @@ private ElectricCurrentDensity(double numericValue, ElectricCurrentDensityUnit u /// public ElectricCurrentDensityUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -474,6 +472,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((ElectricCurrentDensityUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentGradient.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentGradient.WindowsRuntimeComponent.g.cs index 7af0c00e1f..556b0e74b4 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentGradient.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentGradient.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class ElectricCurrentGradient : IQuantity static ElectricCurrentGradient() { BaseDimensions = new BaseDimensions(0, 0, -1, 1, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricCurrentGradient, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricCurrentGradient, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit AmperePerSecond. @@ -100,7 +100,7 @@ private ElectricCurrentGradient(double numericValue, ElectricCurrentGradientUnit #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private ElectricCurrentGradient(double numericValue, ElectricCurrentGradientUnit /// public ElectricCurrentGradientUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -471,6 +469,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((ElectricCurrentGradientUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricField.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricField.WindowsRuntimeComponent.g.cs index b2a7bf14a1..7134f690d3 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricField.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricField.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class ElectricField : IQuantity static ElectricField() { BaseDimensions = new BaseDimensions(1, 1, -3, -1, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricField, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricField, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit VoltPerMeter. @@ -103,7 +103,7 @@ private ElectricField(double numericValue, ElectricFieldUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,9 +154,7 @@ private ElectricField(double numericValue, ElectricFieldUnit unit) /// public ElectricFieldUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -474,6 +472,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((ElectricFieldUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricInductance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricInductance.WindowsRuntimeComponent.g.cs index ac81283755..d086645f2e 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricInductance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricInductance.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class ElectricInductance : IQuantity static ElectricInductance() { BaseDimensions = new BaseDimensions(2, 1, -2, -2, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricInductance, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricInductance, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Henry. @@ -103,7 +103,7 @@ private ElectricInductance(double numericValue, ElectricInductanceUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,9 +154,7 @@ private ElectricInductance(double numericValue, ElectricInductanceUnit unit) /// public ElectricInductanceUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -519,6 +517,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((ElectricInductanceUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotential.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotential.WindowsRuntimeComponent.g.cs index dce16864d7..0d6a9ab285 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotential.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotential.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class ElectricPotential : IQuantity static ElectricPotential() { BaseDimensions = new BaseDimensions(2, 1, -3, -1, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricPotential, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricPotential, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Volt. @@ -100,7 +100,7 @@ private ElectricPotential(double numericValue, ElectricPotentialUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private ElectricPotential(double numericValue, ElectricPotentialUnit unit) /// public ElectricPotentialUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -531,6 +529,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((ElectricPotentialUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialAc.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialAc.WindowsRuntimeComponent.g.cs index fc672fb1fd..e7016eada2 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialAc.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialAc.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class ElectricPotentialAc : IQuantity static ElectricPotentialAc() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.ElectricPotentialAc, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricPotentialAc, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit VoltAc. @@ -100,7 +100,7 @@ private ElectricPotentialAc(double numericValue, ElectricPotentialAcUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private ElectricPotentialAc(double numericValue, ElectricPotentialAcUnit unit) /// public ElectricPotentialAcUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -531,6 +529,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((ElectricPotentialAcUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialDc.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialDc.WindowsRuntimeComponent.g.cs index c3307a2dea..507148d90a 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialDc.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialDc.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class ElectricPotentialDc : IQuantity static ElectricPotentialDc() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.ElectricPotentialDc, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricPotentialDc, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit VoltDc. @@ -100,7 +100,7 @@ private ElectricPotentialDc(double numericValue, ElectricPotentialDcUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private ElectricPotentialDc(double numericValue, ElectricPotentialDcUnit unit) /// public ElectricPotentialDcUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -531,6 +529,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((ElectricPotentialDcUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistance.WindowsRuntimeComponent.g.cs index 8a5158df14..11bfebecc2 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistance.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class ElectricResistance : IQuantity static ElectricResistance() { BaseDimensions = new BaseDimensions(2, 1, -3, -2, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricResistance, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricResistance, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Ohm. @@ -100,7 +100,7 @@ private ElectricResistance(double numericValue, ElectricResistanceUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private ElectricResistance(double numericValue, ElectricResistanceUnit unit) /// public ElectricResistanceUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -531,6 +529,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((ElectricResistanceUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistivity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistivity.WindowsRuntimeComponent.g.cs index bb14eb0728..a0426040d2 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistivity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistivity.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class ElectricResistivity : IQuantity static ElectricResistivity() { BaseDimensions = new BaseDimensions(3, 1, -3, -2, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricResistivity, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricResistivity, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit OhmMeter. @@ -103,7 +103,7 @@ private ElectricResistivity(double numericValue, ElectricResistivityUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,9 +154,7 @@ private ElectricResistivity(double numericValue, ElectricResistivityUnit unit) /// public ElectricResistivityUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -669,6 +667,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((ElectricResistivityUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Energy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Energy.WindowsRuntimeComponent.g.cs index a0617b8d46..203495bb03 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Energy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Energy.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Energy : IQuantity static Energy() { BaseDimensions = new BaseDimensions(2, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Energy, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Energy, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Joule. @@ -100,7 +100,7 @@ private Energy(double numericValue, EnergyUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private Energy(double numericValue, EnergyUnit unit) /// public EnergyUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -786,6 +784,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((EnergyUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Entropy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Entropy.WindowsRuntimeComponent.g.cs index 471f0f9171..c1592f7243 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Entropy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Entropy.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Entropy : IQuantity static Entropy() { BaseDimensions = new BaseDimensions(2, 1, -2, 0, -1, 0, 0); - Info = new QuantityInfo(QuantityType.Entropy, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Entropy, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit JoulePerKelvin. @@ -100,7 +100,7 @@ private Entropy(double numericValue, EntropyUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private Entropy(double numericValue, EntropyUnit unit) /// public EntropyUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -561,6 +559,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((EntropyUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Force.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Force.WindowsRuntimeComponent.g.cs index d5a6e4a92c..ee391414c9 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Force.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Force.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Force : IQuantity static Force() { BaseDimensions = new BaseDimensions(1, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Force, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Force, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Newton. @@ -100,7 +100,7 @@ private Force(double numericValue, ForceUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private Force(double numericValue, ForceUnit unit) /// public ForceUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -651,6 +649,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((ForceUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForceChangeRate.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForceChangeRate.WindowsRuntimeComponent.g.cs index b49ba37aae..e93d605262 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForceChangeRate.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForceChangeRate.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class ForceChangeRate : IQuantity static ForceChangeRate() { BaseDimensions = new BaseDimensions(1, 1, -3, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ForceChangeRate, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ForceChangeRate, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit NewtonPerSecond. @@ -100,7 +100,7 @@ private ForceChangeRate(double numericValue, ForceChangeRateUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private ForceChangeRate(double numericValue, ForceChangeRateUnit unit) /// public ForceChangeRateUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -621,6 +619,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((ForceChangeRateUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForcePerLength.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForcePerLength.WindowsRuntimeComponent.g.cs index 8f1ef88b83..9d21cb5d7b 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForcePerLength.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForcePerLength.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class ForcePerLength : IQuantity static ForcePerLength() { BaseDimensions = new BaseDimensions(0, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ForcePerLength, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ForcePerLength, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit NewtonPerMeter. @@ -100,7 +100,7 @@ private ForcePerLength(double numericValue, ForcePerLengthUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private ForcePerLength(double numericValue, ForcePerLengthUnit unit) /// public ForcePerLengthUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -591,6 +589,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((ForcePerLengthUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Frequency.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Frequency.WindowsRuntimeComponent.g.cs index 150960699a..ce9d9faa97 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Frequency.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Frequency.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Frequency : IQuantity static Frequency() { BaseDimensions = new BaseDimensions(0, 0, -1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Frequency, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Frequency, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Hertz. @@ -100,7 +100,7 @@ private Frequency(double numericValue, FrequencyUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private Frequency(double numericValue, FrequencyUnit unit) /// public FrequencyUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -576,6 +574,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((FrequencyUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatFlux.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatFlux.WindowsRuntimeComponent.g.cs index 8fb3a5d0e4..5a2e30a37a 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatFlux.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatFlux.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class HeatFlux : IQuantity static HeatFlux() { BaseDimensions = new BaseDimensions(0, 1, -3, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.HeatFlux, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.HeatFlux, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit WattPerSquareMeter. @@ -100,7 +100,7 @@ private HeatFlux(double numericValue, HeatFluxUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private HeatFlux(double numericValue, HeatFluxUnit unit) /// public HeatFluxUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -726,6 +724,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((HeatFluxUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatTransferCoefficient.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatTransferCoefficient.WindowsRuntimeComponent.g.cs index 82c5a0cbf4..e85aa755d8 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatTransferCoefficient.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatTransferCoefficient.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class HeatTransferCoefficient : IQuantity static HeatTransferCoefficient() { BaseDimensions = new BaseDimensions(0, 1, -3, 0, -1, 0, 0); - Info = new QuantityInfo(QuantityType.HeatTransferCoefficient, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.HeatTransferCoefficient, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit WattPerSquareMeterKelvin. @@ -100,7 +100,7 @@ private HeatTransferCoefficient(double numericValue, HeatTransferCoefficientUnit #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private HeatTransferCoefficient(double numericValue, HeatTransferCoefficientUnit /// public HeatTransferCoefficientUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -486,6 +484,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((HeatTransferCoefficientUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Illuminance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Illuminance.WindowsRuntimeComponent.g.cs index 645a6066f4..9aa3d912fc 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Illuminance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Illuminance.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class Illuminance : IQuantity static Illuminance() { BaseDimensions = new BaseDimensions(-2, 0, 0, 0, 0, 0, 1); - Info = new QuantityInfo(QuantityType.Illuminance, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Illuminance, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Lux. @@ -103,7 +103,7 @@ private Illuminance(double numericValue, IlluminanceUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,9 +154,7 @@ private Illuminance(double numericValue, IlluminanceUnit unit) /// public IlluminanceUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -519,6 +517,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((IlluminanceUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Information.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Information.WindowsRuntimeComponent.g.cs index 2dce531387..0dfe0b11cc 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Information.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Information.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Information : IQuantity static Information() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.Information, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Information, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Bit. @@ -100,7 +100,7 @@ private Information(decimal numericValue, InformationUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private Information(decimal numericValue, InformationUnit unit) /// public InformationUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -846,6 +844,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((InformationUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiance.WindowsRuntimeComponent.g.cs index ac0d21b651..39c9e15e91 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiance.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Irradiance : IQuantity static Irradiance() { BaseDimensions = new BaseDimensions(0, 1, -3, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Irradiance, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Irradiance, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit WattPerSquareMeter. @@ -100,7 +100,7 @@ private Irradiance(double numericValue, IrradianceUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private Irradiance(double numericValue, IrradianceUnit unit) /// public IrradianceUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -666,6 +664,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((IrradianceUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiation.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiation.WindowsRuntimeComponent.g.cs index 8c95c7244a..6dbc663243 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiation.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiation.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class Irradiation : IQuantity static Irradiation() { BaseDimensions = new BaseDimensions(0, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Irradiation, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Irradiation, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit JoulePerSquareMeter. @@ -103,7 +103,7 @@ private Irradiation(double numericValue, IrradiationUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,9 +154,7 @@ private Irradiation(double numericValue, IrradiationUnit unit) /// public IrradiationUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -519,6 +517,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((IrradiationUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/KinematicViscosity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/KinematicViscosity.WindowsRuntimeComponent.g.cs index 2bfb548c50..82b5a0f49c 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/KinematicViscosity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/KinematicViscosity.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class KinematicViscosity : IQuantity static KinematicViscosity() { BaseDimensions = new BaseDimensions(2, 0, -1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.KinematicViscosity, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.KinematicViscosity, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit SquareMeterPerSecond. @@ -103,7 +103,7 @@ private KinematicViscosity(double numericValue, KinematicViscosityUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,9 +154,7 @@ private KinematicViscosity(double numericValue, KinematicViscosityUnit unit) /// public KinematicViscosityUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -579,6 +577,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((KinematicViscosityUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LapseRate.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LapseRate.WindowsRuntimeComponent.g.cs index e670f4086f..a810dfb673 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LapseRate.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LapseRate.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class LapseRate : IQuantity static LapseRate() { BaseDimensions = new BaseDimensions(-1, 0, 0, 0, 1, 0, 0); - Info = new QuantityInfo(QuantityType.LapseRate, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.LapseRate, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit DegreeCelsiusPerKilometer. @@ -100,7 +100,7 @@ private LapseRate(double numericValue, LapseRateUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private LapseRate(double numericValue, LapseRateUnit unit) /// public LapseRateUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -471,6 +469,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((LapseRateUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Length.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Length.WindowsRuntimeComponent.g.cs index bcbb2ca968..2b1e1ba326 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Length.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Length.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Length : IQuantity static Length() { BaseDimensions = new BaseDimensions(1, 0, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Length, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Length, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Meter. @@ -100,7 +100,7 @@ private Length(double numericValue, LengthUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private Length(double numericValue, LengthUnit unit) /// public LengthUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -786,6 +784,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((LengthUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Level.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Level.WindowsRuntimeComponent.g.cs index 611fc4e971..ca1480a842 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Level.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Level.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Level : IQuantity static Level() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.Level, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Level, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Decibel. @@ -100,7 +100,7 @@ private Level(double numericValue, LevelUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private Level(double numericValue, LevelUnit unit) /// public LevelUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -486,6 +484,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((LevelUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LinearDensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LinearDensity.WindowsRuntimeComponent.g.cs index 86af4ab528..30ed5f9fc4 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LinearDensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LinearDensity.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class LinearDensity : IQuantity static LinearDensity() { BaseDimensions = new BaseDimensions(-1, 1, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.LinearDensity, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.LinearDensity, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit KilogramPerMeter. @@ -103,7 +103,7 @@ private LinearDensity(double numericValue, LinearDensityUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,9 +154,7 @@ private LinearDensity(double numericValue, LinearDensityUnit unit) /// public LinearDensityUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -504,6 +502,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((LinearDensityUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousFlux.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousFlux.WindowsRuntimeComponent.g.cs index accdc79634..5b03cb9ede 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousFlux.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousFlux.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class LuminousFlux : IQuantity static LuminousFlux() { BaseDimensions = new BaseDimensions(0, 0, 0, 0, 0, 0, 1); - Info = new QuantityInfo(QuantityType.LuminousFlux, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.LuminousFlux, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Lumen. @@ -103,7 +103,7 @@ private LuminousFlux(double numericValue, LuminousFluxUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,9 +154,7 @@ private LuminousFlux(double numericValue, LuminousFluxUnit unit) /// public LuminousFluxUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -474,6 +472,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((LuminousFluxUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousIntensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousIntensity.WindowsRuntimeComponent.g.cs index 1b47b3e7e4..b34bb2160a 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousIntensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousIntensity.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class LuminousIntensity : IQuantity static LuminousIntensity() { BaseDimensions = new BaseDimensions(0, 0, 0, 0, 0, 0, 1); - Info = new QuantityInfo(QuantityType.LuminousIntensity, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.LuminousIntensity, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Candela. @@ -103,7 +103,7 @@ private LuminousIntensity(double numericValue, LuminousIntensityUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,9 +154,7 @@ private LuminousIntensity(double numericValue, LuminousIntensityUnit unit) /// public LuminousIntensityUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -474,6 +472,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((LuminousIntensityUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticField.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticField.WindowsRuntimeComponent.g.cs index aa88ba8af8..1f0f58555b 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticField.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticField.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class MagneticField : IQuantity static MagneticField() { BaseDimensions = new BaseDimensions(0, 1, -2, -1, 0, 0, 0); - Info = new QuantityInfo(QuantityType.MagneticField, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.MagneticField, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Tesla. @@ -103,7 +103,7 @@ private MagneticField(double numericValue, MagneticFieldUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,9 +154,7 @@ private MagneticField(double numericValue, MagneticFieldUnit unit) /// public MagneticFieldUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -519,6 +517,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((MagneticFieldUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticFlux.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticFlux.WindowsRuntimeComponent.g.cs index c119bae1fa..9e134c55fb 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticFlux.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticFlux.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class MagneticFlux : IQuantity static MagneticFlux() { BaseDimensions = new BaseDimensions(2, 1, -2, -1, 0, 0, 0); - Info = new QuantityInfo(QuantityType.MagneticFlux, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.MagneticFlux, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Weber. @@ -103,7 +103,7 @@ private MagneticFlux(double numericValue, MagneticFluxUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,9 +154,7 @@ private MagneticFlux(double numericValue, MagneticFluxUnit unit) /// public MagneticFluxUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -474,6 +472,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((MagneticFluxUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Magnetization.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Magnetization.WindowsRuntimeComponent.g.cs index 0fdd89580f..8f3f2a64fe 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Magnetization.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Magnetization.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class Magnetization : IQuantity static Magnetization() { BaseDimensions = new BaseDimensions(-1, 0, 0, 1, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Magnetization, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Magnetization, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit AmperePerMeter. @@ -103,7 +103,7 @@ private Magnetization(double numericValue, MagnetizationUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,9 +154,7 @@ private Magnetization(double numericValue, MagnetizationUnit unit) /// public MagnetizationUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -474,6 +472,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((MagnetizationUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Mass.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Mass.WindowsRuntimeComponent.g.cs index b6e28b33d7..9907750471 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Mass.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Mass.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Mass : IQuantity static Mass() { BaseDimensions = new BaseDimensions(0, 1, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Mass, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Mass, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Kilogram. @@ -100,7 +100,7 @@ private Mass(double numericValue, MassUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private Mass(double numericValue, MassUnit unit) /// public MassUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -801,6 +799,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((MassUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlow.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlow.WindowsRuntimeComponent.g.cs index 542e98a4c5..102a069b31 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlow.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlow.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class MassFlow : IQuantity static MassFlow() { BaseDimensions = new BaseDimensions(0, 1, -1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.MassFlow, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.MassFlow, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit GramPerSecond. @@ -100,7 +100,7 @@ private MassFlow(double numericValue, MassFlowUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private MassFlow(double numericValue, MassFlowUnit unit) /// public MassFlowUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -906,6 +904,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((MassFlowUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlux.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlux.WindowsRuntimeComponent.g.cs index 68f8245d16..65d7f2fa53 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlux.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlux.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class MassFlux : IQuantity static MassFlux() { BaseDimensions = new BaseDimensions(-2, 1, -1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.MassFlux, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.MassFlux, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit KilogramPerSecondPerSquareMeter. @@ -100,7 +100,7 @@ private MassFlux(double numericValue, MassFluxUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private MassFlux(double numericValue, MassFluxUnit unit) /// public MassFluxUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -486,6 +484,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((MassFluxUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassMomentOfInertia.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassMomentOfInertia.WindowsRuntimeComponent.g.cs index ada4f3bc10..f8fee9338b 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassMomentOfInertia.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassMomentOfInertia.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class MassMomentOfInertia : IQuantity static MassMomentOfInertia() { BaseDimensions = new BaseDimensions(2, 1, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.MassMomentOfInertia, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.MassMomentOfInertia, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit KilogramSquareMeter. @@ -100,7 +100,7 @@ private MassMomentOfInertia(double numericValue, MassMomentOfInertiaUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private MassMomentOfInertia(double numericValue, MassMomentOfInertiaUnit unit) /// public MassMomentOfInertiaUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -876,6 +874,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((MassMomentOfInertiaUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEnergy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEnergy.WindowsRuntimeComponent.g.cs index fe8d407b04..b4a80eb836 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEnergy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEnergy.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class MolarEnergy : IQuantity static MolarEnergy() { BaseDimensions = new BaseDimensions(2, 1, -2, 0, 0, -1, 0); - Info = new QuantityInfo(QuantityType.MolarEnergy, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.MolarEnergy, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit JoulePerMole. @@ -100,7 +100,7 @@ private MolarEnergy(double numericValue, MolarEnergyUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private MolarEnergy(double numericValue, MolarEnergyUnit unit) /// public MolarEnergyUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -501,6 +499,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((MolarEnergyUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEntropy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEntropy.WindowsRuntimeComponent.g.cs index 0d31bfce35..fc39c77ba8 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEntropy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEntropy.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class MolarEntropy : IQuantity static MolarEntropy() { BaseDimensions = new BaseDimensions(2, 1, -2, 0, -1, -1, 0); - Info = new QuantityInfo(QuantityType.MolarEntropy, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.MolarEntropy, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit JoulePerMoleKelvin. @@ -100,7 +100,7 @@ private MolarEntropy(double numericValue, MolarEntropyUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private MolarEntropy(double numericValue, MolarEntropyUnit unit) /// public MolarEntropyUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -501,6 +499,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((MolarEntropyUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarMass.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarMass.WindowsRuntimeComponent.g.cs index d960cc66f9..75907e05e0 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarMass.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarMass.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class MolarMass : IQuantity static MolarMass() { BaseDimensions = new BaseDimensions(0, 1, 0, 0, 0, -1, 0); - Info = new QuantityInfo(QuantityType.MolarMass, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.MolarMass, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit KilogramPerMole. @@ -100,7 +100,7 @@ private MolarMass(double numericValue, MolarMassUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private MolarMass(double numericValue, MolarMassUnit unit) /// public MolarMassUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -636,6 +634,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((MolarMassUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Molarity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Molarity.WindowsRuntimeComponent.g.cs index eff01830d3..9cfac62926 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Molarity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Molarity.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class Molarity : IQuantity static Molarity() { BaseDimensions = new BaseDimensions(-3, 0, 0, 0, 0, 1, 0); - Info = new QuantityInfo(QuantityType.Molarity, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Molarity, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit MolesPerCubicMeter. @@ -103,7 +103,7 @@ private Molarity(double numericValue, MolarityUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,9 +154,7 @@ private Molarity(double numericValue, MolarityUnit unit) /// public MolarityUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -579,6 +577,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((MolarityUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permeability.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permeability.WindowsRuntimeComponent.g.cs index a2036addb7..b48349d849 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permeability.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permeability.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class Permeability : IQuantity static Permeability() { BaseDimensions = new BaseDimensions(1, 1, -2, -2, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Permeability, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Permeability, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit HenryPerMeter. @@ -103,7 +103,7 @@ private Permeability(double numericValue, PermeabilityUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,9 +154,7 @@ private Permeability(double numericValue, PermeabilityUnit unit) /// public PermeabilityUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -474,6 +472,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((PermeabilityUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permittivity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permittivity.WindowsRuntimeComponent.g.cs index f25fa969f3..d87700409f 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permittivity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permittivity.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class Permittivity : IQuantity static Permittivity() { BaseDimensions = new BaseDimensions(-3, -1, 4, 2, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Permittivity, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Permittivity, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit FaradPerMeter. @@ -103,7 +103,7 @@ private Permittivity(double numericValue, PermittivityUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,9 +154,7 @@ private Permittivity(double numericValue, PermittivityUnit unit) /// public PermittivityUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -474,6 +472,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((PermittivityUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Power.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Power.WindowsRuntimeComponent.g.cs index c876fc930c..e59b298eeb 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Power.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Power.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Power : IQuantity static Power() { BaseDimensions = new BaseDimensions(2, 1, -3, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Power, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Power, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Watt. @@ -100,7 +100,7 @@ private Power(decimal numericValue, PowerUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private Power(decimal numericValue, PowerUnit unit) /// public PowerUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -756,6 +754,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((PowerUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerDensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerDensity.WindowsRuntimeComponent.g.cs index e30aa0393a..565aa7087e 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerDensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerDensity.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class PowerDensity : IQuantity static PowerDensity() { BaseDimensions = new BaseDimensions(-1, 1, -3, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.PowerDensity, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.PowerDensity, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit WattPerCubicMeter. @@ -100,7 +100,7 @@ private PowerDensity(double numericValue, PowerDensityUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private PowerDensity(double numericValue, PowerDensityUnit unit) /// public PowerDensityUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -1116,6 +1114,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((PowerDensityUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerRatio.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerRatio.WindowsRuntimeComponent.g.cs index e1b3290771..898b59d13c 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerRatio.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerRatio.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class PowerRatio : IQuantity static PowerRatio() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.PowerRatio, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.PowerRatio, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit DecibelWatt. @@ -100,7 +100,7 @@ private PowerRatio(double numericValue, PowerRatioUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private PowerRatio(double numericValue, PowerRatioUnit unit) /// public PowerRatioUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -486,6 +484,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((PowerRatioUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Pressure.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Pressure.WindowsRuntimeComponent.g.cs index 8dc940e806..3a88663b42 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Pressure.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Pressure.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Pressure : IQuantity static Pressure() { BaseDimensions = new BaseDimensions(-1, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Pressure, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Pressure, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Pascal. @@ -100,7 +100,7 @@ private Pressure(double numericValue, PressureUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private Pressure(double numericValue, PressureUnit unit) /// public PressureUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -1086,6 +1084,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((PressureUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PressureChangeRate.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PressureChangeRate.WindowsRuntimeComponent.g.cs index 236a6c7f83..7d37ecbd08 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PressureChangeRate.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PressureChangeRate.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class PressureChangeRate : IQuantity static PressureChangeRate() { BaseDimensions = new BaseDimensions(-1, 1, -3, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.PressureChangeRate, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.PressureChangeRate, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit PascalPerSecond. @@ -100,7 +100,7 @@ private PressureChangeRate(double numericValue, PressureChangeRateUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private PressureChangeRate(double numericValue, PressureChangeRateUnit unit) /// public PressureChangeRateUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -561,6 +559,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((PressureChangeRateUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Ratio.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Ratio.WindowsRuntimeComponent.g.cs index 5f0d092054..d9802c02fe 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Ratio.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Ratio.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Ratio : IQuantity static Ratio() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.Ratio, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Ratio, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit DecimalFraction. @@ -100,7 +100,7 @@ private Ratio(double numericValue, RatioUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private Ratio(double numericValue, RatioUnit unit) /// public RatioUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -546,6 +544,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((RatioUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactiveEnergy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactiveEnergy.WindowsRuntimeComponent.g.cs index 841193fede..da7e2e3dd5 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactiveEnergy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactiveEnergy.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class ReactiveEnergy : IQuantity static ReactiveEnergy() { BaseDimensions = new BaseDimensions(2, 1, -1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ReactiveEnergy, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ReactiveEnergy, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit VoltampereReactiveHour. @@ -100,7 +100,7 @@ private ReactiveEnergy(double numericValue, ReactiveEnergyUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private ReactiveEnergy(double numericValue, ReactiveEnergyUnit unit) /// public ReactiveEnergyUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -501,6 +499,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((ReactiveEnergyUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactivePower.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactivePower.WindowsRuntimeComponent.g.cs index fcfe1a8362..ae3173d87b 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactivePower.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactivePower.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class ReactivePower : IQuantity static ReactivePower() { BaseDimensions = new BaseDimensions(2, 1, -3, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ReactivePower, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ReactivePower, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit VoltampereReactive. @@ -100,7 +100,7 @@ private ReactivePower(double numericValue, ReactivePowerUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private ReactivePower(double numericValue, ReactivePowerUnit unit) /// public ReactivePowerUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -516,6 +514,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((ReactivePowerUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalAcceleration.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalAcceleration.WindowsRuntimeComponent.g.cs index 9dda547135..83c7953ffb 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalAcceleration.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalAcceleration.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class RotationalAcceleration : IQuantity static RotationalAcceleration() { BaseDimensions = new BaseDimensions(0, 0, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.RotationalAcceleration, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.RotationalAcceleration, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit RadianPerSecondSquared. @@ -100,7 +100,7 @@ private RotationalAcceleration(double numericValue, RotationalAccelerationUnit u #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private RotationalAcceleration(double numericValue, RotationalAccelerationUnit u /// public RotationalAccelerationUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -501,6 +499,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((RotationalAccelerationUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalSpeed.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalSpeed.WindowsRuntimeComponent.g.cs index 5d212c16d1..1b867000a8 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalSpeed.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalSpeed.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class RotationalSpeed : IQuantity static RotationalSpeed() { BaseDimensions = new BaseDimensions(0, 0, -1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.RotationalSpeed, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.RotationalSpeed, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit RadianPerSecond. @@ -100,7 +100,7 @@ private RotationalSpeed(double numericValue, RotationalSpeedUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private RotationalSpeed(double numericValue, RotationalSpeedUnit unit) /// public RotationalSpeedUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -651,6 +649,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((RotationalSpeedUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffness.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffness.WindowsRuntimeComponent.g.cs index 42a4ab6bba..5fcb7afbc1 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffness.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffness.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class RotationalStiffness : IQuantity static RotationalStiffness() { BaseDimensions = new BaseDimensions(2, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.RotationalStiffness, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.RotationalStiffness, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit NewtonMeterPerRadian. @@ -100,7 +100,7 @@ private RotationalStiffness(double numericValue, RotationalStiffnessUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private RotationalStiffness(double numericValue, RotationalStiffnessUnit unit) /// public RotationalStiffnessUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -501,6 +499,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((RotationalStiffnessUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffnessPerLength.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffnessPerLength.WindowsRuntimeComponent.g.cs index f982900708..4efecf5098 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffnessPerLength.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffnessPerLength.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class RotationalStiffnessPerLength : IQuantity static RotationalStiffnessPerLength() { BaseDimensions = new BaseDimensions(1, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.RotationalStiffnessPerLength, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.RotationalStiffnessPerLength, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit NewtonMeterPerRadianPerMeter. @@ -100,7 +100,7 @@ private RotationalStiffnessPerLength(double numericValue, RotationalStiffnessPer #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private RotationalStiffnessPerLength(double numericValue, RotationalStiffnessPer /// public RotationalStiffnessPerLengthUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -501,6 +499,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((RotationalStiffnessPerLengthUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SolidAngle.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SolidAngle.WindowsRuntimeComponent.g.cs index 35d60e4714..6706a9b1ce 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SolidAngle.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SolidAngle.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class SolidAngle : IQuantity static SolidAngle() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.SolidAngle, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.SolidAngle, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Steradian. @@ -103,7 +103,7 @@ private SolidAngle(double numericValue, SolidAngleUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,9 +154,7 @@ private SolidAngle(double numericValue, SolidAngleUnit unit) /// public SolidAngleUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -474,6 +472,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((SolidAngleUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEnergy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEnergy.WindowsRuntimeComponent.g.cs index bd361f87bb..fec5a8921b 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEnergy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEnergy.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class SpecificEnergy : IQuantity static SpecificEnergy() { BaseDimensions = new BaseDimensions(2, 0, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.SpecificEnergy, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.SpecificEnergy, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit JoulePerKilogram. @@ -103,7 +103,7 @@ private SpecificEnergy(double numericValue, SpecificEnergyUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,9 +154,7 @@ private SpecificEnergy(double numericValue, SpecificEnergyUnit unit) /// public SpecificEnergyUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -594,6 +592,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((SpecificEnergyUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEntropy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEntropy.WindowsRuntimeComponent.g.cs index 1a73dd84df..fd825100e7 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEntropy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEntropy.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class SpecificEntropy : IQuantity static SpecificEntropy() { BaseDimensions = new BaseDimensions(2, 0, -2, 0, -1, 0, 0); - Info = new QuantityInfo(QuantityType.SpecificEntropy, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.SpecificEntropy, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit JoulePerKilogramKelvin. @@ -100,7 +100,7 @@ private SpecificEntropy(double numericValue, SpecificEntropyUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private SpecificEntropy(double numericValue, SpecificEntropyUnit unit) /// public SpecificEntropyUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -576,6 +574,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((SpecificEntropyUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificVolume.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificVolume.WindowsRuntimeComponent.g.cs index 583709747a..1c4841a622 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificVolume.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificVolume.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class SpecificVolume : IQuantity static SpecificVolume() { BaseDimensions = new BaseDimensions(3, -1, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.SpecificVolume, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.SpecificVolume, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit CubicMeterPerKilogram. @@ -100,7 +100,7 @@ private SpecificVolume(double numericValue, SpecificVolumeUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private SpecificVolume(double numericValue, SpecificVolumeUnit unit) /// public SpecificVolumeUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -501,6 +499,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((SpecificVolumeUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificWeight.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificWeight.WindowsRuntimeComponent.g.cs index 9775009344..16e20b7ac1 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificWeight.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificWeight.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class SpecificWeight : IQuantity static SpecificWeight() { BaseDimensions = new BaseDimensions(-2, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.SpecificWeight, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.SpecificWeight, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit NewtonPerCubicMeter. @@ -103,7 +103,7 @@ private SpecificWeight(double numericValue, SpecificWeightUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,9 +154,7 @@ private SpecificWeight(double numericValue, SpecificWeightUnit unit) /// public SpecificWeightUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -714,6 +712,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((SpecificWeightUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Speed.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Speed.WindowsRuntimeComponent.g.cs index bc5eea851b..b3b9d89f45 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Speed.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Speed.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Speed : IQuantity static Speed() { BaseDimensions = new BaseDimensions(1, 0, -1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Speed, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Speed, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit MeterPerSecond. @@ -100,7 +100,7 @@ private Speed(double numericValue, SpeedUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private Speed(double numericValue, SpeedUnit unit) /// public SpeedUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -936,6 +934,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((SpeedUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Temperature.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Temperature.WindowsRuntimeComponent.g.cs index 64d961e1bc..ce1deef811 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Temperature.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Temperature.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Temperature : IQuantity static Temperature() { BaseDimensions = new BaseDimensions(0, 0, 0, 0, 1, 0, 0); - Info = new QuantityInfo(QuantityType.Temperature, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Temperature, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Kelvin. @@ -100,7 +100,7 @@ private Temperature(double numericValue, TemperatureUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private Temperature(double numericValue, TemperatureUnit unit) /// public TemperatureUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -576,6 +574,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((TemperatureUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureChangeRate.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureChangeRate.WindowsRuntimeComponent.g.cs index 452ec58b03..fba1850beb 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureChangeRate.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureChangeRate.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class TemperatureChangeRate : IQuantity static TemperatureChangeRate() { BaseDimensions = new BaseDimensions(0, 0, -1, 0, 1, 0, 0); - Info = new QuantityInfo(QuantityType.TemperatureChangeRate, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.TemperatureChangeRate, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit DegreeCelsiusPerSecond. @@ -100,7 +100,7 @@ private TemperatureChangeRate(double numericValue, TemperatureChangeRateUnit uni #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private TemperatureChangeRate(double numericValue, TemperatureChangeRateUnit uni /// public TemperatureChangeRateUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -606,6 +604,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((TemperatureChangeRateUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureDelta.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureDelta.WindowsRuntimeComponent.g.cs index d9332fda45..e431e181c3 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureDelta.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureDelta.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class TemperatureDelta : IQuantity static TemperatureDelta() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.TemperatureDelta, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.TemperatureDelta, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Kelvin. @@ -100,7 +100,7 @@ private TemperatureDelta(double numericValue, TemperatureDeltaUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private TemperatureDelta(double numericValue, TemperatureDeltaUnit unit) /// public TemperatureDeltaUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -576,6 +574,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((TemperatureDeltaUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalConductivity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalConductivity.WindowsRuntimeComponent.g.cs index 538aff31b2..fbcdacd623 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalConductivity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalConductivity.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class ThermalConductivity : IQuantity static ThermalConductivity() { BaseDimensions = new BaseDimensions(1, 1, -3, 0, -1, 0, 0); - Info = new QuantityInfo(QuantityType.ThermalConductivity, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ThermalConductivity, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit WattPerMeterKelvin. @@ -103,7 +103,7 @@ private ThermalConductivity(double numericValue, ThermalConductivityUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -154,9 +154,7 @@ private ThermalConductivity(double numericValue, ThermalConductivityUnit unit) /// public ThermalConductivityUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -489,6 +487,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((ThermalConductivityUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalResistance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalResistance.WindowsRuntimeComponent.g.cs index 63fcd8277d..8559999134 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalResistance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalResistance.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class ThermalResistance : IQuantity static ThermalResistance() { BaseDimensions = new BaseDimensions(0, -1, 3, 0, 1, 0, 0); - Info = new QuantityInfo(QuantityType.ThermalResistance, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ThermalResistance, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit SquareMeterKelvinPerKilowatt. @@ -100,7 +100,7 @@ private ThermalResistance(double numericValue, ThermalResistanceUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private ThermalResistance(double numericValue, ThermalResistanceUnit unit) /// public ThermalResistanceUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -531,6 +529,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((ThermalResistanceUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Torque.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Torque.WindowsRuntimeComponent.g.cs index fcaa4018a4..5f57f461e9 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Torque.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Torque.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Torque : IQuantity static Torque() { BaseDimensions = new BaseDimensions(2, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Torque, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Torque, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit NewtonMeter. @@ -100,7 +100,7 @@ private Torque(double numericValue, TorqueUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private Torque(double numericValue, TorqueUnit unit) /// public TorqueUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -771,6 +769,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((TorqueUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VitaminA.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VitaminA.WindowsRuntimeComponent.g.cs index 5d92327835..77163ddcad 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VitaminA.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VitaminA.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class VitaminA : IQuantity static VitaminA() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.VitaminA, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.VitaminA, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit InternationalUnit. @@ -100,7 +100,7 @@ private VitaminA(double numericValue, VitaminAUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private VitaminA(double numericValue, VitaminAUnit unit) /// public VitaminAUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -471,6 +469,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((VitaminAUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Volume.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Volume.WindowsRuntimeComponent.g.cs index 113ec034e3..3d70f21286 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Volume.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Volume.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Volume : IQuantity static Volume() { BaseDimensions = new BaseDimensions(3, 0, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Volume, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Volume, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit CubicMeter. @@ -100,7 +100,7 @@ private Volume(double numericValue, VolumeUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private Volume(double numericValue, VolumeUnit unit) /// public VolumeUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -1131,6 +1129,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((VolumeUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VolumeFlow.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VolumeFlow.WindowsRuntimeComponent.g.cs index 533a91708b..9cea22dd32 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VolumeFlow.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VolumeFlow.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class VolumeFlow : IQuantity static VolumeFlow() { BaseDimensions = new BaseDimensions(3, 0, -1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.VolumeFlow, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.VolumeFlow, Units.Cast().ToArray(), Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit CubicMeterPerSecond. @@ -100,7 +100,7 @@ private VolumeFlow(double numericValue, VolumeFlowUnit unit) #region Static Properties /// - internal static QuantityInfo Info { get; } + internal static QuantityInfo Info { get; } /// /// The of this quantity. @@ -151,9 +151,7 @@ private VolumeFlow(double numericValue, VolumeFlowUnit unit) /// public VolumeFlowUnit Unit => _unit.GetValueOrDefault(BaseUnit); - internal QuantityInfo QuantityInfo => Info; - - QuantityInfo IQuantity.QuantityInfo => Info; + internal QuantityInfo QuantityInfo => Info; /// /// The of this quantity. @@ -1176,6 +1174,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(object unit) => As((VolumeFlowUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/CustomCode/Quantity.cs b/UnitsNet/CustomCode/Quantity.cs index b327fbebb2..7248efea60 100644 --- a/UnitsNet/CustomCode/Quantity.cs +++ b/UnitsNet/CustomCode/Quantity.cs @@ -3,16 +3,32 @@ using System.Reflection; using UnitsNet.InternalHelpers; +#if WINDOWS_UWP +using Culture = System.String; +using FromValue = System.Double; +#else +using Culture = System.IFormatProvider; +using FromValue = UnitsNet.QuantityValue; +#endif + namespace UnitsNet { - public partial class Quantity +#if WINDOWS_UWP + internal +#else + public +#endif + partial class Quantity { + private static readonly Lazy InfosLazy; + static Quantity() { var quantityTypes = Enum.GetValues(typeof(QuantityType)).Cast().Except(new[] {QuantityType.Undefined}).ToArray(); Types = quantityTypes; Names = quantityTypes.Select(qt => qt.ToString()).ToArray(); +#if !WINDOWS_UWP // A bunch of reflection to enumerate quantity types, instantiate with the default constructor and return its QuantityInfo property InfosLazy = new Lazy(() => typeof(Length) .Wrap() @@ -25,6 +41,7 @@ static Quantity() .Select(q => q.QuantityInfo) .OrderBy(q => q.Name) .ToArray()); +#endif } /// @@ -37,11 +54,31 @@ static Quantity() /// public static string[] Names { get; } +#if !WINDOWS_UWP /// /// All quantity information objects, such as and . /// public static QuantityInfo[] Infos => InfosLazy.Value; +#endif - private static readonly Lazy InfosLazy; + /// + /// Dynamically construct a quantity. + /// + /// Numeric value. + /// Unit enum value. + /// An object. + /// Unit value is not a know unit enum type. +#if WINDOWS_UWP + internal static IQuantity From(FromValue value, Enum unit) +#else + public static IQuantity From(FromValue value, Enum unit) +#endif + { + if (TryFrom(value, unit, out IQuantity quantity)) + return quantity; + + throw new ArgumentException( + $"Unit value {unit} of type {unit.GetType()} is not a known unit enum type. Expected types like UnitsNet.Units.LengthUnit. Did you pass in a third-party enum type defined outside UnitsNet library?"); + } } } diff --git a/UnitsNet/CustomCode/UnitParser.cs b/UnitsNet/CustomCode/UnitParser.cs index 016760c190..7e1d3e093f 100644 --- a/UnitsNet/CustomCode/UnitParser.cs +++ b/UnitsNet/CustomCode/UnitParser.cs @@ -161,7 +161,12 @@ bool TryParse(string unitAbbreviation, [CanBeNull] IFormatProvider fo /// The unit enum value as out result. /// True if successful. [PublicAPI] - public bool TryParse(string unitAbbreviation, Type unitType, out Enum unit) +#if WINDOWS_UWP + internal +#else + public +#endif + bool TryParse(string unitAbbreviation, Type unitType, out Enum unit) { return TryParse(unitAbbreviation, unitType, null, out unit); } diff --git a/UnitsNet/GeneratedCode/Quantities/Acceleration.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Acceleration.NetFramework.g.cs index 7e06c4514b..568dd95460 100644 --- a/UnitsNet/GeneratedCode/Quantities/Acceleration.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Acceleration.NetFramework.g.cs @@ -685,6 +685,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((AccelerationUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.NetFramework.g.cs index 0b5c98a978..033f1f4c8a 100644 --- a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.NetFramework.g.cs @@ -713,6 +713,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((AmountOfSubstanceUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.NetFramework.g.cs index c242d24e98..f1d3cc6465 100644 --- a/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.NetFramework.g.cs @@ -567,6 +567,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((AmplitudeRatioUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/Angle.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Angle.NetFramework.g.cs index c471a4fd31..79fe50b793 100644 --- a/UnitsNet/GeneratedCode/Quantities/Angle.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Angle.NetFramework.g.cs @@ -699,6 +699,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((AngleUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.NetFramework.g.cs index d3b90a42fe..8f0f754047 100644 --- a/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.NetFramework.g.cs @@ -545,6 +545,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((ApparentEnergyUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/ApparentPower.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ApparentPower.NetFramework.g.cs index cf34d5b7ed..2e7b78f8cf 100644 --- a/UnitsNet/GeneratedCode/Quantities/ApparentPower.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ApparentPower.NetFramework.g.cs @@ -559,6 +559,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((ApparentPowerUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/Area.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Area.NetFramework.g.cs index d55d834833..2309c65c92 100644 --- a/UnitsNet/GeneratedCode/Quantities/Area.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Area.NetFramework.g.cs @@ -685,6 +685,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((AreaUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/AreaDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaDensity.NetFramework.g.cs index 70639a0bf5..c61d53543a 100644 --- a/UnitsNet/GeneratedCode/Quantities/AreaDensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AreaDensity.NetFramework.g.cs @@ -517,6 +517,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((AreaDensityUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.NetFramework.g.cs index 88907be813..65a283b85b 100644 --- a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.NetFramework.g.cs @@ -587,6 +587,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((AreaMomentOfInertiaUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/BitRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/BitRate.NetFramework.g.cs index 29fc7acb83..55a3b6af2f 100644 --- a/UnitsNet/GeneratedCode/Quantities/BitRate.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/BitRate.NetFramework.g.cs @@ -870,6 +870,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((BitRateUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.NetFramework.g.cs index 56f3ef2b15..c8ac1d260b 100644 --- a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.NetFramework.g.cs @@ -545,6 +545,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((BrakeSpecificFuelConsumptionUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/Capacitance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Capacitance.NetFramework.g.cs index ba7b3f8aa2..a262c26a47 100644 --- a/UnitsNet/GeneratedCode/Quantities/Capacitance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Capacitance.NetFramework.g.cs @@ -604,6 +604,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((CapacitanceUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.NetFramework.g.cs index a2f060e325..9492208027 100644 --- a/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.NetFramework.g.cs @@ -545,6 +545,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((CoefficientOfThermalExpansionUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/Density.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Density.NetFramework.g.cs index 092be48991..11a018f592 100644 --- a/UnitsNet/GeneratedCode/Quantities/Density.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Density.NetFramework.g.cs @@ -1052,6 +1052,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((DensityUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/Duration.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Duration.NetFramework.g.cs index c6602030a6..67a0003ba4 100644 --- a/UnitsNet/GeneratedCode/Quantities/Duration.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Duration.NetFramework.g.cs @@ -643,6 +643,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((DurationUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.NetFramework.g.cs index 28ba357792..04035fb43e 100644 --- a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.NetFramework.g.cs @@ -590,6 +590,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((DynamicViscosityUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.NetFramework.g.cs index aa7f9b3815..1711cc2c66 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.NetFramework.g.cs @@ -559,6 +559,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((ElectricAdmittanceUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.NetFramework.g.cs index 35a8e09120..84d508b3c5 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.NetFramework.g.cs @@ -520,6 +520,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((ElectricChargeUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.NetFramework.g.cs index 95266fa6f8..cc4c4ca8ae 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.NetFramework.g.cs @@ -520,6 +520,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((ElectricChargeDensityUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricConductance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricConductance.NetFramework.g.cs index cb0e42aa59..169f40c1a1 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricConductance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductance.NetFramework.g.cs @@ -548,6 +548,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((ElectricConductanceUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.NetFramework.g.cs index d0bb9ff374..9cb8125853 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.NetFramework.g.cs @@ -520,6 +520,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((ElectricConductivityUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.NetFramework.g.cs index 1651ab26ab..aad2b1a554 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.NetFramework.g.cs @@ -615,6 +615,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((ElectricCurrentUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.NetFramework.g.cs index 037c43a8d8..1169e24df5 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.NetFramework.g.cs @@ -520,6 +520,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((ElectricCurrentDensityUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.NetFramework.g.cs index 6309ffd257..706a8cc18b 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.NetFramework.g.cs @@ -517,6 +517,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((ElectricCurrentGradientUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricField.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricField.NetFramework.g.cs index 1f1a7a3918..5d68ba464f 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricField.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricField.NetFramework.g.cs @@ -520,6 +520,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((ElectricFieldUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricInductance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricInductance.NetFramework.g.cs index 36f7926c4c..8765a9f956 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricInductance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricInductance.NetFramework.g.cs @@ -562,6 +562,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((ElectricInductanceUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.NetFramework.g.cs index 5303dd6e87..ec15a51342 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.NetFramework.g.cs @@ -573,6 +573,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((ElectricPotentialUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.NetFramework.g.cs index 243e2f88ef..8bf69f14b8 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.NetFramework.g.cs @@ -573,6 +573,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((ElectricPotentialAcUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.NetFramework.g.cs index 479084d535..94b9784b24 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.NetFramework.g.cs @@ -573,6 +573,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((ElectricPotentialDcUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.NetFramework.g.cs index 661bba43a2..e4d9c8c5c2 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.NetFramework.g.cs @@ -573,6 +573,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((ElectricResistanceUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.NetFramework.g.cs index 87f37bbc66..022ba94b91 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.NetFramework.g.cs @@ -702,6 +702,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((ElectricResistivityUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/Energy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Energy.NetFramework.g.cs index 05fbd6c42d..810bd5adca 100644 --- a/UnitsNet/GeneratedCode/Quantities/Energy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Energy.NetFramework.g.cs @@ -811,6 +811,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((EnergyUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/Entropy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Entropy.NetFramework.g.cs index aeca1b40a6..f55cdc6a36 100644 --- a/UnitsNet/GeneratedCode/Quantities/Entropy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Entropy.NetFramework.g.cs @@ -601,6 +601,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((EntropyUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/Force.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Force.NetFramework.g.cs index 98e0641a83..14ab567103 100644 --- a/UnitsNet/GeneratedCode/Quantities/Force.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Force.NetFramework.g.cs @@ -685,6 +685,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((ForceUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.NetFramework.g.cs index 90cbd463a7..9f8e451f91 100644 --- a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.NetFramework.g.cs @@ -657,6 +657,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((ForceChangeRateUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.NetFramework.g.cs index 39e717105b..94dbe8f3c9 100644 --- a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.NetFramework.g.cs @@ -629,6 +629,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((ForcePerLengthUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/Frequency.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Frequency.NetFramework.g.cs index 81c14d2100..9accb1cf8d 100644 --- a/UnitsNet/GeneratedCode/Quantities/Frequency.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Frequency.NetFramework.g.cs @@ -615,6 +615,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((FrequencyUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/HeatFlux.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatFlux.NetFramework.g.cs index 49f6633707..1e79669bd7 100644 --- a/UnitsNet/GeneratedCode/Quantities/HeatFlux.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/HeatFlux.NetFramework.g.cs @@ -755,6 +755,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((HeatFluxUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.NetFramework.g.cs index 8c2f194749..8c628b258e 100644 --- a/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.NetFramework.g.cs @@ -531,6 +531,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((HeatTransferCoefficientUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/Illuminance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Illuminance.NetFramework.g.cs index 0764531f29..7c3e4e4194 100644 --- a/UnitsNet/GeneratedCode/Quantities/Illuminance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Illuminance.NetFramework.g.cs @@ -562,6 +562,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((IlluminanceUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/Information.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Information.NetFramework.g.cs index bf0d7c4fb5..c79a8446e9 100644 --- a/UnitsNet/GeneratedCode/Quantities/Information.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Information.NetFramework.g.cs @@ -867,6 +867,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((InformationUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/Irradiance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Irradiance.NetFramework.g.cs index e842d091e3..bd48b113f9 100644 --- a/UnitsNet/GeneratedCode/Quantities/Irradiance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Irradiance.NetFramework.g.cs @@ -699,6 +699,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((IrradianceUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/Irradiation.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Irradiation.NetFramework.g.cs index f510ff8b23..abc3db21fb 100644 --- a/UnitsNet/GeneratedCode/Quantities/Irradiation.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Irradiation.NetFramework.g.cs @@ -562,6 +562,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((IrradiationUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.NetFramework.g.cs index 7f4525c38c..5c44dfc1ea 100644 --- a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.NetFramework.g.cs @@ -618,6 +618,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((KinematicViscosityUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/LapseRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/LapseRate.NetFramework.g.cs index 4c5178899a..09f232870c 100644 --- a/UnitsNet/GeneratedCode/Quantities/LapseRate.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LapseRate.NetFramework.g.cs @@ -517,6 +517,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((LapseRateUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/Length.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Length.NetFramework.g.cs index 9da084946d..7db7f5d3f2 100644 --- a/UnitsNet/GeneratedCode/Quantities/Length.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Length.NetFramework.g.cs @@ -811,6 +811,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((LengthUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/Level.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Level.NetFramework.g.cs index 4e16a043ee..5595aa444a 100644 --- a/UnitsNet/GeneratedCode/Quantities/Level.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Level.NetFramework.g.cs @@ -539,6 +539,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((LevelUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/LinearDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/LinearDensity.NetFramework.g.cs index 788889905a..d7f67bdcaa 100644 --- a/UnitsNet/GeneratedCode/Quantities/LinearDensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LinearDensity.NetFramework.g.cs @@ -548,6 +548,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((LinearDensityUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/LuminousFlux.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/LuminousFlux.NetFramework.g.cs index d320671b90..c3516338f9 100644 --- a/UnitsNet/GeneratedCode/Quantities/LuminousFlux.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LuminousFlux.NetFramework.g.cs @@ -520,6 +520,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((LuminousFluxUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.NetFramework.g.cs index be914e1a3d..aae977fb6c 100644 --- a/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.NetFramework.g.cs @@ -520,6 +520,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((LuminousIntensityUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/MagneticField.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MagneticField.NetFramework.g.cs index e5b33f9cac..218934e505 100644 --- a/UnitsNet/GeneratedCode/Quantities/MagneticField.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MagneticField.NetFramework.g.cs @@ -562,6 +562,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((MagneticFieldUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/MagneticFlux.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MagneticFlux.NetFramework.g.cs index f1f79e0fe5..b48454409a 100644 --- a/UnitsNet/GeneratedCode/Quantities/MagneticFlux.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MagneticFlux.NetFramework.g.cs @@ -520,6 +520,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((MagneticFluxUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/Magnetization.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Magnetization.NetFramework.g.cs index eae2e8d0d9..3d481b637e 100644 --- a/UnitsNet/GeneratedCode/Quantities/Magnetization.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Magnetization.NetFramework.g.cs @@ -520,6 +520,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((MagnetizationUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/Mass.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Mass.NetFramework.g.cs index 511396af33..6baf79d85a 100644 --- a/UnitsNet/GeneratedCode/Quantities/Mass.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Mass.NetFramework.g.cs @@ -825,6 +825,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((MassUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/MassFlow.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFlow.NetFramework.g.cs index 057451228d..91b7d8230f 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFlow.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFlow.NetFramework.g.cs @@ -923,6 +923,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((MassFlowUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/MassFlux.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFlux.NetFramework.g.cs index d4daeb7f2f..3a95d43770 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFlux.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFlux.NetFramework.g.cs @@ -531,6 +531,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((MassFluxUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.NetFramework.g.cs index 7bb31e9de7..d5a351d5b5 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.NetFramework.g.cs @@ -895,6 +895,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((MassMomentOfInertiaUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/MolarEnergy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarEnergy.NetFramework.g.cs index e2c5ed8cc2..617bf25443 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarEnergy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarEnergy.NetFramework.g.cs @@ -545,6 +545,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((MolarEnergyUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/MolarEntropy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarEntropy.NetFramework.g.cs index f3514417f6..70c87c8733 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarEntropy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarEntropy.NetFramework.g.cs @@ -545,6 +545,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((MolarEntropyUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/MolarMass.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarMass.NetFramework.g.cs index 1323671ca4..d93fd1b966 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarMass.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarMass.NetFramework.g.cs @@ -671,6 +671,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((MolarMassUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/Molarity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Molarity.NetFramework.g.cs index b52a7676fc..154a8aed18 100644 --- a/UnitsNet/GeneratedCode/Quantities/Molarity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Molarity.NetFramework.g.cs @@ -618,6 +618,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((MolarityUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/Permeability.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Permeability.NetFramework.g.cs index abd728697b..f37cf259c8 100644 --- a/UnitsNet/GeneratedCode/Quantities/Permeability.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Permeability.NetFramework.g.cs @@ -520,6 +520,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((PermeabilityUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/Permittivity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Permittivity.NetFramework.g.cs index 8d496507aa..da859ce411 100644 --- a/UnitsNet/GeneratedCode/Quantities/Permittivity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Permittivity.NetFramework.g.cs @@ -520,6 +520,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((PermittivityUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/Power.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Power.NetFramework.g.cs index a6aff3f3bd..41ee1ae066 100644 --- a/UnitsNet/GeneratedCode/Quantities/Power.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Power.NetFramework.g.cs @@ -783,6 +783,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((PowerUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/PowerDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/PowerDensity.NetFramework.g.cs index 346c971207..aea1cb22da 100644 --- a/UnitsNet/GeneratedCode/Quantities/PowerDensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PowerDensity.NetFramework.g.cs @@ -1119,6 +1119,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((PowerDensityUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/PowerRatio.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/PowerRatio.NetFramework.g.cs index 436253f576..848203841a 100644 --- a/UnitsNet/GeneratedCode/Quantities/PowerRatio.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PowerRatio.NetFramework.g.cs @@ -539,6 +539,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((PowerRatioUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/Pressure.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Pressure.NetFramework.g.cs index b6b1d2cfe5..3733241331 100644 --- a/UnitsNet/GeneratedCode/Quantities/Pressure.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Pressure.NetFramework.g.cs @@ -1091,6 +1091,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((PressureUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.NetFramework.g.cs index e518048765..a0225ff16d 100644 --- a/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.NetFramework.g.cs @@ -601,6 +601,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((PressureChangeRateUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/Ratio.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Ratio.NetFramework.g.cs index 6df0acf11d..2b183d06b2 100644 --- a/UnitsNet/GeneratedCode/Quantities/Ratio.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Ratio.NetFramework.g.cs @@ -587,6 +587,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((RatioUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.NetFramework.g.cs index 5d989168e1..9fe598f1f2 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.NetFramework.g.cs @@ -545,6 +545,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((ReactiveEnergyUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/ReactivePower.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ReactivePower.NetFramework.g.cs index e16e94cc40..f07c228870 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReactivePower.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReactivePower.NetFramework.g.cs @@ -559,6 +559,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((ReactivePowerUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.NetFramework.g.cs index 38b3d1ed7a..97744a8b0c 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.NetFramework.g.cs @@ -545,6 +545,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((RotationalAccelerationUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.NetFramework.g.cs index 01fffadb29..b2bf84b688 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.NetFramework.g.cs @@ -685,6 +685,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((RotationalSpeedUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.NetFramework.g.cs index d4506f58ce..9d251590e9 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.NetFramework.g.cs @@ -545,6 +545,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((RotationalStiffnessUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.NetFramework.g.cs index 4d93da2dd1..40ee063c05 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.NetFramework.g.cs @@ -545,6 +545,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((RotationalStiffnessPerLengthUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/SolidAngle.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/SolidAngle.NetFramework.g.cs index 7256350e3e..577fd45319 100644 --- a/UnitsNet/GeneratedCode/Quantities/SolidAngle.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SolidAngle.NetFramework.g.cs @@ -520,6 +520,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((SolidAngleUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.NetFramework.g.cs index a83798dad4..975ee65bf9 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.NetFramework.g.cs @@ -632,6 +632,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((SpecificEnergyUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.NetFramework.g.cs index 6236fe293c..008004c0e2 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.NetFramework.g.cs @@ -615,6 +615,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((SpecificEntropyUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificVolume.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificVolume.NetFramework.g.cs index 657fb44c42..55923f2ec3 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificVolume.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificVolume.NetFramework.g.cs @@ -545,6 +545,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((SpecificVolumeUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificWeight.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificWeight.NetFramework.g.cs index 0daa20bd6a..f93caf76a3 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificWeight.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificWeight.NetFramework.g.cs @@ -744,6 +744,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((SpecificWeightUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/Speed.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Speed.NetFramework.g.cs index c0d4eb0962..0ba315bd56 100644 --- a/UnitsNet/GeneratedCode/Quantities/Speed.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Speed.NetFramework.g.cs @@ -951,6 +951,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((SpeedUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/Temperature.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Temperature.NetFramework.g.cs index e8c08f061b..6198e6ad5d 100644 --- a/UnitsNet/GeneratedCode/Quantities/Temperature.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Temperature.NetFramework.g.cs @@ -576,6 +576,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((TemperatureUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.NetFramework.g.cs index 039521beb1..d1ad3cd90c 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.NetFramework.g.cs @@ -643,6 +643,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((TemperatureChangeRateUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.NetFramework.g.cs index acb2be3bc5..273b0d48fb 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.NetFramework.g.cs @@ -615,6 +615,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((TemperatureDeltaUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.NetFramework.g.cs index a834370a85..48331fad50 100644 --- a/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.NetFramework.g.cs @@ -534,6 +534,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((ThermalConductivityUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/ThermalResistance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ThermalResistance.NetFramework.g.cs index 3f8285a503..a5a500e88f 100644 --- a/UnitsNet/GeneratedCode/Quantities/ThermalResistance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ThermalResistance.NetFramework.g.cs @@ -573,6 +573,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((ThermalResistanceUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/Torque.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Torque.NetFramework.g.cs index a814f1acf3..395f80a65a 100644 --- a/UnitsNet/GeneratedCode/Quantities/Torque.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Torque.NetFramework.g.cs @@ -797,6 +797,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((TorqueUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/VitaminA.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/VitaminA.NetFramework.g.cs index e2beb55546..b0397c183a 100644 --- a/UnitsNet/GeneratedCode/Quantities/VitaminA.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VitaminA.NetFramework.g.cs @@ -517,6 +517,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((VitaminAUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/Volume.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Volume.NetFramework.g.cs index 4b6d26e7a4..f42011e4e5 100644 --- a/UnitsNet/GeneratedCode/Quantities/Volume.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Volume.NetFramework.g.cs @@ -1133,6 +1133,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((VolumeUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantities/VolumeFlow.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumeFlow.NetFramework.g.cs index 24ce457a1f..acbebe4cc2 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumeFlow.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumeFlow.NetFramework.g.cs @@ -1175,6 +1175,8 @@ public override int GetHashCode() #region Conversion Methods + double IQuantity.As(Enum unit) => As((VolumeFlowUnit)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/GeneratedCode/Quantity.g.cs b/UnitsNet/GeneratedCode/Quantity.g.cs index 10c6f23a9c..932a5b6975 100644 --- a/UnitsNet/GeneratedCode/Quantity.g.cs +++ b/UnitsNet/GeneratedCode/Quantity.g.cs @@ -42,10 +42,8 @@ using UnitsNet.Units; #if WINDOWS_UWP -using Culture = System.String; using FromValue = System.Double; #else -using Culture = System.IFormatProvider; using FromValue = UnitsNet.QuantityValue; #endif @@ -54,31 +52,16 @@ namespace UnitsNet /// /// Dynamically parse or construct quantities when types are only known at runtime. /// - public static partial class Quantity - { - /// - /// Dynamically construct a quantity. - /// - /// Numeric value. - /// Unit enum value. - /// An object. - /// Unit value is not a know unit enum type. - public static IQuantity From(FromValue value, Enum unit) - { - if (TryFrom(value, unit, out IQuantity quantity)) - return quantity; - - throw new ArgumentException( - $"Unit value {unit} of type {unit.GetType()} is not a known unit enum type. Expected types like UnitsNet.Units.LengthUnit. Did you pass in a third-party enum type defined outside UnitsNet library?"); - } - - /// #if WINDOWS_UWP - internal + internal #else - public + public #endif - static bool TryFrom(double value, Enum unit, out IQuantity quantity) + static partial class Quantity + { +#if !WINDOWS_UWP + /// + public static bool TryFrom(double value, Enum unit, out IQuantity quantity) { // Implicit cast to FromValue would prevent TryFrom from being called, // so we need to explicitly check this here for double arguments. @@ -90,6 +73,7 @@ static bool TryFrom(double value, Enum unit, out IQuantity quantity) return TryFrom((FromValue) value, unit, out quantity); } +#endif /// /// Try to dynamically construct a quantity. @@ -98,7 +82,12 @@ static bool TryFrom(double value, Enum unit, out IQuantity quantity) /// Unit enum value. /// The resulting quantity if successful, otherwise default. /// True if successful with assigned the value, otherwise false. - public static bool TryFrom(FromValue value, Enum unit, out IQuantity quantity) +#if WINDOWS_UWP + internal +#else + public +#endif + static bool TryFrom(FromValue value, Enum unit, out IQuantity quantity) { switch (unit) { @@ -381,7 +370,12 @@ public static bool TryFrom(FromValue value, Enum unit, out IQuantity quantity) } /// - public static IQuantity Parse(Type quantityType, string quantityString) => Parse(null, quantityType, quantityString); +#if WINDOWS_UWP + internal +#else + public +#endif + static IQuantity Parse(Type quantityType, string quantityString) => Parse(null, quantityType, quantityString); /// /// Dynamically parse a quantity string representation. @@ -391,9 +385,14 @@ public static bool TryFrom(FromValue value, Enum unit, out IQuantity quantity) /// Quantity string representation, such as "1.5 kg". Must be compatible with given quantity type. /// The parsed quantity. /// Type must be of type UnitsNet.IQuantity -or- Type is not a known quantity type. - public static IQuantity Parse([CanBeNull] IFormatProvider formatProvider, Type quantityType, string quantityString) +#if WINDOWS_UWP + internal +#else + public +#endif + static IQuantity Parse([CanBeNull] IFormatProvider formatProvider, Type quantityType, string quantityString) { - if (!typeof(IQuantity).IsAssignableFrom(quantityType)) + if (!typeof(IQuantity).Wrap().IsAssignableFrom(quantityType)) throw new ArgumentException($"Type {quantityType} must be of type UnitsNet.IQuantity."); if (TryParse(formatProvider, quantityType, quantityString, out IQuantity quantity)) return quantity; @@ -402,7 +401,12 @@ public static IQuantity Parse([CanBeNull] IFormatProvider formatProvider, Type q } /// - public static bool TryParse(Type quantityType, string quantityString, out IQuantity quantity) => +#if WINDOWS_UWP + internal +#else + public +#endif + static bool TryParse(Type quantityType, string quantityString, out IQuantity quantity) => TryParse(null, quantityType, quantityString, out quantity); /// @@ -413,11 +417,16 @@ public static bool TryParse(Type quantityType, string quantityString, out IQuant /// Quantity string representation, such as "1.5 kg". Must be compatible with given quantity type. /// The resulting quantity if successful, otherwise default. /// The parsed quantity. - public static bool TryParse([CanBeNull] IFormatProvider formatProvider, Type quantityType, string quantityString, out IQuantity quantity) +#if WINDOWS_UWP + internal +#else + public +#endif + static bool TryParse([CanBeNull] IFormatProvider formatProvider, Type quantityType, string quantityString, out IQuantity quantity) { quantity = default(IQuantity); - if (!typeof(IQuantity).IsAssignableFrom(quantityType)) + if (!typeof(IQuantity).Wrap().IsAssignableFrom(quantityType)) return false; var parser = QuantityParser.Default; @@ -696,6 +705,7 @@ public static bool TryParse([CanBeNull] IFormatProvider formatProvider, Type qua $"Type {quantityType} is not a known quantity type. Did you pass in a third-party quantity type defined outside UnitsNet library?"); } +#if !WINDOWS_UWP /// /// Get information about the given quantity type. /// @@ -705,5 +715,6 @@ public static QuantityInfo GetInfo(QuantityType quantityType) { return Infos.First(qi => qi.QuantityType == quantityType); } +#endif } } diff --git a/UnitsNet/IQuantity.cs b/UnitsNet/IQuantity.cs index d9311bdd56..d491bf5b0b 100644 --- a/UnitsNet/IQuantity.cs +++ b/UnitsNet/IQuantity.cs @@ -40,11 +40,12 @@ public partial interface IQuantity /// BaseDimensions Dimensions { get; } +#if !WINDOWS_UWP /// /// Information about the quantity type, such as unit values and names. /// QuantityInfo QuantityInfo { get; } -#if !WINDOWS_UWP +#endif /// /// Dynamically convert to another unit representation. @@ -52,8 +53,13 @@ public partial interface IQuantity /// The unit enum value. The unit must be compatible, so for you should provide a value. /// Value converted to the specified unit. /// Wrong unit enum type was given. +#if WINDOWS_UWP + double As(object unit); +#else double As(Enum unit); +#endif +#if !WINDOWS_UWP /// /// Change the default unit representation of the quantity, which affects things like . /// @@ -123,15 +129,11 @@ public partial interface IQuantity #endif -#if WINDOWS_UWP - internal -#else - public -#endif - interface IQuantity : IQuantity where TUnitType : Enum +#if !WINDOWS_UWP + public interface IQuantity : IQuantity where TUnitType : Enum { /// - /// Convert to the unit representation . + /// Convert to a unit representation . /// /// Value converted to the specified unit. double As(TUnitType unit); @@ -151,4 +153,5 @@ interface IQuantity : IQuantity where TUnitType : Enum /// IQuantity ToUnit(TUnitType unit); } +#endif } diff --git a/UnitsNet/QuantityInfo.cs b/UnitsNet/QuantityInfo.cs index 57a341a82f..af321760e6 100644 --- a/UnitsNet/QuantityInfo.cs +++ b/UnitsNet/QuantityInfo.cs @@ -38,7 +38,7 @@ namespace UnitsNet /// Typically you obtain this by looking it up via . /// #if WINDOWS_UWP - public + internal #else public #endif @@ -112,6 +112,7 @@ public QuantityInfo(QuantityType quantityType, [NotNull] Enum[] units, [NotNull] public BaseDimensions BaseDimensions { get; } } +#if !WINDOWS_UWP /// /// /// This is a specialization of , for when the unit type is known. @@ -119,12 +120,7 @@ public QuantityInfo(QuantityType quantityType, [NotNull] Enum[] units, [NotNull] /// , or dynamically via . /// /// The unit enum type, such as . -#if WINDOWS_UWP - internal -#else - public -#endif - class QuantityInfo : QuantityInfo + public class QuantityInfo : QuantityInfo where TUnit : Enum { public QuantityInfo(QuantityType quantityType, TUnit[] units, IQuantity zero, BaseDimensions baseDimensions) @@ -140,4 +136,5 @@ public QuantityInfo(QuantityType quantityType, TUnit[] units, IQuantity z /// public new IQuantity Zero { get; } } +#endif } diff --git a/UnitsNet/Scripts/Include-GenerateQuantitySourceCode.ps1 b/UnitsNet/Scripts/Include-GenerateQuantitySourceCode.ps1 index d7a845d3a8..4b3c767747 100644 --- a/UnitsNet/Scripts/Include-GenerateQuantitySourceCode.ps1 +++ b/UnitsNet/Scripts/Include-GenerateQuantitySourceCode.ps1 @@ -20,6 +20,7 @@ function GenerateQuantitySourceCode([Quantity]$quantity, [string]$target) $wrc = $target -eq "WindowsRuntimeComponent" $privateAccessModifierIfWrc = if ($wrc) { "private" } else { "public" } $accessModifier = if ($wrc) { "internal" } else { "public" } + $enumOrObject = if ($wrc) { "object" } else { "Enum" } $baseDimensions = $quantity.BaseDimensions; $isDimensionless = $baseDimensions -eq $null -or ( $baseDimensions.Length -eq 0 -and $baseDimensions.Mass -eq 0 -and $baseDimensions.Time -eq 0 -and $baseDimensions.ElectricCurrent -eq 0 -and $baseDimensions.Temperature -eq 0 -and $baseDimensions.AmountOfSubstance -eq 0 -and $baseDimensions.LuminousIntensity -eq 0 ) @@ -123,8 +124,11 @@ if ($obsoleteAttribute) {@" BaseDimensions = new BaseDimensions($($baseDimensions.Length), $($baseDimensions.Mass), $($baseDimensions.Time), $($baseDimensions.ElectricCurrent), $($baseDimensions.Temperature), $($baseDimensions.AmountOfSubstance), $($baseDimensions.LuminousIntensity)); "@; } -@" + if ($wrc) {@" + Info = new QuantityInfo(QuantityType.$quantityName, Units.Cast().ToArray(), Zero, BaseDimensions); +"@; } else {@" Info = new QuantityInfo<$unitEnumName>(QuantityType.$quantityName, Units, Zero, BaseDimensions); +"@; }@" } "@; # Windows Runtime Component requires a default constructor if ($wrc) {@" @@ -274,7 +278,11 @@ function GenerateStaticProperties([GeneratorArgs]$genArgs) #region Static Properties /// - $accessModifier static QuantityInfo<$unitEnumName> Info { get; } +"@; if ($wrc) {@" + internal static QuantityInfo Info { get; } +"@; } else {@" + public static QuantityInfo<$unitEnumName> Info { get; } +"@; }@" /// /// The of this quantity. @@ -330,7 +338,7 @@ function GenerateProperties([GeneratorArgs]$genArgs) /// The numeric value this quantity was constructed with. /// "@; # Windows Runtime Component does not support decimal - if ($wrc) {@" + if ($wrc) {@" public double Value => Convert.ToDouble(_value); "@; } else {@" public $valueType Value => _value; @@ -342,9 +350,13 @@ function GenerateProperties([GeneratorArgs]$genArgs) /// public $unitEnumName Unit => _unit.GetValueOrDefault(BaseUnit); - $accessModifier QuantityInfo<$unitEnumName> QuantityInfo => Info; +"@; if ($wrc) {@" + internal QuantityInfo QuantityInfo => Info; +"@; } else {@" + public QuantityInfo<$unitEnumName> QuantityInfo => Info; QuantityInfo IQuantity.QuantityInfo => Info; +"@; }@" /// /// The of this quantity. @@ -936,6 +948,8 @@ function GenerateConversionMethods([GeneratorArgs]$genArgs) #region Conversion Methods + double IQuantity.As($enumOrObject unit) => As(($unitEnumName)unit); + /// /// Convert to the unit representation . /// diff --git a/UnitsNet/Scripts/Include-GenerateStaticQuantitySourceCode.ps1 b/UnitsNet/Scripts/Include-GenerateStaticQuantitySourceCode.ps1 index e260b1ddca..0539c41fd0 100644 --- a/UnitsNet/Scripts/Include-GenerateStaticQuantitySourceCode.ps1 +++ b/UnitsNet/Scripts/Include-GenerateStaticQuantitySourceCode.ps1 @@ -1,6 +1,6 @@ using module ".\Types.psm1" -function GenerateStaticQuantitySourceCode([Quantity[]]$quantities) +function GenerateStaticQuantitySourceCode([Quantity[]]$quantities, [string]$target) { @" //------------------------------------------------------------------------------ @@ -47,10 +47,8 @@ using UnitsNet.InternalHelpers; using UnitsNet.Units; #if WINDOWS_UWP -using Culture = System.String; using FromValue = System.Double; #else -using Culture = System.IFormatProvider; using FromValue = UnitsNet.QuantityValue; #endif @@ -59,31 +57,16 @@ namespace UnitsNet /// /// Dynamically parse or construct quantities when types are only known at runtime. /// - public static partial class Quantity - { - /// - /// Dynamically construct a quantity. - /// - /// Numeric value. - /// Unit enum value. - /// An object. - /// Unit value is not a know unit enum type. - public static IQuantity From(FromValue value, Enum unit) - { - if (TryFrom(value, unit, out IQuantity quantity)) - return quantity; - - throw new ArgumentException( - $"Unit value {unit} of type {unit.GetType()} is not a known unit enum type. Expected types like UnitsNet.Units.LengthUnit. Did you pass in a third-party enum type defined outside UnitsNet library?"); - } - - /// #if WINDOWS_UWP - internal + internal #else - public + public #endif - static bool TryFrom(double value, Enum unit, out IQuantity quantity) + static partial class Quantity + { +#if !WINDOWS_UWP + /// + public static bool TryFrom(double value, Enum unit, out IQuantity quantity) { // Implicit cast to FromValue would prevent TryFrom from being called, // so we need to explicitly check this here for double arguments. @@ -95,6 +78,7 @@ namespace UnitsNet return TryFrom((FromValue) value, unit, out quantity); } +#endif /// /// Try to dynamically construct a quantity. @@ -103,7 +87,12 @@ namespace UnitsNet /// Unit enum value. /// The resulting quantity if successful, otherwise default. /// True if successful with assigned the value, otherwise false. - public static bool TryFrom(FromValue value, Enum unit, out IQuantity quantity) +#if WINDOWS_UWP + internal +#else + public +#endif + static bool TryFrom(FromValue value, Enum unit, out IQuantity quantity) { switch (unit) { @@ -124,7 +113,12 @@ namespace UnitsNet } /// - public static IQuantity Parse(Type quantityType, string quantityString) => Parse(null, quantityType, quantityString); +#if WINDOWS_UWP + internal +#else + public +#endif + static IQuantity Parse(Type quantityType, string quantityString) => Parse(null, quantityType, quantityString); /// /// Dynamically parse a quantity string representation. @@ -134,9 +128,14 @@ namespace UnitsNet /// Quantity string representation, such as "1.5 kg". Must be compatible with given quantity type. /// The parsed quantity. /// Type must be of type UnitsNet.IQuantity -or- Type is not a known quantity type. - public static IQuantity Parse([CanBeNull] IFormatProvider formatProvider, Type quantityType, string quantityString) +#if WINDOWS_UWP + internal +#else + public +#endif + static IQuantity Parse([CanBeNull] IFormatProvider formatProvider, Type quantityType, string quantityString) { - if (!typeof(IQuantity).IsAssignableFrom(quantityType)) + if (!typeof(IQuantity).Wrap().IsAssignableFrom(quantityType)) throw new ArgumentException($"Type {quantityType} must be of type UnitsNet.IQuantity."); if (TryParse(formatProvider, quantityType, quantityString, out IQuantity quantity)) return quantity; @@ -145,7 +144,12 @@ namespace UnitsNet } /// - public static bool TryParse(Type quantityType, string quantityString, out IQuantity quantity) => +#if WINDOWS_UWP + internal +#else + public +#endif + static bool TryParse(Type quantityType, string quantityString, out IQuantity quantity) => TryParse(null, quantityType, quantityString, out quantity); /// @@ -156,11 +160,16 @@ namespace UnitsNet /// Quantity string representation, such as "1.5 kg". Must be compatible with given quantity type. /// The resulting quantity if successful, otherwise default. /// The parsed quantity. - public static bool TryParse([CanBeNull] IFormatProvider formatProvider, Type quantityType, string quantityString, out IQuantity quantity) +#if WINDOWS_UWP + internal +#else + public +#endif + static bool TryParse([CanBeNull] IFormatProvider formatProvider, Type quantityType, string quantityString, out IQuantity quantity) { quantity = default(IQuantity); - if (!typeof(IQuantity).IsAssignableFrom(quantityType)) + if (!typeof(IQuantity).Wrap().IsAssignableFrom(quantityType)) return false; var parser = QuantityParser.Default; @@ -175,6 +184,7 @@ namespace UnitsNet $"Type {quantityType} is not a known quantity type. Did you pass in a third-party quantity type defined outside UnitsNet library?"); } +#if !WINDOWS_UWP /// /// Get information about the given quantity type. /// @@ -184,6 +194,7 @@ namespace UnitsNet { return Infos.First(qi => qi.QuantityType == quantityType); } +#endif } } "@; diff --git a/UnitsNet/UnitConverter.cs b/UnitsNet/UnitConverter.cs index 7ebd251315..16c006db11 100644 --- a/UnitsNet/UnitConverter.cs +++ b/UnitsNet/UnitConverter.cs @@ -60,14 +60,14 @@ public static class UnitConverter /// From unit enum value. /// To unit enum value, must be compatible with . /// The converted value in the new unit representation. - public static double Convert(FromValue fromValue, Enum fromUnitValue, Enum toUnitValue) + internal static double Convert(FromValue fromValue, Enum fromUnitValue, Enum toUnitValue) { return Quantity .From(fromValue, fromUnitValue) .As(toUnitValue); } - public static bool TryConvert(FromValue fromValue, Enum fromUnitValue, Enum toUnitValue, out double convertedValue) + internal static bool TryConvert(FromValue fromValue, Enum fromUnitValue, Enum toUnitValue, out double convertedValue) { convertedValue = 0; if (!Quantity.TryFrom(fromValue, fromUnitValue, out IQuantity from)) return false; From abf873c48d029777d074cc10b987ba6af739caaa Mon Sep 17 00:00:00 2001 From: Andreas Gullberg Larsen Date: Thu, 31 Jan 2019 01:56:23 +0100 Subject: [PATCH 34/36] Fix broken tests --- UnitsNet/InternalHelpers/ReflectionBridgeExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UnitsNet/InternalHelpers/ReflectionBridgeExtensions.cs b/UnitsNet/InternalHelpers/ReflectionBridgeExtensions.cs index bbc2d8bf6d..db971f3d00 100644 --- a/UnitsNet/InternalHelpers/ReflectionBridgeExtensions.cs +++ b/UnitsNet/InternalHelpers/ReflectionBridgeExtensions.cs @@ -74,7 +74,7 @@ internal IEnumerable GetDeclaredMethods() #endif yield return m; - t = t.BaseType.ToUniformType(); + t = t.BaseType?.ToUniformType(); } } } From 4274899c6a4b013dee2b5d9a54191dbcd33c90af Mon Sep 17 00:00:00 2001 From: Tristan Milnthorp Date: Thu, 31 Jan 2019 17:02:06 -0500 Subject: [PATCH 35/36] Adding BaseUnit to QuantityInfo. Adding GetQuantitiesWithBaseDimensions helper to Quantity class --- UnitsNet.Tests/QuantityInfoTest.cs | 35 ++++++++++++------- .../Acceleration.WindowsRuntimeComponent.g.cs | 2 +- ...ntOfSubstance.WindowsRuntimeComponent.g.cs | 2 +- ...mplitudeRatio.WindowsRuntimeComponent.g.cs | 2 +- .../Angle.WindowsRuntimeComponent.g.cs | 2 +- ...pparentEnergy.WindowsRuntimeComponent.g.cs | 2 +- ...ApparentPower.WindowsRuntimeComponent.g.cs | 2 +- .../Area.WindowsRuntimeComponent.g.cs | 2 +- .../AreaDensity.WindowsRuntimeComponent.g.cs | 2 +- ...mentOfInertia.WindowsRuntimeComponent.g.cs | 2 +- .../BitRate.WindowsRuntimeComponent.g.cs | 2 +- ...elConsumption.WindowsRuntimeComponent.g.cs | 2 +- .../Capacitance.WindowsRuntimeComponent.g.cs | 2 +- ...rmalExpansion.WindowsRuntimeComponent.g.cs | 2 +- .../Density.WindowsRuntimeComponent.g.cs | 2 +- .../Duration.WindowsRuntimeComponent.g.cs | 2 +- ...amicViscosity.WindowsRuntimeComponent.g.cs | 2 +- ...ricAdmittance.WindowsRuntimeComponent.g.cs | 2 +- ...lectricCharge.WindowsRuntimeComponent.g.cs | 2 +- ...ChargeDensity.WindowsRuntimeComponent.g.cs | 2 +- ...icConductance.WindowsRuntimeComponent.g.cs | 2 +- ...cConductivity.WindowsRuntimeComponent.g.cs | 2 +- ...ectricCurrent.WindowsRuntimeComponent.g.cs | 2 +- ...urrentDensity.WindowsRuntimeComponent.g.cs | 2 +- ...rrentGradient.WindowsRuntimeComponent.g.cs | 2 +- ...ElectricField.WindowsRuntimeComponent.g.cs | 2 +- ...ricInductance.WindowsRuntimeComponent.g.cs | 2 +- ...tricPotential.WindowsRuntimeComponent.g.cs | 2 +- ...icPotentialAc.WindowsRuntimeComponent.g.cs | 2 +- ...icPotentialDc.WindowsRuntimeComponent.g.cs | 2 +- ...ricResistance.WindowsRuntimeComponent.g.cs | 2 +- ...icResistivity.WindowsRuntimeComponent.g.cs | 2 +- .../Energy.WindowsRuntimeComponent.g.cs | 2 +- .../Entropy.WindowsRuntimeComponent.g.cs | 2 +- .../Force.WindowsRuntimeComponent.g.cs | 2 +- ...rceChangeRate.WindowsRuntimeComponent.g.cs | 2 +- ...orcePerLength.WindowsRuntimeComponent.g.cs | 2 +- .../Frequency.WindowsRuntimeComponent.g.cs | 2 +- .../HeatFlux.WindowsRuntimeComponent.g.cs | 2 +- ...erCoefficient.WindowsRuntimeComponent.g.cs | 2 +- .../Illuminance.WindowsRuntimeComponent.g.cs | 2 +- .../Information.WindowsRuntimeComponent.g.cs | 2 +- .../Irradiance.WindowsRuntimeComponent.g.cs | 2 +- .../Irradiation.WindowsRuntimeComponent.g.cs | 2 +- ...aticViscosity.WindowsRuntimeComponent.g.cs | 2 +- .../LapseRate.WindowsRuntimeComponent.g.cs | 2 +- .../Length.WindowsRuntimeComponent.g.cs | 2 +- .../Level.WindowsRuntimeComponent.g.cs | 2 +- ...LinearDensity.WindowsRuntimeComponent.g.cs | 2 +- .../LuminousFlux.WindowsRuntimeComponent.g.cs | 2 +- ...nousIntensity.WindowsRuntimeComponent.g.cs | 2 +- ...MagneticField.WindowsRuntimeComponent.g.cs | 2 +- .../MagneticFlux.WindowsRuntimeComponent.g.cs | 2 +- ...Magnetization.WindowsRuntimeComponent.g.cs | 2 +- .../Mass.WindowsRuntimeComponent.g.cs | 2 +- .../MassFlow.WindowsRuntimeComponent.g.cs | 2 +- .../MassFlux.WindowsRuntimeComponent.g.cs | 2 +- ...mentOfInertia.WindowsRuntimeComponent.g.cs | 2 +- .../MolarEnergy.WindowsRuntimeComponent.g.cs | 2 +- .../MolarEntropy.WindowsRuntimeComponent.g.cs | 2 +- .../MolarMass.WindowsRuntimeComponent.g.cs | 2 +- .../Molarity.WindowsRuntimeComponent.g.cs | 2 +- .../Permeability.WindowsRuntimeComponent.g.cs | 2 +- .../Permittivity.WindowsRuntimeComponent.g.cs | 2 +- .../Power.WindowsRuntimeComponent.g.cs | 2 +- .../PowerDensity.WindowsRuntimeComponent.g.cs | 2 +- .../PowerRatio.WindowsRuntimeComponent.g.cs | 2 +- .../Pressure.WindowsRuntimeComponent.g.cs | 2 +- ...ureChangeRate.WindowsRuntimeComponent.g.cs | 2 +- .../Ratio.WindowsRuntimeComponent.g.cs | 2 +- ...eactiveEnergy.WindowsRuntimeComponent.g.cs | 2 +- ...ReactivePower.WindowsRuntimeComponent.g.cs | 2 +- ...lAcceleration.WindowsRuntimeComponent.g.cs | 2 +- ...tationalSpeed.WindowsRuntimeComponent.g.cs | 2 +- ...onalStiffness.WindowsRuntimeComponent.g.cs | 2 +- ...nessPerLength.WindowsRuntimeComponent.g.cs | 2 +- .../SolidAngle.WindowsRuntimeComponent.g.cs | 2 +- ...pecificEnergy.WindowsRuntimeComponent.g.cs | 2 +- ...ecificEntropy.WindowsRuntimeComponent.g.cs | 2 +- ...pecificVolume.WindowsRuntimeComponent.g.cs | 2 +- ...pecificWeight.WindowsRuntimeComponent.g.cs | 2 +- .../Speed.WindowsRuntimeComponent.g.cs | 2 +- .../Temperature.WindowsRuntimeComponent.g.cs | 2 +- ...ureChangeRate.WindowsRuntimeComponent.g.cs | 2 +- ...peratureDelta.WindowsRuntimeComponent.g.cs | 2 +- ...lConductivity.WindowsRuntimeComponent.g.cs | 2 +- ...malResistance.WindowsRuntimeComponent.g.cs | 2 +- .../Torque.WindowsRuntimeComponent.g.cs | 2 +- .../VitaminA.WindowsRuntimeComponent.g.cs | 2 +- .../Volume.WindowsRuntimeComponent.g.cs | 2 +- .../VolumeFlow.WindowsRuntimeComponent.g.cs | 2 +- UnitsNet/CustomCode/Quantity.cs | 12 ++++--- .../Quantities/Acceleration.NetFramework.g.cs | 2 +- .../AmountOfSubstance.NetFramework.g.cs | 2 +- .../AmplitudeRatio.NetFramework.g.cs | 2 +- .../Quantities/Angle.NetFramework.g.cs | 2 +- .../ApparentEnergy.NetFramework.g.cs | 2 +- .../ApparentPower.NetFramework.g.cs | 2 +- .../Quantities/Area.NetFramework.g.cs | 2 +- .../Quantities/AreaDensity.NetFramework.g.cs | 2 +- .../AreaMomentOfInertia.NetFramework.g.cs | 2 +- .../Quantities/BitRate.NetFramework.g.cs | 2 +- ...eSpecificFuelConsumption.NetFramework.g.cs | 2 +- .../Quantities/Capacitance.NetFramework.g.cs | 2 +- ...icientOfThermalExpansion.NetFramework.g.cs | 2 +- .../Quantities/Density.NetFramework.g.cs | 2 +- .../Quantities/Duration.NetFramework.g.cs | 2 +- .../DynamicViscosity.NetFramework.g.cs | 2 +- .../ElectricAdmittance.NetFramework.g.cs | 2 +- .../ElectricCharge.NetFramework.g.cs | 2 +- .../ElectricChargeDensity.NetFramework.g.cs | 2 +- .../ElectricConductance.NetFramework.g.cs | 2 +- .../ElectricConductivity.NetFramework.g.cs | 2 +- .../ElectricCurrent.NetFramework.g.cs | 2 +- .../ElectricCurrentDensity.NetFramework.g.cs | 2 +- .../ElectricCurrentGradient.NetFramework.g.cs | 2 +- .../ElectricField.NetFramework.g.cs | 2 +- .../ElectricInductance.NetFramework.g.cs | 2 +- .../ElectricPotential.NetFramework.g.cs | 2 +- .../ElectricPotentialAc.NetFramework.g.cs | 2 +- .../ElectricPotentialDc.NetFramework.g.cs | 2 +- .../ElectricResistance.NetFramework.g.cs | 2 +- .../ElectricResistivity.NetFramework.g.cs | 2 +- .../Quantities/Energy.NetFramework.g.cs | 2 +- .../Quantities/Entropy.NetFramework.g.cs | 2 +- .../Quantities/Force.NetFramework.g.cs | 2 +- .../ForceChangeRate.NetFramework.g.cs | 2 +- .../ForcePerLength.NetFramework.g.cs | 2 +- .../Quantities/Frequency.NetFramework.g.cs | 2 +- .../Quantities/HeatFlux.NetFramework.g.cs | 2 +- .../HeatTransferCoefficient.NetFramework.g.cs | 2 +- .../Quantities/Illuminance.NetFramework.g.cs | 2 +- .../Quantities/Information.NetFramework.g.cs | 2 +- .../Quantities/Irradiance.NetFramework.g.cs | 2 +- .../Quantities/Irradiation.NetFramework.g.cs | 2 +- .../KinematicViscosity.NetFramework.g.cs | 2 +- .../Quantities/LapseRate.NetFramework.g.cs | 2 +- .../Quantities/Length.NetFramework.g.cs | 2 +- .../Quantities/Level.NetFramework.g.cs | 2 +- .../LinearDensity.NetFramework.g.cs | 2 +- .../Quantities/LuminousFlux.NetFramework.g.cs | 2 +- .../LuminousIntensity.NetFramework.g.cs | 2 +- .../MagneticField.NetFramework.g.cs | 2 +- .../Quantities/MagneticFlux.NetFramework.g.cs | 2 +- .../Magnetization.NetFramework.g.cs | 2 +- .../Quantities/Mass.NetFramework.g.cs | 2 +- .../Quantities/MassFlow.NetFramework.g.cs | 2 +- .../Quantities/MassFlux.NetFramework.g.cs | 2 +- .../MassMomentOfInertia.NetFramework.g.cs | 2 +- .../Quantities/MolarEnergy.NetFramework.g.cs | 2 +- .../Quantities/MolarEntropy.NetFramework.g.cs | 2 +- .../Quantities/MolarMass.NetFramework.g.cs | 2 +- .../Quantities/Molarity.NetFramework.g.cs | 2 +- .../Quantities/Permeability.NetFramework.g.cs | 2 +- .../Quantities/Permittivity.NetFramework.g.cs | 2 +- .../Quantities/Power.NetFramework.g.cs | 2 +- .../Quantities/PowerDensity.NetFramework.g.cs | 2 +- .../Quantities/PowerRatio.NetFramework.g.cs | 2 +- .../Quantities/Pressure.NetFramework.g.cs | 2 +- .../PressureChangeRate.NetFramework.g.cs | 2 +- .../Quantities/Ratio.NetFramework.g.cs | 2 +- .../ReactiveEnergy.NetFramework.g.cs | 2 +- .../ReactivePower.NetFramework.g.cs | 2 +- .../RotationalAcceleration.NetFramework.g.cs | 2 +- .../RotationalSpeed.NetFramework.g.cs | 2 +- .../RotationalStiffness.NetFramework.g.cs | 2 +- ...tionalStiffnessPerLength.NetFramework.g.cs | 2 +- .../Quantities/SolidAngle.NetFramework.g.cs | 2 +- .../SpecificEnergy.NetFramework.g.cs | 2 +- .../SpecificEntropy.NetFramework.g.cs | 2 +- .../SpecificVolume.NetFramework.g.cs | 2 +- .../SpecificWeight.NetFramework.g.cs | 2 +- .../Quantities/Speed.NetFramework.g.cs | 2 +- .../Quantities/Temperature.NetFramework.g.cs | 2 +- .../TemperatureChangeRate.NetFramework.g.cs | 2 +- .../TemperatureDelta.NetFramework.g.cs | 2 +- .../ThermalConductivity.NetFramework.g.cs | 2 +- .../ThermalResistance.NetFramework.g.cs | 2 +- .../Quantities/Torque.NetFramework.g.cs | 2 +- .../Quantities/VitaminA.NetFramework.g.cs | 2 +- .../Quantities/Volume.NetFramework.g.cs | 2 +- .../Quantities/VolumeFlow.NetFramework.g.cs | 2 +- UnitsNet/QuantityInfo.cs | 25 +++++++++---- .../Include-GenerateQuantitySourceCode.ps1 | 4 +-- 184 files changed, 232 insertions(+), 204 deletions(-) diff --git a/UnitsNet.Tests/QuantityInfoTest.cs b/UnitsNet.Tests/QuantityInfoTest.cs index b3818c342e..a0a0124b9e 100644 --- a/UnitsNet.Tests/QuantityInfoTest.cs +++ b/UnitsNet.Tests/QuantityInfoTest.cs @@ -34,14 +34,16 @@ public void Constructor_AssignsProperties() { var expectedZero = Length.FromCentimeters(10); var expectedUnits = new Enum[] {LengthUnit.Centimeter, LengthUnit.Kilometer}; + var expectedBaseUnit = LengthUnit.Meter; var expectedQuantityType = QuantityType.Length; var expectedBaseDimensions = Length.BaseDimensions; - var info = new QuantityInfo(expectedQuantityType, expectedUnits, expectedZero, expectedBaseDimensions); + var info = new QuantityInfo(expectedQuantityType, expectedUnits, expectedBaseUnit, expectedZero, expectedBaseDimensions); Assert.Equal(expectedZero, info.Zero); Assert.Equal("Length", info.Name); Assert.Equal(expectedUnits, info.Units); + Assert.Equal(expectedBaseUnit, info.BaseUnit); Assert.Equal(new[]{"Centimeter", "Kilometer"}, info.UnitNames); Assert.Equal(expectedQuantityType, info.QuantityType); Assert.Equal(expectedBaseDimensions, info.BaseDimensions); @@ -52,71 +54,80 @@ public void GenericsConstructor_AssignsProperties() { var expectedZero = Length.FromCentimeters(10); var expectedUnits = new[] {LengthUnit.Centimeter, LengthUnit.Kilometer}; + var expectedBaseUnit = LengthUnit.Meter; var expectedQuantityType = QuantityType.Length; var expectedBaseDimensions = Length.BaseDimensions; - var info = new QuantityInfo(expectedQuantityType, expectedUnits, expectedZero, expectedBaseDimensions); + var info = new QuantityInfo(expectedQuantityType, expectedUnits, expectedBaseUnit, expectedZero, expectedBaseDimensions); Assert.Equal(expectedZero, info.Zero); Assert.Equal("Length", info.Name); Assert.Equal(expectedUnits, info.Units); + Assert.Equal(expectedBaseUnit, info.BaseUnit); Assert.Equal(new[]{"Centimeter", "Kilometer"}, info.UnitNames); Assert.Equal(expectedQuantityType, info.QuantityType); Assert.Equal(expectedBaseDimensions, info.BaseDimensions); } [Fact] - public void Constructor_GivenNullAsQuantityType_ThrowsArgumentException() + public void Constructor_GivenUndefinedAsQuantityType_ThrowsArgumentException() { - Assert.Throws(() => new QuantityInfo(QuantityType.Undefined, new Enum[0], Length.Zero, Length.BaseDimensions)); + Assert.Throws(() => new QuantityInfo(QuantityType.Undefined, new Enum[0], Length.BaseUnit, Length.Zero, Length.BaseDimensions)); } [Fact] - public void GenericsConstructor_GivenNullAsQuantityType_ThrowsArgumentException() + public void GenericsConstructor_GivenUndefinedAsQuantityType_ThrowsArgumentException() { - Assert.Throws(() => new QuantityInfo(QuantityType.Undefined, Length.Units, Length.Zero, Length.BaseDimensions)); + Assert.Throws(() => new QuantityInfo(QuantityType.Undefined, Length.Units, Length.BaseUnit, Length.Zero, Length.BaseDimensions)); } [Fact] [SuppressMessage("ReSharper", "AssignNullToNotNullAttribute")] public void Constructor_GivenNullAsUnits_ThrowsArgumentNullException() { - Assert.Throws(() => new QuantityInfo(QuantityType.Length, null, Length.Zero, Length.BaseDimensions)); + Assert.Throws(() => new QuantityInfo(QuantityType.Length, null, Length.BaseUnit, Length.Zero, Length.BaseDimensions)); } [Fact] [SuppressMessage("ReSharper", "AssignNullToNotNullAttribute")] public void GenericsConstructor_GivenNullAsUnits_ThrowsArgumentNullException() { - Assert.Throws(() => new QuantityInfo(QuantityType.Length, null, Length.Zero, Length.BaseDimensions)); + Assert.Throws(() => new QuantityInfo(QuantityType.Length, null, Length.BaseUnit, Length.Zero, Length.BaseDimensions)); + } + + [Fact] + [SuppressMessage("ReSharper", "AssignNullToNotNullAttribute")] + public void Constructor_GivenNullAsBaseUnit_ThrowsArgumentNullException() + { + Assert.Throws(() => new QuantityInfo(QuantityType.Length, new Enum[0], null, Length.Zero, Length.BaseDimensions)); } [Fact] [SuppressMessage("ReSharper", "AssignNullToNotNullAttribute")] public void Constructor_GivenNullAsZero_ThrowsArgumentNullException() { - Assert.Throws(() => new QuantityInfo(QuantityType.Length, new Enum[0], null, Length.BaseDimensions)); + Assert.Throws(() => new QuantityInfo(QuantityType.Length, new Enum[0], Length.BaseUnit, null, Length.BaseDimensions)); } [Fact] [SuppressMessage("ReSharper", "AssignNullToNotNullAttribute")] public void GenericsConstructor_GivenNullAsZero_ThrowsArgumentNullException() { - Assert.Throws(() => new QuantityInfo(QuantityType.Length, Length.Units, null, Length.BaseDimensions)); + Assert.Throws(() => new QuantityInfo(QuantityType.Length, Length.Units, Length.BaseUnit, null, Length.BaseDimensions)); } [Fact] [SuppressMessage("ReSharper", "AssignNullToNotNullAttribute")] public void Constructor_GivenNullAsBaseDimensions_ThrowsArgumentNullException() { - Assert.Throws(() => new QuantityInfo(QuantityType.Length, new Enum[0], Length.Zero, null)); + Assert.Throws(() => new QuantityInfo(QuantityType.Length, new Enum[0], Length.BaseUnit, Length.Zero, null)); } [Fact] [SuppressMessage("ReSharper", "AssignNullToNotNullAttribute")] public void GenericsConstructor_GivenNullAsBaseDimensions_ThrowsArgumentNullException() { - Assert.Throws(() => new QuantityInfo(QuantityType.Length, Length.Units, Length.Zero, null)); + Assert.Throws(() => new QuantityInfo(QuantityType.Length, Length.Units, Length.BaseUnit, Length.Zero, null)); } } } diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Acceleration.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Acceleration.WindowsRuntimeComponent.g.cs index 2798c6cb98..bf24ce0e29 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Acceleration.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Acceleration.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Acceleration : IQuantity static Acceleration() { BaseDimensions = new BaseDimensions(1, 0, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Acceleration, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Acceleration, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit MeterPerSecondSquared. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmountOfSubstance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmountOfSubstance.WindowsRuntimeComponent.g.cs index 2b73e95ef5..0254fa5278 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmountOfSubstance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmountOfSubstance.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class AmountOfSubstance : IQuantity static AmountOfSubstance() { BaseDimensions = new BaseDimensions(0, 0, 0, 0, 0, 1, 0); - Info = new QuantityInfo(QuantityType.AmountOfSubstance, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.AmountOfSubstance, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Mole. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmplitudeRatio.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmplitudeRatio.WindowsRuntimeComponent.g.cs index 59782e2b02..a54eb2aeef 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmplitudeRatio.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmplitudeRatio.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class AmplitudeRatio : IQuantity static AmplitudeRatio() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.AmplitudeRatio, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.AmplitudeRatio, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit DecibelVolt. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Angle.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Angle.WindowsRuntimeComponent.g.cs index 5a45c26f5e..cd51ba05d3 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Angle.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Angle.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Angle : IQuantity static Angle() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.Angle, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Angle, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Degree. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentEnergy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentEnergy.WindowsRuntimeComponent.g.cs index 51d93cfa71..bbb23500f4 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentEnergy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentEnergy.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class ApparentEnergy : IQuantity static ApparentEnergy() { BaseDimensions = new BaseDimensions(2, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ApparentEnergy, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ApparentEnergy, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit VoltampereHour. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentPower.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentPower.WindowsRuntimeComponent.g.cs index 509a37e900..dcc2246625 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentPower.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentPower.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class ApparentPower : IQuantity static ApparentPower() { BaseDimensions = new BaseDimensions(2, 1, -3, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ApparentPower, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ApparentPower, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Voltampere. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Area.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Area.WindowsRuntimeComponent.g.cs index 0c3613b36c..0f1124c267 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Area.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Area.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Area : IQuantity static Area() { BaseDimensions = new BaseDimensions(2, 0, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Area, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Area, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit SquareMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaDensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaDensity.WindowsRuntimeComponent.g.cs index f460bc93dc..db8feb3893 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaDensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaDensity.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class AreaDensity : IQuantity static AreaDensity() { BaseDimensions = new BaseDimensions(-2, 1, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.AreaDensity, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.AreaDensity, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit KilogramPerSquareMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaMomentOfInertia.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaMomentOfInertia.WindowsRuntimeComponent.g.cs index f38995cea9..43c2b982f0 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaMomentOfInertia.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaMomentOfInertia.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class AreaMomentOfInertia : IQuantity static AreaMomentOfInertia() { BaseDimensions = new BaseDimensions(4, 0, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.AreaMomentOfInertia, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.AreaMomentOfInertia, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit MeterToTheFourth. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BitRate.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BitRate.WindowsRuntimeComponent.g.cs index e6a5d77004..727a928622 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BitRate.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BitRate.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class BitRate : IQuantity static BitRate() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.BitRate, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.BitRate, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit BitPerSecond. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.WindowsRuntimeComponent.g.cs index f8f36f2a7d..7e051358fa 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class BrakeSpecificFuelConsumption : IQuantity static BrakeSpecificFuelConsumption() { BaseDimensions = new BaseDimensions(-2, 0, 2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.BrakeSpecificFuelConsumption, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.BrakeSpecificFuelConsumption, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit KilogramPerJoule. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Capacitance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Capacitance.WindowsRuntimeComponent.g.cs index 78ff0bd5fb..f4bfb5199f 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Capacitance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Capacitance.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class Capacitance : IQuantity static Capacitance() { BaseDimensions = new BaseDimensions(-2, -1, 4, 2, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Capacitance, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Capacitance, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Farad. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/CoefficientOfThermalExpansion.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/CoefficientOfThermalExpansion.WindowsRuntimeComponent.g.cs index 2dd0443518..61d70bda4b 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/CoefficientOfThermalExpansion.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/CoefficientOfThermalExpansion.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class CoefficientOfThermalExpansion : IQuantity static CoefficientOfThermalExpansion() { BaseDimensions = new BaseDimensions(0, 0, 0, 0, -1, 0, 0); - Info = new QuantityInfo(QuantityType.CoefficientOfThermalExpansion, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.CoefficientOfThermalExpansion, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit InverseKelvin. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Density.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Density.WindowsRuntimeComponent.g.cs index 66f0f00054..d1caed1983 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Density.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Density.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class Density : IQuantity static Density() { BaseDimensions = new BaseDimensions(-3, 1, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Density, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Density, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit KilogramPerCubicMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Duration.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Duration.WindowsRuntimeComponent.g.cs index a975390d18..34c7c2e69a 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Duration.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Duration.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Duration : IQuantity static Duration() { BaseDimensions = new BaseDimensions(0, 0, 1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Duration, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Duration, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Second. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/DynamicViscosity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/DynamicViscosity.WindowsRuntimeComponent.g.cs index 00986da9db..82a5922c43 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/DynamicViscosity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/DynamicViscosity.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class DynamicViscosity : IQuantity static DynamicViscosity() { BaseDimensions = new BaseDimensions(-1, 1, -1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.DynamicViscosity, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.DynamicViscosity, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit NewtonSecondPerMeterSquared. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricAdmittance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricAdmittance.WindowsRuntimeComponent.g.cs index c73f25e282..1ca7f79643 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricAdmittance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricAdmittance.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class ElectricAdmittance : IQuantity static ElectricAdmittance() { BaseDimensions = new BaseDimensions(-2, -1, 3, 2, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricAdmittance, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricAdmittance, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Siemens. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCharge.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCharge.WindowsRuntimeComponent.g.cs index 074f83f35f..dd7dbccd46 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCharge.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCharge.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class ElectricCharge : IQuantity static ElectricCharge() { BaseDimensions = new BaseDimensions(0, 0, 1, 1, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricCharge, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricCharge, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Coulomb. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricChargeDensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricChargeDensity.WindowsRuntimeComponent.g.cs index 781fab023d..be61b7fd78 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricChargeDensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricChargeDensity.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class ElectricChargeDensity : IQuantity static ElectricChargeDensity() { BaseDimensions = new BaseDimensions(-3, 0, 1, 1, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricChargeDensity, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricChargeDensity, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit CoulombPerCubicMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductance.WindowsRuntimeComponent.g.cs index 0d2cfad799..6c73b0712f 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductance.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class ElectricConductance : IQuantity static ElectricConductance() { BaseDimensions = new BaseDimensions(-2, -1, 3, 2, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricConductance, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricConductance, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Siemens. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductivity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductivity.WindowsRuntimeComponent.g.cs index 72d4bbaa20..75dfddb42f 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductivity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductivity.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class ElectricConductivity : IQuantity static ElectricConductivity() { BaseDimensions = new BaseDimensions(-3, -1, 3, 2, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricConductivity, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricConductivity, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit SiemensPerMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrent.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrent.WindowsRuntimeComponent.g.cs index 8cd3d1aa03..b715716dfb 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrent.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrent.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class ElectricCurrent : IQuantity static ElectricCurrent() { BaseDimensions = new BaseDimensions(0, 0, 0, 1, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricCurrent, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricCurrent, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Ampere. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentDensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentDensity.WindowsRuntimeComponent.g.cs index 8df61a9e48..bcd04281e3 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentDensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentDensity.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class ElectricCurrentDensity : IQuantity static ElectricCurrentDensity() { BaseDimensions = new BaseDimensions(-2, 0, 0, 1, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricCurrentDensity, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricCurrentDensity, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit AmperePerSquareMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentGradient.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentGradient.WindowsRuntimeComponent.g.cs index bbf9430bf1..1a80906eb4 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentGradient.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentGradient.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class ElectricCurrentGradient : IQuantity static ElectricCurrentGradient() { BaseDimensions = new BaseDimensions(0, 0, -1, 1, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricCurrentGradient, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricCurrentGradient, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit AmperePerSecond. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricField.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricField.WindowsRuntimeComponent.g.cs index 700f5c9ba4..7e7ad5de54 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricField.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricField.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class ElectricField : IQuantity static ElectricField() { BaseDimensions = new BaseDimensions(1, 1, -3, -1, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricField, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricField, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit VoltPerMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricInductance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricInductance.WindowsRuntimeComponent.g.cs index 098e2b102d..9a687a64bb 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricInductance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricInductance.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class ElectricInductance : IQuantity static ElectricInductance() { BaseDimensions = new BaseDimensions(2, 1, -2, -2, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricInductance, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricInductance, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Henry. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotential.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotential.WindowsRuntimeComponent.g.cs index 4b84c7b746..c32b5158b4 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotential.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotential.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class ElectricPotential : IQuantity static ElectricPotential() { BaseDimensions = new BaseDimensions(2, 1, -3, -1, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricPotential, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricPotential, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Volt. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialAc.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialAc.WindowsRuntimeComponent.g.cs index 4ae37ba100..30c392f318 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialAc.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialAc.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class ElectricPotentialAc : IQuantity static ElectricPotentialAc() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.ElectricPotentialAc, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricPotentialAc, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit VoltAc. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialDc.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialDc.WindowsRuntimeComponent.g.cs index 1a6205fdbb..316ad15b31 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialDc.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialDc.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class ElectricPotentialDc : IQuantity static ElectricPotentialDc() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.ElectricPotentialDc, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricPotentialDc, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit VoltDc. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistance.WindowsRuntimeComponent.g.cs index b19b9ab904..3ed0fe45da 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistance.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class ElectricResistance : IQuantity static ElectricResistance() { BaseDimensions = new BaseDimensions(2, 1, -3, -2, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricResistance, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricResistance, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Ohm. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistivity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistivity.WindowsRuntimeComponent.g.cs index a6b7098a2b..181634535f 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistivity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistivity.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class ElectricResistivity : IQuantity static ElectricResistivity() { BaseDimensions = new BaseDimensions(3, 1, -3, -2, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricResistivity, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricResistivity, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit OhmMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Energy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Energy.WindowsRuntimeComponent.g.cs index 42003f388c..3052d19d89 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Energy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Energy.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Energy : IQuantity static Energy() { BaseDimensions = new BaseDimensions(2, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Energy, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Energy, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Joule. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Entropy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Entropy.WindowsRuntimeComponent.g.cs index c16682aae7..f22e9c4745 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Entropy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Entropy.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Entropy : IQuantity static Entropy() { BaseDimensions = new BaseDimensions(2, 1, -2, 0, -1, 0, 0); - Info = new QuantityInfo(QuantityType.Entropy, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Entropy, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit JoulePerKelvin. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Force.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Force.WindowsRuntimeComponent.g.cs index e0fd06a254..d1df181b30 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Force.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Force.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Force : IQuantity static Force() { BaseDimensions = new BaseDimensions(1, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Force, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Force, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Newton. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForceChangeRate.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForceChangeRate.WindowsRuntimeComponent.g.cs index 079d40ae90..dfbb3feeaf 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForceChangeRate.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForceChangeRate.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class ForceChangeRate : IQuantity static ForceChangeRate() { BaseDimensions = new BaseDimensions(1, 1, -3, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ForceChangeRate, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ForceChangeRate, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit NewtonPerSecond. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForcePerLength.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForcePerLength.WindowsRuntimeComponent.g.cs index 970d2e977f..c10e03d5dd 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForcePerLength.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForcePerLength.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class ForcePerLength : IQuantity static ForcePerLength() { BaseDimensions = new BaseDimensions(0, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ForcePerLength, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ForcePerLength, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit NewtonPerMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Frequency.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Frequency.WindowsRuntimeComponent.g.cs index 532f3bb327..5a852e01de 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Frequency.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Frequency.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Frequency : IQuantity static Frequency() { BaseDimensions = new BaseDimensions(0, 0, -1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Frequency, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Frequency, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Hertz. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatFlux.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatFlux.WindowsRuntimeComponent.g.cs index dea07cf3d3..0693a4825d 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatFlux.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatFlux.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class HeatFlux : IQuantity static HeatFlux() { BaseDimensions = new BaseDimensions(0, 1, -3, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.HeatFlux, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.HeatFlux, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit WattPerSquareMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatTransferCoefficient.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatTransferCoefficient.WindowsRuntimeComponent.g.cs index 488aac1025..cf5ad6618b 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatTransferCoefficient.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatTransferCoefficient.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class HeatTransferCoefficient : IQuantity static HeatTransferCoefficient() { BaseDimensions = new BaseDimensions(0, 1, -3, 0, -1, 0, 0); - Info = new QuantityInfo(QuantityType.HeatTransferCoefficient, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.HeatTransferCoefficient, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit WattPerSquareMeterKelvin. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Illuminance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Illuminance.WindowsRuntimeComponent.g.cs index 5aa6c8df64..65b3f6c32a 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Illuminance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Illuminance.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class Illuminance : IQuantity static Illuminance() { BaseDimensions = new BaseDimensions(-2, 0, 0, 0, 0, 0, 1); - Info = new QuantityInfo(QuantityType.Illuminance, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Illuminance, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Lux. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Information.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Information.WindowsRuntimeComponent.g.cs index 88a3eb81ef..8fb7ed0268 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Information.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Information.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Information : IQuantity static Information() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.Information, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Information, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Bit. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiance.WindowsRuntimeComponent.g.cs index fc2ed96265..16d3f441ea 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiance.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Irradiance : IQuantity static Irradiance() { BaseDimensions = new BaseDimensions(0, 1, -3, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Irradiance, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Irradiance, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit WattPerSquareMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiation.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiation.WindowsRuntimeComponent.g.cs index 7bbb271c77..8898899566 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiation.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiation.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class Irradiation : IQuantity static Irradiation() { BaseDimensions = new BaseDimensions(0, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Irradiation, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Irradiation, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit JoulePerSquareMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/KinematicViscosity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/KinematicViscosity.WindowsRuntimeComponent.g.cs index d374b930f0..1fb1f6e3ff 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/KinematicViscosity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/KinematicViscosity.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class KinematicViscosity : IQuantity static KinematicViscosity() { BaseDimensions = new BaseDimensions(2, 0, -1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.KinematicViscosity, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.KinematicViscosity, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit SquareMeterPerSecond. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LapseRate.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LapseRate.WindowsRuntimeComponent.g.cs index 9a45e212f8..a6cf12a8b4 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LapseRate.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LapseRate.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class LapseRate : IQuantity static LapseRate() { BaseDimensions = new BaseDimensions(-1, 0, 0, 0, 1, 0, 0); - Info = new QuantityInfo(QuantityType.LapseRate, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.LapseRate, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit DegreeCelsiusPerKilometer. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Length.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Length.WindowsRuntimeComponent.g.cs index 67a25c71bc..4486952a8e 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Length.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Length.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Length : IQuantity static Length() { BaseDimensions = new BaseDimensions(1, 0, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Length, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Length, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Meter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Level.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Level.WindowsRuntimeComponent.g.cs index cbed943905..98c4698f08 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Level.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Level.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Level : IQuantity static Level() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.Level, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Level, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Decibel. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LinearDensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LinearDensity.WindowsRuntimeComponent.g.cs index 383c82d881..a779d4e287 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LinearDensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LinearDensity.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class LinearDensity : IQuantity static LinearDensity() { BaseDimensions = new BaseDimensions(-1, 1, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.LinearDensity, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.LinearDensity, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit KilogramPerMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousFlux.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousFlux.WindowsRuntimeComponent.g.cs index d34aa0e41e..fb3d163ea2 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousFlux.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousFlux.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class LuminousFlux : IQuantity static LuminousFlux() { BaseDimensions = new BaseDimensions(0, 0, 0, 0, 0, 0, 1); - Info = new QuantityInfo(QuantityType.LuminousFlux, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.LuminousFlux, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Lumen. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousIntensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousIntensity.WindowsRuntimeComponent.g.cs index 71e4a23997..9047d49d77 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousIntensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousIntensity.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class LuminousIntensity : IQuantity static LuminousIntensity() { BaseDimensions = new BaseDimensions(0, 0, 0, 0, 0, 0, 1); - Info = new QuantityInfo(QuantityType.LuminousIntensity, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.LuminousIntensity, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Candela. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticField.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticField.WindowsRuntimeComponent.g.cs index 2135e43418..157ac0b8ca 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticField.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticField.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class MagneticField : IQuantity static MagneticField() { BaseDimensions = new BaseDimensions(0, 1, -2, -1, 0, 0, 0); - Info = new QuantityInfo(QuantityType.MagneticField, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.MagneticField, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Tesla. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticFlux.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticFlux.WindowsRuntimeComponent.g.cs index d1973b4cef..cb1659a613 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticFlux.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticFlux.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class MagneticFlux : IQuantity static MagneticFlux() { BaseDimensions = new BaseDimensions(2, 1, -2, -1, 0, 0, 0); - Info = new QuantityInfo(QuantityType.MagneticFlux, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.MagneticFlux, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Weber. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Magnetization.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Magnetization.WindowsRuntimeComponent.g.cs index d235c37c5d..f1fb25a94c 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Magnetization.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Magnetization.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class Magnetization : IQuantity static Magnetization() { BaseDimensions = new BaseDimensions(-1, 0, 0, 1, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Magnetization, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Magnetization, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit AmperePerMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Mass.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Mass.WindowsRuntimeComponent.g.cs index a8abff9e44..d8e93a2952 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Mass.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Mass.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Mass : IQuantity static Mass() { BaseDimensions = new BaseDimensions(0, 1, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Mass, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Mass, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Kilogram. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlow.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlow.WindowsRuntimeComponent.g.cs index d7329048f4..c275a61ba0 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlow.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlow.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class MassFlow : IQuantity static MassFlow() { BaseDimensions = new BaseDimensions(0, 1, -1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.MassFlow, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.MassFlow, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit GramPerSecond. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlux.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlux.WindowsRuntimeComponent.g.cs index 40d25d5f7f..5cb3a1ac0c 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlux.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlux.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class MassFlux : IQuantity static MassFlux() { BaseDimensions = new BaseDimensions(-2, 1, -1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.MassFlux, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.MassFlux, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit KilogramPerSecondPerSquareMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassMomentOfInertia.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassMomentOfInertia.WindowsRuntimeComponent.g.cs index 44fb6cba03..3a1daf5dc8 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassMomentOfInertia.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassMomentOfInertia.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class MassMomentOfInertia : IQuantity static MassMomentOfInertia() { BaseDimensions = new BaseDimensions(2, 1, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.MassMomentOfInertia, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.MassMomentOfInertia, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit KilogramSquareMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEnergy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEnergy.WindowsRuntimeComponent.g.cs index f8240faf4a..334d937789 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEnergy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEnergy.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class MolarEnergy : IQuantity static MolarEnergy() { BaseDimensions = new BaseDimensions(2, 1, -2, 0, 0, -1, 0); - Info = new QuantityInfo(QuantityType.MolarEnergy, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.MolarEnergy, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit JoulePerMole. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEntropy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEntropy.WindowsRuntimeComponent.g.cs index e71db55854..5a861b82c4 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEntropy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEntropy.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class MolarEntropy : IQuantity static MolarEntropy() { BaseDimensions = new BaseDimensions(2, 1, -2, 0, -1, -1, 0); - Info = new QuantityInfo(QuantityType.MolarEntropy, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.MolarEntropy, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit JoulePerMoleKelvin. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarMass.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarMass.WindowsRuntimeComponent.g.cs index 3111b03232..05a52a3253 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarMass.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarMass.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class MolarMass : IQuantity static MolarMass() { BaseDimensions = new BaseDimensions(0, 1, 0, 0, 0, -1, 0); - Info = new QuantityInfo(QuantityType.MolarMass, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.MolarMass, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit KilogramPerMole. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Molarity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Molarity.WindowsRuntimeComponent.g.cs index 58169c2ac6..f465cdd22e 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Molarity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Molarity.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class Molarity : IQuantity static Molarity() { BaseDimensions = new BaseDimensions(-3, 0, 0, 0, 0, 1, 0); - Info = new QuantityInfo(QuantityType.Molarity, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Molarity, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit MolesPerCubicMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permeability.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permeability.WindowsRuntimeComponent.g.cs index 6a715aea6b..a14eb12688 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permeability.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permeability.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class Permeability : IQuantity static Permeability() { BaseDimensions = new BaseDimensions(1, 1, -2, -2, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Permeability, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Permeability, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit HenryPerMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permittivity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permittivity.WindowsRuntimeComponent.g.cs index 67f8083b74..6348eace57 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permittivity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permittivity.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class Permittivity : IQuantity static Permittivity() { BaseDimensions = new BaseDimensions(-3, -1, 4, 2, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Permittivity, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Permittivity, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit FaradPerMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Power.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Power.WindowsRuntimeComponent.g.cs index c678e34f97..fa4a67a8df 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Power.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Power.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Power : IQuantity static Power() { BaseDimensions = new BaseDimensions(2, 1, -3, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Power, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Power, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Watt. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerDensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerDensity.WindowsRuntimeComponent.g.cs index 2257ce5d4e..ad04cb07af 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerDensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerDensity.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class PowerDensity : IQuantity static PowerDensity() { BaseDimensions = new BaseDimensions(-1, 1, -3, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.PowerDensity, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.PowerDensity, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit WattPerCubicMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerRatio.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerRatio.WindowsRuntimeComponent.g.cs index 0ce213af9a..ebb25d57f3 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerRatio.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerRatio.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class PowerRatio : IQuantity static PowerRatio() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.PowerRatio, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.PowerRatio, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit DecibelWatt. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Pressure.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Pressure.WindowsRuntimeComponent.g.cs index 47a6a3413d..bc1225550a 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Pressure.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Pressure.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Pressure : IQuantity static Pressure() { BaseDimensions = new BaseDimensions(-1, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Pressure, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Pressure, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Pascal. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PressureChangeRate.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PressureChangeRate.WindowsRuntimeComponent.g.cs index 0d18dae70a..312762444e 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PressureChangeRate.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PressureChangeRate.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class PressureChangeRate : IQuantity static PressureChangeRate() { BaseDimensions = new BaseDimensions(-1, 1, -3, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.PressureChangeRate, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.PressureChangeRate, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit PascalPerSecond. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Ratio.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Ratio.WindowsRuntimeComponent.g.cs index 7b46b40a00..5f887383f4 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Ratio.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Ratio.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Ratio : IQuantity static Ratio() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.Ratio, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Ratio, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit DecimalFraction. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactiveEnergy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactiveEnergy.WindowsRuntimeComponent.g.cs index 28a5610893..83be4b5b7e 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactiveEnergy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactiveEnergy.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class ReactiveEnergy : IQuantity static ReactiveEnergy() { BaseDimensions = new BaseDimensions(2, 1, -1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ReactiveEnergy, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ReactiveEnergy, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit VoltampereReactiveHour. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactivePower.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactivePower.WindowsRuntimeComponent.g.cs index 3eff8038d8..e6cc4411e1 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactivePower.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactivePower.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class ReactivePower : IQuantity static ReactivePower() { BaseDimensions = new BaseDimensions(2, 1, -3, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ReactivePower, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ReactivePower, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit VoltampereReactive. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalAcceleration.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalAcceleration.WindowsRuntimeComponent.g.cs index 5f462915db..307e12d220 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalAcceleration.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalAcceleration.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class RotationalAcceleration : IQuantity static RotationalAcceleration() { BaseDimensions = new BaseDimensions(0, 0, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.RotationalAcceleration, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.RotationalAcceleration, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit RadianPerSecondSquared. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalSpeed.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalSpeed.WindowsRuntimeComponent.g.cs index 44ec0609ff..66798076f2 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalSpeed.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalSpeed.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class RotationalSpeed : IQuantity static RotationalSpeed() { BaseDimensions = new BaseDimensions(0, 0, -1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.RotationalSpeed, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.RotationalSpeed, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit RadianPerSecond. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffness.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffness.WindowsRuntimeComponent.g.cs index 9c2b120a76..7655b7756c 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffness.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffness.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class RotationalStiffness : IQuantity static RotationalStiffness() { BaseDimensions = new BaseDimensions(2, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.RotationalStiffness, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.RotationalStiffness, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit NewtonMeterPerRadian. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffnessPerLength.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffnessPerLength.WindowsRuntimeComponent.g.cs index c34d0f1c1d..cb459e2484 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffnessPerLength.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffnessPerLength.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class RotationalStiffnessPerLength : IQuantity static RotationalStiffnessPerLength() { BaseDimensions = new BaseDimensions(1, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.RotationalStiffnessPerLength, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.RotationalStiffnessPerLength, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit NewtonMeterPerRadianPerMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SolidAngle.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SolidAngle.WindowsRuntimeComponent.g.cs index 08255ee74e..edb1dfc29a 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SolidAngle.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SolidAngle.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class SolidAngle : IQuantity static SolidAngle() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.SolidAngle, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.SolidAngle, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Steradian. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEnergy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEnergy.WindowsRuntimeComponent.g.cs index 554679513e..b68a00e52d 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEnergy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEnergy.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class SpecificEnergy : IQuantity static SpecificEnergy() { BaseDimensions = new BaseDimensions(2, 0, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.SpecificEnergy, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.SpecificEnergy, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit JoulePerKilogram. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEntropy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEntropy.WindowsRuntimeComponent.g.cs index cdd11f1380..9e8715140c 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEntropy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEntropy.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class SpecificEntropy : IQuantity static SpecificEntropy() { BaseDimensions = new BaseDimensions(2, 0, -2, 0, -1, 0, 0); - Info = new QuantityInfo(QuantityType.SpecificEntropy, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.SpecificEntropy, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit JoulePerKilogramKelvin. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificVolume.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificVolume.WindowsRuntimeComponent.g.cs index 085c4db5b3..12487db261 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificVolume.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificVolume.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class SpecificVolume : IQuantity static SpecificVolume() { BaseDimensions = new BaseDimensions(3, -1, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.SpecificVolume, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.SpecificVolume, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit CubicMeterPerKilogram. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificWeight.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificWeight.WindowsRuntimeComponent.g.cs index 85f315f29d..b373d824bf 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificWeight.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificWeight.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class SpecificWeight : IQuantity static SpecificWeight() { BaseDimensions = new BaseDimensions(-2, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.SpecificWeight, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.SpecificWeight, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit NewtonPerCubicMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Speed.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Speed.WindowsRuntimeComponent.g.cs index e1b6488894..aa49d71f74 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Speed.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Speed.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Speed : IQuantity static Speed() { BaseDimensions = new BaseDimensions(1, 0, -1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Speed, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Speed, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit MeterPerSecond. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Temperature.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Temperature.WindowsRuntimeComponent.g.cs index 2878e8d608..0e9d288bca 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Temperature.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Temperature.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Temperature : IQuantity static Temperature() { BaseDimensions = new BaseDimensions(0, 0, 0, 0, 1, 0, 0); - Info = new QuantityInfo(QuantityType.Temperature, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Temperature, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Kelvin. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureChangeRate.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureChangeRate.WindowsRuntimeComponent.g.cs index 981ec1bb5b..3a6941c869 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureChangeRate.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureChangeRate.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class TemperatureChangeRate : IQuantity static TemperatureChangeRate() { BaseDimensions = new BaseDimensions(0, 0, -1, 0, 1, 0, 0); - Info = new QuantityInfo(QuantityType.TemperatureChangeRate, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.TemperatureChangeRate, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit DegreeCelsiusPerSecond. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureDelta.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureDelta.WindowsRuntimeComponent.g.cs index 632e49fd35..d337cbe967 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureDelta.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureDelta.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class TemperatureDelta : IQuantity static TemperatureDelta() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.TemperatureDelta, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.TemperatureDelta, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit Kelvin. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalConductivity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalConductivity.WindowsRuntimeComponent.g.cs index db4040a134..ebf545e85d 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalConductivity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalConductivity.WindowsRuntimeComponent.g.cs @@ -70,7 +70,7 @@ public sealed partial class ThermalConductivity : IQuantity static ThermalConductivity() { BaseDimensions = new BaseDimensions(1, 1, -3, 0, -1, 0, 0); - Info = new QuantityInfo(QuantityType.ThermalConductivity, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ThermalConductivity, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit WattPerMeterKelvin. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalResistance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalResistance.WindowsRuntimeComponent.g.cs index d191ac8f76..1713743459 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalResistance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalResistance.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class ThermalResistance : IQuantity static ThermalResistance() { BaseDimensions = new BaseDimensions(0, -1, 3, 0, 1, 0, 0); - Info = new QuantityInfo(QuantityType.ThermalResistance, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ThermalResistance, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit SquareMeterKelvinPerKilowatt. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Torque.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Torque.WindowsRuntimeComponent.g.cs index a40f6b54f3..733e04291c 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Torque.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Torque.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Torque : IQuantity static Torque() { BaseDimensions = new BaseDimensions(2, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Torque, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Torque, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit NewtonMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VitaminA.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VitaminA.WindowsRuntimeComponent.g.cs index 637d003dd7..038e8c3445 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VitaminA.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VitaminA.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class VitaminA : IQuantity static VitaminA() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.VitaminA, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.VitaminA, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit InternationalUnit. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Volume.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Volume.WindowsRuntimeComponent.g.cs index e4e364d89c..3d703ae8e7 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Volume.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Volume.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class Volume : IQuantity static Volume() { BaseDimensions = new BaseDimensions(3, 0, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Volume, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Volume, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit CubicMeter. diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VolumeFlow.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VolumeFlow.WindowsRuntimeComponent.g.cs index b41e558b96..bdc43889a3 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VolumeFlow.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VolumeFlow.WindowsRuntimeComponent.g.cs @@ -67,7 +67,7 @@ public sealed partial class VolumeFlow : IQuantity static VolumeFlow() { BaseDimensions = new BaseDimensions(3, 0, -1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.VolumeFlow, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.VolumeFlow, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); } /// /// Creates the quantity with a value of 0 in the base unit CubicMeterPerSecond. diff --git a/UnitsNet/CustomCode/Quantity.cs b/UnitsNet/CustomCode/Quantity.cs index 7248efea60..20002b116a 100644 --- a/UnitsNet/CustomCode/Quantity.cs +++ b/UnitsNet/CustomCode/Quantity.cs @@ -1,14 +1,13 @@ using System; +using System.Collections.Generic; using System.Linq; using System.Reflection; using UnitsNet.InternalHelpers; #if WINDOWS_UWP -using Culture = System.String; -using FromValue = System.Double; + using FromValue = System.Double; #else -using Culture = System.IFormatProvider; -using FromValue = UnitsNet.QuantityValue; + using FromValue = UnitsNet.QuantityValue; #endif namespace UnitsNet @@ -80,5 +79,10 @@ public static IQuantity From(FromValue value, Enum unit) throw new ArgumentException( $"Unit value {unit} of type {unit.GetType()} is not a known unit enum type. Expected types like UnitsNet.Units.LengthUnit. Did you pass in a third-party enum type defined outside UnitsNet library?"); } + + public static IEnumerable GetQuantitiesWithBaseDimensions(BaseDimensions baseDimensions) + { + return InfosLazy.Value.Where(info => info.BaseDimensions.Equals(baseDimensions)); + } } } diff --git a/UnitsNet/GeneratedCode/Quantities/Acceleration.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Acceleration.NetFramework.g.cs index 75981dd378..24c22ca923 100644 --- a/UnitsNet/GeneratedCode/Quantities/Acceleration.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Acceleration.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct Acceleration : IQuantity, IEquatable(QuantityType.Acceleration, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Acceleration, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.NetFramework.g.cs index 988f6223d2..56ba178c64 100644 --- a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct AmountOfSubstance : IQuantity, IEqu static AmountOfSubstance() { BaseDimensions = new BaseDimensions(0, 0, 0, 0, 0, 1, 0); - Info = new QuantityInfo(QuantityType.AmountOfSubstance, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.AmountOfSubstance, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.NetFramework.g.cs index d665a1a15b..d19c28116e 100644 --- a/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct AmplitudeRatio : IQuantity, IEquatable static AmplitudeRatio() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.AmplitudeRatio, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.AmplitudeRatio, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Angle.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Angle.NetFramework.g.cs index 76f6bda01c..b5003b84cf 100644 --- a/UnitsNet/GeneratedCode/Quantities/Angle.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Angle.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct Angle : IQuantity, IEquatable, IComparab static Angle() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.Angle, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Angle, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.NetFramework.g.cs index 1281e3c632..db07ca05ec 100644 --- a/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct ApparentEnergy : IQuantity, IEquatable static ApparentEnergy() { BaseDimensions = new BaseDimensions(2, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ApparentEnergy, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ApparentEnergy, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ApparentPower.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ApparentPower.NetFramework.g.cs index 58d16d48cd..b804184e71 100644 --- a/UnitsNet/GeneratedCode/Quantities/ApparentPower.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ApparentPower.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct ApparentPower : IQuantity, IEquatable(QuantityType.ApparentPower, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ApparentPower, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Area.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Area.NetFramework.g.cs index 3a486d3fc9..574bc3832a 100644 --- a/UnitsNet/GeneratedCode/Quantities/Area.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Area.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct Area : IQuantity, IEquatable, IComparable, static Area() { BaseDimensions = new BaseDimensions(2, 0, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Area, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Area, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/AreaDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaDensity.NetFramework.g.cs index e9c29c9913..8d4a5ab764 100644 --- a/UnitsNet/GeneratedCode/Quantities/AreaDensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AreaDensity.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct AreaDensity : IQuantity, IEquatable(QuantityType.AreaDensity, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.AreaDensity, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.NetFramework.g.cs index 2f12291f04..d34c2a9682 100644 --- a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct AreaMomentOfInertia : IQuantity, static AreaMomentOfInertia() { BaseDimensions = new BaseDimensions(4, 0, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.AreaMomentOfInertia, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.AreaMomentOfInertia, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/BitRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/BitRate.NetFramework.g.cs index c097e2d40b..122aa9a348 100644 --- a/UnitsNet/GeneratedCode/Quantities/BitRate.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/BitRate.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct BitRate : IQuantity, IEquatable, ICo static BitRate() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.BitRate, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.BitRate, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.NetFramework.g.cs index 85d43fc664..011acec025 100644 --- a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct BrakeSpecificFuelConsumption : IQuantity(QuantityType.BrakeSpecificFuelConsumption, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.BrakeSpecificFuelConsumption, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Capacitance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Capacitance.NetFramework.g.cs index 4eae618ef9..90e55d9870 100644 --- a/UnitsNet/GeneratedCode/Quantities/Capacitance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Capacitance.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct Capacitance : IQuantity, IEquatable(QuantityType.Capacitance, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Capacitance, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.NetFramework.g.cs index c61368d9e6..99658c0425 100644 --- a/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct CoefficientOfThermalExpansion : IQuantity(QuantityType.CoefficientOfThermalExpansion, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.CoefficientOfThermalExpansion, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Density.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Density.NetFramework.g.cs index 77580257bf..aed29bd365 100644 --- a/UnitsNet/GeneratedCode/Quantities/Density.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Density.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct Density : IQuantity, IEquatable, ICo static Density() { BaseDimensions = new BaseDimensions(-3, 1, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Density, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Density, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Duration.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Duration.NetFramework.g.cs index fedd0014c3..0a54910359 100644 --- a/UnitsNet/GeneratedCode/Quantities/Duration.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Duration.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct Duration : IQuantity, IEquatable, static Duration() { BaseDimensions = new BaseDimensions(0, 0, 1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Duration, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Duration, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.NetFramework.g.cs index 4887d85432..1042fef2e1 100644 --- a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct DynamicViscosity : IQuantity, IEquat static DynamicViscosity() { BaseDimensions = new BaseDimensions(-1, 1, -1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.DynamicViscosity, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.DynamicViscosity, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.NetFramework.g.cs index e192d4a352..fa527ea83f 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct ElectricAdmittance : IQuantity, IE static ElectricAdmittance() { BaseDimensions = new BaseDimensions(-2, -1, 3, 2, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricAdmittance, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricAdmittance, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.NetFramework.g.cs index 4b2b0144a0..a53d2b3427 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct ElectricCharge : IQuantity, IEquatable static ElectricCharge() { BaseDimensions = new BaseDimensions(0, 0, 1, 1, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricCharge, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricCharge, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.NetFramework.g.cs index 13251690f8..672b671cb8 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct ElectricChargeDensity : IQuantity(QuantityType.ElectricChargeDensity, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricChargeDensity, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricConductance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricConductance.NetFramework.g.cs index dda27837e0..f75fb8303c 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricConductance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductance.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct ElectricConductance : IQuantity, static ElectricConductance() { BaseDimensions = new BaseDimensions(-2, -1, 3, 2, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricConductance, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricConductance, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.NetFramework.g.cs index cda7fcc197..a9605f532b 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct ElectricConductivity : IQuantity static ElectricConductivity() { BaseDimensions = new BaseDimensions(-3, -1, 3, 2, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricConductivity, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricConductivity, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.NetFramework.g.cs index a6c46c3694..808c34f581 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct ElectricCurrent : IQuantity, IEquatab static ElectricCurrent() { BaseDimensions = new BaseDimensions(0, 0, 0, 1, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricCurrent, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricCurrent, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.NetFramework.g.cs index c6a3076326..0eddafe775 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct ElectricCurrentDensity : IQuantity(QuantityType.ElectricCurrentDensity, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricCurrentDensity, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.NetFramework.g.cs index 99ba9d16e6..d7124642f0 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct ElectricCurrentGradient : IQuantity(QuantityType.ElectricCurrentGradient, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricCurrentGradient, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricField.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricField.NetFramework.g.cs index ee9005eea4..26e98126fb 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricField.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricField.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct ElectricField : IQuantity, IEquatable(QuantityType.ElectricField, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricField, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricInductance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricInductance.NetFramework.g.cs index 509067af4f..6f527ed600 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricInductance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricInductance.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct ElectricInductance : IQuantity, IE static ElectricInductance() { BaseDimensions = new BaseDimensions(2, 1, -2, -2, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricInductance, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricInductance, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.NetFramework.g.cs index 1fbe18b1cf..800ff99993 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct ElectricPotential : IQuantity, IEqu static ElectricPotential() { BaseDimensions = new BaseDimensions(2, 1, -3, -1, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricPotential, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricPotential, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.NetFramework.g.cs index 84d53130cf..b9ce97320a 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct ElectricPotentialAc : IQuantity, static ElectricPotentialAc() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.ElectricPotentialAc, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricPotentialAc, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.NetFramework.g.cs index 9fbebf4b1e..9df6fd07aa 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct ElectricPotentialDc : IQuantity, static ElectricPotentialDc() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.ElectricPotentialDc, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricPotentialDc, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.NetFramework.g.cs index ff7f7ee410..672305734b 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct ElectricResistance : IQuantity, IE static ElectricResistance() { BaseDimensions = new BaseDimensions(2, 1, -3, -2, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricResistance, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricResistance, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.NetFramework.g.cs index e9b741f431..45df4ce159 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct ElectricResistivity : IQuantity, static ElectricResistivity() { BaseDimensions = new BaseDimensions(3, 1, -3, -2, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ElectricResistivity, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ElectricResistivity, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Energy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Energy.NetFramework.g.cs index b99390ba74..802df1996a 100644 --- a/UnitsNet/GeneratedCode/Quantities/Energy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Energy.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct Energy : IQuantity, IEquatable, ICompa static Energy() { BaseDimensions = new BaseDimensions(2, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Energy, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Energy, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Entropy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Entropy.NetFramework.g.cs index 73b2032460..e8c5ed0df5 100644 --- a/UnitsNet/GeneratedCode/Quantities/Entropy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Entropy.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct Entropy : IQuantity, IEquatable, ICo static Entropy() { BaseDimensions = new BaseDimensions(2, 1, -2, 0, -1, 0, 0); - Info = new QuantityInfo(QuantityType.Entropy, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Entropy, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Force.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Force.NetFramework.g.cs index e564b3416e..6786854fe5 100644 --- a/UnitsNet/GeneratedCode/Quantities/Force.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Force.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct Force : IQuantity, IEquatable, IComparab static Force() { BaseDimensions = new BaseDimensions(1, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Force, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Force, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.NetFramework.g.cs index 95a13e7e3c..938d5e2125 100644 --- a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct ForceChangeRate : IQuantity, IEquatab static ForceChangeRate() { BaseDimensions = new BaseDimensions(1, 1, -3, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ForceChangeRate, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ForceChangeRate, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.NetFramework.g.cs index 0e6c09c2be..f2b7060048 100644 --- a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct ForcePerLength : IQuantity, IEquatable static ForcePerLength() { BaseDimensions = new BaseDimensions(0, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ForcePerLength, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ForcePerLength, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Frequency.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Frequency.NetFramework.g.cs index 93608b4643..bf46c08a72 100644 --- a/UnitsNet/GeneratedCode/Quantities/Frequency.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Frequency.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct Frequency : IQuantity, IEquatable(QuantityType.Frequency, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Frequency, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/HeatFlux.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatFlux.NetFramework.g.cs index bffb5c713b..ed80fdc39a 100644 --- a/UnitsNet/GeneratedCode/Quantities/HeatFlux.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/HeatFlux.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct HeatFlux : IQuantity, IEquatable, static HeatFlux() { BaseDimensions = new BaseDimensions(0, 1, -3, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.HeatFlux, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.HeatFlux, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.NetFramework.g.cs index a97fa6050e..2c2a4e61fd 100644 --- a/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct HeatTransferCoefficient : IQuantity(QuantityType.HeatTransferCoefficient, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.HeatTransferCoefficient, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Illuminance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Illuminance.NetFramework.g.cs index cf3898b3ca..ff2735d9f8 100644 --- a/UnitsNet/GeneratedCode/Quantities/Illuminance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Illuminance.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct Illuminance : IQuantity, IEquatable(QuantityType.Illuminance, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Illuminance, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Information.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Information.NetFramework.g.cs index 9c4fa61ddc..9e81003d00 100644 --- a/UnitsNet/GeneratedCode/Quantities/Information.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Information.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct Information : IQuantity, IEquatable(QuantityType.Information, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Information, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Irradiance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Irradiance.NetFramework.g.cs index f679f772c5..add7a85666 100644 --- a/UnitsNet/GeneratedCode/Quantities/Irradiance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Irradiance.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct Irradiance : IQuantity, IEquatable(QuantityType.Irradiance, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Irradiance, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Irradiation.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Irradiation.NetFramework.g.cs index c256a8449c..99177a5f33 100644 --- a/UnitsNet/GeneratedCode/Quantities/Irradiation.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Irradiation.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct Irradiation : IQuantity, IEquatable(QuantityType.Irradiation, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Irradiation, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.NetFramework.g.cs index e82abbb5a8..4ad33c9050 100644 --- a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct KinematicViscosity : IQuantity, IE static KinematicViscosity() { BaseDimensions = new BaseDimensions(2, 0, -1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.KinematicViscosity, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.KinematicViscosity, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/LapseRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/LapseRate.NetFramework.g.cs index d1a85e85b4..bcf33d4d08 100644 --- a/UnitsNet/GeneratedCode/Quantities/LapseRate.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LapseRate.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct LapseRate : IQuantity, IEquatable(QuantityType.LapseRate, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.LapseRate, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Length.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Length.NetFramework.g.cs index 6ad43955de..75c4ded8f1 100644 --- a/UnitsNet/GeneratedCode/Quantities/Length.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Length.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct Length : IQuantity, IEquatable, ICompa static Length() { BaseDimensions = new BaseDimensions(1, 0, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Length, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Length, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Level.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Level.NetFramework.g.cs index 10502e40a2..8cba41adca 100644 --- a/UnitsNet/GeneratedCode/Quantities/Level.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Level.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct Level : IQuantity, IEquatable, IComparab static Level() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.Level, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Level, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/LinearDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/LinearDensity.NetFramework.g.cs index 609300fe5f..0581eb65fa 100644 --- a/UnitsNet/GeneratedCode/Quantities/LinearDensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LinearDensity.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct LinearDensity : IQuantity, IEquatable(QuantityType.LinearDensity, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.LinearDensity, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/LuminousFlux.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/LuminousFlux.NetFramework.g.cs index 5d83454608..d354a090d9 100644 --- a/UnitsNet/GeneratedCode/Quantities/LuminousFlux.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LuminousFlux.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct LuminousFlux : IQuantity, IEquatable(QuantityType.LuminousFlux, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.LuminousFlux, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.NetFramework.g.cs index cec70b841e..c863d70cc0 100644 --- a/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct LuminousIntensity : IQuantity, IEqu static LuminousIntensity() { BaseDimensions = new BaseDimensions(0, 0, 0, 0, 0, 0, 1); - Info = new QuantityInfo(QuantityType.LuminousIntensity, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.LuminousIntensity, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/MagneticField.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MagneticField.NetFramework.g.cs index bd31e4f59e..50b8e33dd3 100644 --- a/UnitsNet/GeneratedCode/Quantities/MagneticField.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MagneticField.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct MagneticField : IQuantity, IEquatable(QuantityType.MagneticField, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.MagneticField, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/MagneticFlux.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MagneticFlux.NetFramework.g.cs index e637852dfa..8d1833ca3f 100644 --- a/UnitsNet/GeneratedCode/Quantities/MagneticFlux.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MagneticFlux.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct MagneticFlux : IQuantity, IEquatable(QuantityType.MagneticFlux, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.MagneticFlux, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Magnetization.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Magnetization.NetFramework.g.cs index 2f2f129eba..2843e6e5ef 100644 --- a/UnitsNet/GeneratedCode/Quantities/Magnetization.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Magnetization.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct Magnetization : IQuantity, IEquatable(QuantityType.Magnetization, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Magnetization, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Mass.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Mass.NetFramework.g.cs index 8f2f917a22..2069bd1226 100644 --- a/UnitsNet/GeneratedCode/Quantities/Mass.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Mass.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct Mass : IQuantity, IEquatable, IComparable, static Mass() { BaseDimensions = new BaseDimensions(0, 1, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Mass, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Mass, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/MassFlow.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFlow.NetFramework.g.cs index 6fe7146809..7cdd626bde 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFlow.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFlow.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct MassFlow : IQuantity, IEquatable, static MassFlow() { BaseDimensions = new BaseDimensions(0, 1, -1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.MassFlow, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.MassFlow, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/MassFlux.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFlux.NetFramework.g.cs index 2993dc418c..9e500d4554 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFlux.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFlux.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct MassFlux : IQuantity, IEquatable, static MassFlux() { BaseDimensions = new BaseDimensions(-2, 1, -1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.MassFlux, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.MassFlux, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.NetFramework.g.cs index 1cff3fd266..fa882d1174 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct MassMomentOfInertia : IQuantity, static MassMomentOfInertia() { BaseDimensions = new BaseDimensions(2, 1, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.MassMomentOfInertia, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.MassMomentOfInertia, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/MolarEnergy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarEnergy.NetFramework.g.cs index 5d716b1f7d..a73844a770 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarEnergy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarEnergy.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct MolarEnergy : IQuantity, IEquatable(QuantityType.MolarEnergy, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.MolarEnergy, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/MolarEntropy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarEntropy.NetFramework.g.cs index f045b370d0..821da5a4d2 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarEntropy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarEntropy.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct MolarEntropy : IQuantity, IEquatable(QuantityType.MolarEntropy, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.MolarEntropy, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/MolarMass.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarMass.NetFramework.g.cs index f3b9dbf3a6..8282356661 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarMass.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarMass.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct MolarMass : IQuantity, IEquatable(QuantityType.MolarMass, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.MolarMass, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Molarity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Molarity.NetFramework.g.cs index 397bdfc7d2..ae00952f3e 100644 --- a/UnitsNet/GeneratedCode/Quantities/Molarity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Molarity.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct Molarity : IQuantity, IEquatable, static Molarity() { BaseDimensions = new BaseDimensions(-3, 0, 0, 0, 0, 1, 0); - Info = new QuantityInfo(QuantityType.Molarity, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Molarity, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Permeability.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Permeability.NetFramework.g.cs index f6044a68d7..04a1dac510 100644 --- a/UnitsNet/GeneratedCode/Quantities/Permeability.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Permeability.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct Permeability : IQuantity, IEquatable(QuantityType.Permeability, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Permeability, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Permittivity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Permittivity.NetFramework.g.cs index 0b0ffe2303..14e9cef33b 100644 --- a/UnitsNet/GeneratedCode/Quantities/Permittivity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Permittivity.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct Permittivity : IQuantity, IEquatable(QuantityType.Permittivity, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Permittivity, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Power.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Power.NetFramework.g.cs index cbdfe855c7..c94ce83845 100644 --- a/UnitsNet/GeneratedCode/Quantities/Power.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Power.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct Power : IQuantity, IEquatable, IComparab static Power() { BaseDimensions = new BaseDimensions(2, 1, -3, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Power, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Power, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/PowerDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/PowerDensity.NetFramework.g.cs index 8fea70534e..e05f0fa0af 100644 --- a/UnitsNet/GeneratedCode/Quantities/PowerDensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PowerDensity.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct PowerDensity : IQuantity, IEquatable(QuantityType.PowerDensity, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.PowerDensity, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/PowerRatio.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/PowerRatio.NetFramework.g.cs index 2dd6cad94d..fd2d6965fc 100644 --- a/UnitsNet/GeneratedCode/Quantities/PowerRatio.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PowerRatio.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct PowerRatio : IQuantity, IEquatable(QuantityType.PowerRatio, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.PowerRatio, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Pressure.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Pressure.NetFramework.g.cs index 521347e1cc..6b2b295bb2 100644 --- a/UnitsNet/GeneratedCode/Quantities/Pressure.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Pressure.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct Pressure : IQuantity, IEquatable, static Pressure() { BaseDimensions = new BaseDimensions(-1, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Pressure, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Pressure, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.NetFramework.g.cs index 759bb41285..02fa838f29 100644 --- a/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct PressureChangeRate : IQuantity, IE static PressureChangeRate() { BaseDimensions = new BaseDimensions(-1, 1, -3, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.PressureChangeRate, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.PressureChangeRate, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Ratio.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Ratio.NetFramework.g.cs index a169d206c1..ce639179a4 100644 --- a/UnitsNet/GeneratedCode/Quantities/Ratio.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Ratio.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct Ratio : IQuantity, IEquatable, IComparab static Ratio() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.Ratio, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Ratio, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.NetFramework.g.cs index 93bb2ab7a7..2b217397cb 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct ReactiveEnergy : IQuantity, IEquatable static ReactiveEnergy() { BaseDimensions = new BaseDimensions(2, 1, -1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.ReactiveEnergy, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ReactiveEnergy, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ReactivePower.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ReactivePower.NetFramework.g.cs index de2e2348f4..5053bb1765 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReactivePower.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReactivePower.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct ReactivePower : IQuantity, IEquatable(QuantityType.ReactivePower, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ReactivePower, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.NetFramework.g.cs index c590bd5b7c..501b43e599 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct RotationalAcceleration : IQuantity(QuantityType.RotationalAcceleration, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.RotationalAcceleration, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.NetFramework.g.cs index b691da614d..577c347f6d 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct RotationalSpeed : IQuantity, IEquatab static RotationalSpeed() { BaseDimensions = new BaseDimensions(0, 0, -1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.RotationalSpeed, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.RotationalSpeed, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.NetFramework.g.cs index 01f0afdc90..199edf27a1 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct RotationalStiffness : IQuantity, static RotationalStiffness() { BaseDimensions = new BaseDimensions(2, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.RotationalStiffness, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.RotationalStiffness, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.NetFramework.g.cs index 8fe3a84a27..aca37525b8 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct RotationalStiffnessPerLength : IQuantity(QuantityType.RotationalStiffnessPerLength, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.RotationalStiffnessPerLength, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/SolidAngle.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/SolidAngle.NetFramework.g.cs index b2be548f73..70e2188088 100644 --- a/UnitsNet/GeneratedCode/Quantities/SolidAngle.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SolidAngle.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct SolidAngle : IQuantity, IEquatable(QuantityType.SolidAngle, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.SolidAngle, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.NetFramework.g.cs index d0ab7300d6..88558d69ad 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct SpecificEnergy : IQuantity, IEquatable static SpecificEnergy() { BaseDimensions = new BaseDimensions(2, 0, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.SpecificEnergy, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.SpecificEnergy, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.NetFramework.g.cs index 68d4187d7c..5e7528ec7f 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct SpecificEntropy : IQuantity, IEquatab static SpecificEntropy() { BaseDimensions = new BaseDimensions(2, 0, -2, 0, -1, 0, 0); - Info = new QuantityInfo(QuantityType.SpecificEntropy, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.SpecificEntropy, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificVolume.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificVolume.NetFramework.g.cs index 44ee260d8d..c8f4c59ccd 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificVolume.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificVolume.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct SpecificVolume : IQuantity, IEquatable static SpecificVolume() { BaseDimensions = new BaseDimensions(3, -1, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.SpecificVolume, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.SpecificVolume, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificWeight.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificWeight.NetFramework.g.cs index e3394bfb65..8476c489d4 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificWeight.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificWeight.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct SpecificWeight : IQuantity, IEquatable static SpecificWeight() { BaseDimensions = new BaseDimensions(-2, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.SpecificWeight, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.SpecificWeight, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Speed.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Speed.NetFramework.g.cs index c67fc26f8e..0887505929 100644 --- a/UnitsNet/GeneratedCode/Quantities/Speed.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Speed.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct Speed : IQuantity, IEquatable, IComparab static Speed() { BaseDimensions = new BaseDimensions(1, 0, -1, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Speed, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Speed, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Temperature.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Temperature.NetFramework.g.cs index 93331f1f9a..b8778e21c6 100644 --- a/UnitsNet/GeneratedCode/Quantities/Temperature.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Temperature.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct Temperature : IQuantity, IEquatable(QuantityType.Temperature, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Temperature, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.NetFramework.g.cs index 32ccf0065a..06964f85a2 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct TemperatureChangeRate : IQuantity(QuantityType.TemperatureChangeRate, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.TemperatureChangeRate, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.NetFramework.g.cs index 21c0b94f90..c3e9d12c83 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct TemperatureDelta : IQuantity, IEquat static TemperatureDelta() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.TemperatureDelta, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.TemperatureDelta, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.NetFramework.g.cs index 1a7f07f218..e30ab44513 100644 --- a/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.NetFramework.g.cs @@ -67,7 +67,7 @@ public partial struct ThermalConductivity : IQuantity, static ThermalConductivity() { BaseDimensions = new BaseDimensions(1, 1, -3, 0, -1, 0, 0); - Info = new QuantityInfo(QuantityType.ThermalConductivity, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ThermalConductivity, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/ThermalResistance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ThermalResistance.NetFramework.g.cs index 039055c919..9f095141b3 100644 --- a/UnitsNet/GeneratedCode/Quantities/ThermalResistance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ThermalResistance.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct ThermalResistance : IQuantity, IEqu static ThermalResistance() { BaseDimensions = new BaseDimensions(0, -1, 3, 0, 1, 0, 0); - Info = new QuantityInfo(QuantityType.ThermalResistance, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.ThermalResistance, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Torque.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Torque.NetFramework.g.cs index ca257405f8..2091a0c1e7 100644 --- a/UnitsNet/GeneratedCode/Quantities/Torque.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Torque.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct Torque : IQuantity, IEquatable, ICompa static Torque() { BaseDimensions = new BaseDimensions(2, 1, -2, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Torque, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Torque, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/VitaminA.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/VitaminA.NetFramework.g.cs index 2aa69a0df3..57546b46f9 100644 --- a/UnitsNet/GeneratedCode/Quantities/VitaminA.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VitaminA.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct VitaminA : IQuantity, IEquatable, static VitaminA() { BaseDimensions = BaseDimensions.Dimensionless; - Info = new QuantityInfo(QuantityType.VitaminA, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.VitaminA, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/Volume.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Volume.NetFramework.g.cs index 7f0756ae10..75de363eb9 100644 --- a/UnitsNet/GeneratedCode/Quantities/Volume.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Volume.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct Volume : IQuantity, IEquatable, ICompa static Volume() { BaseDimensions = new BaseDimensions(3, 0, 0, 0, 0, 0, 0); - Info = new QuantityInfo(QuantityType.Volume, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.Volume, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/GeneratedCode/Quantities/VolumeFlow.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumeFlow.NetFramework.g.cs index 9a846b7033..5d75300c61 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumeFlow.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumeFlow.NetFramework.g.cs @@ -64,7 +64,7 @@ public partial struct VolumeFlow : IQuantity, IEquatable(QuantityType.VolumeFlow, Units, Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.VolumeFlow, Units, BaseUnit, Zero, BaseDimensions); } /// diff --git a/UnitsNet/QuantityInfo.cs b/UnitsNet/QuantityInfo.cs index af321760e6..e94db564fb 100644 --- a/UnitsNet/QuantityInfo.cs +++ b/UnitsNet/QuantityInfo.cs @@ -53,18 +53,20 @@ class QuantityInfo .Where(t => t.Wrap().IsEnum && t.Namespace == UnitEnumNamespace && t.Name.EndsWith("Unit")) .ToArray(); - public QuantityInfo(QuantityType quantityType, [NotNull] Enum[] units, [NotNull] IQuantity zero, [NotNull] BaseDimensions baseDimensions) + public QuantityInfo(QuantityType quantityType, [NotNull] Enum[] units, [NotNull] Enum baseUnit, [NotNull] IQuantity zero, [NotNull] BaseDimensions baseDimensions) { if(quantityType == QuantityType.Undefined) throw new ArgumentException("Quantity type can not be undefined.", nameof(quantityType)); - if (units == null) throw new ArgumentNullException(nameof(units)); - if (zero == null) throw new ArgumentNullException(nameof(zero)); - if (baseDimensions == null) throw new ArgumentNullException(nameof(baseDimensions)); + if(units == null) throw new ArgumentNullException(nameof(units)); + if(baseUnit == null) throw new ArgumentNullException(nameof(baseUnit)); + if(zero == null) throw new ArgumentNullException(nameof(zero)); + if(baseDimensions == null) throw new ArgumentNullException(nameof(baseDimensions)); Name = quantityType.ToString(); QuantityType = quantityType; UnitType = UnitEnumTypes.First(t => t.Name == $"{quantityType}Unit"); UnitNames = units.Select(u => u.ToString()).ToArray(); Units = units; + BaseUnit = baseUnit; Zero = zero; ValueType = zero.GetType(); BaseDimensions = baseDimensions; @@ -91,6 +93,11 @@ public QuantityInfo(QuantityType quantityType, [NotNull] Enum[] units, [NotNull] /// public Enum[] Units { get; } + /// + /// The base unit for the quantity, such as . + /// + public Enum BaseUnit { get; } + /// /// Zero value of quantity, such as . /// @@ -123,18 +130,24 @@ public QuantityInfo(QuantityType quantityType, [NotNull] Enum[] units, [NotNull] public class QuantityInfo : QuantityInfo where TUnit : Enum { - public QuantityInfo(QuantityType quantityType, TUnit[] units, IQuantity zero, BaseDimensions baseDimensions) - : base(quantityType, units.Cast().ToArray(), zero, baseDimensions) + public QuantityInfo(QuantityType quantityType, TUnit[] units, TUnit baseUnit, IQuantity zero, BaseDimensions baseDimensions) + : base(quantityType, units.Cast().ToArray(), baseUnit, zero, baseDimensions) { Zero = zero; Units = units; + BaseUnit = baseUnit; } /// public new TUnit[] Units { get; } + public new TUnit BaseUnit { get; } + /// public new IQuantity Zero { get; } + + /// + public new TUnit UnitType { get; } } #endif } diff --git a/UnitsNet/Scripts/Include-GenerateQuantitySourceCode.ps1 b/UnitsNet/Scripts/Include-GenerateQuantitySourceCode.ps1 index 326f03efde..fe4a584805 100644 --- a/UnitsNet/Scripts/Include-GenerateQuantitySourceCode.ps1 +++ b/UnitsNet/Scripts/Include-GenerateQuantitySourceCode.ps1 @@ -125,9 +125,9 @@ if ($obsoleteAttribute) BaseDimensions = new BaseDimensions($($baseDimensions.Length), $($baseDimensions.Mass), $($baseDimensions.Time), $($baseDimensions.ElectricCurrent), $($baseDimensions.Temperature), $($baseDimensions.AmountOfSubstance), $($baseDimensions.LuminousIntensity)); "@; } if ($wrc) {@" - Info = new QuantityInfo(QuantityType.$quantityName, Units.Cast().ToArray(), Zero, BaseDimensions); + Info = new QuantityInfo(QuantityType.$quantityName, Units.Cast().ToArray(), BaseUnit, Zero, BaseDimensions); "@; } else {@" - Info = new QuantityInfo<$unitEnumName>(QuantityType.$quantityName, Units, Zero, BaseDimensions); + Info = new QuantityInfo<$unitEnumName>(QuantityType.$quantityName, Units, BaseUnit, Zero, BaseDimensions); "@; }@" } "@; # Windows Runtime Component requires a default constructor From 861fb0db9f0f5d62dcd026560344323716c74dfb Mon Sep 17 00:00:00 2001 From: Tristan Milnthorp Date: Thu, 31 Jan 2019 17:26:56 -0500 Subject: [PATCH 36/36] Adding Unit to IQuantity --- .../Acceleration.WindowsRuntimeComponent.g.cs | 3 +++ ...mountOfSubstance.WindowsRuntimeComponent.g.cs | 3 +++ .../AmplitudeRatio.WindowsRuntimeComponent.g.cs | 3 +++ .../Angle.WindowsRuntimeComponent.g.cs | 3 +++ .../ApparentEnergy.WindowsRuntimeComponent.g.cs | 3 +++ .../ApparentPower.WindowsRuntimeComponent.g.cs | 3 +++ .../Quantities/Area.WindowsRuntimeComponent.g.cs | 3 +++ .../AreaDensity.WindowsRuntimeComponent.g.cs | 3 +++ ...aMomentOfInertia.WindowsRuntimeComponent.g.cs | 3 +++ .../BitRate.WindowsRuntimeComponent.g.cs | 3 +++ ...cFuelConsumption.WindowsRuntimeComponent.g.cs | 3 +++ .../Capacitance.WindowsRuntimeComponent.g.cs | 3 +++ ...ThermalExpansion.WindowsRuntimeComponent.g.cs | 3 +++ .../Density.WindowsRuntimeComponent.g.cs | 3 +++ .../Duration.WindowsRuntimeComponent.g.cs | 3 +++ ...DynamicViscosity.WindowsRuntimeComponent.g.cs | 3 +++ ...ectricAdmittance.WindowsRuntimeComponent.g.cs | 3 +++ .../ElectricCharge.WindowsRuntimeComponent.g.cs | 3 +++ ...ricChargeDensity.WindowsRuntimeComponent.g.cs | 3 +++ ...ctricConductance.WindowsRuntimeComponent.g.cs | 3 +++ ...tricConductivity.WindowsRuntimeComponent.g.cs | 3 +++ .../ElectricCurrent.WindowsRuntimeComponent.g.cs | 3 +++ ...icCurrentDensity.WindowsRuntimeComponent.g.cs | 3 +++ ...cCurrentGradient.WindowsRuntimeComponent.g.cs | 3 +++ .../ElectricField.WindowsRuntimeComponent.g.cs | 3 +++ ...ectricInductance.WindowsRuntimeComponent.g.cs | 3 +++ ...lectricPotential.WindowsRuntimeComponent.g.cs | 3 +++ ...ctricPotentialAc.WindowsRuntimeComponent.g.cs | 3 +++ ...ctricPotentialDc.WindowsRuntimeComponent.g.cs | 3 +++ ...ectricResistance.WindowsRuntimeComponent.g.cs | 3 +++ ...ctricResistivity.WindowsRuntimeComponent.g.cs | 3 +++ .../Energy.WindowsRuntimeComponent.g.cs | 3 +++ .../Entropy.WindowsRuntimeComponent.g.cs | 3 +++ .../Force.WindowsRuntimeComponent.g.cs | 3 +++ .../ForceChangeRate.WindowsRuntimeComponent.g.cs | 3 +++ .../ForcePerLength.WindowsRuntimeComponent.g.cs | 3 +++ .../Frequency.WindowsRuntimeComponent.g.cs | 3 +++ .../HeatFlux.WindowsRuntimeComponent.g.cs | 3 +++ ...nsferCoefficient.WindowsRuntimeComponent.g.cs | 3 +++ .../Illuminance.WindowsRuntimeComponent.g.cs | 3 +++ .../Information.WindowsRuntimeComponent.g.cs | 3 +++ .../Irradiance.WindowsRuntimeComponent.g.cs | 3 +++ .../Irradiation.WindowsRuntimeComponent.g.cs | 3 +++ ...nematicViscosity.WindowsRuntimeComponent.g.cs | 3 +++ .../LapseRate.WindowsRuntimeComponent.g.cs | 3 +++ .../Length.WindowsRuntimeComponent.g.cs | 3 +++ .../Level.WindowsRuntimeComponent.g.cs | 3 +++ .../LinearDensity.WindowsRuntimeComponent.g.cs | 3 +++ .../LuminousFlux.WindowsRuntimeComponent.g.cs | 3 +++ ...uminousIntensity.WindowsRuntimeComponent.g.cs | 3 +++ .../MagneticField.WindowsRuntimeComponent.g.cs | 3 +++ .../MagneticFlux.WindowsRuntimeComponent.g.cs | 3 +++ .../Magnetization.WindowsRuntimeComponent.g.cs | 3 +++ .../Quantities/Mass.WindowsRuntimeComponent.g.cs | 3 +++ .../MassFlow.WindowsRuntimeComponent.g.cs | 3 +++ .../MassFlux.WindowsRuntimeComponent.g.cs | 3 +++ ...sMomentOfInertia.WindowsRuntimeComponent.g.cs | 3 +++ .../MolarEnergy.WindowsRuntimeComponent.g.cs | 3 +++ .../MolarEntropy.WindowsRuntimeComponent.g.cs | 3 +++ .../MolarMass.WindowsRuntimeComponent.g.cs | 3 +++ .../Molarity.WindowsRuntimeComponent.g.cs | 3 +++ .../Permeability.WindowsRuntimeComponent.g.cs | 3 +++ .../Permittivity.WindowsRuntimeComponent.g.cs | 3 +++ .../Power.WindowsRuntimeComponent.g.cs | 3 +++ .../PowerDensity.WindowsRuntimeComponent.g.cs | 3 +++ .../PowerRatio.WindowsRuntimeComponent.g.cs | 3 +++ .../Pressure.WindowsRuntimeComponent.g.cs | 3 +++ ...essureChangeRate.WindowsRuntimeComponent.g.cs | 3 +++ .../Ratio.WindowsRuntimeComponent.g.cs | 3 +++ .../ReactiveEnergy.WindowsRuntimeComponent.g.cs | 3 +++ .../ReactivePower.WindowsRuntimeComponent.g.cs | 3 +++ ...onalAcceleration.WindowsRuntimeComponent.g.cs | 3 +++ .../RotationalSpeed.WindowsRuntimeComponent.g.cs | 3 +++ ...ationalStiffness.WindowsRuntimeComponent.g.cs | 3 +++ ...iffnessPerLength.WindowsRuntimeComponent.g.cs | 3 +++ .../SolidAngle.WindowsRuntimeComponent.g.cs | 3 +++ .../SpecificEnergy.WindowsRuntimeComponent.g.cs | 3 +++ .../SpecificEntropy.WindowsRuntimeComponent.g.cs | 3 +++ .../SpecificVolume.WindowsRuntimeComponent.g.cs | 3 +++ .../SpecificWeight.WindowsRuntimeComponent.g.cs | 3 +++ .../Speed.WindowsRuntimeComponent.g.cs | 3 +++ .../Temperature.WindowsRuntimeComponent.g.cs | 3 +++ ...ratureChangeRate.WindowsRuntimeComponent.g.cs | 3 +++ ...TemperatureDelta.WindowsRuntimeComponent.g.cs | 3 +++ ...rmalConductivity.WindowsRuntimeComponent.g.cs | 3 +++ ...hermalResistance.WindowsRuntimeComponent.g.cs | 3 +++ .../Torque.WindowsRuntimeComponent.g.cs | 3 +++ .../VitaminA.WindowsRuntimeComponent.g.cs | 3 +++ .../Volume.WindowsRuntimeComponent.g.cs | 3 +++ .../VolumeFlow.WindowsRuntimeComponent.g.cs | 3 +++ .../Quantities/Acceleration.NetFramework.g.cs | 4 ++++ .../AmountOfSubstance.NetFramework.g.cs | 4 ++++ .../Quantities/AmplitudeRatio.NetFramework.g.cs | 4 ++++ .../Quantities/Angle.NetFramework.g.cs | 4 ++++ .../Quantities/ApparentEnergy.NetFramework.g.cs | 4 ++++ .../Quantities/ApparentPower.NetFramework.g.cs | 4 ++++ .../Quantities/Area.NetFramework.g.cs | 4 ++++ .../Quantities/AreaDensity.NetFramework.g.cs | 4 ++++ .../AreaMomentOfInertia.NetFramework.g.cs | 4 ++++ .../Quantities/BitRate.NetFramework.g.cs | 4 ++++ ...rakeSpecificFuelConsumption.NetFramework.g.cs | 4 ++++ .../Quantities/Capacitance.NetFramework.g.cs | 4 ++++ ...efficientOfThermalExpansion.NetFramework.g.cs | 4 ++++ .../Quantities/Density.NetFramework.g.cs | 4 ++++ .../Quantities/Duration.NetFramework.g.cs | 4 ++++ .../DynamicViscosity.NetFramework.g.cs | 4 ++++ .../ElectricAdmittance.NetFramework.g.cs | 4 ++++ .../Quantities/ElectricCharge.NetFramework.g.cs | 4 ++++ .../ElectricChargeDensity.NetFramework.g.cs | 4 ++++ .../ElectricConductance.NetFramework.g.cs | 4 ++++ .../ElectricConductivity.NetFramework.g.cs | 4 ++++ .../Quantities/ElectricCurrent.NetFramework.g.cs | 4 ++++ .../ElectricCurrentDensity.NetFramework.g.cs | 4 ++++ .../ElectricCurrentGradient.NetFramework.g.cs | 4 ++++ .../Quantities/ElectricField.NetFramework.g.cs | 4 ++++ .../ElectricInductance.NetFramework.g.cs | 4 ++++ .../ElectricPotential.NetFramework.g.cs | 4 ++++ .../ElectricPotentialAc.NetFramework.g.cs | 4 ++++ .../ElectricPotentialDc.NetFramework.g.cs | 4 ++++ .../ElectricResistance.NetFramework.g.cs | 4 ++++ .../ElectricResistivity.NetFramework.g.cs | 4 ++++ .../Quantities/Energy.NetFramework.g.cs | 4 ++++ .../Quantities/Entropy.NetFramework.g.cs | 4 ++++ .../Quantities/Force.NetFramework.g.cs | 4 ++++ .../Quantities/ForceChangeRate.NetFramework.g.cs | 4 ++++ .../Quantities/ForcePerLength.NetFramework.g.cs | 4 ++++ .../Quantities/Frequency.NetFramework.g.cs | 4 ++++ .../Quantities/HeatFlux.NetFramework.g.cs | 4 ++++ .../HeatTransferCoefficient.NetFramework.g.cs | 4 ++++ .../Quantities/Illuminance.NetFramework.g.cs | 4 ++++ .../Quantities/Information.NetFramework.g.cs | 4 ++++ .../Quantities/Irradiance.NetFramework.g.cs | 4 ++++ .../Quantities/Irradiation.NetFramework.g.cs | 4 ++++ .../KinematicViscosity.NetFramework.g.cs | 4 ++++ .../Quantities/LapseRate.NetFramework.g.cs | 4 ++++ .../Quantities/Length.NetFramework.g.cs | 4 ++++ .../Quantities/Level.NetFramework.g.cs | 4 ++++ .../Quantities/LinearDensity.NetFramework.g.cs | 4 ++++ .../Quantities/LuminousFlux.NetFramework.g.cs | 4 ++++ .../LuminousIntensity.NetFramework.g.cs | 4 ++++ .../Quantities/MagneticField.NetFramework.g.cs | 4 ++++ .../Quantities/MagneticFlux.NetFramework.g.cs | 4 ++++ .../Quantities/Magnetization.NetFramework.g.cs | 4 ++++ .../Quantities/Mass.NetFramework.g.cs | 4 ++++ .../Quantities/MassFlow.NetFramework.g.cs | 4 ++++ .../Quantities/MassFlux.NetFramework.g.cs | 4 ++++ .../MassMomentOfInertia.NetFramework.g.cs | 4 ++++ .../Quantities/MolarEnergy.NetFramework.g.cs | 4 ++++ .../Quantities/MolarEntropy.NetFramework.g.cs | 4 ++++ .../Quantities/MolarMass.NetFramework.g.cs | 4 ++++ .../Quantities/Molarity.NetFramework.g.cs | 4 ++++ .../Quantities/Permeability.NetFramework.g.cs | 4 ++++ .../Quantities/Permittivity.NetFramework.g.cs | 4 ++++ .../Quantities/Power.NetFramework.g.cs | 4 ++++ .../Quantities/PowerDensity.NetFramework.g.cs | 4 ++++ .../Quantities/PowerRatio.NetFramework.g.cs | 4 ++++ .../Quantities/Pressure.NetFramework.g.cs | 4 ++++ .../PressureChangeRate.NetFramework.g.cs | 4 ++++ .../Quantities/Ratio.NetFramework.g.cs | 4 ++++ .../Quantities/ReactiveEnergy.NetFramework.g.cs | 4 ++++ .../Quantities/ReactivePower.NetFramework.g.cs | 4 ++++ .../RotationalAcceleration.NetFramework.g.cs | 4 ++++ .../Quantities/RotationalSpeed.NetFramework.g.cs | 4 ++++ .../RotationalStiffness.NetFramework.g.cs | 4 ++++ ...otationalStiffnessPerLength.NetFramework.g.cs | 4 ++++ .../Quantities/SolidAngle.NetFramework.g.cs | 4 ++++ .../Quantities/SpecificEnergy.NetFramework.g.cs | 4 ++++ .../Quantities/SpecificEntropy.NetFramework.g.cs | 4 ++++ .../Quantities/SpecificVolume.NetFramework.g.cs | 4 ++++ .../Quantities/SpecificWeight.NetFramework.g.cs | 4 ++++ .../Quantities/Speed.NetFramework.g.cs | 4 ++++ .../Quantities/Temperature.NetFramework.g.cs | 4 ++++ .../TemperatureChangeRate.NetFramework.g.cs | 4 ++++ .../TemperatureDelta.NetFramework.g.cs | 4 ++++ .../ThermalConductivity.NetFramework.g.cs | 4 ++++ .../ThermalResistance.NetFramework.g.cs | 4 ++++ .../Quantities/Torque.NetFramework.g.cs | 4 ++++ .../Quantities/VitaminA.NetFramework.g.cs | 4 ++++ .../Quantities/Volume.NetFramework.g.cs | 4 ++++ .../Quantities/VolumeFlow.NetFramework.g.cs | 4 ++++ UnitsNet/IQuantity.cs | 16 ++++++++++++---- .../Include-GenerateQuantitySourceCode.ps1 | 4 ++++ 182 files changed, 646 insertions(+), 4 deletions(-) diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Acceleration.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Acceleration.WindowsRuntimeComponent.g.cs index bf24ce0e29..08f57cb762 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Acceleration.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Acceleration.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private Acceleration(double numericValue, AccelerationUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmountOfSubstance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmountOfSubstance.WindowsRuntimeComponent.g.cs index 0254fa5278..ab477ea159 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmountOfSubstance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmountOfSubstance.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private AmountOfSubstance(double numericValue, AmountOfSubstanceUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmplitudeRatio.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmplitudeRatio.WindowsRuntimeComponent.g.cs index a54eb2aeef..1b19e346c9 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmplitudeRatio.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AmplitudeRatio.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private AmplitudeRatio(double numericValue, AmplitudeRatioUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Angle.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Angle.WindowsRuntimeComponent.g.cs index cd51ba05d3..26227b6896 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Angle.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Angle.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private Angle(double numericValue, AngleUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentEnergy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentEnergy.WindowsRuntimeComponent.g.cs index bbb23500f4..390ae19a53 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentEnergy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentEnergy.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private ApparentEnergy(double numericValue, ApparentEnergyUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentPower.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentPower.WindowsRuntimeComponent.g.cs index dcc2246625..8f2c2c4be5 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentPower.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ApparentPower.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private ApparentPower(double numericValue, ApparentPowerUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Area.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Area.WindowsRuntimeComponent.g.cs index 0f1124c267..e1d7b01e00 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Area.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Area.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private Area(double numericValue, AreaUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaDensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaDensity.WindowsRuntimeComponent.g.cs index db8feb3893..a8be923f84 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaDensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaDensity.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private AreaDensity(double numericValue, AreaDensityUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaMomentOfInertia.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaMomentOfInertia.WindowsRuntimeComponent.g.cs index 43c2b982f0..13bba944ea 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaMomentOfInertia.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/AreaMomentOfInertia.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private AreaMomentOfInertia(double numericValue, AreaMomentOfInertiaUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BitRate.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BitRate.WindowsRuntimeComponent.g.cs index 727a928622..1c491a0427 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BitRate.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BitRate.WindowsRuntimeComponent.g.cs @@ -149,6 +149,9 @@ private BitRate(decimal numericValue, BitRateUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.WindowsRuntimeComponent.g.cs index 7e051358fa..63577de814 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private BrakeSpecificFuelConsumption(double numericValue, BrakeSpecificFuelConsu /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Capacitance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Capacitance.WindowsRuntimeComponent.g.cs index f4bfb5199f..d445ff36ac 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Capacitance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Capacitance.WindowsRuntimeComponent.g.cs @@ -149,6 +149,9 @@ private Capacitance(double numericValue, CapacitanceUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/CoefficientOfThermalExpansion.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/CoefficientOfThermalExpansion.WindowsRuntimeComponent.g.cs index 61d70bda4b..3ed7417b39 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/CoefficientOfThermalExpansion.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/CoefficientOfThermalExpansion.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private CoefficientOfThermalExpansion(double numericValue, CoefficientOfThermalE /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Density.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Density.WindowsRuntimeComponent.g.cs index d1caed1983..cc3d021307 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Density.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Density.WindowsRuntimeComponent.g.cs @@ -149,6 +149,9 @@ private Density(double numericValue, DensityUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Duration.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Duration.WindowsRuntimeComponent.g.cs index 34c7c2e69a..a8f79b1e2c 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Duration.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Duration.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private Duration(double numericValue, DurationUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/DynamicViscosity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/DynamicViscosity.WindowsRuntimeComponent.g.cs index 82a5922c43..50bb51042c 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/DynamicViscosity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/DynamicViscosity.WindowsRuntimeComponent.g.cs @@ -149,6 +149,9 @@ private DynamicViscosity(double numericValue, DynamicViscosityUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricAdmittance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricAdmittance.WindowsRuntimeComponent.g.cs index 1ca7f79643..c9bf26be0e 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricAdmittance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricAdmittance.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private ElectricAdmittance(double numericValue, ElectricAdmittanceUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCharge.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCharge.WindowsRuntimeComponent.g.cs index dd7dbccd46..77bf1358bf 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCharge.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCharge.WindowsRuntimeComponent.g.cs @@ -149,6 +149,9 @@ private ElectricCharge(double numericValue, ElectricChargeUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricChargeDensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricChargeDensity.WindowsRuntimeComponent.g.cs index be61b7fd78..827946f8b4 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricChargeDensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricChargeDensity.WindowsRuntimeComponent.g.cs @@ -149,6 +149,9 @@ private ElectricChargeDensity(double numericValue, ElectricChargeDensityUnit uni /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductance.WindowsRuntimeComponent.g.cs index 6c73b0712f..d2d87b54cc 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductance.WindowsRuntimeComponent.g.cs @@ -149,6 +149,9 @@ private ElectricConductance(double numericValue, ElectricConductanceUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductivity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductivity.WindowsRuntimeComponent.g.cs index 75dfddb42f..d250c836b8 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductivity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricConductivity.WindowsRuntimeComponent.g.cs @@ -149,6 +149,9 @@ private ElectricConductivity(double numericValue, ElectricConductivityUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrent.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrent.WindowsRuntimeComponent.g.cs index b715716dfb..959579febb 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrent.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrent.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private ElectricCurrent(double numericValue, ElectricCurrentUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentDensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentDensity.WindowsRuntimeComponent.g.cs index bcd04281e3..63be2d2ddc 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentDensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentDensity.WindowsRuntimeComponent.g.cs @@ -149,6 +149,9 @@ private ElectricCurrentDensity(double numericValue, ElectricCurrentDensityUnit u /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentGradient.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentGradient.WindowsRuntimeComponent.g.cs index 1a80906eb4..33000fe1ba 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentGradient.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentGradient.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private ElectricCurrentGradient(double numericValue, ElectricCurrentGradientUnit /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricField.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricField.WindowsRuntimeComponent.g.cs index 7e7ad5de54..844c64b25d 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricField.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricField.WindowsRuntimeComponent.g.cs @@ -149,6 +149,9 @@ private ElectricField(double numericValue, ElectricFieldUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricInductance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricInductance.WindowsRuntimeComponent.g.cs index 9a687a64bb..e3c4912972 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricInductance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricInductance.WindowsRuntimeComponent.g.cs @@ -149,6 +149,9 @@ private ElectricInductance(double numericValue, ElectricInductanceUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotential.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotential.WindowsRuntimeComponent.g.cs index c32b5158b4..b72cd51609 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotential.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotential.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private ElectricPotential(double numericValue, ElectricPotentialUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialAc.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialAc.WindowsRuntimeComponent.g.cs index 30c392f318..9db5653f18 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialAc.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialAc.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private ElectricPotentialAc(double numericValue, ElectricPotentialAcUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialDc.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialDc.WindowsRuntimeComponent.g.cs index 316ad15b31..402f18a4b5 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialDc.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricPotentialDc.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private ElectricPotentialDc(double numericValue, ElectricPotentialDcUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistance.WindowsRuntimeComponent.g.cs index 3ed0fe45da..5d58571ed2 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistance.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private ElectricResistance(double numericValue, ElectricResistanceUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistivity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistivity.WindowsRuntimeComponent.g.cs index 181634535f..111976cce3 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistivity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricResistivity.WindowsRuntimeComponent.g.cs @@ -149,6 +149,9 @@ private ElectricResistivity(double numericValue, ElectricResistivityUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Energy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Energy.WindowsRuntimeComponent.g.cs index 3052d19d89..2e6350f72e 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Energy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Energy.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private Energy(double numericValue, EnergyUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Entropy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Entropy.WindowsRuntimeComponent.g.cs index f22e9c4745..b007d5a46a 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Entropy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Entropy.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private Entropy(double numericValue, EntropyUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Force.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Force.WindowsRuntimeComponent.g.cs index d1df181b30..b4d5d7b3fa 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Force.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Force.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private Force(double numericValue, ForceUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForceChangeRate.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForceChangeRate.WindowsRuntimeComponent.g.cs index dfbb3feeaf..520985c5b1 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForceChangeRate.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForceChangeRate.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private ForceChangeRate(double numericValue, ForceChangeRateUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForcePerLength.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForcePerLength.WindowsRuntimeComponent.g.cs index c10e03d5dd..f6ebfbf655 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForcePerLength.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ForcePerLength.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private ForcePerLength(double numericValue, ForcePerLengthUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Frequency.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Frequency.WindowsRuntimeComponent.g.cs index 5a852e01de..6e028b8fe7 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Frequency.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Frequency.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private Frequency(double numericValue, FrequencyUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatFlux.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatFlux.WindowsRuntimeComponent.g.cs index 0693a4825d..4419bc6b87 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatFlux.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatFlux.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private HeatFlux(double numericValue, HeatFluxUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatTransferCoefficient.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatTransferCoefficient.WindowsRuntimeComponent.g.cs index cf5ad6618b..cce8f794b0 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatTransferCoefficient.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/HeatTransferCoefficient.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private HeatTransferCoefficient(double numericValue, HeatTransferCoefficientUnit /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Illuminance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Illuminance.WindowsRuntimeComponent.g.cs index 65b3f6c32a..babc32c9e9 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Illuminance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Illuminance.WindowsRuntimeComponent.g.cs @@ -149,6 +149,9 @@ private Illuminance(double numericValue, IlluminanceUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Information.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Information.WindowsRuntimeComponent.g.cs index 8fb7ed0268..d45c12c6c3 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Information.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Information.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private Information(decimal numericValue, InformationUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiance.WindowsRuntimeComponent.g.cs index 16d3f441ea..445be64d67 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiance.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private Irradiance(double numericValue, IrradianceUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiation.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiation.WindowsRuntimeComponent.g.cs index 8898899566..2050069d52 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiation.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Irradiation.WindowsRuntimeComponent.g.cs @@ -149,6 +149,9 @@ private Irradiation(double numericValue, IrradiationUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/KinematicViscosity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/KinematicViscosity.WindowsRuntimeComponent.g.cs index 1fb1f6e3ff..fd88a5a316 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/KinematicViscosity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/KinematicViscosity.WindowsRuntimeComponent.g.cs @@ -149,6 +149,9 @@ private KinematicViscosity(double numericValue, KinematicViscosityUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LapseRate.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LapseRate.WindowsRuntimeComponent.g.cs index a6cf12a8b4..35ceb88570 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LapseRate.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LapseRate.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private LapseRate(double numericValue, LapseRateUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Length.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Length.WindowsRuntimeComponent.g.cs index 4486952a8e..c7973e5122 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Length.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Length.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private Length(double numericValue, LengthUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Level.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Level.WindowsRuntimeComponent.g.cs index 98c4698f08..1eb64edd57 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Level.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Level.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private Level(double numericValue, LevelUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LinearDensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LinearDensity.WindowsRuntimeComponent.g.cs index a779d4e287..d31eea0a62 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LinearDensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LinearDensity.WindowsRuntimeComponent.g.cs @@ -149,6 +149,9 @@ private LinearDensity(double numericValue, LinearDensityUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousFlux.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousFlux.WindowsRuntimeComponent.g.cs index fb3d163ea2..cf67c8c400 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousFlux.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousFlux.WindowsRuntimeComponent.g.cs @@ -149,6 +149,9 @@ private LuminousFlux(double numericValue, LuminousFluxUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousIntensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousIntensity.WindowsRuntimeComponent.g.cs index 9047d49d77..fc0f3fcaae 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousIntensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/LuminousIntensity.WindowsRuntimeComponent.g.cs @@ -149,6 +149,9 @@ private LuminousIntensity(double numericValue, LuminousIntensityUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticField.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticField.WindowsRuntimeComponent.g.cs index 157ac0b8ca..0c5065cf67 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticField.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticField.WindowsRuntimeComponent.g.cs @@ -149,6 +149,9 @@ private MagneticField(double numericValue, MagneticFieldUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticFlux.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticFlux.WindowsRuntimeComponent.g.cs index cb1659a613..9d896dbfb8 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticFlux.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MagneticFlux.WindowsRuntimeComponent.g.cs @@ -149,6 +149,9 @@ private MagneticFlux(double numericValue, MagneticFluxUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Magnetization.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Magnetization.WindowsRuntimeComponent.g.cs index f1fb25a94c..f210e84292 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Magnetization.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Magnetization.WindowsRuntimeComponent.g.cs @@ -149,6 +149,9 @@ private Magnetization(double numericValue, MagnetizationUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Mass.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Mass.WindowsRuntimeComponent.g.cs index d8e93a2952..a4c128811a 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Mass.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Mass.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private Mass(double numericValue, MassUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlow.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlow.WindowsRuntimeComponent.g.cs index c275a61ba0..a93ee6394c 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlow.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlow.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private MassFlow(double numericValue, MassFlowUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlux.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlux.WindowsRuntimeComponent.g.cs index 5cb3a1ac0c..14957f2075 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlux.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassFlux.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private MassFlux(double numericValue, MassFluxUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassMomentOfInertia.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassMomentOfInertia.WindowsRuntimeComponent.g.cs index 3a1daf5dc8..1f74cb4ce4 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassMomentOfInertia.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MassMomentOfInertia.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private MassMomentOfInertia(double numericValue, MassMomentOfInertiaUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEnergy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEnergy.WindowsRuntimeComponent.g.cs index 334d937789..401cb0aba3 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEnergy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEnergy.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private MolarEnergy(double numericValue, MolarEnergyUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEntropy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEntropy.WindowsRuntimeComponent.g.cs index 5a861b82c4..2d2a4236ca 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEntropy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarEntropy.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private MolarEntropy(double numericValue, MolarEntropyUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarMass.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarMass.WindowsRuntimeComponent.g.cs index 05a52a3253..72d37e1b2c 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarMass.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/MolarMass.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private MolarMass(double numericValue, MolarMassUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Molarity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Molarity.WindowsRuntimeComponent.g.cs index f465cdd22e..847c2d8cd0 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Molarity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Molarity.WindowsRuntimeComponent.g.cs @@ -149,6 +149,9 @@ private Molarity(double numericValue, MolarityUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permeability.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permeability.WindowsRuntimeComponent.g.cs index a14eb12688..23d96bbe1a 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permeability.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permeability.WindowsRuntimeComponent.g.cs @@ -149,6 +149,9 @@ private Permeability(double numericValue, PermeabilityUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permittivity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permittivity.WindowsRuntimeComponent.g.cs index 6348eace57..0e15153f08 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permittivity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Permittivity.WindowsRuntimeComponent.g.cs @@ -149,6 +149,9 @@ private Permittivity(double numericValue, PermittivityUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Power.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Power.WindowsRuntimeComponent.g.cs index fa4a67a8df..c41560c5d3 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Power.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Power.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private Power(decimal numericValue, PowerUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerDensity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerDensity.WindowsRuntimeComponent.g.cs index ad04cb07af..8575a58e79 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerDensity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerDensity.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private PowerDensity(double numericValue, PowerDensityUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerRatio.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerRatio.WindowsRuntimeComponent.g.cs index ebb25d57f3..2dca1d2d03 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerRatio.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PowerRatio.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private PowerRatio(double numericValue, PowerRatioUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Pressure.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Pressure.WindowsRuntimeComponent.g.cs index bc1225550a..a133a71e82 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Pressure.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Pressure.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private Pressure(double numericValue, PressureUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PressureChangeRate.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PressureChangeRate.WindowsRuntimeComponent.g.cs index 312762444e..f0baf28104 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PressureChangeRate.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/PressureChangeRate.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private PressureChangeRate(double numericValue, PressureChangeRateUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Ratio.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Ratio.WindowsRuntimeComponent.g.cs index 5f887383f4..5f0c10a334 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Ratio.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Ratio.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private Ratio(double numericValue, RatioUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactiveEnergy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactiveEnergy.WindowsRuntimeComponent.g.cs index 83be4b5b7e..daed0a599a 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactiveEnergy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactiveEnergy.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private ReactiveEnergy(double numericValue, ReactiveEnergyUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactivePower.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactivePower.WindowsRuntimeComponent.g.cs index e6cc4411e1..2653aab6dc 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactivePower.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ReactivePower.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private ReactivePower(double numericValue, ReactivePowerUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalAcceleration.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalAcceleration.WindowsRuntimeComponent.g.cs index 307e12d220..ac5c2b4f1b 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalAcceleration.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalAcceleration.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private RotationalAcceleration(double numericValue, RotationalAccelerationUnit u /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalSpeed.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalSpeed.WindowsRuntimeComponent.g.cs index 66798076f2..30219a5001 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalSpeed.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalSpeed.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private RotationalSpeed(double numericValue, RotationalSpeedUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffness.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffness.WindowsRuntimeComponent.g.cs index 7655b7756c..814f4e4d8d 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffness.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffness.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private RotationalStiffness(double numericValue, RotationalStiffnessUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffnessPerLength.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffnessPerLength.WindowsRuntimeComponent.g.cs index cb459e2484..c82828bfa5 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffnessPerLength.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/RotationalStiffnessPerLength.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private RotationalStiffnessPerLength(double numericValue, RotationalStiffnessPer /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SolidAngle.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SolidAngle.WindowsRuntimeComponent.g.cs index edb1dfc29a..ffe3b92393 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SolidAngle.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SolidAngle.WindowsRuntimeComponent.g.cs @@ -149,6 +149,9 @@ private SolidAngle(double numericValue, SolidAngleUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEnergy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEnergy.WindowsRuntimeComponent.g.cs index b68a00e52d..e2f16162b0 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEnergy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEnergy.WindowsRuntimeComponent.g.cs @@ -149,6 +149,9 @@ private SpecificEnergy(double numericValue, SpecificEnergyUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEntropy.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEntropy.WindowsRuntimeComponent.g.cs index 9e8715140c..ce8c7c1ff9 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEntropy.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificEntropy.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private SpecificEntropy(double numericValue, SpecificEntropyUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificVolume.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificVolume.WindowsRuntimeComponent.g.cs index 12487db261..c81b3663b1 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificVolume.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificVolume.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private SpecificVolume(double numericValue, SpecificVolumeUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificWeight.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificWeight.WindowsRuntimeComponent.g.cs index b373d824bf..22f85c0db9 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificWeight.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/SpecificWeight.WindowsRuntimeComponent.g.cs @@ -149,6 +149,9 @@ private SpecificWeight(double numericValue, SpecificWeightUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Speed.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Speed.WindowsRuntimeComponent.g.cs index aa49d71f74..7595102c52 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Speed.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Speed.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private Speed(double numericValue, SpeedUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Temperature.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Temperature.WindowsRuntimeComponent.g.cs index 0e9d288bca..c8863b52d6 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Temperature.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Temperature.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private Temperature(double numericValue, TemperatureUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureChangeRate.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureChangeRate.WindowsRuntimeComponent.g.cs index 3a6941c869..d6726bb8a6 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureChangeRate.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureChangeRate.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private TemperatureChangeRate(double numericValue, TemperatureChangeRateUnit uni /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureDelta.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureDelta.WindowsRuntimeComponent.g.cs index d337cbe967..65354a33eb 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureDelta.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/TemperatureDelta.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private TemperatureDelta(double numericValue, TemperatureDeltaUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalConductivity.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalConductivity.WindowsRuntimeComponent.g.cs index ebf545e85d..7490a60cfe 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalConductivity.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalConductivity.WindowsRuntimeComponent.g.cs @@ -149,6 +149,9 @@ private ThermalConductivity(double numericValue, ThermalConductivityUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalResistance.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalResistance.WindowsRuntimeComponent.g.cs index 1713743459..67a1f6e093 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalResistance.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ThermalResistance.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private ThermalResistance(double numericValue, ThermalResistanceUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Torque.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Torque.WindowsRuntimeComponent.g.cs index 733e04291c..20916a4b26 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Torque.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Torque.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private Torque(double numericValue, TorqueUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VitaminA.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VitaminA.WindowsRuntimeComponent.g.cs index 038e8c3445..7ba67f85c4 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VitaminA.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VitaminA.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private VitaminA(double numericValue, VitaminAUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Volume.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Volume.WindowsRuntimeComponent.g.cs index 3d703ae8e7..b3abc2b83e 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Volume.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Volume.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private Volume(double numericValue, VolumeUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VolumeFlow.WindowsRuntimeComponent.g.cs b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VolumeFlow.WindowsRuntimeComponent.g.cs index bdc43889a3..9219610cb3 100644 --- a/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VolumeFlow.WindowsRuntimeComponent.g.cs +++ b/UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/VolumeFlow.WindowsRuntimeComponent.g.cs @@ -146,6 +146,9 @@ private VolumeFlow(double numericValue, VolumeFlowUnit unit) /// public double Value => Convert.ToDouble(_value); + /// + object IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// diff --git a/UnitsNet/GeneratedCode/Quantities/Acceleration.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Acceleration.NetFramework.g.cs index 24c22ca923..016930dca8 100644 --- a/UnitsNet/GeneratedCode/Quantities/Acceleration.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Acceleration.NetFramework.g.cs @@ -132,6 +132,9 @@ public Acceleration(double numericValue, AccelerationUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public Acceleration(double numericValue, AccelerationUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.NetFramework.g.cs index 56ba178c64..fd34f9ca2b 100644 --- a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.NetFramework.g.cs @@ -132,6 +132,9 @@ public AmountOfSubstance(double numericValue, AmountOfSubstanceUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public AmountOfSubstance(double numericValue, AmountOfSubstanceUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.NetFramework.g.cs index d19c28116e..09106f06ab 100644 --- a/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.NetFramework.g.cs @@ -132,6 +132,9 @@ public AmplitudeRatio(double numericValue, AmplitudeRatioUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public AmplitudeRatio(double numericValue, AmplitudeRatioUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/Angle.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Angle.NetFramework.g.cs index b5003b84cf..c74069868b 100644 --- a/UnitsNet/GeneratedCode/Quantities/Angle.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Angle.NetFramework.g.cs @@ -132,6 +132,9 @@ public Angle(double numericValue, AngleUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public Angle(double numericValue, AngleUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.NetFramework.g.cs index db07ca05ec..cc442448d1 100644 --- a/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.NetFramework.g.cs @@ -132,6 +132,9 @@ public ApparentEnergy(double numericValue, ApparentEnergyUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public ApparentEnergy(double numericValue, ApparentEnergyUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/ApparentPower.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ApparentPower.NetFramework.g.cs index b804184e71..15141ed781 100644 --- a/UnitsNet/GeneratedCode/Quantities/ApparentPower.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ApparentPower.NetFramework.g.cs @@ -132,6 +132,9 @@ public ApparentPower(double numericValue, ApparentPowerUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public ApparentPower(double numericValue, ApparentPowerUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/Area.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Area.NetFramework.g.cs index 574bc3832a..640710408d 100644 --- a/UnitsNet/GeneratedCode/Quantities/Area.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Area.NetFramework.g.cs @@ -132,6 +132,9 @@ public Area(double numericValue, AreaUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public Area(double numericValue, AreaUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/AreaDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaDensity.NetFramework.g.cs index 8d4a5ab764..30a62aa818 100644 --- a/UnitsNet/GeneratedCode/Quantities/AreaDensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AreaDensity.NetFramework.g.cs @@ -132,6 +132,9 @@ public AreaDensity(double numericValue, AreaDensityUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public AreaDensity(double numericValue, AreaDensityUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.NetFramework.g.cs index d34c2a9682..76416d89a6 100644 --- a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.NetFramework.g.cs @@ -132,6 +132,9 @@ public AreaMomentOfInertia(double numericValue, AreaMomentOfInertiaUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public AreaMomentOfInertia(double numericValue, AreaMomentOfInertiaUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/BitRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/BitRate.NetFramework.g.cs index 122aa9a348..1a2d0142ce 100644 --- a/UnitsNet/GeneratedCode/Quantities/BitRate.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/BitRate.NetFramework.g.cs @@ -135,6 +135,9 @@ public BitRate(decimal numericValue, BitRateUnit unit) /// public decimal Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -142,6 +145,7 @@ public BitRate(decimal numericValue, BitRateUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.NetFramework.g.cs index 011acec025..d29de10dae 100644 --- a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.NetFramework.g.cs @@ -132,6 +132,9 @@ public BrakeSpecificFuelConsumption(double numericValue, BrakeSpecificFuelConsum /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public BrakeSpecificFuelConsumption(double numericValue, BrakeSpecificFuelConsum public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/Capacitance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Capacitance.NetFramework.g.cs index 90e55d9870..78c09a36de 100644 --- a/UnitsNet/GeneratedCode/Quantities/Capacitance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Capacitance.NetFramework.g.cs @@ -135,6 +135,9 @@ public Capacitance(double numericValue, CapacitanceUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -142,6 +145,7 @@ public Capacitance(double numericValue, CapacitanceUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.NetFramework.g.cs index 99658c0425..d453f51075 100644 --- a/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.NetFramework.g.cs @@ -132,6 +132,9 @@ public CoefficientOfThermalExpansion(double numericValue, CoefficientOfThermalEx /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public CoefficientOfThermalExpansion(double numericValue, CoefficientOfThermalEx public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/Density.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Density.NetFramework.g.cs index aed29bd365..a339a56409 100644 --- a/UnitsNet/GeneratedCode/Quantities/Density.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Density.NetFramework.g.cs @@ -135,6 +135,9 @@ public Density(double numericValue, DensityUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -142,6 +145,7 @@ public Density(double numericValue, DensityUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/Duration.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Duration.NetFramework.g.cs index 0a54910359..c036f61726 100644 --- a/UnitsNet/GeneratedCode/Quantities/Duration.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Duration.NetFramework.g.cs @@ -132,6 +132,9 @@ public Duration(double numericValue, DurationUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public Duration(double numericValue, DurationUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.NetFramework.g.cs index 1042fef2e1..eca7bd5eb5 100644 --- a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.NetFramework.g.cs @@ -135,6 +135,9 @@ public DynamicViscosity(double numericValue, DynamicViscosityUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -142,6 +145,7 @@ public DynamicViscosity(double numericValue, DynamicViscosityUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.NetFramework.g.cs index fa527ea83f..7a616e5826 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.NetFramework.g.cs @@ -132,6 +132,9 @@ public ElectricAdmittance(double numericValue, ElectricAdmittanceUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public ElectricAdmittance(double numericValue, ElectricAdmittanceUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.NetFramework.g.cs index a53d2b3427..cb4b59f11f 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.NetFramework.g.cs @@ -135,6 +135,9 @@ public ElectricCharge(double numericValue, ElectricChargeUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -142,6 +145,7 @@ public ElectricCharge(double numericValue, ElectricChargeUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.NetFramework.g.cs index 672b671cb8..8d504424f7 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.NetFramework.g.cs @@ -135,6 +135,9 @@ public ElectricChargeDensity(double numericValue, ElectricChargeDensityUnit unit /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -142,6 +145,7 @@ public ElectricChargeDensity(double numericValue, ElectricChargeDensityUnit unit public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricConductance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricConductance.NetFramework.g.cs index f75fb8303c..5385a89882 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricConductance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductance.NetFramework.g.cs @@ -135,6 +135,9 @@ public ElectricConductance(double numericValue, ElectricConductanceUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -142,6 +145,7 @@ public ElectricConductance(double numericValue, ElectricConductanceUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.NetFramework.g.cs index a9605f532b..3c78090e09 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.NetFramework.g.cs @@ -135,6 +135,9 @@ public ElectricConductivity(double numericValue, ElectricConductivityUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -142,6 +145,7 @@ public ElectricConductivity(double numericValue, ElectricConductivityUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.NetFramework.g.cs index 808c34f581..3cee65c54b 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.NetFramework.g.cs @@ -132,6 +132,9 @@ public ElectricCurrent(double numericValue, ElectricCurrentUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public ElectricCurrent(double numericValue, ElectricCurrentUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.NetFramework.g.cs index 0eddafe775..95b7c8b29a 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.NetFramework.g.cs @@ -135,6 +135,9 @@ public ElectricCurrentDensity(double numericValue, ElectricCurrentDensityUnit un /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -142,6 +145,7 @@ public ElectricCurrentDensity(double numericValue, ElectricCurrentDensityUnit un public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.NetFramework.g.cs index d7124642f0..5029fbc097 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.NetFramework.g.cs @@ -132,6 +132,9 @@ public ElectricCurrentGradient(double numericValue, ElectricCurrentGradientUnit /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public ElectricCurrentGradient(double numericValue, ElectricCurrentGradientUnit public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricField.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricField.NetFramework.g.cs index 26e98126fb..f840bd059c 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricField.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricField.NetFramework.g.cs @@ -135,6 +135,9 @@ public ElectricField(double numericValue, ElectricFieldUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -142,6 +145,7 @@ public ElectricField(double numericValue, ElectricFieldUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricInductance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricInductance.NetFramework.g.cs index 6f527ed600..3a0c65aaee 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricInductance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricInductance.NetFramework.g.cs @@ -135,6 +135,9 @@ public ElectricInductance(double numericValue, ElectricInductanceUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -142,6 +145,7 @@ public ElectricInductance(double numericValue, ElectricInductanceUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.NetFramework.g.cs index 800ff99993..dce322ff62 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.NetFramework.g.cs @@ -132,6 +132,9 @@ public ElectricPotential(double numericValue, ElectricPotentialUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public ElectricPotential(double numericValue, ElectricPotentialUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.NetFramework.g.cs index b9ce97320a..44ea05d6d8 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.NetFramework.g.cs @@ -132,6 +132,9 @@ public ElectricPotentialAc(double numericValue, ElectricPotentialAcUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public ElectricPotentialAc(double numericValue, ElectricPotentialAcUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.NetFramework.g.cs index 9df6fd07aa..546927f34f 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.NetFramework.g.cs @@ -132,6 +132,9 @@ public ElectricPotentialDc(double numericValue, ElectricPotentialDcUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public ElectricPotentialDc(double numericValue, ElectricPotentialDcUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.NetFramework.g.cs index 672305734b..1ade45134d 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.NetFramework.g.cs @@ -132,6 +132,9 @@ public ElectricResistance(double numericValue, ElectricResistanceUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public ElectricResistance(double numericValue, ElectricResistanceUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.NetFramework.g.cs index 45df4ce159..83af49e1f5 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.NetFramework.g.cs @@ -135,6 +135,9 @@ public ElectricResistivity(double numericValue, ElectricResistivityUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -142,6 +145,7 @@ public ElectricResistivity(double numericValue, ElectricResistivityUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/Energy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Energy.NetFramework.g.cs index 802df1996a..00b228efba 100644 --- a/UnitsNet/GeneratedCode/Quantities/Energy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Energy.NetFramework.g.cs @@ -132,6 +132,9 @@ public Energy(double numericValue, EnergyUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public Energy(double numericValue, EnergyUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/Entropy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Entropy.NetFramework.g.cs index e8c5ed0df5..d935706da4 100644 --- a/UnitsNet/GeneratedCode/Quantities/Entropy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Entropy.NetFramework.g.cs @@ -132,6 +132,9 @@ public Entropy(double numericValue, EntropyUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public Entropy(double numericValue, EntropyUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/Force.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Force.NetFramework.g.cs index 6786854fe5..3db6a29d7b 100644 --- a/UnitsNet/GeneratedCode/Quantities/Force.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Force.NetFramework.g.cs @@ -132,6 +132,9 @@ public Force(double numericValue, ForceUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public Force(double numericValue, ForceUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.NetFramework.g.cs index 938d5e2125..06bf7726d1 100644 --- a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.NetFramework.g.cs @@ -132,6 +132,9 @@ public ForceChangeRate(double numericValue, ForceChangeRateUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public ForceChangeRate(double numericValue, ForceChangeRateUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.NetFramework.g.cs index f2b7060048..97d6c4d6d3 100644 --- a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.NetFramework.g.cs @@ -132,6 +132,9 @@ public ForcePerLength(double numericValue, ForcePerLengthUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public ForcePerLength(double numericValue, ForcePerLengthUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/Frequency.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Frequency.NetFramework.g.cs index bf46c08a72..705c777249 100644 --- a/UnitsNet/GeneratedCode/Quantities/Frequency.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Frequency.NetFramework.g.cs @@ -132,6 +132,9 @@ public Frequency(double numericValue, FrequencyUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public Frequency(double numericValue, FrequencyUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/HeatFlux.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatFlux.NetFramework.g.cs index ed80fdc39a..08115fe8d0 100644 --- a/UnitsNet/GeneratedCode/Quantities/HeatFlux.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/HeatFlux.NetFramework.g.cs @@ -132,6 +132,9 @@ public HeatFlux(double numericValue, HeatFluxUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public HeatFlux(double numericValue, HeatFluxUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.NetFramework.g.cs index 2c2a4e61fd..d115d362b2 100644 --- a/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.NetFramework.g.cs @@ -132,6 +132,9 @@ public HeatTransferCoefficient(double numericValue, HeatTransferCoefficientUnit /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public HeatTransferCoefficient(double numericValue, HeatTransferCoefficientUnit public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/Illuminance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Illuminance.NetFramework.g.cs index ff2735d9f8..7a5b022742 100644 --- a/UnitsNet/GeneratedCode/Quantities/Illuminance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Illuminance.NetFramework.g.cs @@ -135,6 +135,9 @@ public Illuminance(double numericValue, IlluminanceUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -142,6 +145,7 @@ public Illuminance(double numericValue, IlluminanceUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/Information.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Information.NetFramework.g.cs index 9e81003d00..93c6052602 100644 --- a/UnitsNet/GeneratedCode/Quantities/Information.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Information.NetFramework.g.cs @@ -132,6 +132,9 @@ public Information(decimal numericValue, InformationUnit unit) /// public decimal Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public Information(decimal numericValue, InformationUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/Irradiance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Irradiance.NetFramework.g.cs index add7a85666..c3ab0cef4a 100644 --- a/UnitsNet/GeneratedCode/Quantities/Irradiance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Irradiance.NetFramework.g.cs @@ -132,6 +132,9 @@ public Irradiance(double numericValue, IrradianceUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public Irradiance(double numericValue, IrradianceUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/Irradiation.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Irradiation.NetFramework.g.cs index 99177a5f33..58f5bcd9b9 100644 --- a/UnitsNet/GeneratedCode/Quantities/Irradiation.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Irradiation.NetFramework.g.cs @@ -135,6 +135,9 @@ public Irradiation(double numericValue, IrradiationUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -142,6 +145,7 @@ public Irradiation(double numericValue, IrradiationUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.NetFramework.g.cs index 4ad33c9050..68ee3b490a 100644 --- a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.NetFramework.g.cs @@ -135,6 +135,9 @@ public KinematicViscosity(double numericValue, KinematicViscosityUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -142,6 +145,7 @@ public KinematicViscosity(double numericValue, KinematicViscosityUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/LapseRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/LapseRate.NetFramework.g.cs index bcf33d4d08..29e86cd2fe 100644 --- a/UnitsNet/GeneratedCode/Quantities/LapseRate.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LapseRate.NetFramework.g.cs @@ -132,6 +132,9 @@ public LapseRate(double numericValue, LapseRateUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public LapseRate(double numericValue, LapseRateUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/Length.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Length.NetFramework.g.cs index 75c4ded8f1..01b5503c8e 100644 --- a/UnitsNet/GeneratedCode/Quantities/Length.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Length.NetFramework.g.cs @@ -132,6 +132,9 @@ public Length(double numericValue, LengthUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public Length(double numericValue, LengthUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/Level.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Level.NetFramework.g.cs index 8cba41adca..6df7a092ca 100644 --- a/UnitsNet/GeneratedCode/Quantities/Level.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Level.NetFramework.g.cs @@ -132,6 +132,9 @@ public Level(double numericValue, LevelUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public Level(double numericValue, LevelUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/LinearDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/LinearDensity.NetFramework.g.cs index 0581eb65fa..5c5a8db201 100644 --- a/UnitsNet/GeneratedCode/Quantities/LinearDensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LinearDensity.NetFramework.g.cs @@ -135,6 +135,9 @@ public LinearDensity(double numericValue, LinearDensityUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -142,6 +145,7 @@ public LinearDensity(double numericValue, LinearDensityUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/LuminousFlux.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/LuminousFlux.NetFramework.g.cs index d354a090d9..84ab41b25f 100644 --- a/UnitsNet/GeneratedCode/Quantities/LuminousFlux.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LuminousFlux.NetFramework.g.cs @@ -135,6 +135,9 @@ public LuminousFlux(double numericValue, LuminousFluxUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -142,6 +145,7 @@ public LuminousFlux(double numericValue, LuminousFluxUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.NetFramework.g.cs index c863d70cc0..0ec506ed85 100644 --- a/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.NetFramework.g.cs @@ -135,6 +135,9 @@ public LuminousIntensity(double numericValue, LuminousIntensityUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -142,6 +145,7 @@ public LuminousIntensity(double numericValue, LuminousIntensityUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/MagneticField.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MagneticField.NetFramework.g.cs index 50b8e33dd3..e00b561fa1 100644 --- a/UnitsNet/GeneratedCode/Quantities/MagneticField.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MagneticField.NetFramework.g.cs @@ -135,6 +135,9 @@ public MagneticField(double numericValue, MagneticFieldUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -142,6 +145,7 @@ public MagneticField(double numericValue, MagneticFieldUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/MagneticFlux.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MagneticFlux.NetFramework.g.cs index 8d1833ca3f..57f4768d5c 100644 --- a/UnitsNet/GeneratedCode/Quantities/MagneticFlux.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MagneticFlux.NetFramework.g.cs @@ -135,6 +135,9 @@ public MagneticFlux(double numericValue, MagneticFluxUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -142,6 +145,7 @@ public MagneticFlux(double numericValue, MagneticFluxUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/Magnetization.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Magnetization.NetFramework.g.cs index 2843e6e5ef..9a50cb6aca 100644 --- a/UnitsNet/GeneratedCode/Quantities/Magnetization.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Magnetization.NetFramework.g.cs @@ -135,6 +135,9 @@ public Magnetization(double numericValue, MagnetizationUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -142,6 +145,7 @@ public Magnetization(double numericValue, MagnetizationUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/Mass.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Mass.NetFramework.g.cs index 2069bd1226..3e8fced32c 100644 --- a/UnitsNet/GeneratedCode/Quantities/Mass.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Mass.NetFramework.g.cs @@ -132,6 +132,9 @@ public Mass(double numericValue, MassUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public Mass(double numericValue, MassUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/MassFlow.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFlow.NetFramework.g.cs index 7cdd626bde..6f138a300e 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFlow.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFlow.NetFramework.g.cs @@ -132,6 +132,9 @@ public MassFlow(double numericValue, MassFlowUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public MassFlow(double numericValue, MassFlowUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/MassFlux.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFlux.NetFramework.g.cs index 9e500d4554..48dc3b3355 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFlux.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFlux.NetFramework.g.cs @@ -132,6 +132,9 @@ public MassFlux(double numericValue, MassFluxUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public MassFlux(double numericValue, MassFluxUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.NetFramework.g.cs index fa882d1174..775f054e6d 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.NetFramework.g.cs @@ -132,6 +132,9 @@ public MassMomentOfInertia(double numericValue, MassMomentOfInertiaUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public MassMomentOfInertia(double numericValue, MassMomentOfInertiaUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/MolarEnergy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarEnergy.NetFramework.g.cs index a73844a770..5e3759ff41 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarEnergy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarEnergy.NetFramework.g.cs @@ -132,6 +132,9 @@ public MolarEnergy(double numericValue, MolarEnergyUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public MolarEnergy(double numericValue, MolarEnergyUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/MolarEntropy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarEntropy.NetFramework.g.cs index 821da5a4d2..afe4050a9d 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarEntropy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarEntropy.NetFramework.g.cs @@ -132,6 +132,9 @@ public MolarEntropy(double numericValue, MolarEntropyUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public MolarEntropy(double numericValue, MolarEntropyUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/MolarMass.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarMass.NetFramework.g.cs index 8282356661..bee2782b73 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarMass.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarMass.NetFramework.g.cs @@ -132,6 +132,9 @@ public MolarMass(double numericValue, MolarMassUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public MolarMass(double numericValue, MolarMassUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/Molarity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Molarity.NetFramework.g.cs index ae00952f3e..918011e751 100644 --- a/UnitsNet/GeneratedCode/Quantities/Molarity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Molarity.NetFramework.g.cs @@ -135,6 +135,9 @@ public Molarity(double numericValue, MolarityUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -142,6 +145,7 @@ public Molarity(double numericValue, MolarityUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/Permeability.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Permeability.NetFramework.g.cs index 04a1dac510..0321154550 100644 --- a/UnitsNet/GeneratedCode/Quantities/Permeability.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Permeability.NetFramework.g.cs @@ -135,6 +135,9 @@ public Permeability(double numericValue, PermeabilityUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -142,6 +145,7 @@ public Permeability(double numericValue, PermeabilityUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/Permittivity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Permittivity.NetFramework.g.cs index 14e9cef33b..32c2843e0b 100644 --- a/UnitsNet/GeneratedCode/Quantities/Permittivity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Permittivity.NetFramework.g.cs @@ -135,6 +135,9 @@ public Permittivity(double numericValue, PermittivityUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -142,6 +145,7 @@ public Permittivity(double numericValue, PermittivityUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/Power.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Power.NetFramework.g.cs index c94ce83845..426d220b85 100644 --- a/UnitsNet/GeneratedCode/Quantities/Power.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Power.NetFramework.g.cs @@ -132,6 +132,9 @@ public Power(decimal numericValue, PowerUnit unit) /// public decimal Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public Power(decimal numericValue, PowerUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/PowerDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/PowerDensity.NetFramework.g.cs index e05f0fa0af..9ca7616e1e 100644 --- a/UnitsNet/GeneratedCode/Quantities/PowerDensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PowerDensity.NetFramework.g.cs @@ -132,6 +132,9 @@ public PowerDensity(double numericValue, PowerDensityUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public PowerDensity(double numericValue, PowerDensityUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/PowerRatio.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/PowerRatio.NetFramework.g.cs index fd2d6965fc..a7efeff4b9 100644 --- a/UnitsNet/GeneratedCode/Quantities/PowerRatio.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PowerRatio.NetFramework.g.cs @@ -132,6 +132,9 @@ public PowerRatio(double numericValue, PowerRatioUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public PowerRatio(double numericValue, PowerRatioUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/Pressure.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Pressure.NetFramework.g.cs index 6b2b295bb2..819cbae23c 100644 --- a/UnitsNet/GeneratedCode/Quantities/Pressure.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Pressure.NetFramework.g.cs @@ -132,6 +132,9 @@ public Pressure(double numericValue, PressureUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public Pressure(double numericValue, PressureUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.NetFramework.g.cs index 02fa838f29..a0abe4af27 100644 --- a/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.NetFramework.g.cs @@ -132,6 +132,9 @@ public PressureChangeRate(double numericValue, PressureChangeRateUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public PressureChangeRate(double numericValue, PressureChangeRateUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/Ratio.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Ratio.NetFramework.g.cs index ce639179a4..5f33c5fbd5 100644 --- a/UnitsNet/GeneratedCode/Quantities/Ratio.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Ratio.NetFramework.g.cs @@ -132,6 +132,9 @@ public Ratio(double numericValue, RatioUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public Ratio(double numericValue, RatioUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.NetFramework.g.cs index 2b217397cb..e940fad26c 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.NetFramework.g.cs @@ -132,6 +132,9 @@ public ReactiveEnergy(double numericValue, ReactiveEnergyUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public ReactiveEnergy(double numericValue, ReactiveEnergyUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/ReactivePower.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ReactivePower.NetFramework.g.cs index 5053bb1765..5c200bd57a 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReactivePower.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReactivePower.NetFramework.g.cs @@ -132,6 +132,9 @@ public ReactivePower(double numericValue, ReactivePowerUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public ReactivePower(double numericValue, ReactivePowerUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.NetFramework.g.cs index 501b43e599..a3a9a32cb6 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.NetFramework.g.cs @@ -132,6 +132,9 @@ public RotationalAcceleration(double numericValue, RotationalAccelerationUnit un /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public RotationalAcceleration(double numericValue, RotationalAccelerationUnit un public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.NetFramework.g.cs index 577c347f6d..af863246f5 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.NetFramework.g.cs @@ -132,6 +132,9 @@ public RotationalSpeed(double numericValue, RotationalSpeedUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public RotationalSpeed(double numericValue, RotationalSpeedUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.NetFramework.g.cs index 199edf27a1..bbcc009068 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.NetFramework.g.cs @@ -132,6 +132,9 @@ public RotationalStiffness(double numericValue, RotationalStiffnessUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public RotationalStiffness(double numericValue, RotationalStiffnessUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.NetFramework.g.cs index aca37525b8..b4a9256e45 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.NetFramework.g.cs @@ -132,6 +132,9 @@ public RotationalStiffnessPerLength(double numericValue, RotationalStiffnessPerL /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public RotationalStiffnessPerLength(double numericValue, RotationalStiffnessPerL public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/SolidAngle.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/SolidAngle.NetFramework.g.cs index 70e2188088..71b605d956 100644 --- a/UnitsNet/GeneratedCode/Quantities/SolidAngle.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SolidAngle.NetFramework.g.cs @@ -135,6 +135,9 @@ public SolidAngle(double numericValue, SolidAngleUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -142,6 +145,7 @@ public SolidAngle(double numericValue, SolidAngleUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.NetFramework.g.cs index 88558d69ad..2bb673bf75 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.NetFramework.g.cs @@ -135,6 +135,9 @@ public SpecificEnergy(double numericValue, SpecificEnergyUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -142,6 +145,7 @@ public SpecificEnergy(double numericValue, SpecificEnergyUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.NetFramework.g.cs index 5e7528ec7f..01b8338fa5 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.NetFramework.g.cs @@ -132,6 +132,9 @@ public SpecificEntropy(double numericValue, SpecificEntropyUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public SpecificEntropy(double numericValue, SpecificEntropyUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificVolume.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificVolume.NetFramework.g.cs index c8f4c59ccd..a2f0f2784a 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificVolume.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificVolume.NetFramework.g.cs @@ -132,6 +132,9 @@ public SpecificVolume(double numericValue, SpecificVolumeUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public SpecificVolume(double numericValue, SpecificVolumeUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificWeight.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificWeight.NetFramework.g.cs index 8476c489d4..dd8ca5f15b 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificWeight.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificWeight.NetFramework.g.cs @@ -135,6 +135,9 @@ public SpecificWeight(double numericValue, SpecificWeightUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -142,6 +145,7 @@ public SpecificWeight(double numericValue, SpecificWeightUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/Speed.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Speed.NetFramework.g.cs index 0887505929..80ab533db3 100644 --- a/UnitsNet/GeneratedCode/Quantities/Speed.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Speed.NetFramework.g.cs @@ -132,6 +132,9 @@ public Speed(double numericValue, SpeedUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public Speed(double numericValue, SpeedUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/Temperature.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Temperature.NetFramework.g.cs index b8778e21c6..d30449f131 100644 --- a/UnitsNet/GeneratedCode/Quantities/Temperature.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Temperature.NetFramework.g.cs @@ -132,6 +132,9 @@ public Temperature(double numericValue, TemperatureUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public Temperature(double numericValue, TemperatureUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.NetFramework.g.cs index 06964f85a2..d69ec40bf3 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.NetFramework.g.cs @@ -132,6 +132,9 @@ public TemperatureChangeRate(double numericValue, TemperatureChangeRateUnit unit /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public TemperatureChangeRate(double numericValue, TemperatureChangeRateUnit unit public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.NetFramework.g.cs index c3e9d12c83..9adcf7ed0c 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.NetFramework.g.cs @@ -132,6 +132,9 @@ public TemperatureDelta(double numericValue, TemperatureDeltaUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public TemperatureDelta(double numericValue, TemperatureDeltaUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.NetFramework.g.cs index e30ab44513..b138887f40 100644 --- a/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.NetFramework.g.cs @@ -135,6 +135,9 @@ public ThermalConductivity(double numericValue, ThermalConductivityUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -142,6 +145,7 @@ public ThermalConductivity(double numericValue, ThermalConductivityUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/ThermalResistance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ThermalResistance.NetFramework.g.cs index 9f095141b3..8352a9476b 100644 --- a/UnitsNet/GeneratedCode/Quantities/ThermalResistance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ThermalResistance.NetFramework.g.cs @@ -132,6 +132,9 @@ public ThermalResistance(double numericValue, ThermalResistanceUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public ThermalResistance(double numericValue, ThermalResistanceUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/Torque.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Torque.NetFramework.g.cs index 2091a0c1e7..6ebe666abd 100644 --- a/UnitsNet/GeneratedCode/Quantities/Torque.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Torque.NetFramework.g.cs @@ -132,6 +132,9 @@ public Torque(double numericValue, TorqueUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public Torque(double numericValue, TorqueUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/VitaminA.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/VitaminA.NetFramework.g.cs index 57546b46f9..25a8d5de2b 100644 --- a/UnitsNet/GeneratedCode/Quantities/VitaminA.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VitaminA.NetFramework.g.cs @@ -132,6 +132,9 @@ public VitaminA(double numericValue, VitaminAUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public VitaminA(double numericValue, VitaminAUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/Volume.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Volume.NetFramework.g.cs index 75de363eb9..524a7162ba 100644 --- a/UnitsNet/GeneratedCode/Quantities/Volume.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Volume.NetFramework.g.cs @@ -132,6 +132,9 @@ public Volume(double numericValue, VolumeUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public Volume(double numericValue, VolumeUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/GeneratedCode/Quantities/VolumeFlow.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumeFlow.NetFramework.g.cs index 5d75300c61..e90b5426b2 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumeFlow.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumeFlow.NetFramework.g.cs @@ -132,6 +132,9 @@ public VolumeFlow(double numericValue, VolumeFlowUnit unit) /// public double Value => _value; + /// + Enum IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -139,6 +142,7 @@ public VolumeFlow(double numericValue, VolumeFlowUnit unit) public QuantityInfo QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; /// diff --git a/UnitsNet/IQuantity.cs b/UnitsNet/IQuantity.cs index d491bf5b0b..dcb6cdf144 100644 --- a/UnitsNet/IQuantity.cs +++ b/UnitsNet/IQuantity.cs @@ -59,6 +59,16 @@ public partial interface IQuantity double As(Enum unit); #endif + /// + /// The unit this quantity was constructed with or the BaseUnit if the default constructor was used. + /// + +#if WINDOWS_UWP + object Unit { get; } +#else + Enum Unit { get; } +#endif + #if !WINDOWS_UWP /// /// Change the default unit representation of the quantity, which affects things like . @@ -138,10 +148,8 @@ public interface IQuantity : IQuantity where TUnitType : Enum /// Value converted to the specified unit. double As(TUnitType unit); - /// - /// The unit this quantity was constructed with or the BaseUnit if the default constructor was used. - /// - TUnitType Unit { get; } + /// + new TUnitType Unit { get; } /// new QuantityInfo QuantityInfo { get; } diff --git a/UnitsNet/Scripts/Include-GenerateQuantitySourceCode.ps1 b/UnitsNet/Scripts/Include-GenerateQuantitySourceCode.ps1 index fe4a584805..b609ed7fd6 100644 --- a/UnitsNet/Scripts/Include-GenerateQuantitySourceCode.ps1 +++ b/UnitsNet/Scripts/Include-GenerateQuantitySourceCode.ps1 @@ -345,6 +345,9 @@ function GenerateProperties([GeneratorArgs]$genArgs) "@; } @" + /// + $enumOrObject IQuantity.Unit => Unit; + /// /// The unit this quantity was constructed with -or- if default ctor was used. /// @@ -355,6 +358,7 @@ function GenerateProperties([GeneratorArgs]$genArgs) "@; } else {@" public QuantityInfo<$unitEnumName> QuantityInfo => Info; + /// QuantityInfo IQuantity.QuantityInfo => Info; "@; }@"