From 2b9d29fc49c6f95f89b8071bfb704ab671b9d8f6 Mon Sep 17 00:00:00 2001 From: Tristan Milnthorp Date: Tue, 21 Feb 2023 10:54:34 -0500 Subject: [PATCH 01/26] Generate restext files for resource management --- CodeGen/Generators/UnitsNetGenerator.cs | 42 +++++++++++++ .../Resources/Acceleration.restext | 14 +++++ .../Resources/Acceleration.ru-RU.restext | 14 +++++ .../Resources/AmountOfSubstance.restext | 15 +++++ .../Resources/AmplitudeRatio.restext | 4 ++ .../GeneratedCode/Resources/Angle.restext | 16 +++++ .../Resources/Angle.ru-RU.restext | 12 ++++ .../Resources/ApparentEnergy.restext | 3 + .../Resources/ApparentPower.restext | 6 ++ UnitsNet/GeneratedCode/Resources/Area.restext | 14 +++++ .../Resources/Area.ru-RU.restext | 14 +++++ .../Resources/Area.zh-CN.restext | 13 ++++ .../Resources/AreaDensity.restext | 3 + .../Resources/AreaMomentOfInertia.restext | 6 ++ .../GeneratedCode/Resources/BitRate.restext | 26 ++++++++ .../BrakeSpecificFuelConsumption.restext | 3 + .../Resources/Capacitance.restext | 7 +++ .../CoefficientOfThermalExpansion.restext | 3 + .../Resources/Compressibility.restext | 7 +++ .../GeneratedCode/Resources/Density.restext | 51 +++++++++++++++ .../Resources/Density.ru-RU.restext | 4 ++ .../GeneratedCode/Resources/Duration.restext | 11 ++++ .../Resources/Duration.ru-RU.restext | 10 +++ .../Resources/DynamicViscosity.restext | 10 +++ .../Resources/ElectricAdmittance.restext | 4 ++ .../Resources/ElectricCharge.restext | 11 ++++ .../Resources/ElectricChargeDensity.restext | 1 + .../Resources/ElectricConductance.restext | 5 ++ .../Resources/ElectricConductivity.restext | 6 ++ .../Resources/ElectricCurrent.restext | 9 +++ .../Resources/ElectricCurrentDensity.restext | 3 + .../Resources/ElectricCurrentGradient.restext | 4 ++ .../Resources/ElectricField.restext | 1 + .../Resources/ElectricInductance.restext | 5 ++ .../Resources/ElectricPotential.restext | 6 ++ .../Resources/ElectricPotential.ru-RU.restext | 6 ++ .../Resources/ElectricPotentialAc.restext | 5 ++ .../ElectricPotentialChangeRate.restext | 20 ++++++ .../Resources/ElectricPotentialDc.restext | 5 ++ .../Resources/ElectricResistance.restext | 7 +++ .../Resources/ElectricResistivity.restext | 14 +++++ .../ElectricSurfaceChargeDensity.restext | 3 + .../GeneratedCode/Resources/Energy.restext | 38 ++++++++++++ .../Resources/Energy.ru-RU.restext | 21 +++++++ .../Resources/EnergyDensity.restext | 12 ++++ .../GeneratedCode/Resources/Entropy.restext | 7 +++ .../GeneratedCode/Resources/Force.restext | 15 +++++ .../Resources/Force.ru-RU.restext | 13 ++++ .../Resources/ForceChangeRate.restext | 15 +++++ .../Resources/ForcePerLength.restext | 38 ++++++++++++ .../Resources/ForcePerLength.ru-RU.restext | 6 ++ .../GeneratedCode/Resources/Frequency.restext | 13 ++++ .../Resources/Frequency.ru-RU.restext | 9 +++ .../Resources/FuelEfficiency.restext | 4 ++ .../GeneratedCode/Resources/HeatFlux.restext | 18 ++++++ .../Resources/HeatTransferCoefficient.restext | 6 ++ .../Resources/Illuminance.restext | 4 ++ .../GeneratedCode/Resources/Impulse.restext | 13 ++++ .../Resources/Information.restext | 26 ++++++++ .../Resources/Irradiance.restext | 14 +++++ .../Resources/Irradiation.restext | 7 +++ UnitsNet/GeneratedCode/Resources/Jerk.restext | 11 ++++ .../Resources/Jerk.ru-RU.restext | 11 ++++ .../Resources/KinematicViscosity.restext | 9 +++ .../KinematicViscosity.ru-RU.restext | 8 +++ .../GeneratedCode/Resources/Length.restext | 36 +++++++++++ .../Resources/Length.ru-RU.restext | 16 +++++ .../Resources/Length.zh-CN.restext | 16 +++++ .../GeneratedCode/Resources/Level.restext | 2 + .../Resources/LinearDensity.restext | 14 +++++ .../Resources/LinearPowerDensity.restext | 25 ++++++++ .../GeneratedCode/Resources/Luminance.restext | 10 +++ .../Resources/Luminosity.restext | 14 +++++ .../Resources/LuminousFlux.restext | 1 + .../Resources/LuminousIntensity.restext | 1 + .../Resources/MagneticField.restext | 6 ++ .../Resources/MagneticFlux.restext | 1 + .../Resources/Magnetization.restext | 1 + UnitsNet/GeneratedCode/Resources/Mass.restext | 25 ++++++++ .../Resources/Mass.ru-RU.restext | 17 +++++ .../Resources/Mass.zh-CN.restext | 18 ++++++ .../Resources/MassConcentration.restext | 49 +++++++++++++++ .../Resources/MassConcentration.ru-RU.restext | 4 ++ .../GeneratedCode/Resources/MassFlow.restext | 33 ++++++++++ .../Resources/MassFlow.ru-RU.restext | 2 + .../GeneratedCode/Resources/MassFlux.restext | 12 ++++ .../Resources/MassFraction.restext | 24 +++++++ .../Resources/MassMomentOfInertia.restext | 28 +++++++++ .../Resources/MolarEnergy.restext | 3 + .../Resources/MolarEntropy.restext | 3 + .../GeneratedCode/Resources/MolarFlow.restext | 9 +++ .../GeneratedCode/Resources/MolarMass.restext | 13 ++++ .../Resources/MolarMass.ru-RU.restext | 12 ++++ .../GeneratedCode/Resources/Molarity.restext | 11 ++++ .../Resources/Permeability.restext | 1 + .../Resources/Permittivity.restext | 1 + .../PorousMediumPermeability.restext | 5 ++ .../GeneratedCode/Resources/Power.restext | 26 ++++++++ .../Resources/PowerDensity.restext | 44 +++++++++++++ .../Resources/PowerRatio.restext | 2 + .../GeneratedCode/Resources/Pressure.restext | 47 ++++++++++++++ .../Resources/Pressure.ru-RU.restext | 31 ++++++++++ .../Resources/PressureChangeRate.restext | 14 +++++ .../PressureChangeRate.ru-RU.restext | 14 +++++ .../GeneratedCode/Resources/Ratio.restext | 6 ++ .../Resources/RatioChangeRate.restext | 2 + .../Resources/ReactiveEnergy.restext | 3 + .../Resources/ReactivePower.restext | 4 ++ .../Resources/ReciprocalArea.restext | 11 ++++ .../Resources/ReciprocalLength.restext | 10 +++ .../Resources/RelativeHumidity.restext | 1 + .../Resources/RotationalAcceleration.restext | 4 ++ .../Resources/RotationalSpeed.restext | 13 ++++ .../Resources/RotationalSpeed.ru-RU.restext | 12 ++++ .../Resources/RotationalStiffness.restext | 33 ++++++++++ .../RotationalStiffnessPerLength.restext | 5 ++ .../GeneratedCode/Resources/Scalar.restext | 1 + .../Resources/SolidAngle.restext | 1 + .../Resources/SpecificEnergy.restext | 30 +++++++++ .../Resources/SpecificEntropy.restext | 9 +++ .../Resources/SpecificFuelConsumption.restext | 4 ++ .../Resources/SpecificVolume.restext | 3 + .../Resources/SpecificWeight.restext | 17 +++++ .../GeneratedCode/Resources/Speed.restext | 33 ++++++++++ .../Resources/Speed.ru-RU.restext | 24 +++++++ .../Resources/StandardVolumeFlow.restext | 9 +++ .../Resources/Temperature.restext | 10 +++ .../Resources/TemperatureChangeRate.restext | 10 +++ .../Resources/TemperatureDelta.restext | 9 +++ .../Resources/TemperatureGradient.restext | 4 ++ .../Resources/ThermalConductivity.restext | 2 + .../Resources/ThermalResistance.restext | 6 ++ .../GeneratedCode/Resources/Torque.restext | 25 ++++++++ .../Resources/Torque.ru-RU.restext | 3 + .../Resources/TorquePerLength.restext | 21 +++++++ .../Resources/TorquePerLength.ru-RU.restext | 3 + .../GeneratedCode/Resources/Turbidity.restext | 1 + .../GeneratedCode/Resources/VitaminA.restext | 1 + .../Resources/Volume.fr-CA.restext | 1 + .../Resources/Volume.nb-NO.restext | 0 .../GeneratedCode/Resources/Volume.restext | 46 ++++++++++++++ .../Resources/Volume.ru-RU.restext | 37 +++++++++++ .../Resources/VolumeConcentration.restext | 20 ++++++ .../Resources/VolumeFlow.restext | 62 +++++++++++++++++++ .../Resources/VolumeFlow.ru-RU.restext | 27 ++++++++ .../Resources/VolumeFlowPerArea.restext | 2 + .../Resources/VolumePerLength.restext | 7 +++ .../Resources/VolumetricHeatCapacity.restext | 9 +++ .../Resources/WarpingMomentOfInertia.restext | 6 ++ UnitsNet/UnitsNet.csproj | 6 +- 150 files changed, 1884 insertions(+), 1 deletion(-) create mode 100644 UnitsNet/GeneratedCode/Resources/Acceleration.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Acceleration.ru-RU.restext create mode 100644 UnitsNet/GeneratedCode/Resources/AmountOfSubstance.restext create mode 100644 UnitsNet/GeneratedCode/Resources/AmplitudeRatio.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Angle.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Angle.ru-RU.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ApparentEnergy.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ApparentPower.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Area.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Area.ru-RU.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Area.zh-CN.restext create mode 100644 UnitsNet/GeneratedCode/Resources/AreaDensity.restext create mode 100644 UnitsNet/GeneratedCode/Resources/AreaMomentOfInertia.restext create mode 100644 UnitsNet/GeneratedCode/Resources/BitRate.restext create mode 100644 UnitsNet/GeneratedCode/Resources/BrakeSpecificFuelConsumption.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Capacitance.restext create mode 100644 UnitsNet/GeneratedCode/Resources/CoefficientOfThermalExpansion.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Compressibility.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Density.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Density.ru-RU.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Duration.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Duration.ru-RU.restext create mode 100644 UnitsNet/GeneratedCode/Resources/DynamicViscosity.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ElectricAdmittance.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ElectricCharge.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ElectricChargeDensity.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ElectricConductance.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ElectricConductivity.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ElectricCurrent.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ElectricCurrentDensity.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ElectricCurrentGradient.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ElectricField.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ElectricInductance.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ElectricPotential.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ElectricPotential.ru-RU.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ElectricPotentialAc.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ElectricPotentialChangeRate.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ElectricPotentialDc.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ElectricResistance.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ElectricResistivity.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ElectricSurfaceChargeDensity.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Energy.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Energy.ru-RU.restext create mode 100644 UnitsNet/GeneratedCode/Resources/EnergyDensity.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Entropy.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Force.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Force.ru-RU.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ForceChangeRate.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ForcePerLength.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ForcePerLength.ru-RU.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Frequency.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Frequency.ru-RU.restext create mode 100644 UnitsNet/GeneratedCode/Resources/FuelEfficiency.restext create mode 100644 UnitsNet/GeneratedCode/Resources/HeatFlux.restext create mode 100644 UnitsNet/GeneratedCode/Resources/HeatTransferCoefficient.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Illuminance.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Impulse.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Information.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Irradiance.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Irradiation.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Jerk.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Jerk.ru-RU.restext create mode 100644 UnitsNet/GeneratedCode/Resources/KinematicViscosity.restext create mode 100644 UnitsNet/GeneratedCode/Resources/KinematicViscosity.ru-RU.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Length.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Length.ru-RU.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Length.zh-CN.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Level.restext create mode 100644 UnitsNet/GeneratedCode/Resources/LinearDensity.restext create mode 100644 UnitsNet/GeneratedCode/Resources/LinearPowerDensity.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Luminance.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Luminosity.restext create mode 100644 UnitsNet/GeneratedCode/Resources/LuminousFlux.restext create mode 100644 UnitsNet/GeneratedCode/Resources/LuminousIntensity.restext create mode 100644 UnitsNet/GeneratedCode/Resources/MagneticField.restext create mode 100644 UnitsNet/GeneratedCode/Resources/MagneticFlux.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Magnetization.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Mass.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Mass.ru-RU.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Mass.zh-CN.restext create mode 100644 UnitsNet/GeneratedCode/Resources/MassConcentration.restext create mode 100644 UnitsNet/GeneratedCode/Resources/MassConcentration.ru-RU.restext create mode 100644 UnitsNet/GeneratedCode/Resources/MassFlow.restext create mode 100644 UnitsNet/GeneratedCode/Resources/MassFlow.ru-RU.restext create mode 100644 UnitsNet/GeneratedCode/Resources/MassFlux.restext create mode 100644 UnitsNet/GeneratedCode/Resources/MassFraction.restext create mode 100644 UnitsNet/GeneratedCode/Resources/MassMomentOfInertia.restext create mode 100644 UnitsNet/GeneratedCode/Resources/MolarEnergy.restext create mode 100644 UnitsNet/GeneratedCode/Resources/MolarEntropy.restext create mode 100644 UnitsNet/GeneratedCode/Resources/MolarFlow.restext create mode 100644 UnitsNet/GeneratedCode/Resources/MolarMass.restext create mode 100644 UnitsNet/GeneratedCode/Resources/MolarMass.ru-RU.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Molarity.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Permeability.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Permittivity.restext create mode 100644 UnitsNet/GeneratedCode/Resources/PorousMediumPermeability.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Power.restext create mode 100644 UnitsNet/GeneratedCode/Resources/PowerDensity.restext create mode 100644 UnitsNet/GeneratedCode/Resources/PowerRatio.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Pressure.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Pressure.ru-RU.restext create mode 100644 UnitsNet/GeneratedCode/Resources/PressureChangeRate.restext create mode 100644 UnitsNet/GeneratedCode/Resources/PressureChangeRate.ru-RU.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Ratio.restext create mode 100644 UnitsNet/GeneratedCode/Resources/RatioChangeRate.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ReactiveEnergy.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ReactivePower.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ReciprocalArea.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ReciprocalLength.restext create mode 100644 UnitsNet/GeneratedCode/Resources/RelativeHumidity.restext create mode 100644 UnitsNet/GeneratedCode/Resources/RotationalAcceleration.restext create mode 100644 UnitsNet/GeneratedCode/Resources/RotationalSpeed.restext create mode 100644 UnitsNet/GeneratedCode/Resources/RotationalSpeed.ru-RU.restext create mode 100644 UnitsNet/GeneratedCode/Resources/RotationalStiffness.restext create mode 100644 UnitsNet/GeneratedCode/Resources/RotationalStiffnessPerLength.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Scalar.restext create mode 100644 UnitsNet/GeneratedCode/Resources/SolidAngle.restext create mode 100644 UnitsNet/GeneratedCode/Resources/SpecificEnergy.restext create mode 100644 UnitsNet/GeneratedCode/Resources/SpecificEntropy.restext create mode 100644 UnitsNet/GeneratedCode/Resources/SpecificFuelConsumption.restext create mode 100644 UnitsNet/GeneratedCode/Resources/SpecificVolume.restext create mode 100644 UnitsNet/GeneratedCode/Resources/SpecificWeight.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Speed.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Speed.ru-RU.restext create mode 100644 UnitsNet/GeneratedCode/Resources/StandardVolumeFlow.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Temperature.restext create mode 100644 UnitsNet/GeneratedCode/Resources/TemperatureChangeRate.restext create mode 100644 UnitsNet/GeneratedCode/Resources/TemperatureDelta.restext create mode 100644 UnitsNet/GeneratedCode/Resources/TemperatureGradient.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ThermalConductivity.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ThermalResistance.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Torque.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Torque.ru-RU.restext create mode 100644 UnitsNet/GeneratedCode/Resources/TorquePerLength.restext create mode 100644 UnitsNet/GeneratedCode/Resources/TorquePerLength.ru-RU.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Turbidity.restext create mode 100644 UnitsNet/GeneratedCode/Resources/VitaminA.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Volume.fr-CA.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Volume.nb-NO.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Volume.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Volume.ru-RU.restext create mode 100644 UnitsNet/GeneratedCode/Resources/VolumeConcentration.restext create mode 100644 UnitsNet/GeneratedCode/Resources/VolumeFlow.restext create mode 100644 UnitsNet/GeneratedCode/Resources/VolumeFlow.ru-RU.restext create mode 100644 UnitsNet/GeneratedCode/Resources/VolumeFlowPerArea.restext create mode 100644 UnitsNet/GeneratedCode/Resources/VolumePerLength.restext create mode 100644 UnitsNet/GeneratedCode/Resources/VolumetricHeatCapacity.restext create mode 100644 UnitsNet/GeneratedCode/Resources/WarpingMomentOfInertia.restext diff --git a/CodeGen/Generators/UnitsNetGenerator.cs b/CodeGen/Generators/UnitsNetGenerator.cs index 4d75e68006..a9aab01360 100644 --- a/CodeGen/Generators/UnitsNetGenerator.cs +++ b/CodeGen/Generators/UnitsNetGenerator.cs @@ -1,6 +1,7 @@ // Licensed under MIT No Attribution, see LICENSE file at the root. // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. +using System.Collections.Generic; using System.IO; using System.Linq; using CodeGen.Generators.UnitsNetGen; @@ -71,6 +72,7 @@ public static void Generate(string rootDir, Quantity[] quantities, QuantityNameT Log.Information(""); GenerateIQuantityTests(quantities, $"{testProjectDir}/GeneratedCode/IQuantityTests.g.cs"); GenerateStaticQuantity(quantities, $"{outputDir}/Quantity.g.cs"); + GenerateResourceFiles(quantities, $"{outputDir}/Resources"); var unitCount = quantities.SelectMany(q => q.Units).Count(); Log.Information(""); @@ -130,5 +132,45 @@ private static void GenerateStaticQuantity(Quantity[] quantities, string filePat File.WriteAllText(filePath, content); Log.Information("✅ Quantity.g.cs"); } + + private static void GenerateResourceFiles(Quantity[] quantities, string resourcesDirectory) + { + foreach(var quantity in quantities) + { + var cultures = new HashSet(); + + foreach(Unit unit in quantity.Units) + { + foreach(Localization localization in unit.Localization) + { + cultures.Add(localization.Culture); + } + } + + foreach(var culture in cultures) + { + var fileName = culture.Equals("en-US", System.StringComparison.InvariantCultureIgnoreCase) ? + $"{resourcesDirectory}/{quantity.Name}.restext" : + $"{resourcesDirectory}/{quantity.Name}.{culture}.restext"; + + using var writer = File.CreateText(fileName); + + foreach(Unit unit in quantity.Units) + { + foreach(Localization localization in unit.Localization) + { + if(localization.Culture == culture) + { + //unitConverter.SetConversionFunction <{ _quantity.Name}> ({ _unitEnumName}.{ _quantity.BaseUnit}, { _quantity.Name} + //Unit.{ unit.SingularName}, quantity => quantity.ToUnit({ _quantity.Name} + //Unit.{ unit.SingularName})); "); + if(localization.Abbreviations.Any()) + writer.WriteLine($"{unit.SingularName} = {localization.Abbreviations.First()}"); + } + } + } + } + } + } } } diff --git a/UnitsNet/GeneratedCode/Resources/Acceleration.restext b/UnitsNet/GeneratedCode/Resources/Acceleration.restext new file mode 100644 index 0000000000..2155ad4f82 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Acceleration.restext @@ -0,0 +1,14 @@ +CentimeterPerSecondSquared = cm/s² +DecimeterPerSecondSquared = dm/s² +FootPerSecondSquared = ft/s² +InchPerSecondSquared = in/s² +KilometerPerSecondSquared = km/s² +KnotPerHour = kn/h +KnotPerMinute = kn/min +KnotPerSecond = kn/s +MeterPerSecondSquared = m/s² +MicrometerPerSecondSquared = µm/s² +MillimeterPerSecondSquared = mm/s² +MillistandardGravity = mg +NanometerPerSecondSquared = nm/s² +StandardGravity = g diff --git a/UnitsNet/GeneratedCode/Resources/Acceleration.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Acceleration.ru-RU.restext new file mode 100644 index 0000000000..d3a8af80bf --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Acceleration.ru-RU.restext @@ -0,0 +1,14 @@ +CentimeterPerSecondSquared = см/с² +DecimeterPerSecondSquared = дм/с² +FootPerSecondSquared = фут/с² +InchPerSecondSquared = дюйм/с² +KilometerPerSecondSquared = км/с² +KnotPerHour = узел/час +KnotPerMinute = узел/мин +KnotPerSecond = узел/с +MeterPerSecondSquared = м/с² +MicrometerPerSecondSquared = мкм/с² +MillimeterPerSecondSquared = мм/с² +MillistandardGravity = мg +NanometerPerSecondSquared = нм/с² +StandardGravity = g diff --git a/UnitsNet/GeneratedCode/Resources/AmountOfSubstance.restext b/UnitsNet/GeneratedCode/Resources/AmountOfSubstance.restext new file mode 100644 index 0000000000..06256d21f2 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/AmountOfSubstance.restext @@ -0,0 +1,15 @@ +Centimole = cmol +CentipoundMole = clbmol +Decimole = dmol +DecipoundMole = dlbmol +Kilomole = kmol +KilopoundMole = klbmol +Megamole = Mmol +Micromole = µmol +MicropoundMole = µlbmol +Millimole = mmol +MillipoundMole = mlbmol +Mole = mol +Nanomole = nmol +NanopoundMole = nlbmol +PoundMole = lbmol diff --git a/UnitsNet/GeneratedCode/Resources/AmplitudeRatio.restext b/UnitsNet/GeneratedCode/Resources/AmplitudeRatio.restext new file mode 100644 index 0000000000..b16458868a --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/AmplitudeRatio.restext @@ -0,0 +1,4 @@ +DecibelMicrovolt = dBµV +DecibelMillivolt = dBmV +DecibelUnloaded = dBu +DecibelVolt = dBV diff --git a/UnitsNet/GeneratedCode/Resources/Angle.restext b/UnitsNet/GeneratedCode/Resources/Angle.restext new file mode 100644 index 0000000000..bd32363389 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Angle.restext @@ -0,0 +1,16 @@ +Arcminute = ' +Arcsecond = ″ +Centiradian = crad +Deciradian = drad +Degree = ° +Gradian = g +Microdegree = µ° +Microradian = µrad +Millidegree = m° +Milliradian = mrad +Nanodegree = n° +Nanoradian = nrad +NatoMil = mil +Radian = rad +Revolution = r +Tilt = sin(θ) diff --git a/UnitsNet/GeneratedCode/Resources/Angle.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Angle.ru-RU.restext new file mode 100644 index 0000000000..8879d724d2 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Angle.ru-RU.restext @@ -0,0 +1,12 @@ +Centiradian = срад +Deciradian = драд +Degree = ° +Gradian = g +Microdegree = мк° +Microradian = мкрад +Millidegree = м° +Milliradian = мрад +Nanodegree = н° +Nanoradian = нрад +Radian = рад +Revolution = r diff --git a/UnitsNet/GeneratedCode/Resources/ApparentEnergy.restext b/UnitsNet/GeneratedCode/Resources/ApparentEnergy.restext new file mode 100644 index 0000000000..eb4f3d78f5 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ApparentEnergy.restext @@ -0,0 +1,3 @@ +KilovoltampereHour = kVAh +MegavoltampereHour = MVAh +VoltampereHour = VAh diff --git a/UnitsNet/GeneratedCode/Resources/ApparentPower.restext b/UnitsNet/GeneratedCode/Resources/ApparentPower.restext new file mode 100644 index 0000000000..bf7ef22415 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ApparentPower.restext @@ -0,0 +1,6 @@ +Gigavoltampere = GVA +Kilovoltampere = kVA +Megavoltampere = MVA +Microvoltampere = µVA +Millivoltampere = mVA +Voltampere = VA diff --git a/UnitsNet/GeneratedCode/Resources/Area.restext b/UnitsNet/GeneratedCode/Resources/Area.restext new file mode 100644 index 0000000000..9e7e3c063b --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Area.restext @@ -0,0 +1,14 @@ +Acre = ac +Hectare = ha +SquareCentimeter = cm² +SquareDecimeter = dm² +SquareFoot = ft² +SquareInch = in² +SquareKilometer = km² +SquareMeter = m² +SquareMicrometer = µm² +SquareMile = mi² +SquareMillimeter = mm² +SquareNauticalMile = nmi² +SquareYard = yd² +UsSurveySquareFoot = ft² (US) diff --git a/UnitsNet/GeneratedCode/Resources/Area.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Area.ru-RU.restext new file mode 100644 index 0000000000..bb6928cd88 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Area.ru-RU.restext @@ -0,0 +1,14 @@ +Acre = акр +Hectare = га +SquareCentimeter = см² +SquareDecimeter = дм² +SquareFoot = фут² +SquareInch = дюйм² +SquareKilometer = км² +SquareMeter = м² +SquareMicrometer = мкм² +SquareMile = миля² +SquareMillimeter = мм² +SquareNauticalMile = морск.миля² +SquareYard = ярд² +UsSurveySquareFoot = фут² (US) diff --git a/UnitsNet/GeneratedCode/Resources/Area.zh-CN.restext b/UnitsNet/GeneratedCode/Resources/Area.zh-CN.restext new file mode 100644 index 0000000000..e215061302 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Area.zh-CN.restext @@ -0,0 +1,13 @@ +Acre = 英亩 +Hectare = 英亩 +SquareCentimeter = 平方厘米 +SquareDecimeter = 平方分米 +SquareFoot = 平方英尺 +SquareInch = 平方英寸 +SquareKilometer = 平方公里 +SquareMeter = 平方米 +SquareMicrometer = 平方微米 +SquareMile = 平方英里 +SquareMillimeter = 平方毫米 +SquareNauticalMile = 平方海里 +SquareYard = 平方码 diff --git a/UnitsNet/GeneratedCode/Resources/AreaDensity.restext b/UnitsNet/GeneratedCode/Resources/AreaDensity.restext new file mode 100644 index 0000000000..44f797183d --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/AreaDensity.restext @@ -0,0 +1,3 @@ +GramPerSquareMeter = g/m² +KilogramPerSquareMeter = kg/m² +MilligramPerSquareMeter = mg/m² diff --git a/UnitsNet/GeneratedCode/Resources/AreaMomentOfInertia.restext b/UnitsNet/GeneratedCode/Resources/AreaMomentOfInertia.restext new file mode 100644 index 0000000000..6414d2ca5e --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/AreaMomentOfInertia.restext @@ -0,0 +1,6 @@ +CentimeterToTheFourth = cm⁴ +DecimeterToTheFourth = dm⁴ +FootToTheFourth = ft⁴ +InchToTheFourth = in⁴ +MeterToTheFourth = m⁴ +MillimeterToTheFourth = mm⁴ diff --git a/UnitsNet/GeneratedCode/Resources/BitRate.restext b/UnitsNet/GeneratedCode/Resources/BitRate.restext new file mode 100644 index 0000000000..c3879a8aca --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/BitRate.restext @@ -0,0 +1,26 @@ +BitPerSecond = bit/s +BytePerSecond = B/s +ExabitPerSecond = Ebit/s +ExabytePerSecond = EB/s +ExbibitPerSecond = Eibit/s +ExbibytePerSecond = EiB/s +GibibitPerSecond = Gibit/s +GibibytePerSecond = GiB/s +GigabitPerSecond = Gbit/s +GigabytePerSecond = GB/s +KibibitPerSecond = Kibit/s +KibibytePerSecond = KiB/s +KilobitPerSecond = kbit/s +KilobytePerSecond = kB/s +MebibitPerSecond = Mibit/s +MebibytePerSecond = MiB/s +MegabitPerSecond = Mbit/s +MegabytePerSecond = MB/s +PebibitPerSecond = Pibit/s +PebibytePerSecond = PiB/s +PetabitPerSecond = Pbit/s +PetabytePerSecond = PB/s +TebibitPerSecond = Tibit/s +TebibytePerSecond = TiB/s +TerabitPerSecond = Tbit/s +TerabytePerSecond = TB/s diff --git a/UnitsNet/GeneratedCode/Resources/BrakeSpecificFuelConsumption.restext b/UnitsNet/GeneratedCode/Resources/BrakeSpecificFuelConsumption.restext new file mode 100644 index 0000000000..6fe8e5845a --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/BrakeSpecificFuelConsumption.restext @@ -0,0 +1,3 @@ +GramPerKiloWattHour = g/kWh +KilogramPerJoule = kg/J +PoundPerMechanicalHorsepowerHour = lb/hph diff --git a/UnitsNet/GeneratedCode/Resources/Capacitance.restext b/UnitsNet/GeneratedCode/Resources/Capacitance.restext new file mode 100644 index 0000000000..5986c1c02d --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Capacitance.restext @@ -0,0 +1,7 @@ +Farad = F +Kilofarad = kF +Megafarad = MF +Microfarad = µF +Millifarad = mF +Nanofarad = nF +Picofarad = pF diff --git a/UnitsNet/GeneratedCode/Resources/CoefficientOfThermalExpansion.restext b/UnitsNet/GeneratedCode/Resources/CoefficientOfThermalExpansion.restext new file mode 100644 index 0000000000..09111d32f9 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/CoefficientOfThermalExpansion.restext @@ -0,0 +1,3 @@ +InverseDegreeCelsius = °C⁻¹ +InverseDegreeFahrenheit = °F⁻¹ +InverseKelvin = K⁻¹ diff --git a/UnitsNet/GeneratedCode/Resources/Compressibility.restext b/UnitsNet/GeneratedCode/Resources/Compressibility.restext new file mode 100644 index 0000000000..a6187c8c84 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Compressibility.restext @@ -0,0 +1,7 @@ +InverseAtmosphere = atm⁻¹ +InverseBar = bar⁻¹ +InverseKilopascal = kPa⁻¹ +InverseMegapascal = MPa⁻¹ +InverseMillibar = mbar⁻¹ +InversePascal = Pa⁻¹ +InversePoundForcePerSquareInch = psi⁻¹ diff --git a/UnitsNet/GeneratedCode/Resources/Density.restext b/UnitsNet/GeneratedCode/Resources/Density.restext new file mode 100644 index 0000000000..f32b41a75f --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Density.restext @@ -0,0 +1,51 @@ +CentigramPerDeciliter = cg/dl +CentigramPerLiter = cg/L +CentigramPerMilliliter = cg/ml +DecigramPerDeciliter = dg/dl +DecigramPerLiter = dg/L +DecigramPerMilliliter = dg/ml +GramPerCubicCentimeter = g/cm³ +GramPerCubicFoot = g/ft³ +GramPerCubicInch = g/in³ +GramPerCubicMeter = g/m³ +GramPerCubicMillimeter = g/mm³ +GramPerDeciliter = g/dl +GramPerLiter = g/L +GramPerMilliliter = g/ml +KilogramPerCubicCentimeter = kg/cm³ +KilogramPerCubicMeter = kg/m³ +KilogramPerCubicMillimeter = kg/mm³ +KilogramPerLiter = kg/l +KilopoundPerCubicFoot = kip/ft³ +KilopoundPerCubicInch = kip/in³ +MicrogramPerCubicMeter = µg/m³ +MicrogramPerDeciliter = µg/dl +MicrogramPerLiter = µg/L +MicrogramPerMilliliter = µg/ml +MilligramPerCubicMeter = mg/m³ +MilligramPerDeciliter = mg/dl +MilligramPerLiter = mg/L +MilligramPerMilliliter = mg/ml +NanogramPerDeciliter = ng/dl +NanogramPerLiter = ng/L +NanogramPerMilliliter = ng/ml +PicogramPerDeciliter = pg/dl +PicogramPerLiter = pg/L +PicogramPerMilliliter = pg/ml +PoundPerCubicCentimeter = lb/cm³ +PoundPerCubicFoot = lb/ft³ +PoundPerCubicInch = lb/in³ +PoundPerCubicMeter = lb/m³ +PoundPerCubicMillimeter = lb/mm³ +PoundPerImperialGallon = ppg (imp.) +PoundPerUSGallon = ppg (U.S.) +SlugPerCubicCentimeter = slug/cm³ +SlugPerCubicFoot = slug/ft³ +SlugPerCubicInch = slug/in³ +SlugPerCubicMeter = slug/m³ +SlugPerCubicMillimeter = slug/mm³ +TonnePerCubicCentimeter = t/cm³ +TonnePerCubicFoot = t/ft³ +TonnePerCubicInch = t/in³ +TonnePerCubicMeter = t/m³ +TonnePerCubicMillimeter = t/mm³ diff --git a/UnitsNet/GeneratedCode/Resources/Density.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Density.ru-RU.restext new file mode 100644 index 0000000000..28048cb667 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Density.ru-RU.restext @@ -0,0 +1,4 @@ +GramPerCubicMeter = г/м³ +KilogramPerCubicMeter = кг/м³ +MicrogramPerCubicMeter = мкг/м³ +MilligramPerCubicMeter = мг/м³ diff --git a/UnitsNet/GeneratedCode/Resources/Duration.restext b/UnitsNet/GeneratedCode/Resources/Duration.restext new file mode 100644 index 0000000000..b4b2659b1a --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Duration.restext @@ -0,0 +1,11 @@ +Day = d +Hour = h +JulianYear = jyr +Microsecond = µs +Millisecond = ms +Minute = m +Month30 = mo +Nanosecond = ns +Second = s +Week = wk +Year365 = yr diff --git a/UnitsNet/GeneratedCode/Resources/Duration.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Duration.ru-RU.restext new file mode 100644 index 0000000000..6613478cd9 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Duration.ru-RU.restext @@ -0,0 +1,10 @@ +Day = сут +Hour = ч +Microsecond = мксек +Millisecond = мсек +Minute = мин +Month30 = месяц +Nanosecond = нсек +Second = сек +Week = нед +Year365 = год diff --git a/UnitsNet/GeneratedCode/Resources/DynamicViscosity.restext b/UnitsNet/GeneratedCode/Resources/DynamicViscosity.restext new file mode 100644 index 0000000000..32f4abc33b --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/DynamicViscosity.restext @@ -0,0 +1,10 @@ +Centipoise = cP +MicropascalSecond = µPa·s +MillipascalSecond = mPa·s +NewtonSecondPerMeterSquared = Ns/m² +PascalSecond = Pa·s +Poise = P +PoundForceSecondPerSquareFoot = lbf·s/ft² +PoundForceSecondPerSquareInch = lbf·s/in² +PoundPerFootSecond = lb/ft·s +Reyn = reyn diff --git a/UnitsNet/GeneratedCode/Resources/ElectricAdmittance.restext b/UnitsNet/GeneratedCode/Resources/ElectricAdmittance.restext new file mode 100644 index 0000000000..901986d81a --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricAdmittance.restext @@ -0,0 +1,4 @@ +Microsiemens = µS +Millisiemens = mS +Nanosiemens = nS +Siemens = S diff --git a/UnitsNet/GeneratedCode/Resources/ElectricCharge.restext b/UnitsNet/GeneratedCode/Resources/ElectricCharge.restext new file mode 100644 index 0000000000..12aba86c2a --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricCharge.restext @@ -0,0 +1,11 @@ +AmpereHour = A-h +Coulomb = C +KiloampereHour = kA-h +Kilocoulomb = kC +MegaampereHour = MA-h +Megacoulomb = MC +Microcoulomb = µC +MilliampereHour = mA-h +Millicoulomb = mC +Nanocoulomb = nC +Picocoulomb = pC diff --git a/UnitsNet/GeneratedCode/Resources/ElectricChargeDensity.restext b/UnitsNet/GeneratedCode/Resources/ElectricChargeDensity.restext new file mode 100644 index 0000000000..b8b7265863 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricChargeDensity.restext @@ -0,0 +1 @@ +CoulombPerCubicMeter = C/m³ diff --git a/UnitsNet/GeneratedCode/Resources/ElectricConductance.restext b/UnitsNet/GeneratedCode/Resources/ElectricConductance.restext new file mode 100644 index 0000000000..6a0f3ab32f --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricConductance.restext @@ -0,0 +1,5 @@ +Kilosiemens = kS +Microsiemens = µS +Millisiemens = mS +Nanosiemens = nS +Siemens = S diff --git a/UnitsNet/GeneratedCode/Resources/ElectricConductivity.restext b/UnitsNet/GeneratedCode/Resources/ElectricConductivity.restext new file mode 100644 index 0000000000..cca5df6aac --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricConductivity.restext @@ -0,0 +1,6 @@ +MicrosiemensPerCentimeter = µS/cm +MillisiemensPerCentimeter = mS/cm +SiemensPerCentimeter = S/cm +SiemensPerFoot = S/ft +SiemensPerInch = S/in +SiemensPerMeter = S/m diff --git a/UnitsNet/GeneratedCode/Resources/ElectricCurrent.restext b/UnitsNet/GeneratedCode/Resources/ElectricCurrent.restext new file mode 100644 index 0000000000..a829a3cfcb --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricCurrent.restext @@ -0,0 +1,9 @@ +Ampere = A +Centiampere = cA +Femtoampere = fA +Kiloampere = kA +Megaampere = MA +Microampere = µA +Milliampere = mA +Nanoampere = nA +Picoampere = pA diff --git a/UnitsNet/GeneratedCode/Resources/ElectricCurrentDensity.restext b/UnitsNet/GeneratedCode/Resources/ElectricCurrentDensity.restext new file mode 100644 index 0000000000..7bd40373fe --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricCurrentDensity.restext @@ -0,0 +1,3 @@ +AmperePerSquareFoot = A/ft² +AmperePerSquareInch = A/in² +AmperePerSquareMeter = A/m² diff --git a/UnitsNet/GeneratedCode/Resources/ElectricCurrentGradient.restext b/UnitsNet/GeneratedCode/Resources/ElectricCurrentGradient.restext new file mode 100644 index 0000000000..6190c83cd2 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricCurrentGradient.restext @@ -0,0 +1,4 @@ +AmperePerMicrosecond = A/μs +AmperePerMillisecond = A/ms +AmperePerNanosecond = A/ns +AmperePerSecond = A/s diff --git a/UnitsNet/GeneratedCode/Resources/ElectricField.restext b/UnitsNet/GeneratedCode/Resources/ElectricField.restext new file mode 100644 index 0000000000..2556938e79 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricField.restext @@ -0,0 +1 @@ +VoltPerMeter = V/m diff --git a/UnitsNet/GeneratedCode/Resources/ElectricInductance.restext b/UnitsNet/GeneratedCode/Resources/ElectricInductance.restext new file mode 100644 index 0000000000..30d0f066a6 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricInductance.restext @@ -0,0 +1,5 @@ +Henry = H +Microhenry = µH +Millihenry = mH +Nanohenry = nH +Picohenry = pH diff --git a/UnitsNet/GeneratedCode/Resources/ElectricPotential.restext b/UnitsNet/GeneratedCode/Resources/ElectricPotential.restext new file mode 100644 index 0000000000..f9f5414145 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricPotential.restext @@ -0,0 +1,6 @@ +Kilovolt = kV +Megavolt = MV +Microvolt = µV +Millivolt = mV +Nanovolt = nV +Volt = V diff --git a/UnitsNet/GeneratedCode/Resources/ElectricPotential.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/ElectricPotential.ru-RU.restext new file mode 100644 index 0000000000..13fe69df93 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricPotential.ru-RU.restext @@ -0,0 +1,6 @@ +Kilovolt = кВ +Megavolt = МВ +Microvolt = мкВ +Millivolt = мВ +Nanovolt = нВ +Volt = В diff --git a/UnitsNet/GeneratedCode/Resources/ElectricPotentialAc.restext b/UnitsNet/GeneratedCode/Resources/ElectricPotentialAc.restext new file mode 100644 index 0000000000..3b90a91a13 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricPotentialAc.restext @@ -0,0 +1,5 @@ +KilovoltAc = kVac +MegavoltAc = MVac +MicrovoltAc = µVac +MillivoltAc = mVac +VoltAc = Vac diff --git a/UnitsNet/GeneratedCode/Resources/ElectricPotentialChangeRate.restext b/UnitsNet/GeneratedCode/Resources/ElectricPotentialChangeRate.restext new file mode 100644 index 0000000000..155f8fad24 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricPotentialChangeRate.restext @@ -0,0 +1,20 @@ +KilovoltPerHour = kV/h +KilovoltPerMicrosecond = kV/μs +KilovoltPerMinute = kV/min +KilovoltPerSecond = kV/s +MegavoltPerHour = MV/h +MegavoltPerMicrosecond = MV/μs +MegavoltPerMinute = MV/min +MegavoltPerSecond = MV/s +MicrovoltPerHour = µV/h +MicrovoltPerMicrosecond = µV/μs +MicrovoltPerMinute = µV/min +MicrovoltPerSecond = µV/s +MillivoltPerHour = mV/h +MillivoltPerMicrosecond = mV/μs +MillivoltPerMinute = mV/min +MillivoltPerSecond = mV/s +VoltPerHour = V/h +VoltPerMicrosecond = V/μs +VoltPerMinute = V/min +VoltPerSecond = V/s diff --git a/UnitsNet/GeneratedCode/Resources/ElectricPotentialDc.restext b/UnitsNet/GeneratedCode/Resources/ElectricPotentialDc.restext new file mode 100644 index 0000000000..857ee24088 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricPotentialDc.restext @@ -0,0 +1,5 @@ +KilovoltDc = kVdc +MegavoltDc = MVdc +MicrovoltDc = µVdc +MillivoltDc = mVdc +VoltDc = Vdc diff --git a/UnitsNet/GeneratedCode/Resources/ElectricResistance.restext b/UnitsNet/GeneratedCode/Resources/ElectricResistance.restext new file mode 100644 index 0000000000..391c1dd589 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricResistance.restext @@ -0,0 +1,7 @@ +Gigaohm = GΩ +Kiloohm = kΩ +Megaohm = MΩ +Microohm = µΩ +Milliohm = mΩ +Ohm = Ω +Teraohm = TΩ diff --git a/UnitsNet/GeneratedCode/Resources/ElectricResistivity.restext b/UnitsNet/GeneratedCode/Resources/ElectricResistivity.restext new file mode 100644 index 0000000000..012ef8fd70 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricResistivity.restext @@ -0,0 +1,14 @@ +KiloohmCentimeter = kΩ·cm +KiloohmMeter = kΩ·m +MegaohmCentimeter = MΩ·cm +MegaohmMeter = MΩ·m +MicroohmCentimeter = µΩ·cm +MicroohmMeter = µΩ·m +MilliohmCentimeter = mΩ·cm +MilliohmMeter = mΩ·m +NanoohmCentimeter = nΩ·cm +NanoohmMeter = nΩ·m +OhmCentimeter = Ω·cm +OhmMeter = Ω·m +PicoohmCentimeter = pΩ·cm +PicoohmMeter = pΩ·m diff --git a/UnitsNet/GeneratedCode/Resources/ElectricSurfaceChargeDensity.restext b/UnitsNet/GeneratedCode/Resources/ElectricSurfaceChargeDensity.restext new file mode 100644 index 0000000000..b5582b93a6 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricSurfaceChargeDensity.restext @@ -0,0 +1,3 @@ +CoulombPerSquareCentimeter = C/cm² +CoulombPerSquareInch = C/in² +CoulombPerSquareMeter = C/m² diff --git a/UnitsNet/GeneratedCode/Resources/Energy.restext b/UnitsNet/GeneratedCode/Resources/Energy.restext new file mode 100644 index 0000000000..50e7c3345c --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Energy.restext @@ -0,0 +1,38 @@ +BritishThermalUnit = BTU +Calorie = cal +DecathermEc = Dth (E.C.) +DecathermImperial = Dth (imp.) +DecathermUs = Dth (U.S.) +ElectronVolt = eV +Erg = erg +FootPound = ft·lb +GigabritishThermalUnit = GBTU +GigaelectronVolt = GeV +Gigajoule = GJ +GigawattDay = GWd +GigawattHour = GWh +HorsepowerHour = hp·h +Joule = J +KilobritishThermalUnit = kBTU +Kilocalorie = kcal +KiloelectronVolt = keV +Kilojoule = kJ +KilowattDay = kWd +KilowattHour = kWh +MegabritishThermalUnit = MBTU +Megacalorie = Mcal +MegaelectronVolt = MeV +Megajoule = MJ +MegawattDay = MWd +MegawattHour = MWh +Millijoule = mJ +Petajoule = PJ +TeraelectronVolt = TeV +Terajoule = TJ +TerawattDay = TWd +TerawattHour = TWh +ThermEc = th (E.C.) +ThermImperial = th (imp.) +ThermUs = th (U.S.) +WattDay = Wd +WattHour = Wh diff --git a/UnitsNet/GeneratedCode/Resources/Energy.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Energy.ru-RU.restext new file mode 100644 index 0000000000..4950aa9f0e --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Energy.ru-RU.restext @@ -0,0 +1,21 @@ +DecathermEc = Европейский декатерм +DecathermImperial = Английский декатерм +DecathermUs = Американский декатерм +ElectronVolt = эВ +GigaelectronVolt = ГэВ +GigawattDay = ГВт/д +GigawattHour = ГВт/ч +KiloelectronVolt = кэВ +KilowattDay = кВт/д +KilowattHour = кВт/ч +MegaelectronVolt = МэВ +MegawattDay = МВт/д +MegawattHour = МВт/ч +TeraelectronVolt = ТэВ +TerawattDay = ТВт/д +TerawattHour = ТВт/ч +ThermEc = Европейский терм +ThermImperial = Английский терм +ThermUs = Американский терм +WattDay = Вт/д +WattHour = Вт/ч diff --git a/UnitsNet/GeneratedCode/Resources/EnergyDensity.restext b/UnitsNet/GeneratedCode/Resources/EnergyDensity.restext new file mode 100644 index 0000000000..c366b28b75 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/EnergyDensity.restext @@ -0,0 +1,12 @@ +GigajoulePerCubicMeter = GJ/m³ +GigawattHourPerCubicMeter = GWh/m³ +JoulePerCubicMeter = J/m³ +KilojoulePerCubicMeter = kJ/m³ +KilowattHourPerCubicMeter = kWh/m³ +MegajoulePerCubicMeter = MJ/m³ +MegawattHourPerCubicMeter = MWh/m³ +PetajoulePerCubicMeter = PJ/m³ +PetawattHourPerCubicMeter = PWh/m³ +TerajoulePerCubicMeter = TJ/m³ +TerawattHourPerCubicMeter = TWh/m³ +WattHourPerCubicMeter = Wh/m³ diff --git a/UnitsNet/GeneratedCode/Resources/Entropy.restext b/UnitsNet/GeneratedCode/Resources/Entropy.restext new file mode 100644 index 0000000000..5151eb9153 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Entropy.restext @@ -0,0 +1,7 @@ +CaloriePerKelvin = cal/K +JoulePerDegreeCelsius = J/C +JoulePerKelvin = J/K +KilocaloriePerKelvin = kcal/K +KilojoulePerDegreeCelsius = kJ/C +KilojoulePerKelvin = kJ/K +MegajoulePerKelvin = MJ/K diff --git a/UnitsNet/GeneratedCode/Resources/Force.restext b/UnitsNet/GeneratedCode/Resources/Force.restext new file mode 100644 index 0000000000..7d5a72799d --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Force.restext @@ -0,0 +1,15 @@ +Decanewton = daN +Dyn = dyn +KilogramForce = kgf +Kilonewton = kN +KiloPond = kp +KilopoundForce = kipf +Meganewton = MN +Micronewton = µN +Millinewton = mN +Newton = N +OunceForce = ozf +Poundal = pdl +PoundForce = lbf +ShortTonForce = tf (short) +TonneForce = tf diff --git a/UnitsNet/GeneratedCode/Resources/Force.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Force.ru-RU.restext new file mode 100644 index 0000000000..596bd36418 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Force.ru-RU.restext @@ -0,0 +1,13 @@ +Decanewton = даН +Dyn = дин +KilogramForce = кгс +Kilonewton = кН +KiloPond = кгс +KilopoundForce = кипф +Meganewton = МН +Micronewton = мкН +Millinewton = мН +Newton = Н +Poundal = паундаль +PoundForce = фунт-сила +TonneForce = тс diff --git a/UnitsNet/GeneratedCode/Resources/ForceChangeRate.restext b/UnitsNet/GeneratedCode/Resources/ForceChangeRate.restext new file mode 100644 index 0000000000..2f63e137a1 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ForceChangeRate.restext @@ -0,0 +1,15 @@ +CentinewtonPerSecond = cN/s +DecanewtonPerMinute = daN/min +DecanewtonPerSecond = daN/s +DecinewtonPerSecond = dN/s +KilonewtonPerMinute = kN/min +KilonewtonPerSecond = kN/s +KilopoundForcePerMinute = kipf/min +KilopoundForcePerSecond = kipf/s +MicronewtonPerSecond = µN/s +MillinewtonPerSecond = mN/s +NanonewtonPerSecond = nN/s +NewtonPerMinute = N/min +NewtonPerSecond = N/s +PoundForcePerMinute = lbf/min +PoundForcePerSecond = lbf/s diff --git a/UnitsNet/GeneratedCode/Resources/ForcePerLength.restext b/UnitsNet/GeneratedCode/Resources/ForcePerLength.restext new file mode 100644 index 0000000000..9f409f1389 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ForcePerLength.restext @@ -0,0 +1,38 @@ +CentinewtonPerCentimeter = cN/cm +CentinewtonPerMeter = cN/m +CentinewtonPerMillimeter = cN/mm +DecanewtonPerCentimeter = daN/cm +DecanewtonPerMeter = daN/m +DecanewtonPerMillimeter = daN/mm +DecinewtonPerCentimeter = dN/cm +DecinewtonPerMeter = dN/m +DecinewtonPerMillimeter = dN/mm +KilogramForcePerCentimeter = kgf/cm +KilogramForcePerMeter = kgf/m +KilogramForcePerMillimeter = kgf/mm +KilonewtonPerCentimeter = kN/cm +KilonewtonPerMeter = kN/m +KilonewtonPerMillimeter = kN/mm +KilopoundForcePerFoot = kipf/ft +KilopoundForcePerInch = kipf/in +MeganewtonPerCentimeter = MN/cm +MeganewtonPerMeter = MN/m +MeganewtonPerMillimeter = MN/mm +MicronewtonPerCentimeter = µN/cm +MicronewtonPerMeter = µN/m +MicronewtonPerMillimeter = µN/mm +MillinewtonPerCentimeter = mN/cm +MillinewtonPerMeter = mN/m +MillinewtonPerMillimeter = mN/mm +NanonewtonPerCentimeter = nN/cm +NanonewtonPerMeter = nN/m +NanonewtonPerMillimeter = nN/mm +NewtonPerCentimeter = N/cm +NewtonPerMeter = N/m +NewtonPerMillimeter = N/mm +PoundForcePerFoot = lbf/ft +PoundForcePerInch = lbf/in +PoundForcePerYard = lbf/yd +TonneForcePerCentimeter = tf/cm +TonneForcePerMeter = tf/m +TonneForcePerMillimeter = tf/mm diff --git a/UnitsNet/GeneratedCode/Resources/ForcePerLength.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/ForcePerLength.ru-RU.restext new file mode 100644 index 0000000000..b983c3f9ab --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ForcePerLength.ru-RU.restext @@ -0,0 +1,6 @@ +KilogramForcePerCentimeter = кгс/см +KilogramForcePerMeter = кгс/м +KilogramForcePerMillimeter = кгс/мм +TonneForcePerCentimeter = тс/см +TonneForcePerMeter = тс/м +TonneForcePerMillimeter = тс/мм diff --git a/UnitsNet/GeneratedCode/Resources/Frequency.restext b/UnitsNet/GeneratedCode/Resources/Frequency.restext new file mode 100644 index 0000000000..5807384c71 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Frequency.restext @@ -0,0 +1,13 @@ +BeatPerMinute = bpm +BUnit = B Units +CyclePerHour = cph +CyclePerMinute = cpm +Gigahertz = GHz +Hertz = Hz +Kilohertz = kHz +Megahertz = MHz +Microhertz = µHz +Millihertz = mHz +PerSecond = s⁻¹ +RadianPerSecond = rad/s +Terahertz = THz diff --git a/UnitsNet/GeneratedCode/Resources/Frequency.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Frequency.ru-RU.restext new file mode 100644 index 0000000000..434611c9c9 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Frequency.ru-RU.restext @@ -0,0 +1,9 @@ +Gigahertz = ГГц +Hertz = Гц +Kilohertz = кГц +Megahertz = МГц +Microhertz = мкГц +Millihertz = мГц +PerSecond = с⁻¹ +RadianPerSecond = рад/с +Terahertz = ТГц diff --git a/UnitsNet/GeneratedCode/Resources/FuelEfficiency.restext b/UnitsNet/GeneratedCode/Resources/FuelEfficiency.restext new file mode 100644 index 0000000000..95dbd67b97 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/FuelEfficiency.restext @@ -0,0 +1,4 @@ +KilometerPerLiter = km/L +LiterPer100Kilometers = L/100km +MilePerUkGallon = mpg (imp.) +MilePerUsGallon = mpg (U.S.) diff --git a/UnitsNet/GeneratedCode/Resources/HeatFlux.restext b/UnitsNet/GeneratedCode/Resources/HeatFlux.restext new file mode 100644 index 0000000000..9903b0efd0 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/HeatFlux.restext @@ -0,0 +1,18 @@ +BtuPerHourSquareFoot = BTU/h·ft² +BtuPerMinuteSquareFoot = BTU/min·ft² +BtuPerSecondSquareFoot = BTU/s·ft² +BtuPerSecondSquareInch = BTU/s·in² +CaloriePerSecondSquareCentimeter = cal/s·cm² +CentiwattPerSquareMeter = cW/m² +DeciwattPerSquareMeter = dW/m² +KilocaloriePerHourSquareMeter = kcal/h·m² +KilocaloriePerSecondSquareCentimeter = kcal/s·cm² +KilowattPerSquareMeter = kW/m² +MicrowattPerSquareMeter = µW/m² +MilliwattPerSquareMeter = mW/m² +NanowattPerSquareMeter = nW/m² +PoundForcePerFootSecond = lbf/(ft·s) +PoundPerSecondCubed = lb/s³ +WattPerSquareFoot = W/ft² +WattPerSquareInch = W/in² +WattPerSquareMeter = W/m² diff --git a/UnitsNet/GeneratedCode/Resources/HeatTransferCoefficient.restext b/UnitsNet/GeneratedCode/Resources/HeatTransferCoefficient.restext new file mode 100644 index 0000000000..2e501c81d1 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/HeatTransferCoefficient.restext @@ -0,0 +1,6 @@ +BtuPerHourSquareFootDegreeFahrenheit = Btu/h·ft²·°F +BtuPerSquareFootDegreeFahrenheit = Btu/ft²·°F +CaloriePerHourSquareMeterDegreeCelsius = kcal/h·m²·°C +KilocaloriePerHourSquareMeterDegreeCelsius = kkcal/h·m²·°C +WattPerSquareMeterCelsius = W/m²·°C +WattPerSquareMeterKelvin = W/m²·K diff --git a/UnitsNet/GeneratedCode/Resources/Illuminance.restext b/UnitsNet/GeneratedCode/Resources/Illuminance.restext new file mode 100644 index 0000000000..45edf39b6f --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Illuminance.restext @@ -0,0 +1,4 @@ +Kilolux = klx +Lux = lx +Megalux = Mlx +Millilux = mlx diff --git a/UnitsNet/GeneratedCode/Resources/Impulse.restext b/UnitsNet/GeneratedCode/Resources/Impulse.restext new file mode 100644 index 0000000000..c6d4ecae86 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Impulse.restext @@ -0,0 +1,13 @@ +CentinewtonSecond = cN·s +DecanewtonSecond = daN·s +DecinewtonSecond = dN·s +KilogramMeterPerSecond = kg·m/s +KilonewtonSecond = kN·s +MeganewtonSecond = MN·s +MicronewtonSecond = µN·s +MillinewtonSecond = mN·s +NanonewtonSecond = nN·s +NewtonSecond = N·s +PoundFootPerSecond = lb·ft/s +PoundForceSecond = lbf·s +SlugFootPerSecond = slug·ft/s diff --git a/UnitsNet/GeneratedCode/Resources/Information.restext b/UnitsNet/GeneratedCode/Resources/Information.restext new file mode 100644 index 0000000000..c5c3531e1b --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Information.restext @@ -0,0 +1,26 @@ +Bit = b +Byte = B +Exabit = Eb +Exabyte = EB +Exbibit = Eib +Exbibyte = EiB +Gibibit = Gib +Gibibyte = GiB +Gigabit = Gb +Gigabyte = GB +Kibibit = Kib +Kibibyte = KiB +Kilobit = kb +Kilobyte = kB +Mebibit = Mib +Mebibyte = MiB +Megabit = Mb +Megabyte = MB +Pebibit = Pib +Pebibyte = PiB +Petabit = Pb +Petabyte = PB +Tebibit = Tib +Tebibyte = TiB +Terabit = Tb +Terabyte = TB diff --git a/UnitsNet/GeneratedCode/Resources/Irradiance.restext b/UnitsNet/GeneratedCode/Resources/Irradiance.restext new file mode 100644 index 0000000000..e77bacb2e6 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Irradiance.restext @@ -0,0 +1,14 @@ +KilowattPerSquareCentimeter = kW/cm² +KilowattPerSquareMeter = kW/m² +MegawattPerSquareCentimeter = MW/cm² +MegawattPerSquareMeter = MW/m² +MicrowattPerSquareCentimeter = µW/cm² +MicrowattPerSquareMeter = µW/m² +MilliwattPerSquareCentimeter = mW/cm² +MilliwattPerSquareMeter = mW/m² +NanowattPerSquareCentimeter = nW/cm² +NanowattPerSquareMeter = nW/m² +PicowattPerSquareCentimeter = pW/cm² +PicowattPerSquareMeter = pW/m² +WattPerSquareCentimeter = W/cm² +WattPerSquareMeter = W/m² diff --git a/UnitsNet/GeneratedCode/Resources/Irradiation.restext b/UnitsNet/GeneratedCode/Resources/Irradiation.restext new file mode 100644 index 0000000000..89d41c764d --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Irradiation.restext @@ -0,0 +1,7 @@ +JoulePerSquareCentimeter = J/cm² +JoulePerSquareMeter = J/m² +JoulePerSquareMillimeter = J/mm² +KilojoulePerSquareMeter = kJ/m² +KilowattHourPerSquareMeter = kWh/m² +MillijoulePerSquareCentimeter = mJ/cm² +WattHourPerSquareMeter = Wh/m² diff --git a/UnitsNet/GeneratedCode/Resources/Jerk.restext b/UnitsNet/GeneratedCode/Resources/Jerk.restext new file mode 100644 index 0000000000..07bab8906c --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Jerk.restext @@ -0,0 +1,11 @@ +CentimeterPerSecondCubed = cm/s³ +DecimeterPerSecondCubed = dm/s³ +FootPerSecondCubed = ft/s³ +InchPerSecondCubed = in/s³ +KilometerPerSecondCubed = km/s³ +MeterPerSecondCubed = m/s³ +MicrometerPerSecondCubed = µm/s³ +MillimeterPerSecondCubed = mm/s³ +MillistandardGravitiesPerSecond = mg/s +NanometerPerSecondCubed = nm/s³ +StandardGravitiesPerSecond = g/s diff --git a/UnitsNet/GeneratedCode/Resources/Jerk.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Jerk.ru-RU.restext new file mode 100644 index 0000000000..f0d708a22e --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Jerk.ru-RU.restext @@ -0,0 +1,11 @@ +CentimeterPerSecondCubed = см/с³ +DecimeterPerSecondCubed = дм/с³ +FootPerSecondCubed = фут/с³ +InchPerSecondCubed = дюйм/с³ +KilometerPerSecondCubed = км/с³ +MeterPerSecondCubed = м/с³ +MicrometerPerSecondCubed = мкм/с³ +MillimeterPerSecondCubed = мм/с³ +MillistandardGravitiesPerSecond = мg/s +NanometerPerSecondCubed = нм/с³ +StandardGravitiesPerSecond = g/s diff --git a/UnitsNet/GeneratedCode/Resources/KinematicViscosity.restext b/UnitsNet/GeneratedCode/Resources/KinematicViscosity.restext new file mode 100644 index 0000000000..ed613711be --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/KinematicViscosity.restext @@ -0,0 +1,9 @@ +Centistokes = cSt +Decistokes = dSt +Kilostokes = kSt +Microstokes = µSt +Millistokes = mSt +Nanostokes = nSt +SquareFootPerSecond = ft²/s +SquareMeterPerSecond = m²/s +Stokes = St diff --git a/UnitsNet/GeneratedCode/Resources/KinematicViscosity.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/KinematicViscosity.ru-RU.restext new file mode 100644 index 0000000000..111e69f288 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/KinematicViscosity.ru-RU.restext @@ -0,0 +1,8 @@ +Centistokes = сСт +Decistokes = дСт +Kilostokes = кСт +Microstokes = мкСт +Millistokes = мСт +Nanostokes = нСт +SquareMeterPerSecond = м²/с +Stokes = Ст diff --git a/UnitsNet/GeneratedCode/Resources/Length.restext b/UnitsNet/GeneratedCode/Resources/Length.restext new file mode 100644 index 0000000000..161fd6e058 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Length.restext @@ -0,0 +1,36 @@ +Angstrom = Å +AstronomicalUnit = au +Centimeter = cm +Chain = ch +DataMile = DM +Decameter = dam +Decimeter = dm +DtpPica = pica +DtpPoint = pt +Fathom = fathom +Foot = ft +Hand = h +Hectometer = hm +Inch = in +KilolightYear = kly +Kilometer = km +Kiloparsec = kpc +LightYear = ly +MegalightYear = Mly +Megaparsec = Mpc +Meter = m +Microinch = µin +Micrometer = µm +Mil = mil +Mile = mi +Millimeter = mm +Nanometer = nm +NauticalMile = NM +Parsec = pc +PrinterPica = pica +PrinterPoint = pt +Shackle = shackle +SolarRadius = R⊙ +Twip = twip +UsSurveyFoot = ftUS +Yard = yd diff --git a/UnitsNet/GeneratedCode/Resources/Length.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Length.ru-RU.restext new file mode 100644 index 0000000000..c57347cd19 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Length.ru-RU.restext @@ -0,0 +1,16 @@ +Centimeter = см +Decameter = дам +Decimeter = дм +Foot = фут +Hectometer = гм +Inch = дюйм +Kilometer = км +Meter = м +Microinch = микродюйм +Micrometer = мкм +Mil = мил +Mile = миля +Millimeter = мм +Nanometer = нм +NauticalMile = мил +Yard = ярд diff --git a/UnitsNet/GeneratedCode/Resources/Length.zh-CN.restext b/UnitsNet/GeneratedCode/Resources/Length.zh-CN.restext new file mode 100644 index 0000000000..6e0892cfb5 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Length.zh-CN.restext @@ -0,0 +1,16 @@ +Centimeter = 厘米 +Decameter = 十米 +Decimeter = 分米 +Foot = 英尺 +Hectometer = 百米 +Inch = 英寸 +Kilometer = 千米 +Meter = 米 +Microinch = 微英寸 +Micrometer = 微米 +Mil = 密耳 +Mile = 英里 +Millimeter = 毫米 +Nanometer = 纳米 +NauticalMile = 纳米 +Yard = 码 diff --git a/UnitsNet/GeneratedCode/Resources/Level.restext b/UnitsNet/GeneratedCode/Resources/Level.restext new file mode 100644 index 0000000000..83c768bb00 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Level.restext @@ -0,0 +1,2 @@ +Decibel = dB +Neper = Np diff --git a/UnitsNet/GeneratedCode/Resources/LinearDensity.restext b/UnitsNet/GeneratedCode/Resources/LinearDensity.restext new file mode 100644 index 0000000000..0f161e36c7 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/LinearDensity.restext @@ -0,0 +1,14 @@ +GramPerCentimeter = g/cm +GramPerMeter = g/m +GramPerMillimeter = g/mm +KilogramPerCentimeter = kg/cm +KilogramPerMeter = kg/m +KilogramPerMillimeter = kg/mm +MicrogramPerCentimeter = µg/cm +MicrogramPerMeter = µg/m +MicrogramPerMillimeter = µg/mm +MilligramPerCentimeter = mg/cm +MilligramPerMeter = mg/m +MilligramPerMillimeter = mg/mm +PoundPerFoot = lb/ft +PoundPerInch = lb/in diff --git a/UnitsNet/GeneratedCode/Resources/LinearPowerDensity.restext b/UnitsNet/GeneratedCode/Resources/LinearPowerDensity.restext new file mode 100644 index 0000000000..81aa154c3b --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/LinearPowerDensity.restext @@ -0,0 +1,25 @@ +GigawattPerCentimeter = GW/cm +GigawattPerFoot = GW/ft +GigawattPerInch = GW/in +GigawattPerMeter = GW/m +GigawattPerMillimeter = GW/mm +KilowattPerCentimeter = kW/cm +KilowattPerFoot = kW/ft +KilowattPerInch = kW/in +KilowattPerMeter = kW/m +KilowattPerMillimeter = kW/mm +MegawattPerCentimeter = MW/cm +MegawattPerFoot = MW/ft +MegawattPerInch = MW/in +MegawattPerMeter = MW/m +MegawattPerMillimeter = MW/mm +MilliwattPerCentimeter = mW/cm +MilliwattPerFoot = mW/ft +MilliwattPerInch = mW/in +MilliwattPerMeter = mW/m +MilliwattPerMillimeter = mW/mm +WattPerCentimeter = W/cm +WattPerFoot = W/ft +WattPerInch = W/in +WattPerMeter = W/m +WattPerMillimeter = W/mm diff --git a/UnitsNet/GeneratedCode/Resources/Luminance.restext b/UnitsNet/GeneratedCode/Resources/Luminance.restext new file mode 100644 index 0000000000..6c0eb05c11 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Luminance.restext @@ -0,0 +1,10 @@ +CandelaPerSquareFoot = Cd/ft² +CandelaPerSquareInch = Cd/in² +CandelaPerSquareMeter = Cd/m² +CenticandelaPerSquareMeter = cCd/m² +DecicandelaPerSquareMeter = dCd/m² +KilocandelaPerSquareMeter = kCd/m² +MicrocandelaPerSquareMeter = µCd/m² +MillicandelaPerSquareMeter = mCd/m² +NanocandelaPerSquareMeter = nCd/m² +Nit = nt diff --git a/UnitsNet/GeneratedCode/Resources/Luminosity.restext b/UnitsNet/GeneratedCode/Resources/Luminosity.restext new file mode 100644 index 0000000000..9856f255dc --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Luminosity.restext @@ -0,0 +1,14 @@ +Decawatt = daW +Deciwatt = dW +Femtowatt = fW +Gigawatt = GW +Kilowatt = kW +Megawatt = MW +Microwatt = µW +Milliwatt = mW +Nanowatt = nW +Petawatt = PW +Picowatt = pW +SolarLuminosity = L⊙ +Terawatt = TW +Watt = W diff --git a/UnitsNet/GeneratedCode/Resources/LuminousFlux.restext b/UnitsNet/GeneratedCode/Resources/LuminousFlux.restext new file mode 100644 index 0000000000..087c521d4f --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/LuminousFlux.restext @@ -0,0 +1 @@ +Lumen = lm diff --git a/UnitsNet/GeneratedCode/Resources/LuminousIntensity.restext b/UnitsNet/GeneratedCode/Resources/LuminousIntensity.restext new file mode 100644 index 0000000000..72f15f9166 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/LuminousIntensity.restext @@ -0,0 +1 @@ +Candela = cd diff --git a/UnitsNet/GeneratedCode/Resources/MagneticField.restext b/UnitsNet/GeneratedCode/Resources/MagneticField.restext new file mode 100644 index 0000000000..22fa8ae6d5 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/MagneticField.restext @@ -0,0 +1,6 @@ +Gauss = G +Microtesla = µT +Milligauss = mG +Millitesla = mT +Nanotesla = nT +Tesla = T diff --git a/UnitsNet/GeneratedCode/Resources/MagneticFlux.restext b/UnitsNet/GeneratedCode/Resources/MagneticFlux.restext new file mode 100644 index 0000000000..32495c6651 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/MagneticFlux.restext @@ -0,0 +1 @@ +Weber = Wb diff --git a/UnitsNet/GeneratedCode/Resources/Magnetization.restext b/UnitsNet/GeneratedCode/Resources/Magnetization.restext new file mode 100644 index 0000000000..c5967d8419 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Magnetization.restext @@ -0,0 +1 @@ +AmperePerMeter = A/m diff --git a/UnitsNet/GeneratedCode/Resources/Mass.restext b/UnitsNet/GeneratedCode/Resources/Mass.restext new file mode 100644 index 0000000000..83ae496c51 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Mass.restext @@ -0,0 +1,25 @@ +Centigram = cg +Decagram = dag +Decigram = dg +EarthMass = em +Grain = gr +Gram = g +Hectogram = hg +Kilogram = kg +Kilopound = klb +Kilotonne = kt +LongHundredweight = cwt +LongTon = long tn +Megapound = Mlb +Megatonne = Mt +Microgram = µg +Milligram = mg +Nanogram = ng +Ounce = oz +Pound = lb +ShortHundredweight = cwt +ShortTon = t (short) +Slug = slug +SolarMass = M☉ +Stone = st +Tonne = t diff --git a/UnitsNet/GeneratedCode/Resources/Mass.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Mass.ru-RU.restext new file mode 100644 index 0000000000..4aab41b7c4 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Mass.ru-RU.restext @@ -0,0 +1,17 @@ +Centigram = сг +Decagram = даг +Decigram = дг +Gram = г +Hectogram = гг +Kilogram = кг +Kilopound = кфунт +Kilotonne = кт +LongTon = тонна большая +Megapound = Мфунт +Megatonne = Мт +Microgram = мкг +Milligram = мг +Nanogram = нг +Pound = фунт +ShortTon = тонна малая +Tonne = т diff --git a/UnitsNet/GeneratedCode/Resources/Mass.zh-CN.restext b/UnitsNet/GeneratedCode/Resources/Mass.zh-CN.restext new file mode 100644 index 0000000000..c327159736 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Mass.zh-CN.restext @@ -0,0 +1,18 @@ +Centigram = 厘克 +Decagram = 十克 +Decigram = 分克 +Gram = 克 +Hectogram = 百克 +Kilogram = 千克 +Kilopound = 千磅 +Kilotonne = 千吨 +LongTon = 长吨 +Megapound = 兆磅 +Megatonne = 兆吨 +Microgram = 微克 +Milligram = 毫克 +Nanogram = 纳克 +Ounce = 盎司 +Pound = 磅 +ShortTon = 短吨 +Tonne = 吨 diff --git a/UnitsNet/GeneratedCode/Resources/MassConcentration.restext b/UnitsNet/GeneratedCode/Resources/MassConcentration.restext new file mode 100644 index 0000000000..53a1be29ae --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/MassConcentration.restext @@ -0,0 +1,49 @@ +CentigramPerDeciliter = cg/dL +CentigramPerLiter = cg/L +CentigramPerMicroliter = cg/μL +CentigramPerMilliliter = cg/mL +DecigramPerDeciliter = dg/dL +DecigramPerLiter = dg/L +DecigramPerMicroliter = dg/μL +DecigramPerMilliliter = dg/mL +GramPerCubicCentimeter = g/cm³ +GramPerCubicMeter = g/m³ +GramPerCubicMillimeter = g/mm³ +GramPerDeciliter = g/dL +GramPerLiter = g/L +GramPerMicroliter = g/μL +GramPerMilliliter = g/mL +KilogramPerCubicCentimeter = kg/cm³ +KilogramPerCubicMeter = kg/m³ +KilogramPerCubicMillimeter = kg/mm³ +KilogramPerLiter = kg/L +KilopoundPerCubicFoot = kip/ft³ +KilopoundPerCubicInch = kip/in³ +MicrogramPerCubicMeter = µg/m³ +MicrogramPerDeciliter = µg/dL +MicrogramPerLiter = µg/L +MicrogramPerMicroliter = µg/μL +MicrogramPerMilliliter = µg/mL +MilligramPerCubicMeter = mg/m³ +MilligramPerDeciliter = mg/dL +MilligramPerLiter = mg/L +MilligramPerMicroliter = mg/μL +MilligramPerMilliliter = mg/mL +NanogramPerDeciliter = ng/dL +NanogramPerLiter = ng/L +NanogramPerMicroliter = ng/μL +NanogramPerMilliliter = ng/mL +OuncePerImperialGallon = oz/gal (imp.) +OuncePerUSGallon = oz/gal (U.S.) +PicogramPerDeciliter = pg/dL +PicogramPerLiter = pg/L +PicogramPerMicroliter = pg/μL +PicogramPerMilliliter = pg/mL +PoundPerCubicFoot = lb/ft³ +PoundPerCubicInch = lb/in³ +PoundPerImperialGallon = ppg (imp.) +PoundPerUSGallon = ppg (U.S.) +SlugPerCubicFoot = slug/ft³ +TonnePerCubicCentimeter = t/cm³ +TonnePerCubicMeter = t/m³ +TonnePerCubicMillimeter = t/mm³ diff --git a/UnitsNet/GeneratedCode/Resources/MassConcentration.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/MassConcentration.ru-RU.restext new file mode 100644 index 0000000000..28048cb667 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/MassConcentration.ru-RU.restext @@ -0,0 +1,4 @@ +GramPerCubicMeter = г/м³ +KilogramPerCubicMeter = кг/м³ +MicrogramPerCubicMeter = мкг/м³ +MilligramPerCubicMeter = мг/м³ diff --git a/UnitsNet/GeneratedCode/Resources/MassFlow.restext b/UnitsNet/GeneratedCode/Resources/MassFlow.restext new file mode 100644 index 0000000000..9b60f33864 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/MassFlow.restext @@ -0,0 +1,33 @@ +CentigramPerDay = cg/d +CentigramPerSecond = cg/s +DecagramPerDay = dag/d +DecagramPerSecond = dag/s +DecigramPerDay = dg/d +DecigramPerSecond = dg/s +GramPerDay = g/d +GramPerHour = g/h +GramPerSecond = g/s +HectogramPerDay = hg/d +HectogramPerSecond = hg/s +KilogramPerDay = kg/d +KilogramPerHour = kg/h +KilogramPerMinute = kg/min +KilogramPerSecond = kg/s +MegagramPerDay = Mg/d +MegapoundPerDay = Mlb/d +MegapoundPerHour = Mlb/h +MegapoundPerMinute = Mlb/min +MegapoundPerSecond = Mlb/s +MicrogramPerDay = µg/d +MicrogramPerSecond = µg/s +MilligramPerDay = mg/d +MilligramPerSecond = mg/s +NanogramPerDay = ng/d +NanogramPerSecond = ng/s +PoundPerDay = lb/d +PoundPerHour = lb/h +PoundPerMinute = lb/min +PoundPerSecond = lb/s +ShortTonPerHour = short tn/h +TonnePerDay = t/d +TonnePerHour = t/h diff --git a/UnitsNet/GeneratedCode/Resources/MassFlow.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/MassFlow.ru-RU.restext new file mode 100644 index 0000000000..4f40ccbd3b --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/MassFlow.ru-RU.restext @@ -0,0 +1,2 @@ +KilogramPerHour = кг/ч +KilogramPerMinute = кг/мин diff --git a/UnitsNet/GeneratedCode/Resources/MassFlux.restext b/UnitsNet/GeneratedCode/Resources/MassFlux.restext new file mode 100644 index 0000000000..094ca2bad2 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/MassFlux.restext @@ -0,0 +1,12 @@ +GramPerHourPerSquareCentimeter = g·h⁻¹·cm⁻² +GramPerHourPerSquareMeter = g·h⁻¹·m⁻² +GramPerHourPerSquareMillimeter = g·h⁻¹·mm⁻² +GramPerSecondPerSquareCentimeter = g·s⁻¹·cm⁻² +GramPerSecondPerSquareMeter = g·s⁻¹·m⁻² +GramPerSecondPerSquareMillimeter = g·s⁻¹·mm⁻² +KilogramPerHourPerSquareCentimeter = kg·h⁻¹·cm⁻² +KilogramPerHourPerSquareMeter = kg·h⁻¹·m⁻² +KilogramPerHourPerSquareMillimeter = kg·h⁻¹·mm⁻² +KilogramPerSecondPerSquareCentimeter = kg·s⁻¹·cm⁻² +KilogramPerSecondPerSquareMeter = kg·s⁻¹·m⁻² +KilogramPerSecondPerSquareMillimeter = kg·s⁻¹·mm⁻² diff --git a/UnitsNet/GeneratedCode/Resources/MassFraction.restext b/UnitsNet/GeneratedCode/Resources/MassFraction.restext new file mode 100644 index 0000000000..f9950b5aa2 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/MassFraction.restext @@ -0,0 +1,24 @@ +CentigramPerGram = cg/g +CentigramPerKilogram = cg/kg +DecagramPerGram = dag/g +DecagramPerKilogram = dag/kg +DecigramPerGram = dg/g +DecigramPerKilogram = dg/kg +DecimalFraction = +GramPerGram = g/g +GramPerKilogram = g/kg +HectogramPerGram = hg/g +HectogramPerKilogram = hg/kg +KilogramPerGram = kg/g +KilogramPerKilogram = kg/kg +MicrogramPerGram = µg/g +MicrogramPerKilogram = µg/kg +MilligramPerGram = mg/g +MilligramPerKilogram = mg/kg +NanogramPerGram = ng/g +NanogramPerKilogram = ng/kg +PartPerBillion = ppb +PartPerMillion = ppm +PartPerThousand = ‰ +PartPerTrillion = ppt +Percent = % diff --git a/UnitsNet/GeneratedCode/Resources/MassMomentOfInertia.restext b/UnitsNet/GeneratedCode/Resources/MassMomentOfInertia.restext new file mode 100644 index 0000000000..e67ae2d8a4 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/MassMomentOfInertia.restext @@ -0,0 +1,28 @@ +GramSquareCentimeter = g·cm² +GramSquareDecimeter = g·dm² +GramSquareMeter = g·m² +GramSquareMillimeter = g·mm² +KilogramSquareCentimeter = kg·cm² +KilogramSquareDecimeter = kg·dm² +KilogramSquareMeter = kg·m² +KilogramSquareMillimeter = kg·mm² +KilotonneSquareCentimeter = kt·cm² +KilotonneSquareDecimeter = kt·dm² +KilotonneSquareMeter = kt·m² +KilotonneSquareMilimeter = kt·mm² +MegatonneSquareCentimeter = Mt·cm² +MegatonneSquareDecimeter = Mt·dm² +MegatonneSquareMeter = Mt·m² +MegatonneSquareMilimeter = Mt·mm² +MilligramSquareCentimeter = mg·cm² +MilligramSquareDecimeter = mg·dm² +MilligramSquareMeter = mg·m² +MilligramSquareMillimeter = mg·mm² +PoundSquareFoot = lb·ft² +PoundSquareInch = lb·in² +SlugSquareFoot = slug·ft² +SlugSquareInch = slug·in² +TonneSquareCentimeter = t·cm² +TonneSquareDecimeter = t·dm² +TonneSquareMeter = t·m² +TonneSquareMilimeter = t·mm² diff --git a/UnitsNet/GeneratedCode/Resources/MolarEnergy.restext b/UnitsNet/GeneratedCode/Resources/MolarEnergy.restext new file mode 100644 index 0000000000..ae39d8c3fb --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/MolarEnergy.restext @@ -0,0 +1,3 @@ +JoulePerMole = J/mol +KilojoulePerMole = kJ/mol +MegajoulePerMole = MJ/mol diff --git a/UnitsNet/GeneratedCode/Resources/MolarEntropy.restext b/UnitsNet/GeneratedCode/Resources/MolarEntropy.restext new file mode 100644 index 0000000000..521c94b41d --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/MolarEntropy.restext @@ -0,0 +1,3 @@ +JoulePerMoleKelvin = J/(mol*K) +KilojoulePerMoleKelvin = kJ/(mol*K) +MegajoulePerMoleKelvin = MJ/(mol*K) diff --git a/UnitsNet/GeneratedCode/Resources/MolarFlow.restext b/UnitsNet/GeneratedCode/Resources/MolarFlow.restext new file mode 100644 index 0000000000..b3b073a083 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/MolarFlow.restext @@ -0,0 +1,9 @@ +KilomolePerHour = kkmol/h +KilomolePerMinute = kmol/min +KilomolePerSecond = kmol/s +MolePerHour = kmol/h +MolePerMinute = mol/min +MolePerSecond = mol/s +PoundMolePerHour = lbmol/h +PoundMolePerMinute = lbmol/min +PoundMolePerSecond = lbmol/s diff --git a/UnitsNet/GeneratedCode/Resources/MolarMass.restext b/UnitsNet/GeneratedCode/Resources/MolarMass.restext new file mode 100644 index 0000000000..d20ec2da2a --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/MolarMass.restext @@ -0,0 +1,13 @@ +CentigramPerMole = cg/mol +DecagramPerMole = dag/mol +DecigramPerMole = dg/mol +GramPerMole = g/mol +HectogramPerMole = hg/mol +KilogramPerKilomole = kg/kmol +KilogramPerMole = kg/mol +KilopoundPerMole = klb/mol +MegapoundPerMole = Mlb/mol +MicrogramPerMole = µg/mol +MilligramPerMole = mg/mol +NanogramPerMole = ng/mol +PoundPerMole = lb/mol diff --git a/UnitsNet/GeneratedCode/Resources/MolarMass.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/MolarMass.ru-RU.restext new file mode 100644 index 0000000000..dc6dde88d4 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/MolarMass.ru-RU.restext @@ -0,0 +1,12 @@ +CentigramPerMole = сг/моль +DecagramPerMole = даг/моль +DecigramPerMole = дг/моль +GramPerMole = г/моль +HectogramPerMole = гг/моль +KilogramPerMole = кг/моль +KilopoundPerMole = кфунт/моль +MegapoundPerMole = Мфунт/моль +MicrogramPerMole = мкг/моль +MilligramPerMole = мг/моль +NanogramPerMole = нг/моль +PoundPerMole = фунт/моль diff --git a/UnitsNet/GeneratedCode/Resources/Molarity.restext b/UnitsNet/GeneratedCode/Resources/Molarity.restext new file mode 100644 index 0000000000..e1b9135e74 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Molarity.restext @@ -0,0 +1,11 @@ +CentimolePerLiter = cmol/L +DecimolePerLiter = dmol/L +FemtomolePerLiter = fmol/L +KilomolePerCubicMeter = kmol/m³ +MicromolePerLiter = µmol/L +MillimolePerLiter = mmol/L +MolePerCubicMeter = mol/m³ +MolePerLiter = mol/L +NanomolePerLiter = nmol/L +PicomolePerLiter = pmol/L +PoundMolePerCubicFoot = lbmol/ft³ diff --git a/UnitsNet/GeneratedCode/Resources/Permeability.restext b/UnitsNet/GeneratedCode/Resources/Permeability.restext new file mode 100644 index 0000000000..e505b3138c --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Permeability.restext @@ -0,0 +1 @@ +HenryPerMeter = H/m diff --git a/UnitsNet/GeneratedCode/Resources/Permittivity.restext b/UnitsNet/GeneratedCode/Resources/Permittivity.restext new file mode 100644 index 0000000000..72cd14c28c --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Permittivity.restext @@ -0,0 +1 @@ +FaradPerMeter = F/m diff --git a/UnitsNet/GeneratedCode/Resources/PorousMediumPermeability.restext b/UnitsNet/GeneratedCode/Resources/PorousMediumPermeability.restext new file mode 100644 index 0000000000..c83051161f --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/PorousMediumPermeability.restext @@ -0,0 +1,5 @@ +Darcy = D +Microdarcy = µD +Millidarcy = mD +SquareCentimeter = cm² +SquareMeter = m² diff --git a/UnitsNet/GeneratedCode/Resources/Power.restext b/UnitsNet/GeneratedCode/Resources/Power.restext new file mode 100644 index 0000000000..bd548e234c --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Power.restext @@ -0,0 +1,26 @@ +BoilerHorsepower = hp(S) +BritishThermalUnitPerHour = Btu/h +Decawatt = daW +Deciwatt = dW +ElectricalHorsepower = hp(E) +Femtowatt = fW +GigajoulePerHour = GJ/h +Gigawatt = GW +HydraulicHorsepower = hp(H) +JoulePerHour = J/h +KilobritishThermalUnitPerHour = kBtu/h +KilojoulePerHour = kJ/h +Kilowatt = kW +MechanicalHorsepower = hp(I) +MegabritishThermalUnitPerHour = MBtu/h +MegajoulePerHour = MJ/h +Megawatt = MW +MetricHorsepower = hp(M) +Microwatt = µW +MillijoulePerHour = mJ/h +Milliwatt = mW +Nanowatt = nW +Petawatt = PW +Picowatt = pW +Terawatt = TW +Watt = W diff --git a/UnitsNet/GeneratedCode/Resources/PowerDensity.restext b/UnitsNet/GeneratedCode/Resources/PowerDensity.restext new file mode 100644 index 0000000000..8101d8b4fd --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/PowerDensity.restext @@ -0,0 +1,44 @@ +DecawattPerCubicFoot = daW/ft³ +DecawattPerCubicInch = daW/in³ +DecawattPerCubicMeter = daW/m³ +DecawattPerLiter = daW/l +DeciwattPerCubicFoot = dW/ft³ +DeciwattPerCubicInch = dW/in³ +DeciwattPerCubicMeter = dW/m³ +DeciwattPerLiter = dW/l +GigawattPerCubicFoot = GW/ft³ +GigawattPerCubicInch = GW/in³ +GigawattPerCubicMeter = GW/m³ +GigawattPerLiter = GW/l +KilowattPerCubicFoot = kW/ft³ +KilowattPerCubicInch = kW/in³ +KilowattPerCubicMeter = kW/m³ +KilowattPerLiter = kW/l +MegawattPerCubicFoot = MW/ft³ +MegawattPerCubicInch = MW/in³ +MegawattPerCubicMeter = MW/m³ +MegawattPerLiter = MW/l +MicrowattPerCubicFoot = µW/ft³ +MicrowattPerCubicInch = µW/in³ +MicrowattPerCubicMeter = µW/m³ +MicrowattPerLiter = µW/l +MilliwattPerCubicFoot = mW/ft³ +MilliwattPerCubicInch = mW/in³ +MilliwattPerCubicMeter = mW/m³ +MilliwattPerLiter = mW/l +NanowattPerCubicFoot = nW/ft³ +NanowattPerCubicInch = nW/in³ +NanowattPerCubicMeter = nW/m³ +NanowattPerLiter = nW/l +PicowattPerCubicFoot = pW/ft³ +PicowattPerCubicInch = pW/in³ +PicowattPerCubicMeter = pW/m³ +PicowattPerLiter = pW/l +TerawattPerCubicFoot = TW/ft³ +TerawattPerCubicInch = TW/in³ +TerawattPerCubicMeter = TW/m³ +TerawattPerLiter = TW/l +WattPerCubicFoot = W/ft³ +WattPerCubicInch = W/in³ +WattPerCubicMeter = W/m³ +WattPerLiter = W/l diff --git a/UnitsNet/GeneratedCode/Resources/PowerRatio.restext b/UnitsNet/GeneratedCode/Resources/PowerRatio.restext new file mode 100644 index 0000000000..3d05e94571 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/PowerRatio.restext @@ -0,0 +1,2 @@ +DecibelMilliwatt = dBmW +DecibelWatt = dBW diff --git a/UnitsNet/GeneratedCode/Resources/Pressure.restext b/UnitsNet/GeneratedCode/Resources/Pressure.restext new file mode 100644 index 0000000000..c098e4258e --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Pressure.restext @@ -0,0 +1,47 @@ +Atmosphere = atm +Bar = bar +Centibar = cbar +Decapascal = daPa +Decibar = dbar +DynePerSquareCentimeter = dyn/cm² +FootOfElevation = ft of elevation +FootOfHead = ft of head +Gigapascal = GPa +Hectopascal = hPa +InchOfMercury = inHg +InchOfWaterColumn = inH2O +Kilobar = kbar +KilogramForcePerSquareCentimeter = kgf/cm² +KilogramForcePerSquareMeter = kgf/m² +KilogramForcePerSquareMillimeter = kgf/mm² +KilonewtonPerSquareCentimeter = kN/cm² +KilonewtonPerSquareMeter = kN/m² +KilonewtonPerSquareMillimeter = kN/mm² +Kilopascal = kPa +KilopoundForcePerSquareFoot = kipf/ft² +KilopoundForcePerSquareInch = ksi +KilopoundForcePerSquareMil = kipf/mil² +Megabar = Mbar +MeganewtonPerSquareMeter = MN/m² +Megapascal = MPa +MeterOfElevation = m of elevation +MeterOfHead = m of head +Microbar = µbar +Micropascal = µPa +Millibar = mbar +MillimeterOfMercury = mmHg +MillimeterOfWaterColumn = mmH2O +Millipascal = mPa +NewtonPerSquareCentimeter = N/cm² +NewtonPerSquareMeter = N/m² +NewtonPerSquareMillimeter = N/mm² +Pascal = Pa +PoundForcePerSquareFoot = lb/ft² +PoundForcePerSquareInch = psi +PoundForcePerSquareMil = lb/mil² +PoundPerInchSecondSquared = lbm/(in·s²) +TechnicalAtmosphere = at +TonneForcePerSquareCentimeter = tf/cm² +TonneForcePerSquareMeter = tf/m² +TonneForcePerSquareMillimeter = tf/mm² +Torr = torr diff --git a/UnitsNet/GeneratedCode/Resources/Pressure.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Pressure.ru-RU.restext new file mode 100644 index 0000000000..4399c0ef01 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Pressure.ru-RU.restext @@ -0,0 +1,31 @@ +Atmosphere = атм +Bar = бар +Centibar = сбар +Decapascal = даПа +Decibar = дбар +Gigapascal = ГПа +Hectopascal = гПа +Kilobar = кбар +KilogramForcePerSquareCentimeter = кгс/см² +KilogramForcePerSquareMeter = кгс/м² +KilogramForcePerSquareMillimeter = кгс/мм² +KilonewtonPerSquareCentimeter = кН/см² +KilonewtonPerSquareMeter = кН/м² +KilonewtonPerSquareMillimeter = кН/мм² +Kilopascal = кПа +KilopoundForcePerSquareInch = ksi +Megabar = Мбар +MeganewtonPerSquareMeter = МН/м² +Megapascal = МПа +Microbar = мкбар +Micropascal = мкПа +Millibar = мбар +MillimeterOfMercury = мм рт.ст. +Millipascal = мПа +NewtonPerSquareCentimeter = Н/см² +NewtonPerSquareMeter = Н/м² +NewtonPerSquareMillimeter = Н/мм² +Pascal = Па +PoundForcePerSquareInch = psi +TechnicalAtmosphere = ат +Torr = торр diff --git a/UnitsNet/GeneratedCode/Resources/PressureChangeRate.restext b/UnitsNet/GeneratedCode/Resources/PressureChangeRate.restext new file mode 100644 index 0000000000..cb149914f1 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/PressureChangeRate.restext @@ -0,0 +1,14 @@ +AtmospherePerSecond = atm/s +KilopascalPerMinute = kPa/min +KilopascalPerSecond = kPa/s +KilopoundForcePerSquareInchPerMinute = ksi/min +KilopoundForcePerSquareInchPerSecond = ksi/s +MegapascalPerMinute = MPa/min +MegapascalPerSecond = MPa/s +MegapoundForcePerSquareInchPerMinute = Mpsi/min +MegapoundForcePerSquareInchPerSecond = Mpsi/s +MillimeterOfMercuryPerSecond = mmHg/s +PascalPerMinute = Pa/min +PascalPerSecond = Pa/s +PoundForcePerSquareInchPerMinute = psi/min +PoundForcePerSquareInchPerSecond = psi/s diff --git a/UnitsNet/GeneratedCode/Resources/PressureChangeRate.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/PressureChangeRate.ru-RU.restext new file mode 100644 index 0000000000..b0770fbd4d --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/PressureChangeRate.ru-RU.restext @@ -0,0 +1,14 @@ +AtmospherePerSecond = атм/с +KilopascalPerMinute = кПа/мин +KilopascalPerSecond = кПа/с +KilopoundForcePerSquareInchPerMinute = ksi/мин +KilopoundForcePerSquareInchPerSecond = ksi/с +MegapascalPerMinute = МПа/мин +MegapascalPerSecond = МПа/с +MegapoundForcePerSquareInchPerMinute = Мpsi/мин +MegapoundForcePerSquareInchPerSecond = Мpsi/с +MillimeterOfMercuryPerSecond = mmHg/с +PascalPerMinute = Па/мин +PascalPerSecond = Па/с +PoundForcePerSquareInchPerMinute = psi/мин +PoundForcePerSquareInchPerSecond = psi/с diff --git a/UnitsNet/GeneratedCode/Resources/Ratio.restext b/UnitsNet/GeneratedCode/Resources/Ratio.restext new file mode 100644 index 0000000000..6c31abff6c --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Ratio.restext @@ -0,0 +1,6 @@ +DecimalFraction = +PartPerBillion = ppb +PartPerMillion = ppm +PartPerThousand = ‰ +PartPerTrillion = ppt +Percent = % diff --git a/UnitsNet/GeneratedCode/Resources/RatioChangeRate.restext b/UnitsNet/GeneratedCode/Resources/RatioChangeRate.restext new file mode 100644 index 0000000000..0cff72a40e --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/RatioChangeRate.restext @@ -0,0 +1,2 @@ +DecimalFractionPerSecond = /s +PercentPerSecond = %/s diff --git a/UnitsNet/GeneratedCode/Resources/ReactiveEnergy.restext b/UnitsNet/GeneratedCode/Resources/ReactiveEnergy.restext new file mode 100644 index 0000000000..b30d8a5dea --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ReactiveEnergy.restext @@ -0,0 +1,3 @@ +KilovoltampereReactiveHour = kvarh +MegavoltampereReactiveHour = Mvarh +VoltampereReactiveHour = varh diff --git a/UnitsNet/GeneratedCode/Resources/ReactivePower.restext b/UnitsNet/GeneratedCode/Resources/ReactivePower.restext new file mode 100644 index 0000000000..f78061dc8c --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ReactivePower.restext @@ -0,0 +1,4 @@ +GigavoltampereReactive = Gvar +KilovoltampereReactive = kvar +MegavoltampereReactive = Mvar +VoltampereReactive = var diff --git a/UnitsNet/GeneratedCode/Resources/ReciprocalArea.restext b/UnitsNet/GeneratedCode/Resources/ReciprocalArea.restext new file mode 100644 index 0000000000..d1e63bca85 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ReciprocalArea.restext @@ -0,0 +1,11 @@ +InverseSquareCentimeter = cm⁻² +InverseSquareDecimeter = dm⁻² +InverseSquareFoot = ft⁻² +InverseSquareInch = in⁻² +InverseSquareKilometer = km⁻² +InverseSquareMeter = m⁻² +InverseSquareMicrometer = µm⁻² +InverseSquareMile = mi⁻² +InverseSquareMillimeter = mm⁻² +InverseSquareYard = yd⁻² +InverseUsSurveySquareFoot = ft⁻² (US) diff --git a/UnitsNet/GeneratedCode/Resources/ReciprocalLength.restext b/UnitsNet/GeneratedCode/Resources/ReciprocalLength.restext new file mode 100644 index 0000000000..6166474446 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ReciprocalLength.restext @@ -0,0 +1,10 @@ +InverseCentimeter = cm⁻¹ +InverseFoot = ft⁻¹ +InverseInch = in⁻¹ +InverseMeter = m⁻¹ +InverseMicroinch = µin⁻¹ +InverseMil = mil⁻¹ +InverseMile = mi⁻¹ +InverseMillimeter = mm⁻¹ +InverseUsSurveyFoot = ftUS⁻¹ +InverseYard = yd⁻¹ diff --git a/UnitsNet/GeneratedCode/Resources/RelativeHumidity.restext b/UnitsNet/GeneratedCode/Resources/RelativeHumidity.restext new file mode 100644 index 0000000000..31006b795a --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/RelativeHumidity.restext @@ -0,0 +1 @@ +Percent = %RH diff --git a/UnitsNet/GeneratedCode/Resources/RotationalAcceleration.restext b/UnitsNet/GeneratedCode/Resources/RotationalAcceleration.restext new file mode 100644 index 0000000000..075f7f605b --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/RotationalAcceleration.restext @@ -0,0 +1,4 @@ +DegreePerSecondSquared = °/s² +RadianPerSecondSquared = rad/s² +RevolutionPerMinutePerSecond = rpm/s +RevolutionPerSecondSquared = r/s² diff --git a/UnitsNet/GeneratedCode/Resources/RotationalSpeed.restext b/UnitsNet/GeneratedCode/Resources/RotationalSpeed.restext new file mode 100644 index 0000000000..3fad46e7ff --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/RotationalSpeed.restext @@ -0,0 +1,13 @@ +CentiradianPerSecond = crad/s +DeciradianPerSecond = drad/s +DegreePerMinute = °/min +DegreePerSecond = °/s +MicrodegreePerSecond = µ°/s +MicroradianPerSecond = µrad/s +MillidegreePerSecond = m°/s +MilliradianPerSecond = mrad/s +NanodegreePerSecond = n°/s +NanoradianPerSecond = nrad/s +RadianPerSecond = rad/s +RevolutionPerMinute = rpm +RevolutionPerSecond = r/s diff --git a/UnitsNet/GeneratedCode/Resources/RotationalSpeed.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/RotationalSpeed.ru-RU.restext new file mode 100644 index 0000000000..91a81c7e5f --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/RotationalSpeed.ru-RU.restext @@ -0,0 +1,12 @@ +CentiradianPerSecond = срад/с +DeciradianPerSecond = драд/с +DegreePerSecond = °/с +MicrodegreePerSecond = мк°/с +MicroradianPerSecond = мкрад/с +MillidegreePerSecond = м°/с +MilliradianPerSecond = мрад/с +NanodegreePerSecond = н°/с +NanoradianPerSecond = нрад/с +RadianPerSecond = рад/с +RevolutionPerMinute = об/мин +RevolutionPerSecond = об/с diff --git a/UnitsNet/GeneratedCode/Resources/RotationalStiffness.restext b/UnitsNet/GeneratedCode/Resources/RotationalStiffness.restext new file mode 100644 index 0000000000..e45138c515 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/RotationalStiffness.restext @@ -0,0 +1,33 @@ +CentinewtonMeterPerDegree = cN·m/deg +CentinewtonMillimeterPerDegree = cN·mm/deg +CentinewtonMillimeterPerRadian = cN·mm/rad +DecanewtonMeterPerDegree = daN·m/deg +DecanewtonMillimeterPerDegree = daN·mm/deg +DecanewtonMillimeterPerRadian = daN·mm/rad +DecinewtonMeterPerDegree = dN·m/deg +DecinewtonMillimeterPerDegree = dN·mm/deg +DecinewtonMillimeterPerRadian = dN·mm/rad +KilonewtonMeterPerDegree = kN·m/deg +KilonewtonMeterPerRadian = kN·m/rad +KilonewtonMillimeterPerDegree = kN·mm/deg +KilonewtonMillimeterPerRadian = kN·mm/rad +KilopoundForceFootPerDegrees = kipf·ft/° +MeganewtonMeterPerDegree = MN·m/deg +MeganewtonMeterPerRadian = MN·m/rad +MeganewtonMillimeterPerDegree = MN·mm/deg +MeganewtonMillimeterPerRadian = MN·mm/rad +MicronewtonMeterPerDegree = µN·m/deg +MicronewtonMillimeterPerDegree = µN·mm/deg +MicronewtonMillimeterPerRadian = µN·mm/rad +MillinewtonMeterPerDegree = mN·m/deg +MillinewtonMillimeterPerDegree = mN·mm/deg +MillinewtonMillimeterPerRadian = mN·mm/rad +NanonewtonMeterPerDegree = nN·m/deg +NanonewtonMillimeterPerDegree = nN·mm/deg +NanonewtonMillimeterPerRadian = nN·mm/rad +NewtonMeterPerDegree = N·m/deg +NewtonMeterPerRadian = N·m/rad +NewtonMillimeterPerDegree = N·mm/deg +NewtonMillimeterPerRadian = N·mm/rad +PoundForceFeetPerRadian = lbf·ft/rad +PoundForceFootPerDegrees = lbf·ft/deg diff --git a/UnitsNet/GeneratedCode/Resources/RotationalStiffnessPerLength.restext b/UnitsNet/GeneratedCode/Resources/RotationalStiffnessPerLength.restext new file mode 100644 index 0000000000..9e11fa7d24 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/RotationalStiffnessPerLength.restext @@ -0,0 +1,5 @@ +KilonewtonMeterPerRadianPerMeter = kN·m/rad/m +KilopoundForceFootPerDegreesPerFoot = kipf·ft/°/ft +MeganewtonMeterPerRadianPerMeter = MN·m/rad/m +NewtonMeterPerRadianPerMeter = N·m/rad/m +PoundForceFootPerDegreesPerFoot = lbf·ft/deg/ft diff --git a/UnitsNet/GeneratedCode/Resources/Scalar.restext b/UnitsNet/GeneratedCode/Resources/Scalar.restext new file mode 100644 index 0000000000..995d055a69 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Scalar.restext @@ -0,0 +1 @@ +Amount = diff --git a/UnitsNet/GeneratedCode/Resources/SolidAngle.restext b/UnitsNet/GeneratedCode/Resources/SolidAngle.restext new file mode 100644 index 0000000000..657e047efc --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/SolidAngle.restext @@ -0,0 +1 @@ +Steradian = sr diff --git a/UnitsNet/GeneratedCode/Resources/SpecificEnergy.restext b/UnitsNet/GeneratedCode/Resources/SpecificEnergy.restext new file mode 100644 index 0000000000..c4373a70ae --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/SpecificEnergy.restext @@ -0,0 +1,30 @@ +BtuPerPound = btu/lb +CaloriePerGram = cal/g +GigawattDayPerKilogram = GWd/kg +GigawattDayPerShortTon = GWd/ST +GigawattDayPerTonne = GWd/t +GigawattHourPerKilogram = GWh/kg +GigawattHourPerPound = GWh/lbs +JoulePerKilogram = J/kg +KilocaloriePerGram = kcal/g +KilojoulePerKilogram = kJ/kg +KilowattDayPerKilogram = kWd/kg +KilowattDayPerShortTon = kWd/ST +KilowattDayPerTonne = kWd/t +KilowattHourPerKilogram = kWh/kg +KilowattHourPerPound = kWh/lbs +MegajoulePerKilogram = MJ/kg +MegaJoulePerTonne = MJ/t +MegawattDayPerKilogram = MWd/kg +MegawattDayPerShortTon = MWd/ST +MegawattDayPerTonne = MWd/t +MegawattHourPerKilogram = MWh/kg +MegawattHourPerPound = MWh/lbs +TerawattDayPerKilogram = TWd/kg +TerawattDayPerShortTon = TWd/ST +TerawattDayPerTonne = TWd/t +WattDayPerKilogram = Wd/kg +WattDayPerShortTon = Wd/ST +WattDayPerTonne = Wd/t +WattHourPerKilogram = Wh/kg +WattHourPerPound = Wh/lbs diff --git a/UnitsNet/GeneratedCode/Resources/SpecificEntropy.restext b/UnitsNet/GeneratedCode/Resources/SpecificEntropy.restext new file mode 100644 index 0000000000..43369f652d --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/SpecificEntropy.restext @@ -0,0 +1,9 @@ +BtuPerPoundFahrenheit = BTU/lb·°F +CaloriePerGramKelvin = cal/g.K +JoulePerKilogramDegreeCelsius = J/kg.C +JoulePerKilogramKelvin = J/kg.K +KilocaloriePerGramKelvin = kcal/g.K +KilojoulePerKilogramDegreeCelsius = kJ/kg.C +KilojoulePerKilogramKelvin = kJ/kg.K +MegajoulePerKilogramDegreeCelsius = MJ/kg.C +MegajoulePerKilogramKelvin = MJ/kg.K diff --git a/UnitsNet/GeneratedCode/Resources/SpecificFuelConsumption.restext b/UnitsNet/GeneratedCode/Resources/SpecificFuelConsumption.restext new file mode 100644 index 0000000000..fe268e38c1 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/SpecificFuelConsumption.restext @@ -0,0 +1,4 @@ +GramPerKiloNewtonSecond = g/(kN�s) +KilogramPerKilogramForceHour = kg/(kgf�h) +KilogramPerKiloNewtonSecond = kg/(kN�s) +PoundMassPerPoundForceHour = lb/(lbf·h) diff --git a/UnitsNet/GeneratedCode/Resources/SpecificVolume.restext b/UnitsNet/GeneratedCode/Resources/SpecificVolume.restext new file mode 100644 index 0000000000..4b530ee6b3 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/SpecificVolume.restext @@ -0,0 +1,3 @@ +CubicFootPerPound = ft³/lb +CubicMeterPerKilogram = m³/kg +MillicubicMeterPerKilogram = mm³/kg diff --git a/UnitsNet/GeneratedCode/Resources/SpecificWeight.restext b/UnitsNet/GeneratedCode/Resources/SpecificWeight.restext new file mode 100644 index 0000000000..da5711d65a --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/SpecificWeight.restext @@ -0,0 +1,17 @@ +KilogramForcePerCubicCentimeter = kgf/cm³ +KilogramForcePerCubicMeter = kgf/m³ +KilogramForcePerCubicMillimeter = kgf/mm³ +KilonewtonPerCubicCentimeter = kN/cm³ +KilonewtonPerCubicMeter = kN/m³ +KilonewtonPerCubicMillimeter = kN/mm³ +KilopoundForcePerCubicFoot = kipf/ft³ +KilopoundForcePerCubicInch = kipf/in³ +MeganewtonPerCubicMeter = MN/m³ +NewtonPerCubicCentimeter = N/cm³ +NewtonPerCubicMeter = N/m³ +NewtonPerCubicMillimeter = N/mm³ +PoundForcePerCubicFoot = lbf/ft³ +PoundForcePerCubicInch = lbf/in³ +TonneForcePerCubicCentimeter = tf/cm³ +TonneForcePerCubicMeter = tf/m³ +TonneForcePerCubicMillimeter = tf/mm³ diff --git a/UnitsNet/GeneratedCode/Resources/Speed.restext b/UnitsNet/GeneratedCode/Resources/Speed.restext new file mode 100644 index 0000000000..2fb04b3965 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Speed.restext @@ -0,0 +1,33 @@ +CentimeterPerHour = cm/h +CentimeterPerMinute = cm/min +CentimeterPerSecond = cm/s +DecimeterPerMinute = dm/min +DecimeterPerSecond = dm/s +FootPerHour = ft/h +FootPerMinute = ft/min +FootPerSecond = ft/s +InchPerHour = in/h +InchPerMinute = in/min +InchPerSecond = in/s +KilometerPerHour = km/h +KilometerPerMinute = km/min +KilometerPerSecond = km/s +Knot = kn +Mach = M +MeterPerHour = m/h +MeterPerMinute = m/min +MeterPerSecond = m/s +MicrometerPerMinute = µm/min +MicrometerPerSecond = µm/s +MilePerHour = mph +MillimeterPerHour = mm/h +MillimeterPerMinute = mm/min +MillimeterPerSecond = mm/s +NanometerPerMinute = nm/min +NanometerPerSecond = nm/s +UsSurveyFootPerHour = ftUS/h +UsSurveyFootPerMinute = ftUS/min +UsSurveyFootPerSecond = ftUS/s +YardPerHour = yd/h +YardPerMinute = yd/min +YardPerSecond = yd/s diff --git a/UnitsNet/GeneratedCode/Resources/Speed.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Speed.ru-RU.restext new file mode 100644 index 0000000000..bd4af83040 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Speed.ru-RU.restext @@ -0,0 +1,24 @@ +CentimeterPerHour = см/ч +CentimeterPerMinute = см/мин +CentimeterPerSecond = см/с +DecimeterPerMinute = дм/мин +DecimeterPerSecond = дм/с +FootPerHour = фут/ч +FootPerMinute = фут/мин +FootPerSecond = фут/с +KilometerPerHour = км/ч +KilometerPerMinute = км/мин +KilometerPerSecond = км/с +Knot = уз. +Mach = мах +MeterPerHour = м/ч +MeterPerMinute = м/мин +MeterPerSecond = м/с +MicrometerPerMinute = мкм/мин +MicrometerPerSecond = мкм/с +MilePerHour = миль/ч +MillimeterPerHour = мм/ч +MillimeterPerMinute = мм/мин +MillimeterPerSecond = мм/с +NanometerPerMinute = нм/мин +NanometerPerSecond = нм/с diff --git a/UnitsNet/GeneratedCode/Resources/StandardVolumeFlow.restext b/UnitsNet/GeneratedCode/Resources/StandardVolumeFlow.restext new file mode 100644 index 0000000000..3d9d12cdca --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/StandardVolumeFlow.restext @@ -0,0 +1,9 @@ +StandardCubicCentimeterPerMinute = sccm +StandardCubicFootPerHour = scfh +StandardCubicFootPerMinute = scfm +StandardCubicFootPerSecond = Sft³/s +StandardCubicMeterPerDay = Sm³/d +StandardCubicMeterPerHour = Sm³/h +StandardCubicMeterPerMinute = Sm³/min +StandardCubicMeterPerSecond = Sm³/s +StandardLiterPerMinute = slm diff --git a/UnitsNet/GeneratedCode/Resources/Temperature.restext b/UnitsNet/GeneratedCode/Resources/Temperature.restext new file mode 100644 index 0000000000..1d3ed8aa02 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Temperature.restext @@ -0,0 +1,10 @@ +DegreeCelsius = °C +DegreeDelisle = °De +DegreeFahrenheit = °F +DegreeNewton = °N +DegreeRankine = °R +DegreeReaumur = °Ré +DegreeRoemer = °Rø +Kelvin = K +MillidegreeCelsius = m°C +SolarTemperature = T⊙ diff --git a/UnitsNet/GeneratedCode/Resources/TemperatureChangeRate.restext b/UnitsNet/GeneratedCode/Resources/TemperatureChangeRate.restext new file mode 100644 index 0000000000..1e3c35a981 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/TemperatureChangeRate.restext @@ -0,0 +1,10 @@ +CentidegreeCelsiusPerSecond = c°C/s +DecadegreeCelsiusPerSecond = da°C/s +DecidegreeCelsiusPerSecond = d°C/s +DegreeCelsiusPerMinute = °C/min +DegreeCelsiusPerSecond = °C/s +HectodegreeCelsiusPerSecond = h°C/s +KilodegreeCelsiusPerSecond = k°C/s +MicrodegreeCelsiusPerSecond = µ°C/s +MillidegreeCelsiusPerSecond = m°C/s +NanodegreeCelsiusPerSecond = n°C/s diff --git a/UnitsNet/GeneratedCode/Resources/TemperatureDelta.restext b/UnitsNet/GeneratedCode/Resources/TemperatureDelta.restext new file mode 100644 index 0000000000..2fd436a924 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/TemperatureDelta.restext @@ -0,0 +1,9 @@ +DegreeCelsius = ∆°C +DegreeDelisle = ∆°De +DegreeFahrenheit = ∆°F +DegreeNewton = ∆°N +DegreeRankine = ∆°R +DegreeReaumur = ∆°Ré +DegreeRoemer = ∆°Rø +Kelvin = ∆K +MillidegreeCelsius = ∆m°C diff --git a/UnitsNet/GeneratedCode/Resources/TemperatureGradient.restext b/UnitsNet/GeneratedCode/Resources/TemperatureGradient.restext new file mode 100644 index 0000000000..72794b1697 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/TemperatureGradient.restext @@ -0,0 +1,4 @@ +DegreeCelsiusPerKilometer = ∆°C/km +DegreeCelsiusPerMeter = ∆°C/m +DegreeFahrenheitPerFoot = ∆°F/ft +KelvinPerMeter = ∆°K/m diff --git a/UnitsNet/GeneratedCode/Resources/ThermalConductivity.restext b/UnitsNet/GeneratedCode/Resources/ThermalConductivity.restext new file mode 100644 index 0000000000..6d7cbcb6e4 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ThermalConductivity.restext @@ -0,0 +1,2 @@ +BtuPerHourFootFahrenheit = BTU/h·ft·°F +WattPerMeterKelvin = W/m·K diff --git a/UnitsNet/GeneratedCode/Resources/ThermalResistance.restext b/UnitsNet/GeneratedCode/Resources/ThermalResistance.restext new file mode 100644 index 0000000000..a71f8ef9f7 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ThermalResistance.restext @@ -0,0 +1,6 @@ +HourSquareFeetDegreeFahrenheitPerBtu = Hrft²°F/Btu +SquareCentimeterHourDegreeCelsiusPerKilocalorie = cm²Hr°C/kcal +SquareCentimeterKelvinPerWatt = cm²K/W +SquareMeterDegreeCelsiusPerWatt = m²°C/W +SquareMeterKelvinPerKilowatt = m²K/kW +SquareMeterKelvinPerWatt = m²K/W diff --git a/UnitsNet/GeneratedCode/Resources/Torque.restext b/UnitsNet/GeneratedCode/Resources/Torque.restext new file mode 100644 index 0000000000..0e79be47ca --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Torque.restext @@ -0,0 +1,25 @@ +GramForceCentimeter = gf·cm +GramForceMeter = gf·m +GramForceMillimeter = gf·mm +KilogramForceCentimeter = kgf·cm +KilogramForceMeter = kgf·m +KilogramForceMillimeter = kgf·mm +KilonewtonCentimeter = kN·cm +KilonewtonMeter = kN·m +KilonewtonMillimeter = kN·mm +KilopoundForceFoot = kipf·ft +KilopoundForceInch = kipf·in +MeganewtonCentimeter = MN·cm +MeganewtonMeter = MN·m +MeganewtonMillimeter = MN·mm +MegapoundForceFoot = Mlbf·ft +MegapoundForceInch = Mlbf·in +NewtonCentimeter = N·cm +NewtonMeter = N·m +NewtonMillimeter = N·mm +PoundalFoot = pdl·ft +PoundForceFoot = lbf·ft +PoundForceInch = lbf·in +TonneForceCentimeter = tf·cm +TonneForceMeter = tf·m +TonneForceMillimeter = tf·mm diff --git a/UnitsNet/GeneratedCode/Resources/Torque.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Torque.ru-RU.restext new file mode 100644 index 0000000000..da187c6ed7 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Torque.ru-RU.restext @@ -0,0 +1,3 @@ +KilonewtonMeter = кН·м +MeganewtonMeter = МН·м +NewtonMeter = Н·м diff --git a/UnitsNet/GeneratedCode/Resources/TorquePerLength.restext b/UnitsNet/GeneratedCode/Resources/TorquePerLength.restext new file mode 100644 index 0000000000..921366789b --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/TorquePerLength.restext @@ -0,0 +1,21 @@ +KilogramForceCentimeterPerMeter = kgf·cm/m +KilogramForceMeterPerMeter = kgf·m/m +KilogramForceMillimeterPerMeter = kgf·mm/m +KilonewtonCentimeterPerMeter = kN·cm/m +KilonewtonMeterPerMeter = kN·m/m +KilonewtonMillimeterPerMeter = kN·mm/m +KilopoundForceFootPerFoot = kipf·ft/ft +KilopoundForceInchPerFoot = kipf·in/ft +MeganewtonCentimeterPerMeter = MN·cm/m +MeganewtonMeterPerMeter = MN·m/m +MeganewtonMillimeterPerMeter = MN·mm/m +MegapoundForceFootPerFoot = Mlbf·ft/ft +MegapoundForceInchPerFoot = Mlbf·in/ft +NewtonCentimeterPerMeter = N·cm/m +NewtonMeterPerMeter = N·m/m +NewtonMillimeterPerMeter = N·mm/m +PoundForceFootPerFoot = lbf·ft/ft +PoundForceInchPerFoot = lbf·in/ft +TonneForceCentimeterPerMeter = tf·cm/m +TonneForceMeterPerMeter = tf·m/m +TonneForceMillimeterPerMeter = tf·mm/m diff --git a/UnitsNet/GeneratedCode/Resources/TorquePerLength.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/TorquePerLength.ru-RU.restext new file mode 100644 index 0000000000..595a984236 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/TorquePerLength.ru-RU.restext @@ -0,0 +1,3 @@ +KilonewtonMeterPerMeter = кН·м/м +MeganewtonMeterPerMeter = МН·м/м +NewtonMeterPerMeter = Н·м/м diff --git a/UnitsNet/GeneratedCode/Resources/Turbidity.restext b/UnitsNet/GeneratedCode/Resources/Turbidity.restext new file mode 100644 index 0000000000..5b80222cfa --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Turbidity.restext @@ -0,0 +1 @@ +NTU = NTU diff --git a/UnitsNet/GeneratedCode/Resources/VitaminA.restext b/UnitsNet/GeneratedCode/Resources/VitaminA.restext new file mode 100644 index 0000000000..5fd329ab68 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/VitaminA.restext @@ -0,0 +1 @@ +InternationalUnit = IU diff --git a/UnitsNet/GeneratedCode/Resources/Volume.fr-CA.restext b/UnitsNet/GeneratedCode/Resources/Volume.fr-CA.restext new file mode 100644 index 0000000000..4a72150a55 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Volume.fr-CA.restext @@ -0,0 +1 @@ +BoardFoot = pmp diff --git a/UnitsNet/GeneratedCode/Resources/Volume.nb-NO.restext b/UnitsNet/GeneratedCode/Resources/Volume.nb-NO.restext new file mode 100644 index 0000000000..e69de29bb2 diff --git a/UnitsNet/GeneratedCode/Resources/Volume.restext b/UnitsNet/GeneratedCode/Resources/Volume.restext new file mode 100644 index 0000000000..a65c28e162 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Volume.restext @@ -0,0 +1,46 @@ +AcreFoot = ac-ft +BoardFoot = bf +Centiliter = cl +CubicCentimeter = cm³ +CubicDecimeter = dm³ +CubicFoot = ft³ +CubicHectometer = hm³ +CubicInch = in³ +CubicKilometer = km³ +CubicMeter = m³ +CubicMicrometer = µm³ +CubicMile = mi³ +CubicMillimeter = mm³ +CubicYard = yd³ +Decaliter = dal +DecausGallon = dagal (U.S.) +Deciliter = dl +DeciusGallon = dgal (U.S.) +HectocubicFoot = hft³ +HectocubicMeter = hm³ +Hectoliter = hl +HectousGallon = hgal (U.S.) +ImperialBeerBarrel = bl (imp.) +ImperialGallon = gal (imp.) +ImperialOunce = oz (imp.) +ImperialPint = pt (imp.) +KilocubicFoot = kft³ +KilocubicMeter = km³ +KiloimperialGallon = kgal (imp.) +Kiloliter = kl +KilousGallon = kgal (U.S.) +Liter = l +MegacubicFoot = Mft³ +MegaimperialGallon = Mgal (imp.) +Megaliter = Ml +MegausGallon = Mgal (U.S.) +MetricTeaspoon = tsp +Microliter = µl +Milliliter = ml +Nanoliter = nl +OilBarrel = bbl +UsBeerBarrel = bl (U.S.) +UsGallon = gal (U.S.) +UsOunce = oz (U.S.) +UsPint = pt (U.S.) +UsQuart = qt (U.S.) diff --git a/UnitsNet/GeneratedCode/Resources/Volume.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Volume.ru-RU.restext new file mode 100644 index 0000000000..8de2b636c8 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Volume.ru-RU.restext @@ -0,0 +1,37 @@ +Centiliter = сл +CubicCentimeter = см³ +CubicDecimeter = дм³ +CubicFoot = фут³ +CubicHectometer = гм³ +CubicInch = дюйм³ +CubicKilometer = км³ +CubicMeter = м³ +CubicMicrometer = мкм³ +CubicMile = миля³ +CubicMillimeter = мм³ +CubicYard = ярд³ +Decaliter = дал +DecausGallon = даАмериканский галлон +Deciliter = дл +DeciusGallon = дАмериканский галлон +HectocubicFoot = гфут³ +HectocubicMeter = гм³ +Hectoliter = гл +HectousGallon = гАмериканский галлон +ImperialGallon = Английский галлон +ImperialOunce = Английская унция +KilocubicFoot = кфут³ +KilocubicMeter = км³ +KiloimperialGallon = кАнглийский галлон +Kiloliter = кл +KilousGallon = кАмериканский галлон +Liter = л +MegacubicFoot = Мфут³ +MegaimperialGallon = МАнглийский галлон +Megaliter = Мл +MegausGallon = МАмериканский галлон +Microliter = мкл +Milliliter = мл +Nanoliter = нл +UsGallon = Американский галлон +UsOunce = Американская унция diff --git a/UnitsNet/GeneratedCode/Resources/VolumeConcentration.restext b/UnitsNet/GeneratedCode/Resources/VolumeConcentration.restext new file mode 100644 index 0000000000..688c578ff3 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/VolumeConcentration.restext @@ -0,0 +1,20 @@ +CentilitersPerLiter = cL/L +CentilitersPerMililiter = cL/mL +DecilitersPerLiter = dL/L +DecilitersPerMililiter = dL/mL +DecimalFraction = +LitersPerLiter = L/L +LitersPerMililiter = L/mL +MicrolitersPerLiter = µL/L +MicrolitersPerMililiter = µL/mL +MillilitersPerLiter = mL/L +MillilitersPerMililiter = mL/mL +NanolitersPerLiter = nL/L +NanolitersPerMililiter = nL/mL +PartPerBillion = ppb +PartPerMillion = ppm +PartPerThousand = ‰ +PartPerTrillion = ppt +Percent = % +PicolitersPerLiter = pL/L +PicolitersPerMililiter = pL/mL diff --git a/UnitsNet/GeneratedCode/Resources/VolumeFlow.restext b/UnitsNet/GeneratedCode/Resources/VolumeFlow.restext new file mode 100644 index 0000000000..e660c4d344 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/VolumeFlow.restext @@ -0,0 +1,62 @@ +AcreFootPerDay = af/d +AcreFootPerHour = af/h +AcreFootPerMinute = af/m +AcreFootPerSecond = af/s +CentiliterPerDay = cl/day +CentiliterPerHour = cL/h +CentiliterPerMinute = cL/min +CentiliterPerSecond = cL/s +CubicCentimeterPerMinute = cm³/min +CubicDecimeterPerMinute = dm³/min +CubicFootPerHour = ft³/h +CubicFootPerMinute = ft³/min +CubicFootPerSecond = ft³/s +CubicMeterPerDay = m³/d +CubicMeterPerHour = m³/h +CubicMeterPerMinute = m³/min +CubicMeterPerSecond = m³/s +CubicMillimeterPerSecond = mm³/s +CubicYardPerDay = cy/day +CubicYardPerHour = yd³/h +CubicYardPerMinute = yd³/min +CubicYardPerSecond = yd³/s +DeciliterPerDay = dl/day +DeciliterPerHour = dL/h +DeciliterPerMinute = dL/min +DeciliterPerSecond = dL/s +KiloliterPerDay = kl/day +KiloliterPerHour = kL/h +KiloliterPerMinute = kL/min +KiloliterPerSecond = kL/s +KilousGallonPerMinute = kgal (U.S.)/min +LiterPerDay = l/day +LiterPerHour = L/h +LiterPerMinute = L/min +LiterPerSecond = L/s +MegaliterPerDay = Ml/day +MegaukGallonPerSecond = Mgal (imp.)/s +MicroliterPerDay = µl/day +MicroliterPerHour = µL/h +MicroliterPerMinute = µL/min +MicroliterPerSecond = µL/s +MilliliterPerDay = ml/day +MilliliterPerHour = mL/h +MilliliterPerMinute = mL/min +MilliliterPerSecond = mL/s +MillionUsGallonPerDay = MGD +NanoliterPerDay = nl/day +NanoliterPerHour = nL/h +NanoliterPerMinute = nL/min +NanoliterPerSecond = nL/s +OilBarrelPerDay = bbl/d +OilBarrelPerHour = bbl/hr +OilBarrelPerMinute = bbl/min +OilBarrelPerSecond = bbl/s +UkGallonPerDay = gal (U. K.)/d +UkGallonPerHour = gal (imp.)/h +UkGallonPerMinute = gal (imp.)/min +UkGallonPerSecond = gal (imp.)/s +UsGallonPerDay = gpd +UsGallonPerHour = gal (U.S.)/h +UsGallonPerMinute = gal (U.S.)/min +UsGallonPerSecond = gal (U.S.)/s diff --git a/UnitsNet/GeneratedCode/Resources/VolumeFlow.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/VolumeFlow.ru-RU.restext new file mode 100644 index 0000000000..910469fce8 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/VolumeFlow.ru-RU.restext @@ -0,0 +1,27 @@ +CentiliterPerHour = сл/ч +CentiliterPerMinute = сл/мин +CentiliterPerSecond = сл/c +CubicCentimeterPerMinute = см³/мин +CubicDecimeterPerMinute = дм³/мин +CubicMeterPerHour = м³/ч +CubicMeterPerMinute = м³/мин +CubicMeterPerSecond = м³/с +CubicMillimeterPerSecond = мм³/с +DeciliterPerHour = дл/ч +DeciliterPerMinute = дл/мин +DeciliterPerSecond = дл/c +KiloliterPerHour = кл/ч +KiloliterPerMinute = кл/мин +KiloliterPerSecond = кл/c +LiterPerHour = л/ч +LiterPerMinute = л/мин +LiterPerSecond = л/c +MicroliterPerHour = мкл/ч +MicroliterPerMinute = мкл/мин +MicroliterPerSecond = мкл/c +MilliliterPerHour = мл/ч +MilliliterPerMinute = мл/мин +MilliliterPerSecond = мл/c +NanoliterPerHour = нл/ч +NanoliterPerMinute = нл/мин +NanoliterPerSecond = нл/c diff --git a/UnitsNet/GeneratedCode/Resources/VolumeFlowPerArea.restext b/UnitsNet/GeneratedCode/Resources/VolumeFlowPerArea.restext new file mode 100644 index 0000000000..c6ef83eb33 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/VolumeFlowPerArea.restext @@ -0,0 +1,2 @@ +CubicFootPerMinutePerSquareFoot = CFM/ft² +CubicMeterPerSecondPerSquareMeter = m³/(s·m²) diff --git a/UnitsNet/GeneratedCode/Resources/VolumePerLength.restext b/UnitsNet/GeneratedCode/Resources/VolumePerLength.restext new file mode 100644 index 0000000000..528c9a879f --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/VolumePerLength.restext @@ -0,0 +1,7 @@ +CubicMeterPerMeter = m³/m +CubicYardPerFoot = yd³/ft +CubicYardPerUsSurveyFoot = yd³/ftUS +LiterPerKilometer = l/km +LiterPerMeter = l/m +LiterPerMillimeter = l/mm +OilBarrelPerFoot = bbl/ft diff --git a/UnitsNet/GeneratedCode/Resources/VolumetricHeatCapacity.restext b/UnitsNet/GeneratedCode/Resources/VolumetricHeatCapacity.restext new file mode 100644 index 0000000000..cde8d35134 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/VolumetricHeatCapacity.restext @@ -0,0 +1,9 @@ +BtuPerCubicFootDegreeFahrenheit = BTU/ft³·°F +CaloriePerCubicCentimeterDegreeCelsius = cal/cm³·°C +JoulePerCubicMeterDegreeCelsius = J/m³·°C +JoulePerCubicMeterKelvin = J/m³·K +KilocaloriePerCubicCentimeterDegreeCelsius = kcal/cm³·°C +KilojoulePerCubicMeterDegreeCelsius = kJ/m³·°C +KilojoulePerCubicMeterKelvin = kJ/m³·K +MegajoulePerCubicMeterDegreeCelsius = MJ/m³·°C +MegajoulePerCubicMeterKelvin = MJ/m³·K diff --git a/UnitsNet/GeneratedCode/Resources/WarpingMomentOfInertia.restext b/UnitsNet/GeneratedCode/Resources/WarpingMomentOfInertia.restext new file mode 100644 index 0000000000..b8a7fdc31b --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/WarpingMomentOfInertia.restext @@ -0,0 +1,6 @@ +CentimeterToTheSixth = cm⁶ +DecimeterToTheSixth = dm⁶ +FootToTheSixth = ft⁶ +InchToTheSixth = in⁶ +MeterToTheSixth = m⁶ +MillimeterToTheSixth = mm⁶ diff --git a/UnitsNet/UnitsNet.csproj b/UnitsNet/UnitsNet.csproj index 9a8f96380d..996c5cdfae 100644 --- a/UnitsNet/UnitsNet.csproj +++ b/UnitsNet/UnitsNet.csproj @@ -1,4 +1,4 @@ - + UnitsNet @@ -65,4 +65,8 @@ + + + + From d8ce4b48ac01590c6ec05f61b48c69c831ce4d76 Mon Sep 17 00:00:00 2001 From: Tristan Milnthorp Date: Tue, 21 Feb 2023 11:02:33 -0500 Subject: [PATCH 02/26] Generate all abbreviations --- CodeGen/Generators/UnitsNetGenerator.cs | 14 +- .../Resources/Acceleration.restext | 28 ++-- .../Resources/Acceleration.ru-RU.restext | 28 ++-- .../Resources/AmountOfSubstance.restext | 30 ++--- .../Resources/AmplitudeRatio.restext | 8 +- .../GeneratedCode/Resources/Angle.restext | 32 ++--- .../Resources/Angle.ru-RU.restext | 24 ++-- .../Resources/ApparentEnergy.restext | 6 +- .../Resources/ApparentPower.restext | 12 +- UnitsNet/GeneratedCode/Resources/Area.restext | 28 ++-- .../Resources/Area.ru-RU.restext | 28 ++-- .../Resources/Area.zh-CN.restext | 26 ++-- .../Resources/AreaDensity.restext | 6 +- .../Resources/AreaMomentOfInertia.restext | 12 +- .../GeneratedCode/Resources/BitRate.restext | 52 ++++---- .../BrakeSpecificFuelConsumption.restext | 6 +- .../Resources/Capacitance.restext | 14 +- .../CoefficientOfThermalExpansion.restext | 6 +- .../Resources/Compressibility.restext | 14 +- .../GeneratedCode/Resources/Density.restext | 102 +++++++------- .../Resources/Density.ru-RU.restext | 8 +- .../GeneratedCode/Resources/Duration.restext | 22 ++-- .../Resources/Duration.ru-RU.restext | 20 +-- .../Resources/DynamicViscosity.restext | 20 +-- .../Resources/ElectricAdmittance.restext | 8 +- .../Resources/ElectricCharge.restext | 22 ++-- .../Resources/ElectricChargeDensity.restext | 2 +- .../Resources/ElectricConductance.restext | 10 +- .../Resources/ElectricConductivity.restext | 12 +- .../Resources/ElectricCurrent.restext | 18 +-- .../Resources/ElectricCurrentDensity.restext | 6 +- .../Resources/ElectricCurrentGradient.restext | 8 +- .../Resources/ElectricField.restext | 2 +- .../Resources/ElectricInductance.restext | 10 +- .../Resources/ElectricPotential.restext | 12 +- .../Resources/ElectricPotential.ru-RU.restext | 12 +- .../Resources/ElectricPotentialAc.restext | 10 +- .../ElectricPotentialChangeRate.restext | 40 +++--- .../Resources/ElectricPotentialDc.restext | 10 +- .../Resources/ElectricResistance.restext | 14 +- .../Resources/ElectricResistivity.restext | 28 ++-- .../ElectricSurfaceChargeDensity.restext | 6 +- .../GeneratedCode/Resources/Energy.restext | 76 +++++------ .../Resources/Energy.ru-RU.restext | 42 +++--- .../Resources/EnergyDensity.restext | 24 ++-- .../GeneratedCode/Resources/Entropy.restext | 14 +- .../GeneratedCode/Resources/Force.restext | 30 ++--- .../Resources/Force.ru-RU.restext | 26 ++-- .../Resources/ForceChangeRate.restext | 30 ++--- .../Resources/ForcePerLength.restext | 76 +++++------ .../Resources/ForcePerLength.ru-RU.restext | 12 +- .../GeneratedCode/Resources/Frequency.restext | 26 ++-- .../Resources/Frequency.ru-RU.restext | 18 +-- .../Resources/FuelEfficiency.restext | 8 +- .../GeneratedCode/Resources/HeatFlux.restext | 36 ++--- .../Resources/HeatTransferCoefficient.restext | 12 +- .../Resources/Illuminance.restext | 8 +- .../GeneratedCode/Resources/Impulse.restext | 26 ++-- .../Resources/Information.restext | 52 ++++---- .../Resources/Irradiance.restext | 28 ++-- .../Resources/Irradiation.restext | 14 +- UnitsNet/GeneratedCode/Resources/Jerk.restext | 22 ++-- .../Resources/Jerk.ru-RU.restext | 22 ++-- .../Resources/KinematicViscosity.restext | 18 +-- .../KinematicViscosity.ru-RU.restext | 16 +-- .../GeneratedCode/Resources/Length.restext | 72 +++++----- .../Resources/Length.ru-RU.restext | 32 ++--- .../Resources/Length.zh-CN.restext | 32 ++--- .../GeneratedCode/Resources/Level.restext | 4 +- .../Resources/LinearDensity.restext | 28 ++-- .../Resources/LinearPowerDensity.restext | 50 +++---- .../GeneratedCode/Resources/Luminance.restext | 20 +-- .../Resources/Luminosity.restext | 28 ++-- .../Resources/LuminousFlux.restext | 2 +- .../Resources/LuminousIntensity.restext | 2 +- .../Resources/MagneticField.restext | 12 +- .../Resources/MagneticFlux.restext | 2 +- .../Resources/Magnetization.restext | 2 +- UnitsNet/GeneratedCode/Resources/Mass.restext | 50 +++---- .../Resources/Mass.ru-RU.restext | 34 ++--- .../Resources/Mass.zh-CN.restext | 36 ++--- .../Resources/MassConcentration.restext | 98 +++++++------- .../Resources/MassConcentration.ru-RU.restext | 8 +- .../GeneratedCode/Resources/MassFlow.restext | 66 +++++----- .../Resources/MassFlow.ru-RU.restext | 4 +- .../GeneratedCode/Resources/MassFlux.restext | 24 ++-- .../Resources/MassFraction.restext | 48 +++---- .../Resources/MassMomentOfInertia.restext | 56 ++++---- .../Resources/MolarEnergy.restext | 6 +- .../Resources/MolarEntropy.restext | 6 +- .../GeneratedCode/Resources/MolarFlow.restext | 18 +-- .../GeneratedCode/Resources/MolarMass.restext | 26 ++-- .../Resources/MolarMass.ru-RU.restext | 24 ++-- .../GeneratedCode/Resources/Molarity.restext | 22 ++-- .../Resources/Permeability.restext | 2 +- .../Resources/Permittivity.restext | 2 +- .../PorousMediumPermeability.restext | 10 +- .../GeneratedCode/Resources/Power.restext | 52 ++++---- .../Resources/PowerDensity.restext | 88 ++++++------- .../Resources/PowerRatio.restext | 4 +- .../GeneratedCode/Resources/Pressure.restext | 94 ++++++------- .../Resources/Pressure.ru-RU.restext | 62 ++++----- .../Resources/PressureChangeRate.restext | 28 ++-- .../PressureChangeRate.ru-RU.restext | 28 ++-- .../GeneratedCode/Resources/Ratio.restext | 12 +- .../Resources/RatioChangeRate.restext | 4 +- .../Resources/ReactiveEnergy.restext | 6 +- .../Resources/ReactivePower.restext | 8 +- .../Resources/ReciprocalArea.restext | 22 ++-- .../Resources/ReciprocalLength.restext | 20 +-- .../Resources/RelativeHumidity.restext | 2 +- .../Resources/RotationalAcceleration.restext | 8 +- .../Resources/RotationalSpeed.restext | 26 ++-- .../Resources/RotationalSpeed.ru-RU.restext | 24 ++-- .../Resources/RotationalStiffness.restext | 66 +++++----- .../RotationalStiffnessPerLength.restext | 10 +- .../GeneratedCode/Resources/Scalar.restext | 2 +- .../Resources/SolidAngle.restext | 2 +- .../Resources/SpecificEnergy.restext | 60 ++++----- .../Resources/SpecificEntropy.restext | 18 +-- .../Resources/SpecificFuelConsumption.restext | 8 +- .../Resources/SpecificVolume.restext | 6 +- .../Resources/SpecificWeight.restext | 34 ++--- .../GeneratedCode/Resources/Speed.restext | 66 +++++----- .../Resources/Speed.ru-RU.restext | 48 +++---- .../Resources/StandardVolumeFlow.restext | 18 +-- .../Resources/Temperature.restext | 20 +-- .../Resources/TemperatureChangeRate.restext | 20 +-- .../Resources/TemperatureDelta.restext | 18 +-- .../Resources/TemperatureGradient.restext | 8 +- .../Resources/ThermalConductivity.restext | 4 +- .../Resources/ThermalResistance.restext | 12 +- .../GeneratedCode/Resources/Torque.restext | 50 +++---- .../Resources/Torque.ru-RU.restext | 6 +- .../Resources/TorquePerLength.restext | 42 +++--- .../Resources/TorquePerLength.ru-RU.restext | 6 +- .../GeneratedCode/Resources/Turbidity.restext | 2 +- .../GeneratedCode/Resources/VitaminA.restext | 2 +- .../Resources/Volume.fr-CA.restext | 2 +- .../GeneratedCode/Resources/Volume.restext | 92 ++++++------- .../Resources/Volume.ru-RU.restext | 74 +++++------ .../Resources/VolumeConcentration.restext | 40 +++--- .../Resources/VolumeFlow.restext | 124 +++++++++--------- .../Resources/VolumeFlow.ru-RU.restext | 54 ++++---- .../Resources/VolumeFlowPerArea.restext | 4 +- .../Resources/VolumePerLength.restext | 14 +- .../Resources/VolumetricHeatCapacity.restext | 18 +-- .../Resources/WarpingMomentOfInertia.restext | 12 +- 148 files changed, 1850 insertions(+), 1838 deletions(-) diff --git a/CodeGen/Generators/UnitsNetGenerator.cs b/CodeGen/Generators/UnitsNetGenerator.cs index a9aab01360..cb471cc840 100644 --- a/CodeGen/Generators/UnitsNetGenerator.cs +++ b/CodeGen/Generators/UnitsNetGenerator.cs @@ -165,7 +165,19 @@ private static void GenerateResourceFiles(Quantity[] quantities, string resource //Unit.{ unit.SingularName}, quantity => quantity.ToUnit({ _quantity.Name} //Unit.{ unit.SingularName})); "); if(localization.Abbreviations.Any()) - writer.WriteLine($"{unit.SingularName} = {localization.Abbreviations.First()}"); + { + writer.Write($"{unit.SingularName} = ("); + + for(int i = 0; i < localization.Abbreviations.Length; i++) + { + writer.Write($"\"{localization.Abbreviations[i]}\""); + + if(i != localization.Abbreviations.Length - 1) + writer.Write(", "); + } + + writer.WriteLine(")"); + } } } } diff --git a/UnitsNet/GeneratedCode/Resources/Acceleration.restext b/UnitsNet/GeneratedCode/Resources/Acceleration.restext index 2155ad4f82..839031b259 100644 --- a/UnitsNet/GeneratedCode/Resources/Acceleration.restext +++ b/UnitsNet/GeneratedCode/Resources/Acceleration.restext @@ -1,14 +1,14 @@ -CentimeterPerSecondSquared = cm/s² -DecimeterPerSecondSquared = dm/s² -FootPerSecondSquared = ft/s² -InchPerSecondSquared = in/s² -KilometerPerSecondSquared = km/s² -KnotPerHour = kn/h -KnotPerMinute = kn/min -KnotPerSecond = kn/s -MeterPerSecondSquared = m/s² -MicrometerPerSecondSquared = µm/s² -MillimeterPerSecondSquared = mm/s² -MillistandardGravity = mg -NanometerPerSecondSquared = nm/s² -StandardGravity = g +CentimeterPerSecondSquared = ("cm/s²") +DecimeterPerSecondSquared = ("dm/s²") +FootPerSecondSquared = ("ft/s²") +InchPerSecondSquared = ("in/s²") +KilometerPerSecondSquared = ("km/s²") +KnotPerHour = ("kn/h") +KnotPerMinute = ("kn/min") +KnotPerSecond = ("kn/s") +MeterPerSecondSquared = ("m/s²") +MicrometerPerSecondSquared = ("µm/s²") +MillimeterPerSecondSquared = ("mm/s²") +MillistandardGravity = ("mg") +NanometerPerSecondSquared = ("nm/s²") +StandardGravity = ("g") diff --git a/UnitsNet/GeneratedCode/Resources/Acceleration.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Acceleration.ru-RU.restext index d3a8af80bf..68e6152629 100644 --- a/UnitsNet/GeneratedCode/Resources/Acceleration.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Acceleration.ru-RU.restext @@ -1,14 +1,14 @@ -CentimeterPerSecondSquared = см/с² -DecimeterPerSecondSquared = дм/с² -FootPerSecondSquared = фут/с² -InchPerSecondSquared = дюйм/с² -KilometerPerSecondSquared = км/с² -KnotPerHour = узел/час -KnotPerMinute = узел/мин -KnotPerSecond = узел/с -MeterPerSecondSquared = м/с² -MicrometerPerSecondSquared = мкм/с² -MillimeterPerSecondSquared = мм/с² -MillistandardGravity = мg -NanometerPerSecondSquared = нм/с² -StandardGravity = g +CentimeterPerSecondSquared = ("см/с²") +DecimeterPerSecondSquared = ("дм/с²") +FootPerSecondSquared = ("фут/с²") +InchPerSecondSquared = ("дюйм/с²") +KilometerPerSecondSquared = ("км/с²") +KnotPerHour = ("узел/час") +KnotPerMinute = ("узел/мин") +KnotPerSecond = ("узел/с") +MeterPerSecondSquared = ("м/с²") +MicrometerPerSecondSquared = ("мкм/с²") +MillimeterPerSecondSquared = ("мм/с²") +MillistandardGravity = ("мg") +NanometerPerSecondSquared = ("нм/с²") +StandardGravity = ("g") diff --git a/UnitsNet/GeneratedCode/Resources/AmountOfSubstance.restext b/UnitsNet/GeneratedCode/Resources/AmountOfSubstance.restext index 06256d21f2..55ac260539 100644 --- a/UnitsNet/GeneratedCode/Resources/AmountOfSubstance.restext +++ b/UnitsNet/GeneratedCode/Resources/AmountOfSubstance.restext @@ -1,15 +1,15 @@ -Centimole = cmol -CentipoundMole = clbmol -Decimole = dmol -DecipoundMole = dlbmol -Kilomole = kmol -KilopoundMole = klbmol -Megamole = Mmol -Micromole = µmol -MicropoundMole = µlbmol -Millimole = mmol -MillipoundMole = mlbmol -Mole = mol -Nanomole = nmol -NanopoundMole = nlbmol -PoundMole = lbmol +Centimole = ("cmol") +CentipoundMole = ("clbmol") +Decimole = ("dmol") +DecipoundMole = ("dlbmol") +Kilomole = ("kmol") +KilopoundMole = ("klbmol") +Megamole = ("Mmol") +Micromole = ("µmol") +MicropoundMole = ("µlbmol") +Millimole = ("mmol") +MillipoundMole = ("mlbmol") +Mole = ("mol") +Nanomole = ("nmol") +NanopoundMole = ("nlbmol") +PoundMole = ("lbmol") diff --git a/UnitsNet/GeneratedCode/Resources/AmplitudeRatio.restext b/UnitsNet/GeneratedCode/Resources/AmplitudeRatio.restext index b16458868a..e3ded2c5e9 100644 --- a/UnitsNet/GeneratedCode/Resources/AmplitudeRatio.restext +++ b/UnitsNet/GeneratedCode/Resources/AmplitudeRatio.restext @@ -1,4 +1,4 @@ -DecibelMicrovolt = dBµV -DecibelMillivolt = dBmV -DecibelUnloaded = dBu -DecibelVolt = dBV +DecibelMicrovolt = ("dBµV") +DecibelMillivolt = ("dBmV") +DecibelUnloaded = ("dBu") +DecibelVolt = ("dBV") diff --git a/UnitsNet/GeneratedCode/Resources/Angle.restext b/UnitsNet/GeneratedCode/Resources/Angle.restext index bd32363389..662a021af6 100644 --- a/UnitsNet/GeneratedCode/Resources/Angle.restext +++ b/UnitsNet/GeneratedCode/Resources/Angle.restext @@ -1,16 +1,16 @@ -Arcminute = ' -Arcsecond = ″ -Centiradian = crad -Deciradian = drad -Degree = ° -Gradian = g -Microdegree = µ° -Microradian = µrad -Millidegree = m° -Milliradian = mrad -Nanodegree = n° -Nanoradian = nrad -NatoMil = mil -Radian = rad -Revolution = r -Tilt = sin(θ) +Arcminute = ("'", "arcmin", "amin", "min") +Arcsecond = ("″", "arcsec", "asec", "sec") +Centiradian = ("crad") +Deciradian = ("drad") +Degree = ("°", "deg") +Gradian = ("g") +Microdegree = ("µ°", "µdeg") +Microradian = ("µrad") +Millidegree = ("m°", "mdeg") +Milliradian = ("mrad") +Nanodegree = ("n°", "ndeg") +Nanoradian = ("nrad") +NatoMil = ("mil") +Radian = ("rad") +Revolution = ("r") +Tilt = ("sin(θ)") diff --git a/UnitsNet/GeneratedCode/Resources/Angle.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Angle.ru-RU.restext index 8879d724d2..c89415ca01 100644 --- a/UnitsNet/GeneratedCode/Resources/Angle.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Angle.ru-RU.restext @@ -1,12 +1,12 @@ -Centiradian = срад -Deciradian = драд -Degree = ° -Gradian = g -Microdegree = мк° -Microradian = мкрад -Millidegree = м° -Milliradian = мрад -Nanodegree = н° -Nanoradian = нрад -Radian = рад -Revolution = r +Centiradian = ("срад") +Deciradian = ("драд") +Degree = ("°") +Gradian = ("g") +Microdegree = ("мк°") +Microradian = ("мкрад") +Millidegree = ("м°") +Milliradian = ("мрад") +Nanodegree = ("н°") +Nanoradian = ("нрад") +Radian = ("рад") +Revolution = ("r") diff --git a/UnitsNet/GeneratedCode/Resources/ApparentEnergy.restext b/UnitsNet/GeneratedCode/Resources/ApparentEnergy.restext index eb4f3d78f5..c4fde5196b 100644 --- a/UnitsNet/GeneratedCode/Resources/ApparentEnergy.restext +++ b/UnitsNet/GeneratedCode/Resources/ApparentEnergy.restext @@ -1,3 +1,3 @@ -KilovoltampereHour = kVAh -MegavoltampereHour = MVAh -VoltampereHour = VAh +KilovoltampereHour = ("kVAh") +MegavoltampereHour = ("MVAh") +VoltampereHour = ("VAh") diff --git a/UnitsNet/GeneratedCode/Resources/ApparentPower.restext b/UnitsNet/GeneratedCode/Resources/ApparentPower.restext index bf7ef22415..cc05dd136d 100644 --- a/UnitsNet/GeneratedCode/Resources/ApparentPower.restext +++ b/UnitsNet/GeneratedCode/Resources/ApparentPower.restext @@ -1,6 +1,6 @@ -Gigavoltampere = GVA -Kilovoltampere = kVA -Megavoltampere = MVA -Microvoltampere = µVA -Millivoltampere = mVA -Voltampere = VA +Gigavoltampere = ("GVA") +Kilovoltampere = ("kVA") +Megavoltampere = ("MVA") +Microvoltampere = ("µVA") +Millivoltampere = ("mVA") +Voltampere = ("VA") diff --git a/UnitsNet/GeneratedCode/Resources/Area.restext b/UnitsNet/GeneratedCode/Resources/Area.restext index 9e7e3c063b..e28966f1a1 100644 --- a/UnitsNet/GeneratedCode/Resources/Area.restext +++ b/UnitsNet/GeneratedCode/Resources/Area.restext @@ -1,14 +1,14 @@ -Acre = ac -Hectare = ha -SquareCentimeter = cm² -SquareDecimeter = dm² -SquareFoot = ft² -SquareInch = in² -SquareKilometer = km² -SquareMeter = m² -SquareMicrometer = µm² -SquareMile = mi² -SquareMillimeter = mm² -SquareNauticalMile = nmi² -SquareYard = yd² -UsSurveySquareFoot = ft² (US) +Acre = ("ac") +Hectare = ("ha") +SquareCentimeter = ("cm²") +SquareDecimeter = ("dm²") +SquareFoot = ("ft²") +SquareInch = ("in²") +SquareKilometer = ("km²") +SquareMeter = ("m²") +SquareMicrometer = ("µm²") +SquareMile = ("mi²") +SquareMillimeter = ("mm²") +SquareNauticalMile = ("nmi²") +SquareYard = ("yd²") +UsSurveySquareFoot = ("ft² (US)") diff --git a/UnitsNet/GeneratedCode/Resources/Area.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Area.ru-RU.restext index bb6928cd88..7689fab5d2 100644 --- a/UnitsNet/GeneratedCode/Resources/Area.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Area.ru-RU.restext @@ -1,14 +1,14 @@ -Acre = акр -Hectare = га -SquareCentimeter = см² -SquareDecimeter = дм² -SquareFoot = фут² -SquareInch = дюйм² -SquareKilometer = км² -SquareMeter = м² -SquareMicrometer = мкм² -SquareMile = миля² -SquareMillimeter = мм² -SquareNauticalMile = морск.миля² -SquareYard = ярд² -UsSurveySquareFoot = фут² (US) +Acre = ("акр") +Hectare = ("га") +SquareCentimeter = ("см²") +SquareDecimeter = ("дм²") +SquareFoot = ("фут²") +SquareInch = ("дюйм²") +SquareKilometer = ("км²") +SquareMeter = ("м²") +SquareMicrometer = ("мкм²") +SquareMile = ("миля²") +SquareMillimeter = ("мм²") +SquareNauticalMile = ("морск.миля²") +SquareYard = ("ярд²") +UsSurveySquareFoot = ("фут² (US)") diff --git a/UnitsNet/GeneratedCode/Resources/Area.zh-CN.restext b/UnitsNet/GeneratedCode/Resources/Area.zh-CN.restext index e215061302..744e3b889c 100644 --- a/UnitsNet/GeneratedCode/Resources/Area.zh-CN.restext +++ b/UnitsNet/GeneratedCode/Resources/Area.zh-CN.restext @@ -1,13 +1,13 @@ -Acre = 英亩 -Hectare = 英亩 -SquareCentimeter = 平方厘米 -SquareDecimeter = 平方分米 -SquareFoot = 平方英尺 -SquareInch = 平方英寸 -SquareKilometer = 平方公里 -SquareMeter = 平方米 -SquareMicrometer = 平方微米 -SquareMile = 平方英里 -SquareMillimeter = 平方毫米 -SquareNauticalMile = 平方海里 -SquareYard = 平方码 +Acre = ("英亩") +Hectare = ("英亩") +SquareCentimeter = ("平方厘米") +SquareDecimeter = ("平方分米") +SquareFoot = ("平方英尺") +SquareInch = ("平方英寸") +SquareKilometer = ("平方公里") +SquareMeter = ("平方米") +SquareMicrometer = ("平方微米") +SquareMile = ("平方英里") +SquareMillimeter = ("平方毫米") +SquareNauticalMile = ("平方海里") +SquareYard = ("平方码") diff --git a/UnitsNet/GeneratedCode/Resources/AreaDensity.restext b/UnitsNet/GeneratedCode/Resources/AreaDensity.restext index 44f797183d..9c093db370 100644 --- a/UnitsNet/GeneratedCode/Resources/AreaDensity.restext +++ b/UnitsNet/GeneratedCode/Resources/AreaDensity.restext @@ -1,3 +1,3 @@ -GramPerSquareMeter = g/m² -KilogramPerSquareMeter = kg/m² -MilligramPerSquareMeter = mg/m² +GramPerSquareMeter = ("g/m²", "gsm") +KilogramPerSquareMeter = ("kg/m²") +MilligramPerSquareMeter = ("mg/m²") diff --git a/UnitsNet/GeneratedCode/Resources/AreaMomentOfInertia.restext b/UnitsNet/GeneratedCode/Resources/AreaMomentOfInertia.restext index 6414d2ca5e..4da508257c 100644 --- a/UnitsNet/GeneratedCode/Resources/AreaMomentOfInertia.restext +++ b/UnitsNet/GeneratedCode/Resources/AreaMomentOfInertia.restext @@ -1,6 +1,6 @@ -CentimeterToTheFourth = cm⁴ -DecimeterToTheFourth = dm⁴ -FootToTheFourth = ft⁴ -InchToTheFourth = in⁴ -MeterToTheFourth = m⁴ -MillimeterToTheFourth = mm⁴ +CentimeterToTheFourth = ("cm⁴", "cm^4") +DecimeterToTheFourth = ("dm⁴", "dm^4") +FootToTheFourth = ("ft⁴", "ft^4") +InchToTheFourth = ("in⁴", "in^4") +MeterToTheFourth = ("m⁴", "m^4") +MillimeterToTheFourth = ("mm⁴", "mm^4") diff --git a/UnitsNet/GeneratedCode/Resources/BitRate.restext b/UnitsNet/GeneratedCode/Resources/BitRate.restext index c3879a8aca..c4b4da3300 100644 --- a/UnitsNet/GeneratedCode/Resources/BitRate.restext +++ b/UnitsNet/GeneratedCode/Resources/BitRate.restext @@ -1,26 +1,26 @@ -BitPerSecond = bit/s -BytePerSecond = B/s -ExabitPerSecond = Ebit/s -ExabytePerSecond = EB/s -ExbibitPerSecond = Eibit/s -ExbibytePerSecond = EiB/s -GibibitPerSecond = Gibit/s -GibibytePerSecond = GiB/s -GigabitPerSecond = Gbit/s -GigabytePerSecond = GB/s -KibibitPerSecond = Kibit/s -KibibytePerSecond = KiB/s -KilobitPerSecond = kbit/s -KilobytePerSecond = kB/s -MebibitPerSecond = Mibit/s -MebibytePerSecond = MiB/s -MegabitPerSecond = Mbit/s -MegabytePerSecond = MB/s -PebibitPerSecond = Pibit/s -PebibytePerSecond = PiB/s -PetabitPerSecond = Pbit/s -PetabytePerSecond = PB/s -TebibitPerSecond = Tibit/s -TebibytePerSecond = TiB/s -TerabitPerSecond = Tbit/s -TerabytePerSecond = TB/s +BitPerSecond = ("bit/s", "bps") +BytePerSecond = ("B/s") +ExabitPerSecond = ("Ebit/s", "Ebps") +ExabytePerSecond = ("EB/s") +ExbibitPerSecond = ("Eibit/s", "Eibps") +ExbibytePerSecond = ("EiB/s") +GibibitPerSecond = ("Gibit/s", "Gibps") +GibibytePerSecond = ("GiB/s") +GigabitPerSecond = ("Gbit/s", "Gbps") +GigabytePerSecond = ("GB/s") +KibibitPerSecond = ("Kibit/s", "Kibps") +KibibytePerSecond = ("KiB/s") +KilobitPerSecond = ("kbit/s", "kbps") +KilobytePerSecond = ("kB/s") +MebibitPerSecond = ("Mibit/s", "Mibps") +MebibytePerSecond = ("MiB/s") +MegabitPerSecond = ("Mbit/s", "Mbps") +MegabytePerSecond = ("MB/s") +PebibitPerSecond = ("Pibit/s", "Pibps") +PebibytePerSecond = ("PiB/s") +PetabitPerSecond = ("Pbit/s", "Pbps") +PetabytePerSecond = ("PB/s") +TebibitPerSecond = ("Tibit/s", "Tibps") +TebibytePerSecond = ("TiB/s") +TerabitPerSecond = ("Tbit/s", "Tbps") +TerabytePerSecond = ("TB/s") diff --git a/UnitsNet/GeneratedCode/Resources/BrakeSpecificFuelConsumption.restext b/UnitsNet/GeneratedCode/Resources/BrakeSpecificFuelConsumption.restext index 6fe8e5845a..a5136686d1 100644 --- a/UnitsNet/GeneratedCode/Resources/BrakeSpecificFuelConsumption.restext +++ b/UnitsNet/GeneratedCode/Resources/BrakeSpecificFuelConsumption.restext @@ -1,3 +1,3 @@ -GramPerKiloWattHour = g/kWh -KilogramPerJoule = kg/J -PoundPerMechanicalHorsepowerHour = lb/hph +GramPerKiloWattHour = ("g/kWh") +KilogramPerJoule = ("kg/J") +PoundPerMechanicalHorsepowerHour = ("lb/hph") diff --git a/UnitsNet/GeneratedCode/Resources/Capacitance.restext b/UnitsNet/GeneratedCode/Resources/Capacitance.restext index 5986c1c02d..3473746d2b 100644 --- a/UnitsNet/GeneratedCode/Resources/Capacitance.restext +++ b/UnitsNet/GeneratedCode/Resources/Capacitance.restext @@ -1,7 +1,7 @@ -Farad = F -Kilofarad = kF -Megafarad = MF -Microfarad = µF -Millifarad = mF -Nanofarad = nF -Picofarad = pF +Farad = ("F") +Kilofarad = ("kF") +Megafarad = ("MF") +Microfarad = ("µF") +Millifarad = ("mF") +Nanofarad = ("nF") +Picofarad = ("pF") diff --git a/UnitsNet/GeneratedCode/Resources/CoefficientOfThermalExpansion.restext b/UnitsNet/GeneratedCode/Resources/CoefficientOfThermalExpansion.restext index 09111d32f9..224a759b95 100644 --- a/UnitsNet/GeneratedCode/Resources/CoefficientOfThermalExpansion.restext +++ b/UnitsNet/GeneratedCode/Resources/CoefficientOfThermalExpansion.restext @@ -1,3 +1,3 @@ -InverseDegreeCelsius = °C⁻¹ -InverseDegreeFahrenheit = °F⁻¹ -InverseKelvin = K⁻¹ +InverseDegreeCelsius = ("°C⁻¹", "1/°C") +InverseDegreeFahrenheit = ("°F⁻¹", "1/°F") +InverseKelvin = ("K⁻¹", "1/K") diff --git a/UnitsNet/GeneratedCode/Resources/Compressibility.restext b/UnitsNet/GeneratedCode/Resources/Compressibility.restext index a6187c8c84..00697a6828 100644 --- a/UnitsNet/GeneratedCode/Resources/Compressibility.restext +++ b/UnitsNet/GeneratedCode/Resources/Compressibility.restext @@ -1,7 +1,7 @@ -InverseAtmosphere = atm⁻¹ -InverseBar = bar⁻¹ -InverseKilopascal = kPa⁻¹ -InverseMegapascal = MPa⁻¹ -InverseMillibar = mbar⁻¹ -InversePascal = Pa⁻¹ -InversePoundForcePerSquareInch = psi⁻¹ +InverseAtmosphere = ("atm⁻¹", "1/atm") +InverseBar = ("bar⁻¹", "1/bar") +InverseKilopascal = ("kPa⁻¹", "1/kPa") +InverseMegapascal = ("MPa⁻¹", "1/MPa") +InverseMillibar = ("mbar⁻¹", "1/mbar") +InversePascal = ("Pa⁻¹", "1/Pa") +InversePoundForcePerSquareInch = ("psi⁻¹", "1/psi") diff --git a/UnitsNet/GeneratedCode/Resources/Density.restext b/UnitsNet/GeneratedCode/Resources/Density.restext index f32b41a75f..026deadb6e 100644 --- a/UnitsNet/GeneratedCode/Resources/Density.restext +++ b/UnitsNet/GeneratedCode/Resources/Density.restext @@ -1,51 +1,51 @@ -CentigramPerDeciliter = cg/dl -CentigramPerLiter = cg/L -CentigramPerMilliliter = cg/ml -DecigramPerDeciliter = dg/dl -DecigramPerLiter = dg/L -DecigramPerMilliliter = dg/ml -GramPerCubicCentimeter = g/cm³ -GramPerCubicFoot = g/ft³ -GramPerCubicInch = g/in³ -GramPerCubicMeter = g/m³ -GramPerCubicMillimeter = g/mm³ -GramPerDeciliter = g/dl -GramPerLiter = g/L -GramPerMilliliter = g/ml -KilogramPerCubicCentimeter = kg/cm³ -KilogramPerCubicMeter = kg/m³ -KilogramPerCubicMillimeter = kg/mm³ -KilogramPerLiter = kg/l -KilopoundPerCubicFoot = kip/ft³ -KilopoundPerCubicInch = kip/in³ -MicrogramPerCubicMeter = µg/m³ -MicrogramPerDeciliter = µg/dl -MicrogramPerLiter = µg/L -MicrogramPerMilliliter = µg/ml -MilligramPerCubicMeter = mg/m³ -MilligramPerDeciliter = mg/dl -MilligramPerLiter = mg/L -MilligramPerMilliliter = mg/ml -NanogramPerDeciliter = ng/dl -NanogramPerLiter = ng/L -NanogramPerMilliliter = ng/ml -PicogramPerDeciliter = pg/dl -PicogramPerLiter = pg/L -PicogramPerMilliliter = pg/ml -PoundPerCubicCentimeter = lb/cm³ -PoundPerCubicFoot = lb/ft³ -PoundPerCubicInch = lb/in³ -PoundPerCubicMeter = lb/m³ -PoundPerCubicMillimeter = lb/mm³ -PoundPerImperialGallon = ppg (imp.) -PoundPerUSGallon = ppg (U.S.) -SlugPerCubicCentimeter = slug/cm³ -SlugPerCubicFoot = slug/ft³ -SlugPerCubicInch = slug/in³ -SlugPerCubicMeter = slug/m³ -SlugPerCubicMillimeter = slug/mm³ -TonnePerCubicCentimeter = t/cm³ -TonnePerCubicFoot = t/ft³ -TonnePerCubicInch = t/in³ -TonnePerCubicMeter = t/m³ -TonnePerCubicMillimeter = t/mm³ +CentigramPerDeciliter = ("cg/dl") +CentigramPerLiter = ("cg/L") +CentigramPerMilliliter = ("cg/ml") +DecigramPerDeciliter = ("dg/dl") +DecigramPerLiter = ("dg/L") +DecigramPerMilliliter = ("dg/ml") +GramPerCubicCentimeter = ("g/cm³") +GramPerCubicFoot = ("g/ft³") +GramPerCubicInch = ("g/in³") +GramPerCubicMeter = ("g/m³") +GramPerCubicMillimeter = ("g/mm³") +GramPerDeciliter = ("g/dl") +GramPerLiter = ("g/L") +GramPerMilliliter = ("g/ml") +KilogramPerCubicCentimeter = ("kg/cm³") +KilogramPerCubicMeter = ("kg/m³") +KilogramPerCubicMillimeter = ("kg/mm³") +KilogramPerLiter = ("kg/l") +KilopoundPerCubicFoot = ("kip/ft³") +KilopoundPerCubicInch = ("kip/in³") +MicrogramPerCubicMeter = ("µg/m³") +MicrogramPerDeciliter = ("µg/dl") +MicrogramPerLiter = ("µg/L") +MicrogramPerMilliliter = ("µg/ml") +MilligramPerCubicMeter = ("mg/m³") +MilligramPerDeciliter = ("mg/dl") +MilligramPerLiter = ("mg/L") +MilligramPerMilliliter = ("mg/ml") +NanogramPerDeciliter = ("ng/dl") +NanogramPerLiter = ("ng/L") +NanogramPerMilliliter = ("ng/ml") +PicogramPerDeciliter = ("pg/dl") +PicogramPerLiter = ("pg/L") +PicogramPerMilliliter = ("pg/ml") +PoundPerCubicCentimeter = ("lb/cm³") +PoundPerCubicFoot = ("lb/ft³") +PoundPerCubicInch = ("lb/in³") +PoundPerCubicMeter = ("lb/m³") +PoundPerCubicMillimeter = ("lb/mm³") +PoundPerImperialGallon = ("ppg (imp.)") +PoundPerUSGallon = ("ppg (U.S.)") +SlugPerCubicCentimeter = ("slug/cm³") +SlugPerCubicFoot = ("slug/ft³") +SlugPerCubicInch = ("slug/in³") +SlugPerCubicMeter = ("slug/m³") +SlugPerCubicMillimeter = ("slug/mm³") +TonnePerCubicCentimeter = ("t/cm³") +TonnePerCubicFoot = ("t/ft³") +TonnePerCubicInch = ("t/in³") +TonnePerCubicMeter = ("t/m³") +TonnePerCubicMillimeter = ("t/mm³") diff --git a/UnitsNet/GeneratedCode/Resources/Density.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Density.ru-RU.restext index 28048cb667..6664407759 100644 --- a/UnitsNet/GeneratedCode/Resources/Density.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Density.ru-RU.restext @@ -1,4 +1,4 @@ -GramPerCubicMeter = г/м³ -KilogramPerCubicMeter = кг/м³ -MicrogramPerCubicMeter = мкг/м³ -MilligramPerCubicMeter = мг/м³ +GramPerCubicMeter = ("г/м³") +KilogramPerCubicMeter = ("кг/м³") +MicrogramPerCubicMeter = ("мкг/м³") +MilligramPerCubicMeter = ("мг/м³") diff --git a/UnitsNet/GeneratedCode/Resources/Duration.restext b/UnitsNet/GeneratedCode/Resources/Duration.restext index b4b2659b1a..14c7e05261 100644 --- a/UnitsNet/GeneratedCode/Resources/Duration.restext +++ b/UnitsNet/GeneratedCode/Resources/Duration.restext @@ -1,11 +1,11 @@ -Day = d -Hour = h -JulianYear = jyr -Microsecond = µs -Millisecond = ms -Minute = m -Month30 = mo -Nanosecond = ns -Second = s -Week = wk -Year365 = yr +Day = ("d", "day", "days") +Hour = ("h", "hr", "hrs", "hour", "hours") +JulianYear = ("jyr", "jyear", "jyears") +Microsecond = ("µs", "µsec", "µsecs", "µsecond", "µseconds") +Millisecond = ("ms", "msec", "msecs", "msecond", "mseconds") +Minute = ("m", "min", "minute", "minutes") +Month30 = ("mo", "month", "months") +Nanosecond = ("ns", "nsec", "nsecs", "nsecond", "nseconds") +Second = ("s", "sec", "secs", "second", "seconds") +Week = ("wk", "week", "weeks") +Year365 = ("yr", "year", "years") diff --git a/UnitsNet/GeneratedCode/Resources/Duration.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Duration.ru-RU.restext index 6613478cd9..6c99726cec 100644 --- a/UnitsNet/GeneratedCode/Resources/Duration.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Duration.ru-RU.restext @@ -1,10 +1,10 @@ -Day = сут -Hour = ч -Microsecond = мксек -Millisecond = мсек -Minute = мин -Month30 = месяц -Nanosecond = нсек -Second = сек -Week = нед -Year365 = год +Day = ("сут", "д") +Hour = ("ч", "час") +Microsecond = ("мксек", "мкс") +Millisecond = ("мсек", "мс") +Minute = ("мин") +Month30 = ("месяц") +Nanosecond = ("нсек", "нс") +Second = ("сек", "с") +Week = ("нед") +Year365 = ("год") diff --git a/UnitsNet/GeneratedCode/Resources/DynamicViscosity.restext b/UnitsNet/GeneratedCode/Resources/DynamicViscosity.restext index 32f4abc33b..9c42b8ab55 100644 --- a/UnitsNet/GeneratedCode/Resources/DynamicViscosity.restext +++ b/UnitsNet/GeneratedCode/Resources/DynamicViscosity.restext @@ -1,10 +1,10 @@ -Centipoise = cP -MicropascalSecond = µPa·s -MillipascalSecond = mPa·s -NewtonSecondPerMeterSquared = Ns/m² -PascalSecond = Pa·s -Poise = P -PoundForceSecondPerSquareFoot = lbf·s/ft² -PoundForceSecondPerSquareInch = lbf·s/in² -PoundPerFootSecond = lb/ft·s -Reyn = reyn +Centipoise = ("cP") +MicropascalSecond = ("µPa·s", "µPaS") +MillipascalSecond = ("mPa·s", "mPaS") +NewtonSecondPerMeterSquared = ("Ns/m²") +PascalSecond = ("Pa·s", "PaS") +Poise = ("P") +PoundForceSecondPerSquareFoot = ("lbf·s/ft²") +PoundForceSecondPerSquareInch = ("lbf·s/in²") +PoundPerFootSecond = ("lb/ft·s") +Reyn = ("reyn") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricAdmittance.restext b/UnitsNet/GeneratedCode/Resources/ElectricAdmittance.restext index 901986d81a..177f246394 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricAdmittance.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricAdmittance.restext @@ -1,4 +1,4 @@ -Microsiemens = µS -Millisiemens = mS -Nanosiemens = nS -Siemens = S +Microsiemens = ("µS") +Millisiemens = ("mS") +Nanosiemens = ("nS") +Siemens = ("S") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricCharge.restext b/UnitsNet/GeneratedCode/Resources/ElectricCharge.restext index 12aba86c2a..4bd0d8eb7e 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricCharge.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricCharge.restext @@ -1,11 +1,11 @@ -AmpereHour = A-h -Coulomb = C -KiloampereHour = kA-h -Kilocoulomb = kC -MegaampereHour = MA-h -Megacoulomb = MC -Microcoulomb = µC -MilliampereHour = mA-h -Millicoulomb = mC -Nanocoulomb = nC -Picocoulomb = pC +AmpereHour = ("A-h", "Ah") +Coulomb = ("C") +KiloampereHour = ("kA-h", "kAh") +Kilocoulomb = ("kC") +MegaampereHour = ("MA-h", "MAh") +Megacoulomb = ("MC") +Microcoulomb = ("µC") +MilliampereHour = ("mA-h", "mAh") +Millicoulomb = ("mC") +Nanocoulomb = ("nC") +Picocoulomb = ("pC") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricChargeDensity.restext b/UnitsNet/GeneratedCode/Resources/ElectricChargeDensity.restext index b8b7265863..1f5d7b5aeb 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricChargeDensity.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricChargeDensity.restext @@ -1 +1 @@ -CoulombPerCubicMeter = C/m³ +CoulombPerCubicMeter = ("C/m³") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricConductance.restext b/UnitsNet/GeneratedCode/Resources/ElectricConductance.restext index 6a0f3ab32f..0c8ecb72fa 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricConductance.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricConductance.restext @@ -1,5 +1,5 @@ -Kilosiemens = kS -Microsiemens = µS -Millisiemens = mS -Nanosiemens = nS -Siemens = S +Kilosiemens = ("kS") +Microsiemens = ("µS") +Millisiemens = ("mS") +Nanosiemens = ("nS") +Siemens = ("S") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricConductivity.restext b/UnitsNet/GeneratedCode/Resources/ElectricConductivity.restext index cca5df6aac..617677f93b 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricConductivity.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricConductivity.restext @@ -1,6 +1,6 @@ -MicrosiemensPerCentimeter = µS/cm -MillisiemensPerCentimeter = mS/cm -SiemensPerCentimeter = S/cm -SiemensPerFoot = S/ft -SiemensPerInch = S/in -SiemensPerMeter = S/m +MicrosiemensPerCentimeter = ("µS/cm") +MillisiemensPerCentimeter = ("mS/cm") +SiemensPerCentimeter = ("S/cm") +SiemensPerFoot = ("S/ft") +SiemensPerInch = ("S/in") +SiemensPerMeter = ("S/m") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricCurrent.restext b/UnitsNet/GeneratedCode/Resources/ElectricCurrent.restext index a829a3cfcb..1dceb800c5 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricCurrent.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricCurrent.restext @@ -1,9 +1,9 @@ -Ampere = A -Centiampere = cA -Femtoampere = fA -Kiloampere = kA -Megaampere = MA -Microampere = µA -Milliampere = mA -Nanoampere = nA -Picoampere = pA +Ampere = ("A") +Centiampere = ("cA") +Femtoampere = ("fA") +Kiloampere = ("kA") +Megaampere = ("MA") +Microampere = ("µA") +Milliampere = ("mA") +Nanoampere = ("nA") +Picoampere = ("pA") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricCurrentDensity.restext b/UnitsNet/GeneratedCode/Resources/ElectricCurrentDensity.restext index 7bd40373fe..f40dcf9f92 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricCurrentDensity.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricCurrentDensity.restext @@ -1,3 +1,3 @@ -AmperePerSquareFoot = A/ft² -AmperePerSquareInch = A/in² -AmperePerSquareMeter = A/m² +AmperePerSquareFoot = ("A/ft²") +AmperePerSquareInch = ("A/in²") +AmperePerSquareMeter = ("A/m²") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricCurrentGradient.restext b/UnitsNet/GeneratedCode/Resources/ElectricCurrentGradient.restext index 6190c83cd2..8f67335ebe 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricCurrentGradient.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricCurrentGradient.restext @@ -1,4 +1,4 @@ -AmperePerMicrosecond = A/μs -AmperePerMillisecond = A/ms -AmperePerNanosecond = A/ns -AmperePerSecond = A/s +AmperePerMicrosecond = ("A/μs") +AmperePerMillisecond = ("A/ms") +AmperePerNanosecond = ("A/ns") +AmperePerSecond = ("A/s") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricField.restext b/UnitsNet/GeneratedCode/Resources/ElectricField.restext index 2556938e79..0dfc0439fa 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricField.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricField.restext @@ -1 +1 @@ -VoltPerMeter = V/m +VoltPerMeter = ("V/m") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricInductance.restext b/UnitsNet/GeneratedCode/Resources/ElectricInductance.restext index 30d0f066a6..6fb8faacb9 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricInductance.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricInductance.restext @@ -1,5 +1,5 @@ -Henry = H -Microhenry = µH -Millihenry = mH -Nanohenry = nH -Picohenry = pH +Henry = ("H") +Microhenry = ("µH") +Millihenry = ("mH") +Nanohenry = ("nH") +Picohenry = ("pH") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricPotential.restext b/UnitsNet/GeneratedCode/Resources/ElectricPotential.restext index f9f5414145..f2e198b00b 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricPotential.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricPotential.restext @@ -1,6 +1,6 @@ -Kilovolt = kV -Megavolt = MV -Microvolt = µV -Millivolt = mV -Nanovolt = nV -Volt = V +Kilovolt = ("kV") +Megavolt = ("MV") +Microvolt = ("µV") +Millivolt = ("mV") +Nanovolt = ("nV") +Volt = ("V") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricPotential.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/ElectricPotential.ru-RU.restext index 13fe69df93..2d28aaabdf 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricPotential.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricPotential.ru-RU.restext @@ -1,6 +1,6 @@ -Kilovolt = кВ -Megavolt = МВ -Microvolt = мкВ -Millivolt = мВ -Nanovolt = нВ -Volt = В +Kilovolt = ("кВ") +Megavolt = ("МВ") +Microvolt = ("мкВ") +Millivolt = ("мВ") +Nanovolt = ("нВ") +Volt = ("В") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricPotentialAc.restext b/UnitsNet/GeneratedCode/Resources/ElectricPotentialAc.restext index 3b90a91a13..3e245cf3eb 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricPotentialAc.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricPotentialAc.restext @@ -1,5 +1,5 @@ -KilovoltAc = kVac -MegavoltAc = MVac -MicrovoltAc = µVac -MillivoltAc = mVac -VoltAc = Vac +KilovoltAc = ("kVac") +MegavoltAc = ("MVac") +MicrovoltAc = ("µVac") +MillivoltAc = ("mVac") +VoltAc = ("Vac") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricPotentialChangeRate.restext b/UnitsNet/GeneratedCode/Resources/ElectricPotentialChangeRate.restext index 155f8fad24..20638248fe 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricPotentialChangeRate.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricPotentialChangeRate.restext @@ -1,20 +1,20 @@ -KilovoltPerHour = kV/h -KilovoltPerMicrosecond = kV/μs -KilovoltPerMinute = kV/min -KilovoltPerSecond = kV/s -MegavoltPerHour = MV/h -MegavoltPerMicrosecond = MV/μs -MegavoltPerMinute = MV/min -MegavoltPerSecond = MV/s -MicrovoltPerHour = µV/h -MicrovoltPerMicrosecond = µV/μs -MicrovoltPerMinute = µV/min -MicrovoltPerSecond = µV/s -MillivoltPerHour = mV/h -MillivoltPerMicrosecond = mV/μs -MillivoltPerMinute = mV/min -MillivoltPerSecond = mV/s -VoltPerHour = V/h -VoltPerMicrosecond = V/μs -VoltPerMinute = V/min -VoltPerSecond = V/s +KilovoltPerHour = ("kV/h") +KilovoltPerMicrosecond = ("kV/μs") +KilovoltPerMinute = ("kV/min") +KilovoltPerSecond = ("kV/s") +MegavoltPerHour = ("MV/h") +MegavoltPerMicrosecond = ("MV/μs") +MegavoltPerMinute = ("MV/min") +MegavoltPerSecond = ("MV/s") +MicrovoltPerHour = ("µV/h") +MicrovoltPerMicrosecond = ("µV/μs") +MicrovoltPerMinute = ("µV/min") +MicrovoltPerSecond = ("µV/s") +MillivoltPerHour = ("mV/h") +MillivoltPerMicrosecond = ("mV/μs") +MillivoltPerMinute = ("mV/min") +MillivoltPerSecond = ("mV/s") +VoltPerHour = ("V/h") +VoltPerMicrosecond = ("V/μs") +VoltPerMinute = ("V/min") +VoltPerSecond = ("V/s") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricPotentialDc.restext b/UnitsNet/GeneratedCode/Resources/ElectricPotentialDc.restext index 857ee24088..0292b3502d 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricPotentialDc.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricPotentialDc.restext @@ -1,5 +1,5 @@ -KilovoltDc = kVdc -MegavoltDc = MVdc -MicrovoltDc = µVdc -MillivoltDc = mVdc -VoltDc = Vdc +KilovoltDc = ("kVdc") +MegavoltDc = ("MVdc") +MicrovoltDc = ("µVdc") +MillivoltDc = ("mVdc") +VoltDc = ("Vdc") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricResistance.restext b/UnitsNet/GeneratedCode/Resources/ElectricResistance.restext index 391c1dd589..a94cfc713d 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricResistance.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricResistance.restext @@ -1,7 +1,7 @@ -Gigaohm = GΩ -Kiloohm = kΩ -Megaohm = MΩ -Microohm = µΩ -Milliohm = mΩ -Ohm = Ω -Teraohm = TΩ +Gigaohm = ("GΩ") +Kiloohm = ("kΩ") +Megaohm = ("MΩ") +Microohm = ("µΩ") +Milliohm = ("mΩ") +Ohm = ("Ω") +Teraohm = ("TΩ") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricResistivity.restext b/UnitsNet/GeneratedCode/Resources/ElectricResistivity.restext index 012ef8fd70..fcc319d411 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricResistivity.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricResistivity.restext @@ -1,14 +1,14 @@ -KiloohmCentimeter = kΩ·cm -KiloohmMeter = kΩ·m -MegaohmCentimeter = MΩ·cm -MegaohmMeter = MΩ·m -MicroohmCentimeter = µΩ·cm -MicroohmMeter = µΩ·m -MilliohmCentimeter = mΩ·cm -MilliohmMeter = mΩ·m -NanoohmCentimeter = nΩ·cm -NanoohmMeter = nΩ·m -OhmCentimeter = Ω·cm -OhmMeter = Ω·m -PicoohmCentimeter = pΩ·cm -PicoohmMeter = pΩ·m +KiloohmCentimeter = ("kΩ·cm") +KiloohmMeter = ("kΩ·m") +MegaohmCentimeter = ("MΩ·cm") +MegaohmMeter = ("MΩ·m") +MicroohmCentimeter = ("µΩ·cm") +MicroohmMeter = ("µΩ·m") +MilliohmCentimeter = ("mΩ·cm") +MilliohmMeter = ("mΩ·m") +NanoohmCentimeter = ("nΩ·cm") +NanoohmMeter = ("nΩ·m") +OhmCentimeter = ("Ω·cm") +OhmMeter = ("Ω·m") +PicoohmCentimeter = ("pΩ·cm") +PicoohmMeter = ("pΩ·m") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricSurfaceChargeDensity.restext b/UnitsNet/GeneratedCode/Resources/ElectricSurfaceChargeDensity.restext index b5582b93a6..242843ed23 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricSurfaceChargeDensity.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricSurfaceChargeDensity.restext @@ -1,3 +1,3 @@ -CoulombPerSquareCentimeter = C/cm² -CoulombPerSquareInch = C/in² -CoulombPerSquareMeter = C/m² +CoulombPerSquareCentimeter = ("C/cm²") +CoulombPerSquareInch = ("C/in²") +CoulombPerSquareMeter = ("C/m²") diff --git a/UnitsNet/GeneratedCode/Resources/Energy.restext b/UnitsNet/GeneratedCode/Resources/Energy.restext index 50e7c3345c..4591938a1d 100644 --- a/UnitsNet/GeneratedCode/Resources/Energy.restext +++ b/UnitsNet/GeneratedCode/Resources/Energy.restext @@ -1,38 +1,38 @@ -BritishThermalUnit = BTU -Calorie = cal -DecathermEc = Dth (E.C.) -DecathermImperial = Dth (imp.) -DecathermUs = Dth (U.S.) -ElectronVolt = eV -Erg = erg -FootPound = ft·lb -GigabritishThermalUnit = GBTU -GigaelectronVolt = GeV -Gigajoule = GJ -GigawattDay = GWd -GigawattHour = GWh -HorsepowerHour = hp·h -Joule = J -KilobritishThermalUnit = kBTU -Kilocalorie = kcal -KiloelectronVolt = keV -Kilojoule = kJ -KilowattDay = kWd -KilowattHour = kWh -MegabritishThermalUnit = MBTU -Megacalorie = Mcal -MegaelectronVolt = MeV -Megajoule = MJ -MegawattDay = MWd -MegawattHour = MWh -Millijoule = mJ -Petajoule = PJ -TeraelectronVolt = TeV -Terajoule = TJ -TerawattDay = TWd -TerawattHour = TWh -ThermEc = th (E.C.) -ThermImperial = th (imp.) -ThermUs = th (U.S.) -WattDay = Wd -WattHour = Wh +BritishThermalUnit = ("BTU") +Calorie = ("cal") +DecathermEc = ("Dth (E.C.)") +DecathermImperial = ("Dth (imp.)") +DecathermUs = ("Dth (U.S.)") +ElectronVolt = ("eV") +Erg = ("erg") +FootPound = ("ft·lb") +GigabritishThermalUnit = ("GBTU") +GigaelectronVolt = ("GeV") +Gigajoule = ("GJ") +GigawattDay = ("GWd") +GigawattHour = ("GWh") +HorsepowerHour = ("hp·h") +Joule = ("J") +KilobritishThermalUnit = ("kBTU") +Kilocalorie = ("kcal") +KiloelectronVolt = ("keV") +Kilojoule = ("kJ") +KilowattDay = ("kWd") +KilowattHour = ("kWh") +MegabritishThermalUnit = ("MBTU") +Megacalorie = ("Mcal") +MegaelectronVolt = ("MeV") +Megajoule = ("MJ") +MegawattDay = ("MWd") +MegawattHour = ("MWh") +Millijoule = ("mJ") +Petajoule = ("PJ") +TeraelectronVolt = ("TeV") +Terajoule = ("TJ") +TerawattDay = ("TWd") +TerawattHour = ("TWh") +ThermEc = ("th (E.C.)") +ThermImperial = ("th (imp.)") +ThermUs = ("th (U.S.)") +WattDay = ("Wd") +WattHour = ("Wh") diff --git a/UnitsNet/GeneratedCode/Resources/Energy.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Energy.ru-RU.restext index 4950aa9f0e..52c8599d39 100644 --- a/UnitsNet/GeneratedCode/Resources/Energy.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Energy.ru-RU.restext @@ -1,21 +1,21 @@ -DecathermEc = Европейский декатерм -DecathermImperial = Английский декатерм -DecathermUs = Американский декатерм -ElectronVolt = эВ -GigaelectronVolt = ГэВ -GigawattDay = ГВт/д -GigawattHour = ГВт/ч -KiloelectronVolt = кэВ -KilowattDay = кВт/д -KilowattHour = кВт/ч -MegaelectronVolt = МэВ -MegawattDay = МВт/д -MegawattHour = МВт/ч -TeraelectronVolt = ТэВ -TerawattDay = ТВт/д -TerawattHour = ТВт/ч -ThermEc = Европейский терм -ThermImperial = Английский терм -ThermUs = Американский терм -WattDay = Вт/д -WattHour = Вт/ч +DecathermEc = ("Европейский декатерм") +DecathermImperial = ("Английский декатерм") +DecathermUs = ("Американский декатерм") +ElectronVolt = ("эВ") +GigaelectronVolt = ("ГэВ") +GigawattDay = ("ГВт/д") +GigawattHour = ("ГВт/ч") +KiloelectronVolt = ("кэВ") +KilowattDay = ("кВт/д") +KilowattHour = ("кВт/ч") +MegaelectronVolt = ("МэВ") +MegawattDay = ("МВт/д") +MegawattHour = ("МВт/ч") +TeraelectronVolt = ("ТэВ") +TerawattDay = ("ТВт/д") +TerawattHour = ("ТВт/ч") +ThermEc = ("Европейский терм") +ThermImperial = ("Английский терм") +ThermUs = ("Американский терм") +WattDay = ("Вт/д") +WattHour = ("Вт/ч") diff --git a/UnitsNet/GeneratedCode/Resources/EnergyDensity.restext b/UnitsNet/GeneratedCode/Resources/EnergyDensity.restext index c366b28b75..71eb151665 100644 --- a/UnitsNet/GeneratedCode/Resources/EnergyDensity.restext +++ b/UnitsNet/GeneratedCode/Resources/EnergyDensity.restext @@ -1,12 +1,12 @@ -GigajoulePerCubicMeter = GJ/m³ -GigawattHourPerCubicMeter = GWh/m³ -JoulePerCubicMeter = J/m³ -KilojoulePerCubicMeter = kJ/m³ -KilowattHourPerCubicMeter = kWh/m³ -MegajoulePerCubicMeter = MJ/m³ -MegawattHourPerCubicMeter = MWh/m³ -PetajoulePerCubicMeter = PJ/m³ -PetawattHourPerCubicMeter = PWh/m³ -TerajoulePerCubicMeter = TJ/m³ -TerawattHourPerCubicMeter = TWh/m³ -WattHourPerCubicMeter = Wh/m³ +GigajoulePerCubicMeter = ("GJ/m³") +GigawattHourPerCubicMeter = ("GWh/m³") +JoulePerCubicMeter = ("J/m³") +KilojoulePerCubicMeter = ("kJ/m³") +KilowattHourPerCubicMeter = ("kWh/m³") +MegajoulePerCubicMeter = ("MJ/m³") +MegawattHourPerCubicMeter = ("MWh/m³") +PetajoulePerCubicMeter = ("PJ/m³") +PetawattHourPerCubicMeter = ("PWh/m³") +TerajoulePerCubicMeter = ("TJ/m³") +TerawattHourPerCubicMeter = ("TWh/m³") +WattHourPerCubicMeter = ("Wh/m³") diff --git a/UnitsNet/GeneratedCode/Resources/Entropy.restext b/UnitsNet/GeneratedCode/Resources/Entropy.restext index 5151eb9153..0f8bfa3fbc 100644 --- a/UnitsNet/GeneratedCode/Resources/Entropy.restext +++ b/UnitsNet/GeneratedCode/Resources/Entropy.restext @@ -1,7 +1,7 @@ -CaloriePerKelvin = cal/K -JoulePerDegreeCelsius = J/C -JoulePerKelvin = J/K -KilocaloriePerKelvin = kcal/K -KilojoulePerDegreeCelsius = kJ/C -KilojoulePerKelvin = kJ/K -MegajoulePerKelvin = MJ/K +CaloriePerKelvin = ("cal/K") +JoulePerDegreeCelsius = ("J/C") +JoulePerKelvin = ("J/K") +KilocaloriePerKelvin = ("kcal/K") +KilojoulePerDegreeCelsius = ("kJ/C") +KilojoulePerKelvin = ("kJ/K") +MegajoulePerKelvin = ("MJ/K") diff --git a/UnitsNet/GeneratedCode/Resources/Force.restext b/UnitsNet/GeneratedCode/Resources/Force.restext index 7d5a72799d..6e1c93148e 100644 --- a/UnitsNet/GeneratedCode/Resources/Force.restext +++ b/UnitsNet/GeneratedCode/Resources/Force.restext @@ -1,15 +1,15 @@ -Decanewton = daN -Dyn = dyn -KilogramForce = kgf -Kilonewton = kN -KiloPond = kp -KilopoundForce = kipf -Meganewton = MN -Micronewton = µN -Millinewton = mN -Newton = N -OunceForce = ozf -Poundal = pdl -PoundForce = lbf -ShortTonForce = tf (short) -TonneForce = tf +Decanewton = ("daN") +Dyn = ("dyn") +KilogramForce = ("kgf") +Kilonewton = ("kN") +KiloPond = ("kp") +KilopoundForce = ("kipf", "kip", "k") +Meganewton = ("MN") +Micronewton = ("µN") +Millinewton = ("mN") +Newton = ("N") +OunceForce = ("ozf") +Poundal = ("pdl") +PoundForce = ("lbf") +ShortTonForce = ("tf (short)", "t (US)f", "short tons-force") +TonneForce = ("tf", "Ton") diff --git a/UnitsNet/GeneratedCode/Resources/Force.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Force.ru-RU.restext index 596bd36418..46d78afa8e 100644 --- a/UnitsNet/GeneratedCode/Resources/Force.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Force.ru-RU.restext @@ -1,13 +1,13 @@ -Decanewton = даН -Dyn = дин -KilogramForce = кгс -Kilonewton = кН -KiloPond = кгс -KilopoundForce = кипф -Meganewton = МН -Micronewton = мкН -Millinewton = мН -Newton = Н -Poundal = паундаль -PoundForce = фунт-сила -TonneForce = тс +Decanewton = ("даН") +Dyn = ("дин") +KilogramForce = ("кгс") +Kilonewton = ("кН") +KiloPond = ("кгс") +KilopoundForce = ("кипф", "койка", "К") +Meganewton = ("МН") +Micronewton = ("мкН") +Millinewton = ("мН") +Newton = ("Н") +Poundal = ("паундаль") +PoundForce = ("фунт-сила") +TonneForce = ("тс") diff --git a/UnitsNet/GeneratedCode/Resources/ForceChangeRate.restext b/UnitsNet/GeneratedCode/Resources/ForceChangeRate.restext index 2f63e137a1..7128d1d7c1 100644 --- a/UnitsNet/GeneratedCode/Resources/ForceChangeRate.restext +++ b/UnitsNet/GeneratedCode/Resources/ForceChangeRate.restext @@ -1,15 +1,15 @@ -CentinewtonPerSecond = cN/s -DecanewtonPerMinute = daN/min -DecanewtonPerSecond = daN/s -DecinewtonPerSecond = dN/s -KilonewtonPerMinute = kN/min -KilonewtonPerSecond = kN/s -KilopoundForcePerMinute = kipf/min -KilopoundForcePerSecond = kipf/s -MicronewtonPerSecond = µN/s -MillinewtonPerSecond = mN/s -NanonewtonPerSecond = nN/s -NewtonPerMinute = N/min -NewtonPerSecond = N/s -PoundForcePerMinute = lbf/min -PoundForcePerSecond = lbf/s +CentinewtonPerSecond = ("cN/s") +DecanewtonPerMinute = ("daN/min") +DecanewtonPerSecond = ("daN/s") +DecinewtonPerSecond = ("dN/s") +KilonewtonPerMinute = ("kN/min") +KilonewtonPerSecond = ("kN/s") +KilopoundForcePerMinute = ("kipf/min", "kip/min", "k/min") +KilopoundForcePerSecond = ("kipf/s", "kip/s", "k/s") +MicronewtonPerSecond = ("µN/s") +MillinewtonPerSecond = ("mN/s") +NanonewtonPerSecond = ("nN/s") +NewtonPerMinute = ("N/min") +NewtonPerSecond = ("N/s") +PoundForcePerMinute = ("lbf/min") +PoundForcePerSecond = ("lbf/s") diff --git a/UnitsNet/GeneratedCode/Resources/ForcePerLength.restext b/UnitsNet/GeneratedCode/Resources/ForcePerLength.restext index 9f409f1389..d0129cbd2e 100644 --- a/UnitsNet/GeneratedCode/Resources/ForcePerLength.restext +++ b/UnitsNet/GeneratedCode/Resources/ForcePerLength.restext @@ -1,38 +1,38 @@ -CentinewtonPerCentimeter = cN/cm -CentinewtonPerMeter = cN/m -CentinewtonPerMillimeter = cN/mm -DecanewtonPerCentimeter = daN/cm -DecanewtonPerMeter = daN/m -DecanewtonPerMillimeter = daN/mm -DecinewtonPerCentimeter = dN/cm -DecinewtonPerMeter = dN/m -DecinewtonPerMillimeter = dN/mm -KilogramForcePerCentimeter = kgf/cm -KilogramForcePerMeter = kgf/m -KilogramForcePerMillimeter = kgf/mm -KilonewtonPerCentimeter = kN/cm -KilonewtonPerMeter = kN/m -KilonewtonPerMillimeter = kN/mm -KilopoundForcePerFoot = kipf/ft -KilopoundForcePerInch = kipf/in -MeganewtonPerCentimeter = MN/cm -MeganewtonPerMeter = MN/m -MeganewtonPerMillimeter = MN/mm -MicronewtonPerCentimeter = µN/cm -MicronewtonPerMeter = µN/m -MicronewtonPerMillimeter = µN/mm -MillinewtonPerCentimeter = mN/cm -MillinewtonPerMeter = mN/m -MillinewtonPerMillimeter = mN/mm -NanonewtonPerCentimeter = nN/cm -NanonewtonPerMeter = nN/m -NanonewtonPerMillimeter = nN/mm -NewtonPerCentimeter = N/cm -NewtonPerMeter = N/m -NewtonPerMillimeter = N/mm -PoundForcePerFoot = lbf/ft -PoundForcePerInch = lbf/in -PoundForcePerYard = lbf/yd -TonneForcePerCentimeter = tf/cm -TonneForcePerMeter = tf/m -TonneForcePerMillimeter = tf/mm +CentinewtonPerCentimeter = ("cN/cm") +CentinewtonPerMeter = ("cN/m") +CentinewtonPerMillimeter = ("cN/mm") +DecanewtonPerCentimeter = ("daN/cm") +DecanewtonPerMeter = ("daN/m") +DecanewtonPerMillimeter = ("daN/mm") +DecinewtonPerCentimeter = ("dN/cm") +DecinewtonPerMeter = ("dN/m") +DecinewtonPerMillimeter = ("dN/mm") +KilogramForcePerCentimeter = ("kgf/cm") +KilogramForcePerMeter = ("kgf/m") +KilogramForcePerMillimeter = ("kgf/mm") +KilonewtonPerCentimeter = ("kN/cm") +KilonewtonPerMeter = ("kN/m") +KilonewtonPerMillimeter = ("kN/mm") +KilopoundForcePerFoot = ("kipf/ft", "kip/ft", "k/ft") +KilopoundForcePerInch = ("kipf/in", "kip/in", "k/in") +MeganewtonPerCentimeter = ("MN/cm") +MeganewtonPerMeter = ("MN/m") +MeganewtonPerMillimeter = ("MN/mm") +MicronewtonPerCentimeter = ("µN/cm") +MicronewtonPerMeter = ("µN/m") +MicronewtonPerMillimeter = ("µN/mm") +MillinewtonPerCentimeter = ("mN/cm") +MillinewtonPerMeter = ("mN/m") +MillinewtonPerMillimeter = ("mN/mm") +NanonewtonPerCentimeter = ("nN/cm") +NanonewtonPerMeter = ("nN/m") +NanonewtonPerMillimeter = ("nN/mm") +NewtonPerCentimeter = ("N/cm") +NewtonPerMeter = ("N/m") +NewtonPerMillimeter = ("N/mm") +PoundForcePerFoot = ("lbf/ft") +PoundForcePerInch = ("lbf/in") +PoundForcePerYard = ("lbf/yd") +TonneForcePerCentimeter = ("tf/cm") +TonneForcePerMeter = ("tf/m") +TonneForcePerMillimeter = ("tf/mm") diff --git a/UnitsNet/GeneratedCode/Resources/ForcePerLength.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/ForcePerLength.ru-RU.restext index b983c3f9ab..f15594863e 100644 --- a/UnitsNet/GeneratedCode/Resources/ForcePerLength.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/ForcePerLength.ru-RU.restext @@ -1,6 +1,6 @@ -KilogramForcePerCentimeter = кгс/см -KilogramForcePerMeter = кгс/м -KilogramForcePerMillimeter = кгс/мм -TonneForcePerCentimeter = тс/см -TonneForcePerMeter = тс/м -TonneForcePerMillimeter = тс/мм +KilogramForcePerCentimeter = ("кгс/см") +KilogramForcePerMeter = ("кгс/м") +KilogramForcePerMillimeter = ("кгс/мм") +TonneForcePerCentimeter = ("тс/см") +TonneForcePerMeter = ("тс/м") +TonneForcePerMillimeter = ("тс/мм") diff --git a/UnitsNet/GeneratedCode/Resources/Frequency.restext b/UnitsNet/GeneratedCode/Resources/Frequency.restext index 5807384c71..3574cb0de4 100644 --- a/UnitsNet/GeneratedCode/Resources/Frequency.restext +++ b/UnitsNet/GeneratedCode/Resources/Frequency.restext @@ -1,13 +1,13 @@ -BeatPerMinute = bpm -BUnit = B Units -CyclePerHour = cph -CyclePerMinute = cpm -Gigahertz = GHz -Hertz = Hz -Kilohertz = kHz -Megahertz = MHz -Microhertz = µHz -Millihertz = mHz -PerSecond = s⁻¹ -RadianPerSecond = rad/s -Terahertz = THz +BeatPerMinute = ("bpm") +BUnit = ("B Units") +CyclePerHour = ("cph") +CyclePerMinute = ("cpm") +Gigahertz = ("GHz") +Hertz = ("Hz") +Kilohertz = ("kHz") +Megahertz = ("MHz") +Microhertz = ("µHz") +Millihertz = ("mHz") +PerSecond = ("s⁻¹") +RadianPerSecond = ("rad/s") +Terahertz = ("THz") diff --git a/UnitsNet/GeneratedCode/Resources/Frequency.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Frequency.ru-RU.restext index 434611c9c9..1f3afedbfb 100644 --- a/UnitsNet/GeneratedCode/Resources/Frequency.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Frequency.ru-RU.restext @@ -1,9 +1,9 @@ -Gigahertz = ГГц -Hertz = Гц -Kilohertz = кГц -Megahertz = МГц -Microhertz = мкГц -Millihertz = мГц -PerSecond = с⁻¹ -RadianPerSecond = рад/с -Terahertz = ТГц +Gigahertz = ("ГГц") +Hertz = ("Гц") +Kilohertz = ("кГц") +Megahertz = ("МГц") +Microhertz = ("мкГц") +Millihertz = ("мГц") +PerSecond = ("с⁻¹") +RadianPerSecond = ("рад/с") +Terahertz = ("ТГц") diff --git a/UnitsNet/GeneratedCode/Resources/FuelEfficiency.restext b/UnitsNet/GeneratedCode/Resources/FuelEfficiency.restext index 95dbd67b97..6ffec182db 100644 --- a/UnitsNet/GeneratedCode/Resources/FuelEfficiency.restext +++ b/UnitsNet/GeneratedCode/Resources/FuelEfficiency.restext @@ -1,4 +1,4 @@ -KilometerPerLiter = km/L -LiterPer100Kilometers = L/100km -MilePerUkGallon = mpg (imp.) -MilePerUsGallon = mpg (U.S.) +KilometerPerLiter = ("km/L") +LiterPer100Kilometers = ("L/100km") +MilePerUkGallon = ("mpg (imp.)") +MilePerUsGallon = ("mpg (U.S.)") diff --git a/UnitsNet/GeneratedCode/Resources/HeatFlux.restext b/UnitsNet/GeneratedCode/Resources/HeatFlux.restext index 9903b0efd0..27ccf3f119 100644 --- a/UnitsNet/GeneratedCode/Resources/HeatFlux.restext +++ b/UnitsNet/GeneratedCode/Resources/HeatFlux.restext @@ -1,18 +1,18 @@ -BtuPerHourSquareFoot = BTU/h·ft² -BtuPerMinuteSquareFoot = BTU/min·ft² -BtuPerSecondSquareFoot = BTU/s·ft² -BtuPerSecondSquareInch = BTU/s·in² -CaloriePerSecondSquareCentimeter = cal/s·cm² -CentiwattPerSquareMeter = cW/m² -DeciwattPerSquareMeter = dW/m² -KilocaloriePerHourSquareMeter = kcal/h·m² -KilocaloriePerSecondSquareCentimeter = kcal/s·cm² -KilowattPerSquareMeter = kW/m² -MicrowattPerSquareMeter = µW/m² -MilliwattPerSquareMeter = mW/m² -NanowattPerSquareMeter = nW/m² -PoundForcePerFootSecond = lbf/(ft·s) -PoundPerSecondCubed = lb/s³ -WattPerSquareFoot = W/ft² -WattPerSquareInch = W/in² -WattPerSquareMeter = W/m² +BtuPerHourSquareFoot = ("BTU/h·ft²") +BtuPerMinuteSquareFoot = ("BTU/min·ft²") +BtuPerSecondSquareFoot = ("BTU/s·ft²") +BtuPerSecondSquareInch = ("BTU/s·in²") +CaloriePerSecondSquareCentimeter = ("cal/s·cm²") +CentiwattPerSquareMeter = ("cW/m²") +DeciwattPerSquareMeter = ("dW/m²") +KilocaloriePerHourSquareMeter = ("kcal/h·m²") +KilocaloriePerSecondSquareCentimeter = ("kcal/s·cm²") +KilowattPerSquareMeter = ("kW/m²") +MicrowattPerSquareMeter = ("µW/m²") +MilliwattPerSquareMeter = ("mW/m²") +NanowattPerSquareMeter = ("nW/m²") +PoundForcePerFootSecond = ("lbf/(ft·s)") +PoundPerSecondCubed = ("lb/s³", "lbm/s³") +WattPerSquareFoot = ("W/ft²") +WattPerSquareInch = ("W/in²") +WattPerSquareMeter = ("W/m²") diff --git a/UnitsNet/GeneratedCode/Resources/HeatTransferCoefficient.restext b/UnitsNet/GeneratedCode/Resources/HeatTransferCoefficient.restext index 2e501c81d1..3e7280bade 100644 --- a/UnitsNet/GeneratedCode/Resources/HeatTransferCoefficient.restext +++ b/UnitsNet/GeneratedCode/Resources/HeatTransferCoefficient.restext @@ -1,6 +1,6 @@ -BtuPerHourSquareFootDegreeFahrenheit = Btu/h·ft²·°F -BtuPerSquareFootDegreeFahrenheit = Btu/ft²·°F -CaloriePerHourSquareMeterDegreeCelsius = kcal/h·m²·°C -KilocaloriePerHourSquareMeterDegreeCelsius = kkcal/h·m²·°C -WattPerSquareMeterCelsius = W/m²·°C -WattPerSquareMeterKelvin = W/m²·K +BtuPerHourSquareFootDegreeFahrenheit = ("Btu/h·ft²·°F", "Btu/ft²·h·°F", "Btu/hr·ft²·°F", "Btu/ft²·hr·°F") +BtuPerSquareFootDegreeFahrenheit = ("Btu/ft²·°F") +CaloriePerHourSquareMeterDegreeCelsius = ("kcal/h·m²·°C", "kcal/m²·h·°C", "kcal/hr·m²·°C", "kcal/m²·hr·°C") +KilocaloriePerHourSquareMeterDegreeCelsius = ("kkcal/h·m²·°C", "kkcal/m²·h·°C", "kkcal/hr·m²·°C", "kkcal/m²·hr·°C") +WattPerSquareMeterCelsius = ("W/m²·°C") +WattPerSquareMeterKelvin = ("W/m²·K") diff --git a/UnitsNet/GeneratedCode/Resources/Illuminance.restext b/UnitsNet/GeneratedCode/Resources/Illuminance.restext index 45edf39b6f..49970097e4 100644 --- a/UnitsNet/GeneratedCode/Resources/Illuminance.restext +++ b/UnitsNet/GeneratedCode/Resources/Illuminance.restext @@ -1,4 +1,4 @@ -Kilolux = klx -Lux = lx -Megalux = Mlx -Millilux = mlx +Kilolux = ("klx") +Lux = ("lx") +Megalux = ("Mlx") +Millilux = ("mlx") diff --git a/UnitsNet/GeneratedCode/Resources/Impulse.restext b/UnitsNet/GeneratedCode/Resources/Impulse.restext index c6d4ecae86..0f853df9da 100644 --- a/UnitsNet/GeneratedCode/Resources/Impulse.restext +++ b/UnitsNet/GeneratedCode/Resources/Impulse.restext @@ -1,13 +1,13 @@ -CentinewtonSecond = cN·s -DecanewtonSecond = daN·s -DecinewtonSecond = dN·s -KilogramMeterPerSecond = kg·m/s -KilonewtonSecond = kN·s -MeganewtonSecond = MN·s -MicronewtonSecond = µN·s -MillinewtonSecond = mN·s -NanonewtonSecond = nN·s -NewtonSecond = N·s -PoundFootPerSecond = lb·ft/s -PoundForceSecond = lbf·s -SlugFootPerSecond = slug·ft/s +CentinewtonSecond = ("cN·s") +DecanewtonSecond = ("daN·s") +DecinewtonSecond = ("dN·s") +KilogramMeterPerSecond = ("kg·m/s") +KilonewtonSecond = ("kN·s") +MeganewtonSecond = ("MN·s") +MicronewtonSecond = ("µN·s") +MillinewtonSecond = ("mN·s") +NanonewtonSecond = ("nN·s") +NewtonSecond = ("N·s") +PoundFootPerSecond = ("lb·ft/s") +PoundForceSecond = ("lbf·s") +SlugFootPerSecond = ("slug·ft/s") diff --git a/UnitsNet/GeneratedCode/Resources/Information.restext b/UnitsNet/GeneratedCode/Resources/Information.restext index c5c3531e1b..ca7939a90a 100644 --- a/UnitsNet/GeneratedCode/Resources/Information.restext +++ b/UnitsNet/GeneratedCode/Resources/Information.restext @@ -1,26 +1,26 @@ -Bit = b -Byte = B -Exabit = Eb -Exabyte = EB -Exbibit = Eib -Exbibyte = EiB -Gibibit = Gib -Gibibyte = GiB -Gigabit = Gb -Gigabyte = GB -Kibibit = Kib -Kibibyte = KiB -Kilobit = kb -Kilobyte = kB -Mebibit = Mib -Mebibyte = MiB -Megabit = Mb -Megabyte = MB -Pebibit = Pib -Pebibyte = PiB -Petabit = Pb -Petabyte = PB -Tebibit = Tib -Tebibyte = TiB -Terabit = Tb -Terabyte = TB +Bit = ("b") +Byte = ("B") +Exabit = ("Eb") +Exabyte = ("EB") +Exbibit = ("Eib") +Exbibyte = ("EiB") +Gibibit = ("Gib") +Gibibyte = ("GiB") +Gigabit = ("Gb") +Gigabyte = ("GB") +Kibibit = ("Kib") +Kibibyte = ("KiB") +Kilobit = ("kb") +Kilobyte = ("kB") +Mebibit = ("Mib") +Mebibyte = ("MiB") +Megabit = ("Mb") +Megabyte = ("MB") +Pebibit = ("Pib") +Pebibyte = ("PiB") +Petabit = ("Pb") +Petabyte = ("PB") +Tebibit = ("Tib") +Tebibyte = ("TiB") +Terabit = ("Tb") +Terabyte = ("TB") diff --git a/UnitsNet/GeneratedCode/Resources/Irradiance.restext b/UnitsNet/GeneratedCode/Resources/Irradiance.restext index e77bacb2e6..52e42eb2d7 100644 --- a/UnitsNet/GeneratedCode/Resources/Irradiance.restext +++ b/UnitsNet/GeneratedCode/Resources/Irradiance.restext @@ -1,14 +1,14 @@ -KilowattPerSquareCentimeter = kW/cm² -KilowattPerSquareMeter = kW/m² -MegawattPerSquareCentimeter = MW/cm² -MegawattPerSquareMeter = MW/m² -MicrowattPerSquareCentimeter = µW/cm² -MicrowattPerSquareMeter = µW/m² -MilliwattPerSquareCentimeter = mW/cm² -MilliwattPerSquareMeter = mW/m² -NanowattPerSquareCentimeter = nW/cm² -NanowattPerSquareMeter = nW/m² -PicowattPerSquareCentimeter = pW/cm² -PicowattPerSquareMeter = pW/m² -WattPerSquareCentimeter = W/cm² -WattPerSquareMeter = W/m² +KilowattPerSquareCentimeter = ("kW/cm²") +KilowattPerSquareMeter = ("kW/m²") +MegawattPerSquareCentimeter = ("MW/cm²") +MegawattPerSquareMeter = ("MW/m²") +MicrowattPerSquareCentimeter = ("µW/cm²") +MicrowattPerSquareMeter = ("µW/m²") +MilliwattPerSquareCentimeter = ("mW/cm²") +MilliwattPerSquareMeter = ("mW/m²") +NanowattPerSquareCentimeter = ("nW/cm²") +NanowattPerSquareMeter = ("nW/m²") +PicowattPerSquareCentimeter = ("pW/cm²") +PicowattPerSquareMeter = ("pW/m²") +WattPerSquareCentimeter = ("W/cm²") +WattPerSquareMeter = ("W/m²") diff --git a/UnitsNet/GeneratedCode/Resources/Irradiation.restext b/UnitsNet/GeneratedCode/Resources/Irradiation.restext index 89d41c764d..b57331b8c9 100644 --- a/UnitsNet/GeneratedCode/Resources/Irradiation.restext +++ b/UnitsNet/GeneratedCode/Resources/Irradiation.restext @@ -1,7 +1,7 @@ -JoulePerSquareCentimeter = J/cm² -JoulePerSquareMeter = J/m² -JoulePerSquareMillimeter = J/mm² -KilojoulePerSquareMeter = kJ/m² -KilowattHourPerSquareMeter = kWh/m² -MillijoulePerSquareCentimeter = mJ/cm² -WattHourPerSquareMeter = Wh/m² +JoulePerSquareCentimeter = ("J/cm²") +JoulePerSquareMeter = ("J/m²") +JoulePerSquareMillimeter = ("J/mm²") +KilojoulePerSquareMeter = ("kJ/m²") +KilowattHourPerSquareMeter = ("kWh/m²") +MillijoulePerSquareCentimeter = ("mJ/cm²") +WattHourPerSquareMeter = ("Wh/m²") diff --git a/UnitsNet/GeneratedCode/Resources/Jerk.restext b/UnitsNet/GeneratedCode/Resources/Jerk.restext index 07bab8906c..614e8bb0c9 100644 --- a/UnitsNet/GeneratedCode/Resources/Jerk.restext +++ b/UnitsNet/GeneratedCode/Resources/Jerk.restext @@ -1,11 +1,11 @@ -CentimeterPerSecondCubed = cm/s³ -DecimeterPerSecondCubed = dm/s³ -FootPerSecondCubed = ft/s³ -InchPerSecondCubed = in/s³ -KilometerPerSecondCubed = km/s³ -MeterPerSecondCubed = m/s³ -MicrometerPerSecondCubed = µm/s³ -MillimeterPerSecondCubed = mm/s³ -MillistandardGravitiesPerSecond = mg/s -NanometerPerSecondCubed = nm/s³ -StandardGravitiesPerSecond = g/s +CentimeterPerSecondCubed = ("cm/s³") +DecimeterPerSecondCubed = ("dm/s³") +FootPerSecondCubed = ("ft/s³") +InchPerSecondCubed = ("in/s³") +KilometerPerSecondCubed = ("km/s³") +MeterPerSecondCubed = ("m/s³") +MicrometerPerSecondCubed = ("µm/s³") +MillimeterPerSecondCubed = ("mm/s³") +MillistandardGravitiesPerSecond = ("mg/s") +NanometerPerSecondCubed = ("nm/s³") +StandardGravitiesPerSecond = ("g/s") diff --git a/UnitsNet/GeneratedCode/Resources/Jerk.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Jerk.ru-RU.restext index f0d708a22e..ca3874046c 100644 --- a/UnitsNet/GeneratedCode/Resources/Jerk.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Jerk.ru-RU.restext @@ -1,11 +1,11 @@ -CentimeterPerSecondCubed = см/с³ -DecimeterPerSecondCubed = дм/с³ -FootPerSecondCubed = фут/с³ -InchPerSecondCubed = дюйм/с³ -KilometerPerSecondCubed = км/с³ -MeterPerSecondCubed = м/с³ -MicrometerPerSecondCubed = мкм/с³ -MillimeterPerSecondCubed = мм/с³ -MillistandardGravitiesPerSecond = мg/s -NanometerPerSecondCubed = нм/с³ -StandardGravitiesPerSecond = g/s +CentimeterPerSecondCubed = ("см/с³") +DecimeterPerSecondCubed = ("дм/с³") +FootPerSecondCubed = ("фут/с³") +InchPerSecondCubed = ("дюйм/с³") +KilometerPerSecondCubed = ("км/с³") +MeterPerSecondCubed = ("м/с³") +MicrometerPerSecondCubed = ("мкм/с³") +MillimeterPerSecondCubed = ("мм/с³") +MillistandardGravitiesPerSecond = ("мg/s") +NanometerPerSecondCubed = ("нм/с³") +StandardGravitiesPerSecond = ("g/s") diff --git a/UnitsNet/GeneratedCode/Resources/KinematicViscosity.restext b/UnitsNet/GeneratedCode/Resources/KinematicViscosity.restext index ed613711be..9fd1f6e562 100644 --- a/UnitsNet/GeneratedCode/Resources/KinematicViscosity.restext +++ b/UnitsNet/GeneratedCode/Resources/KinematicViscosity.restext @@ -1,9 +1,9 @@ -Centistokes = cSt -Decistokes = dSt -Kilostokes = kSt -Microstokes = µSt -Millistokes = mSt -Nanostokes = nSt -SquareFootPerSecond = ft²/s -SquareMeterPerSecond = m²/s -Stokes = St +Centistokes = ("cSt") +Decistokes = ("dSt") +Kilostokes = ("kSt") +Microstokes = ("µSt") +Millistokes = ("mSt") +Nanostokes = ("nSt") +SquareFootPerSecond = ("ft²/s") +SquareMeterPerSecond = ("m²/s") +Stokes = ("St") diff --git a/UnitsNet/GeneratedCode/Resources/KinematicViscosity.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/KinematicViscosity.ru-RU.restext index 111e69f288..568ca283b8 100644 --- a/UnitsNet/GeneratedCode/Resources/KinematicViscosity.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/KinematicViscosity.ru-RU.restext @@ -1,8 +1,8 @@ -Centistokes = сСт -Decistokes = дСт -Kilostokes = кСт -Microstokes = мкСт -Millistokes = мСт -Nanostokes = нСт -SquareMeterPerSecond = м²/с -Stokes = Ст +Centistokes = ("сСт") +Decistokes = ("дСт") +Kilostokes = ("кСт") +Microstokes = ("мкСт") +Millistokes = ("мСт") +Nanostokes = ("нСт") +SquareMeterPerSecond = ("м²/с") +Stokes = ("Ст") diff --git a/UnitsNet/GeneratedCode/Resources/Length.restext b/UnitsNet/GeneratedCode/Resources/Length.restext index 161fd6e058..03b9a9c209 100644 --- a/UnitsNet/GeneratedCode/Resources/Length.restext +++ b/UnitsNet/GeneratedCode/Resources/Length.restext @@ -1,36 +1,36 @@ -Angstrom = Å -AstronomicalUnit = au -Centimeter = cm -Chain = ch -DataMile = DM -Decameter = dam -Decimeter = dm -DtpPica = pica -DtpPoint = pt -Fathom = fathom -Foot = ft -Hand = h -Hectometer = hm -Inch = in -KilolightYear = kly -Kilometer = km -Kiloparsec = kpc -LightYear = ly -MegalightYear = Mly -Megaparsec = Mpc -Meter = m -Microinch = µin -Micrometer = µm -Mil = mil -Mile = mi -Millimeter = mm -Nanometer = nm -NauticalMile = NM -Parsec = pc -PrinterPica = pica -PrinterPoint = pt -Shackle = shackle -SolarRadius = R⊙ -Twip = twip -UsSurveyFoot = ftUS -Yard = yd +Angstrom = ("Å", "A") +AstronomicalUnit = ("au", "ua") +Centimeter = ("cm") +Chain = ("ch") +DataMile = ("DM") +Decameter = ("dam") +Decimeter = ("dm") +DtpPica = ("pica") +DtpPoint = ("pt") +Fathom = ("fathom") +Foot = ("ft", "'", "′") +Hand = ("h", "hh") +Hectometer = ("hm") +Inch = ("in", "\"", "″") +KilolightYear = ("kly") +Kilometer = ("km") +Kiloparsec = ("kpc") +LightYear = ("ly") +MegalightYear = ("Mly") +Megaparsec = ("Mpc") +Meter = ("m") +Microinch = ("µin") +Micrometer = ("µm") +Mil = ("mil") +Mile = ("mi") +Millimeter = ("mm") +Nanometer = ("nm") +NauticalMile = ("NM") +Parsec = ("pc") +PrinterPica = ("pica") +PrinterPoint = ("pt") +Shackle = ("shackle") +SolarRadius = ("R⊙") +Twip = ("twip") +UsSurveyFoot = ("ftUS") +Yard = ("yd") diff --git a/UnitsNet/GeneratedCode/Resources/Length.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Length.ru-RU.restext index c57347cd19..3e0665af5e 100644 --- a/UnitsNet/GeneratedCode/Resources/Length.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Length.ru-RU.restext @@ -1,16 +1,16 @@ -Centimeter = см -Decameter = дам -Decimeter = дм -Foot = фут -Hectometer = гм -Inch = дюйм -Kilometer = км -Meter = м -Microinch = микродюйм -Micrometer = мкм -Mil = мил -Mile = миля -Millimeter = мм -Nanometer = нм -NauticalMile = мил -Yard = ярд +Centimeter = ("см") +Decameter = ("дам") +Decimeter = ("дм") +Foot = ("фут") +Hectometer = ("гм") +Inch = ("дюйм") +Kilometer = ("км") +Meter = ("м") +Microinch = ("микродюйм") +Micrometer = ("мкм") +Mil = ("мил") +Mile = ("миля") +Millimeter = ("мм") +Nanometer = ("нм") +NauticalMile = ("мил") +Yard = ("ярд") diff --git a/UnitsNet/GeneratedCode/Resources/Length.zh-CN.restext b/UnitsNet/GeneratedCode/Resources/Length.zh-CN.restext index 6e0892cfb5..37e1df9757 100644 --- a/UnitsNet/GeneratedCode/Resources/Length.zh-CN.restext +++ b/UnitsNet/GeneratedCode/Resources/Length.zh-CN.restext @@ -1,16 +1,16 @@ -Centimeter = 厘米 -Decameter = 十米 -Decimeter = 分米 -Foot = 英尺 -Hectometer = 百米 -Inch = 英寸 -Kilometer = 千米 -Meter = 米 -Microinch = 微英寸 -Micrometer = 微米 -Mil = 密耳 -Mile = 英里 -Millimeter = 毫米 -Nanometer = 纳米 -NauticalMile = 纳米 -Yard = 码 +Centimeter = ("厘米") +Decameter = ("十米") +Decimeter = ("分米") +Foot = ("英尺") +Hectometer = ("百米") +Inch = ("英寸") +Kilometer = ("千米") +Meter = ("米") +Microinch = ("微英寸") +Micrometer = ("微米") +Mil = ("密耳") +Mile = ("英里") +Millimeter = ("毫米") +Nanometer = ("纳米") +NauticalMile = ("纳米") +Yard = ("码") diff --git a/UnitsNet/GeneratedCode/Resources/Level.restext b/UnitsNet/GeneratedCode/Resources/Level.restext index 83c768bb00..2fe4486c1c 100644 --- a/UnitsNet/GeneratedCode/Resources/Level.restext +++ b/UnitsNet/GeneratedCode/Resources/Level.restext @@ -1,2 +1,2 @@ -Decibel = dB -Neper = Np +Decibel = ("dB") +Neper = ("Np") diff --git a/UnitsNet/GeneratedCode/Resources/LinearDensity.restext b/UnitsNet/GeneratedCode/Resources/LinearDensity.restext index 0f161e36c7..07e137b834 100644 --- a/UnitsNet/GeneratedCode/Resources/LinearDensity.restext +++ b/UnitsNet/GeneratedCode/Resources/LinearDensity.restext @@ -1,14 +1,14 @@ -GramPerCentimeter = g/cm -GramPerMeter = g/m -GramPerMillimeter = g/mm -KilogramPerCentimeter = kg/cm -KilogramPerMeter = kg/m -KilogramPerMillimeter = kg/mm -MicrogramPerCentimeter = µg/cm -MicrogramPerMeter = µg/m -MicrogramPerMillimeter = µg/mm -MilligramPerCentimeter = mg/cm -MilligramPerMeter = mg/m -MilligramPerMillimeter = mg/mm -PoundPerFoot = lb/ft -PoundPerInch = lb/in +GramPerCentimeter = ("g/cm") +GramPerMeter = ("g/m") +GramPerMillimeter = ("g/mm") +KilogramPerCentimeter = ("kg/cm") +KilogramPerMeter = ("kg/m") +KilogramPerMillimeter = ("kg/mm") +MicrogramPerCentimeter = ("µg/cm") +MicrogramPerMeter = ("µg/m") +MicrogramPerMillimeter = ("µg/mm") +MilligramPerCentimeter = ("mg/cm") +MilligramPerMeter = ("mg/m") +MilligramPerMillimeter = ("mg/mm") +PoundPerFoot = ("lb/ft") +PoundPerInch = ("lb/in") diff --git a/UnitsNet/GeneratedCode/Resources/LinearPowerDensity.restext b/UnitsNet/GeneratedCode/Resources/LinearPowerDensity.restext index 81aa154c3b..734787cab0 100644 --- a/UnitsNet/GeneratedCode/Resources/LinearPowerDensity.restext +++ b/UnitsNet/GeneratedCode/Resources/LinearPowerDensity.restext @@ -1,25 +1,25 @@ -GigawattPerCentimeter = GW/cm -GigawattPerFoot = GW/ft -GigawattPerInch = GW/in -GigawattPerMeter = GW/m -GigawattPerMillimeter = GW/mm -KilowattPerCentimeter = kW/cm -KilowattPerFoot = kW/ft -KilowattPerInch = kW/in -KilowattPerMeter = kW/m -KilowattPerMillimeter = kW/mm -MegawattPerCentimeter = MW/cm -MegawattPerFoot = MW/ft -MegawattPerInch = MW/in -MegawattPerMeter = MW/m -MegawattPerMillimeter = MW/mm -MilliwattPerCentimeter = mW/cm -MilliwattPerFoot = mW/ft -MilliwattPerInch = mW/in -MilliwattPerMeter = mW/m -MilliwattPerMillimeter = mW/mm -WattPerCentimeter = W/cm -WattPerFoot = W/ft -WattPerInch = W/in -WattPerMeter = W/m -WattPerMillimeter = W/mm +GigawattPerCentimeter = ("GW/cm") +GigawattPerFoot = ("GW/ft") +GigawattPerInch = ("GW/in") +GigawattPerMeter = ("GW/m") +GigawattPerMillimeter = ("GW/mm") +KilowattPerCentimeter = ("kW/cm") +KilowattPerFoot = ("kW/ft") +KilowattPerInch = ("kW/in") +KilowattPerMeter = ("kW/m") +KilowattPerMillimeter = ("kW/mm") +MegawattPerCentimeter = ("MW/cm") +MegawattPerFoot = ("MW/ft") +MegawattPerInch = ("MW/in") +MegawattPerMeter = ("MW/m") +MegawattPerMillimeter = ("MW/mm") +MilliwattPerCentimeter = ("mW/cm") +MilliwattPerFoot = ("mW/ft") +MilliwattPerInch = ("mW/in") +MilliwattPerMeter = ("mW/m") +MilliwattPerMillimeter = ("mW/mm") +WattPerCentimeter = ("W/cm") +WattPerFoot = ("W/ft") +WattPerInch = ("W/in") +WattPerMeter = ("W/m") +WattPerMillimeter = ("W/mm") diff --git a/UnitsNet/GeneratedCode/Resources/Luminance.restext b/UnitsNet/GeneratedCode/Resources/Luminance.restext index 6c0eb05c11..a107746ca0 100644 --- a/UnitsNet/GeneratedCode/Resources/Luminance.restext +++ b/UnitsNet/GeneratedCode/Resources/Luminance.restext @@ -1,10 +1,10 @@ -CandelaPerSquareFoot = Cd/ft² -CandelaPerSquareInch = Cd/in² -CandelaPerSquareMeter = Cd/m² -CenticandelaPerSquareMeter = cCd/m² -DecicandelaPerSquareMeter = dCd/m² -KilocandelaPerSquareMeter = kCd/m² -MicrocandelaPerSquareMeter = µCd/m² -MillicandelaPerSquareMeter = mCd/m² -NanocandelaPerSquareMeter = nCd/m² -Nit = nt +CandelaPerSquareFoot = ("Cd/ft²") +CandelaPerSquareInch = ("Cd/in²") +CandelaPerSquareMeter = ("Cd/m²") +CenticandelaPerSquareMeter = ("cCd/m²") +DecicandelaPerSquareMeter = ("dCd/m²") +KilocandelaPerSquareMeter = ("kCd/m²") +MicrocandelaPerSquareMeter = ("µCd/m²") +MillicandelaPerSquareMeter = ("mCd/m²") +NanocandelaPerSquareMeter = ("nCd/m²") +Nit = ("nt") diff --git a/UnitsNet/GeneratedCode/Resources/Luminosity.restext b/UnitsNet/GeneratedCode/Resources/Luminosity.restext index 9856f255dc..703791ac0e 100644 --- a/UnitsNet/GeneratedCode/Resources/Luminosity.restext +++ b/UnitsNet/GeneratedCode/Resources/Luminosity.restext @@ -1,14 +1,14 @@ -Decawatt = daW -Deciwatt = dW -Femtowatt = fW -Gigawatt = GW -Kilowatt = kW -Megawatt = MW -Microwatt = µW -Milliwatt = mW -Nanowatt = nW -Petawatt = PW -Picowatt = pW -SolarLuminosity = L⊙ -Terawatt = TW -Watt = W +Decawatt = ("daW") +Deciwatt = ("dW") +Femtowatt = ("fW") +Gigawatt = ("GW") +Kilowatt = ("kW") +Megawatt = ("MW") +Microwatt = ("µW") +Milliwatt = ("mW") +Nanowatt = ("nW") +Petawatt = ("PW") +Picowatt = ("pW") +SolarLuminosity = ("L⊙") +Terawatt = ("TW") +Watt = ("W") diff --git a/UnitsNet/GeneratedCode/Resources/LuminousFlux.restext b/UnitsNet/GeneratedCode/Resources/LuminousFlux.restext index 087c521d4f..c9e35bb8fb 100644 --- a/UnitsNet/GeneratedCode/Resources/LuminousFlux.restext +++ b/UnitsNet/GeneratedCode/Resources/LuminousFlux.restext @@ -1 +1 @@ -Lumen = lm +Lumen = ("lm") diff --git a/UnitsNet/GeneratedCode/Resources/LuminousIntensity.restext b/UnitsNet/GeneratedCode/Resources/LuminousIntensity.restext index 72f15f9166..df752e8c36 100644 --- a/UnitsNet/GeneratedCode/Resources/LuminousIntensity.restext +++ b/UnitsNet/GeneratedCode/Resources/LuminousIntensity.restext @@ -1 +1 @@ -Candela = cd +Candela = ("cd") diff --git a/UnitsNet/GeneratedCode/Resources/MagneticField.restext b/UnitsNet/GeneratedCode/Resources/MagneticField.restext index 22fa8ae6d5..1b0f26da50 100644 --- a/UnitsNet/GeneratedCode/Resources/MagneticField.restext +++ b/UnitsNet/GeneratedCode/Resources/MagneticField.restext @@ -1,6 +1,6 @@ -Gauss = G -Microtesla = µT -Milligauss = mG -Millitesla = mT -Nanotesla = nT -Tesla = T +Gauss = ("G") +Microtesla = ("µT") +Milligauss = ("mG") +Millitesla = ("mT") +Nanotesla = ("nT") +Tesla = ("T") diff --git a/UnitsNet/GeneratedCode/Resources/MagneticFlux.restext b/UnitsNet/GeneratedCode/Resources/MagneticFlux.restext index 32495c6651..cf9400d33c 100644 --- a/UnitsNet/GeneratedCode/Resources/MagneticFlux.restext +++ b/UnitsNet/GeneratedCode/Resources/MagneticFlux.restext @@ -1 +1 @@ -Weber = Wb +Weber = ("Wb") diff --git a/UnitsNet/GeneratedCode/Resources/Magnetization.restext b/UnitsNet/GeneratedCode/Resources/Magnetization.restext index c5967d8419..4512d68141 100644 --- a/UnitsNet/GeneratedCode/Resources/Magnetization.restext +++ b/UnitsNet/GeneratedCode/Resources/Magnetization.restext @@ -1 +1 @@ -AmperePerMeter = A/m +AmperePerMeter = ("A/m") diff --git a/UnitsNet/GeneratedCode/Resources/Mass.restext b/UnitsNet/GeneratedCode/Resources/Mass.restext index 83ae496c51..e94c332a57 100644 --- a/UnitsNet/GeneratedCode/Resources/Mass.restext +++ b/UnitsNet/GeneratedCode/Resources/Mass.restext @@ -1,25 +1,25 @@ -Centigram = cg -Decagram = dag -Decigram = dg -EarthMass = em -Grain = gr -Gram = g -Hectogram = hg -Kilogram = kg -Kilopound = klb -Kilotonne = kt -LongHundredweight = cwt -LongTon = long tn -Megapound = Mlb -Megatonne = Mt -Microgram = µg -Milligram = mg -Nanogram = ng -Ounce = oz -Pound = lb -ShortHundredweight = cwt -ShortTon = t (short) -Slug = slug -SolarMass = M☉ -Stone = st -Tonne = t +Centigram = ("cg") +Decagram = ("dag") +Decigram = ("dg") +EarthMass = ("em") +Grain = ("gr") +Gram = ("g") +Hectogram = ("hg") +Kilogram = ("kg") +Kilopound = ("klb", "klbs", "klbm") +Kilotonne = ("kt") +LongHundredweight = ("cwt") +LongTon = ("long tn") +Megapound = ("Mlb", "Mlbs", "Mlbm") +Megatonne = ("Mt") +Microgram = ("µg") +Milligram = ("mg") +Nanogram = ("ng") +Ounce = ("oz") +Pound = ("lb", "lbs", "lbm") +ShortHundredweight = ("cwt") +ShortTon = ("t (short)", "short tn", "ST") +Slug = ("slug") +SolarMass = ("M☉", "M⊙") +Stone = ("st") +Tonne = ("t") diff --git a/UnitsNet/GeneratedCode/Resources/Mass.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Mass.ru-RU.restext index 4aab41b7c4..0e5e0c862c 100644 --- a/UnitsNet/GeneratedCode/Resources/Mass.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Mass.ru-RU.restext @@ -1,17 +1,17 @@ -Centigram = сг -Decagram = даг -Decigram = дг -Gram = г -Hectogram = гг -Kilogram = кг -Kilopound = кфунт -Kilotonne = кт -LongTon = тонна большая -Megapound = Мфунт -Megatonne = Мт -Microgram = мкг -Milligram = мг -Nanogram = нг -Pound = фунт -ShortTon = тонна малая -Tonne = т +Centigram = ("сг") +Decagram = ("даг") +Decigram = ("дг") +Gram = ("г") +Hectogram = ("гг") +Kilogram = ("кг") +Kilopound = ("кфунт") +Kilotonne = ("кт") +LongTon = ("тонна большая") +Megapound = ("Мфунт") +Megatonne = ("Мт") +Microgram = ("мкг") +Milligram = ("мг") +Nanogram = ("нг") +Pound = ("фунт") +ShortTon = ("тонна малая") +Tonne = ("т") diff --git a/UnitsNet/GeneratedCode/Resources/Mass.zh-CN.restext b/UnitsNet/GeneratedCode/Resources/Mass.zh-CN.restext index c327159736..d67fd83123 100644 --- a/UnitsNet/GeneratedCode/Resources/Mass.zh-CN.restext +++ b/UnitsNet/GeneratedCode/Resources/Mass.zh-CN.restext @@ -1,18 +1,18 @@ -Centigram = 厘克 -Decagram = 十克 -Decigram = 分克 -Gram = 克 -Hectogram = 百克 -Kilogram = 千克 -Kilopound = 千磅 -Kilotonne = 千吨 -LongTon = 长吨 -Megapound = 兆磅 -Megatonne = 兆吨 -Microgram = 微克 -Milligram = 毫克 -Nanogram = 纳克 -Ounce = 盎司 -Pound = 磅 -ShortTon = 短吨 -Tonne = 吨 +Centigram = ("厘克") +Decagram = ("十克") +Decigram = ("分克") +Gram = ("克") +Hectogram = ("百克") +Kilogram = ("千克") +Kilopound = ("千磅") +Kilotonne = ("千吨") +LongTon = ("长吨") +Megapound = ("兆磅") +Megatonne = ("兆吨") +Microgram = ("微克") +Milligram = ("毫克") +Nanogram = ("纳克") +Ounce = ("盎司") +Pound = ("磅") +ShortTon = ("短吨") +Tonne = ("吨") diff --git a/UnitsNet/GeneratedCode/Resources/MassConcentration.restext b/UnitsNet/GeneratedCode/Resources/MassConcentration.restext index 53a1be29ae..132d30b09e 100644 --- a/UnitsNet/GeneratedCode/Resources/MassConcentration.restext +++ b/UnitsNet/GeneratedCode/Resources/MassConcentration.restext @@ -1,49 +1,49 @@ -CentigramPerDeciliter = cg/dL -CentigramPerLiter = cg/L -CentigramPerMicroliter = cg/μL -CentigramPerMilliliter = cg/mL -DecigramPerDeciliter = dg/dL -DecigramPerLiter = dg/L -DecigramPerMicroliter = dg/μL -DecigramPerMilliliter = dg/mL -GramPerCubicCentimeter = g/cm³ -GramPerCubicMeter = g/m³ -GramPerCubicMillimeter = g/mm³ -GramPerDeciliter = g/dL -GramPerLiter = g/L -GramPerMicroliter = g/μL -GramPerMilliliter = g/mL -KilogramPerCubicCentimeter = kg/cm³ -KilogramPerCubicMeter = kg/m³ -KilogramPerCubicMillimeter = kg/mm³ -KilogramPerLiter = kg/L -KilopoundPerCubicFoot = kip/ft³ -KilopoundPerCubicInch = kip/in³ -MicrogramPerCubicMeter = µg/m³ -MicrogramPerDeciliter = µg/dL -MicrogramPerLiter = µg/L -MicrogramPerMicroliter = µg/μL -MicrogramPerMilliliter = µg/mL -MilligramPerCubicMeter = mg/m³ -MilligramPerDeciliter = mg/dL -MilligramPerLiter = mg/L -MilligramPerMicroliter = mg/μL -MilligramPerMilliliter = mg/mL -NanogramPerDeciliter = ng/dL -NanogramPerLiter = ng/L -NanogramPerMicroliter = ng/μL -NanogramPerMilliliter = ng/mL -OuncePerImperialGallon = oz/gal (imp.) -OuncePerUSGallon = oz/gal (U.S.) -PicogramPerDeciliter = pg/dL -PicogramPerLiter = pg/L -PicogramPerMicroliter = pg/μL -PicogramPerMilliliter = pg/mL -PoundPerCubicFoot = lb/ft³ -PoundPerCubicInch = lb/in³ -PoundPerImperialGallon = ppg (imp.) -PoundPerUSGallon = ppg (U.S.) -SlugPerCubicFoot = slug/ft³ -TonnePerCubicCentimeter = t/cm³ -TonnePerCubicMeter = t/m³ -TonnePerCubicMillimeter = t/mm³ +CentigramPerDeciliter = ("cg/dL") +CentigramPerLiter = ("cg/L") +CentigramPerMicroliter = ("cg/μL") +CentigramPerMilliliter = ("cg/mL") +DecigramPerDeciliter = ("dg/dL") +DecigramPerLiter = ("dg/L") +DecigramPerMicroliter = ("dg/μL") +DecigramPerMilliliter = ("dg/mL") +GramPerCubicCentimeter = ("g/cm³") +GramPerCubicMeter = ("g/m³") +GramPerCubicMillimeter = ("g/mm³") +GramPerDeciliter = ("g/dL") +GramPerLiter = ("g/L") +GramPerMicroliter = ("g/μL") +GramPerMilliliter = ("g/mL") +KilogramPerCubicCentimeter = ("kg/cm³") +KilogramPerCubicMeter = ("kg/m³") +KilogramPerCubicMillimeter = ("kg/mm³") +KilogramPerLiter = ("kg/L") +KilopoundPerCubicFoot = ("kip/ft³") +KilopoundPerCubicInch = ("kip/in³") +MicrogramPerCubicMeter = ("µg/m³") +MicrogramPerDeciliter = ("µg/dL") +MicrogramPerLiter = ("µg/L") +MicrogramPerMicroliter = ("µg/μL") +MicrogramPerMilliliter = ("µg/mL") +MilligramPerCubicMeter = ("mg/m³") +MilligramPerDeciliter = ("mg/dL") +MilligramPerLiter = ("mg/L") +MilligramPerMicroliter = ("mg/μL") +MilligramPerMilliliter = ("mg/mL") +NanogramPerDeciliter = ("ng/dL") +NanogramPerLiter = ("ng/L") +NanogramPerMicroliter = ("ng/μL") +NanogramPerMilliliter = ("ng/mL") +OuncePerImperialGallon = ("oz/gal (imp.)") +OuncePerUSGallon = ("oz/gal (U.S.)") +PicogramPerDeciliter = ("pg/dL") +PicogramPerLiter = ("pg/L") +PicogramPerMicroliter = ("pg/μL") +PicogramPerMilliliter = ("pg/mL") +PoundPerCubicFoot = ("lb/ft³") +PoundPerCubicInch = ("lb/in³") +PoundPerImperialGallon = ("ppg (imp.)") +PoundPerUSGallon = ("ppg (U.S.)") +SlugPerCubicFoot = ("slug/ft³") +TonnePerCubicCentimeter = ("t/cm³") +TonnePerCubicMeter = ("t/m³") +TonnePerCubicMillimeter = ("t/mm³") diff --git a/UnitsNet/GeneratedCode/Resources/MassConcentration.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/MassConcentration.ru-RU.restext index 28048cb667..6664407759 100644 --- a/UnitsNet/GeneratedCode/Resources/MassConcentration.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/MassConcentration.ru-RU.restext @@ -1,4 +1,4 @@ -GramPerCubicMeter = г/м³ -KilogramPerCubicMeter = кг/м³ -MicrogramPerCubicMeter = мкг/м³ -MilligramPerCubicMeter = мг/м³ +GramPerCubicMeter = ("г/м³") +KilogramPerCubicMeter = ("кг/м³") +MicrogramPerCubicMeter = ("мкг/м³") +MilligramPerCubicMeter = ("мг/м³") diff --git a/UnitsNet/GeneratedCode/Resources/MassFlow.restext b/UnitsNet/GeneratedCode/Resources/MassFlow.restext index 9b60f33864..6a8135cf92 100644 --- a/UnitsNet/GeneratedCode/Resources/MassFlow.restext +++ b/UnitsNet/GeneratedCode/Resources/MassFlow.restext @@ -1,33 +1,33 @@ -CentigramPerDay = cg/d -CentigramPerSecond = cg/s -DecagramPerDay = dag/d -DecagramPerSecond = dag/s -DecigramPerDay = dg/d -DecigramPerSecond = dg/s -GramPerDay = g/d -GramPerHour = g/h -GramPerSecond = g/s -HectogramPerDay = hg/d -HectogramPerSecond = hg/s -KilogramPerDay = kg/d -KilogramPerHour = kg/h -KilogramPerMinute = kg/min -KilogramPerSecond = kg/s -MegagramPerDay = Mg/d -MegapoundPerDay = Mlb/d -MegapoundPerHour = Mlb/h -MegapoundPerMinute = Mlb/min -MegapoundPerSecond = Mlb/s -MicrogramPerDay = µg/d -MicrogramPerSecond = µg/s -MilligramPerDay = mg/d -MilligramPerSecond = mg/s -NanogramPerDay = ng/d -NanogramPerSecond = ng/s -PoundPerDay = lb/d -PoundPerHour = lb/h -PoundPerMinute = lb/min -PoundPerSecond = lb/s -ShortTonPerHour = short tn/h -TonnePerDay = t/d -TonnePerHour = t/h +CentigramPerDay = ("cg/d") +CentigramPerSecond = ("cg/s", "cg/S") +DecagramPerDay = ("dag/d") +DecagramPerSecond = ("dag/s", "dag/S") +DecigramPerDay = ("dg/d") +DecigramPerSecond = ("dg/s", "dg/S") +GramPerDay = ("g/d") +GramPerHour = ("g/h") +GramPerSecond = ("g/s", "g/S") +HectogramPerDay = ("hg/d") +HectogramPerSecond = ("hg/s", "hg/S") +KilogramPerDay = ("kg/d") +KilogramPerHour = ("kg/h") +KilogramPerMinute = ("kg/min") +KilogramPerSecond = ("kg/s", "kg/S") +MegagramPerDay = ("Mg/d") +MegapoundPerDay = ("Mlb/d") +MegapoundPerHour = ("Mlb/h") +MegapoundPerMinute = ("Mlb/min") +MegapoundPerSecond = ("Mlb/s") +MicrogramPerDay = ("µg/d") +MicrogramPerSecond = ("µg/s", "µg/S") +MilligramPerDay = ("mg/d") +MilligramPerSecond = ("mg/s", "mg/S") +NanogramPerDay = ("ng/d") +NanogramPerSecond = ("ng/s", "ng/S") +PoundPerDay = ("lb/d") +PoundPerHour = ("lb/h") +PoundPerMinute = ("lb/min") +PoundPerSecond = ("lb/s") +ShortTonPerHour = ("short tn/h") +TonnePerDay = ("t/d") +TonnePerHour = ("t/h") diff --git a/UnitsNet/GeneratedCode/Resources/MassFlow.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/MassFlow.ru-RU.restext index 4f40ccbd3b..5f04da99f8 100644 --- a/UnitsNet/GeneratedCode/Resources/MassFlow.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/MassFlow.ru-RU.restext @@ -1,2 +1,2 @@ -KilogramPerHour = кг/ч -KilogramPerMinute = кг/мин +KilogramPerHour = ("кг/ч") +KilogramPerMinute = ("кг/мин") diff --git a/UnitsNet/GeneratedCode/Resources/MassFlux.restext b/UnitsNet/GeneratedCode/Resources/MassFlux.restext index 094ca2bad2..d02bbc6ccd 100644 --- a/UnitsNet/GeneratedCode/Resources/MassFlux.restext +++ b/UnitsNet/GeneratedCode/Resources/MassFlux.restext @@ -1,12 +1,12 @@ -GramPerHourPerSquareCentimeter = g·h⁻¹·cm⁻² -GramPerHourPerSquareMeter = g·h⁻¹·m⁻² -GramPerHourPerSquareMillimeter = g·h⁻¹·mm⁻² -GramPerSecondPerSquareCentimeter = g·s⁻¹·cm⁻² -GramPerSecondPerSquareMeter = g·s⁻¹·m⁻² -GramPerSecondPerSquareMillimeter = g·s⁻¹·mm⁻² -KilogramPerHourPerSquareCentimeter = kg·h⁻¹·cm⁻² -KilogramPerHourPerSquareMeter = kg·h⁻¹·m⁻² -KilogramPerHourPerSquareMillimeter = kg·h⁻¹·mm⁻² -KilogramPerSecondPerSquareCentimeter = kg·s⁻¹·cm⁻² -KilogramPerSecondPerSquareMeter = kg·s⁻¹·m⁻² -KilogramPerSecondPerSquareMillimeter = kg·s⁻¹·mm⁻² +GramPerHourPerSquareCentimeter = ("g·h⁻¹·cm⁻²") +GramPerHourPerSquareMeter = ("g·h⁻¹·m⁻²") +GramPerHourPerSquareMillimeter = ("g·h⁻¹·mm⁻²") +GramPerSecondPerSquareCentimeter = ("g·s⁻¹·cm⁻²") +GramPerSecondPerSquareMeter = ("g·s⁻¹·m⁻²") +GramPerSecondPerSquareMillimeter = ("g·s⁻¹·mm⁻²") +KilogramPerHourPerSquareCentimeter = ("kg·h⁻¹·cm⁻²") +KilogramPerHourPerSquareMeter = ("kg·h⁻¹·m⁻²") +KilogramPerHourPerSquareMillimeter = ("kg·h⁻¹·mm⁻²") +KilogramPerSecondPerSquareCentimeter = ("kg·s⁻¹·cm⁻²") +KilogramPerSecondPerSquareMeter = ("kg·s⁻¹·m⁻²") +KilogramPerSecondPerSquareMillimeter = ("kg·s⁻¹·mm⁻²") diff --git a/UnitsNet/GeneratedCode/Resources/MassFraction.restext b/UnitsNet/GeneratedCode/Resources/MassFraction.restext index f9950b5aa2..09dfd346fe 100644 --- a/UnitsNet/GeneratedCode/Resources/MassFraction.restext +++ b/UnitsNet/GeneratedCode/Resources/MassFraction.restext @@ -1,24 +1,24 @@ -CentigramPerGram = cg/g -CentigramPerKilogram = cg/kg -DecagramPerGram = dag/g -DecagramPerKilogram = dag/kg -DecigramPerGram = dg/g -DecigramPerKilogram = dg/kg -DecimalFraction = -GramPerGram = g/g -GramPerKilogram = g/kg -HectogramPerGram = hg/g -HectogramPerKilogram = hg/kg -KilogramPerGram = kg/g -KilogramPerKilogram = kg/kg -MicrogramPerGram = µg/g -MicrogramPerKilogram = µg/kg -MilligramPerGram = mg/g -MilligramPerKilogram = mg/kg -NanogramPerGram = ng/g -NanogramPerKilogram = ng/kg -PartPerBillion = ppb -PartPerMillion = ppm -PartPerThousand = ‰ -PartPerTrillion = ppt -Percent = % +CentigramPerGram = ("cg/g") +CentigramPerKilogram = ("cg/kg") +DecagramPerGram = ("dag/g") +DecagramPerKilogram = ("dag/kg") +DecigramPerGram = ("dg/g") +DecigramPerKilogram = ("dg/kg") +DecimalFraction = ("") +GramPerGram = ("g/g") +GramPerKilogram = ("g/kg") +HectogramPerGram = ("hg/g") +HectogramPerKilogram = ("hg/kg") +KilogramPerGram = ("kg/g") +KilogramPerKilogram = ("kg/kg") +MicrogramPerGram = ("µg/g") +MicrogramPerKilogram = ("µg/kg") +MilligramPerGram = ("mg/g") +MilligramPerKilogram = ("mg/kg") +NanogramPerGram = ("ng/g") +NanogramPerKilogram = ("ng/kg") +PartPerBillion = ("ppb") +PartPerMillion = ("ppm") +PartPerThousand = ("‰") +PartPerTrillion = ("ppt") +Percent = ("%", "% (w/w)") diff --git a/UnitsNet/GeneratedCode/Resources/MassMomentOfInertia.restext b/UnitsNet/GeneratedCode/Resources/MassMomentOfInertia.restext index e67ae2d8a4..e4918fe527 100644 --- a/UnitsNet/GeneratedCode/Resources/MassMomentOfInertia.restext +++ b/UnitsNet/GeneratedCode/Resources/MassMomentOfInertia.restext @@ -1,28 +1,28 @@ -GramSquareCentimeter = g·cm² -GramSquareDecimeter = g·dm² -GramSquareMeter = g·m² -GramSquareMillimeter = g·mm² -KilogramSquareCentimeter = kg·cm² -KilogramSquareDecimeter = kg·dm² -KilogramSquareMeter = kg·m² -KilogramSquareMillimeter = kg·mm² -KilotonneSquareCentimeter = kt·cm² -KilotonneSquareDecimeter = kt·dm² -KilotonneSquareMeter = kt·m² -KilotonneSquareMilimeter = kt·mm² -MegatonneSquareCentimeter = Mt·cm² -MegatonneSquareDecimeter = Mt·dm² -MegatonneSquareMeter = Mt·m² -MegatonneSquareMilimeter = Mt·mm² -MilligramSquareCentimeter = mg·cm² -MilligramSquareDecimeter = mg·dm² -MilligramSquareMeter = mg·m² -MilligramSquareMillimeter = mg·mm² -PoundSquareFoot = lb·ft² -PoundSquareInch = lb·in² -SlugSquareFoot = slug·ft² -SlugSquareInch = slug·in² -TonneSquareCentimeter = t·cm² -TonneSquareDecimeter = t·dm² -TonneSquareMeter = t·m² -TonneSquareMilimeter = t·mm² +GramSquareCentimeter = ("g·cm²") +GramSquareDecimeter = ("g·dm²") +GramSquareMeter = ("g·m²") +GramSquareMillimeter = ("g·mm²") +KilogramSquareCentimeter = ("kg·cm²") +KilogramSquareDecimeter = ("kg·dm²") +KilogramSquareMeter = ("kg·m²") +KilogramSquareMillimeter = ("kg·mm²") +KilotonneSquareCentimeter = ("kt·cm²") +KilotonneSquareDecimeter = ("kt·dm²") +KilotonneSquareMeter = ("kt·m²") +KilotonneSquareMilimeter = ("kt·mm²") +MegatonneSquareCentimeter = ("Mt·cm²") +MegatonneSquareDecimeter = ("Mt·dm²") +MegatonneSquareMeter = ("Mt·m²") +MegatonneSquareMilimeter = ("Mt·mm²") +MilligramSquareCentimeter = ("mg·cm²") +MilligramSquareDecimeter = ("mg·dm²") +MilligramSquareMeter = ("mg·m²") +MilligramSquareMillimeter = ("mg·mm²") +PoundSquareFoot = ("lb·ft²") +PoundSquareInch = ("lb·in²") +SlugSquareFoot = ("slug·ft²") +SlugSquareInch = ("slug·in²") +TonneSquareCentimeter = ("t·cm²") +TonneSquareDecimeter = ("t·dm²") +TonneSquareMeter = ("t·m²") +TonneSquareMilimeter = ("t·mm²") diff --git a/UnitsNet/GeneratedCode/Resources/MolarEnergy.restext b/UnitsNet/GeneratedCode/Resources/MolarEnergy.restext index ae39d8c3fb..8c4ea7ad1e 100644 --- a/UnitsNet/GeneratedCode/Resources/MolarEnergy.restext +++ b/UnitsNet/GeneratedCode/Resources/MolarEnergy.restext @@ -1,3 +1,3 @@ -JoulePerMole = J/mol -KilojoulePerMole = kJ/mol -MegajoulePerMole = MJ/mol +JoulePerMole = ("J/mol") +KilojoulePerMole = ("kJ/mol") +MegajoulePerMole = ("MJ/mol") diff --git a/UnitsNet/GeneratedCode/Resources/MolarEntropy.restext b/UnitsNet/GeneratedCode/Resources/MolarEntropy.restext index 521c94b41d..dbc70b29a0 100644 --- a/UnitsNet/GeneratedCode/Resources/MolarEntropy.restext +++ b/UnitsNet/GeneratedCode/Resources/MolarEntropy.restext @@ -1,3 +1,3 @@ -JoulePerMoleKelvin = J/(mol*K) -KilojoulePerMoleKelvin = kJ/(mol*K) -MegajoulePerMoleKelvin = MJ/(mol*K) +JoulePerMoleKelvin = ("J/(mol*K)") +KilojoulePerMoleKelvin = ("kJ/(mol*K)") +MegajoulePerMoleKelvin = ("MJ/(mol*K)") diff --git a/UnitsNet/GeneratedCode/Resources/MolarFlow.restext b/UnitsNet/GeneratedCode/Resources/MolarFlow.restext index b3b073a083..b2caad2427 100644 --- a/UnitsNet/GeneratedCode/Resources/MolarFlow.restext +++ b/UnitsNet/GeneratedCode/Resources/MolarFlow.restext @@ -1,9 +1,9 @@ -KilomolePerHour = kkmol/h -KilomolePerMinute = kmol/min -KilomolePerSecond = kmol/s -MolePerHour = kmol/h -MolePerMinute = mol/min -MolePerSecond = mol/s -PoundMolePerHour = lbmol/h -PoundMolePerMinute = lbmol/min -PoundMolePerSecond = lbmol/s +KilomolePerHour = ("kkmol/h") +KilomolePerMinute = ("kmol/min") +KilomolePerSecond = ("kmol/s") +MolePerHour = ("kmol/h") +MolePerMinute = ("mol/min") +MolePerSecond = ("mol/s") +PoundMolePerHour = ("lbmol/h") +PoundMolePerMinute = ("lbmol/min") +PoundMolePerSecond = ("lbmol/s") diff --git a/UnitsNet/GeneratedCode/Resources/MolarMass.restext b/UnitsNet/GeneratedCode/Resources/MolarMass.restext index d20ec2da2a..62face4da8 100644 --- a/UnitsNet/GeneratedCode/Resources/MolarMass.restext +++ b/UnitsNet/GeneratedCode/Resources/MolarMass.restext @@ -1,13 +1,13 @@ -CentigramPerMole = cg/mol -DecagramPerMole = dag/mol -DecigramPerMole = dg/mol -GramPerMole = g/mol -HectogramPerMole = hg/mol -KilogramPerKilomole = kg/kmol -KilogramPerMole = kg/mol -KilopoundPerMole = klb/mol -MegapoundPerMole = Mlb/mol -MicrogramPerMole = µg/mol -MilligramPerMole = mg/mol -NanogramPerMole = ng/mol -PoundPerMole = lb/mol +CentigramPerMole = ("cg/mol") +DecagramPerMole = ("dag/mol") +DecigramPerMole = ("dg/mol") +GramPerMole = ("g/mol") +HectogramPerMole = ("hg/mol") +KilogramPerKilomole = ("kg/kmol") +KilogramPerMole = ("kg/mol") +KilopoundPerMole = ("klb/mol") +MegapoundPerMole = ("Mlb/mol") +MicrogramPerMole = ("µg/mol") +MilligramPerMole = ("mg/mol") +NanogramPerMole = ("ng/mol") +PoundPerMole = ("lb/mol") diff --git a/UnitsNet/GeneratedCode/Resources/MolarMass.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/MolarMass.ru-RU.restext index dc6dde88d4..094a223ae0 100644 --- a/UnitsNet/GeneratedCode/Resources/MolarMass.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/MolarMass.ru-RU.restext @@ -1,12 +1,12 @@ -CentigramPerMole = сг/моль -DecagramPerMole = даг/моль -DecigramPerMole = дг/моль -GramPerMole = г/моль -HectogramPerMole = гг/моль -KilogramPerMole = кг/моль -KilopoundPerMole = кфунт/моль -MegapoundPerMole = Мфунт/моль -MicrogramPerMole = мкг/моль -MilligramPerMole = мг/моль -NanogramPerMole = нг/моль -PoundPerMole = фунт/моль +CentigramPerMole = ("сг/моль") +DecagramPerMole = ("даг/моль") +DecigramPerMole = ("дг/моль") +GramPerMole = ("г/моль") +HectogramPerMole = ("гг/моль") +KilogramPerMole = ("кг/моль") +KilopoundPerMole = ("кфунт/моль") +MegapoundPerMole = ("Мфунт/моль") +MicrogramPerMole = ("мкг/моль") +MilligramPerMole = ("мг/моль") +NanogramPerMole = ("нг/моль") +PoundPerMole = ("фунт/моль") diff --git a/UnitsNet/GeneratedCode/Resources/Molarity.restext b/UnitsNet/GeneratedCode/Resources/Molarity.restext index e1b9135e74..68ae055510 100644 --- a/UnitsNet/GeneratedCode/Resources/Molarity.restext +++ b/UnitsNet/GeneratedCode/Resources/Molarity.restext @@ -1,11 +1,11 @@ -CentimolePerLiter = cmol/L -DecimolePerLiter = dmol/L -FemtomolePerLiter = fmol/L -KilomolePerCubicMeter = kmol/m³ -MicromolePerLiter = µmol/L -MillimolePerLiter = mmol/L -MolePerCubicMeter = mol/m³ -MolePerLiter = mol/L -NanomolePerLiter = nmol/L -PicomolePerLiter = pmol/L -PoundMolePerCubicFoot = lbmol/ft³ +CentimolePerLiter = ("cmol/L", "cM") +DecimolePerLiter = ("dmol/L", "dM") +FemtomolePerLiter = ("fmol/L", "fM") +KilomolePerCubicMeter = ("kmol/m³") +MicromolePerLiter = ("µmol/L", "µM") +MillimolePerLiter = ("mmol/L", "mM") +MolePerCubicMeter = ("mol/m³") +MolePerLiter = ("mol/L", "M") +NanomolePerLiter = ("nmol/L", "nM") +PicomolePerLiter = ("pmol/L", "pM") +PoundMolePerCubicFoot = ("lbmol/ft³") diff --git a/UnitsNet/GeneratedCode/Resources/Permeability.restext b/UnitsNet/GeneratedCode/Resources/Permeability.restext index e505b3138c..cd40eeadb3 100644 --- a/UnitsNet/GeneratedCode/Resources/Permeability.restext +++ b/UnitsNet/GeneratedCode/Resources/Permeability.restext @@ -1 +1 @@ -HenryPerMeter = H/m +HenryPerMeter = ("H/m") diff --git a/UnitsNet/GeneratedCode/Resources/Permittivity.restext b/UnitsNet/GeneratedCode/Resources/Permittivity.restext index 72cd14c28c..0ab9ab1f1d 100644 --- a/UnitsNet/GeneratedCode/Resources/Permittivity.restext +++ b/UnitsNet/GeneratedCode/Resources/Permittivity.restext @@ -1 +1 @@ -FaradPerMeter = F/m +FaradPerMeter = ("F/m") diff --git a/UnitsNet/GeneratedCode/Resources/PorousMediumPermeability.restext b/UnitsNet/GeneratedCode/Resources/PorousMediumPermeability.restext index c83051161f..4af9248edb 100644 --- a/UnitsNet/GeneratedCode/Resources/PorousMediumPermeability.restext +++ b/UnitsNet/GeneratedCode/Resources/PorousMediumPermeability.restext @@ -1,5 +1,5 @@ -Darcy = D -Microdarcy = µD -Millidarcy = mD -SquareCentimeter = cm² -SquareMeter = m² +Darcy = ("D") +Microdarcy = ("µD") +Millidarcy = ("mD") +SquareCentimeter = ("cm²") +SquareMeter = ("m²") diff --git a/UnitsNet/GeneratedCode/Resources/Power.restext b/UnitsNet/GeneratedCode/Resources/Power.restext index bd548e234c..74d1bf453c 100644 --- a/UnitsNet/GeneratedCode/Resources/Power.restext +++ b/UnitsNet/GeneratedCode/Resources/Power.restext @@ -1,26 +1,26 @@ -BoilerHorsepower = hp(S) -BritishThermalUnitPerHour = Btu/h -Decawatt = daW -Deciwatt = dW -ElectricalHorsepower = hp(E) -Femtowatt = fW -GigajoulePerHour = GJ/h -Gigawatt = GW -HydraulicHorsepower = hp(H) -JoulePerHour = J/h -KilobritishThermalUnitPerHour = kBtu/h -KilojoulePerHour = kJ/h -Kilowatt = kW -MechanicalHorsepower = hp(I) -MegabritishThermalUnitPerHour = MBtu/h -MegajoulePerHour = MJ/h -Megawatt = MW -MetricHorsepower = hp(M) -Microwatt = µW -MillijoulePerHour = mJ/h -Milliwatt = mW -Nanowatt = nW -Petawatt = PW -Picowatt = pW -Terawatt = TW -Watt = W +BoilerHorsepower = ("hp(S)") +BritishThermalUnitPerHour = ("Btu/h", "Btu/hr") +Decawatt = ("daW") +Deciwatt = ("dW") +ElectricalHorsepower = ("hp(E)") +Femtowatt = ("fW") +GigajoulePerHour = ("GJ/h") +Gigawatt = ("GW") +HydraulicHorsepower = ("hp(H)") +JoulePerHour = ("J/h") +KilobritishThermalUnitPerHour = ("kBtu/h", "kBtu/hr") +KilojoulePerHour = ("kJ/h") +Kilowatt = ("kW") +MechanicalHorsepower = ("hp(I)") +MegabritishThermalUnitPerHour = ("MBtu/h", "MBtu/hr") +MegajoulePerHour = ("MJ/h") +Megawatt = ("MW") +MetricHorsepower = ("hp(M)") +Microwatt = ("µW") +MillijoulePerHour = ("mJ/h") +Milliwatt = ("mW") +Nanowatt = ("nW") +Petawatt = ("PW") +Picowatt = ("pW") +Terawatt = ("TW") +Watt = ("W") diff --git a/UnitsNet/GeneratedCode/Resources/PowerDensity.restext b/UnitsNet/GeneratedCode/Resources/PowerDensity.restext index 8101d8b4fd..08e896d6be 100644 --- a/UnitsNet/GeneratedCode/Resources/PowerDensity.restext +++ b/UnitsNet/GeneratedCode/Resources/PowerDensity.restext @@ -1,44 +1,44 @@ -DecawattPerCubicFoot = daW/ft³ -DecawattPerCubicInch = daW/in³ -DecawattPerCubicMeter = daW/m³ -DecawattPerLiter = daW/l -DeciwattPerCubicFoot = dW/ft³ -DeciwattPerCubicInch = dW/in³ -DeciwattPerCubicMeter = dW/m³ -DeciwattPerLiter = dW/l -GigawattPerCubicFoot = GW/ft³ -GigawattPerCubicInch = GW/in³ -GigawattPerCubicMeter = GW/m³ -GigawattPerLiter = GW/l -KilowattPerCubicFoot = kW/ft³ -KilowattPerCubicInch = kW/in³ -KilowattPerCubicMeter = kW/m³ -KilowattPerLiter = kW/l -MegawattPerCubicFoot = MW/ft³ -MegawattPerCubicInch = MW/in³ -MegawattPerCubicMeter = MW/m³ -MegawattPerLiter = MW/l -MicrowattPerCubicFoot = µW/ft³ -MicrowattPerCubicInch = µW/in³ -MicrowattPerCubicMeter = µW/m³ -MicrowattPerLiter = µW/l -MilliwattPerCubicFoot = mW/ft³ -MilliwattPerCubicInch = mW/in³ -MilliwattPerCubicMeter = mW/m³ -MilliwattPerLiter = mW/l -NanowattPerCubicFoot = nW/ft³ -NanowattPerCubicInch = nW/in³ -NanowattPerCubicMeter = nW/m³ -NanowattPerLiter = nW/l -PicowattPerCubicFoot = pW/ft³ -PicowattPerCubicInch = pW/in³ -PicowattPerCubicMeter = pW/m³ -PicowattPerLiter = pW/l -TerawattPerCubicFoot = TW/ft³ -TerawattPerCubicInch = TW/in³ -TerawattPerCubicMeter = TW/m³ -TerawattPerLiter = TW/l -WattPerCubicFoot = W/ft³ -WattPerCubicInch = W/in³ -WattPerCubicMeter = W/m³ -WattPerLiter = W/l +DecawattPerCubicFoot = ("daW/ft³") +DecawattPerCubicInch = ("daW/in³") +DecawattPerCubicMeter = ("daW/m³") +DecawattPerLiter = ("daW/l") +DeciwattPerCubicFoot = ("dW/ft³") +DeciwattPerCubicInch = ("dW/in³") +DeciwattPerCubicMeter = ("dW/m³") +DeciwattPerLiter = ("dW/l") +GigawattPerCubicFoot = ("GW/ft³") +GigawattPerCubicInch = ("GW/in³") +GigawattPerCubicMeter = ("GW/m³") +GigawattPerLiter = ("GW/l") +KilowattPerCubicFoot = ("kW/ft³") +KilowattPerCubicInch = ("kW/in³") +KilowattPerCubicMeter = ("kW/m³") +KilowattPerLiter = ("kW/l") +MegawattPerCubicFoot = ("MW/ft³") +MegawattPerCubicInch = ("MW/in³") +MegawattPerCubicMeter = ("MW/m³") +MegawattPerLiter = ("MW/l") +MicrowattPerCubicFoot = ("µW/ft³") +MicrowattPerCubicInch = ("µW/in³") +MicrowattPerCubicMeter = ("µW/m³") +MicrowattPerLiter = ("µW/l") +MilliwattPerCubicFoot = ("mW/ft³") +MilliwattPerCubicInch = ("mW/in³") +MilliwattPerCubicMeter = ("mW/m³") +MilliwattPerLiter = ("mW/l") +NanowattPerCubicFoot = ("nW/ft³") +NanowattPerCubicInch = ("nW/in³") +NanowattPerCubicMeter = ("nW/m³") +NanowattPerLiter = ("nW/l") +PicowattPerCubicFoot = ("pW/ft³") +PicowattPerCubicInch = ("pW/in³") +PicowattPerCubicMeter = ("pW/m³") +PicowattPerLiter = ("pW/l") +TerawattPerCubicFoot = ("TW/ft³") +TerawattPerCubicInch = ("TW/in³") +TerawattPerCubicMeter = ("TW/m³") +TerawattPerLiter = ("TW/l") +WattPerCubicFoot = ("W/ft³") +WattPerCubicInch = ("W/in³") +WattPerCubicMeter = ("W/m³") +WattPerLiter = ("W/l") diff --git a/UnitsNet/GeneratedCode/Resources/PowerRatio.restext b/UnitsNet/GeneratedCode/Resources/PowerRatio.restext index 3d05e94571..7e8a6001e5 100644 --- a/UnitsNet/GeneratedCode/Resources/PowerRatio.restext +++ b/UnitsNet/GeneratedCode/Resources/PowerRatio.restext @@ -1,2 +1,2 @@ -DecibelMilliwatt = dBmW -DecibelWatt = dBW +DecibelMilliwatt = ("dBmW", "dBm") +DecibelWatt = ("dBW") diff --git a/UnitsNet/GeneratedCode/Resources/Pressure.restext b/UnitsNet/GeneratedCode/Resources/Pressure.restext index c098e4258e..b27ed211fc 100644 --- a/UnitsNet/GeneratedCode/Resources/Pressure.restext +++ b/UnitsNet/GeneratedCode/Resources/Pressure.restext @@ -1,47 +1,47 @@ -Atmosphere = atm -Bar = bar -Centibar = cbar -Decapascal = daPa -Decibar = dbar -DynePerSquareCentimeter = dyn/cm² -FootOfElevation = ft of elevation -FootOfHead = ft of head -Gigapascal = GPa -Hectopascal = hPa -InchOfMercury = inHg -InchOfWaterColumn = inH2O -Kilobar = kbar -KilogramForcePerSquareCentimeter = kgf/cm² -KilogramForcePerSquareMeter = kgf/m² -KilogramForcePerSquareMillimeter = kgf/mm² -KilonewtonPerSquareCentimeter = kN/cm² -KilonewtonPerSquareMeter = kN/m² -KilonewtonPerSquareMillimeter = kN/mm² -Kilopascal = kPa -KilopoundForcePerSquareFoot = kipf/ft² -KilopoundForcePerSquareInch = ksi -KilopoundForcePerSquareMil = kipf/mil² -Megabar = Mbar -MeganewtonPerSquareMeter = MN/m² -Megapascal = MPa -MeterOfElevation = m of elevation -MeterOfHead = m of head -Microbar = µbar -Micropascal = µPa -Millibar = mbar -MillimeterOfMercury = mmHg -MillimeterOfWaterColumn = mmH2O -Millipascal = mPa -NewtonPerSquareCentimeter = N/cm² -NewtonPerSquareMeter = N/m² -NewtonPerSquareMillimeter = N/mm² -Pascal = Pa -PoundForcePerSquareFoot = lb/ft² -PoundForcePerSquareInch = psi -PoundForcePerSquareMil = lb/mil² -PoundPerInchSecondSquared = lbm/(in·s²) -TechnicalAtmosphere = at -TonneForcePerSquareCentimeter = tf/cm² -TonneForcePerSquareMeter = tf/m² -TonneForcePerSquareMillimeter = tf/mm² -Torr = torr +Atmosphere = ("atm") +Bar = ("bar") +Centibar = ("cbar") +Decapascal = ("daPa") +Decibar = ("dbar") +DynePerSquareCentimeter = ("dyn/cm²") +FootOfElevation = ("ft of elevation") +FootOfHead = ("ft of head") +Gigapascal = ("GPa") +Hectopascal = ("hPa") +InchOfMercury = ("inHg") +InchOfWaterColumn = ("inH2O", "inch wc", "wc") +Kilobar = ("kbar") +KilogramForcePerSquareCentimeter = ("kgf/cm²") +KilogramForcePerSquareMeter = ("kgf/m²") +KilogramForcePerSquareMillimeter = ("kgf/mm²") +KilonewtonPerSquareCentimeter = ("kN/cm²") +KilonewtonPerSquareMeter = ("kN/m²") +KilonewtonPerSquareMillimeter = ("kN/mm²") +Kilopascal = ("kPa") +KilopoundForcePerSquareFoot = ("kipf/ft²") +KilopoundForcePerSquareInch = ("ksi", "kipf/in²") +KilopoundForcePerSquareMil = ("kipf/mil²") +Megabar = ("Mbar") +MeganewtonPerSquareMeter = ("MN/m²") +Megapascal = ("MPa") +MeterOfElevation = ("m of elevation") +MeterOfHead = ("m of head") +Microbar = ("µbar") +Micropascal = ("µPa") +Millibar = ("mbar") +MillimeterOfMercury = ("mmHg") +MillimeterOfWaterColumn = ("mmH2O", "mm wc") +Millipascal = ("mPa") +NewtonPerSquareCentimeter = ("N/cm²") +NewtonPerSquareMeter = ("N/m²") +NewtonPerSquareMillimeter = ("N/mm²") +Pascal = ("Pa") +PoundForcePerSquareFoot = ("lb/ft²") +PoundForcePerSquareInch = ("psi", "lb/in²") +PoundForcePerSquareMil = ("lb/mil²", "lbs/mil²") +PoundPerInchSecondSquared = ("lbm/(in·s²)", "lb/(in·s²)") +TechnicalAtmosphere = ("at") +TonneForcePerSquareCentimeter = ("tf/cm²") +TonneForcePerSquareMeter = ("tf/m²") +TonneForcePerSquareMillimeter = ("tf/mm²") +Torr = ("torr") diff --git a/UnitsNet/GeneratedCode/Resources/Pressure.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Pressure.ru-RU.restext index 4399c0ef01..3263fea4f7 100644 --- a/UnitsNet/GeneratedCode/Resources/Pressure.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Pressure.ru-RU.restext @@ -1,31 +1,31 @@ -Atmosphere = атм -Bar = бар -Centibar = сбар -Decapascal = даПа -Decibar = дбар -Gigapascal = ГПа -Hectopascal = гПа -Kilobar = кбар -KilogramForcePerSquareCentimeter = кгс/см² -KilogramForcePerSquareMeter = кгс/м² -KilogramForcePerSquareMillimeter = кгс/мм² -KilonewtonPerSquareCentimeter = кН/см² -KilonewtonPerSquareMeter = кН/м² -KilonewtonPerSquareMillimeter = кН/мм² -Kilopascal = кПа -KilopoundForcePerSquareInch = ksi -Megabar = Мбар -MeganewtonPerSquareMeter = МН/м² -Megapascal = МПа -Microbar = мкбар -Micropascal = мкПа -Millibar = мбар -MillimeterOfMercury = мм рт.ст. -Millipascal = мПа -NewtonPerSquareCentimeter = Н/см² -NewtonPerSquareMeter = Н/м² -NewtonPerSquareMillimeter = Н/мм² -Pascal = Па -PoundForcePerSquareInch = psi -TechnicalAtmosphere = ат -Torr = торр +Atmosphere = ("атм") +Bar = ("бар") +Centibar = ("сбар") +Decapascal = ("даПа") +Decibar = ("дбар") +Gigapascal = ("ГПа") +Hectopascal = ("гПа") +Kilobar = ("кбар") +KilogramForcePerSquareCentimeter = ("кгс/см²") +KilogramForcePerSquareMeter = ("кгс/м²") +KilogramForcePerSquareMillimeter = ("кгс/мм²") +KilonewtonPerSquareCentimeter = ("кН/см²") +KilonewtonPerSquareMeter = ("кН/м²") +KilonewtonPerSquareMillimeter = ("кН/мм²") +Kilopascal = ("кПа") +KilopoundForcePerSquareInch = ("ksi", "kipf/in²") +Megabar = ("Мбар") +MeganewtonPerSquareMeter = ("МН/м²") +Megapascal = ("МПа") +Microbar = ("мкбар") +Micropascal = ("мкПа") +Millibar = ("мбар") +MillimeterOfMercury = ("мм рт.ст.") +Millipascal = ("мПа") +NewtonPerSquareCentimeter = ("Н/см²") +NewtonPerSquareMeter = ("Н/м²") +NewtonPerSquareMillimeter = ("Н/мм²") +Pascal = ("Па") +PoundForcePerSquareInch = ("psi", "lb/in²") +TechnicalAtmosphere = ("ат") +Torr = ("торр") diff --git a/UnitsNet/GeneratedCode/Resources/PressureChangeRate.restext b/UnitsNet/GeneratedCode/Resources/PressureChangeRate.restext index cb149914f1..2df40aa34e 100644 --- a/UnitsNet/GeneratedCode/Resources/PressureChangeRate.restext +++ b/UnitsNet/GeneratedCode/Resources/PressureChangeRate.restext @@ -1,14 +1,14 @@ -AtmospherePerSecond = atm/s -KilopascalPerMinute = kPa/min -KilopascalPerSecond = kPa/s -KilopoundForcePerSquareInchPerMinute = ksi/min -KilopoundForcePerSquareInchPerSecond = ksi/s -MegapascalPerMinute = MPa/min -MegapascalPerSecond = MPa/s -MegapoundForcePerSquareInchPerMinute = Mpsi/min -MegapoundForcePerSquareInchPerSecond = Mpsi/s -MillimeterOfMercuryPerSecond = mmHg/s -PascalPerMinute = Pa/min -PascalPerSecond = Pa/s -PoundForcePerSquareInchPerMinute = psi/min -PoundForcePerSquareInchPerSecond = psi/s +AtmospherePerSecond = ("atm/s") +KilopascalPerMinute = ("kPa/min") +KilopascalPerSecond = ("kPa/s") +KilopoundForcePerSquareInchPerMinute = ("ksi/min", "kipf/in²/min") +KilopoundForcePerSquareInchPerSecond = ("ksi/s", "kipf/in²/s") +MegapascalPerMinute = ("MPa/min") +MegapascalPerSecond = ("MPa/s") +MegapoundForcePerSquareInchPerMinute = ("Mpsi/min", "Mlb/in²/min") +MegapoundForcePerSquareInchPerSecond = ("Mpsi/s", "Mlb/in²/s") +MillimeterOfMercuryPerSecond = ("mmHg/s") +PascalPerMinute = ("Pa/min") +PascalPerSecond = ("Pa/s") +PoundForcePerSquareInchPerMinute = ("psi/min", "lb/in²/min") +PoundForcePerSquareInchPerSecond = ("psi/s", "lb/in²/s") diff --git a/UnitsNet/GeneratedCode/Resources/PressureChangeRate.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/PressureChangeRate.ru-RU.restext index b0770fbd4d..08c3778ada 100644 --- a/UnitsNet/GeneratedCode/Resources/PressureChangeRate.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/PressureChangeRate.ru-RU.restext @@ -1,14 +1,14 @@ -AtmospherePerSecond = атм/с -KilopascalPerMinute = кПа/мин -KilopascalPerSecond = кПа/с -KilopoundForcePerSquareInchPerMinute = ksi/мин -KilopoundForcePerSquareInchPerSecond = ksi/с -MegapascalPerMinute = МПа/мин -MegapascalPerSecond = МПа/с -MegapoundForcePerSquareInchPerMinute = Мpsi/мин -MegapoundForcePerSquareInchPerSecond = Мpsi/с -MillimeterOfMercuryPerSecond = mmHg/с -PascalPerMinute = Па/мин -PascalPerSecond = Па/с -PoundForcePerSquareInchPerMinute = psi/мин -PoundForcePerSquareInchPerSecond = psi/с +AtmospherePerSecond = ("атм/с") +KilopascalPerMinute = ("кПа/мин") +KilopascalPerSecond = ("кПа/с") +KilopoundForcePerSquareInchPerMinute = ("ksi/мин", "kipf/in²/мин") +KilopoundForcePerSquareInchPerSecond = ("ksi/с", "kipf/in²/с") +MegapascalPerMinute = ("МПа/мин") +MegapascalPerSecond = ("МПа/с") +MegapoundForcePerSquareInchPerMinute = ("Мpsi/мин", "Мlb/in²/мин") +MegapoundForcePerSquareInchPerSecond = ("Мpsi/с", "Мlb/in²/с") +MillimeterOfMercuryPerSecond = ("mmHg/с") +PascalPerMinute = ("Па/мин") +PascalPerSecond = ("Па/с") +PoundForcePerSquareInchPerMinute = ("psi/мин", "lb/in²/мин") +PoundForcePerSquareInchPerSecond = ("psi/с", "lb/in²/с") diff --git a/UnitsNet/GeneratedCode/Resources/Ratio.restext b/UnitsNet/GeneratedCode/Resources/Ratio.restext index 6c31abff6c..7f94b4bfae 100644 --- a/UnitsNet/GeneratedCode/Resources/Ratio.restext +++ b/UnitsNet/GeneratedCode/Resources/Ratio.restext @@ -1,6 +1,6 @@ -DecimalFraction = -PartPerBillion = ppb -PartPerMillion = ppm -PartPerThousand = ‰ -PartPerTrillion = ppt -Percent = % +DecimalFraction = ("") +PartPerBillion = ("ppb") +PartPerMillion = ("ppm") +PartPerThousand = ("‰") +PartPerTrillion = ("ppt") +Percent = ("%") diff --git a/UnitsNet/GeneratedCode/Resources/RatioChangeRate.restext b/UnitsNet/GeneratedCode/Resources/RatioChangeRate.restext index 0cff72a40e..bfc3b132eb 100644 --- a/UnitsNet/GeneratedCode/Resources/RatioChangeRate.restext +++ b/UnitsNet/GeneratedCode/Resources/RatioChangeRate.restext @@ -1,2 +1,2 @@ -DecimalFractionPerSecond = /s -PercentPerSecond = %/s +DecimalFractionPerSecond = ("/s") +PercentPerSecond = ("%/s") diff --git a/UnitsNet/GeneratedCode/Resources/ReactiveEnergy.restext b/UnitsNet/GeneratedCode/Resources/ReactiveEnergy.restext index b30d8a5dea..78c00ad4ee 100644 --- a/UnitsNet/GeneratedCode/Resources/ReactiveEnergy.restext +++ b/UnitsNet/GeneratedCode/Resources/ReactiveEnergy.restext @@ -1,3 +1,3 @@ -KilovoltampereReactiveHour = kvarh -MegavoltampereReactiveHour = Mvarh -VoltampereReactiveHour = varh +KilovoltampereReactiveHour = ("kvarh") +MegavoltampereReactiveHour = ("Mvarh") +VoltampereReactiveHour = ("varh") diff --git a/UnitsNet/GeneratedCode/Resources/ReactivePower.restext b/UnitsNet/GeneratedCode/Resources/ReactivePower.restext index f78061dc8c..7abc65e55d 100644 --- a/UnitsNet/GeneratedCode/Resources/ReactivePower.restext +++ b/UnitsNet/GeneratedCode/Resources/ReactivePower.restext @@ -1,4 +1,4 @@ -GigavoltampereReactive = Gvar -KilovoltampereReactive = kvar -MegavoltampereReactive = Mvar -VoltampereReactive = var +GigavoltampereReactive = ("Gvar") +KilovoltampereReactive = ("kvar") +MegavoltampereReactive = ("Mvar") +VoltampereReactive = ("var") diff --git a/UnitsNet/GeneratedCode/Resources/ReciprocalArea.restext b/UnitsNet/GeneratedCode/Resources/ReciprocalArea.restext index d1e63bca85..555d558fb6 100644 --- a/UnitsNet/GeneratedCode/Resources/ReciprocalArea.restext +++ b/UnitsNet/GeneratedCode/Resources/ReciprocalArea.restext @@ -1,11 +1,11 @@ -InverseSquareCentimeter = cm⁻² -InverseSquareDecimeter = dm⁻² -InverseSquareFoot = ft⁻² -InverseSquareInch = in⁻² -InverseSquareKilometer = km⁻² -InverseSquareMeter = m⁻² -InverseSquareMicrometer = µm⁻² -InverseSquareMile = mi⁻² -InverseSquareMillimeter = mm⁻² -InverseSquareYard = yd⁻² -InverseUsSurveySquareFoot = ft⁻² (US) +InverseSquareCentimeter = ("cm⁻²") +InverseSquareDecimeter = ("dm⁻²") +InverseSquareFoot = ("ft⁻²") +InverseSquareInch = ("in⁻²") +InverseSquareKilometer = ("km⁻²") +InverseSquareMeter = ("m⁻²") +InverseSquareMicrometer = ("µm⁻²") +InverseSquareMile = ("mi⁻²") +InverseSquareMillimeter = ("mm⁻²") +InverseSquareYard = ("yd⁻²") +InverseUsSurveySquareFoot = ("ft⁻² (US)") diff --git a/UnitsNet/GeneratedCode/Resources/ReciprocalLength.restext b/UnitsNet/GeneratedCode/Resources/ReciprocalLength.restext index 6166474446..c95fe3c06c 100644 --- a/UnitsNet/GeneratedCode/Resources/ReciprocalLength.restext +++ b/UnitsNet/GeneratedCode/Resources/ReciprocalLength.restext @@ -1,10 +1,10 @@ -InverseCentimeter = cm⁻¹ -InverseFoot = ft⁻¹ -InverseInch = in⁻¹ -InverseMeter = m⁻¹ -InverseMicroinch = µin⁻¹ -InverseMil = mil⁻¹ -InverseMile = mi⁻¹ -InverseMillimeter = mm⁻¹ -InverseUsSurveyFoot = ftUS⁻¹ -InverseYard = yd⁻¹ +InverseCentimeter = ("cm⁻¹", "1/cm") +InverseFoot = ("ft⁻¹", "1/ft") +InverseInch = ("in⁻¹", "1/in") +InverseMeter = ("m⁻¹", "1/m") +InverseMicroinch = ("µin⁻¹", "1/µin") +InverseMil = ("mil⁻¹", "1/mil") +InverseMile = ("mi⁻¹", "1/mi") +InverseMillimeter = ("mm⁻¹", "1/mm") +InverseUsSurveyFoot = ("ftUS⁻¹", "1/ftUS") +InverseYard = ("yd⁻¹", "1/yd") diff --git a/UnitsNet/GeneratedCode/Resources/RelativeHumidity.restext b/UnitsNet/GeneratedCode/Resources/RelativeHumidity.restext index 31006b795a..78c88034d3 100644 --- a/UnitsNet/GeneratedCode/Resources/RelativeHumidity.restext +++ b/UnitsNet/GeneratedCode/Resources/RelativeHumidity.restext @@ -1 +1 @@ -Percent = %RH +Percent = ("%RH") diff --git a/UnitsNet/GeneratedCode/Resources/RotationalAcceleration.restext b/UnitsNet/GeneratedCode/Resources/RotationalAcceleration.restext index 075f7f605b..a05729de46 100644 --- a/UnitsNet/GeneratedCode/Resources/RotationalAcceleration.restext +++ b/UnitsNet/GeneratedCode/Resources/RotationalAcceleration.restext @@ -1,4 +1,4 @@ -DegreePerSecondSquared = °/s² -RadianPerSecondSquared = rad/s² -RevolutionPerMinutePerSecond = rpm/s -RevolutionPerSecondSquared = r/s² +DegreePerSecondSquared = ("°/s²", "deg/s²") +RadianPerSecondSquared = ("rad/s²") +RevolutionPerMinutePerSecond = ("rpm/s") +RevolutionPerSecondSquared = ("r/s²") diff --git a/UnitsNet/GeneratedCode/Resources/RotationalSpeed.restext b/UnitsNet/GeneratedCode/Resources/RotationalSpeed.restext index 3fad46e7ff..ebe053b5f5 100644 --- a/UnitsNet/GeneratedCode/Resources/RotationalSpeed.restext +++ b/UnitsNet/GeneratedCode/Resources/RotationalSpeed.restext @@ -1,13 +1,13 @@ -CentiradianPerSecond = crad/s -DeciradianPerSecond = drad/s -DegreePerMinute = °/min -DegreePerSecond = °/s -MicrodegreePerSecond = µ°/s -MicroradianPerSecond = µrad/s -MillidegreePerSecond = m°/s -MilliradianPerSecond = mrad/s -NanodegreePerSecond = n°/s -NanoradianPerSecond = nrad/s -RadianPerSecond = rad/s -RevolutionPerMinute = rpm -RevolutionPerSecond = r/s +CentiradianPerSecond = ("crad/s") +DeciradianPerSecond = ("drad/s") +DegreePerMinute = ("°/min", "deg/min") +DegreePerSecond = ("°/s", "deg/s") +MicrodegreePerSecond = ("µ°/s", "µdeg/s") +MicroradianPerSecond = ("µrad/s") +MillidegreePerSecond = ("m°/s", "mdeg/s") +MilliradianPerSecond = ("mrad/s") +NanodegreePerSecond = ("n°/s", "ndeg/s") +NanoradianPerSecond = ("nrad/s") +RadianPerSecond = ("rad/s") +RevolutionPerMinute = ("rpm", "r/min") +RevolutionPerSecond = ("r/s") diff --git a/UnitsNet/GeneratedCode/Resources/RotationalSpeed.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/RotationalSpeed.ru-RU.restext index 91a81c7e5f..7eb8c063cd 100644 --- a/UnitsNet/GeneratedCode/Resources/RotationalSpeed.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/RotationalSpeed.ru-RU.restext @@ -1,12 +1,12 @@ -CentiradianPerSecond = срад/с -DeciradianPerSecond = драд/с -DegreePerSecond = °/с -MicrodegreePerSecond = мк°/с -MicroradianPerSecond = мкрад/с -MillidegreePerSecond = м°/с -MilliradianPerSecond = мрад/с -NanodegreePerSecond = н°/с -NanoradianPerSecond = нрад/с -RadianPerSecond = рад/с -RevolutionPerMinute = об/мин -RevolutionPerSecond = об/с +CentiradianPerSecond = ("срад/с") +DeciradianPerSecond = ("драд/с") +DegreePerSecond = ("°/с") +MicrodegreePerSecond = ("мк°/с") +MicroradianPerSecond = ("мкрад/с") +MillidegreePerSecond = ("м°/с") +MilliradianPerSecond = ("мрад/с") +NanodegreePerSecond = ("н°/с") +NanoradianPerSecond = ("нрад/с") +RadianPerSecond = ("рад/с") +RevolutionPerMinute = ("об/мин") +RevolutionPerSecond = ("об/с") diff --git a/UnitsNet/GeneratedCode/Resources/RotationalStiffness.restext b/UnitsNet/GeneratedCode/Resources/RotationalStiffness.restext index e45138c515..ad0af65e6b 100644 --- a/UnitsNet/GeneratedCode/Resources/RotationalStiffness.restext +++ b/UnitsNet/GeneratedCode/Resources/RotationalStiffness.restext @@ -1,33 +1,33 @@ -CentinewtonMeterPerDegree = cN·m/deg -CentinewtonMillimeterPerDegree = cN·mm/deg -CentinewtonMillimeterPerRadian = cN·mm/rad -DecanewtonMeterPerDegree = daN·m/deg -DecanewtonMillimeterPerDegree = daN·mm/deg -DecanewtonMillimeterPerRadian = daN·mm/rad -DecinewtonMeterPerDegree = dN·m/deg -DecinewtonMillimeterPerDegree = dN·mm/deg -DecinewtonMillimeterPerRadian = dN·mm/rad -KilonewtonMeterPerDegree = kN·m/deg -KilonewtonMeterPerRadian = kN·m/rad -KilonewtonMillimeterPerDegree = kN·mm/deg -KilonewtonMillimeterPerRadian = kN·mm/rad -KilopoundForceFootPerDegrees = kipf·ft/° -MeganewtonMeterPerDegree = MN·m/deg -MeganewtonMeterPerRadian = MN·m/rad -MeganewtonMillimeterPerDegree = MN·mm/deg -MeganewtonMillimeterPerRadian = MN·mm/rad -MicronewtonMeterPerDegree = µN·m/deg -MicronewtonMillimeterPerDegree = µN·mm/deg -MicronewtonMillimeterPerRadian = µN·mm/rad -MillinewtonMeterPerDegree = mN·m/deg -MillinewtonMillimeterPerDegree = mN·mm/deg -MillinewtonMillimeterPerRadian = mN·mm/rad -NanonewtonMeterPerDegree = nN·m/deg -NanonewtonMillimeterPerDegree = nN·mm/deg -NanonewtonMillimeterPerRadian = nN·mm/rad -NewtonMeterPerDegree = N·m/deg -NewtonMeterPerRadian = N·m/rad -NewtonMillimeterPerDegree = N·mm/deg -NewtonMillimeterPerRadian = N·mm/rad -PoundForceFeetPerRadian = lbf·ft/rad -PoundForceFootPerDegrees = lbf·ft/deg +CentinewtonMeterPerDegree = ("cN·m/deg", "cNm/deg", "cN·m/°", "cNm/°") +CentinewtonMillimeterPerDegree = ("cN·mm/deg", "cNmm/deg", "cN·mm/°", "cNmm/°") +CentinewtonMillimeterPerRadian = ("cN·mm/rad", "cNmm/rad") +DecanewtonMeterPerDegree = ("daN·m/deg", "daNm/deg", "daN·m/°", "daNm/°") +DecanewtonMillimeterPerDegree = ("daN·mm/deg", "daNmm/deg", "daN·mm/°", "daNmm/°") +DecanewtonMillimeterPerRadian = ("daN·mm/rad", "daNmm/rad") +DecinewtonMeterPerDegree = ("dN·m/deg", "dNm/deg", "dN·m/°", "dNm/°") +DecinewtonMillimeterPerDegree = ("dN·mm/deg", "dNmm/deg", "dN·mm/°", "dNmm/°") +DecinewtonMillimeterPerRadian = ("dN·mm/rad", "dNmm/rad") +KilonewtonMeterPerDegree = ("kN·m/deg", "kNm/deg", "kN·m/°", "kNm/°") +KilonewtonMeterPerRadian = ("kN·m/rad", "kNm/rad") +KilonewtonMillimeterPerDegree = ("kN·mm/deg", "kNmm/deg", "kN·mm/°", "kNmm/°") +KilonewtonMillimeterPerRadian = ("kN·mm/rad", "kNmm/rad") +KilopoundForceFootPerDegrees = ("kipf·ft/°", "kip·ft/°g", "k·ft/°", "kipf·ft/deg", "kip·ft/deg", "k·ft/deg") +MeganewtonMeterPerDegree = ("MN·m/deg", "MNm/deg", "MN·m/°", "MNm/°") +MeganewtonMeterPerRadian = ("MN·m/rad", "MNm/rad") +MeganewtonMillimeterPerDegree = ("MN·mm/deg", "MNmm/deg", "MN·mm/°", "MNmm/°") +MeganewtonMillimeterPerRadian = ("MN·mm/rad", "MNmm/rad") +MicronewtonMeterPerDegree = ("µN·m/deg", "µNm/deg", "µN·m/°", "µNm/°") +MicronewtonMillimeterPerDegree = ("µN·mm/deg", "µNmm/deg", "µN·mm/°", "µNmm/°") +MicronewtonMillimeterPerRadian = ("µN·mm/rad", "µNmm/rad") +MillinewtonMeterPerDegree = ("mN·m/deg", "mNm/deg", "mN·m/°", "mNm/°") +MillinewtonMillimeterPerDegree = ("mN·mm/deg", "mNmm/deg", "mN·mm/°", "mNmm/°") +MillinewtonMillimeterPerRadian = ("mN·mm/rad", "mNmm/rad") +NanonewtonMeterPerDegree = ("nN·m/deg", "nNm/deg", "nN·m/°", "nNm/°") +NanonewtonMillimeterPerDegree = ("nN·mm/deg", "nNmm/deg", "nN·mm/°", "nNmm/°") +NanonewtonMillimeterPerRadian = ("nN·mm/rad", "nNmm/rad") +NewtonMeterPerDegree = ("N·m/deg", "Nm/deg", "N·m/°", "Nm/°") +NewtonMeterPerRadian = ("N·m/rad", "Nm/rad") +NewtonMillimeterPerDegree = ("N·mm/deg", "Nmm/deg", "N·mm/°", "Nmm/°") +NewtonMillimeterPerRadian = ("N·mm/rad", "Nmm/rad") +PoundForceFeetPerRadian = ("lbf·ft/rad") +PoundForceFootPerDegrees = ("lbf·ft/deg") diff --git a/UnitsNet/GeneratedCode/Resources/RotationalStiffnessPerLength.restext b/UnitsNet/GeneratedCode/Resources/RotationalStiffnessPerLength.restext index 9e11fa7d24..c567e68bcf 100644 --- a/UnitsNet/GeneratedCode/Resources/RotationalStiffnessPerLength.restext +++ b/UnitsNet/GeneratedCode/Resources/RotationalStiffnessPerLength.restext @@ -1,5 +1,5 @@ -KilonewtonMeterPerRadianPerMeter = kN·m/rad/m -KilopoundForceFootPerDegreesPerFoot = kipf·ft/°/ft -MeganewtonMeterPerRadianPerMeter = MN·m/rad/m -NewtonMeterPerRadianPerMeter = N·m/rad/m -PoundForceFootPerDegreesPerFoot = lbf·ft/deg/ft +KilonewtonMeterPerRadianPerMeter = ("kN·m/rad/m", "kNm/rad/m") +KilopoundForceFootPerDegreesPerFoot = ("kipf·ft/°/ft", "kip·ft/°/ft", "k·ft/°/ft", "kipf·ft/deg/ft", "kip·ft/deg/ft", "k·ft/deg/ft") +MeganewtonMeterPerRadianPerMeter = ("MN·m/rad/m", "MNm/rad/m") +NewtonMeterPerRadianPerMeter = ("N·m/rad/m", "Nm/rad/m") +PoundForceFootPerDegreesPerFoot = ("lbf·ft/deg/ft") diff --git a/UnitsNet/GeneratedCode/Resources/Scalar.restext b/UnitsNet/GeneratedCode/Resources/Scalar.restext index 995d055a69..f2220753f7 100644 --- a/UnitsNet/GeneratedCode/Resources/Scalar.restext +++ b/UnitsNet/GeneratedCode/Resources/Scalar.restext @@ -1 +1 @@ -Amount = +Amount = ("") diff --git a/UnitsNet/GeneratedCode/Resources/SolidAngle.restext b/UnitsNet/GeneratedCode/Resources/SolidAngle.restext index 657e047efc..c526b3ee3c 100644 --- a/UnitsNet/GeneratedCode/Resources/SolidAngle.restext +++ b/UnitsNet/GeneratedCode/Resources/SolidAngle.restext @@ -1 +1 @@ -Steradian = sr +Steradian = ("sr") diff --git a/UnitsNet/GeneratedCode/Resources/SpecificEnergy.restext b/UnitsNet/GeneratedCode/Resources/SpecificEnergy.restext index c4373a70ae..5200a8ba14 100644 --- a/UnitsNet/GeneratedCode/Resources/SpecificEnergy.restext +++ b/UnitsNet/GeneratedCode/Resources/SpecificEnergy.restext @@ -1,30 +1,30 @@ -BtuPerPound = btu/lb -CaloriePerGram = cal/g -GigawattDayPerKilogram = GWd/kg -GigawattDayPerShortTon = GWd/ST -GigawattDayPerTonne = GWd/t -GigawattHourPerKilogram = GWh/kg -GigawattHourPerPound = GWh/lbs -JoulePerKilogram = J/kg -KilocaloriePerGram = kcal/g -KilojoulePerKilogram = kJ/kg -KilowattDayPerKilogram = kWd/kg -KilowattDayPerShortTon = kWd/ST -KilowattDayPerTonne = kWd/t -KilowattHourPerKilogram = kWh/kg -KilowattHourPerPound = kWh/lbs -MegajoulePerKilogram = MJ/kg -MegaJoulePerTonne = MJ/t -MegawattDayPerKilogram = MWd/kg -MegawattDayPerShortTon = MWd/ST -MegawattDayPerTonne = MWd/t -MegawattHourPerKilogram = MWh/kg -MegawattHourPerPound = MWh/lbs -TerawattDayPerKilogram = TWd/kg -TerawattDayPerShortTon = TWd/ST -TerawattDayPerTonne = TWd/t -WattDayPerKilogram = Wd/kg -WattDayPerShortTon = Wd/ST -WattDayPerTonne = Wd/t -WattHourPerKilogram = Wh/kg -WattHourPerPound = Wh/lbs +BtuPerPound = ("btu/lb") +CaloriePerGram = ("cal/g") +GigawattDayPerKilogram = ("GWd/kg") +GigawattDayPerShortTon = ("GWd/ST") +GigawattDayPerTonne = ("GWd/t") +GigawattHourPerKilogram = ("GWh/kg") +GigawattHourPerPound = ("GWh/lbs") +JoulePerKilogram = ("J/kg") +KilocaloriePerGram = ("kcal/g") +KilojoulePerKilogram = ("kJ/kg") +KilowattDayPerKilogram = ("kWd/kg") +KilowattDayPerShortTon = ("kWd/ST") +KilowattDayPerTonne = ("kWd/t") +KilowattHourPerKilogram = ("kWh/kg") +KilowattHourPerPound = ("kWh/lbs") +MegajoulePerKilogram = ("MJ/kg") +MegaJoulePerTonne = ("MJ/t") +MegawattDayPerKilogram = ("MWd/kg") +MegawattDayPerShortTon = ("MWd/ST") +MegawattDayPerTonne = ("MWd/t") +MegawattHourPerKilogram = ("MWh/kg") +MegawattHourPerPound = ("MWh/lbs") +TerawattDayPerKilogram = ("TWd/kg") +TerawattDayPerShortTon = ("TWd/ST") +TerawattDayPerTonne = ("TWd/t") +WattDayPerKilogram = ("Wd/kg") +WattDayPerShortTon = ("Wd/ST") +WattDayPerTonne = ("Wd/t") +WattHourPerKilogram = ("Wh/kg") +WattHourPerPound = ("Wh/lbs") diff --git a/UnitsNet/GeneratedCode/Resources/SpecificEntropy.restext b/UnitsNet/GeneratedCode/Resources/SpecificEntropy.restext index 43369f652d..6fd71a76c7 100644 --- a/UnitsNet/GeneratedCode/Resources/SpecificEntropy.restext +++ b/UnitsNet/GeneratedCode/Resources/SpecificEntropy.restext @@ -1,9 +1,9 @@ -BtuPerPoundFahrenheit = BTU/lb·°F -CaloriePerGramKelvin = cal/g.K -JoulePerKilogramDegreeCelsius = J/kg.C -JoulePerKilogramKelvin = J/kg.K -KilocaloriePerGramKelvin = kcal/g.K -KilojoulePerKilogramDegreeCelsius = kJ/kg.C -KilojoulePerKilogramKelvin = kJ/kg.K -MegajoulePerKilogramDegreeCelsius = MJ/kg.C -MegajoulePerKilogramKelvin = MJ/kg.K +BtuPerPoundFahrenheit = ("BTU/lb·°F", "BTU/lbm·°F") +CaloriePerGramKelvin = ("cal/g.K") +JoulePerKilogramDegreeCelsius = ("J/kg.C") +JoulePerKilogramKelvin = ("J/kg.K") +KilocaloriePerGramKelvin = ("kcal/g.K") +KilojoulePerKilogramDegreeCelsius = ("kJ/kg.C") +KilojoulePerKilogramKelvin = ("kJ/kg.K") +MegajoulePerKilogramDegreeCelsius = ("MJ/kg.C") +MegajoulePerKilogramKelvin = ("MJ/kg.K") diff --git a/UnitsNet/GeneratedCode/Resources/SpecificFuelConsumption.restext b/UnitsNet/GeneratedCode/Resources/SpecificFuelConsumption.restext index fe268e38c1..0eb517caa5 100644 --- a/UnitsNet/GeneratedCode/Resources/SpecificFuelConsumption.restext +++ b/UnitsNet/GeneratedCode/Resources/SpecificFuelConsumption.restext @@ -1,4 +1,4 @@ -GramPerKiloNewtonSecond = g/(kN�s) -KilogramPerKilogramForceHour = kg/(kgf�h) -KilogramPerKiloNewtonSecond = kg/(kN�s) -PoundMassPerPoundForceHour = lb/(lbf·h) +GramPerKiloNewtonSecond = ("g/(kN�s)") +KilogramPerKilogramForceHour = ("kg/(kgf�h)") +KilogramPerKiloNewtonSecond = ("kg/(kN�s)") +PoundMassPerPoundForceHour = ("lb/(lbf·h)") diff --git a/UnitsNet/GeneratedCode/Resources/SpecificVolume.restext b/UnitsNet/GeneratedCode/Resources/SpecificVolume.restext index 4b530ee6b3..83ade71717 100644 --- a/UnitsNet/GeneratedCode/Resources/SpecificVolume.restext +++ b/UnitsNet/GeneratedCode/Resources/SpecificVolume.restext @@ -1,3 +1,3 @@ -CubicFootPerPound = ft³/lb -CubicMeterPerKilogram = m³/kg -MillicubicMeterPerKilogram = mm³/kg +CubicFootPerPound = ("ft³/lb") +CubicMeterPerKilogram = ("m³/kg") +MillicubicMeterPerKilogram = ("mm³/kg") diff --git a/UnitsNet/GeneratedCode/Resources/SpecificWeight.restext b/UnitsNet/GeneratedCode/Resources/SpecificWeight.restext index da5711d65a..ee017c4479 100644 --- a/UnitsNet/GeneratedCode/Resources/SpecificWeight.restext +++ b/UnitsNet/GeneratedCode/Resources/SpecificWeight.restext @@ -1,17 +1,17 @@ -KilogramForcePerCubicCentimeter = kgf/cm³ -KilogramForcePerCubicMeter = kgf/m³ -KilogramForcePerCubicMillimeter = kgf/mm³ -KilonewtonPerCubicCentimeter = kN/cm³ -KilonewtonPerCubicMeter = kN/m³ -KilonewtonPerCubicMillimeter = kN/mm³ -KilopoundForcePerCubicFoot = kipf/ft³ -KilopoundForcePerCubicInch = kipf/in³ -MeganewtonPerCubicMeter = MN/m³ -NewtonPerCubicCentimeter = N/cm³ -NewtonPerCubicMeter = N/m³ -NewtonPerCubicMillimeter = N/mm³ -PoundForcePerCubicFoot = lbf/ft³ -PoundForcePerCubicInch = lbf/in³ -TonneForcePerCubicCentimeter = tf/cm³ -TonneForcePerCubicMeter = tf/m³ -TonneForcePerCubicMillimeter = tf/mm³ +KilogramForcePerCubicCentimeter = ("kgf/cm³") +KilogramForcePerCubicMeter = ("kgf/m³") +KilogramForcePerCubicMillimeter = ("kgf/mm³") +KilonewtonPerCubicCentimeter = ("kN/cm³") +KilonewtonPerCubicMeter = ("kN/m³") +KilonewtonPerCubicMillimeter = ("kN/mm³") +KilopoundForcePerCubicFoot = ("kipf/ft³") +KilopoundForcePerCubicInch = ("kipf/in³") +MeganewtonPerCubicMeter = ("MN/m³") +NewtonPerCubicCentimeter = ("N/cm³") +NewtonPerCubicMeter = ("N/m³") +NewtonPerCubicMillimeter = ("N/mm³") +PoundForcePerCubicFoot = ("lbf/ft³") +PoundForcePerCubicInch = ("lbf/in³") +TonneForcePerCubicCentimeter = ("tf/cm³") +TonneForcePerCubicMeter = ("tf/m³") +TonneForcePerCubicMillimeter = ("tf/mm³") diff --git a/UnitsNet/GeneratedCode/Resources/Speed.restext b/UnitsNet/GeneratedCode/Resources/Speed.restext index 2fb04b3965..cf07e1e06b 100644 --- a/UnitsNet/GeneratedCode/Resources/Speed.restext +++ b/UnitsNet/GeneratedCode/Resources/Speed.restext @@ -1,33 +1,33 @@ -CentimeterPerHour = cm/h -CentimeterPerMinute = cm/min -CentimeterPerSecond = cm/s -DecimeterPerMinute = dm/min -DecimeterPerSecond = dm/s -FootPerHour = ft/h -FootPerMinute = ft/min -FootPerSecond = ft/s -InchPerHour = in/h -InchPerMinute = in/min -InchPerSecond = in/s -KilometerPerHour = km/h -KilometerPerMinute = km/min -KilometerPerSecond = km/s -Knot = kn -Mach = M -MeterPerHour = m/h -MeterPerMinute = m/min -MeterPerSecond = m/s -MicrometerPerMinute = µm/min -MicrometerPerSecond = µm/s -MilePerHour = mph -MillimeterPerHour = mm/h -MillimeterPerMinute = mm/min -MillimeterPerSecond = mm/s -NanometerPerMinute = nm/min -NanometerPerSecond = nm/s -UsSurveyFootPerHour = ftUS/h -UsSurveyFootPerMinute = ftUS/min -UsSurveyFootPerSecond = ftUS/s -YardPerHour = yd/h -YardPerMinute = yd/min -YardPerSecond = yd/s +CentimeterPerHour = ("cm/h") +CentimeterPerMinute = ("cm/min") +CentimeterPerSecond = ("cm/s") +DecimeterPerMinute = ("dm/min") +DecimeterPerSecond = ("dm/s") +FootPerHour = ("ft/h") +FootPerMinute = ("ft/min") +FootPerSecond = ("ft/s") +InchPerHour = ("in/h") +InchPerMinute = ("in/min") +InchPerSecond = ("in/s") +KilometerPerHour = ("km/h") +KilometerPerMinute = ("km/min") +KilometerPerSecond = ("km/s") +Knot = ("kn", "kt", "knot", "knots") +Mach = ("M", "Ma", "MN", "MACH") +MeterPerHour = ("m/h") +MeterPerMinute = ("m/min") +MeterPerSecond = ("m/s") +MicrometerPerMinute = ("µm/min") +MicrometerPerSecond = ("µm/s") +MilePerHour = ("mph") +MillimeterPerHour = ("mm/h") +MillimeterPerMinute = ("mm/min") +MillimeterPerSecond = ("mm/s") +NanometerPerMinute = ("nm/min") +NanometerPerSecond = ("nm/s") +UsSurveyFootPerHour = ("ftUS/h") +UsSurveyFootPerMinute = ("ftUS/min") +UsSurveyFootPerSecond = ("ftUS/s") +YardPerHour = ("yd/h") +YardPerMinute = ("yd/min") +YardPerSecond = ("yd/s") diff --git a/UnitsNet/GeneratedCode/Resources/Speed.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Speed.ru-RU.restext index bd4af83040..b57c9db687 100644 --- a/UnitsNet/GeneratedCode/Resources/Speed.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Speed.ru-RU.restext @@ -1,24 +1,24 @@ -CentimeterPerHour = см/ч -CentimeterPerMinute = см/мин -CentimeterPerSecond = см/с -DecimeterPerMinute = дм/мин -DecimeterPerSecond = дм/с -FootPerHour = фут/ч -FootPerMinute = фут/мин -FootPerSecond = фут/с -KilometerPerHour = км/ч -KilometerPerMinute = км/мин -KilometerPerSecond = км/с -Knot = уз. -Mach = мах -MeterPerHour = м/ч -MeterPerMinute = м/мин -MeterPerSecond = м/с -MicrometerPerMinute = мкм/мин -MicrometerPerSecond = мкм/с -MilePerHour = миль/ч -MillimeterPerHour = мм/ч -MillimeterPerMinute = мм/мин -MillimeterPerSecond = мм/с -NanometerPerMinute = нм/мин -NanometerPerSecond = нм/с +CentimeterPerHour = ("см/ч") +CentimeterPerMinute = ("см/мин") +CentimeterPerSecond = ("см/с") +DecimeterPerMinute = ("дм/мин") +DecimeterPerSecond = ("дм/с") +FootPerHour = ("фут/ч") +FootPerMinute = ("фут/мин") +FootPerSecond = ("фут/с") +KilometerPerHour = ("км/ч") +KilometerPerMinute = ("км/мин") +KilometerPerSecond = ("км/с") +Knot = ("уз.") +Mach = ("мах") +MeterPerHour = ("м/ч") +MeterPerMinute = ("м/мин") +MeterPerSecond = ("м/с") +MicrometerPerMinute = ("мкм/мин") +MicrometerPerSecond = ("мкм/с") +MilePerHour = ("миль/ч") +MillimeterPerHour = ("мм/ч") +MillimeterPerMinute = ("мм/мин") +MillimeterPerSecond = ("мм/с") +NanometerPerMinute = ("нм/мин") +NanometerPerSecond = ("нм/с") diff --git a/UnitsNet/GeneratedCode/Resources/StandardVolumeFlow.restext b/UnitsNet/GeneratedCode/Resources/StandardVolumeFlow.restext index 3d9d12cdca..c97c3c0ea0 100644 --- a/UnitsNet/GeneratedCode/Resources/StandardVolumeFlow.restext +++ b/UnitsNet/GeneratedCode/Resources/StandardVolumeFlow.restext @@ -1,9 +1,9 @@ -StandardCubicCentimeterPerMinute = sccm -StandardCubicFootPerHour = scfh -StandardCubicFootPerMinute = scfm -StandardCubicFootPerSecond = Sft³/s -StandardCubicMeterPerDay = Sm³/d -StandardCubicMeterPerHour = Sm³/h -StandardCubicMeterPerMinute = Sm³/min -StandardCubicMeterPerSecond = Sm³/s -StandardLiterPerMinute = slm +StandardCubicCentimeterPerMinute = ("sccm") +StandardCubicFootPerHour = ("scfh") +StandardCubicFootPerMinute = ("scfm") +StandardCubicFootPerSecond = ("Sft³/s") +StandardCubicMeterPerDay = ("Sm³/d") +StandardCubicMeterPerHour = ("Sm³/h") +StandardCubicMeterPerMinute = ("Sm³/min") +StandardCubicMeterPerSecond = ("Sm³/s") +StandardLiterPerMinute = ("slm") diff --git a/UnitsNet/GeneratedCode/Resources/Temperature.restext b/UnitsNet/GeneratedCode/Resources/Temperature.restext index 1d3ed8aa02..3179bd6910 100644 --- a/UnitsNet/GeneratedCode/Resources/Temperature.restext +++ b/UnitsNet/GeneratedCode/Resources/Temperature.restext @@ -1,10 +1,10 @@ -DegreeCelsius = °C -DegreeDelisle = °De -DegreeFahrenheit = °F -DegreeNewton = °N -DegreeRankine = °R -DegreeReaumur = °Ré -DegreeRoemer = °Rø -Kelvin = K -MillidegreeCelsius = m°C -SolarTemperature = T⊙ +DegreeCelsius = ("°C") +DegreeDelisle = ("°De") +DegreeFahrenheit = ("°F") +DegreeNewton = ("°N") +DegreeRankine = ("°R") +DegreeReaumur = ("°Ré") +DegreeRoemer = ("°Rø") +Kelvin = ("K") +MillidegreeCelsius = ("m°C") +SolarTemperature = ("T⊙") diff --git a/UnitsNet/GeneratedCode/Resources/TemperatureChangeRate.restext b/UnitsNet/GeneratedCode/Resources/TemperatureChangeRate.restext index 1e3c35a981..8255db7990 100644 --- a/UnitsNet/GeneratedCode/Resources/TemperatureChangeRate.restext +++ b/UnitsNet/GeneratedCode/Resources/TemperatureChangeRate.restext @@ -1,10 +1,10 @@ -CentidegreeCelsiusPerSecond = c°C/s -DecadegreeCelsiusPerSecond = da°C/s -DecidegreeCelsiusPerSecond = d°C/s -DegreeCelsiusPerMinute = °C/min -DegreeCelsiusPerSecond = °C/s -HectodegreeCelsiusPerSecond = h°C/s -KilodegreeCelsiusPerSecond = k°C/s -MicrodegreeCelsiusPerSecond = µ°C/s -MillidegreeCelsiusPerSecond = m°C/s -NanodegreeCelsiusPerSecond = n°C/s +CentidegreeCelsiusPerSecond = ("c°C/s") +DecadegreeCelsiusPerSecond = ("da°C/s") +DecidegreeCelsiusPerSecond = ("d°C/s") +DegreeCelsiusPerMinute = ("°C/min") +DegreeCelsiusPerSecond = ("°C/s") +HectodegreeCelsiusPerSecond = ("h°C/s") +KilodegreeCelsiusPerSecond = ("k°C/s") +MicrodegreeCelsiusPerSecond = ("µ°C/s") +MillidegreeCelsiusPerSecond = ("m°C/s") +NanodegreeCelsiusPerSecond = ("n°C/s") diff --git a/UnitsNet/GeneratedCode/Resources/TemperatureDelta.restext b/UnitsNet/GeneratedCode/Resources/TemperatureDelta.restext index 2fd436a924..3d1c2de632 100644 --- a/UnitsNet/GeneratedCode/Resources/TemperatureDelta.restext +++ b/UnitsNet/GeneratedCode/Resources/TemperatureDelta.restext @@ -1,9 +1,9 @@ -DegreeCelsius = ∆°C -DegreeDelisle = ∆°De -DegreeFahrenheit = ∆°F -DegreeNewton = ∆°N -DegreeRankine = ∆°R -DegreeReaumur = ∆°Ré -DegreeRoemer = ∆°Rø -Kelvin = ∆K -MillidegreeCelsius = ∆m°C +DegreeCelsius = ("∆°C") +DegreeDelisle = ("∆°De") +DegreeFahrenheit = ("∆°F") +DegreeNewton = ("∆°N") +DegreeRankine = ("∆°R") +DegreeReaumur = ("∆°Ré") +DegreeRoemer = ("∆°Rø") +Kelvin = ("∆K") +MillidegreeCelsius = ("∆m°C") diff --git a/UnitsNet/GeneratedCode/Resources/TemperatureGradient.restext b/UnitsNet/GeneratedCode/Resources/TemperatureGradient.restext index 72794b1697..a05b6b13dd 100644 --- a/UnitsNet/GeneratedCode/Resources/TemperatureGradient.restext +++ b/UnitsNet/GeneratedCode/Resources/TemperatureGradient.restext @@ -1,4 +1,4 @@ -DegreeCelsiusPerKilometer = ∆°C/km -DegreeCelsiusPerMeter = ∆°C/m -DegreeFahrenheitPerFoot = ∆°F/ft -KelvinPerMeter = ∆°K/m +DegreeCelsiusPerKilometer = ("∆°C/km") +DegreeCelsiusPerMeter = ("∆°C/m") +DegreeFahrenheitPerFoot = ("∆°F/ft") +KelvinPerMeter = ("∆°K/m") diff --git a/UnitsNet/GeneratedCode/Resources/ThermalConductivity.restext b/UnitsNet/GeneratedCode/Resources/ThermalConductivity.restext index 6d7cbcb6e4..947a9e3dbf 100644 --- a/UnitsNet/GeneratedCode/Resources/ThermalConductivity.restext +++ b/UnitsNet/GeneratedCode/Resources/ThermalConductivity.restext @@ -1,2 +1,2 @@ -BtuPerHourFootFahrenheit = BTU/h·ft·°F -WattPerMeterKelvin = W/m·K +BtuPerHourFootFahrenheit = ("BTU/h·ft·°F") +WattPerMeterKelvin = ("W/m·K") diff --git a/UnitsNet/GeneratedCode/Resources/ThermalResistance.restext b/UnitsNet/GeneratedCode/Resources/ThermalResistance.restext index a71f8ef9f7..192f9991cf 100644 --- a/UnitsNet/GeneratedCode/Resources/ThermalResistance.restext +++ b/UnitsNet/GeneratedCode/Resources/ThermalResistance.restext @@ -1,6 +1,6 @@ -HourSquareFeetDegreeFahrenheitPerBtu = Hrft²°F/Btu -SquareCentimeterHourDegreeCelsiusPerKilocalorie = cm²Hr°C/kcal -SquareCentimeterKelvinPerWatt = cm²K/W -SquareMeterDegreeCelsiusPerWatt = m²°C/W -SquareMeterKelvinPerKilowatt = m²K/kW -SquareMeterKelvinPerWatt = m²K/W +HourSquareFeetDegreeFahrenheitPerBtu = ("Hrft²°F/Btu") +SquareCentimeterHourDegreeCelsiusPerKilocalorie = ("cm²Hr°C/kcal") +SquareCentimeterKelvinPerWatt = ("cm²K/W") +SquareMeterDegreeCelsiusPerWatt = ("m²°C/W") +SquareMeterKelvinPerKilowatt = ("m²K/kW") +SquareMeterKelvinPerWatt = ("m²K/W") diff --git a/UnitsNet/GeneratedCode/Resources/Torque.restext b/UnitsNet/GeneratedCode/Resources/Torque.restext index 0e79be47ca..ac732fd9c3 100644 --- a/UnitsNet/GeneratedCode/Resources/Torque.restext +++ b/UnitsNet/GeneratedCode/Resources/Torque.restext @@ -1,25 +1,25 @@ -GramForceCentimeter = gf·cm -GramForceMeter = gf·m -GramForceMillimeter = gf·mm -KilogramForceCentimeter = kgf·cm -KilogramForceMeter = kgf·m -KilogramForceMillimeter = kgf·mm -KilonewtonCentimeter = kN·cm -KilonewtonMeter = kN·m -KilonewtonMillimeter = kN·mm -KilopoundForceFoot = kipf·ft -KilopoundForceInch = kipf·in -MeganewtonCentimeter = MN·cm -MeganewtonMeter = MN·m -MeganewtonMillimeter = MN·mm -MegapoundForceFoot = Mlbf·ft -MegapoundForceInch = Mlbf·in -NewtonCentimeter = N·cm -NewtonMeter = N·m -NewtonMillimeter = N·mm -PoundalFoot = pdl·ft -PoundForceFoot = lbf·ft -PoundForceInch = lbf·in -TonneForceCentimeter = tf·cm -TonneForceMeter = tf·m -TonneForceMillimeter = tf·mm +GramForceCentimeter = ("gf·cm") +GramForceMeter = ("gf·m") +GramForceMillimeter = ("gf·mm") +KilogramForceCentimeter = ("kgf·cm") +KilogramForceMeter = ("kgf·m") +KilogramForceMillimeter = ("kgf·mm") +KilonewtonCentimeter = ("kN·cm") +KilonewtonMeter = ("kN·m") +KilonewtonMillimeter = ("kN·mm") +KilopoundForceFoot = ("kipf·ft") +KilopoundForceInch = ("kipf·in") +MeganewtonCentimeter = ("MN·cm") +MeganewtonMeter = ("MN·m") +MeganewtonMillimeter = ("MN·mm") +MegapoundForceFoot = ("Mlbf·ft") +MegapoundForceInch = ("Mlbf·in") +NewtonCentimeter = ("N·cm") +NewtonMeter = ("N·m") +NewtonMillimeter = ("N·mm") +PoundalFoot = ("pdl·ft") +PoundForceFoot = ("lbf·ft") +PoundForceInch = ("lbf·in") +TonneForceCentimeter = ("tf·cm") +TonneForceMeter = ("tf·m") +TonneForceMillimeter = ("tf·mm") diff --git a/UnitsNet/GeneratedCode/Resources/Torque.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Torque.ru-RU.restext index da187c6ed7..c5f1e94097 100644 --- a/UnitsNet/GeneratedCode/Resources/Torque.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Torque.ru-RU.restext @@ -1,3 +1,3 @@ -KilonewtonMeter = кН·м -MeganewtonMeter = МН·м -NewtonMeter = Н·м +KilonewtonMeter = ("кН·м") +MeganewtonMeter = ("МН·м") +NewtonMeter = ("Н·м") diff --git a/UnitsNet/GeneratedCode/Resources/TorquePerLength.restext b/UnitsNet/GeneratedCode/Resources/TorquePerLength.restext index 921366789b..dcaf3c40c6 100644 --- a/UnitsNet/GeneratedCode/Resources/TorquePerLength.restext +++ b/UnitsNet/GeneratedCode/Resources/TorquePerLength.restext @@ -1,21 +1,21 @@ -KilogramForceCentimeterPerMeter = kgf·cm/m -KilogramForceMeterPerMeter = kgf·m/m -KilogramForceMillimeterPerMeter = kgf·mm/m -KilonewtonCentimeterPerMeter = kN·cm/m -KilonewtonMeterPerMeter = kN·m/m -KilonewtonMillimeterPerMeter = kN·mm/m -KilopoundForceFootPerFoot = kipf·ft/ft -KilopoundForceInchPerFoot = kipf·in/ft -MeganewtonCentimeterPerMeter = MN·cm/m -MeganewtonMeterPerMeter = MN·m/m -MeganewtonMillimeterPerMeter = MN·mm/m -MegapoundForceFootPerFoot = Mlbf·ft/ft -MegapoundForceInchPerFoot = Mlbf·in/ft -NewtonCentimeterPerMeter = N·cm/m -NewtonMeterPerMeter = N·m/m -NewtonMillimeterPerMeter = N·mm/m -PoundForceFootPerFoot = lbf·ft/ft -PoundForceInchPerFoot = lbf·in/ft -TonneForceCentimeterPerMeter = tf·cm/m -TonneForceMeterPerMeter = tf·m/m -TonneForceMillimeterPerMeter = tf·mm/m +KilogramForceCentimeterPerMeter = ("kgf·cm/m") +KilogramForceMeterPerMeter = ("kgf·m/m") +KilogramForceMillimeterPerMeter = ("kgf·mm/m") +KilonewtonCentimeterPerMeter = ("kN·cm/m") +KilonewtonMeterPerMeter = ("kN·m/m") +KilonewtonMillimeterPerMeter = ("kN·mm/m") +KilopoundForceFootPerFoot = ("kipf·ft/ft") +KilopoundForceInchPerFoot = ("kipf·in/ft") +MeganewtonCentimeterPerMeter = ("MN·cm/m") +MeganewtonMeterPerMeter = ("MN·m/m") +MeganewtonMillimeterPerMeter = ("MN·mm/m") +MegapoundForceFootPerFoot = ("Mlbf·ft/ft") +MegapoundForceInchPerFoot = ("Mlbf·in/ft") +NewtonCentimeterPerMeter = ("N·cm/m") +NewtonMeterPerMeter = ("N·m/m") +NewtonMillimeterPerMeter = ("N·mm/m") +PoundForceFootPerFoot = ("lbf·ft/ft") +PoundForceInchPerFoot = ("lbf·in/ft") +TonneForceCentimeterPerMeter = ("tf·cm/m") +TonneForceMeterPerMeter = ("tf·m/m") +TonneForceMillimeterPerMeter = ("tf·mm/m") diff --git a/UnitsNet/GeneratedCode/Resources/TorquePerLength.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/TorquePerLength.ru-RU.restext index 595a984236..5b3cceda8c 100644 --- a/UnitsNet/GeneratedCode/Resources/TorquePerLength.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/TorquePerLength.ru-RU.restext @@ -1,3 +1,3 @@ -KilonewtonMeterPerMeter = кН·м/м -MeganewtonMeterPerMeter = МН·м/м -NewtonMeterPerMeter = Н·м/м +KilonewtonMeterPerMeter = ("кН·м/м") +MeganewtonMeterPerMeter = ("МН·м/м") +NewtonMeterPerMeter = ("Н·м/м") diff --git a/UnitsNet/GeneratedCode/Resources/Turbidity.restext b/UnitsNet/GeneratedCode/Resources/Turbidity.restext index 5b80222cfa..42332b88b9 100644 --- a/UnitsNet/GeneratedCode/Resources/Turbidity.restext +++ b/UnitsNet/GeneratedCode/Resources/Turbidity.restext @@ -1 +1 @@ -NTU = NTU +NTU = ("NTU") diff --git a/UnitsNet/GeneratedCode/Resources/VitaminA.restext b/UnitsNet/GeneratedCode/Resources/VitaminA.restext index 5fd329ab68..f8da7c7e6c 100644 --- a/UnitsNet/GeneratedCode/Resources/VitaminA.restext +++ b/UnitsNet/GeneratedCode/Resources/VitaminA.restext @@ -1 +1 @@ -InternationalUnit = IU +InternationalUnit = ("IU") diff --git a/UnitsNet/GeneratedCode/Resources/Volume.fr-CA.restext b/UnitsNet/GeneratedCode/Resources/Volume.fr-CA.restext index 4a72150a55..3e9a5b7ae1 100644 --- a/UnitsNet/GeneratedCode/Resources/Volume.fr-CA.restext +++ b/UnitsNet/GeneratedCode/Resources/Volume.fr-CA.restext @@ -1 +1 @@ -BoardFoot = pmp +BoardFoot = ("pmp", "pied-planche", "pied de planche") diff --git a/UnitsNet/GeneratedCode/Resources/Volume.restext b/UnitsNet/GeneratedCode/Resources/Volume.restext index a65c28e162..b9c1db3619 100644 --- a/UnitsNet/GeneratedCode/Resources/Volume.restext +++ b/UnitsNet/GeneratedCode/Resources/Volume.restext @@ -1,46 +1,46 @@ -AcreFoot = ac-ft -BoardFoot = bf -Centiliter = cl -CubicCentimeter = cm³ -CubicDecimeter = dm³ -CubicFoot = ft³ -CubicHectometer = hm³ -CubicInch = in³ -CubicKilometer = km³ -CubicMeter = m³ -CubicMicrometer = µm³ -CubicMile = mi³ -CubicMillimeter = mm³ -CubicYard = yd³ -Decaliter = dal -DecausGallon = dagal (U.S.) -Deciliter = dl -DeciusGallon = dgal (U.S.) -HectocubicFoot = hft³ -HectocubicMeter = hm³ -Hectoliter = hl -HectousGallon = hgal (U.S.) -ImperialBeerBarrel = bl (imp.) -ImperialGallon = gal (imp.) -ImperialOunce = oz (imp.) -ImperialPint = pt (imp.) -KilocubicFoot = kft³ -KilocubicMeter = km³ -KiloimperialGallon = kgal (imp.) -Kiloliter = kl -KilousGallon = kgal (U.S.) -Liter = l -MegacubicFoot = Mft³ -MegaimperialGallon = Mgal (imp.) -Megaliter = Ml -MegausGallon = Mgal (U.S.) -MetricTeaspoon = tsp -Microliter = µl -Milliliter = ml -Nanoliter = nl -OilBarrel = bbl -UsBeerBarrel = bl (U.S.) -UsGallon = gal (U.S.) -UsOunce = oz (U.S.) -UsPint = pt (U.S.) -UsQuart = qt (U.S.) +AcreFoot = ("ac-ft", "acre-foot", "acre-feet") +BoardFoot = ("bf", "board foot", "board feet") +Centiliter = ("cl") +CubicCentimeter = ("cm³") +CubicDecimeter = ("dm³") +CubicFoot = ("ft³") +CubicHectometer = ("hm³") +CubicInch = ("in³") +CubicKilometer = ("km³") +CubicMeter = ("m³") +CubicMicrometer = ("µm³") +CubicMile = ("mi³") +CubicMillimeter = ("mm³") +CubicYard = ("yd³") +Decaliter = ("dal") +DecausGallon = ("dagal (U.S.)") +Deciliter = ("dl") +DeciusGallon = ("dgal (U.S.)") +HectocubicFoot = ("hft³") +HectocubicMeter = ("hm³") +Hectoliter = ("hl") +HectousGallon = ("hgal (U.S.)") +ImperialBeerBarrel = ("bl (imp.)") +ImperialGallon = ("gal (imp.)") +ImperialOunce = ("oz (imp.)") +ImperialPint = ("pt (imp.)", "UK pt", "pt", "p") +KilocubicFoot = ("kft³") +KilocubicMeter = ("km³") +KiloimperialGallon = ("kgal (imp.)") +Kiloliter = ("kl") +KilousGallon = ("kgal (U.S.)") +Liter = ("l") +MegacubicFoot = ("Mft³") +MegaimperialGallon = ("Mgal (imp.)") +Megaliter = ("Ml") +MegausGallon = ("Mgal (U.S.)") +MetricTeaspoon = ("tsp", "t", "ts", "tspn", "t.", "ts.", "tsp.", "tspn.", "teaspoon") +Microliter = ("µl") +Milliliter = ("ml") +Nanoliter = ("nl") +OilBarrel = ("bbl") +UsBeerBarrel = ("bl (U.S.)") +UsGallon = ("gal (U.S.)") +UsOunce = ("oz (U.S.)") +UsPint = ("pt (U.S.)") +UsQuart = ("qt (U.S.)") diff --git a/UnitsNet/GeneratedCode/Resources/Volume.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Volume.ru-RU.restext index 8de2b636c8..b19c29a076 100644 --- a/UnitsNet/GeneratedCode/Resources/Volume.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Volume.ru-RU.restext @@ -1,37 +1,37 @@ -Centiliter = сл -CubicCentimeter = см³ -CubicDecimeter = дм³ -CubicFoot = фут³ -CubicHectometer = гм³ -CubicInch = дюйм³ -CubicKilometer = км³ -CubicMeter = м³ -CubicMicrometer = мкм³ -CubicMile = миля³ -CubicMillimeter = мм³ -CubicYard = ярд³ -Decaliter = дал -DecausGallon = даАмериканский галлон -Deciliter = дл -DeciusGallon = дАмериканский галлон -HectocubicFoot = гфут³ -HectocubicMeter = гм³ -Hectoliter = гл -HectousGallon = гАмериканский галлон -ImperialGallon = Английский галлон -ImperialOunce = Английская унция -KilocubicFoot = кфут³ -KilocubicMeter = км³ -KiloimperialGallon = кАнглийский галлон -Kiloliter = кл -KilousGallon = кАмериканский галлон -Liter = л -MegacubicFoot = Мфут³ -MegaimperialGallon = МАнглийский галлон -Megaliter = Мл -MegausGallon = МАмериканский галлон -Microliter = мкл -Milliliter = мл -Nanoliter = нл -UsGallon = Американский галлон -UsOunce = Американская унция +Centiliter = ("сл") +CubicCentimeter = ("см³") +CubicDecimeter = ("дм³") +CubicFoot = ("фут³") +CubicHectometer = ("гм³") +CubicInch = ("дюйм³") +CubicKilometer = ("км³") +CubicMeter = ("м³") +CubicMicrometer = ("мкм³") +CubicMile = ("миля³") +CubicMillimeter = ("мм³") +CubicYard = ("ярд³") +Decaliter = ("дал") +DecausGallon = ("даАмериканский галлон") +Deciliter = ("дл") +DeciusGallon = ("дАмериканский галлон") +HectocubicFoot = ("гфут³") +HectocubicMeter = ("гм³") +Hectoliter = ("гл") +HectousGallon = ("гАмериканский галлон") +ImperialGallon = ("Английский галлон") +ImperialOunce = ("Английская унция") +KilocubicFoot = ("кфут³") +KilocubicMeter = ("км³") +KiloimperialGallon = ("кАнглийский галлон") +Kiloliter = ("кл") +KilousGallon = ("кАмериканский галлон") +Liter = ("л") +MegacubicFoot = ("Мфут³") +MegaimperialGallon = ("МАнглийский галлон") +Megaliter = ("Мл") +MegausGallon = ("МАмериканский галлон") +Microliter = ("мкл") +Milliliter = ("мл") +Nanoliter = ("нл") +UsGallon = ("Американский галлон") +UsOunce = ("Американская унция") diff --git a/UnitsNet/GeneratedCode/Resources/VolumeConcentration.restext b/UnitsNet/GeneratedCode/Resources/VolumeConcentration.restext index 688c578ff3..ad9b6fc2c0 100644 --- a/UnitsNet/GeneratedCode/Resources/VolumeConcentration.restext +++ b/UnitsNet/GeneratedCode/Resources/VolumeConcentration.restext @@ -1,20 +1,20 @@ -CentilitersPerLiter = cL/L -CentilitersPerMililiter = cL/mL -DecilitersPerLiter = dL/L -DecilitersPerMililiter = dL/mL -DecimalFraction = -LitersPerLiter = L/L -LitersPerMililiter = L/mL -MicrolitersPerLiter = µL/L -MicrolitersPerMililiter = µL/mL -MillilitersPerLiter = mL/L -MillilitersPerMililiter = mL/mL -NanolitersPerLiter = nL/L -NanolitersPerMililiter = nL/mL -PartPerBillion = ppb -PartPerMillion = ppm -PartPerThousand = ‰ -PartPerTrillion = ppt -Percent = % -PicolitersPerLiter = pL/L -PicolitersPerMililiter = pL/mL +CentilitersPerLiter = ("cL/L") +CentilitersPerMililiter = ("cL/mL") +DecilitersPerLiter = ("dL/L") +DecilitersPerMililiter = ("dL/mL") +DecimalFraction = ("") +LitersPerLiter = ("L/L") +LitersPerMililiter = ("L/mL") +MicrolitersPerLiter = ("µL/L") +MicrolitersPerMililiter = ("µL/mL") +MillilitersPerLiter = ("mL/L") +MillilitersPerMililiter = ("mL/mL") +NanolitersPerLiter = ("nL/L") +NanolitersPerMililiter = ("nL/mL") +PartPerBillion = ("ppb") +PartPerMillion = ("ppm") +PartPerThousand = ("‰") +PartPerTrillion = ("ppt") +Percent = ("%", "% (v/v)") +PicolitersPerLiter = ("pL/L") +PicolitersPerMililiter = ("pL/mL") diff --git a/UnitsNet/GeneratedCode/Resources/VolumeFlow.restext b/UnitsNet/GeneratedCode/Resources/VolumeFlow.restext index e660c4d344..36d16bd97a 100644 --- a/UnitsNet/GeneratedCode/Resources/VolumeFlow.restext +++ b/UnitsNet/GeneratedCode/Resources/VolumeFlow.restext @@ -1,62 +1,62 @@ -AcreFootPerDay = af/d -AcreFootPerHour = af/h -AcreFootPerMinute = af/m -AcreFootPerSecond = af/s -CentiliterPerDay = cl/day -CentiliterPerHour = cL/h -CentiliterPerMinute = cL/min -CentiliterPerSecond = cL/s -CubicCentimeterPerMinute = cm³/min -CubicDecimeterPerMinute = dm³/min -CubicFootPerHour = ft³/h -CubicFootPerMinute = ft³/min -CubicFootPerSecond = ft³/s -CubicMeterPerDay = m³/d -CubicMeterPerHour = m³/h -CubicMeterPerMinute = m³/min -CubicMeterPerSecond = m³/s -CubicMillimeterPerSecond = mm³/s -CubicYardPerDay = cy/day -CubicYardPerHour = yd³/h -CubicYardPerMinute = yd³/min -CubicYardPerSecond = yd³/s -DeciliterPerDay = dl/day -DeciliterPerHour = dL/h -DeciliterPerMinute = dL/min -DeciliterPerSecond = dL/s -KiloliterPerDay = kl/day -KiloliterPerHour = kL/h -KiloliterPerMinute = kL/min -KiloliterPerSecond = kL/s -KilousGallonPerMinute = kgal (U.S.)/min -LiterPerDay = l/day -LiterPerHour = L/h -LiterPerMinute = L/min -LiterPerSecond = L/s -MegaliterPerDay = Ml/day -MegaukGallonPerSecond = Mgal (imp.)/s -MicroliterPerDay = µl/day -MicroliterPerHour = µL/h -MicroliterPerMinute = µL/min -MicroliterPerSecond = µL/s -MilliliterPerDay = ml/day -MilliliterPerHour = mL/h -MilliliterPerMinute = mL/min -MilliliterPerSecond = mL/s -MillionUsGallonPerDay = MGD -NanoliterPerDay = nl/day -NanoliterPerHour = nL/h -NanoliterPerMinute = nL/min -NanoliterPerSecond = nL/s -OilBarrelPerDay = bbl/d -OilBarrelPerHour = bbl/hr -OilBarrelPerMinute = bbl/min -OilBarrelPerSecond = bbl/s -UkGallonPerDay = gal (U. K.)/d -UkGallonPerHour = gal (imp.)/h -UkGallonPerMinute = gal (imp.)/min -UkGallonPerSecond = gal (imp.)/s -UsGallonPerDay = gpd -UsGallonPerHour = gal (U.S.)/h -UsGallonPerMinute = gal (U.S.)/min -UsGallonPerSecond = gal (U.S.)/s +AcreFootPerDay = ("af/d") +AcreFootPerHour = ("af/h") +AcreFootPerMinute = ("af/m") +AcreFootPerSecond = ("af/s") +CentiliterPerDay = ("cl/day", "cL/d", "cLPD") +CentiliterPerHour = ("cL/h", "cLPH") +CentiliterPerMinute = ("cL/min", "cLPM") +CentiliterPerSecond = ("cL/s", "cLPS") +CubicCentimeterPerMinute = ("cm³/min") +CubicDecimeterPerMinute = ("dm³/min") +CubicFootPerHour = ("ft³/h", "cf/hr") +CubicFootPerMinute = ("ft³/min", "CFM") +CubicFootPerSecond = ("ft³/s") +CubicMeterPerDay = ("m³/d") +CubicMeterPerHour = ("m³/h") +CubicMeterPerMinute = ("m³/min") +CubicMeterPerSecond = ("m³/s") +CubicMillimeterPerSecond = ("mm³/s") +CubicYardPerDay = ("cy/day") +CubicYardPerHour = ("yd³/h") +CubicYardPerMinute = ("yd³/min") +CubicYardPerSecond = ("yd³/s") +DeciliterPerDay = ("dl/day", "dL/d", "dLPD") +DeciliterPerHour = ("dL/h", "dLPH") +DeciliterPerMinute = ("dL/min", "dLPM") +DeciliterPerSecond = ("dL/s", "dLPS") +KiloliterPerDay = ("kl/day", "kL/d", "kLPD") +KiloliterPerHour = ("kL/h", "kLPH") +KiloliterPerMinute = ("kL/min", "kLPM") +KiloliterPerSecond = ("kL/s", "kLPS") +KilousGallonPerMinute = ("kgal (U.S.)/min", "KGPM") +LiterPerDay = ("l/day", "L/d", "LPD") +LiterPerHour = ("L/h", "LPH") +LiterPerMinute = ("L/min", "LPM") +LiterPerSecond = ("L/s", "LPS") +MegaliterPerDay = ("Ml/day", "ML/d", "MLPD") +MegaukGallonPerSecond = ("Mgal (imp.)/s") +MicroliterPerDay = ("µl/day", "µL/d", "µLPD") +MicroliterPerHour = ("µL/h", "µLPH") +MicroliterPerMinute = ("µL/min", "µLPM") +MicroliterPerSecond = ("µL/s", "µLPS") +MilliliterPerDay = ("ml/day", "mL/d", "mLPD") +MilliliterPerHour = ("mL/h", "mLPH") +MilliliterPerMinute = ("mL/min", "mLPM") +MilliliterPerSecond = ("mL/s", "mLPS") +MillionUsGallonPerDay = ("MGD") +NanoliterPerDay = ("nl/day", "nL/d", "nLPD") +NanoliterPerHour = ("nL/h", "nLPH") +NanoliterPerMinute = ("nL/min", "nLPM") +NanoliterPerSecond = ("nL/s", "nLPS") +OilBarrelPerDay = ("bbl/d", "BOPD") +OilBarrelPerHour = ("bbl/hr", "bph") +OilBarrelPerMinute = ("bbl/min", "bpm") +OilBarrelPerSecond = ("bbl/s") +UkGallonPerDay = ("gal (U. K.)/d") +UkGallonPerHour = ("gal (imp.)/h") +UkGallonPerMinute = ("gal (imp.)/min") +UkGallonPerSecond = ("gal (imp.)/s") +UsGallonPerDay = ("gpd", "gal/d") +UsGallonPerHour = ("gal (U.S.)/h") +UsGallonPerMinute = ("gal (U.S.)/min", "GPM") +UsGallonPerSecond = ("gal (U.S.)/s") diff --git a/UnitsNet/GeneratedCode/Resources/VolumeFlow.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/VolumeFlow.ru-RU.restext index 910469fce8..147a06b354 100644 --- a/UnitsNet/GeneratedCode/Resources/VolumeFlow.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/VolumeFlow.ru-RU.restext @@ -1,27 +1,27 @@ -CentiliterPerHour = сл/ч -CentiliterPerMinute = сл/мин -CentiliterPerSecond = сл/c -CubicCentimeterPerMinute = см³/мин -CubicDecimeterPerMinute = дм³/мин -CubicMeterPerHour = м³/ч -CubicMeterPerMinute = м³/мин -CubicMeterPerSecond = м³/с -CubicMillimeterPerSecond = мм³/с -DeciliterPerHour = дл/ч -DeciliterPerMinute = дл/мин -DeciliterPerSecond = дл/c -KiloliterPerHour = кл/ч -KiloliterPerMinute = кл/мин -KiloliterPerSecond = кл/c -LiterPerHour = л/ч -LiterPerMinute = л/мин -LiterPerSecond = л/c -MicroliterPerHour = мкл/ч -MicroliterPerMinute = мкл/мин -MicroliterPerSecond = мкл/c -MilliliterPerHour = мл/ч -MilliliterPerMinute = мл/мин -MilliliterPerSecond = мл/c -NanoliterPerHour = нл/ч -NanoliterPerMinute = нл/мин -NanoliterPerSecond = нл/c +CentiliterPerHour = ("сл/ч") +CentiliterPerMinute = ("сл/мин") +CentiliterPerSecond = ("сл/c") +CubicCentimeterPerMinute = ("см³/мин") +CubicDecimeterPerMinute = ("дм³/мин") +CubicMeterPerHour = ("м³/ч") +CubicMeterPerMinute = ("м³/мин") +CubicMeterPerSecond = ("м³/с") +CubicMillimeterPerSecond = ("мм³/с") +DeciliterPerHour = ("дл/ч") +DeciliterPerMinute = ("дл/мин") +DeciliterPerSecond = ("дл/c") +KiloliterPerHour = ("кл/ч") +KiloliterPerMinute = ("кл/мин") +KiloliterPerSecond = ("кл/c") +LiterPerHour = ("л/ч") +LiterPerMinute = ("л/мин") +LiterPerSecond = ("л/c") +MicroliterPerHour = ("мкл/ч") +MicroliterPerMinute = ("мкл/мин") +MicroliterPerSecond = ("мкл/c") +MilliliterPerHour = ("мл/ч") +MilliliterPerMinute = ("мл/мин") +MilliliterPerSecond = ("мл/c") +NanoliterPerHour = ("нл/ч") +NanoliterPerMinute = ("нл/мин") +NanoliterPerSecond = ("нл/c") diff --git a/UnitsNet/GeneratedCode/Resources/VolumeFlowPerArea.restext b/UnitsNet/GeneratedCode/Resources/VolumeFlowPerArea.restext index c6ef83eb33..92c6735b8d 100644 --- a/UnitsNet/GeneratedCode/Resources/VolumeFlowPerArea.restext +++ b/UnitsNet/GeneratedCode/Resources/VolumeFlowPerArea.restext @@ -1,2 +1,2 @@ -CubicFootPerMinutePerSquareFoot = CFM/ft² -CubicMeterPerSecondPerSquareMeter = m³/(s·m²) +CubicFootPerMinutePerSquareFoot = ("CFM/ft²") +CubicMeterPerSecondPerSquareMeter = ("m³/(s·m²)") diff --git a/UnitsNet/GeneratedCode/Resources/VolumePerLength.restext b/UnitsNet/GeneratedCode/Resources/VolumePerLength.restext index 528c9a879f..21731df5c8 100644 --- a/UnitsNet/GeneratedCode/Resources/VolumePerLength.restext +++ b/UnitsNet/GeneratedCode/Resources/VolumePerLength.restext @@ -1,7 +1,7 @@ -CubicMeterPerMeter = m³/m -CubicYardPerFoot = yd³/ft -CubicYardPerUsSurveyFoot = yd³/ftUS -LiterPerKilometer = l/km -LiterPerMeter = l/m -LiterPerMillimeter = l/mm -OilBarrelPerFoot = bbl/ft +CubicMeterPerMeter = ("m³/m") +CubicYardPerFoot = ("yd³/ft") +CubicYardPerUsSurveyFoot = ("yd³/ftUS") +LiterPerKilometer = ("l/km") +LiterPerMeter = ("l/m") +LiterPerMillimeter = ("l/mm") +OilBarrelPerFoot = ("bbl/ft") diff --git a/UnitsNet/GeneratedCode/Resources/VolumetricHeatCapacity.restext b/UnitsNet/GeneratedCode/Resources/VolumetricHeatCapacity.restext index cde8d35134..69718edc1b 100644 --- a/UnitsNet/GeneratedCode/Resources/VolumetricHeatCapacity.restext +++ b/UnitsNet/GeneratedCode/Resources/VolumetricHeatCapacity.restext @@ -1,9 +1,9 @@ -BtuPerCubicFootDegreeFahrenheit = BTU/ft³·°F -CaloriePerCubicCentimeterDegreeCelsius = cal/cm³·°C -JoulePerCubicMeterDegreeCelsius = J/m³·°C -JoulePerCubicMeterKelvin = J/m³·K -KilocaloriePerCubicCentimeterDegreeCelsius = kcal/cm³·°C -KilojoulePerCubicMeterDegreeCelsius = kJ/m³·°C -KilojoulePerCubicMeterKelvin = kJ/m³·K -MegajoulePerCubicMeterDegreeCelsius = MJ/m³·°C -MegajoulePerCubicMeterKelvin = MJ/m³·K +BtuPerCubicFootDegreeFahrenheit = ("BTU/ft³·°F") +CaloriePerCubicCentimeterDegreeCelsius = ("cal/cm³·°C") +JoulePerCubicMeterDegreeCelsius = ("J/m³·°C") +JoulePerCubicMeterKelvin = ("J/m³·K") +KilocaloriePerCubicCentimeterDegreeCelsius = ("kcal/cm³·°C") +KilojoulePerCubicMeterDegreeCelsius = ("kJ/m³·°C") +KilojoulePerCubicMeterKelvin = ("kJ/m³·K") +MegajoulePerCubicMeterDegreeCelsius = ("MJ/m³·°C") +MegajoulePerCubicMeterKelvin = ("MJ/m³·K") diff --git a/UnitsNet/GeneratedCode/Resources/WarpingMomentOfInertia.restext b/UnitsNet/GeneratedCode/Resources/WarpingMomentOfInertia.restext index b8a7fdc31b..8ff5452f20 100644 --- a/UnitsNet/GeneratedCode/Resources/WarpingMomentOfInertia.restext +++ b/UnitsNet/GeneratedCode/Resources/WarpingMomentOfInertia.restext @@ -1,6 +1,6 @@ -CentimeterToTheSixth = cm⁶ -DecimeterToTheSixth = dm⁶ -FootToTheSixth = ft⁶ -InchToTheSixth = in⁶ -MeterToTheSixth = m⁶ -MillimeterToTheSixth = mm⁶ +CentimeterToTheSixth = ("cm⁶", "cm^6") +DecimeterToTheSixth = ("dm⁶", "dm^6") +FootToTheSixth = ("ft⁶", "ft^6") +InchToTheSixth = ("in⁶", "in^6") +MeterToTheSixth = ("m⁶", "m^6") +MillimeterToTheSixth = ("mm⁶", "mm^6") From b6bb840f5b09b23b3afde3db3e5a4ec66bcaa004 Mon Sep 17 00:00:00 2001 From: Tristan Milnthorp Date: Tue, 21 Feb 2023 11:19:35 -0500 Subject: [PATCH 03/26] Rethrow any exceptions, don't eat em --- .../Generators/UnitsNetGen/UnitTestBaseClassGenerator.cs | 8 ++++++++ .../GeneratedCode/TestsBase/AccelerationTestsBase.g.cs | 8 ++++++++ .../TestsBase/AmountOfSubstanceTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/AmplitudeRatioTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/AngleTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/ApparentEnergyTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/ApparentPowerTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/AreaDensityTestsBase.g.cs | 8 ++++++++ .../TestsBase/AreaMomentOfInertiaTestsBase.g.cs | 8 ++++++++ UnitsNet.Tests/GeneratedCode/TestsBase/AreaTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/BitRateTestsBase.g.cs | 8 ++++++++ .../TestsBase/BrakeSpecificFuelConsumptionTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/CapacitanceTestsBase.g.cs | 8 ++++++++ .../TestsBase/CoefficientOfThermalExpansionTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/CompressibilityTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/DensityTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/DurationTestsBase.g.cs | 8 ++++++++ .../TestsBase/DynamicViscosityTestsBase.g.cs | 8 ++++++++ .../TestsBase/ElectricAdmittanceTestsBase.g.cs | 8 ++++++++ .../TestsBase/ElectricChargeDensityTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/ElectricChargeTestsBase.g.cs | 8 ++++++++ .../TestsBase/ElectricConductanceTestsBase.g.cs | 8 ++++++++ .../TestsBase/ElectricConductivityTestsBase.g.cs | 8 ++++++++ .../TestsBase/ElectricCurrentDensityTestsBase.g.cs | 8 ++++++++ .../TestsBase/ElectricCurrentGradientTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/ElectricCurrentTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/ElectricFieldTestsBase.g.cs | 8 ++++++++ .../TestsBase/ElectricInductanceTestsBase.g.cs | 8 ++++++++ .../TestsBase/ElectricPotentialAcTestsBase.g.cs | 8 ++++++++ .../TestsBase/ElectricPotentialChangeRateTestsBase.g.cs | 8 ++++++++ .../TestsBase/ElectricPotentialDcTestsBase.g.cs | 8 ++++++++ .../TestsBase/ElectricPotentialTestsBase.g.cs | 8 ++++++++ .../TestsBase/ElectricResistanceTestsBase.g.cs | 8 ++++++++ .../TestsBase/ElectricResistivityTestsBase.g.cs | 8 ++++++++ .../TestsBase/ElectricSurfaceChargeDensityTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/EnergyDensityTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/EnergyTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/EntropyTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/ForceChangeRateTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/ForcePerLengthTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/ForceTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/FrequencyTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/FuelEfficiencyTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/HeatFluxTestsBase.g.cs | 8 ++++++++ .../TestsBase/HeatTransferCoefficientTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/IlluminanceTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/ImpulseTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/InformationTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/IrradianceTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/IrradiationTestsBase.g.cs | 8 ++++++++ UnitsNet.Tests/GeneratedCode/TestsBase/JerkTestsBase.g.cs | 8 ++++++++ .../TestsBase/KinematicViscosityTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/LengthTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/LevelTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/LinearDensityTestsBase.g.cs | 8 ++++++++ .../TestsBase/LinearPowerDensityTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/LuminanceTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/LuminosityTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/LuminousFluxTestsBase.g.cs | 8 ++++++++ .../TestsBase/LuminousIntensityTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/MagneticFieldTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/MagneticFluxTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/MagnetizationTestsBase.g.cs | 8 ++++++++ .../TestsBase/MassConcentrationTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/MassFlowTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/MassFluxTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/MassFractionTestsBase.g.cs | 8 ++++++++ .../TestsBase/MassMomentOfInertiaTestsBase.g.cs | 8 ++++++++ UnitsNet.Tests/GeneratedCode/TestsBase/MassTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/MolarEnergyTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/MolarEntropyTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/MolarFlowTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/MolarMassTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/MolarityTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/PermeabilityTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/PermittivityTestsBase.g.cs | 8 ++++++++ .../TestsBase/PorousMediumPermeabilityTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/PowerDensityTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/PowerRatioTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/PowerTestsBase.g.cs | 8 ++++++++ .../TestsBase/PressureChangeRateTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/PressureTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/RatioChangeRateTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/RatioTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/ReactiveEnergyTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/ReactivePowerTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/ReciprocalAreaTestsBase.g.cs | 8 ++++++++ .../TestsBase/ReciprocalLengthTestsBase.g.cs | 8 ++++++++ .../TestsBase/RelativeHumidityTestsBase.g.cs | 8 ++++++++ .../TestsBase/RotationalAccelerationTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/RotationalSpeedTestsBase.g.cs | 8 ++++++++ .../TestsBase/RotationalStiffnessPerLengthTestsBase.g.cs | 8 ++++++++ .../TestsBase/RotationalStiffnessTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/ScalarTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/SolidAngleTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/SpecificEnergyTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/SpecificEntropyTestsBase.g.cs | 8 ++++++++ .../TestsBase/SpecificFuelConsumptionTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/SpecificVolumeTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/SpecificWeightTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/SpeedTestsBase.g.cs | 8 ++++++++ .../TestsBase/StandardVolumeFlowTestsBase.g.cs | 8 ++++++++ .../TestsBase/TemperatureChangeRateTestsBase.g.cs | 8 ++++++++ .../TestsBase/TemperatureDeltaTestsBase.g.cs | 8 ++++++++ .../TestsBase/TemperatureGradientTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/TemperatureTestsBase.g.cs | 8 ++++++++ .../TestsBase/ThermalConductivityTestsBase.g.cs | 8 ++++++++ .../TestsBase/ThermalResistanceTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/TorquePerLengthTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/TorqueTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/TurbidityTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/VitaminATestsBase.g.cs | 8 ++++++++ .../TestsBase/VolumeConcentrationTestsBase.g.cs | 8 ++++++++ .../TestsBase/VolumeFlowPerAreaTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/VolumeFlowTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/VolumePerLengthTestsBase.g.cs | 8 ++++++++ .../GeneratedCode/TestsBase/VolumeTestsBase.g.cs | 8 ++++++++ .../TestsBase/VolumetricHeatCapacityTestsBase.g.cs | 8 ++++++++ .../TestsBase/WarpingMomentOfInertiaTestsBase.g.cs | 8 ++++++++ 119 files changed, 952 insertions(+) diff --git a/CodeGen/Generators/UnitsNetGen/UnitTestBaseClassGenerator.cs b/CodeGen/Generators/UnitsNetGen/UnitTestBaseClassGenerator.cs index 956b969ad9..f10f64be17 100644 --- a/CodeGen/Generators/UnitsNetGen/UnitTestBaseClassGenerator.cs +++ b/CodeGen/Generators/UnitsNetGen/UnitTestBaseClassGenerator.cs @@ -605,6 +605,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } Writer.WL($@" }} + catch + {{ + throw; + }} finally {{ Thread.CurrentThread.CurrentCulture = prevCulture; @@ -637,6 +641,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal(""0.123{_baseUnitEnglishAbbreviation}"", new {_quantity.Name}(0.123456{_numberSuffix}, {_baseUnitFullName}).ToString(""s3"")); Assert.Equal(""0.1235{_baseUnitEnglishAbbreviation}"", new {_quantity.Name}(0.123456{_numberSuffix}, {_baseUnitFullName}).ToString(""s4"")); }} + catch + {{ + throw; + }} finally {{ CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AccelerationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AccelerationTestsBase.g.cs index b9b4031d52..542890c875 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/AccelerationTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AccelerationTestsBase.g.cs @@ -1211,6 +1211,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 nm/s²", new Acceleration(1, AccelerationUnit.NanometerPerSecondSquared).ToString()); Assert.Equal("1 g", new Acceleration(1, AccelerationUnit.StandardGravity).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1251,6 +1255,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 m/s²", new Acceleration(0.123456, AccelerationUnit.MeterPerSecondSquared).ToString("s3")); Assert.Equal("0.1235 m/s²", new Acceleration(0.123456, AccelerationUnit.MeterPerSecondSquared).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AmountOfSubstanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AmountOfSubstanceTestsBase.g.cs index 4f821cb030..fc90305f8d 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/AmountOfSubstanceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AmountOfSubstanceTestsBase.g.cs @@ -889,6 +889,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 nlbmol", new AmountOfSubstance(1, AmountOfSubstanceUnit.NanopoundMole).ToString()); Assert.Equal("1 lbmol", new AmountOfSubstance(1, AmountOfSubstanceUnit.PoundMole).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -930,6 +934,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 mol", new AmountOfSubstance(0.123456, AmountOfSubstanceUnit.Mole).ToString("s3")); Assert.Equal("0.1235 mol", new AmountOfSubstance(0.123456, AmountOfSubstanceUnit.Mole).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AmplitudeRatioTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AmplitudeRatioTestsBase.g.cs index 3972a733d2..cc4fb043c3 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/AmplitudeRatioTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AmplitudeRatioTestsBase.g.cs @@ -519,6 +519,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 dBu", new AmplitudeRatio(1, AmplitudeRatioUnit.DecibelUnloaded).ToString()); Assert.Equal("1 dBV", new AmplitudeRatio(1, AmplitudeRatioUnit.DecibelVolt).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -549,6 +553,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 dBV", new AmplitudeRatio(0.123456, AmplitudeRatioUnit.DecibelVolt).ToString("s3")); Assert.Equal("0.1235 dBV", new AmplitudeRatio(0.123456, AmplitudeRatioUnit.DecibelVolt).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AngleTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AngleTestsBase.g.cs index 8dd363422a..f6609c1713 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/AngleTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AngleTestsBase.g.cs @@ -1475,6 +1475,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 r", new Angle(1, AngleUnit.Revolution).ToString()); Assert.Equal("1 sin(θ)", new Angle(1, AngleUnit.Tilt).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1517,6 +1521,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 °", new Angle(0.123456, AngleUnit.Degree).ToString("s3")); Assert.Equal("0.1235 °", new Angle(0.123456, AngleUnit.Degree).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentEnergyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentEnergyTestsBase.g.cs index 8c46da2ca3..7f70efff4c 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentEnergyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentEnergyTestsBase.g.cs @@ -479,6 +479,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 MVAh", new ApparentEnergy(1, ApparentEnergyUnit.MegavoltampereHour).ToString()); Assert.Equal("1 VAh", new ApparentEnergy(1, ApparentEnergyUnit.VoltampereHour).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -508,6 +512,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 VAh", new ApparentEnergy(0.123456, ApparentEnergyUnit.VoltampereHour).ToString("s3")); Assert.Equal("0.1235 VAh", new ApparentEnergy(0.123456, ApparentEnergyUnit.VoltampereHour).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentPowerTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentPowerTestsBase.g.cs index bfd0305f35..f37dd63643 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentPowerTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentPowerTestsBase.g.cs @@ -565,6 +565,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 mVA", new ApparentPower(1, ApparentPowerUnit.Millivoltampere).ToString()); Assert.Equal("1 VA", new ApparentPower(1, ApparentPowerUnit.Voltampere).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -597,6 +601,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 VA", new ApparentPower(0.123456, ApparentPowerUnit.Voltampere).ToString("s3")); Assert.Equal("0.1235 VA", new ApparentPower(0.123456, ApparentPowerUnit.Voltampere).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaDensityTestsBase.g.cs index 7dc882f27f..553cd478d0 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaDensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaDensityTestsBase.g.cs @@ -503,6 +503,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 kg/m²", new AreaDensity(1, AreaDensityUnit.KilogramPerSquareMeter).ToString()); Assert.Equal("1 mg/m²", new AreaDensity(1, AreaDensityUnit.MilligramPerSquareMeter).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -532,6 +536,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 kg/m²", new AreaDensity(0.123456, AreaDensityUnit.KilogramPerSquareMeter).ToString("s3")); Assert.Equal("0.1235 kg/m²", new AreaDensity(0.123456, AreaDensityUnit.KilogramPerSquareMeter).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaMomentOfInertiaTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaMomentOfInertiaTestsBase.g.cs index c8341766f7..fe44d4d93f 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaMomentOfInertiaTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaMomentOfInertiaTestsBase.g.cs @@ -731,6 +731,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 m⁴", new AreaMomentOfInertia(1, AreaMomentOfInertiaUnit.MeterToTheFourth).ToString()); Assert.Equal("1 mm⁴", new AreaMomentOfInertia(1, AreaMomentOfInertiaUnit.MillimeterToTheFourth).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -763,6 +767,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 m⁴", new AreaMomentOfInertia(0.123456, AreaMomentOfInertiaUnit.MeterToTheFourth).ToString("s3")); Assert.Equal("0.1235 m⁴", new AreaMomentOfInertia(0.123456, AreaMomentOfInertiaUnit.MeterToTheFourth).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaTestsBase.g.cs index 312ca1bc79..a4c8164ed3 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaTestsBase.g.cs @@ -1501,6 +1501,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 yd²", new Area(1, AreaUnit.SquareYard).ToString()); Assert.Equal("1 ft² (US)", new Area(1, AreaUnit.UsSurveySquareFoot).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1541,6 +1545,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 m²", new Area(0.123456, AreaUnit.SquareMeter).ToString("s3")); Assert.Equal("0.1235 m²", new Area(0.123456, AreaUnit.SquareMeter).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/BitRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/BitRateTestsBase.g.cs index 33fb9a96c2..baa8670218 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/BitRateTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/BitRateTestsBase.g.cs @@ -1594,6 +1594,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 Tbit/s", new BitRate(1, BitRateUnit.TerabitPerSecond).ToString()); Assert.Equal("1 TB/s", new BitRate(1, BitRateUnit.TerabytePerSecond).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1646,6 +1650,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 bit/s", new BitRate(0.123456m, BitRateUnit.BitPerSecond).ToString("s3")); Assert.Equal("0.1235 bit/s", new BitRate(0.123456m, BitRateUnit.BitPerSecond).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/BrakeSpecificFuelConsumptionTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/BrakeSpecificFuelConsumptionTestsBase.g.cs index 5fd7104f26..5f52e6ce7e 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/BrakeSpecificFuelConsumptionTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/BrakeSpecificFuelConsumptionTestsBase.g.cs @@ -479,6 +479,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 kg/J", new BrakeSpecificFuelConsumption(1, BrakeSpecificFuelConsumptionUnit.KilogramPerJoule).ToString()); Assert.Equal("1 lb/hph", new BrakeSpecificFuelConsumption(1, BrakeSpecificFuelConsumptionUnit.PoundPerMechanicalHorsepowerHour).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -508,6 +512,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 kg/J", new BrakeSpecificFuelConsumption(0.123456, BrakeSpecificFuelConsumptionUnit.KilogramPerJoule).ToString("s3")); Assert.Equal("0.1235 kg/J", new BrakeSpecificFuelConsumption(0.123456, BrakeSpecificFuelConsumptionUnit.KilogramPerJoule).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/CapacitanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/CapacitanceTestsBase.g.cs index adde51fa5e..468165c5a5 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/CapacitanceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/CapacitanceTestsBase.g.cs @@ -601,6 +601,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 nF", new Capacitance(1, CapacitanceUnit.Nanofarad).ToString()); Assert.Equal("1 pF", new Capacitance(1, CapacitanceUnit.Picofarad).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -634,6 +638,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 F", new Capacitance(0.123456, CapacitanceUnit.Farad).ToString("s3")); Assert.Equal("0.1235 F", new Capacitance(0.123456, CapacitanceUnit.Farad).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/CoefficientOfThermalExpansionTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/CoefficientOfThermalExpansionTestsBase.g.cs index 54e262d2ba..69a230a36d 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/CoefficientOfThermalExpansionTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/CoefficientOfThermalExpansionTestsBase.g.cs @@ -551,6 +551,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 °F⁻¹", new CoefficientOfThermalExpansion(1, CoefficientOfThermalExpansionUnit.InverseDegreeFahrenheit).ToString()); Assert.Equal("1 K⁻¹", new CoefficientOfThermalExpansion(1, CoefficientOfThermalExpansionUnit.InverseKelvin).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -580,6 +584,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 K⁻¹", new CoefficientOfThermalExpansion(0.123456, CoefficientOfThermalExpansionUnit.InverseKelvin).ToString("s3")); Assert.Equal("0.1235 K⁻¹", new CoefficientOfThermalExpansion(0.123456, CoefficientOfThermalExpansionUnit.InverseKelvin).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/CompressibilityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/CompressibilityTestsBase.g.cs index e93b3192d6..d217a18615 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/CompressibilityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/CompressibilityTestsBase.g.cs @@ -791,6 +791,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 Pa⁻¹", new Compressibility(1, CompressibilityUnit.InversePascal).ToString()); Assert.Equal("1 psi⁻¹", new Compressibility(1, CompressibilityUnit.InversePoundForcePerSquareInch).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -824,6 +828,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 Pa⁻¹", new Compressibility(0.123456, CompressibilityUnit.InversePascal).ToString("s3")); Assert.Equal("0.1235 Pa⁻¹", new Compressibility(0.123456, CompressibilityUnit.InversePascal).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/DensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/DensityTestsBase.g.cs index c42a8926f8..2d2419eb2c 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/DensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/DensityTestsBase.g.cs @@ -2303,6 +2303,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 t/m³", new Density(1, DensityUnit.TonnePerCubicMeter).ToString()); Assert.Equal("1 t/mm³", new Density(1, DensityUnit.TonnePerCubicMillimeter).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -2380,6 +2384,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 kg/m³", new Density(0.123456, DensityUnit.KilogramPerCubicMeter).ToString("s3")); Assert.Equal("0.1235 kg/m³", new Density(0.123456, DensityUnit.KilogramPerCubicMeter).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/DurationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/DurationTestsBase.g.cs index 08ce04606b..021c355515 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/DurationTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/DurationTestsBase.g.cs @@ -1943,6 +1943,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 wk", new Duration(1, DurationUnit.Week).ToString()); Assert.Equal("1 yr", new Duration(1, DurationUnit.Year365).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1980,6 +1984,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 s", new Duration(0.123456, DurationUnit.Second).ToString("s3")); Assert.Equal("0.1235 s", new Duration(0.123456, DurationUnit.Second).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/DynamicViscosityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/DynamicViscosityTestsBase.g.cs index ce6780c71a..0d455f585a 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/DynamicViscosityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/DynamicViscosityTestsBase.g.cs @@ -803,6 +803,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 lb/ft·s", new DynamicViscosity(1, DynamicViscosityUnit.PoundPerFootSecond).ToString()); Assert.Equal("1 reyn", new DynamicViscosity(1, DynamicViscosityUnit.Reyn).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -839,6 +843,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 Ns/m²", new DynamicViscosity(0.123456, DynamicViscosityUnit.NewtonSecondPerMeterSquared).ToString("s3")); Assert.Equal("0.1235 Ns/m²", new DynamicViscosity(0.123456, DynamicViscosityUnit.NewtonSecondPerMeterSquared).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricAdmittanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricAdmittanceTestsBase.g.cs index ec89cad3cc..9c1a822250 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricAdmittanceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricAdmittanceTestsBase.g.cs @@ -515,6 +515,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 nS", new ElectricAdmittance(1, ElectricAdmittanceUnit.Nanosiemens).ToString()); Assert.Equal("1 S", new ElectricAdmittance(1, ElectricAdmittanceUnit.Siemens).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -545,6 +549,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 S", new ElectricAdmittance(0.123456, ElectricAdmittanceUnit.Siemens).ToString("s3")); Assert.Equal("0.1235 S", new ElectricAdmittance(0.123456, ElectricAdmittanceUnit.Siemens).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeDensityTestsBase.g.cs index 304cac4a07..13e91e64fa 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeDensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeDensityTestsBase.g.cs @@ -406,6 +406,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() try { Assert.Equal("1 C/m³", new ElectricChargeDensity(1, ElectricChargeDensityUnit.CoulombPerCubicMeter).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -433,6 +437,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 C/m³", new ElectricChargeDensity(0.123456, ElectricChargeDensityUnit.CoulombPerCubicMeter).ToString("s3")); Assert.Equal("0.1235 C/m³", new ElectricChargeDensity(0.123456, ElectricChargeDensityUnit.CoulombPerCubicMeter).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeTestsBase.g.cs index 8cd4144846..3ce10d3d64 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeTestsBase.g.cs @@ -797,6 +797,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 nC", new ElectricCharge(1, ElectricChargeUnit.Nanocoulomb).ToString()); Assert.Equal("1 pC", new ElectricCharge(1, ElectricChargeUnit.Picocoulomb).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -834,6 +838,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 C", new ElectricCharge(0.123456, ElectricChargeUnit.Coulomb).ToString("s3")); Assert.Equal("0.1235 C", new ElectricCharge(0.123456, ElectricChargeUnit.Coulomb).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductanceTestsBase.g.cs index fa7baabee9..18963f803a 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductanceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductanceTestsBase.g.cs @@ -551,6 +551,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 nS", new ElectricConductance(1, ElectricConductanceUnit.Nanosiemens).ToString()); Assert.Equal("1 S", new ElectricConductance(1, ElectricConductanceUnit.Siemens).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -582,6 +586,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 S", new ElectricConductance(0.123456, ElectricConductanceUnit.Siemens).ToString("s3")); Assert.Equal("0.1235 S", new ElectricConductance(0.123456, ElectricConductanceUnit.Siemens).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductivityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductivityTestsBase.g.cs index 84a7fc4d3b..e36160d1ef 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductivityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductivityTestsBase.g.cs @@ -587,6 +587,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 S/in", new ElectricConductivity(1, ElectricConductivityUnit.SiemensPerInch).ToString()); Assert.Equal("1 S/m", new ElectricConductivity(1, ElectricConductivityUnit.SiemensPerMeter).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -619,6 +623,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 S/m", new ElectricConductivity(0.123456, ElectricConductivityUnit.SiemensPerMeter).ToString("s3")); Assert.Equal("0.1235 S/m", new ElectricConductivity(0.123456, ElectricConductivityUnit.SiemensPerMeter).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentDensityTestsBase.g.cs index 3d170cb479..600f0f2248 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentDensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentDensityTestsBase.g.cs @@ -479,6 +479,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 A/in²", new ElectricCurrentDensity(1, ElectricCurrentDensityUnit.AmperePerSquareInch).ToString()); Assert.Equal("1 A/m²", new ElectricCurrentDensity(1, ElectricCurrentDensityUnit.AmperePerSquareMeter).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -508,6 +512,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 A/m²", new ElectricCurrentDensity(0.123456, ElectricCurrentDensityUnit.AmperePerSquareMeter).ToString("s3")); Assert.Equal("0.1235 A/m²", new ElectricCurrentDensity(0.123456, ElectricCurrentDensityUnit.AmperePerSquareMeter).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentGradientTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentGradientTestsBase.g.cs index 1300564609..a44dd3f6fb 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentGradientTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentGradientTestsBase.g.cs @@ -515,6 +515,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 A/ns", new ElectricCurrentGradient(1, ElectricCurrentGradientUnit.AmperePerNanosecond).ToString()); Assert.Equal("1 A/s", new ElectricCurrentGradient(1, ElectricCurrentGradientUnit.AmperePerSecond).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -545,6 +549,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 A/s", new ElectricCurrentGradient(0.123456, ElectricCurrentGradientUnit.AmperePerSecond).ToString("s3")); Assert.Equal("0.1235 A/s", new ElectricCurrentGradient(0.123456, ElectricCurrentGradientUnit.AmperePerSecond).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentTestsBase.g.cs index a50faabca5..ecc09f553e 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentTestsBase.g.cs @@ -673,6 +673,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 nA", new ElectricCurrent(1, ElectricCurrentUnit.Nanoampere).ToString()); Assert.Equal("1 pA", new ElectricCurrent(1, ElectricCurrentUnit.Picoampere).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -708,6 +712,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 A", new ElectricCurrent(0.123456, ElectricCurrentUnit.Ampere).ToString("s3")); Assert.Equal("0.1235 A", new ElectricCurrent(0.123456, ElectricCurrentUnit.Ampere).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricFieldTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricFieldTestsBase.g.cs index b383e3cfb1..d0412a2009 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricFieldTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricFieldTestsBase.g.cs @@ -406,6 +406,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() try { Assert.Equal("1 V/m", new ElectricField(1, ElectricFieldUnit.VoltPerMeter).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -433,6 +437,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 V/m", new ElectricField(0.123456, ElectricFieldUnit.VoltPerMeter).ToString("s3")); Assert.Equal("0.1235 V/m", new ElectricField(0.123456, ElectricFieldUnit.VoltPerMeter).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricInductanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricInductanceTestsBase.g.cs index ef3bc483dc..e680c8d545 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricInductanceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricInductanceTestsBase.g.cs @@ -551,6 +551,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 nH", new ElectricInductance(1, ElectricInductanceUnit.Nanohenry).ToString()); Assert.Equal("1 pH", new ElectricInductance(1, ElectricInductanceUnit.Picohenry).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -582,6 +586,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 H", new ElectricInductance(0.123456, ElectricInductanceUnit.Henry).ToString("s3")); Assert.Equal("0.1235 H", new ElectricInductance(0.123456, ElectricInductanceUnit.Henry).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialAcTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialAcTestsBase.g.cs index 1e78901e00..74074ce8e8 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialAcTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialAcTestsBase.g.cs @@ -529,6 +529,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 mVac", new ElectricPotentialAc(1, ElectricPotentialAcUnit.MillivoltAc).ToString()); Assert.Equal("1 Vac", new ElectricPotentialAc(1, ElectricPotentialAcUnit.VoltAc).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -560,6 +564,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 Vac", new ElectricPotentialAc(0.123456, ElectricPotentialAcUnit.VoltAc).ToString("s3")); Assert.Equal("0.1235 Vac", new ElectricPotentialAc(0.123456, ElectricPotentialAcUnit.VoltAc).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialChangeRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialChangeRateTestsBase.g.cs index 02be3df0f6..cc82b9bad5 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialChangeRateTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialChangeRateTestsBase.g.cs @@ -1003,6 +1003,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 V/min", new ElectricPotentialChangeRate(1, ElectricPotentialChangeRateUnit.VoltPerMinute).ToString()); Assert.Equal("1 V/s", new ElectricPotentialChangeRate(1, ElectricPotentialChangeRateUnit.VoltPerSecond).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1049,6 +1053,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 V/s", new ElectricPotentialChangeRate(0.123456, ElectricPotentialChangeRateUnit.VoltPerSecond).ToString("s3")); Assert.Equal("0.1235 V/s", new ElectricPotentialChangeRate(0.123456, ElectricPotentialChangeRateUnit.VoltPerSecond).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialDcTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialDcTestsBase.g.cs index 99c7d1e0c2..95f84d6f39 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialDcTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialDcTestsBase.g.cs @@ -529,6 +529,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 mVdc", new ElectricPotentialDc(1, ElectricPotentialDcUnit.MillivoltDc).ToString()); Assert.Equal("1 Vdc", new ElectricPotentialDc(1, ElectricPotentialDcUnit.VoltDc).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -560,6 +564,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 Vdc", new ElectricPotentialDc(0.123456, ElectricPotentialDcUnit.VoltDc).ToString("s3")); Assert.Equal("0.1235 Vdc", new ElectricPotentialDc(0.123456, ElectricPotentialDcUnit.VoltDc).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialTestsBase.g.cs index 5e033e2005..d84156d45b 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialTestsBase.g.cs @@ -687,6 +687,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 nV", new ElectricPotential(1, ElectricPotentialUnit.Nanovolt).ToString()); Assert.Equal("1 V", new ElectricPotential(1, ElectricPotentialUnit.Volt).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -719,6 +723,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 V", new ElectricPotential(0.123456, ElectricPotentialUnit.Volt).ToString("s3")); Assert.Equal("0.1235 V", new ElectricPotential(0.123456, ElectricPotentialUnit.Volt).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistanceTestsBase.g.cs index ad19149e2d..6243ea31cb 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistanceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistanceTestsBase.g.cs @@ -601,6 +601,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 Ω", new ElectricResistance(1, ElectricResistanceUnit.Ohm).ToString()); Assert.Equal("1 TΩ", new ElectricResistance(1, ElectricResistanceUnit.Teraohm).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -634,6 +638,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 Ω", new ElectricResistance(0.123456, ElectricResistanceUnit.Ohm).ToString("s3")); Assert.Equal("0.1235 Ω", new ElectricResistance(0.123456, ElectricResistanceUnit.Ohm).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistivityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistivityTestsBase.g.cs index 5b21ab2d76..a629950c57 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistivityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistivityTestsBase.g.cs @@ -831,6 +831,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 pΩ·cm", new ElectricResistivity(1, ElectricResistivityUnit.PicoohmCentimeter).ToString()); Assert.Equal("1 pΩ·m", new ElectricResistivity(1, ElectricResistivityUnit.PicoohmMeter).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -871,6 +875,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 Ω·m", new ElectricResistivity(0.123456, ElectricResistivityUnit.OhmMeter).ToString("s3")); Assert.Equal("0.1235 Ω·m", new ElectricResistivity(0.123456, ElectricResistivityUnit.OhmMeter).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricSurfaceChargeDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricSurfaceChargeDensityTestsBase.g.cs index 7ebad37a16..18045cba42 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricSurfaceChargeDensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricSurfaceChargeDensityTestsBase.g.cs @@ -479,6 +479,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 C/in²", new ElectricSurfaceChargeDensity(1, ElectricSurfaceChargeDensityUnit.CoulombPerSquareInch).ToString()); Assert.Equal("1 C/m²", new ElectricSurfaceChargeDensity(1, ElectricSurfaceChargeDensityUnit.CoulombPerSquareMeter).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -508,6 +512,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 C/m²", new ElectricSurfaceChargeDensity(0.123456, ElectricSurfaceChargeDensityUnit.CoulombPerSquareMeter).ToString("s3")); Assert.Equal("0.1235 C/m²", new ElectricSurfaceChargeDensity(0.123456, ElectricSurfaceChargeDensityUnit.CoulombPerSquareMeter).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/EnergyDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/EnergyDensityTestsBase.g.cs index 35e38f5013..9204ea1ff2 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/EnergyDensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/EnergyDensityTestsBase.g.cs @@ -803,6 +803,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 TWh/m³", new EnergyDensity(1, EnergyDensityUnit.TerawattHourPerCubicMeter).ToString()); Assert.Equal("1 Wh/m³", new EnergyDensity(1, EnergyDensityUnit.WattHourPerCubicMeter).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -841,6 +845,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 J/m³", new EnergyDensity(0.123456, EnergyDensityUnit.JoulePerCubicMeter).ToString("s3")); Assert.Equal("0.1235 J/m³", new EnergyDensity(0.123456, EnergyDensityUnit.JoulePerCubicMeter).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/EnergyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/EnergyTestsBase.g.cs index cbe0ad2435..89171f4672 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/EnergyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/EnergyTestsBase.g.cs @@ -2221,6 +2221,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 Wd", new Energy(1, EnergyUnit.WattDay).ToString()); Assert.Equal("1 Wh", new Energy(1, EnergyUnit.WattHour).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -2285,6 +2289,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 J", new Energy(0.123456, EnergyUnit.Joule).ToString("s3")); Assert.Equal("0.1235 J", new Energy(0.123456, EnergyUnit.Joule).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/EntropyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/EntropyTestsBase.g.cs index 67d5b9ffb4..57b8b54692 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/EntropyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/EntropyTestsBase.g.cs @@ -623,6 +623,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 kJ/K", new Entropy(1, EntropyUnit.KilojoulePerKelvin).ToString()); Assert.Equal("1 MJ/K", new Entropy(1, EntropyUnit.MegajoulePerKelvin).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -656,6 +660,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 J/K", new Entropy(0.123456, EntropyUnit.JoulePerKelvin).ToString("s3")); Assert.Equal("0.1235 J/K", new Entropy(0.123456, EntropyUnit.JoulePerKelvin).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ForceChangeRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ForceChangeRateTestsBase.g.cs index 24e3b9c5a9..d5d20c2b1d 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ForceChangeRateTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ForceChangeRateTestsBase.g.cs @@ -1007,6 +1007,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 lbf/min", new ForceChangeRate(1, ForceChangeRateUnit.PoundForcePerMinute).ToString()); Assert.Equal("1 lbf/s", new ForceChangeRate(1, ForceChangeRateUnit.PoundForcePerSecond).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1048,6 +1052,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 N/s", new ForceChangeRate(0.123456, ForceChangeRateUnit.NewtonPerSecond).ToString("s3")); Assert.Equal("0.1235 N/s", new ForceChangeRate(0.123456, ForceChangeRateUnit.NewtonPerSecond).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ForcePerLengthTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ForcePerLengthTestsBase.g.cs index f983e8e7c5..977ebf5413 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ForcePerLengthTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ForcePerLengthTestsBase.g.cs @@ -1913,6 +1913,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 tf/m", new ForcePerLength(1, ForcePerLengthUnit.TonneForcePerMeter).ToString()); Assert.Equal("1 tf/mm", new ForcePerLength(1, ForcePerLengthUnit.TonneForcePerMillimeter).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1977,6 +1981,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 N/m", new ForcePerLength(0.123456, ForcePerLengthUnit.NewtonPerMeter).ToString("s3")); Assert.Equal("0.1235 N/m", new ForcePerLength(0.123456, ForcePerLengthUnit.NewtonPerMeter).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ForceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ForceTestsBase.g.cs index 5f4fa8c7f3..7ed97c9b75 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ForceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ForceTestsBase.g.cs @@ -1325,6 +1325,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 tf (short)", new Force(1, ForceUnit.ShortTonForce).ToString()); Assert.Equal("1 tf", new Force(1, ForceUnit.TonneForce).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1366,6 +1370,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 N", new Force(0.123456, ForceUnit.Newton).ToString("s3")); Assert.Equal("0.1235 N", new Force(0.123456, ForceUnit.Newton).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/FrequencyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/FrequencyTestsBase.g.cs index 1d095a7628..a6621fac87 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/FrequencyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/FrequencyTestsBase.g.cs @@ -1011,6 +1011,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 rad/s", new Frequency(1, FrequencyUnit.RadianPerSecond).ToString()); Assert.Equal("1 THz", new Frequency(1, FrequencyUnit.Terahertz).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1050,6 +1054,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 Hz", new Frequency(0.123456, FrequencyUnit.Hertz).ToString("s3")); Assert.Equal("0.1235 Hz", new Frequency(0.123456, FrequencyUnit.Hertz).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/FuelEfficiencyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/FuelEfficiencyTestsBase.g.cs index d20db23b84..1c652603d3 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/FuelEfficiencyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/FuelEfficiencyTestsBase.g.cs @@ -515,6 +515,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 mpg (imp.)", new FuelEfficiency(1, FuelEfficiencyUnit.MilePerUkGallon).ToString()); Assert.Equal("1 mpg (U.S.)", new FuelEfficiency(1, FuelEfficiencyUnit.MilePerUsGallon).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -545,6 +549,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 L/100km", new FuelEfficiency(0.123456, FuelEfficiencyUnit.LiterPer100Kilometers).ToString("s3")); Assert.Equal("0.1235 L/100km", new FuelEfficiency(0.123456, FuelEfficiencyUnit.LiterPer100Kilometers).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/HeatFluxTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/HeatFluxTestsBase.g.cs index 8beef55ea9..4cbaf70914 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/HeatFluxTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/HeatFluxTestsBase.g.cs @@ -1043,6 +1043,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 W/in²", new HeatFlux(1, HeatFluxUnit.WattPerSquareInch).ToString()); Assert.Equal("1 W/m²", new HeatFlux(1, HeatFluxUnit.WattPerSquareMeter).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1087,6 +1091,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 W/m²", new HeatFlux(0.123456, HeatFluxUnit.WattPerSquareMeter).ToString("s3")); Assert.Equal("0.1235 W/m²", new HeatFlux(0.123456, HeatFluxUnit.WattPerSquareMeter).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/HeatTransferCoefficientTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/HeatTransferCoefficientTestsBase.g.cs index 565a16cc33..bcf1dad024 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/HeatTransferCoefficientTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/HeatTransferCoefficientTestsBase.g.cs @@ -779,6 +779,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 W/m²·°C", new HeatTransferCoefficient(1, HeatTransferCoefficientUnit.WattPerSquareMeterCelsius).ToString()); Assert.Equal("1 W/m²·K", new HeatTransferCoefficient(1, HeatTransferCoefficientUnit.WattPerSquareMeterKelvin).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -811,6 +815,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 W/m²·K", new HeatTransferCoefficient(0.123456, HeatTransferCoefficientUnit.WattPerSquareMeterKelvin).ToString("s3")); Assert.Equal("0.1235 W/m²·K", new HeatTransferCoefficient(0.123456, HeatTransferCoefficientUnit.WattPerSquareMeterKelvin).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/IlluminanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/IlluminanceTestsBase.g.cs index 59bcdbbf7c..06ff191080 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/IlluminanceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/IlluminanceTestsBase.g.cs @@ -493,6 +493,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 Mlx", new Illuminance(1, IlluminanceUnit.Megalux).ToString()); Assert.Equal("1 mlx", new Illuminance(1, IlluminanceUnit.Millilux).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -523,6 +527,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 lx", new Illuminance(0.123456, IlluminanceUnit.Lux).ToString("s3")); Assert.Equal("0.1235 lx", new Illuminance(0.123456, IlluminanceUnit.Lux).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ImpulseTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ImpulseTestsBase.g.cs index 7f08945455..74f1c1a336 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ImpulseTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ImpulseTestsBase.g.cs @@ -817,6 +817,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 lbf·s", new Impulse(1, ImpulseUnit.PoundForceSecond).ToString()); Assert.Equal("1 slug·ft/s", new Impulse(1, ImpulseUnit.SlugFootPerSecond).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -856,6 +860,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 N·s", new Impulse(0.123456, ImpulseUnit.NewtonSecond).ToString("s3")); Assert.Equal("0.1235 N·s", new Impulse(0.123456, ImpulseUnit.NewtonSecond).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/InformationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/InformationTestsBase.g.cs index 022e8bc6db..1f99bde178 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/InformationTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/InformationTestsBase.g.cs @@ -996,6 +996,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 Tb", new Information(1, InformationUnit.Terabit).ToString()); Assert.Equal("1 TB", new Information(1, InformationUnit.Terabyte).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1048,6 +1052,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 b", new Information(0.123456m, InformationUnit.Bit).ToString("s3")); Assert.Equal("0.1235 b", new Information(0.123456m, InformationUnit.Bit).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/IrradianceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/IrradianceTestsBase.g.cs index b868d8809d..ce8a90eccf 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/IrradianceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/IrradianceTestsBase.g.cs @@ -831,6 +831,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 W/cm²", new Irradiance(1, IrradianceUnit.WattPerSquareCentimeter).ToString()); Assert.Equal("1 W/m²", new Irradiance(1, IrradianceUnit.WattPerSquareMeter).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -871,6 +875,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 W/m²", new Irradiance(0.123456, IrradianceUnit.WattPerSquareMeter).ToString("s3")); Assert.Equal("0.1235 W/m²", new Irradiance(0.123456, IrradianceUnit.WattPerSquareMeter).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/IrradiationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/IrradiationTestsBase.g.cs index 20b619ae26..0f55f2208d 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/IrradiationTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/IrradiationTestsBase.g.cs @@ -623,6 +623,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 mJ/cm²", new Irradiation(1, IrradiationUnit.MillijoulePerSquareCentimeter).ToString()); Assert.Equal("1 Wh/m²", new Irradiation(1, IrradiationUnit.WattHourPerSquareMeter).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -656,6 +660,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 J/m²", new Irradiation(0.123456, IrradiationUnit.JoulePerSquareMeter).ToString("s3")); Assert.Equal("0.1235 J/m²", new Irradiation(0.123456, IrradiationUnit.JoulePerSquareMeter).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/JerkTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/JerkTestsBase.g.cs index 9938bea3f4..a61fffa6a5 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/JerkTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/JerkTestsBase.g.cs @@ -1031,6 +1031,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 nm/s³", new Jerk(1, JerkUnit.NanometerPerSecondCubed).ToString()); Assert.Equal("1 g/s", new Jerk(1, JerkUnit.StandardGravitiesPerSecond).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1068,6 +1072,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 m/s³", new Jerk(0.123456, JerkUnit.MeterPerSecondCubed).ToString("s3")); Assert.Equal("0.1235 m/s³", new Jerk(0.123456, JerkUnit.MeterPerSecondCubed).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/KinematicViscosityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/KinematicViscosityTestsBase.g.cs index 546c4bc6eb..bdc9b7f9a4 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/KinematicViscosityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/KinematicViscosityTestsBase.g.cs @@ -887,6 +887,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 m²/s", new KinematicViscosity(1, KinematicViscosityUnit.SquareMeterPerSecond).ToString()); Assert.Equal("1 St", new KinematicViscosity(1, KinematicViscosityUnit.Stokes).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -922,6 +926,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 m²/s", new KinematicViscosity(0.123456, KinematicViscosityUnit.SquareMeterPerSecond).ToString("s3")); Assert.Equal("0.1235 m²/s", new KinematicViscosity(0.123456, KinematicViscosityUnit.SquareMeterPerSecond).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LengthTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LengthTestsBase.g.cs index 8a24694615..58cb310df5 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/LengthTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LengthTestsBase.g.cs @@ -2471,6 +2471,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 ftUS", new Length(1, LengthUnit.UsSurveyFoot).ToString()); Assert.Equal("1 yd", new Length(1, LengthUnit.Yard).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -2533,6 +2537,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 m", new Length(0.123456, LengthUnit.Meter).ToString("s3")); Assert.Equal("0.1235 m", new Length(0.123456, LengthUnit.Meter).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LevelTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LevelTestsBase.g.cs index 758b6276f1..e7e4e01344 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/LevelTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LevelTestsBase.g.cs @@ -447,6 +447,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 dB", new Level(1, LevelUnit.Decibel).ToString()); Assert.Equal("1 Np", new Level(1, LevelUnit.Neper).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -475,6 +479,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 dB", new Level(0.123456, LevelUnit.Decibel).ToString("s3")); Assert.Equal("0.1235 dB", new Level(0.123456, LevelUnit.Decibel).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LinearDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LinearDensityTestsBase.g.cs index 28cc959b10..307d179e45 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/LinearDensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LinearDensityTestsBase.g.cs @@ -875,6 +875,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 lb/ft", new LinearDensity(1, LinearDensityUnit.PoundPerFoot).ToString()); Assert.Equal("1 lb/in", new LinearDensity(1, LinearDensityUnit.PoundPerInch).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -915,6 +919,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 kg/m", new LinearDensity(0.123456, LinearDensityUnit.KilogramPerMeter).ToString("s3")); Assert.Equal("0.1235 kg/m", new LinearDensity(0.123456, LinearDensityUnit.KilogramPerMeter).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LinearPowerDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LinearPowerDensityTestsBase.g.cs index c805da8a11..8c0a5c69a8 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/LinearPowerDensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LinearPowerDensityTestsBase.g.cs @@ -1161,6 +1161,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 W/m", new LinearPowerDensity(1, LinearPowerDensityUnit.WattPerMeter).ToString()); Assert.Equal("1 W/mm", new LinearPowerDensity(1, LinearPowerDensityUnit.WattPerMillimeter).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1212,6 +1216,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 W/m", new LinearPowerDensity(0.123456, LinearPowerDensityUnit.WattPerMeter).ToString("s3")); Assert.Equal("0.1235 W/m", new LinearPowerDensity(0.123456, LinearPowerDensityUnit.WattPerMeter).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminanceTestsBase.g.cs index 40f8eef698..4f8b625943 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminanceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminanceTestsBase.g.cs @@ -731,6 +731,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 nCd/m²", new Luminance(1, LuminanceUnit.NanocandelaPerSquareMeter).ToString()); Assert.Equal("1 nt", new Luminance(1, LuminanceUnit.Nit).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -767,6 +771,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 Cd/m²", new Luminance(0.123456, LuminanceUnit.CandelaPerSquareMeter).ToString("s3")); Assert.Equal("0.1235 Cd/m²", new Luminance(0.123456, LuminanceUnit.CandelaPerSquareMeter).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminosityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminosityTestsBase.g.cs index 01e350beb2..4e20560056 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminosityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminosityTestsBase.g.cs @@ -831,6 +831,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 TW", new Luminosity(1, LuminosityUnit.Terawatt).ToString()); Assert.Equal("1 W", new Luminosity(1, LuminosityUnit.Watt).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -871,6 +875,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 W", new Luminosity(0.123456, LuminosityUnit.Watt).ToString("s3")); Assert.Equal("0.1235 W", new Luminosity(0.123456, LuminosityUnit.Watt).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousFluxTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousFluxTestsBase.g.cs index ebb4355e2b..bf9a17a16b 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousFluxTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousFluxTestsBase.g.cs @@ -406,6 +406,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() try { Assert.Equal("1 lm", new LuminousFlux(1, LuminousFluxUnit.Lumen).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -433,6 +437,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 lm", new LuminousFlux(0.123456, LuminousFluxUnit.Lumen).ToString("s3")); Assert.Equal("0.1235 lm", new LuminousFlux(0.123456, LuminousFluxUnit.Lumen).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousIntensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousIntensityTestsBase.g.cs index 569bae562c..c9c878d917 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousIntensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousIntensityTestsBase.g.cs @@ -406,6 +406,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() try { Assert.Equal("1 cd", new LuminousIntensity(1, LuminousIntensityUnit.Candela).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -433,6 +437,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 cd", new LuminousIntensity(0.123456, LuminousIntensityUnit.Candela).ToString("s3")); Assert.Equal("0.1235 cd", new LuminousIntensity(0.123456, LuminousIntensityUnit.Candela).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFieldTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFieldTestsBase.g.cs index e8e29cf342..cf8f7e7e2e 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFieldTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFieldTestsBase.g.cs @@ -587,6 +587,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 nT", new MagneticField(1, MagneticFieldUnit.Nanotesla).ToString()); Assert.Equal("1 T", new MagneticField(1, MagneticFieldUnit.Tesla).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -619,6 +623,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 T", new MagneticField(0.123456, MagneticFieldUnit.Tesla).ToString("s3")); Assert.Equal("0.1235 T", new MagneticField(0.123456, MagneticFieldUnit.Tesla).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFluxTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFluxTestsBase.g.cs index 90eb8d829f..a46e76640e 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFluxTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFluxTestsBase.g.cs @@ -406,6 +406,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() try { Assert.Equal("1 Wb", new MagneticFlux(1, MagneticFluxUnit.Weber).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -433,6 +437,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 Wb", new MagneticFlux(0.123456, MagneticFluxUnit.Weber).ToString("s3")); Assert.Equal("0.1235 Wb", new MagneticFlux(0.123456, MagneticFluxUnit.Weber).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MagnetizationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MagnetizationTestsBase.g.cs index ca145a2034..3d36a0a900 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MagnetizationTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MagnetizationTestsBase.g.cs @@ -406,6 +406,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() try { Assert.Equal("1 A/m", new Magnetization(1, MagnetizationUnit.AmperePerMeter).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -433,6 +437,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 A/m", new Magnetization(0.123456, MagnetizationUnit.AmperePerMeter).ToString("s3")); Assert.Equal("0.1235 A/m", new Magnetization(0.123456, MagnetizationUnit.AmperePerMeter).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MassConcentrationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MassConcentrationTestsBase.g.cs index 4f2d99d50d..76545b6df3 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MassConcentrationTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MassConcentrationTestsBase.g.cs @@ -2231,6 +2231,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 t/m³", new MassConcentration(1, MassConcentrationUnit.TonnePerCubicMeter).ToString()); Assert.Equal("1 t/mm³", new MassConcentration(1, MassConcentrationUnit.TonnePerCubicMillimeter).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -2306,6 +2310,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 kg/m³", new MassConcentration(0.123456, MassConcentrationUnit.KilogramPerCubicMeter).ToString("s3")); Assert.Equal("0.1235 kg/m³", new MassConcentration(0.123456, MassConcentrationUnit.KilogramPerCubicMeter).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MassFlowTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MassFlowTestsBase.g.cs index a30656566c..a7a4699c03 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MassFlowTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MassFlowTestsBase.g.cs @@ -1801,6 +1801,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 t/d", new MassFlow(1, MassFlowUnit.TonnePerDay).ToString()); Assert.Equal("1 t/h", new MassFlow(1, MassFlowUnit.TonnePerHour).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1860,6 +1864,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 g/s", new MassFlow(0.123456, MassFlowUnit.GramPerSecond).ToString("s3")); Assert.Equal("0.1235 g/s", new MassFlow(0.123456, MassFlowUnit.GramPerSecond).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MassFluxTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MassFluxTestsBase.g.cs index 128447a5f1..e3ff4f34f5 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MassFluxTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MassFluxTestsBase.g.cs @@ -803,6 +803,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 kg·s⁻¹·m⁻²", new MassFlux(1, MassFluxUnit.KilogramPerSecondPerSquareMeter).ToString()); Assert.Equal("1 kg·s⁻¹·mm⁻²", new MassFlux(1, MassFluxUnit.KilogramPerSecondPerSquareMillimeter).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -841,6 +845,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 kg·s⁻¹·m⁻²", new MassFlux(0.123456, MassFluxUnit.KilogramPerSecondPerSquareMeter).ToString("s3")); Assert.Equal("0.1235 kg·s⁻¹·m⁻²", new MassFlux(0.123456, MassFluxUnit.KilogramPerSecondPerSquareMeter).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MassFractionTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MassFractionTestsBase.g.cs index 60bbff0698..c076756bfd 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MassFractionTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MassFractionTestsBase.g.cs @@ -1259,6 +1259,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 ppt", new MassFraction(1, MassFractionUnit.PartPerTrillion).ToString()); Assert.Equal("1 %", new MassFraction(1, MassFractionUnit.Percent).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1309,6 +1313,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123", new MassFraction(0.123456, MassFractionUnit.DecimalFraction).ToString("s3")); Assert.Equal("0.1235", new MassFraction(0.123456, MassFractionUnit.DecimalFraction).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MassMomentOfInertiaTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MassMomentOfInertiaTestsBase.g.cs index 4dea92181c..44f6990aeb 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MassMomentOfInertiaTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MassMomentOfInertiaTestsBase.g.cs @@ -1379,6 +1379,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 t·m²", new MassMomentOfInertia(1, MassMomentOfInertiaUnit.TonneSquareMeter).ToString()); Assert.Equal("1 t·mm²", new MassMomentOfInertia(1, MassMomentOfInertiaUnit.TonneSquareMilimeter).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1433,6 +1437,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 kg·m²", new MassMomentOfInertia(0.123456, MassMomentOfInertiaUnit.KilogramSquareMeter).ToString("s3")); Assert.Equal("0.1235 kg·m²", new MassMomentOfInertia(0.123456, MassMomentOfInertiaUnit.KilogramSquareMeter).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MassTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MassTestsBase.g.cs index f720a8afa2..72cc9d2f8e 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MassTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MassTestsBase.g.cs @@ -2283,6 +2283,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 st", new Mass(1, MassUnit.Stone).ToString()); Assert.Equal("1 t", new Mass(1, MassUnit.Tonne).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -2334,6 +2338,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 kg", new Mass(0.123456, MassUnit.Kilogram).ToString("s3")); Assert.Equal("0.1235 kg", new Mass(0.123456, MassUnit.Kilogram).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEnergyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEnergyTestsBase.g.cs index 3236de2c18..c463f106ab 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEnergyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEnergyTestsBase.g.cs @@ -479,6 +479,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 kJ/mol", new MolarEnergy(1, MolarEnergyUnit.KilojoulePerMole).ToString()); Assert.Equal("1 MJ/mol", new MolarEnergy(1, MolarEnergyUnit.MegajoulePerMole).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -508,6 +512,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 J/mol", new MolarEnergy(0.123456, MolarEnergyUnit.JoulePerMole).ToString("s3")); Assert.Equal("0.1235 J/mol", new MolarEnergy(0.123456, MolarEnergyUnit.JoulePerMole).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEntropyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEntropyTestsBase.g.cs index bd44b39ac5..82c5da2102 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEntropyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEntropyTestsBase.g.cs @@ -479,6 +479,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 kJ/(mol*K)", new MolarEntropy(1, MolarEntropyUnit.KilojoulePerMoleKelvin).ToString()); Assert.Equal("1 MJ/(mol*K)", new MolarEntropy(1, MolarEntropyUnit.MegajoulePerMoleKelvin).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -508,6 +512,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 J/(mol*K)", new MolarEntropy(0.123456, MolarEntropyUnit.JoulePerMoleKelvin).ToString("s3")); Assert.Equal("0.1235 J/(mol*K)", new MolarEntropy(0.123456, MolarEntropyUnit.JoulePerMoleKelvin).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarFlowTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarFlowTestsBase.g.cs index 0f74380ec4..ee89ff04f1 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarFlowTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarFlowTestsBase.g.cs @@ -695,6 +695,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 lbmol/min", new MolarFlow(1, MolarFlowUnit.PoundMolePerMinute).ToString()); Assert.Equal("1 lbmol/s", new MolarFlow(1, MolarFlowUnit.PoundMolePerSecond).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -730,6 +734,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 mol/s", new MolarFlow(0.123456, MolarFlowUnit.MolePerSecond).ToString("s3")); Assert.Equal("0.1235 mol/s", new MolarFlow(0.123456, MolarFlowUnit.MolePerSecond).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarMassTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarMassTestsBase.g.cs index 7953b2e18f..6e66fe3593 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarMassTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarMassTestsBase.g.cs @@ -1127,6 +1127,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 ng/mol", new MolarMass(1, MolarMassUnit.NanogramPerMole).ToString()); Assert.Equal("1 lb/mol", new MolarMass(1, MolarMassUnit.PoundPerMole).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1166,6 +1170,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 kg/mol", new MolarMass(0.123456, MolarMassUnit.KilogramPerMole).ToString("s3")); Assert.Equal("0.1235 kg/mol", new MolarMass(0.123456, MolarMassUnit.KilogramPerMole).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarityTestsBase.g.cs index 1eff8e5907..a162c78142 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarityTestsBase.g.cs @@ -959,6 +959,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 pmol/L", new Molarity(1, MolarityUnit.PicomolePerLiter).ToString()); Assert.Equal("1 lbmol/ft³", new Molarity(1, MolarityUnit.PoundMolePerCubicFoot).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -996,6 +1000,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 mol/m³", new Molarity(0.123456, MolarityUnit.MolePerCubicMeter).ToString("s3")); Assert.Equal("0.1235 mol/m³", new Molarity(0.123456, MolarityUnit.MolePerCubicMeter).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PermeabilityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PermeabilityTestsBase.g.cs index 426b50681b..86dbe8d3ef 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/PermeabilityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PermeabilityTestsBase.g.cs @@ -406,6 +406,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() try { Assert.Equal("1 H/m", new Permeability(1, PermeabilityUnit.HenryPerMeter).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -433,6 +437,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 H/m", new Permeability(0.123456, PermeabilityUnit.HenryPerMeter).ToString("s3")); Assert.Equal("0.1235 H/m", new Permeability(0.123456, PermeabilityUnit.HenryPerMeter).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PermittivityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PermittivityTestsBase.g.cs index 7274dc2139..d433acc7d0 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/PermittivityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PermittivityTestsBase.g.cs @@ -406,6 +406,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() try { Assert.Equal("1 F/m", new Permittivity(1, PermittivityUnit.FaradPerMeter).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -433,6 +437,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 F/m", new Permittivity(0.123456, PermittivityUnit.FaradPerMeter).ToString("s3")); Assert.Equal("0.1235 F/m", new Permittivity(0.123456, PermittivityUnit.FaradPerMeter).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PorousMediumPermeabilityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PorousMediumPermeabilityTestsBase.g.cs index ef3142c4e1..348df2b765 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/PorousMediumPermeabilityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PorousMediumPermeabilityTestsBase.g.cs @@ -551,6 +551,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 cm²", new PorousMediumPermeability(1, PorousMediumPermeabilityUnit.SquareCentimeter).ToString()); Assert.Equal("1 m²", new PorousMediumPermeability(1, PorousMediumPermeabilityUnit.SquareMeter).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -582,6 +586,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 m²", new PorousMediumPermeability(0.123456, PorousMediumPermeabilityUnit.SquareMeter).ToString("s3")); Assert.Equal("0.1235 m²", new PorousMediumPermeability(0.123456, PorousMediumPermeabilityUnit.SquareMeter).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PowerDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PowerDensityTestsBase.g.cs index 4425f491b2..c250d08c2c 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/PowerDensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PowerDensityTestsBase.g.cs @@ -1867,6 +1867,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 W/m³", new PowerDensity(1, PowerDensityUnit.WattPerCubicMeter).ToString()); Assert.Equal("1 W/l", new PowerDensity(1, PowerDensityUnit.WattPerLiter).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1937,6 +1941,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 W/m³", new PowerDensity(0.123456, PowerDensityUnit.WattPerCubicMeter).ToString("s3")); Assert.Equal("0.1235 W/m³", new PowerDensity(0.123456, PowerDensityUnit.WattPerCubicMeter).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PowerRatioTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PowerRatioTestsBase.g.cs index 840496d67d..25f0350e46 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/PowerRatioTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PowerRatioTestsBase.g.cs @@ -471,6 +471,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 dBmW", new PowerRatio(1, PowerRatioUnit.DecibelMilliwatt).ToString()); Assert.Equal("1 dBW", new PowerRatio(1, PowerRatioUnit.DecibelWatt).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -499,6 +503,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 dBW", new PowerRatio(0.123456, PowerRatioUnit.DecibelWatt).ToString("s3")); Assert.Equal("0.1235 dBW", new PowerRatio(0.123456, PowerRatioUnit.DecibelWatt).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PowerTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PowerTestsBase.g.cs index 1ee61d30da..f795093e23 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/PowerTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PowerTestsBase.g.cs @@ -1288,6 +1288,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 TW", new Power(1, PowerUnit.Terawatt).ToString()); Assert.Equal("1 W", new Power(1, PowerUnit.Watt).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1340,6 +1344,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 W", new Power(0.123456m, PowerUnit.Watt).ToString("s3")); Assert.Equal("0.1235 W", new Power(0.123456m, PowerUnit.Watt).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PressureChangeRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PressureChangeRateTestsBase.g.cs index 420d66a502..f893873b82 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/PressureChangeRateTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PressureChangeRateTestsBase.g.cs @@ -1499,6 +1499,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 psi/min", new PressureChangeRate(1, PressureChangeRateUnit.PoundForcePerSquareInchPerMinute).ToString()); Assert.Equal("1 psi/s", new PressureChangeRate(1, PressureChangeRateUnit.PoundForcePerSquareInchPerSecond).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1539,6 +1543,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 Pa/s", new PressureChangeRate(0.123456, PressureChangeRateUnit.PascalPerSecond).ToString("s3")); Assert.Equal("0.1235 Pa/s", new PressureChangeRate(0.123456, PressureChangeRateUnit.PascalPerSecond).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PressureTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PressureTestsBase.g.cs index 1944b2f7b7..dd07e566d5 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/PressureTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PressureTestsBase.g.cs @@ -2913,6 +2913,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 tf/mm²", new Pressure(1, PressureUnit.TonneForcePerSquareMillimeter).ToString()); Assert.Equal("1 torr", new Pressure(1, PressureUnit.Torr).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -2986,6 +2990,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 Pa", new Pressure(0.123456, PressureUnit.Pascal).ToString("s3")); Assert.Equal("0.1235 Pa", new Pressure(0.123456, PressureUnit.Pascal).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RatioChangeRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RatioChangeRateTestsBase.g.cs index 4ed19fe164..152f509088 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/RatioChangeRateTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RatioChangeRateTestsBase.g.cs @@ -443,6 +443,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 /s", new RatioChangeRate(1, RatioChangeRateUnit.DecimalFractionPerSecond).ToString()); Assert.Equal("1 %/s", new RatioChangeRate(1, RatioChangeRateUnit.PercentPerSecond).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -471,6 +475,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 /s", new RatioChangeRate(0.123456, RatioChangeRateUnit.DecimalFractionPerSecond).ToString("s3")); Assert.Equal("0.1235 /s", new RatioChangeRate(0.123456, RatioChangeRateUnit.DecimalFractionPerSecond).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RatioTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RatioTestsBase.g.cs index 2b945826ed..8ee27b65c8 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/RatioTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RatioTestsBase.g.cs @@ -587,6 +587,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 ppt", new Ratio(1, RatioUnit.PartPerTrillion).ToString()); Assert.Equal("1 %", new Ratio(1, RatioUnit.Percent).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -619,6 +623,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123", new Ratio(0.123456, RatioUnit.DecimalFraction).ToString("s3")); Assert.Equal("0.1235", new Ratio(0.123456, RatioUnit.DecimalFraction).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ReactiveEnergyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ReactiveEnergyTestsBase.g.cs index 8e90d5345e..2b8e83ed91 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ReactiveEnergyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ReactiveEnergyTestsBase.g.cs @@ -479,6 +479,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 Mvarh", new ReactiveEnergy(1, ReactiveEnergyUnit.MegavoltampereReactiveHour).ToString()); Assert.Equal("1 varh", new ReactiveEnergy(1, ReactiveEnergyUnit.VoltampereReactiveHour).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -508,6 +512,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 varh", new ReactiveEnergy(0.123456, ReactiveEnergyUnit.VoltampereReactiveHour).ToString("s3")); Assert.Equal("0.1235 varh", new ReactiveEnergy(0.123456, ReactiveEnergyUnit.VoltampereReactiveHour).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ReactivePowerTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ReactivePowerTestsBase.g.cs index 23cb5cef94..7b23efaf73 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ReactivePowerTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ReactivePowerTestsBase.g.cs @@ -515,6 +515,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 Mvar", new ReactivePower(1, ReactivePowerUnit.MegavoltampereReactive).ToString()); Assert.Equal("1 var", new ReactivePower(1, ReactivePowerUnit.VoltampereReactive).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -545,6 +549,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 var", new ReactivePower(0.123456, ReactivePowerUnit.VoltampereReactive).ToString("s3")); Assert.Equal("0.1235 var", new ReactivePower(0.123456, ReactivePowerUnit.VoltampereReactive).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ReciprocalAreaTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ReciprocalAreaTestsBase.g.cs index b82ad403c5..3587e86ca7 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ReciprocalAreaTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ReciprocalAreaTestsBase.g.cs @@ -767,6 +767,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 yd⁻²", new ReciprocalArea(1, ReciprocalAreaUnit.InverseSquareYard).ToString()); Assert.Equal("1 ft⁻² (US)", new ReciprocalArea(1, ReciprocalAreaUnit.InverseUsSurveySquareFoot).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -804,6 +808,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 m⁻²", new ReciprocalArea(0.123456, ReciprocalAreaUnit.InverseSquareMeter).ToString("s3")); Assert.Equal("0.1235 m⁻²", new ReciprocalArea(0.123456, ReciprocalAreaUnit.InverseSquareMeter).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ReciprocalLengthTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ReciprocalLengthTestsBase.g.cs index e4cab81185..e6a69dddfe 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ReciprocalLengthTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ReciprocalLengthTestsBase.g.cs @@ -971,6 +971,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 ftUS⁻¹", new ReciprocalLength(1, ReciprocalLengthUnit.InverseUsSurveyFoot).ToString()); Assert.Equal("1 yd⁻¹", new ReciprocalLength(1, ReciprocalLengthUnit.InverseYard).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1007,6 +1011,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 m⁻¹", new ReciprocalLength(0.123456, ReciprocalLengthUnit.InverseMeter).ToString("s3")); Assert.Equal("0.1235 m⁻¹", new ReciprocalLength(0.123456, ReciprocalLengthUnit.InverseMeter).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RelativeHumidityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RelativeHumidityTestsBase.g.cs index 65a79182c3..d0ac5a7483 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/RelativeHumidityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RelativeHumidityTestsBase.g.cs @@ -406,6 +406,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() try { Assert.Equal("1 %RH", new RelativeHumidity(1, RelativeHumidityUnit.Percent).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -433,6 +437,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 %RH", new RelativeHumidity(0.123456, RelativeHumidityUnit.Percent).ToString("s3")); Assert.Equal("0.1235 %RH", new RelativeHumidity(0.123456, RelativeHumidityUnit.Percent).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalAccelerationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalAccelerationTestsBase.g.cs index 8eb5dd95bd..31ab47f769 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalAccelerationTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalAccelerationTestsBase.g.cs @@ -539,6 +539,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 rpm/s", new RotationalAcceleration(1, RotationalAccelerationUnit.RevolutionPerMinutePerSecond).ToString()); Assert.Equal("1 r/s²", new RotationalAcceleration(1, RotationalAccelerationUnit.RevolutionPerSecondSquared).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -569,6 +573,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 rad/s²", new RotationalAcceleration(0.123456, RotationalAccelerationUnit.RadianPerSecondSquared).ToString("s3")); Assert.Equal("0.1235 rad/s²", new RotationalAcceleration(0.123456, RotationalAccelerationUnit.RadianPerSecondSquared).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalSpeedTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalSpeedTestsBase.g.cs index 3e01da2c3c..59d5f9d786 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalSpeedTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalSpeedTestsBase.g.cs @@ -1271,6 +1271,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 rpm", new RotationalSpeed(1, RotationalSpeedUnit.RevolutionPerMinute).ToString()); Assert.Equal("1 r/s", new RotationalSpeed(1, RotationalSpeedUnit.RevolutionPerSecond).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1310,6 +1314,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 rad/s", new RotationalSpeed(0.123456, RotationalSpeedUnit.RadianPerSecond).ToString("s3")); Assert.Equal("0.1235 rad/s", new RotationalSpeed(0.123456, RotationalSpeedUnit.RadianPerSecond).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessPerLengthTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessPerLengthTestsBase.g.cs index 3d4090c9fc..51692df30e 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessPerLengthTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessPerLengthTestsBase.g.cs @@ -743,6 +743,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 N·m/rad/m", new RotationalStiffnessPerLength(1, RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter).ToString()); Assert.Equal("1 lbf·ft/deg/ft", new RotationalStiffnessPerLength(1, RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -774,6 +778,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 N·m/rad/m", new RotationalStiffnessPerLength(0.123456, RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter).ToString("s3")); Assert.Equal("0.1235 N·m/rad/m", new RotationalStiffnessPerLength(0.123456, RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessTestsBase.g.cs index 95ae7f4ac0..fb51dd515c 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessTestsBase.g.cs @@ -3043,6 +3043,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 lbf·ft/rad", new RotationalStiffness(1, RotationalStiffnessUnit.PoundForceFeetPerRadian).ToString()); Assert.Equal("1 lbf·ft/deg", new RotationalStiffness(1, RotationalStiffnessUnit.PoundForceFootPerDegrees).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -3102,6 +3106,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 N·m/rad", new RotationalStiffness(0.123456, RotationalStiffnessUnit.NewtonMeterPerRadian).ToString("s3")); Assert.Equal("0.1235 N·m/rad", new RotationalStiffness(0.123456, RotationalStiffnessUnit.NewtonMeterPerRadian).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ScalarTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ScalarTestsBase.g.cs index 667e951d20..c241c6cc44 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ScalarTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ScalarTestsBase.g.cs @@ -406,6 +406,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() try { Assert.Equal("1", new Scalar(1, ScalarUnit.Amount).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -433,6 +437,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123", new Scalar(0.123456, ScalarUnit.Amount).ToString("s3")); Assert.Equal("0.1235", new Scalar(0.123456, ScalarUnit.Amount).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SolidAngleTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SolidAngleTestsBase.g.cs index 1a57021dd1..452636d635 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/SolidAngleTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SolidAngleTestsBase.g.cs @@ -406,6 +406,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() try { Assert.Equal("1 sr", new SolidAngle(1, SolidAngleUnit.Steradian).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -433,6 +437,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 sr", new SolidAngle(0.123456, SolidAngleUnit.Steradian).ToString("s3")); Assert.Equal("0.1235 sr", new SolidAngle(0.123456, SolidAngleUnit.Steradian).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEnergyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEnergyTestsBase.g.cs index 526c1562ab..2d364e9eb6 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEnergyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEnergyTestsBase.g.cs @@ -1451,6 +1451,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 Wh/kg", new SpecificEnergy(1, SpecificEnergyUnit.WattHourPerKilogram).ToString()); Assert.Equal("1 Wh/lbs", new SpecificEnergy(1, SpecificEnergyUnit.WattHourPerPound).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1507,6 +1511,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 J/kg", new SpecificEnergy(0.123456, SpecificEnergyUnit.JoulePerKilogram).ToString("s3")); Assert.Equal("0.1235 J/kg", new SpecificEnergy(0.123456, SpecificEnergyUnit.JoulePerKilogram).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEntropyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEntropyTestsBase.g.cs index de6e32957c..6b45474b75 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEntropyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEntropyTestsBase.g.cs @@ -719,6 +719,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 MJ/kg.C", new SpecificEntropy(1, SpecificEntropyUnit.MegajoulePerKilogramDegreeCelsius).ToString()); Assert.Equal("1 MJ/kg.K", new SpecificEntropy(1, SpecificEntropyUnit.MegajoulePerKilogramKelvin).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -754,6 +758,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 J/kg.K", new SpecificEntropy(0.123456, SpecificEntropyUnit.JoulePerKilogramKelvin).ToString("s3")); Assert.Equal("0.1235 J/kg.K", new SpecificEntropy(0.123456, SpecificEntropyUnit.JoulePerKilogramKelvin).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificFuelConsumptionTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificFuelConsumptionTestsBase.g.cs index 335e29195c..1ce005f300 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificFuelConsumptionTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificFuelConsumptionTestsBase.g.cs @@ -515,6 +515,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 kg/(kN�s)", new SpecificFuelConsumption(1, SpecificFuelConsumptionUnit.KilogramPerKiloNewtonSecond).ToString()); Assert.Equal("1 lb/(lbf·h)", new SpecificFuelConsumption(1, SpecificFuelConsumptionUnit.PoundMassPerPoundForceHour).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -545,6 +549,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 g/(kN�s)", new SpecificFuelConsumption(0.123456, SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond).ToString("s3")); Assert.Equal("0.1235 g/(kN�s)", new SpecificFuelConsumption(0.123456, SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificVolumeTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificVolumeTestsBase.g.cs index 5c412eb5d1..bbfb83c8c2 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificVolumeTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificVolumeTestsBase.g.cs @@ -479,6 +479,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 m³/kg", new SpecificVolume(1, SpecificVolumeUnit.CubicMeterPerKilogram).ToString()); Assert.Equal("1 mm³/kg", new SpecificVolume(1, SpecificVolumeUnit.MillicubicMeterPerKilogram).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -508,6 +512,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 m³/kg", new SpecificVolume(0.123456, SpecificVolumeUnit.CubicMeterPerKilogram).ToString("s3")); Assert.Equal("0.1235 m³/kg", new SpecificVolume(0.123456, SpecificVolumeUnit.CubicMeterPerKilogram).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificWeightTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificWeightTestsBase.g.cs index 73902e0057..817b4a7971 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificWeightTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificWeightTestsBase.g.cs @@ -983,6 +983,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 tf/m³", new SpecificWeight(1, SpecificWeightUnit.TonneForcePerCubicMeter).ToString()); Assert.Equal("1 tf/mm³", new SpecificWeight(1, SpecificWeightUnit.TonneForcePerCubicMillimeter).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1026,6 +1030,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 N/m³", new SpecificWeight(0.123456, SpecificWeightUnit.NewtonPerCubicMeter).ToString("s3")); Assert.Equal("0.1235 N/m³", new SpecificWeight(0.123456, SpecificWeightUnit.NewtonPerCubicMeter).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SpeedTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SpeedTestsBase.g.cs index 357eb87490..a8414daf62 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/SpeedTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SpeedTestsBase.g.cs @@ -2279,6 +2279,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 yd/min", new Speed(1, SpeedUnit.YardPerMinute).ToString()); Assert.Equal("1 yd/s", new Speed(1, SpeedUnit.YardPerSecond).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -2338,6 +2342,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 m/s", new Speed(0.123456, SpeedUnit.MeterPerSecond).ToString("s3")); Assert.Equal("0.1235 m/s", new Speed(0.123456, SpeedUnit.MeterPerSecond).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/StandardVolumeFlowTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/StandardVolumeFlowTestsBase.g.cs index 258a7ac849..f8a845e0d4 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/StandardVolumeFlowTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/StandardVolumeFlowTestsBase.g.cs @@ -695,6 +695,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 Sm³/s", new StandardVolumeFlow(1, StandardVolumeFlowUnit.StandardCubicMeterPerSecond).ToString()); Assert.Equal("1 slm", new StandardVolumeFlow(1, StandardVolumeFlowUnit.StandardLiterPerMinute).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -730,6 +734,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 Sm³/s", new StandardVolumeFlow(0.123456, StandardVolumeFlowUnit.StandardCubicMeterPerSecond).ToString("s3")); Assert.Equal("0.1235 Sm³/s", new StandardVolumeFlow(0.123456, StandardVolumeFlowUnit.StandardCubicMeterPerSecond).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureChangeRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureChangeRateTestsBase.g.cs index 446f5313ab..a9e555c173 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureChangeRateTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureChangeRateTestsBase.g.cs @@ -731,6 +731,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 m°C/s", new TemperatureChangeRate(1, TemperatureChangeRateUnit.MillidegreeCelsiusPerSecond).ToString()); Assert.Equal("1 n°C/s", new TemperatureChangeRate(1, TemperatureChangeRateUnit.NanodegreeCelsiusPerSecond).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -767,6 +771,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 °C/s", new TemperatureChangeRate(0.123456, TemperatureChangeRateUnit.DegreeCelsiusPerSecond).ToString("s3")); Assert.Equal("0.1235 °C/s", new TemperatureChangeRate(0.123456, TemperatureChangeRateUnit.DegreeCelsiusPerSecond).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureDeltaTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureDeltaTestsBase.g.cs index bb7f3fae98..d3743a28f6 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureDeltaTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureDeltaTestsBase.g.cs @@ -695,6 +695,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 ∆K", new TemperatureDelta(1, TemperatureDeltaUnit.Kelvin).ToString()); Assert.Equal("1 ∆m°C", new TemperatureDelta(1, TemperatureDeltaUnit.MillidegreeCelsius).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -730,6 +734,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 ∆K", new TemperatureDelta(0.123456, TemperatureDeltaUnit.Kelvin).ToString("s3")); Assert.Equal("0.1235 ∆K", new TemperatureDelta(0.123456, TemperatureDeltaUnit.Kelvin).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureGradientTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureGradientTestsBase.g.cs index 240e3b6d9e..11eb805ac8 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureGradientTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureGradientTestsBase.g.cs @@ -515,6 +515,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 ∆°F/ft", new TemperatureGradient(1, TemperatureGradientUnit.DegreeFahrenheitPerFoot).ToString()); Assert.Equal("1 ∆°K/m", new TemperatureGradient(1, TemperatureGradientUnit.KelvinPerMeter).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -545,6 +549,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 ∆°K/m", new TemperatureGradient(0.123456, TemperatureGradientUnit.KelvinPerMeter).ToString("s3")); Assert.Equal("0.1235 ∆°K/m", new TemperatureGradient(0.123456, TemperatureGradientUnit.KelvinPerMeter).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureTestsBase.g.cs index f513c3a776..fb997ee213 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureTestsBase.g.cs @@ -719,6 +719,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 m°C", new Temperature(1, TemperatureUnit.MillidegreeCelsius).ToString()); Assert.Equal("1 T⊙", new Temperature(1, TemperatureUnit.SolarTemperature).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -755,6 +759,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 K", new Temperature(0.123456, TemperatureUnit.Kelvin).ToString("s3")); Assert.Equal("0.1235 K", new Temperature(0.123456, TemperatureUnit.Kelvin).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalConductivityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalConductivityTestsBase.g.cs index 7e00226212..80ed621d80 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalConductivityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalConductivityTestsBase.g.cs @@ -443,6 +443,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 BTU/h·ft·°F", new ThermalConductivity(1, ThermalConductivityUnit.BtuPerHourFootFahrenheit).ToString()); Assert.Equal("1 W/m·K", new ThermalConductivity(1, ThermalConductivityUnit.WattPerMeterKelvin).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -471,6 +475,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 W/m·K", new ThermalConductivity(0.123456, ThermalConductivityUnit.WattPerMeterKelvin).ToString("s3")); Assert.Equal("0.1235 W/m·K", new ThermalConductivity(0.123456, ThermalConductivityUnit.WattPerMeterKelvin).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalResistanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalResistanceTestsBase.g.cs index eaa1621326..943bf3dcfd 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalResistanceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalResistanceTestsBase.g.cs @@ -587,6 +587,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 m²K/kW", new ThermalResistance(1, ThermalResistanceUnit.SquareMeterKelvinPerKilowatt).ToString()); Assert.Equal("1 m²K/W", new ThermalResistance(1, ThermalResistanceUnit.SquareMeterKelvinPerWatt).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -619,6 +623,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 m²K/kW", new ThermalResistance(0.123456, ThermalResistanceUnit.SquareMeterKelvinPerKilowatt).ToString("s3")); Assert.Equal("0.1235 m²K/kW", new ThermalResistance(0.123456, ThermalResistanceUnit.SquareMeterKelvinPerKilowatt).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/TorquePerLengthTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/TorquePerLengthTestsBase.g.cs index 1ff5eeb3a6..79b94edc71 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/TorquePerLengthTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/TorquePerLengthTestsBase.g.cs @@ -1199,6 +1199,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 tf·m/m", new TorquePerLength(1, TorquePerLengthUnit.TonneForceMeterPerMeter).ToString()); Assert.Equal("1 tf·mm/m", new TorquePerLength(1, TorquePerLengthUnit.TonneForceMillimeterPerMeter).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1246,6 +1250,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 N·m/m", new TorquePerLength(0.123456, TorquePerLengthUnit.NewtonMeterPerMeter).ToString("s3")); Assert.Equal("0.1235 N·m/m", new TorquePerLength(0.123456, TorquePerLengthUnit.NewtonMeterPerMeter).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/TorqueTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/TorqueTestsBase.g.cs index f7605bc1ba..27af07c59e 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/TorqueTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/TorqueTestsBase.g.cs @@ -1343,6 +1343,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 tf·m", new Torque(1, TorqueUnit.TonneForceMeter).ToString()); Assert.Equal("1 tf·mm", new Torque(1, TorqueUnit.TonneForceMillimeter).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1394,6 +1398,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 N·m", new Torque(0.123456, TorqueUnit.NewtonMeter).ToString("s3")); Assert.Equal("0.1235 N·m", new Torque(0.123456, TorqueUnit.NewtonMeter).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/TurbidityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/TurbidityTestsBase.g.cs index 953d5b5fa7..76c0404b87 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/TurbidityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/TurbidityTestsBase.g.cs @@ -406,6 +406,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() try { Assert.Equal("1 NTU", new Turbidity(1, TurbidityUnit.NTU).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -433,6 +437,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 NTU", new Turbidity(0.123456, TurbidityUnit.NTU).ToString("s3")); Assert.Equal("0.1235 NTU", new Turbidity(0.123456, TurbidityUnit.NTU).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VitaminATestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VitaminATestsBase.g.cs index 3b9a0dabad..c36d6ad5b6 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/VitaminATestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VitaminATestsBase.g.cs @@ -406,6 +406,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() try { Assert.Equal("1 IU", new VitaminA(1, VitaminAUnit.InternationalUnit).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -433,6 +437,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 IU", new VitaminA(0.123456, VitaminAUnit.InternationalUnit).ToString("s3")); Assert.Equal("0.1235 IU", new VitaminA(0.123456, VitaminAUnit.InternationalUnit).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeConcentrationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeConcentrationTestsBase.g.cs index 7fb476ac77..2ce8e79637 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeConcentrationTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeConcentrationTestsBase.g.cs @@ -1115,6 +1115,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 pL/L", new VolumeConcentration(1, VolumeConcentrationUnit.PicolitersPerLiter).ToString()); Assert.Equal("1 pL/mL", new VolumeConcentration(1, VolumeConcentrationUnit.PicolitersPerMililiter).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1161,6 +1165,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123", new VolumeConcentration(0.123456, VolumeConcentrationUnit.DecimalFraction).ToString("s3")); Assert.Equal("0.1235", new VolumeConcentration(0.123456, VolumeConcentrationUnit.DecimalFraction).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowPerAreaTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowPerAreaTestsBase.g.cs index d90dd054db..5aedeb3961 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowPerAreaTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowPerAreaTestsBase.g.cs @@ -443,6 +443,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 CFM/ft²", new VolumeFlowPerArea(1, VolumeFlowPerAreaUnit.CubicFootPerMinutePerSquareFoot).ToString()); Assert.Equal("1 m³/(s·m²)", new VolumeFlowPerArea(1, VolumeFlowPerAreaUnit.CubicMeterPerSecondPerSquareMeter).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -471,6 +475,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 m³/(s·m²)", new VolumeFlowPerArea(0.123456, VolumeFlowPerAreaUnit.CubicMeterPerSecondPerSquareMeter).ToString("s3")); Assert.Equal("0.1235 m³/(s·m²)", new VolumeFlowPerArea(0.123456, VolumeFlowPerAreaUnit.CubicMeterPerSecondPerSquareMeter).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowTestsBase.g.cs index 3e8bcbd0ab..bdfb551c8f 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowTestsBase.g.cs @@ -4265,6 +4265,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 gal (U.S.)/min", new VolumeFlow(1, VolumeFlowUnit.UsGallonPerMinute).ToString()); Assert.Equal("1 gal (U.S.)/s", new VolumeFlow(1, VolumeFlowUnit.UsGallonPerSecond).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -4353,6 +4357,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 m³/s", new VolumeFlow(0.123456, VolumeFlowUnit.CubicMeterPerSecond).ToString("s3")); Assert.Equal("0.1235 m³/s", new VolumeFlow(0.123456, VolumeFlowUnit.CubicMeterPerSecond).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumePerLengthTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumePerLengthTestsBase.g.cs index b61c9682b8..1b03d6c468 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumePerLengthTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumePerLengthTestsBase.g.cs @@ -623,6 +623,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 l/mm", new VolumePerLength(1, VolumePerLengthUnit.LiterPerMillimeter).ToString()); Assert.Equal("1 bbl/ft", new VolumePerLength(1, VolumePerLengthUnit.OilBarrelPerFoot).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -656,6 +660,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 m³/m", new VolumePerLength(0.123456, VolumePerLengthUnit.CubicMeterPerMeter).ToString("s3")); Assert.Equal("0.1235 m³/m", new VolumePerLength(0.123456, VolumePerLengthUnit.CubicMeterPerMeter).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeTestsBase.g.cs index ac9688785c..4552d00cfd 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeTestsBase.g.cs @@ -3299,6 +3299,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1", new Volume(1, VolumeUnit.UsTablespoon).ToString()); Assert.Equal("1", new Volume(1, VolumeUnit.UsTeaspoon).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -3378,6 +3382,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 m³", new Volume(0.123456, VolumeUnit.CubicMeter).ToString("s3")); Assert.Equal("0.1235 m³", new Volume(0.123456, VolumeUnit.CubicMeter).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumetricHeatCapacityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumetricHeatCapacityTestsBase.g.cs index 0f20f46ef8..c243266175 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumetricHeatCapacityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumetricHeatCapacityTestsBase.g.cs @@ -695,6 +695,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 MJ/m³·°C", new VolumetricHeatCapacity(1, VolumetricHeatCapacityUnit.MegajoulePerCubicMeterDegreeCelsius).ToString()); Assert.Equal("1 MJ/m³·K", new VolumetricHeatCapacity(1, VolumetricHeatCapacityUnit.MegajoulePerCubicMeterKelvin).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -730,6 +734,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 J/m³·K", new VolumetricHeatCapacity(0.123456, VolumetricHeatCapacityUnit.JoulePerCubicMeterKelvin).ToString("s3")); Assert.Equal("0.1235 J/m³·K", new VolumetricHeatCapacity(0.123456, VolumetricHeatCapacityUnit.JoulePerCubicMeterKelvin).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/WarpingMomentOfInertiaTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/WarpingMomentOfInertiaTestsBase.g.cs index 685163adee..6ae2479dfc 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/WarpingMomentOfInertiaTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/WarpingMomentOfInertiaTestsBase.g.cs @@ -731,6 +731,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 m⁶", new WarpingMomentOfInertia(1, WarpingMomentOfInertiaUnit.MeterToTheSixth).ToString()); Assert.Equal("1 mm⁶", new WarpingMomentOfInertia(1, WarpingMomentOfInertiaUnit.MillimeterToTheSixth).ToString()); } + catch + { + throw; + } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -763,6 +767,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 m⁶", new WarpingMomentOfInertia(0.123456, WarpingMomentOfInertiaUnit.MeterToTheSixth).ToString("s3")); Assert.Equal("0.1235 m⁶", new WarpingMomentOfInertia(0.123456, WarpingMomentOfInertiaUnit.MeterToTheSixth).ToString("s4")); } + catch + { + throw; + } finally { CultureInfo.CurrentCulture = oldCulture; From e2f1a4139ad7d635371308eaf06c39dbcd3487c1 Mon Sep 17 00:00:00 2001 From: Tristan Milnthorp Date: Tue, 21 Feb 2023 15:11:36 -0500 Subject: [PATCH 04/26] Gen + embed resources --- CodeGen/Generators/UnitsNetGenerator.cs | 6 +- .../Resources/Acceleration.en-US.restext | 14 +++++ .../Resources/AmountOfSubstance.en-US.restext | 15 +++++ .../Resources/AmplitudeRatio.en-US.restext | 4 ++ .../Resources/Angle.en-US.restext | 16 +++++ .../Resources/ApparentEnergy.en-US.restext | 3 + .../Resources/ApparentPower.en-US.restext | 6 ++ .../Resources/Area.en-US.restext | 14 +++++ .../Resources/AreaDensity.en-US.restext | 3 + .../AreaMomentOfInertia.en-US.restext | 6 ++ .../Resources/BitRate.en-US.restext | 26 ++++++++ ...BrakeSpecificFuelConsumption.en-US.restext | 3 + .../Resources/Capacitance.en-US.restext | 7 +++ ...oefficientOfThermalExpansion.en-US.restext | 3 + .../Resources/Compressibility.en-US.restext | 7 +++ .../Resources/Density.en-US.restext | 51 +++++++++++++++ .../Resources/Duration.en-US.restext | 11 ++++ .../Resources/DynamicViscosity.en-US.restext | 10 +++ .../ElectricAdmittance.en-US.restext | 4 ++ .../Resources/ElectricCharge.en-US.restext | 11 ++++ .../ElectricChargeDensity.en-US.restext | 1 + .../ElectricConductance.en-US.restext | 5 ++ .../ElectricConductivity.en-US.restext | 6 ++ .../Resources/ElectricCurrent.en-US.restext | 9 +++ .../ElectricCurrentDensity.en-US.restext | 3 + .../ElectricCurrentGradient.en-US.restext | 4 ++ .../Resources/ElectricField.en-US.restext | 1 + .../ElectricInductance.en-US.restext | 5 ++ .../Resources/ElectricPotential.en-US.restext | 6 ++ .../ElectricPotentialAc.en-US.restext | 5 ++ .../ElectricPotentialChangeRate.en-US.restext | 20 ++++++ .../ElectricPotentialDc.en-US.restext | 5 ++ .../ElectricResistance.en-US.restext | 7 +++ .../ElectricResistivity.en-US.restext | 14 +++++ ...ElectricSurfaceChargeDensity.en-US.restext | 3 + .../Resources/Energy.en-US.restext | 38 ++++++++++++ .../Resources/EnergyDensity.en-US.restext | 12 ++++ .../Resources/Entropy.en-US.restext | 7 +++ .../Resources/Force.en-US.restext | 15 +++++ .../Resources/ForceChangeRate.en-US.restext | 15 +++++ .../Resources/ForcePerLength.en-US.restext | 38 ++++++++++++ .../Resources/Frequency.en-US.restext | 13 ++++ .../Resources/FuelEfficiency.en-US.restext | 4 ++ .../Resources/HeatFlux.en-US.restext | 18 ++++++ .../HeatTransferCoefficient.en-US.restext | 6 ++ .../Resources/Illuminance.en-US.restext | 4 ++ .../Resources/Impulse.en-US.restext | 13 ++++ .../Resources/Information.en-US.restext | 26 ++++++++ .../Resources/Irradiance.en-US.restext | 14 +++++ .../Resources/Irradiation.en-US.restext | 7 +++ .../Resources/Jerk.en-US.restext | 11 ++++ .../KinematicViscosity.en-US.restext | 9 +++ .../Resources/Length.en-US.restext | 36 +++++++++++ .../Resources/Level.en-US.restext | 2 + .../Resources/LinearDensity.en-US.restext | 14 +++++ .../LinearPowerDensity.en-US.restext | 25 ++++++++ .../Resources/Luminance.en-US.restext | 10 +++ .../Resources/Luminosity.en-US.restext | 14 +++++ .../Resources/LuminousFlux.en-US.restext | 1 + .../Resources/LuminousIntensity.en-US.restext | 1 + .../Resources/MagneticField.en-US.restext | 6 ++ .../Resources/MagneticFlux.en-US.restext | 1 + .../Resources/Magnetization.en-US.restext | 1 + .../Resources/Mass.en-US.restext | 25 ++++++++ .../Resources/MassConcentration.en-US.restext | 49 +++++++++++++++ .../Resources/MassFlow.en-US.restext | 33 ++++++++++ .../Resources/MassFlux.en-US.restext | 12 ++++ .../Resources/MassFraction.en-US.restext | 24 +++++++ .../MassMomentOfInertia.en-US.restext | 28 +++++++++ .../Resources/MolarEnergy.en-US.restext | 3 + .../Resources/MolarEntropy.en-US.restext | 3 + .../Resources/MolarFlow.en-US.restext | 9 +++ .../Resources/MolarMass.en-US.restext | 13 ++++ .../Resources/Molarity.en-US.restext | 11 ++++ .../Resources/Permeability.en-US.restext | 1 + .../Resources/Permittivity.en-US.restext | 1 + .../PorousMediumPermeability.en-US.restext | 5 ++ .../Resources/Power.en-US.restext | 26 ++++++++ .../Resources/PowerDensity.en-US.restext | 44 +++++++++++++ .../Resources/PowerRatio.en-US.restext | 2 + .../Resources/Pressure.en-US.restext | 47 ++++++++++++++ .../PressureChangeRate.en-US.restext | 14 +++++ .../Resources/Ratio.en-US.restext | 6 ++ .../Resources/RatioChangeRate.en-US.restext | 2 + .../Resources/ReactiveEnergy.en-US.restext | 3 + .../Resources/ReactivePower.en-US.restext | 4 ++ .../Resources/ReciprocalArea.en-US.restext | 11 ++++ .../Resources/ReciprocalLength.en-US.restext | 10 +++ .../Resources/RelativeHumidity.en-US.restext | 1 + .../RotationalAcceleration.en-US.restext | 4 ++ .../Resources/RotationalSpeed.en-US.restext | 13 ++++ .../RotationalStiffness.en-US.restext | 33 ++++++++++ ...RotationalStiffnessPerLength.en-US.restext | 5 ++ .../Resources/Scalar.en-US.restext | 1 + .../Resources/SolidAngle.en-US.restext | 1 + .../Resources/SpecificEnergy.en-US.restext | 30 +++++++++ .../Resources/SpecificEntropy.en-US.restext | 9 +++ .../SpecificFuelConsumption.en-US.restext | 4 ++ .../Resources/SpecificVolume.en-US.restext | 3 + .../Resources/SpecificWeight.en-US.restext | 17 +++++ .../Resources/Speed.en-US.restext | 33 ++++++++++ .../StandardVolumeFlow.en-US.restext | 9 +++ .../Resources/Temperature.en-US.restext | 10 +++ .../TemperatureChangeRate.en-US.restext | 10 +++ .../Resources/TemperatureDelta.en-US.restext | 9 +++ .../TemperatureGradient.en-US.restext | 4 ++ .../ThermalConductivity.en-US.restext | 2 + .../Resources/ThermalResistance.en-US.restext | 6 ++ .../Resources/Torque.en-US.restext | 25 ++++++++ .../Resources/TorquePerLength.en-US.restext | 21 +++++++ .../Resources/Turbidity.en-US.restext | 1 + .../Resources/VitaminA.en-US.restext | 1 + .../Resources/Volume.en-US.restext | 46 ++++++++++++++ .../VolumeConcentration.en-US.restext | 20 ++++++ .../Resources/VolumeFlow.en-US.restext | 62 +++++++++++++++++++ .../Resources/VolumeFlowPerArea.en-US.restext | 2 + .../Resources/VolumePerLength.en-US.restext | 7 +++ .../VolumetricHeatCapacity.en-US.restext | 9 +++ .../WarpingMomentOfInertia.en-US.restext | 6 ++ UnitsNet/UnitsNet.csproj | 2 +- 120 files changed, 1461 insertions(+), 6 deletions(-) create mode 100644 UnitsNet/GeneratedCode/Resources/Acceleration.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/AmountOfSubstance.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/AmplitudeRatio.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Angle.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ApparentEnergy.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ApparentPower.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Area.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/AreaDensity.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/AreaMomentOfInertia.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/BitRate.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/BrakeSpecificFuelConsumption.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Capacitance.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/CoefficientOfThermalExpansion.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Compressibility.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Density.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Duration.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/DynamicViscosity.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ElectricAdmittance.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ElectricCharge.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ElectricChargeDensity.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ElectricConductance.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ElectricConductivity.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ElectricCurrent.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ElectricCurrentDensity.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ElectricCurrentGradient.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ElectricField.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ElectricInductance.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ElectricPotential.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ElectricPotentialAc.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ElectricPotentialChangeRate.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ElectricPotentialDc.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ElectricResistance.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ElectricResistivity.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ElectricSurfaceChargeDensity.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Energy.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/EnergyDensity.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Entropy.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Force.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ForceChangeRate.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ForcePerLength.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Frequency.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/FuelEfficiency.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/HeatFlux.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/HeatTransferCoefficient.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Illuminance.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Impulse.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Information.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Irradiance.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Irradiation.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Jerk.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/KinematicViscosity.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Length.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Level.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/LinearDensity.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/LinearPowerDensity.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Luminance.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Luminosity.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/LuminousFlux.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/LuminousIntensity.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/MagneticField.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/MagneticFlux.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Magnetization.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Mass.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/MassConcentration.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/MassFlow.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/MassFlux.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/MassFraction.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/MassMomentOfInertia.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/MolarEnergy.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/MolarEntropy.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/MolarFlow.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/MolarMass.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Molarity.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Permeability.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Permittivity.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/PorousMediumPermeability.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Power.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/PowerDensity.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/PowerRatio.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Pressure.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/PressureChangeRate.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Ratio.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/RatioChangeRate.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ReactiveEnergy.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ReactivePower.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ReciprocalArea.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ReciprocalLength.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/RelativeHumidity.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/RotationalAcceleration.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/RotationalSpeed.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/RotationalStiffness.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/RotationalStiffnessPerLength.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Scalar.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/SolidAngle.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/SpecificEnergy.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/SpecificEntropy.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/SpecificFuelConsumption.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/SpecificVolume.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/SpecificWeight.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Speed.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/StandardVolumeFlow.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Temperature.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/TemperatureChangeRate.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/TemperatureDelta.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/TemperatureGradient.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ThermalConductivity.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/ThermalResistance.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Torque.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/TorquePerLength.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Turbidity.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/VitaminA.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/Volume.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/VolumeConcentration.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/VolumeFlow.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/VolumeFlowPerArea.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/VolumePerLength.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/VolumetricHeatCapacity.en-US.restext create mode 100644 UnitsNet/GeneratedCode/Resources/WarpingMomentOfInertia.en-US.restext diff --git a/CodeGen/Generators/UnitsNetGenerator.cs b/CodeGen/Generators/UnitsNetGenerator.cs index cb471cc840..9bcdc247a1 100644 --- a/CodeGen/Generators/UnitsNetGenerator.cs +++ b/CodeGen/Generators/UnitsNetGenerator.cs @@ -149,11 +149,7 @@ private static void GenerateResourceFiles(Quantity[] quantities, string resource foreach(var culture in cultures) { - var fileName = culture.Equals("en-US", System.StringComparison.InvariantCultureIgnoreCase) ? - $"{resourcesDirectory}/{quantity.Name}.restext" : - $"{resourcesDirectory}/{quantity.Name}.{culture}.restext"; - - using var writer = File.CreateText(fileName); + using var writer = File.CreateText($"{resourcesDirectory}/{quantity.Name}.{culture}.restext"); foreach(Unit unit in quantity.Units) { diff --git a/UnitsNet/GeneratedCode/Resources/Acceleration.en-US.restext b/UnitsNet/GeneratedCode/Resources/Acceleration.en-US.restext new file mode 100644 index 0000000000..839031b259 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Acceleration.en-US.restext @@ -0,0 +1,14 @@ +CentimeterPerSecondSquared = ("cm/s²") +DecimeterPerSecondSquared = ("dm/s²") +FootPerSecondSquared = ("ft/s²") +InchPerSecondSquared = ("in/s²") +KilometerPerSecondSquared = ("km/s²") +KnotPerHour = ("kn/h") +KnotPerMinute = ("kn/min") +KnotPerSecond = ("kn/s") +MeterPerSecondSquared = ("m/s²") +MicrometerPerSecondSquared = ("µm/s²") +MillimeterPerSecondSquared = ("mm/s²") +MillistandardGravity = ("mg") +NanometerPerSecondSquared = ("nm/s²") +StandardGravity = ("g") diff --git a/UnitsNet/GeneratedCode/Resources/AmountOfSubstance.en-US.restext b/UnitsNet/GeneratedCode/Resources/AmountOfSubstance.en-US.restext new file mode 100644 index 0000000000..55ac260539 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/AmountOfSubstance.en-US.restext @@ -0,0 +1,15 @@ +Centimole = ("cmol") +CentipoundMole = ("clbmol") +Decimole = ("dmol") +DecipoundMole = ("dlbmol") +Kilomole = ("kmol") +KilopoundMole = ("klbmol") +Megamole = ("Mmol") +Micromole = ("µmol") +MicropoundMole = ("µlbmol") +Millimole = ("mmol") +MillipoundMole = ("mlbmol") +Mole = ("mol") +Nanomole = ("nmol") +NanopoundMole = ("nlbmol") +PoundMole = ("lbmol") diff --git a/UnitsNet/GeneratedCode/Resources/AmplitudeRatio.en-US.restext b/UnitsNet/GeneratedCode/Resources/AmplitudeRatio.en-US.restext new file mode 100644 index 0000000000..e3ded2c5e9 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/AmplitudeRatio.en-US.restext @@ -0,0 +1,4 @@ +DecibelMicrovolt = ("dBµV") +DecibelMillivolt = ("dBmV") +DecibelUnloaded = ("dBu") +DecibelVolt = ("dBV") diff --git a/UnitsNet/GeneratedCode/Resources/Angle.en-US.restext b/UnitsNet/GeneratedCode/Resources/Angle.en-US.restext new file mode 100644 index 0000000000..662a021af6 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Angle.en-US.restext @@ -0,0 +1,16 @@ +Arcminute = ("'", "arcmin", "amin", "min") +Arcsecond = ("″", "arcsec", "asec", "sec") +Centiradian = ("crad") +Deciradian = ("drad") +Degree = ("°", "deg") +Gradian = ("g") +Microdegree = ("µ°", "µdeg") +Microradian = ("µrad") +Millidegree = ("m°", "mdeg") +Milliradian = ("mrad") +Nanodegree = ("n°", "ndeg") +Nanoradian = ("nrad") +NatoMil = ("mil") +Radian = ("rad") +Revolution = ("r") +Tilt = ("sin(θ)") diff --git a/UnitsNet/GeneratedCode/Resources/ApparentEnergy.en-US.restext b/UnitsNet/GeneratedCode/Resources/ApparentEnergy.en-US.restext new file mode 100644 index 0000000000..c4fde5196b --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ApparentEnergy.en-US.restext @@ -0,0 +1,3 @@ +KilovoltampereHour = ("kVAh") +MegavoltampereHour = ("MVAh") +VoltampereHour = ("VAh") diff --git a/UnitsNet/GeneratedCode/Resources/ApparentPower.en-US.restext b/UnitsNet/GeneratedCode/Resources/ApparentPower.en-US.restext new file mode 100644 index 0000000000..cc05dd136d --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ApparentPower.en-US.restext @@ -0,0 +1,6 @@ +Gigavoltampere = ("GVA") +Kilovoltampere = ("kVA") +Megavoltampere = ("MVA") +Microvoltampere = ("µVA") +Millivoltampere = ("mVA") +Voltampere = ("VA") diff --git a/UnitsNet/GeneratedCode/Resources/Area.en-US.restext b/UnitsNet/GeneratedCode/Resources/Area.en-US.restext new file mode 100644 index 0000000000..e28966f1a1 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Area.en-US.restext @@ -0,0 +1,14 @@ +Acre = ("ac") +Hectare = ("ha") +SquareCentimeter = ("cm²") +SquareDecimeter = ("dm²") +SquareFoot = ("ft²") +SquareInch = ("in²") +SquareKilometer = ("km²") +SquareMeter = ("m²") +SquareMicrometer = ("µm²") +SquareMile = ("mi²") +SquareMillimeter = ("mm²") +SquareNauticalMile = ("nmi²") +SquareYard = ("yd²") +UsSurveySquareFoot = ("ft² (US)") diff --git a/UnitsNet/GeneratedCode/Resources/AreaDensity.en-US.restext b/UnitsNet/GeneratedCode/Resources/AreaDensity.en-US.restext new file mode 100644 index 0000000000..9c093db370 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/AreaDensity.en-US.restext @@ -0,0 +1,3 @@ +GramPerSquareMeter = ("g/m²", "gsm") +KilogramPerSquareMeter = ("kg/m²") +MilligramPerSquareMeter = ("mg/m²") diff --git a/UnitsNet/GeneratedCode/Resources/AreaMomentOfInertia.en-US.restext b/UnitsNet/GeneratedCode/Resources/AreaMomentOfInertia.en-US.restext new file mode 100644 index 0000000000..4da508257c --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/AreaMomentOfInertia.en-US.restext @@ -0,0 +1,6 @@ +CentimeterToTheFourth = ("cm⁴", "cm^4") +DecimeterToTheFourth = ("dm⁴", "dm^4") +FootToTheFourth = ("ft⁴", "ft^4") +InchToTheFourth = ("in⁴", "in^4") +MeterToTheFourth = ("m⁴", "m^4") +MillimeterToTheFourth = ("mm⁴", "mm^4") diff --git a/UnitsNet/GeneratedCode/Resources/BitRate.en-US.restext b/UnitsNet/GeneratedCode/Resources/BitRate.en-US.restext new file mode 100644 index 0000000000..c4b4da3300 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/BitRate.en-US.restext @@ -0,0 +1,26 @@ +BitPerSecond = ("bit/s", "bps") +BytePerSecond = ("B/s") +ExabitPerSecond = ("Ebit/s", "Ebps") +ExabytePerSecond = ("EB/s") +ExbibitPerSecond = ("Eibit/s", "Eibps") +ExbibytePerSecond = ("EiB/s") +GibibitPerSecond = ("Gibit/s", "Gibps") +GibibytePerSecond = ("GiB/s") +GigabitPerSecond = ("Gbit/s", "Gbps") +GigabytePerSecond = ("GB/s") +KibibitPerSecond = ("Kibit/s", "Kibps") +KibibytePerSecond = ("KiB/s") +KilobitPerSecond = ("kbit/s", "kbps") +KilobytePerSecond = ("kB/s") +MebibitPerSecond = ("Mibit/s", "Mibps") +MebibytePerSecond = ("MiB/s") +MegabitPerSecond = ("Mbit/s", "Mbps") +MegabytePerSecond = ("MB/s") +PebibitPerSecond = ("Pibit/s", "Pibps") +PebibytePerSecond = ("PiB/s") +PetabitPerSecond = ("Pbit/s", "Pbps") +PetabytePerSecond = ("PB/s") +TebibitPerSecond = ("Tibit/s", "Tibps") +TebibytePerSecond = ("TiB/s") +TerabitPerSecond = ("Tbit/s", "Tbps") +TerabytePerSecond = ("TB/s") diff --git a/UnitsNet/GeneratedCode/Resources/BrakeSpecificFuelConsumption.en-US.restext b/UnitsNet/GeneratedCode/Resources/BrakeSpecificFuelConsumption.en-US.restext new file mode 100644 index 0000000000..a5136686d1 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/BrakeSpecificFuelConsumption.en-US.restext @@ -0,0 +1,3 @@ +GramPerKiloWattHour = ("g/kWh") +KilogramPerJoule = ("kg/J") +PoundPerMechanicalHorsepowerHour = ("lb/hph") diff --git a/UnitsNet/GeneratedCode/Resources/Capacitance.en-US.restext b/UnitsNet/GeneratedCode/Resources/Capacitance.en-US.restext new file mode 100644 index 0000000000..3473746d2b --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Capacitance.en-US.restext @@ -0,0 +1,7 @@ +Farad = ("F") +Kilofarad = ("kF") +Megafarad = ("MF") +Microfarad = ("µF") +Millifarad = ("mF") +Nanofarad = ("nF") +Picofarad = ("pF") diff --git a/UnitsNet/GeneratedCode/Resources/CoefficientOfThermalExpansion.en-US.restext b/UnitsNet/GeneratedCode/Resources/CoefficientOfThermalExpansion.en-US.restext new file mode 100644 index 0000000000..224a759b95 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/CoefficientOfThermalExpansion.en-US.restext @@ -0,0 +1,3 @@ +InverseDegreeCelsius = ("°C⁻¹", "1/°C") +InverseDegreeFahrenheit = ("°F⁻¹", "1/°F") +InverseKelvin = ("K⁻¹", "1/K") diff --git a/UnitsNet/GeneratedCode/Resources/Compressibility.en-US.restext b/UnitsNet/GeneratedCode/Resources/Compressibility.en-US.restext new file mode 100644 index 0000000000..00697a6828 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Compressibility.en-US.restext @@ -0,0 +1,7 @@ +InverseAtmosphere = ("atm⁻¹", "1/atm") +InverseBar = ("bar⁻¹", "1/bar") +InverseKilopascal = ("kPa⁻¹", "1/kPa") +InverseMegapascal = ("MPa⁻¹", "1/MPa") +InverseMillibar = ("mbar⁻¹", "1/mbar") +InversePascal = ("Pa⁻¹", "1/Pa") +InversePoundForcePerSquareInch = ("psi⁻¹", "1/psi") diff --git a/UnitsNet/GeneratedCode/Resources/Density.en-US.restext b/UnitsNet/GeneratedCode/Resources/Density.en-US.restext new file mode 100644 index 0000000000..026deadb6e --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Density.en-US.restext @@ -0,0 +1,51 @@ +CentigramPerDeciliter = ("cg/dl") +CentigramPerLiter = ("cg/L") +CentigramPerMilliliter = ("cg/ml") +DecigramPerDeciliter = ("dg/dl") +DecigramPerLiter = ("dg/L") +DecigramPerMilliliter = ("dg/ml") +GramPerCubicCentimeter = ("g/cm³") +GramPerCubicFoot = ("g/ft³") +GramPerCubicInch = ("g/in³") +GramPerCubicMeter = ("g/m³") +GramPerCubicMillimeter = ("g/mm³") +GramPerDeciliter = ("g/dl") +GramPerLiter = ("g/L") +GramPerMilliliter = ("g/ml") +KilogramPerCubicCentimeter = ("kg/cm³") +KilogramPerCubicMeter = ("kg/m³") +KilogramPerCubicMillimeter = ("kg/mm³") +KilogramPerLiter = ("kg/l") +KilopoundPerCubicFoot = ("kip/ft³") +KilopoundPerCubicInch = ("kip/in³") +MicrogramPerCubicMeter = ("µg/m³") +MicrogramPerDeciliter = ("µg/dl") +MicrogramPerLiter = ("µg/L") +MicrogramPerMilliliter = ("µg/ml") +MilligramPerCubicMeter = ("mg/m³") +MilligramPerDeciliter = ("mg/dl") +MilligramPerLiter = ("mg/L") +MilligramPerMilliliter = ("mg/ml") +NanogramPerDeciliter = ("ng/dl") +NanogramPerLiter = ("ng/L") +NanogramPerMilliliter = ("ng/ml") +PicogramPerDeciliter = ("pg/dl") +PicogramPerLiter = ("pg/L") +PicogramPerMilliliter = ("pg/ml") +PoundPerCubicCentimeter = ("lb/cm³") +PoundPerCubicFoot = ("lb/ft³") +PoundPerCubicInch = ("lb/in³") +PoundPerCubicMeter = ("lb/m³") +PoundPerCubicMillimeter = ("lb/mm³") +PoundPerImperialGallon = ("ppg (imp.)") +PoundPerUSGallon = ("ppg (U.S.)") +SlugPerCubicCentimeter = ("slug/cm³") +SlugPerCubicFoot = ("slug/ft³") +SlugPerCubicInch = ("slug/in³") +SlugPerCubicMeter = ("slug/m³") +SlugPerCubicMillimeter = ("slug/mm³") +TonnePerCubicCentimeter = ("t/cm³") +TonnePerCubicFoot = ("t/ft³") +TonnePerCubicInch = ("t/in³") +TonnePerCubicMeter = ("t/m³") +TonnePerCubicMillimeter = ("t/mm³") diff --git a/UnitsNet/GeneratedCode/Resources/Duration.en-US.restext b/UnitsNet/GeneratedCode/Resources/Duration.en-US.restext new file mode 100644 index 0000000000..14c7e05261 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Duration.en-US.restext @@ -0,0 +1,11 @@ +Day = ("d", "day", "days") +Hour = ("h", "hr", "hrs", "hour", "hours") +JulianYear = ("jyr", "jyear", "jyears") +Microsecond = ("µs", "µsec", "µsecs", "µsecond", "µseconds") +Millisecond = ("ms", "msec", "msecs", "msecond", "mseconds") +Minute = ("m", "min", "minute", "minutes") +Month30 = ("mo", "month", "months") +Nanosecond = ("ns", "nsec", "nsecs", "nsecond", "nseconds") +Second = ("s", "sec", "secs", "second", "seconds") +Week = ("wk", "week", "weeks") +Year365 = ("yr", "year", "years") diff --git a/UnitsNet/GeneratedCode/Resources/DynamicViscosity.en-US.restext b/UnitsNet/GeneratedCode/Resources/DynamicViscosity.en-US.restext new file mode 100644 index 0000000000..9c42b8ab55 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/DynamicViscosity.en-US.restext @@ -0,0 +1,10 @@ +Centipoise = ("cP") +MicropascalSecond = ("µPa·s", "µPaS") +MillipascalSecond = ("mPa·s", "mPaS") +NewtonSecondPerMeterSquared = ("Ns/m²") +PascalSecond = ("Pa·s", "PaS") +Poise = ("P") +PoundForceSecondPerSquareFoot = ("lbf·s/ft²") +PoundForceSecondPerSquareInch = ("lbf·s/in²") +PoundPerFootSecond = ("lb/ft·s") +Reyn = ("reyn") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricAdmittance.en-US.restext b/UnitsNet/GeneratedCode/Resources/ElectricAdmittance.en-US.restext new file mode 100644 index 0000000000..177f246394 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricAdmittance.en-US.restext @@ -0,0 +1,4 @@ +Microsiemens = ("µS") +Millisiemens = ("mS") +Nanosiemens = ("nS") +Siemens = ("S") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricCharge.en-US.restext b/UnitsNet/GeneratedCode/Resources/ElectricCharge.en-US.restext new file mode 100644 index 0000000000..4bd0d8eb7e --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricCharge.en-US.restext @@ -0,0 +1,11 @@ +AmpereHour = ("A-h", "Ah") +Coulomb = ("C") +KiloampereHour = ("kA-h", "kAh") +Kilocoulomb = ("kC") +MegaampereHour = ("MA-h", "MAh") +Megacoulomb = ("MC") +Microcoulomb = ("µC") +MilliampereHour = ("mA-h", "mAh") +Millicoulomb = ("mC") +Nanocoulomb = ("nC") +Picocoulomb = ("pC") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricChargeDensity.en-US.restext b/UnitsNet/GeneratedCode/Resources/ElectricChargeDensity.en-US.restext new file mode 100644 index 0000000000..1f5d7b5aeb --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricChargeDensity.en-US.restext @@ -0,0 +1 @@ +CoulombPerCubicMeter = ("C/m³") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricConductance.en-US.restext b/UnitsNet/GeneratedCode/Resources/ElectricConductance.en-US.restext new file mode 100644 index 0000000000..0c8ecb72fa --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricConductance.en-US.restext @@ -0,0 +1,5 @@ +Kilosiemens = ("kS") +Microsiemens = ("µS") +Millisiemens = ("mS") +Nanosiemens = ("nS") +Siemens = ("S") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricConductivity.en-US.restext b/UnitsNet/GeneratedCode/Resources/ElectricConductivity.en-US.restext new file mode 100644 index 0000000000..617677f93b --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricConductivity.en-US.restext @@ -0,0 +1,6 @@ +MicrosiemensPerCentimeter = ("µS/cm") +MillisiemensPerCentimeter = ("mS/cm") +SiemensPerCentimeter = ("S/cm") +SiemensPerFoot = ("S/ft") +SiemensPerInch = ("S/in") +SiemensPerMeter = ("S/m") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricCurrent.en-US.restext b/UnitsNet/GeneratedCode/Resources/ElectricCurrent.en-US.restext new file mode 100644 index 0000000000..1dceb800c5 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricCurrent.en-US.restext @@ -0,0 +1,9 @@ +Ampere = ("A") +Centiampere = ("cA") +Femtoampere = ("fA") +Kiloampere = ("kA") +Megaampere = ("MA") +Microampere = ("µA") +Milliampere = ("mA") +Nanoampere = ("nA") +Picoampere = ("pA") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricCurrentDensity.en-US.restext b/UnitsNet/GeneratedCode/Resources/ElectricCurrentDensity.en-US.restext new file mode 100644 index 0000000000..f40dcf9f92 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricCurrentDensity.en-US.restext @@ -0,0 +1,3 @@ +AmperePerSquareFoot = ("A/ft²") +AmperePerSquareInch = ("A/in²") +AmperePerSquareMeter = ("A/m²") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricCurrentGradient.en-US.restext b/UnitsNet/GeneratedCode/Resources/ElectricCurrentGradient.en-US.restext new file mode 100644 index 0000000000..8f67335ebe --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricCurrentGradient.en-US.restext @@ -0,0 +1,4 @@ +AmperePerMicrosecond = ("A/μs") +AmperePerMillisecond = ("A/ms") +AmperePerNanosecond = ("A/ns") +AmperePerSecond = ("A/s") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricField.en-US.restext b/UnitsNet/GeneratedCode/Resources/ElectricField.en-US.restext new file mode 100644 index 0000000000..0dfc0439fa --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricField.en-US.restext @@ -0,0 +1 @@ +VoltPerMeter = ("V/m") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricInductance.en-US.restext b/UnitsNet/GeneratedCode/Resources/ElectricInductance.en-US.restext new file mode 100644 index 0000000000..6fb8faacb9 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricInductance.en-US.restext @@ -0,0 +1,5 @@ +Henry = ("H") +Microhenry = ("µH") +Millihenry = ("mH") +Nanohenry = ("nH") +Picohenry = ("pH") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricPotential.en-US.restext b/UnitsNet/GeneratedCode/Resources/ElectricPotential.en-US.restext new file mode 100644 index 0000000000..f2e198b00b --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricPotential.en-US.restext @@ -0,0 +1,6 @@ +Kilovolt = ("kV") +Megavolt = ("MV") +Microvolt = ("µV") +Millivolt = ("mV") +Nanovolt = ("nV") +Volt = ("V") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricPotentialAc.en-US.restext b/UnitsNet/GeneratedCode/Resources/ElectricPotentialAc.en-US.restext new file mode 100644 index 0000000000..3e245cf3eb --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricPotentialAc.en-US.restext @@ -0,0 +1,5 @@ +KilovoltAc = ("kVac") +MegavoltAc = ("MVac") +MicrovoltAc = ("µVac") +MillivoltAc = ("mVac") +VoltAc = ("Vac") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricPotentialChangeRate.en-US.restext b/UnitsNet/GeneratedCode/Resources/ElectricPotentialChangeRate.en-US.restext new file mode 100644 index 0000000000..20638248fe --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricPotentialChangeRate.en-US.restext @@ -0,0 +1,20 @@ +KilovoltPerHour = ("kV/h") +KilovoltPerMicrosecond = ("kV/μs") +KilovoltPerMinute = ("kV/min") +KilovoltPerSecond = ("kV/s") +MegavoltPerHour = ("MV/h") +MegavoltPerMicrosecond = ("MV/μs") +MegavoltPerMinute = ("MV/min") +MegavoltPerSecond = ("MV/s") +MicrovoltPerHour = ("µV/h") +MicrovoltPerMicrosecond = ("µV/μs") +MicrovoltPerMinute = ("µV/min") +MicrovoltPerSecond = ("µV/s") +MillivoltPerHour = ("mV/h") +MillivoltPerMicrosecond = ("mV/μs") +MillivoltPerMinute = ("mV/min") +MillivoltPerSecond = ("mV/s") +VoltPerHour = ("V/h") +VoltPerMicrosecond = ("V/μs") +VoltPerMinute = ("V/min") +VoltPerSecond = ("V/s") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricPotentialDc.en-US.restext b/UnitsNet/GeneratedCode/Resources/ElectricPotentialDc.en-US.restext new file mode 100644 index 0000000000..0292b3502d --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricPotentialDc.en-US.restext @@ -0,0 +1,5 @@ +KilovoltDc = ("kVdc") +MegavoltDc = ("MVdc") +MicrovoltDc = ("µVdc") +MillivoltDc = ("mVdc") +VoltDc = ("Vdc") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricResistance.en-US.restext b/UnitsNet/GeneratedCode/Resources/ElectricResistance.en-US.restext new file mode 100644 index 0000000000..a94cfc713d --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricResistance.en-US.restext @@ -0,0 +1,7 @@ +Gigaohm = ("GΩ") +Kiloohm = ("kΩ") +Megaohm = ("MΩ") +Microohm = ("µΩ") +Milliohm = ("mΩ") +Ohm = ("Ω") +Teraohm = ("TΩ") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricResistivity.en-US.restext b/UnitsNet/GeneratedCode/Resources/ElectricResistivity.en-US.restext new file mode 100644 index 0000000000..fcc319d411 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricResistivity.en-US.restext @@ -0,0 +1,14 @@ +KiloohmCentimeter = ("kΩ·cm") +KiloohmMeter = ("kΩ·m") +MegaohmCentimeter = ("MΩ·cm") +MegaohmMeter = ("MΩ·m") +MicroohmCentimeter = ("µΩ·cm") +MicroohmMeter = ("µΩ·m") +MilliohmCentimeter = ("mΩ·cm") +MilliohmMeter = ("mΩ·m") +NanoohmCentimeter = ("nΩ·cm") +NanoohmMeter = ("nΩ·m") +OhmCentimeter = ("Ω·cm") +OhmMeter = ("Ω·m") +PicoohmCentimeter = ("pΩ·cm") +PicoohmMeter = ("pΩ·m") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricSurfaceChargeDensity.en-US.restext b/UnitsNet/GeneratedCode/Resources/ElectricSurfaceChargeDensity.en-US.restext new file mode 100644 index 0000000000..242843ed23 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricSurfaceChargeDensity.en-US.restext @@ -0,0 +1,3 @@ +CoulombPerSquareCentimeter = ("C/cm²") +CoulombPerSquareInch = ("C/in²") +CoulombPerSquareMeter = ("C/m²") diff --git a/UnitsNet/GeneratedCode/Resources/Energy.en-US.restext b/UnitsNet/GeneratedCode/Resources/Energy.en-US.restext new file mode 100644 index 0000000000..4591938a1d --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Energy.en-US.restext @@ -0,0 +1,38 @@ +BritishThermalUnit = ("BTU") +Calorie = ("cal") +DecathermEc = ("Dth (E.C.)") +DecathermImperial = ("Dth (imp.)") +DecathermUs = ("Dth (U.S.)") +ElectronVolt = ("eV") +Erg = ("erg") +FootPound = ("ft·lb") +GigabritishThermalUnit = ("GBTU") +GigaelectronVolt = ("GeV") +Gigajoule = ("GJ") +GigawattDay = ("GWd") +GigawattHour = ("GWh") +HorsepowerHour = ("hp·h") +Joule = ("J") +KilobritishThermalUnit = ("kBTU") +Kilocalorie = ("kcal") +KiloelectronVolt = ("keV") +Kilojoule = ("kJ") +KilowattDay = ("kWd") +KilowattHour = ("kWh") +MegabritishThermalUnit = ("MBTU") +Megacalorie = ("Mcal") +MegaelectronVolt = ("MeV") +Megajoule = ("MJ") +MegawattDay = ("MWd") +MegawattHour = ("MWh") +Millijoule = ("mJ") +Petajoule = ("PJ") +TeraelectronVolt = ("TeV") +Terajoule = ("TJ") +TerawattDay = ("TWd") +TerawattHour = ("TWh") +ThermEc = ("th (E.C.)") +ThermImperial = ("th (imp.)") +ThermUs = ("th (U.S.)") +WattDay = ("Wd") +WattHour = ("Wh") diff --git a/UnitsNet/GeneratedCode/Resources/EnergyDensity.en-US.restext b/UnitsNet/GeneratedCode/Resources/EnergyDensity.en-US.restext new file mode 100644 index 0000000000..71eb151665 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/EnergyDensity.en-US.restext @@ -0,0 +1,12 @@ +GigajoulePerCubicMeter = ("GJ/m³") +GigawattHourPerCubicMeter = ("GWh/m³") +JoulePerCubicMeter = ("J/m³") +KilojoulePerCubicMeter = ("kJ/m³") +KilowattHourPerCubicMeter = ("kWh/m³") +MegajoulePerCubicMeter = ("MJ/m³") +MegawattHourPerCubicMeter = ("MWh/m³") +PetajoulePerCubicMeter = ("PJ/m³") +PetawattHourPerCubicMeter = ("PWh/m³") +TerajoulePerCubicMeter = ("TJ/m³") +TerawattHourPerCubicMeter = ("TWh/m³") +WattHourPerCubicMeter = ("Wh/m³") diff --git a/UnitsNet/GeneratedCode/Resources/Entropy.en-US.restext b/UnitsNet/GeneratedCode/Resources/Entropy.en-US.restext new file mode 100644 index 0000000000..0f8bfa3fbc --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Entropy.en-US.restext @@ -0,0 +1,7 @@ +CaloriePerKelvin = ("cal/K") +JoulePerDegreeCelsius = ("J/C") +JoulePerKelvin = ("J/K") +KilocaloriePerKelvin = ("kcal/K") +KilojoulePerDegreeCelsius = ("kJ/C") +KilojoulePerKelvin = ("kJ/K") +MegajoulePerKelvin = ("MJ/K") diff --git a/UnitsNet/GeneratedCode/Resources/Force.en-US.restext b/UnitsNet/GeneratedCode/Resources/Force.en-US.restext new file mode 100644 index 0000000000..6e1c93148e --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Force.en-US.restext @@ -0,0 +1,15 @@ +Decanewton = ("daN") +Dyn = ("dyn") +KilogramForce = ("kgf") +Kilonewton = ("kN") +KiloPond = ("kp") +KilopoundForce = ("kipf", "kip", "k") +Meganewton = ("MN") +Micronewton = ("µN") +Millinewton = ("mN") +Newton = ("N") +OunceForce = ("ozf") +Poundal = ("pdl") +PoundForce = ("lbf") +ShortTonForce = ("tf (short)", "t (US)f", "short tons-force") +TonneForce = ("tf", "Ton") diff --git a/UnitsNet/GeneratedCode/Resources/ForceChangeRate.en-US.restext b/UnitsNet/GeneratedCode/Resources/ForceChangeRate.en-US.restext new file mode 100644 index 0000000000..7128d1d7c1 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ForceChangeRate.en-US.restext @@ -0,0 +1,15 @@ +CentinewtonPerSecond = ("cN/s") +DecanewtonPerMinute = ("daN/min") +DecanewtonPerSecond = ("daN/s") +DecinewtonPerSecond = ("dN/s") +KilonewtonPerMinute = ("kN/min") +KilonewtonPerSecond = ("kN/s") +KilopoundForcePerMinute = ("kipf/min", "kip/min", "k/min") +KilopoundForcePerSecond = ("kipf/s", "kip/s", "k/s") +MicronewtonPerSecond = ("µN/s") +MillinewtonPerSecond = ("mN/s") +NanonewtonPerSecond = ("nN/s") +NewtonPerMinute = ("N/min") +NewtonPerSecond = ("N/s") +PoundForcePerMinute = ("lbf/min") +PoundForcePerSecond = ("lbf/s") diff --git a/UnitsNet/GeneratedCode/Resources/ForcePerLength.en-US.restext b/UnitsNet/GeneratedCode/Resources/ForcePerLength.en-US.restext new file mode 100644 index 0000000000..d0129cbd2e --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ForcePerLength.en-US.restext @@ -0,0 +1,38 @@ +CentinewtonPerCentimeter = ("cN/cm") +CentinewtonPerMeter = ("cN/m") +CentinewtonPerMillimeter = ("cN/mm") +DecanewtonPerCentimeter = ("daN/cm") +DecanewtonPerMeter = ("daN/m") +DecanewtonPerMillimeter = ("daN/mm") +DecinewtonPerCentimeter = ("dN/cm") +DecinewtonPerMeter = ("dN/m") +DecinewtonPerMillimeter = ("dN/mm") +KilogramForcePerCentimeter = ("kgf/cm") +KilogramForcePerMeter = ("kgf/m") +KilogramForcePerMillimeter = ("kgf/mm") +KilonewtonPerCentimeter = ("kN/cm") +KilonewtonPerMeter = ("kN/m") +KilonewtonPerMillimeter = ("kN/mm") +KilopoundForcePerFoot = ("kipf/ft", "kip/ft", "k/ft") +KilopoundForcePerInch = ("kipf/in", "kip/in", "k/in") +MeganewtonPerCentimeter = ("MN/cm") +MeganewtonPerMeter = ("MN/m") +MeganewtonPerMillimeter = ("MN/mm") +MicronewtonPerCentimeter = ("µN/cm") +MicronewtonPerMeter = ("µN/m") +MicronewtonPerMillimeter = ("µN/mm") +MillinewtonPerCentimeter = ("mN/cm") +MillinewtonPerMeter = ("mN/m") +MillinewtonPerMillimeter = ("mN/mm") +NanonewtonPerCentimeter = ("nN/cm") +NanonewtonPerMeter = ("nN/m") +NanonewtonPerMillimeter = ("nN/mm") +NewtonPerCentimeter = ("N/cm") +NewtonPerMeter = ("N/m") +NewtonPerMillimeter = ("N/mm") +PoundForcePerFoot = ("lbf/ft") +PoundForcePerInch = ("lbf/in") +PoundForcePerYard = ("lbf/yd") +TonneForcePerCentimeter = ("tf/cm") +TonneForcePerMeter = ("tf/m") +TonneForcePerMillimeter = ("tf/mm") diff --git a/UnitsNet/GeneratedCode/Resources/Frequency.en-US.restext b/UnitsNet/GeneratedCode/Resources/Frequency.en-US.restext new file mode 100644 index 0000000000..3574cb0de4 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Frequency.en-US.restext @@ -0,0 +1,13 @@ +BeatPerMinute = ("bpm") +BUnit = ("B Units") +CyclePerHour = ("cph") +CyclePerMinute = ("cpm") +Gigahertz = ("GHz") +Hertz = ("Hz") +Kilohertz = ("kHz") +Megahertz = ("MHz") +Microhertz = ("µHz") +Millihertz = ("mHz") +PerSecond = ("s⁻¹") +RadianPerSecond = ("rad/s") +Terahertz = ("THz") diff --git a/UnitsNet/GeneratedCode/Resources/FuelEfficiency.en-US.restext b/UnitsNet/GeneratedCode/Resources/FuelEfficiency.en-US.restext new file mode 100644 index 0000000000..6ffec182db --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/FuelEfficiency.en-US.restext @@ -0,0 +1,4 @@ +KilometerPerLiter = ("km/L") +LiterPer100Kilometers = ("L/100km") +MilePerUkGallon = ("mpg (imp.)") +MilePerUsGallon = ("mpg (U.S.)") diff --git a/UnitsNet/GeneratedCode/Resources/HeatFlux.en-US.restext b/UnitsNet/GeneratedCode/Resources/HeatFlux.en-US.restext new file mode 100644 index 0000000000..27ccf3f119 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/HeatFlux.en-US.restext @@ -0,0 +1,18 @@ +BtuPerHourSquareFoot = ("BTU/h·ft²") +BtuPerMinuteSquareFoot = ("BTU/min·ft²") +BtuPerSecondSquareFoot = ("BTU/s·ft²") +BtuPerSecondSquareInch = ("BTU/s·in²") +CaloriePerSecondSquareCentimeter = ("cal/s·cm²") +CentiwattPerSquareMeter = ("cW/m²") +DeciwattPerSquareMeter = ("dW/m²") +KilocaloriePerHourSquareMeter = ("kcal/h·m²") +KilocaloriePerSecondSquareCentimeter = ("kcal/s·cm²") +KilowattPerSquareMeter = ("kW/m²") +MicrowattPerSquareMeter = ("µW/m²") +MilliwattPerSquareMeter = ("mW/m²") +NanowattPerSquareMeter = ("nW/m²") +PoundForcePerFootSecond = ("lbf/(ft·s)") +PoundPerSecondCubed = ("lb/s³", "lbm/s³") +WattPerSquareFoot = ("W/ft²") +WattPerSquareInch = ("W/in²") +WattPerSquareMeter = ("W/m²") diff --git a/UnitsNet/GeneratedCode/Resources/HeatTransferCoefficient.en-US.restext b/UnitsNet/GeneratedCode/Resources/HeatTransferCoefficient.en-US.restext new file mode 100644 index 0000000000..3e7280bade --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/HeatTransferCoefficient.en-US.restext @@ -0,0 +1,6 @@ +BtuPerHourSquareFootDegreeFahrenheit = ("Btu/h·ft²·°F", "Btu/ft²·h·°F", "Btu/hr·ft²·°F", "Btu/ft²·hr·°F") +BtuPerSquareFootDegreeFahrenheit = ("Btu/ft²·°F") +CaloriePerHourSquareMeterDegreeCelsius = ("kcal/h·m²·°C", "kcal/m²·h·°C", "kcal/hr·m²·°C", "kcal/m²·hr·°C") +KilocaloriePerHourSquareMeterDegreeCelsius = ("kkcal/h·m²·°C", "kkcal/m²·h·°C", "kkcal/hr·m²·°C", "kkcal/m²·hr·°C") +WattPerSquareMeterCelsius = ("W/m²·°C") +WattPerSquareMeterKelvin = ("W/m²·K") diff --git a/UnitsNet/GeneratedCode/Resources/Illuminance.en-US.restext b/UnitsNet/GeneratedCode/Resources/Illuminance.en-US.restext new file mode 100644 index 0000000000..49970097e4 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Illuminance.en-US.restext @@ -0,0 +1,4 @@ +Kilolux = ("klx") +Lux = ("lx") +Megalux = ("Mlx") +Millilux = ("mlx") diff --git a/UnitsNet/GeneratedCode/Resources/Impulse.en-US.restext b/UnitsNet/GeneratedCode/Resources/Impulse.en-US.restext new file mode 100644 index 0000000000..0f853df9da --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Impulse.en-US.restext @@ -0,0 +1,13 @@ +CentinewtonSecond = ("cN·s") +DecanewtonSecond = ("daN·s") +DecinewtonSecond = ("dN·s") +KilogramMeterPerSecond = ("kg·m/s") +KilonewtonSecond = ("kN·s") +MeganewtonSecond = ("MN·s") +MicronewtonSecond = ("µN·s") +MillinewtonSecond = ("mN·s") +NanonewtonSecond = ("nN·s") +NewtonSecond = ("N·s") +PoundFootPerSecond = ("lb·ft/s") +PoundForceSecond = ("lbf·s") +SlugFootPerSecond = ("slug·ft/s") diff --git a/UnitsNet/GeneratedCode/Resources/Information.en-US.restext b/UnitsNet/GeneratedCode/Resources/Information.en-US.restext new file mode 100644 index 0000000000..ca7939a90a --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Information.en-US.restext @@ -0,0 +1,26 @@ +Bit = ("b") +Byte = ("B") +Exabit = ("Eb") +Exabyte = ("EB") +Exbibit = ("Eib") +Exbibyte = ("EiB") +Gibibit = ("Gib") +Gibibyte = ("GiB") +Gigabit = ("Gb") +Gigabyte = ("GB") +Kibibit = ("Kib") +Kibibyte = ("KiB") +Kilobit = ("kb") +Kilobyte = ("kB") +Mebibit = ("Mib") +Mebibyte = ("MiB") +Megabit = ("Mb") +Megabyte = ("MB") +Pebibit = ("Pib") +Pebibyte = ("PiB") +Petabit = ("Pb") +Petabyte = ("PB") +Tebibit = ("Tib") +Tebibyte = ("TiB") +Terabit = ("Tb") +Terabyte = ("TB") diff --git a/UnitsNet/GeneratedCode/Resources/Irradiance.en-US.restext b/UnitsNet/GeneratedCode/Resources/Irradiance.en-US.restext new file mode 100644 index 0000000000..52e42eb2d7 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Irradiance.en-US.restext @@ -0,0 +1,14 @@ +KilowattPerSquareCentimeter = ("kW/cm²") +KilowattPerSquareMeter = ("kW/m²") +MegawattPerSquareCentimeter = ("MW/cm²") +MegawattPerSquareMeter = ("MW/m²") +MicrowattPerSquareCentimeter = ("µW/cm²") +MicrowattPerSquareMeter = ("µW/m²") +MilliwattPerSquareCentimeter = ("mW/cm²") +MilliwattPerSquareMeter = ("mW/m²") +NanowattPerSquareCentimeter = ("nW/cm²") +NanowattPerSquareMeter = ("nW/m²") +PicowattPerSquareCentimeter = ("pW/cm²") +PicowattPerSquareMeter = ("pW/m²") +WattPerSquareCentimeter = ("W/cm²") +WattPerSquareMeter = ("W/m²") diff --git a/UnitsNet/GeneratedCode/Resources/Irradiation.en-US.restext b/UnitsNet/GeneratedCode/Resources/Irradiation.en-US.restext new file mode 100644 index 0000000000..b57331b8c9 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Irradiation.en-US.restext @@ -0,0 +1,7 @@ +JoulePerSquareCentimeter = ("J/cm²") +JoulePerSquareMeter = ("J/m²") +JoulePerSquareMillimeter = ("J/mm²") +KilojoulePerSquareMeter = ("kJ/m²") +KilowattHourPerSquareMeter = ("kWh/m²") +MillijoulePerSquareCentimeter = ("mJ/cm²") +WattHourPerSquareMeter = ("Wh/m²") diff --git a/UnitsNet/GeneratedCode/Resources/Jerk.en-US.restext b/UnitsNet/GeneratedCode/Resources/Jerk.en-US.restext new file mode 100644 index 0000000000..614e8bb0c9 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Jerk.en-US.restext @@ -0,0 +1,11 @@ +CentimeterPerSecondCubed = ("cm/s³") +DecimeterPerSecondCubed = ("dm/s³") +FootPerSecondCubed = ("ft/s³") +InchPerSecondCubed = ("in/s³") +KilometerPerSecondCubed = ("km/s³") +MeterPerSecondCubed = ("m/s³") +MicrometerPerSecondCubed = ("µm/s³") +MillimeterPerSecondCubed = ("mm/s³") +MillistandardGravitiesPerSecond = ("mg/s") +NanometerPerSecondCubed = ("nm/s³") +StandardGravitiesPerSecond = ("g/s") diff --git a/UnitsNet/GeneratedCode/Resources/KinematicViscosity.en-US.restext b/UnitsNet/GeneratedCode/Resources/KinematicViscosity.en-US.restext new file mode 100644 index 0000000000..9fd1f6e562 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/KinematicViscosity.en-US.restext @@ -0,0 +1,9 @@ +Centistokes = ("cSt") +Decistokes = ("dSt") +Kilostokes = ("kSt") +Microstokes = ("µSt") +Millistokes = ("mSt") +Nanostokes = ("nSt") +SquareFootPerSecond = ("ft²/s") +SquareMeterPerSecond = ("m²/s") +Stokes = ("St") diff --git a/UnitsNet/GeneratedCode/Resources/Length.en-US.restext b/UnitsNet/GeneratedCode/Resources/Length.en-US.restext new file mode 100644 index 0000000000..03b9a9c209 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Length.en-US.restext @@ -0,0 +1,36 @@ +Angstrom = ("Å", "A") +AstronomicalUnit = ("au", "ua") +Centimeter = ("cm") +Chain = ("ch") +DataMile = ("DM") +Decameter = ("dam") +Decimeter = ("dm") +DtpPica = ("pica") +DtpPoint = ("pt") +Fathom = ("fathom") +Foot = ("ft", "'", "′") +Hand = ("h", "hh") +Hectometer = ("hm") +Inch = ("in", "\"", "″") +KilolightYear = ("kly") +Kilometer = ("km") +Kiloparsec = ("kpc") +LightYear = ("ly") +MegalightYear = ("Mly") +Megaparsec = ("Mpc") +Meter = ("m") +Microinch = ("µin") +Micrometer = ("µm") +Mil = ("mil") +Mile = ("mi") +Millimeter = ("mm") +Nanometer = ("nm") +NauticalMile = ("NM") +Parsec = ("pc") +PrinterPica = ("pica") +PrinterPoint = ("pt") +Shackle = ("shackle") +SolarRadius = ("R⊙") +Twip = ("twip") +UsSurveyFoot = ("ftUS") +Yard = ("yd") diff --git a/UnitsNet/GeneratedCode/Resources/Level.en-US.restext b/UnitsNet/GeneratedCode/Resources/Level.en-US.restext new file mode 100644 index 0000000000..2fe4486c1c --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Level.en-US.restext @@ -0,0 +1,2 @@ +Decibel = ("dB") +Neper = ("Np") diff --git a/UnitsNet/GeneratedCode/Resources/LinearDensity.en-US.restext b/UnitsNet/GeneratedCode/Resources/LinearDensity.en-US.restext new file mode 100644 index 0000000000..07e137b834 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/LinearDensity.en-US.restext @@ -0,0 +1,14 @@ +GramPerCentimeter = ("g/cm") +GramPerMeter = ("g/m") +GramPerMillimeter = ("g/mm") +KilogramPerCentimeter = ("kg/cm") +KilogramPerMeter = ("kg/m") +KilogramPerMillimeter = ("kg/mm") +MicrogramPerCentimeter = ("µg/cm") +MicrogramPerMeter = ("µg/m") +MicrogramPerMillimeter = ("µg/mm") +MilligramPerCentimeter = ("mg/cm") +MilligramPerMeter = ("mg/m") +MilligramPerMillimeter = ("mg/mm") +PoundPerFoot = ("lb/ft") +PoundPerInch = ("lb/in") diff --git a/UnitsNet/GeneratedCode/Resources/LinearPowerDensity.en-US.restext b/UnitsNet/GeneratedCode/Resources/LinearPowerDensity.en-US.restext new file mode 100644 index 0000000000..734787cab0 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/LinearPowerDensity.en-US.restext @@ -0,0 +1,25 @@ +GigawattPerCentimeter = ("GW/cm") +GigawattPerFoot = ("GW/ft") +GigawattPerInch = ("GW/in") +GigawattPerMeter = ("GW/m") +GigawattPerMillimeter = ("GW/mm") +KilowattPerCentimeter = ("kW/cm") +KilowattPerFoot = ("kW/ft") +KilowattPerInch = ("kW/in") +KilowattPerMeter = ("kW/m") +KilowattPerMillimeter = ("kW/mm") +MegawattPerCentimeter = ("MW/cm") +MegawattPerFoot = ("MW/ft") +MegawattPerInch = ("MW/in") +MegawattPerMeter = ("MW/m") +MegawattPerMillimeter = ("MW/mm") +MilliwattPerCentimeter = ("mW/cm") +MilliwattPerFoot = ("mW/ft") +MilliwattPerInch = ("mW/in") +MilliwattPerMeter = ("mW/m") +MilliwattPerMillimeter = ("mW/mm") +WattPerCentimeter = ("W/cm") +WattPerFoot = ("W/ft") +WattPerInch = ("W/in") +WattPerMeter = ("W/m") +WattPerMillimeter = ("W/mm") diff --git a/UnitsNet/GeneratedCode/Resources/Luminance.en-US.restext b/UnitsNet/GeneratedCode/Resources/Luminance.en-US.restext new file mode 100644 index 0000000000..a107746ca0 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Luminance.en-US.restext @@ -0,0 +1,10 @@ +CandelaPerSquareFoot = ("Cd/ft²") +CandelaPerSquareInch = ("Cd/in²") +CandelaPerSquareMeter = ("Cd/m²") +CenticandelaPerSquareMeter = ("cCd/m²") +DecicandelaPerSquareMeter = ("dCd/m²") +KilocandelaPerSquareMeter = ("kCd/m²") +MicrocandelaPerSquareMeter = ("µCd/m²") +MillicandelaPerSquareMeter = ("mCd/m²") +NanocandelaPerSquareMeter = ("nCd/m²") +Nit = ("nt") diff --git a/UnitsNet/GeneratedCode/Resources/Luminosity.en-US.restext b/UnitsNet/GeneratedCode/Resources/Luminosity.en-US.restext new file mode 100644 index 0000000000..703791ac0e --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Luminosity.en-US.restext @@ -0,0 +1,14 @@ +Decawatt = ("daW") +Deciwatt = ("dW") +Femtowatt = ("fW") +Gigawatt = ("GW") +Kilowatt = ("kW") +Megawatt = ("MW") +Microwatt = ("µW") +Milliwatt = ("mW") +Nanowatt = ("nW") +Petawatt = ("PW") +Picowatt = ("pW") +SolarLuminosity = ("L⊙") +Terawatt = ("TW") +Watt = ("W") diff --git a/UnitsNet/GeneratedCode/Resources/LuminousFlux.en-US.restext b/UnitsNet/GeneratedCode/Resources/LuminousFlux.en-US.restext new file mode 100644 index 0000000000..c9e35bb8fb --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/LuminousFlux.en-US.restext @@ -0,0 +1 @@ +Lumen = ("lm") diff --git a/UnitsNet/GeneratedCode/Resources/LuminousIntensity.en-US.restext b/UnitsNet/GeneratedCode/Resources/LuminousIntensity.en-US.restext new file mode 100644 index 0000000000..df752e8c36 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/LuminousIntensity.en-US.restext @@ -0,0 +1 @@ +Candela = ("cd") diff --git a/UnitsNet/GeneratedCode/Resources/MagneticField.en-US.restext b/UnitsNet/GeneratedCode/Resources/MagneticField.en-US.restext new file mode 100644 index 0000000000..1b0f26da50 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/MagneticField.en-US.restext @@ -0,0 +1,6 @@ +Gauss = ("G") +Microtesla = ("µT") +Milligauss = ("mG") +Millitesla = ("mT") +Nanotesla = ("nT") +Tesla = ("T") diff --git a/UnitsNet/GeneratedCode/Resources/MagneticFlux.en-US.restext b/UnitsNet/GeneratedCode/Resources/MagneticFlux.en-US.restext new file mode 100644 index 0000000000..cf9400d33c --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/MagneticFlux.en-US.restext @@ -0,0 +1 @@ +Weber = ("Wb") diff --git a/UnitsNet/GeneratedCode/Resources/Magnetization.en-US.restext b/UnitsNet/GeneratedCode/Resources/Magnetization.en-US.restext new file mode 100644 index 0000000000..4512d68141 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Magnetization.en-US.restext @@ -0,0 +1 @@ +AmperePerMeter = ("A/m") diff --git a/UnitsNet/GeneratedCode/Resources/Mass.en-US.restext b/UnitsNet/GeneratedCode/Resources/Mass.en-US.restext new file mode 100644 index 0000000000..e94c332a57 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Mass.en-US.restext @@ -0,0 +1,25 @@ +Centigram = ("cg") +Decagram = ("dag") +Decigram = ("dg") +EarthMass = ("em") +Grain = ("gr") +Gram = ("g") +Hectogram = ("hg") +Kilogram = ("kg") +Kilopound = ("klb", "klbs", "klbm") +Kilotonne = ("kt") +LongHundredweight = ("cwt") +LongTon = ("long tn") +Megapound = ("Mlb", "Mlbs", "Mlbm") +Megatonne = ("Mt") +Microgram = ("µg") +Milligram = ("mg") +Nanogram = ("ng") +Ounce = ("oz") +Pound = ("lb", "lbs", "lbm") +ShortHundredweight = ("cwt") +ShortTon = ("t (short)", "short tn", "ST") +Slug = ("slug") +SolarMass = ("M☉", "M⊙") +Stone = ("st") +Tonne = ("t") diff --git a/UnitsNet/GeneratedCode/Resources/MassConcentration.en-US.restext b/UnitsNet/GeneratedCode/Resources/MassConcentration.en-US.restext new file mode 100644 index 0000000000..132d30b09e --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/MassConcentration.en-US.restext @@ -0,0 +1,49 @@ +CentigramPerDeciliter = ("cg/dL") +CentigramPerLiter = ("cg/L") +CentigramPerMicroliter = ("cg/μL") +CentigramPerMilliliter = ("cg/mL") +DecigramPerDeciliter = ("dg/dL") +DecigramPerLiter = ("dg/L") +DecigramPerMicroliter = ("dg/μL") +DecigramPerMilliliter = ("dg/mL") +GramPerCubicCentimeter = ("g/cm³") +GramPerCubicMeter = ("g/m³") +GramPerCubicMillimeter = ("g/mm³") +GramPerDeciliter = ("g/dL") +GramPerLiter = ("g/L") +GramPerMicroliter = ("g/μL") +GramPerMilliliter = ("g/mL") +KilogramPerCubicCentimeter = ("kg/cm³") +KilogramPerCubicMeter = ("kg/m³") +KilogramPerCubicMillimeter = ("kg/mm³") +KilogramPerLiter = ("kg/L") +KilopoundPerCubicFoot = ("kip/ft³") +KilopoundPerCubicInch = ("kip/in³") +MicrogramPerCubicMeter = ("µg/m³") +MicrogramPerDeciliter = ("µg/dL") +MicrogramPerLiter = ("µg/L") +MicrogramPerMicroliter = ("µg/μL") +MicrogramPerMilliliter = ("µg/mL") +MilligramPerCubicMeter = ("mg/m³") +MilligramPerDeciliter = ("mg/dL") +MilligramPerLiter = ("mg/L") +MilligramPerMicroliter = ("mg/μL") +MilligramPerMilliliter = ("mg/mL") +NanogramPerDeciliter = ("ng/dL") +NanogramPerLiter = ("ng/L") +NanogramPerMicroliter = ("ng/μL") +NanogramPerMilliliter = ("ng/mL") +OuncePerImperialGallon = ("oz/gal (imp.)") +OuncePerUSGallon = ("oz/gal (U.S.)") +PicogramPerDeciliter = ("pg/dL") +PicogramPerLiter = ("pg/L") +PicogramPerMicroliter = ("pg/μL") +PicogramPerMilliliter = ("pg/mL") +PoundPerCubicFoot = ("lb/ft³") +PoundPerCubicInch = ("lb/in³") +PoundPerImperialGallon = ("ppg (imp.)") +PoundPerUSGallon = ("ppg (U.S.)") +SlugPerCubicFoot = ("slug/ft³") +TonnePerCubicCentimeter = ("t/cm³") +TonnePerCubicMeter = ("t/m³") +TonnePerCubicMillimeter = ("t/mm³") diff --git a/UnitsNet/GeneratedCode/Resources/MassFlow.en-US.restext b/UnitsNet/GeneratedCode/Resources/MassFlow.en-US.restext new file mode 100644 index 0000000000..6a8135cf92 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/MassFlow.en-US.restext @@ -0,0 +1,33 @@ +CentigramPerDay = ("cg/d") +CentigramPerSecond = ("cg/s", "cg/S") +DecagramPerDay = ("dag/d") +DecagramPerSecond = ("dag/s", "dag/S") +DecigramPerDay = ("dg/d") +DecigramPerSecond = ("dg/s", "dg/S") +GramPerDay = ("g/d") +GramPerHour = ("g/h") +GramPerSecond = ("g/s", "g/S") +HectogramPerDay = ("hg/d") +HectogramPerSecond = ("hg/s", "hg/S") +KilogramPerDay = ("kg/d") +KilogramPerHour = ("kg/h") +KilogramPerMinute = ("kg/min") +KilogramPerSecond = ("kg/s", "kg/S") +MegagramPerDay = ("Mg/d") +MegapoundPerDay = ("Mlb/d") +MegapoundPerHour = ("Mlb/h") +MegapoundPerMinute = ("Mlb/min") +MegapoundPerSecond = ("Mlb/s") +MicrogramPerDay = ("µg/d") +MicrogramPerSecond = ("µg/s", "µg/S") +MilligramPerDay = ("mg/d") +MilligramPerSecond = ("mg/s", "mg/S") +NanogramPerDay = ("ng/d") +NanogramPerSecond = ("ng/s", "ng/S") +PoundPerDay = ("lb/d") +PoundPerHour = ("lb/h") +PoundPerMinute = ("lb/min") +PoundPerSecond = ("lb/s") +ShortTonPerHour = ("short tn/h") +TonnePerDay = ("t/d") +TonnePerHour = ("t/h") diff --git a/UnitsNet/GeneratedCode/Resources/MassFlux.en-US.restext b/UnitsNet/GeneratedCode/Resources/MassFlux.en-US.restext new file mode 100644 index 0000000000..d02bbc6ccd --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/MassFlux.en-US.restext @@ -0,0 +1,12 @@ +GramPerHourPerSquareCentimeter = ("g·h⁻¹·cm⁻²") +GramPerHourPerSquareMeter = ("g·h⁻¹·m⁻²") +GramPerHourPerSquareMillimeter = ("g·h⁻¹·mm⁻²") +GramPerSecondPerSquareCentimeter = ("g·s⁻¹·cm⁻²") +GramPerSecondPerSquareMeter = ("g·s⁻¹·m⁻²") +GramPerSecondPerSquareMillimeter = ("g·s⁻¹·mm⁻²") +KilogramPerHourPerSquareCentimeter = ("kg·h⁻¹·cm⁻²") +KilogramPerHourPerSquareMeter = ("kg·h⁻¹·m⁻²") +KilogramPerHourPerSquareMillimeter = ("kg·h⁻¹·mm⁻²") +KilogramPerSecondPerSquareCentimeter = ("kg·s⁻¹·cm⁻²") +KilogramPerSecondPerSquareMeter = ("kg·s⁻¹·m⁻²") +KilogramPerSecondPerSquareMillimeter = ("kg·s⁻¹·mm⁻²") diff --git a/UnitsNet/GeneratedCode/Resources/MassFraction.en-US.restext b/UnitsNet/GeneratedCode/Resources/MassFraction.en-US.restext new file mode 100644 index 0000000000..09dfd346fe --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/MassFraction.en-US.restext @@ -0,0 +1,24 @@ +CentigramPerGram = ("cg/g") +CentigramPerKilogram = ("cg/kg") +DecagramPerGram = ("dag/g") +DecagramPerKilogram = ("dag/kg") +DecigramPerGram = ("dg/g") +DecigramPerKilogram = ("dg/kg") +DecimalFraction = ("") +GramPerGram = ("g/g") +GramPerKilogram = ("g/kg") +HectogramPerGram = ("hg/g") +HectogramPerKilogram = ("hg/kg") +KilogramPerGram = ("kg/g") +KilogramPerKilogram = ("kg/kg") +MicrogramPerGram = ("µg/g") +MicrogramPerKilogram = ("µg/kg") +MilligramPerGram = ("mg/g") +MilligramPerKilogram = ("mg/kg") +NanogramPerGram = ("ng/g") +NanogramPerKilogram = ("ng/kg") +PartPerBillion = ("ppb") +PartPerMillion = ("ppm") +PartPerThousand = ("‰") +PartPerTrillion = ("ppt") +Percent = ("%", "% (w/w)") diff --git a/UnitsNet/GeneratedCode/Resources/MassMomentOfInertia.en-US.restext b/UnitsNet/GeneratedCode/Resources/MassMomentOfInertia.en-US.restext new file mode 100644 index 0000000000..e4918fe527 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/MassMomentOfInertia.en-US.restext @@ -0,0 +1,28 @@ +GramSquareCentimeter = ("g·cm²") +GramSquareDecimeter = ("g·dm²") +GramSquareMeter = ("g·m²") +GramSquareMillimeter = ("g·mm²") +KilogramSquareCentimeter = ("kg·cm²") +KilogramSquareDecimeter = ("kg·dm²") +KilogramSquareMeter = ("kg·m²") +KilogramSquareMillimeter = ("kg·mm²") +KilotonneSquareCentimeter = ("kt·cm²") +KilotonneSquareDecimeter = ("kt·dm²") +KilotonneSquareMeter = ("kt·m²") +KilotonneSquareMilimeter = ("kt·mm²") +MegatonneSquareCentimeter = ("Mt·cm²") +MegatonneSquareDecimeter = ("Mt·dm²") +MegatonneSquareMeter = ("Mt·m²") +MegatonneSquareMilimeter = ("Mt·mm²") +MilligramSquareCentimeter = ("mg·cm²") +MilligramSquareDecimeter = ("mg·dm²") +MilligramSquareMeter = ("mg·m²") +MilligramSquareMillimeter = ("mg·mm²") +PoundSquareFoot = ("lb·ft²") +PoundSquareInch = ("lb·in²") +SlugSquareFoot = ("slug·ft²") +SlugSquareInch = ("slug·in²") +TonneSquareCentimeter = ("t·cm²") +TonneSquareDecimeter = ("t·dm²") +TonneSquareMeter = ("t·m²") +TonneSquareMilimeter = ("t·mm²") diff --git a/UnitsNet/GeneratedCode/Resources/MolarEnergy.en-US.restext b/UnitsNet/GeneratedCode/Resources/MolarEnergy.en-US.restext new file mode 100644 index 0000000000..8c4ea7ad1e --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/MolarEnergy.en-US.restext @@ -0,0 +1,3 @@ +JoulePerMole = ("J/mol") +KilojoulePerMole = ("kJ/mol") +MegajoulePerMole = ("MJ/mol") diff --git a/UnitsNet/GeneratedCode/Resources/MolarEntropy.en-US.restext b/UnitsNet/GeneratedCode/Resources/MolarEntropy.en-US.restext new file mode 100644 index 0000000000..dbc70b29a0 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/MolarEntropy.en-US.restext @@ -0,0 +1,3 @@ +JoulePerMoleKelvin = ("J/(mol*K)") +KilojoulePerMoleKelvin = ("kJ/(mol*K)") +MegajoulePerMoleKelvin = ("MJ/(mol*K)") diff --git a/UnitsNet/GeneratedCode/Resources/MolarFlow.en-US.restext b/UnitsNet/GeneratedCode/Resources/MolarFlow.en-US.restext new file mode 100644 index 0000000000..b2caad2427 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/MolarFlow.en-US.restext @@ -0,0 +1,9 @@ +KilomolePerHour = ("kkmol/h") +KilomolePerMinute = ("kmol/min") +KilomolePerSecond = ("kmol/s") +MolePerHour = ("kmol/h") +MolePerMinute = ("mol/min") +MolePerSecond = ("mol/s") +PoundMolePerHour = ("lbmol/h") +PoundMolePerMinute = ("lbmol/min") +PoundMolePerSecond = ("lbmol/s") diff --git a/UnitsNet/GeneratedCode/Resources/MolarMass.en-US.restext b/UnitsNet/GeneratedCode/Resources/MolarMass.en-US.restext new file mode 100644 index 0000000000..62face4da8 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/MolarMass.en-US.restext @@ -0,0 +1,13 @@ +CentigramPerMole = ("cg/mol") +DecagramPerMole = ("dag/mol") +DecigramPerMole = ("dg/mol") +GramPerMole = ("g/mol") +HectogramPerMole = ("hg/mol") +KilogramPerKilomole = ("kg/kmol") +KilogramPerMole = ("kg/mol") +KilopoundPerMole = ("klb/mol") +MegapoundPerMole = ("Mlb/mol") +MicrogramPerMole = ("µg/mol") +MilligramPerMole = ("mg/mol") +NanogramPerMole = ("ng/mol") +PoundPerMole = ("lb/mol") diff --git a/UnitsNet/GeneratedCode/Resources/Molarity.en-US.restext b/UnitsNet/GeneratedCode/Resources/Molarity.en-US.restext new file mode 100644 index 0000000000..68ae055510 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Molarity.en-US.restext @@ -0,0 +1,11 @@ +CentimolePerLiter = ("cmol/L", "cM") +DecimolePerLiter = ("dmol/L", "dM") +FemtomolePerLiter = ("fmol/L", "fM") +KilomolePerCubicMeter = ("kmol/m³") +MicromolePerLiter = ("µmol/L", "µM") +MillimolePerLiter = ("mmol/L", "mM") +MolePerCubicMeter = ("mol/m³") +MolePerLiter = ("mol/L", "M") +NanomolePerLiter = ("nmol/L", "nM") +PicomolePerLiter = ("pmol/L", "pM") +PoundMolePerCubicFoot = ("lbmol/ft³") diff --git a/UnitsNet/GeneratedCode/Resources/Permeability.en-US.restext b/UnitsNet/GeneratedCode/Resources/Permeability.en-US.restext new file mode 100644 index 0000000000..cd40eeadb3 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Permeability.en-US.restext @@ -0,0 +1 @@ +HenryPerMeter = ("H/m") diff --git a/UnitsNet/GeneratedCode/Resources/Permittivity.en-US.restext b/UnitsNet/GeneratedCode/Resources/Permittivity.en-US.restext new file mode 100644 index 0000000000..0ab9ab1f1d --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Permittivity.en-US.restext @@ -0,0 +1 @@ +FaradPerMeter = ("F/m") diff --git a/UnitsNet/GeneratedCode/Resources/PorousMediumPermeability.en-US.restext b/UnitsNet/GeneratedCode/Resources/PorousMediumPermeability.en-US.restext new file mode 100644 index 0000000000..4af9248edb --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/PorousMediumPermeability.en-US.restext @@ -0,0 +1,5 @@ +Darcy = ("D") +Microdarcy = ("µD") +Millidarcy = ("mD") +SquareCentimeter = ("cm²") +SquareMeter = ("m²") diff --git a/UnitsNet/GeneratedCode/Resources/Power.en-US.restext b/UnitsNet/GeneratedCode/Resources/Power.en-US.restext new file mode 100644 index 0000000000..74d1bf453c --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Power.en-US.restext @@ -0,0 +1,26 @@ +BoilerHorsepower = ("hp(S)") +BritishThermalUnitPerHour = ("Btu/h", "Btu/hr") +Decawatt = ("daW") +Deciwatt = ("dW") +ElectricalHorsepower = ("hp(E)") +Femtowatt = ("fW") +GigajoulePerHour = ("GJ/h") +Gigawatt = ("GW") +HydraulicHorsepower = ("hp(H)") +JoulePerHour = ("J/h") +KilobritishThermalUnitPerHour = ("kBtu/h", "kBtu/hr") +KilojoulePerHour = ("kJ/h") +Kilowatt = ("kW") +MechanicalHorsepower = ("hp(I)") +MegabritishThermalUnitPerHour = ("MBtu/h", "MBtu/hr") +MegajoulePerHour = ("MJ/h") +Megawatt = ("MW") +MetricHorsepower = ("hp(M)") +Microwatt = ("µW") +MillijoulePerHour = ("mJ/h") +Milliwatt = ("mW") +Nanowatt = ("nW") +Petawatt = ("PW") +Picowatt = ("pW") +Terawatt = ("TW") +Watt = ("W") diff --git a/UnitsNet/GeneratedCode/Resources/PowerDensity.en-US.restext b/UnitsNet/GeneratedCode/Resources/PowerDensity.en-US.restext new file mode 100644 index 0000000000..08e896d6be --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/PowerDensity.en-US.restext @@ -0,0 +1,44 @@ +DecawattPerCubicFoot = ("daW/ft³") +DecawattPerCubicInch = ("daW/in³") +DecawattPerCubicMeter = ("daW/m³") +DecawattPerLiter = ("daW/l") +DeciwattPerCubicFoot = ("dW/ft³") +DeciwattPerCubicInch = ("dW/in³") +DeciwattPerCubicMeter = ("dW/m³") +DeciwattPerLiter = ("dW/l") +GigawattPerCubicFoot = ("GW/ft³") +GigawattPerCubicInch = ("GW/in³") +GigawattPerCubicMeter = ("GW/m³") +GigawattPerLiter = ("GW/l") +KilowattPerCubicFoot = ("kW/ft³") +KilowattPerCubicInch = ("kW/in³") +KilowattPerCubicMeter = ("kW/m³") +KilowattPerLiter = ("kW/l") +MegawattPerCubicFoot = ("MW/ft³") +MegawattPerCubicInch = ("MW/in³") +MegawattPerCubicMeter = ("MW/m³") +MegawattPerLiter = ("MW/l") +MicrowattPerCubicFoot = ("µW/ft³") +MicrowattPerCubicInch = ("µW/in³") +MicrowattPerCubicMeter = ("µW/m³") +MicrowattPerLiter = ("µW/l") +MilliwattPerCubicFoot = ("mW/ft³") +MilliwattPerCubicInch = ("mW/in³") +MilliwattPerCubicMeter = ("mW/m³") +MilliwattPerLiter = ("mW/l") +NanowattPerCubicFoot = ("nW/ft³") +NanowattPerCubicInch = ("nW/in³") +NanowattPerCubicMeter = ("nW/m³") +NanowattPerLiter = ("nW/l") +PicowattPerCubicFoot = ("pW/ft³") +PicowattPerCubicInch = ("pW/in³") +PicowattPerCubicMeter = ("pW/m³") +PicowattPerLiter = ("pW/l") +TerawattPerCubicFoot = ("TW/ft³") +TerawattPerCubicInch = ("TW/in³") +TerawattPerCubicMeter = ("TW/m³") +TerawattPerLiter = ("TW/l") +WattPerCubicFoot = ("W/ft³") +WattPerCubicInch = ("W/in³") +WattPerCubicMeter = ("W/m³") +WattPerLiter = ("W/l") diff --git a/UnitsNet/GeneratedCode/Resources/PowerRatio.en-US.restext b/UnitsNet/GeneratedCode/Resources/PowerRatio.en-US.restext new file mode 100644 index 0000000000..7e8a6001e5 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/PowerRatio.en-US.restext @@ -0,0 +1,2 @@ +DecibelMilliwatt = ("dBmW", "dBm") +DecibelWatt = ("dBW") diff --git a/UnitsNet/GeneratedCode/Resources/Pressure.en-US.restext b/UnitsNet/GeneratedCode/Resources/Pressure.en-US.restext new file mode 100644 index 0000000000..b27ed211fc --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Pressure.en-US.restext @@ -0,0 +1,47 @@ +Atmosphere = ("atm") +Bar = ("bar") +Centibar = ("cbar") +Decapascal = ("daPa") +Decibar = ("dbar") +DynePerSquareCentimeter = ("dyn/cm²") +FootOfElevation = ("ft of elevation") +FootOfHead = ("ft of head") +Gigapascal = ("GPa") +Hectopascal = ("hPa") +InchOfMercury = ("inHg") +InchOfWaterColumn = ("inH2O", "inch wc", "wc") +Kilobar = ("kbar") +KilogramForcePerSquareCentimeter = ("kgf/cm²") +KilogramForcePerSquareMeter = ("kgf/m²") +KilogramForcePerSquareMillimeter = ("kgf/mm²") +KilonewtonPerSquareCentimeter = ("kN/cm²") +KilonewtonPerSquareMeter = ("kN/m²") +KilonewtonPerSquareMillimeter = ("kN/mm²") +Kilopascal = ("kPa") +KilopoundForcePerSquareFoot = ("kipf/ft²") +KilopoundForcePerSquareInch = ("ksi", "kipf/in²") +KilopoundForcePerSquareMil = ("kipf/mil²") +Megabar = ("Mbar") +MeganewtonPerSquareMeter = ("MN/m²") +Megapascal = ("MPa") +MeterOfElevation = ("m of elevation") +MeterOfHead = ("m of head") +Microbar = ("µbar") +Micropascal = ("µPa") +Millibar = ("mbar") +MillimeterOfMercury = ("mmHg") +MillimeterOfWaterColumn = ("mmH2O", "mm wc") +Millipascal = ("mPa") +NewtonPerSquareCentimeter = ("N/cm²") +NewtonPerSquareMeter = ("N/m²") +NewtonPerSquareMillimeter = ("N/mm²") +Pascal = ("Pa") +PoundForcePerSquareFoot = ("lb/ft²") +PoundForcePerSquareInch = ("psi", "lb/in²") +PoundForcePerSquareMil = ("lb/mil²", "lbs/mil²") +PoundPerInchSecondSquared = ("lbm/(in·s²)", "lb/(in·s²)") +TechnicalAtmosphere = ("at") +TonneForcePerSquareCentimeter = ("tf/cm²") +TonneForcePerSquareMeter = ("tf/m²") +TonneForcePerSquareMillimeter = ("tf/mm²") +Torr = ("torr") diff --git a/UnitsNet/GeneratedCode/Resources/PressureChangeRate.en-US.restext b/UnitsNet/GeneratedCode/Resources/PressureChangeRate.en-US.restext new file mode 100644 index 0000000000..2df40aa34e --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/PressureChangeRate.en-US.restext @@ -0,0 +1,14 @@ +AtmospherePerSecond = ("atm/s") +KilopascalPerMinute = ("kPa/min") +KilopascalPerSecond = ("kPa/s") +KilopoundForcePerSquareInchPerMinute = ("ksi/min", "kipf/in²/min") +KilopoundForcePerSquareInchPerSecond = ("ksi/s", "kipf/in²/s") +MegapascalPerMinute = ("MPa/min") +MegapascalPerSecond = ("MPa/s") +MegapoundForcePerSquareInchPerMinute = ("Mpsi/min", "Mlb/in²/min") +MegapoundForcePerSquareInchPerSecond = ("Mpsi/s", "Mlb/in²/s") +MillimeterOfMercuryPerSecond = ("mmHg/s") +PascalPerMinute = ("Pa/min") +PascalPerSecond = ("Pa/s") +PoundForcePerSquareInchPerMinute = ("psi/min", "lb/in²/min") +PoundForcePerSquareInchPerSecond = ("psi/s", "lb/in²/s") diff --git a/UnitsNet/GeneratedCode/Resources/Ratio.en-US.restext b/UnitsNet/GeneratedCode/Resources/Ratio.en-US.restext new file mode 100644 index 0000000000..7f94b4bfae --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Ratio.en-US.restext @@ -0,0 +1,6 @@ +DecimalFraction = ("") +PartPerBillion = ("ppb") +PartPerMillion = ("ppm") +PartPerThousand = ("‰") +PartPerTrillion = ("ppt") +Percent = ("%") diff --git a/UnitsNet/GeneratedCode/Resources/RatioChangeRate.en-US.restext b/UnitsNet/GeneratedCode/Resources/RatioChangeRate.en-US.restext new file mode 100644 index 0000000000..bfc3b132eb --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/RatioChangeRate.en-US.restext @@ -0,0 +1,2 @@ +DecimalFractionPerSecond = ("/s") +PercentPerSecond = ("%/s") diff --git a/UnitsNet/GeneratedCode/Resources/ReactiveEnergy.en-US.restext b/UnitsNet/GeneratedCode/Resources/ReactiveEnergy.en-US.restext new file mode 100644 index 0000000000..78c00ad4ee --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ReactiveEnergy.en-US.restext @@ -0,0 +1,3 @@ +KilovoltampereReactiveHour = ("kvarh") +MegavoltampereReactiveHour = ("Mvarh") +VoltampereReactiveHour = ("varh") diff --git a/UnitsNet/GeneratedCode/Resources/ReactivePower.en-US.restext b/UnitsNet/GeneratedCode/Resources/ReactivePower.en-US.restext new file mode 100644 index 0000000000..7abc65e55d --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ReactivePower.en-US.restext @@ -0,0 +1,4 @@ +GigavoltampereReactive = ("Gvar") +KilovoltampereReactive = ("kvar") +MegavoltampereReactive = ("Mvar") +VoltampereReactive = ("var") diff --git a/UnitsNet/GeneratedCode/Resources/ReciprocalArea.en-US.restext b/UnitsNet/GeneratedCode/Resources/ReciprocalArea.en-US.restext new file mode 100644 index 0000000000..555d558fb6 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ReciprocalArea.en-US.restext @@ -0,0 +1,11 @@ +InverseSquareCentimeter = ("cm⁻²") +InverseSquareDecimeter = ("dm⁻²") +InverseSquareFoot = ("ft⁻²") +InverseSquareInch = ("in⁻²") +InverseSquareKilometer = ("km⁻²") +InverseSquareMeter = ("m⁻²") +InverseSquareMicrometer = ("µm⁻²") +InverseSquareMile = ("mi⁻²") +InverseSquareMillimeter = ("mm⁻²") +InverseSquareYard = ("yd⁻²") +InverseUsSurveySquareFoot = ("ft⁻² (US)") diff --git a/UnitsNet/GeneratedCode/Resources/ReciprocalLength.en-US.restext b/UnitsNet/GeneratedCode/Resources/ReciprocalLength.en-US.restext new file mode 100644 index 0000000000..c95fe3c06c --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ReciprocalLength.en-US.restext @@ -0,0 +1,10 @@ +InverseCentimeter = ("cm⁻¹", "1/cm") +InverseFoot = ("ft⁻¹", "1/ft") +InverseInch = ("in⁻¹", "1/in") +InverseMeter = ("m⁻¹", "1/m") +InverseMicroinch = ("µin⁻¹", "1/µin") +InverseMil = ("mil⁻¹", "1/mil") +InverseMile = ("mi⁻¹", "1/mi") +InverseMillimeter = ("mm⁻¹", "1/mm") +InverseUsSurveyFoot = ("ftUS⁻¹", "1/ftUS") +InverseYard = ("yd⁻¹", "1/yd") diff --git a/UnitsNet/GeneratedCode/Resources/RelativeHumidity.en-US.restext b/UnitsNet/GeneratedCode/Resources/RelativeHumidity.en-US.restext new file mode 100644 index 0000000000..78c88034d3 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/RelativeHumidity.en-US.restext @@ -0,0 +1 @@ +Percent = ("%RH") diff --git a/UnitsNet/GeneratedCode/Resources/RotationalAcceleration.en-US.restext b/UnitsNet/GeneratedCode/Resources/RotationalAcceleration.en-US.restext new file mode 100644 index 0000000000..a05729de46 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/RotationalAcceleration.en-US.restext @@ -0,0 +1,4 @@ +DegreePerSecondSquared = ("°/s²", "deg/s²") +RadianPerSecondSquared = ("rad/s²") +RevolutionPerMinutePerSecond = ("rpm/s") +RevolutionPerSecondSquared = ("r/s²") diff --git a/UnitsNet/GeneratedCode/Resources/RotationalSpeed.en-US.restext b/UnitsNet/GeneratedCode/Resources/RotationalSpeed.en-US.restext new file mode 100644 index 0000000000..ebe053b5f5 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/RotationalSpeed.en-US.restext @@ -0,0 +1,13 @@ +CentiradianPerSecond = ("crad/s") +DeciradianPerSecond = ("drad/s") +DegreePerMinute = ("°/min", "deg/min") +DegreePerSecond = ("°/s", "deg/s") +MicrodegreePerSecond = ("µ°/s", "µdeg/s") +MicroradianPerSecond = ("µrad/s") +MillidegreePerSecond = ("m°/s", "mdeg/s") +MilliradianPerSecond = ("mrad/s") +NanodegreePerSecond = ("n°/s", "ndeg/s") +NanoradianPerSecond = ("nrad/s") +RadianPerSecond = ("rad/s") +RevolutionPerMinute = ("rpm", "r/min") +RevolutionPerSecond = ("r/s") diff --git a/UnitsNet/GeneratedCode/Resources/RotationalStiffness.en-US.restext b/UnitsNet/GeneratedCode/Resources/RotationalStiffness.en-US.restext new file mode 100644 index 0000000000..ad0af65e6b --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/RotationalStiffness.en-US.restext @@ -0,0 +1,33 @@ +CentinewtonMeterPerDegree = ("cN·m/deg", "cNm/deg", "cN·m/°", "cNm/°") +CentinewtonMillimeterPerDegree = ("cN·mm/deg", "cNmm/deg", "cN·mm/°", "cNmm/°") +CentinewtonMillimeterPerRadian = ("cN·mm/rad", "cNmm/rad") +DecanewtonMeterPerDegree = ("daN·m/deg", "daNm/deg", "daN·m/°", "daNm/°") +DecanewtonMillimeterPerDegree = ("daN·mm/deg", "daNmm/deg", "daN·mm/°", "daNmm/°") +DecanewtonMillimeterPerRadian = ("daN·mm/rad", "daNmm/rad") +DecinewtonMeterPerDegree = ("dN·m/deg", "dNm/deg", "dN·m/°", "dNm/°") +DecinewtonMillimeterPerDegree = ("dN·mm/deg", "dNmm/deg", "dN·mm/°", "dNmm/°") +DecinewtonMillimeterPerRadian = ("dN·mm/rad", "dNmm/rad") +KilonewtonMeterPerDegree = ("kN·m/deg", "kNm/deg", "kN·m/°", "kNm/°") +KilonewtonMeterPerRadian = ("kN·m/rad", "kNm/rad") +KilonewtonMillimeterPerDegree = ("kN·mm/deg", "kNmm/deg", "kN·mm/°", "kNmm/°") +KilonewtonMillimeterPerRadian = ("kN·mm/rad", "kNmm/rad") +KilopoundForceFootPerDegrees = ("kipf·ft/°", "kip·ft/°g", "k·ft/°", "kipf·ft/deg", "kip·ft/deg", "k·ft/deg") +MeganewtonMeterPerDegree = ("MN·m/deg", "MNm/deg", "MN·m/°", "MNm/°") +MeganewtonMeterPerRadian = ("MN·m/rad", "MNm/rad") +MeganewtonMillimeterPerDegree = ("MN·mm/deg", "MNmm/deg", "MN·mm/°", "MNmm/°") +MeganewtonMillimeterPerRadian = ("MN·mm/rad", "MNmm/rad") +MicronewtonMeterPerDegree = ("µN·m/deg", "µNm/deg", "µN·m/°", "µNm/°") +MicronewtonMillimeterPerDegree = ("µN·mm/deg", "µNmm/deg", "µN·mm/°", "µNmm/°") +MicronewtonMillimeterPerRadian = ("µN·mm/rad", "µNmm/rad") +MillinewtonMeterPerDegree = ("mN·m/deg", "mNm/deg", "mN·m/°", "mNm/°") +MillinewtonMillimeterPerDegree = ("mN·mm/deg", "mNmm/deg", "mN·mm/°", "mNmm/°") +MillinewtonMillimeterPerRadian = ("mN·mm/rad", "mNmm/rad") +NanonewtonMeterPerDegree = ("nN·m/deg", "nNm/deg", "nN·m/°", "nNm/°") +NanonewtonMillimeterPerDegree = ("nN·mm/deg", "nNmm/deg", "nN·mm/°", "nNmm/°") +NanonewtonMillimeterPerRadian = ("nN·mm/rad", "nNmm/rad") +NewtonMeterPerDegree = ("N·m/deg", "Nm/deg", "N·m/°", "Nm/°") +NewtonMeterPerRadian = ("N·m/rad", "Nm/rad") +NewtonMillimeterPerDegree = ("N·mm/deg", "Nmm/deg", "N·mm/°", "Nmm/°") +NewtonMillimeterPerRadian = ("N·mm/rad", "Nmm/rad") +PoundForceFeetPerRadian = ("lbf·ft/rad") +PoundForceFootPerDegrees = ("lbf·ft/deg") diff --git a/UnitsNet/GeneratedCode/Resources/RotationalStiffnessPerLength.en-US.restext b/UnitsNet/GeneratedCode/Resources/RotationalStiffnessPerLength.en-US.restext new file mode 100644 index 0000000000..c567e68bcf --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/RotationalStiffnessPerLength.en-US.restext @@ -0,0 +1,5 @@ +KilonewtonMeterPerRadianPerMeter = ("kN·m/rad/m", "kNm/rad/m") +KilopoundForceFootPerDegreesPerFoot = ("kipf·ft/°/ft", "kip·ft/°/ft", "k·ft/°/ft", "kipf·ft/deg/ft", "kip·ft/deg/ft", "k·ft/deg/ft") +MeganewtonMeterPerRadianPerMeter = ("MN·m/rad/m", "MNm/rad/m") +NewtonMeterPerRadianPerMeter = ("N·m/rad/m", "Nm/rad/m") +PoundForceFootPerDegreesPerFoot = ("lbf·ft/deg/ft") diff --git a/UnitsNet/GeneratedCode/Resources/Scalar.en-US.restext b/UnitsNet/GeneratedCode/Resources/Scalar.en-US.restext new file mode 100644 index 0000000000..f2220753f7 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Scalar.en-US.restext @@ -0,0 +1 @@ +Amount = ("") diff --git a/UnitsNet/GeneratedCode/Resources/SolidAngle.en-US.restext b/UnitsNet/GeneratedCode/Resources/SolidAngle.en-US.restext new file mode 100644 index 0000000000..c526b3ee3c --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/SolidAngle.en-US.restext @@ -0,0 +1 @@ +Steradian = ("sr") diff --git a/UnitsNet/GeneratedCode/Resources/SpecificEnergy.en-US.restext b/UnitsNet/GeneratedCode/Resources/SpecificEnergy.en-US.restext new file mode 100644 index 0000000000..5200a8ba14 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/SpecificEnergy.en-US.restext @@ -0,0 +1,30 @@ +BtuPerPound = ("btu/lb") +CaloriePerGram = ("cal/g") +GigawattDayPerKilogram = ("GWd/kg") +GigawattDayPerShortTon = ("GWd/ST") +GigawattDayPerTonne = ("GWd/t") +GigawattHourPerKilogram = ("GWh/kg") +GigawattHourPerPound = ("GWh/lbs") +JoulePerKilogram = ("J/kg") +KilocaloriePerGram = ("kcal/g") +KilojoulePerKilogram = ("kJ/kg") +KilowattDayPerKilogram = ("kWd/kg") +KilowattDayPerShortTon = ("kWd/ST") +KilowattDayPerTonne = ("kWd/t") +KilowattHourPerKilogram = ("kWh/kg") +KilowattHourPerPound = ("kWh/lbs") +MegajoulePerKilogram = ("MJ/kg") +MegaJoulePerTonne = ("MJ/t") +MegawattDayPerKilogram = ("MWd/kg") +MegawattDayPerShortTon = ("MWd/ST") +MegawattDayPerTonne = ("MWd/t") +MegawattHourPerKilogram = ("MWh/kg") +MegawattHourPerPound = ("MWh/lbs") +TerawattDayPerKilogram = ("TWd/kg") +TerawattDayPerShortTon = ("TWd/ST") +TerawattDayPerTonne = ("TWd/t") +WattDayPerKilogram = ("Wd/kg") +WattDayPerShortTon = ("Wd/ST") +WattDayPerTonne = ("Wd/t") +WattHourPerKilogram = ("Wh/kg") +WattHourPerPound = ("Wh/lbs") diff --git a/UnitsNet/GeneratedCode/Resources/SpecificEntropy.en-US.restext b/UnitsNet/GeneratedCode/Resources/SpecificEntropy.en-US.restext new file mode 100644 index 0000000000..6fd71a76c7 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/SpecificEntropy.en-US.restext @@ -0,0 +1,9 @@ +BtuPerPoundFahrenheit = ("BTU/lb·°F", "BTU/lbm·°F") +CaloriePerGramKelvin = ("cal/g.K") +JoulePerKilogramDegreeCelsius = ("J/kg.C") +JoulePerKilogramKelvin = ("J/kg.K") +KilocaloriePerGramKelvin = ("kcal/g.K") +KilojoulePerKilogramDegreeCelsius = ("kJ/kg.C") +KilojoulePerKilogramKelvin = ("kJ/kg.K") +MegajoulePerKilogramDegreeCelsius = ("MJ/kg.C") +MegajoulePerKilogramKelvin = ("MJ/kg.K") diff --git a/UnitsNet/GeneratedCode/Resources/SpecificFuelConsumption.en-US.restext b/UnitsNet/GeneratedCode/Resources/SpecificFuelConsumption.en-US.restext new file mode 100644 index 0000000000..0eb517caa5 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/SpecificFuelConsumption.en-US.restext @@ -0,0 +1,4 @@ +GramPerKiloNewtonSecond = ("g/(kN�s)") +KilogramPerKilogramForceHour = ("kg/(kgf�h)") +KilogramPerKiloNewtonSecond = ("kg/(kN�s)") +PoundMassPerPoundForceHour = ("lb/(lbf·h)") diff --git a/UnitsNet/GeneratedCode/Resources/SpecificVolume.en-US.restext b/UnitsNet/GeneratedCode/Resources/SpecificVolume.en-US.restext new file mode 100644 index 0000000000..83ade71717 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/SpecificVolume.en-US.restext @@ -0,0 +1,3 @@ +CubicFootPerPound = ("ft³/lb") +CubicMeterPerKilogram = ("m³/kg") +MillicubicMeterPerKilogram = ("mm³/kg") diff --git a/UnitsNet/GeneratedCode/Resources/SpecificWeight.en-US.restext b/UnitsNet/GeneratedCode/Resources/SpecificWeight.en-US.restext new file mode 100644 index 0000000000..ee017c4479 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/SpecificWeight.en-US.restext @@ -0,0 +1,17 @@ +KilogramForcePerCubicCentimeter = ("kgf/cm³") +KilogramForcePerCubicMeter = ("kgf/m³") +KilogramForcePerCubicMillimeter = ("kgf/mm³") +KilonewtonPerCubicCentimeter = ("kN/cm³") +KilonewtonPerCubicMeter = ("kN/m³") +KilonewtonPerCubicMillimeter = ("kN/mm³") +KilopoundForcePerCubicFoot = ("kipf/ft³") +KilopoundForcePerCubicInch = ("kipf/in³") +MeganewtonPerCubicMeter = ("MN/m³") +NewtonPerCubicCentimeter = ("N/cm³") +NewtonPerCubicMeter = ("N/m³") +NewtonPerCubicMillimeter = ("N/mm³") +PoundForcePerCubicFoot = ("lbf/ft³") +PoundForcePerCubicInch = ("lbf/in³") +TonneForcePerCubicCentimeter = ("tf/cm³") +TonneForcePerCubicMeter = ("tf/m³") +TonneForcePerCubicMillimeter = ("tf/mm³") diff --git a/UnitsNet/GeneratedCode/Resources/Speed.en-US.restext b/UnitsNet/GeneratedCode/Resources/Speed.en-US.restext new file mode 100644 index 0000000000..cf07e1e06b --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Speed.en-US.restext @@ -0,0 +1,33 @@ +CentimeterPerHour = ("cm/h") +CentimeterPerMinute = ("cm/min") +CentimeterPerSecond = ("cm/s") +DecimeterPerMinute = ("dm/min") +DecimeterPerSecond = ("dm/s") +FootPerHour = ("ft/h") +FootPerMinute = ("ft/min") +FootPerSecond = ("ft/s") +InchPerHour = ("in/h") +InchPerMinute = ("in/min") +InchPerSecond = ("in/s") +KilometerPerHour = ("km/h") +KilometerPerMinute = ("km/min") +KilometerPerSecond = ("km/s") +Knot = ("kn", "kt", "knot", "knots") +Mach = ("M", "Ma", "MN", "MACH") +MeterPerHour = ("m/h") +MeterPerMinute = ("m/min") +MeterPerSecond = ("m/s") +MicrometerPerMinute = ("µm/min") +MicrometerPerSecond = ("µm/s") +MilePerHour = ("mph") +MillimeterPerHour = ("mm/h") +MillimeterPerMinute = ("mm/min") +MillimeterPerSecond = ("mm/s") +NanometerPerMinute = ("nm/min") +NanometerPerSecond = ("nm/s") +UsSurveyFootPerHour = ("ftUS/h") +UsSurveyFootPerMinute = ("ftUS/min") +UsSurveyFootPerSecond = ("ftUS/s") +YardPerHour = ("yd/h") +YardPerMinute = ("yd/min") +YardPerSecond = ("yd/s") diff --git a/UnitsNet/GeneratedCode/Resources/StandardVolumeFlow.en-US.restext b/UnitsNet/GeneratedCode/Resources/StandardVolumeFlow.en-US.restext new file mode 100644 index 0000000000..c97c3c0ea0 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/StandardVolumeFlow.en-US.restext @@ -0,0 +1,9 @@ +StandardCubicCentimeterPerMinute = ("sccm") +StandardCubicFootPerHour = ("scfh") +StandardCubicFootPerMinute = ("scfm") +StandardCubicFootPerSecond = ("Sft³/s") +StandardCubicMeterPerDay = ("Sm³/d") +StandardCubicMeterPerHour = ("Sm³/h") +StandardCubicMeterPerMinute = ("Sm³/min") +StandardCubicMeterPerSecond = ("Sm³/s") +StandardLiterPerMinute = ("slm") diff --git a/UnitsNet/GeneratedCode/Resources/Temperature.en-US.restext b/UnitsNet/GeneratedCode/Resources/Temperature.en-US.restext new file mode 100644 index 0000000000..3179bd6910 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Temperature.en-US.restext @@ -0,0 +1,10 @@ +DegreeCelsius = ("°C") +DegreeDelisle = ("°De") +DegreeFahrenheit = ("°F") +DegreeNewton = ("°N") +DegreeRankine = ("°R") +DegreeReaumur = ("°Ré") +DegreeRoemer = ("°Rø") +Kelvin = ("K") +MillidegreeCelsius = ("m°C") +SolarTemperature = ("T⊙") diff --git a/UnitsNet/GeneratedCode/Resources/TemperatureChangeRate.en-US.restext b/UnitsNet/GeneratedCode/Resources/TemperatureChangeRate.en-US.restext new file mode 100644 index 0000000000..8255db7990 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/TemperatureChangeRate.en-US.restext @@ -0,0 +1,10 @@ +CentidegreeCelsiusPerSecond = ("c°C/s") +DecadegreeCelsiusPerSecond = ("da°C/s") +DecidegreeCelsiusPerSecond = ("d°C/s") +DegreeCelsiusPerMinute = ("°C/min") +DegreeCelsiusPerSecond = ("°C/s") +HectodegreeCelsiusPerSecond = ("h°C/s") +KilodegreeCelsiusPerSecond = ("k°C/s") +MicrodegreeCelsiusPerSecond = ("µ°C/s") +MillidegreeCelsiusPerSecond = ("m°C/s") +NanodegreeCelsiusPerSecond = ("n°C/s") diff --git a/UnitsNet/GeneratedCode/Resources/TemperatureDelta.en-US.restext b/UnitsNet/GeneratedCode/Resources/TemperatureDelta.en-US.restext new file mode 100644 index 0000000000..3d1c2de632 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/TemperatureDelta.en-US.restext @@ -0,0 +1,9 @@ +DegreeCelsius = ("∆°C") +DegreeDelisle = ("∆°De") +DegreeFahrenheit = ("∆°F") +DegreeNewton = ("∆°N") +DegreeRankine = ("∆°R") +DegreeReaumur = ("∆°Ré") +DegreeRoemer = ("∆°Rø") +Kelvin = ("∆K") +MillidegreeCelsius = ("∆m°C") diff --git a/UnitsNet/GeneratedCode/Resources/TemperatureGradient.en-US.restext b/UnitsNet/GeneratedCode/Resources/TemperatureGradient.en-US.restext new file mode 100644 index 0000000000..a05b6b13dd --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/TemperatureGradient.en-US.restext @@ -0,0 +1,4 @@ +DegreeCelsiusPerKilometer = ("∆°C/km") +DegreeCelsiusPerMeter = ("∆°C/m") +DegreeFahrenheitPerFoot = ("∆°F/ft") +KelvinPerMeter = ("∆°K/m") diff --git a/UnitsNet/GeneratedCode/Resources/ThermalConductivity.en-US.restext b/UnitsNet/GeneratedCode/Resources/ThermalConductivity.en-US.restext new file mode 100644 index 0000000000..947a9e3dbf --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ThermalConductivity.en-US.restext @@ -0,0 +1,2 @@ +BtuPerHourFootFahrenheit = ("BTU/h·ft·°F") +WattPerMeterKelvin = ("W/m·K") diff --git a/UnitsNet/GeneratedCode/Resources/ThermalResistance.en-US.restext b/UnitsNet/GeneratedCode/Resources/ThermalResistance.en-US.restext new file mode 100644 index 0000000000..192f9991cf --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ThermalResistance.en-US.restext @@ -0,0 +1,6 @@ +HourSquareFeetDegreeFahrenheitPerBtu = ("Hrft²°F/Btu") +SquareCentimeterHourDegreeCelsiusPerKilocalorie = ("cm²Hr°C/kcal") +SquareCentimeterKelvinPerWatt = ("cm²K/W") +SquareMeterDegreeCelsiusPerWatt = ("m²°C/W") +SquareMeterKelvinPerKilowatt = ("m²K/kW") +SquareMeterKelvinPerWatt = ("m²K/W") diff --git a/UnitsNet/GeneratedCode/Resources/Torque.en-US.restext b/UnitsNet/GeneratedCode/Resources/Torque.en-US.restext new file mode 100644 index 0000000000..ac732fd9c3 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Torque.en-US.restext @@ -0,0 +1,25 @@ +GramForceCentimeter = ("gf·cm") +GramForceMeter = ("gf·m") +GramForceMillimeter = ("gf·mm") +KilogramForceCentimeter = ("kgf·cm") +KilogramForceMeter = ("kgf·m") +KilogramForceMillimeter = ("kgf·mm") +KilonewtonCentimeter = ("kN·cm") +KilonewtonMeter = ("kN·m") +KilonewtonMillimeter = ("kN·mm") +KilopoundForceFoot = ("kipf·ft") +KilopoundForceInch = ("kipf·in") +MeganewtonCentimeter = ("MN·cm") +MeganewtonMeter = ("MN·m") +MeganewtonMillimeter = ("MN·mm") +MegapoundForceFoot = ("Mlbf·ft") +MegapoundForceInch = ("Mlbf·in") +NewtonCentimeter = ("N·cm") +NewtonMeter = ("N·m") +NewtonMillimeter = ("N·mm") +PoundalFoot = ("pdl·ft") +PoundForceFoot = ("lbf·ft") +PoundForceInch = ("lbf·in") +TonneForceCentimeter = ("tf·cm") +TonneForceMeter = ("tf·m") +TonneForceMillimeter = ("tf·mm") diff --git a/UnitsNet/GeneratedCode/Resources/TorquePerLength.en-US.restext b/UnitsNet/GeneratedCode/Resources/TorquePerLength.en-US.restext new file mode 100644 index 0000000000..dcaf3c40c6 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/TorquePerLength.en-US.restext @@ -0,0 +1,21 @@ +KilogramForceCentimeterPerMeter = ("kgf·cm/m") +KilogramForceMeterPerMeter = ("kgf·m/m") +KilogramForceMillimeterPerMeter = ("kgf·mm/m") +KilonewtonCentimeterPerMeter = ("kN·cm/m") +KilonewtonMeterPerMeter = ("kN·m/m") +KilonewtonMillimeterPerMeter = ("kN·mm/m") +KilopoundForceFootPerFoot = ("kipf·ft/ft") +KilopoundForceInchPerFoot = ("kipf·in/ft") +MeganewtonCentimeterPerMeter = ("MN·cm/m") +MeganewtonMeterPerMeter = ("MN·m/m") +MeganewtonMillimeterPerMeter = ("MN·mm/m") +MegapoundForceFootPerFoot = ("Mlbf·ft/ft") +MegapoundForceInchPerFoot = ("Mlbf·in/ft") +NewtonCentimeterPerMeter = ("N·cm/m") +NewtonMeterPerMeter = ("N·m/m") +NewtonMillimeterPerMeter = ("N·mm/m") +PoundForceFootPerFoot = ("lbf·ft/ft") +PoundForceInchPerFoot = ("lbf·in/ft") +TonneForceCentimeterPerMeter = ("tf·cm/m") +TonneForceMeterPerMeter = ("tf·m/m") +TonneForceMillimeterPerMeter = ("tf·mm/m") diff --git a/UnitsNet/GeneratedCode/Resources/Turbidity.en-US.restext b/UnitsNet/GeneratedCode/Resources/Turbidity.en-US.restext new file mode 100644 index 0000000000..42332b88b9 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Turbidity.en-US.restext @@ -0,0 +1 @@ +NTU = ("NTU") diff --git a/UnitsNet/GeneratedCode/Resources/VitaminA.en-US.restext b/UnitsNet/GeneratedCode/Resources/VitaminA.en-US.restext new file mode 100644 index 0000000000..f8da7c7e6c --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/VitaminA.en-US.restext @@ -0,0 +1 @@ +InternationalUnit = ("IU") diff --git a/UnitsNet/GeneratedCode/Resources/Volume.en-US.restext b/UnitsNet/GeneratedCode/Resources/Volume.en-US.restext new file mode 100644 index 0000000000..b9c1db3619 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Volume.en-US.restext @@ -0,0 +1,46 @@ +AcreFoot = ("ac-ft", "acre-foot", "acre-feet") +BoardFoot = ("bf", "board foot", "board feet") +Centiliter = ("cl") +CubicCentimeter = ("cm³") +CubicDecimeter = ("dm³") +CubicFoot = ("ft³") +CubicHectometer = ("hm³") +CubicInch = ("in³") +CubicKilometer = ("km³") +CubicMeter = ("m³") +CubicMicrometer = ("µm³") +CubicMile = ("mi³") +CubicMillimeter = ("mm³") +CubicYard = ("yd³") +Decaliter = ("dal") +DecausGallon = ("dagal (U.S.)") +Deciliter = ("dl") +DeciusGallon = ("dgal (U.S.)") +HectocubicFoot = ("hft³") +HectocubicMeter = ("hm³") +Hectoliter = ("hl") +HectousGallon = ("hgal (U.S.)") +ImperialBeerBarrel = ("bl (imp.)") +ImperialGallon = ("gal (imp.)") +ImperialOunce = ("oz (imp.)") +ImperialPint = ("pt (imp.)", "UK pt", "pt", "p") +KilocubicFoot = ("kft³") +KilocubicMeter = ("km³") +KiloimperialGallon = ("kgal (imp.)") +Kiloliter = ("kl") +KilousGallon = ("kgal (U.S.)") +Liter = ("l") +MegacubicFoot = ("Mft³") +MegaimperialGallon = ("Mgal (imp.)") +Megaliter = ("Ml") +MegausGallon = ("Mgal (U.S.)") +MetricTeaspoon = ("tsp", "t", "ts", "tspn", "t.", "ts.", "tsp.", "tspn.", "teaspoon") +Microliter = ("µl") +Milliliter = ("ml") +Nanoliter = ("nl") +OilBarrel = ("bbl") +UsBeerBarrel = ("bl (U.S.)") +UsGallon = ("gal (U.S.)") +UsOunce = ("oz (U.S.)") +UsPint = ("pt (U.S.)") +UsQuart = ("qt (U.S.)") diff --git a/UnitsNet/GeneratedCode/Resources/VolumeConcentration.en-US.restext b/UnitsNet/GeneratedCode/Resources/VolumeConcentration.en-US.restext new file mode 100644 index 0000000000..ad9b6fc2c0 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/VolumeConcentration.en-US.restext @@ -0,0 +1,20 @@ +CentilitersPerLiter = ("cL/L") +CentilitersPerMililiter = ("cL/mL") +DecilitersPerLiter = ("dL/L") +DecilitersPerMililiter = ("dL/mL") +DecimalFraction = ("") +LitersPerLiter = ("L/L") +LitersPerMililiter = ("L/mL") +MicrolitersPerLiter = ("µL/L") +MicrolitersPerMililiter = ("µL/mL") +MillilitersPerLiter = ("mL/L") +MillilitersPerMililiter = ("mL/mL") +NanolitersPerLiter = ("nL/L") +NanolitersPerMililiter = ("nL/mL") +PartPerBillion = ("ppb") +PartPerMillion = ("ppm") +PartPerThousand = ("‰") +PartPerTrillion = ("ppt") +Percent = ("%", "% (v/v)") +PicolitersPerLiter = ("pL/L") +PicolitersPerMililiter = ("pL/mL") diff --git a/UnitsNet/GeneratedCode/Resources/VolumeFlow.en-US.restext b/UnitsNet/GeneratedCode/Resources/VolumeFlow.en-US.restext new file mode 100644 index 0000000000..36d16bd97a --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/VolumeFlow.en-US.restext @@ -0,0 +1,62 @@ +AcreFootPerDay = ("af/d") +AcreFootPerHour = ("af/h") +AcreFootPerMinute = ("af/m") +AcreFootPerSecond = ("af/s") +CentiliterPerDay = ("cl/day", "cL/d", "cLPD") +CentiliterPerHour = ("cL/h", "cLPH") +CentiliterPerMinute = ("cL/min", "cLPM") +CentiliterPerSecond = ("cL/s", "cLPS") +CubicCentimeterPerMinute = ("cm³/min") +CubicDecimeterPerMinute = ("dm³/min") +CubicFootPerHour = ("ft³/h", "cf/hr") +CubicFootPerMinute = ("ft³/min", "CFM") +CubicFootPerSecond = ("ft³/s") +CubicMeterPerDay = ("m³/d") +CubicMeterPerHour = ("m³/h") +CubicMeterPerMinute = ("m³/min") +CubicMeterPerSecond = ("m³/s") +CubicMillimeterPerSecond = ("mm³/s") +CubicYardPerDay = ("cy/day") +CubicYardPerHour = ("yd³/h") +CubicYardPerMinute = ("yd³/min") +CubicYardPerSecond = ("yd³/s") +DeciliterPerDay = ("dl/day", "dL/d", "dLPD") +DeciliterPerHour = ("dL/h", "dLPH") +DeciliterPerMinute = ("dL/min", "dLPM") +DeciliterPerSecond = ("dL/s", "dLPS") +KiloliterPerDay = ("kl/day", "kL/d", "kLPD") +KiloliterPerHour = ("kL/h", "kLPH") +KiloliterPerMinute = ("kL/min", "kLPM") +KiloliterPerSecond = ("kL/s", "kLPS") +KilousGallonPerMinute = ("kgal (U.S.)/min", "KGPM") +LiterPerDay = ("l/day", "L/d", "LPD") +LiterPerHour = ("L/h", "LPH") +LiterPerMinute = ("L/min", "LPM") +LiterPerSecond = ("L/s", "LPS") +MegaliterPerDay = ("Ml/day", "ML/d", "MLPD") +MegaukGallonPerSecond = ("Mgal (imp.)/s") +MicroliterPerDay = ("µl/day", "µL/d", "µLPD") +MicroliterPerHour = ("µL/h", "µLPH") +MicroliterPerMinute = ("µL/min", "µLPM") +MicroliterPerSecond = ("µL/s", "µLPS") +MilliliterPerDay = ("ml/day", "mL/d", "mLPD") +MilliliterPerHour = ("mL/h", "mLPH") +MilliliterPerMinute = ("mL/min", "mLPM") +MilliliterPerSecond = ("mL/s", "mLPS") +MillionUsGallonPerDay = ("MGD") +NanoliterPerDay = ("nl/day", "nL/d", "nLPD") +NanoliterPerHour = ("nL/h", "nLPH") +NanoliterPerMinute = ("nL/min", "nLPM") +NanoliterPerSecond = ("nL/s", "nLPS") +OilBarrelPerDay = ("bbl/d", "BOPD") +OilBarrelPerHour = ("bbl/hr", "bph") +OilBarrelPerMinute = ("bbl/min", "bpm") +OilBarrelPerSecond = ("bbl/s") +UkGallonPerDay = ("gal (U. K.)/d") +UkGallonPerHour = ("gal (imp.)/h") +UkGallonPerMinute = ("gal (imp.)/min") +UkGallonPerSecond = ("gal (imp.)/s") +UsGallonPerDay = ("gpd", "gal/d") +UsGallonPerHour = ("gal (U.S.)/h") +UsGallonPerMinute = ("gal (U.S.)/min", "GPM") +UsGallonPerSecond = ("gal (U.S.)/s") diff --git a/UnitsNet/GeneratedCode/Resources/VolumeFlowPerArea.en-US.restext b/UnitsNet/GeneratedCode/Resources/VolumeFlowPerArea.en-US.restext new file mode 100644 index 0000000000..92c6735b8d --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/VolumeFlowPerArea.en-US.restext @@ -0,0 +1,2 @@ +CubicFootPerMinutePerSquareFoot = ("CFM/ft²") +CubicMeterPerSecondPerSquareMeter = ("m³/(s·m²)") diff --git a/UnitsNet/GeneratedCode/Resources/VolumePerLength.en-US.restext b/UnitsNet/GeneratedCode/Resources/VolumePerLength.en-US.restext new file mode 100644 index 0000000000..21731df5c8 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/VolumePerLength.en-US.restext @@ -0,0 +1,7 @@ +CubicMeterPerMeter = ("m³/m") +CubicYardPerFoot = ("yd³/ft") +CubicYardPerUsSurveyFoot = ("yd³/ftUS") +LiterPerKilometer = ("l/km") +LiterPerMeter = ("l/m") +LiterPerMillimeter = ("l/mm") +OilBarrelPerFoot = ("bbl/ft") diff --git a/UnitsNet/GeneratedCode/Resources/VolumetricHeatCapacity.en-US.restext b/UnitsNet/GeneratedCode/Resources/VolumetricHeatCapacity.en-US.restext new file mode 100644 index 0000000000..69718edc1b --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/VolumetricHeatCapacity.en-US.restext @@ -0,0 +1,9 @@ +BtuPerCubicFootDegreeFahrenheit = ("BTU/ft³·°F") +CaloriePerCubicCentimeterDegreeCelsius = ("cal/cm³·°C") +JoulePerCubicMeterDegreeCelsius = ("J/m³·°C") +JoulePerCubicMeterKelvin = ("J/m³·K") +KilocaloriePerCubicCentimeterDegreeCelsius = ("kcal/cm³·°C") +KilojoulePerCubicMeterDegreeCelsius = ("kJ/m³·°C") +KilojoulePerCubicMeterKelvin = ("kJ/m³·K") +MegajoulePerCubicMeterDegreeCelsius = ("MJ/m³·°C") +MegajoulePerCubicMeterKelvin = ("MJ/m³·K") diff --git a/UnitsNet/GeneratedCode/Resources/WarpingMomentOfInertia.en-US.restext b/UnitsNet/GeneratedCode/Resources/WarpingMomentOfInertia.en-US.restext new file mode 100644 index 0000000000..8ff5452f20 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/WarpingMomentOfInertia.en-US.restext @@ -0,0 +1,6 @@ +CentimeterToTheSixth = ("cm⁶", "cm^6") +DecimeterToTheSixth = ("dm⁶", "dm^6") +FootToTheSixth = ("ft⁶", "ft^6") +InchToTheSixth = ("in⁶", "in^6") +MeterToTheSixth = ("m⁶", "m^6") +MillimeterToTheSixth = ("mm⁶", "mm^6") diff --git a/UnitsNet/UnitsNet.csproj b/UnitsNet/UnitsNet.csproj index 996c5cdfae..2fae369204 100644 --- a/UnitsNet/UnitsNet.csproj +++ b/UnitsNet/UnitsNet.csproj @@ -66,7 +66,7 @@ - + From d764ede7cda624a62fe83be620af3a2937860233 Mon Sep 17 00:00:00 2001 From: Tristan Milnthorp Date: Tue, 21 Feb 2023 16:22:04 -0500 Subject: [PATCH 05/26] Remove cultureless --- .../Resources/Acceleration.restext | 14 ----- .../Resources/AmountOfSubstance.restext | 15 ----- .../Resources/AmplitudeRatio.restext | 4 -- .../GeneratedCode/Resources/Angle.restext | 16 ----- .../Resources/ApparentEnergy.restext | 3 - .../Resources/ApparentPower.restext | 6 -- UnitsNet/GeneratedCode/Resources/Area.restext | 14 ----- .../Resources/AreaDensity.restext | 3 - .../Resources/AreaMomentOfInertia.restext | 6 -- .../GeneratedCode/Resources/BitRate.restext | 26 -------- .../BrakeSpecificFuelConsumption.restext | 3 - .../Resources/Capacitance.restext | 7 --- .../CoefficientOfThermalExpansion.restext | 3 - .../Resources/Compressibility.restext | 7 --- .../GeneratedCode/Resources/Density.restext | 51 --------------- .../GeneratedCode/Resources/Duration.restext | 11 ---- .../Resources/DynamicViscosity.restext | 10 --- .../Resources/ElectricAdmittance.restext | 4 -- .../Resources/ElectricCharge.restext | 11 ---- .../Resources/ElectricChargeDensity.restext | 1 - .../Resources/ElectricConductance.restext | 5 -- .../Resources/ElectricConductivity.restext | 6 -- .../Resources/ElectricCurrent.restext | 9 --- .../Resources/ElectricCurrentDensity.restext | 3 - .../Resources/ElectricCurrentGradient.restext | 4 -- .../Resources/ElectricField.restext | 1 - .../Resources/ElectricInductance.restext | 5 -- .../Resources/ElectricPotential.restext | 6 -- .../Resources/ElectricPotentialAc.restext | 5 -- .../ElectricPotentialChangeRate.restext | 20 ------ .../Resources/ElectricPotentialDc.restext | 5 -- .../Resources/ElectricResistance.restext | 7 --- .../Resources/ElectricResistivity.restext | 14 ----- .../ElectricSurfaceChargeDensity.restext | 3 - .../GeneratedCode/Resources/Energy.restext | 38 ------------ .../Resources/EnergyDensity.restext | 12 ---- .../GeneratedCode/Resources/Entropy.restext | 7 --- .../GeneratedCode/Resources/Force.restext | 15 ----- .../Resources/ForceChangeRate.restext | 15 ----- .../Resources/ForcePerLength.restext | 38 ------------ .../GeneratedCode/Resources/Frequency.restext | 13 ---- .../Resources/FuelEfficiency.restext | 4 -- .../GeneratedCode/Resources/HeatFlux.restext | 18 ------ .../Resources/HeatTransferCoefficient.restext | 6 -- .../Resources/Illuminance.restext | 4 -- .../GeneratedCode/Resources/Impulse.restext | 13 ---- .../Resources/Information.restext | 26 -------- .../Resources/Irradiance.restext | 14 ----- .../Resources/Irradiation.restext | 7 --- UnitsNet/GeneratedCode/Resources/Jerk.restext | 11 ---- .../Resources/KinematicViscosity.restext | 9 --- .../GeneratedCode/Resources/Length.restext | 36 ----------- .../GeneratedCode/Resources/Level.restext | 2 - .../Resources/LinearDensity.restext | 14 ----- .../Resources/LinearPowerDensity.restext | 25 -------- .../GeneratedCode/Resources/Luminance.restext | 10 --- .../Resources/Luminosity.restext | 14 ----- .../Resources/LuminousFlux.restext | 1 - .../Resources/LuminousIntensity.restext | 1 - .../Resources/MagneticField.restext | 6 -- .../Resources/MagneticFlux.restext | 1 - .../Resources/Magnetization.restext | 1 - UnitsNet/GeneratedCode/Resources/Mass.restext | 25 -------- .../Resources/MassConcentration.restext | 49 --------------- .../GeneratedCode/Resources/MassFlow.restext | 33 ---------- .../GeneratedCode/Resources/MassFlux.restext | 12 ---- .../Resources/MassFraction.restext | 24 ------- .../Resources/MassMomentOfInertia.restext | 28 --------- .../Resources/MolarEnergy.restext | 3 - .../Resources/MolarEntropy.restext | 3 - .../GeneratedCode/Resources/MolarFlow.restext | 9 --- .../GeneratedCode/Resources/MolarMass.restext | 13 ---- .../GeneratedCode/Resources/Molarity.restext | 11 ---- .../Resources/Permeability.restext | 1 - .../Resources/Permittivity.restext | 1 - .../PorousMediumPermeability.restext | 5 -- .../GeneratedCode/Resources/Power.restext | 26 -------- .../Resources/PowerDensity.restext | 44 ------------- .../Resources/PowerRatio.restext | 2 - .../GeneratedCode/Resources/Pressure.restext | 47 -------------- .../Resources/PressureChangeRate.restext | 14 ----- .../GeneratedCode/Resources/Ratio.restext | 6 -- .../Resources/RatioChangeRate.restext | 2 - .../Resources/ReactiveEnergy.restext | 3 - .../Resources/ReactivePower.restext | 4 -- .../Resources/ReciprocalArea.restext | 11 ---- .../Resources/ReciprocalLength.restext | 10 --- .../Resources/RelativeHumidity.restext | 1 - .../Resources/RotationalAcceleration.restext | 4 -- .../Resources/RotationalSpeed.restext | 13 ---- .../Resources/RotationalStiffness.restext | 33 ---------- .../RotationalStiffnessPerLength.restext | 5 -- .../GeneratedCode/Resources/Scalar.restext | 1 - .../Resources/SolidAngle.restext | 1 - .../Resources/SpecificEnergy.restext | 30 --------- .../Resources/SpecificEntropy.restext | 9 --- .../Resources/SpecificFuelConsumption.restext | 4 -- .../Resources/SpecificVolume.restext | 3 - .../Resources/SpecificWeight.restext | 17 ----- .../GeneratedCode/Resources/Speed.restext | 33 ---------- .../Resources/StandardVolumeFlow.restext | 9 --- .../Resources/Temperature.restext | 10 --- .../Resources/TemperatureChangeRate.restext | 10 --- .../Resources/TemperatureDelta.restext | 9 --- .../Resources/TemperatureGradient.restext | 4 -- .../Resources/ThermalConductivity.restext | 2 - .../Resources/ThermalResistance.restext | 6 -- .../GeneratedCode/Resources/Torque.restext | 25 -------- .../Resources/TorquePerLength.restext | 21 ------- .../GeneratedCode/Resources/Turbidity.restext | 1 - .../GeneratedCode/Resources/VitaminA.restext | 1 - .../GeneratedCode/Resources/Volume.restext | 46 -------------- .../Resources/VolumeConcentration.restext | 20 ------ .../Resources/VolumeFlow.restext | 62 ------------------- .../Resources/VolumeFlowPerArea.restext | 2 - .../Resources/VolumePerLength.restext | 7 --- .../Resources/VolumetricHeatCapacity.restext | 9 --- .../Resources/WarpingMomentOfInertia.restext | 6 -- 118 files changed, 1459 deletions(-) delete mode 100644 UnitsNet/GeneratedCode/Resources/Acceleration.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/AmountOfSubstance.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/AmplitudeRatio.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/Angle.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/ApparentEnergy.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/ApparentPower.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/Area.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/AreaDensity.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/AreaMomentOfInertia.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/BitRate.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/BrakeSpecificFuelConsumption.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/Capacitance.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/CoefficientOfThermalExpansion.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/Compressibility.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/Density.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/Duration.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/DynamicViscosity.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/ElectricAdmittance.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/ElectricCharge.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/ElectricChargeDensity.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/ElectricConductance.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/ElectricConductivity.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/ElectricCurrent.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/ElectricCurrentDensity.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/ElectricCurrentGradient.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/ElectricField.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/ElectricInductance.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/ElectricPotential.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/ElectricPotentialAc.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/ElectricPotentialChangeRate.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/ElectricPotentialDc.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/ElectricResistance.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/ElectricResistivity.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/ElectricSurfaceChargeDensity.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/Energy.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/EnergyDensity.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/Entropy.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/Force.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/ForceChangeRate.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/ForcePerLength.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/Frequency.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/FuelEfficiency.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/HeatFlux.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/HeatTransferCoefficient.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/Illuminance.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/Impulse.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/Information.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/Irradiance.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/Irradiation.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/Jerk.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/KinematicViscosity.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/Length.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/Level.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/LinearDensity.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/LinearPowerDensity.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/Luminance.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/Luminosity.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/LuminousFlux.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/LuminousIntensity.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/MagneticField.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/MagneticFlux.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/Magnetization.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/Mass.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/MassConcentration.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/MassFlow.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/MassFlux.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/MassFraction.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/MassMomentOfInertia.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/MolarEnergy.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/MolarEntropy.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/MolarFlow.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/MolarMass.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/Molarity.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/Permeability.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/Permittivity.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/PorousMediumPermeability.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/Power.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/PowerDensity.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/PowerRatio.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/Pressure.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/PressureChangeRate.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/Ratio.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/RatioChangeRate.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/ReactiveEnergy.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/ReactivePower.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/ReciprocalArea.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/ReciprocalLength.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/RelativeHumidity.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/RotationalAcceleration.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/RotationalSpeed.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/RotationalStiffness.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/RotationalStiffnessPerLength.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/Scalar.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/SolidAngle.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/SpecificEnergy.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/SpecificEntropy.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/SpecificFuelConsumption.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/SpecificVolume.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/SpecificWeight.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/Speed.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/StandardVolumeFlow.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/Temperature.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/TemperatureChangeRate.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/TemperatureDelta.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/TemperatureGradient.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/ThermalConductivity.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/ThermalResistance.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/Torque.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/TorquePerLength.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/Turbidity.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/VitaminA.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/Volume.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/VolumeConcentration.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/VolumeFlow.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/VolumeFlowPerArea.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/VolumePerLength.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/VolumetricHeatCapacity.restext delete mode 100644 UnitsNet/GeneratedCode/Resources/WarpingMomentOfInertia.restext diff --git a/UnitsNet/GeneratedCode/Resources/Acceleration.restext b/UnitsNet/GeneratedCode/Resources/Acceleration.restext deleted file mode 100644 index 839031b259..0000000000 --- a/UnitsNet/GeneratedCode/Resources/Acceleration.restext +++ /dev/null @@ -1,14 +0,0 @@ -CentimeterPerSecondSquared = ("cm/s²") -DecimeterPerSecondSquared = ("dm/s²") -FootPerSecondSquared = ("ft/s²") -InchPerSecondSquared = ("in/s²") -KilometerPerSecondSquared = ("km/s²") -KnotPerHour = ("kn/h") -KnotPerMinute = ("kn/min") -KnotPerSecond = ("kn/s") -MeterPerSecondSquared = ("m/s²") -MicrometerPerSecondSquared = ("µm/s²") -MillimeterPerSecondSquared = ("mm/s²") -MillistandardGravity = ("mg") -NanometerPerSecondSquared = ("nm/s²") -StandardGravity = ("g") diff --git a/UnitsNet/GeneratedCode/Resources/AmountOfSubstance.restext b/UnitsNet/GeneratedCode/Resources/AmountOfSubstance.restext deleted file mode 100644 index 55ac260539..0000000000 --- a/UnitsNet/GeneratedCode/Resources/AmountOfSubstance.restext +++ /dev/null @@ -1,15 +0,0 @@ -Centimole = ("cmol") -CentipoundMole = ("clbmol") -Decimole = ("dmol") -DecipoundMole = ("dlbmol") -Kilomole = ("kmol") -KilopoundMole = ("klbmol") -Megamole = ("Mmol") -Micromole = ("µmol") -MicropoundMole = ("µlbmol") -Millimole = ("mmol") -MillipoundMole = ("mlbmol") -Mole = ("mol") -Nanomole = ("nmol") -NanopoundMole = ("nlbmol") -PoundMole = ("lbmol") diff --git a/UnitsNet/GeneratedCode/Resources/AmplitudeRatio.restext b/UnitsNet/GeneratedCode/Resources/AmplitudeRatio.restext deleted file mode 100644 index e3ded2c5e9..0000000000 --- a/UnitsNet/GeneratedCode/Resources/AmplitudeRatio.restext +++ /dev/null @@ -1,4 +0,0 @@ -DecibelMicrovolt = ("dBµV") -DecibelMillivolt = ("dBmV") -DecibelUnloaded = ("dBu") -DecibelVolt = ("dBV") diff --git a/UnitsNet/GeneratedCode/Resources/Angle.restext b/UnitsNet/GeneratedCode/Resources/Angle.restext deleted file mode 100644 index 662a021af6..0000000000 --- a/UnitsNet/GeneratedCode/Resources/Angle.restext +++ /dev/null @@ -1,16 +0,0 @@ -Arcminute = ("'", "arcmin", "amin", "min") -Arcsecond = ("″", "arcsec", "asec", "sec") -Centiradian = ("crad") -Deciradian = ("drad") -Degree = ("°", "deg") -Gradian = ("g") -Microdegree = ("µ°", "µdeg") -Microradian = ("µrad") -Millidegree = ("m°", "mdeg") -Milliradian = ("mrad") -Nanodegree = ("n°", "ndeg") -Nanoradian = ("nrad") -NatoMil = ("mil") -Radian = ("rad") -Revolution = ("r") -Tilt = ("sin(θ)") diff --git a/UnitsNet/GeneratedCode/Resources/ApparentEnergy.restext b/UnitsNet/GeneratedCode/Resources/ApparentEnergy.restext deleted file mode 100644 index c4fde5196b..0000000000 --- a/UnitsNet/GeneratedCode/Resources/ApparentEnergy.restext +++ /dev/null @@ -1,3 +0,0 @@ -KilovoltampereHour = ("kVAh") -MegavoltampereHour = ("MVAh") -VoltampereHour = ("VAh") diff --git a/UnitsNet/GeneratedCode/Resources/ApparentPower.restext b/UnitsNet/GeneratedCode/Resources/ApparentPower.restext deleted file mode 100644 index cc05dd136d..0000000000 --- a/UnitsNet/GeneratedCode/Resources/ApparentPower.restext +++ /dev/null @@ -1,6 +0,0 @@ -Gigavoltampere = ("GVA") -Kilovoltampere = ("kVA") -Megavoltampere = ("MVA") -Microvoltampere = ("µVA") -Millivoltampere = ("mVA") -Voltampere = ("VA") diff --git a/UnitsNet/GeneratedCode/Resources/Area.restext b/UnitsNet/GeneratedCode/Resources/Area.restext deleted file mode 100644 index e28966f1a1..0000000000 --- a/UnitsNet/GeneratedCode/Resources/Area.restext +++ /dev/null @@ -1,14 +0,0 @@ -Acre = ("ac") -Hectare = ("ha") -SquareCentimeter = ("cm²") -SquareDecimeter = ("dm²") -SquareFoot = ("ft²") -SquareInch = ("in²") -SquareKilometer = ("km²") -SquareMeter = ("m²") -SquareMicrometer = ("µm²") -SquareMile = ("mi²") -SquareMillimeter = ("mm²") -SquareNauticalMile = ("nmi²") -SquareYard = ("yd²") -UsSurveySquareFoot = ("ft² (US)") diff --git a/UnitsNet/GeneratedCode/Resources/AreaDensity.restext b/UnitsNet/GeneratedCode/Resources/AreaDensity.restext deleted file mode 100644 index 9c093db370..0000000000 --- a/UnitsNet/GeneratedCode/Resources/AreaDensity.restext +++ /dev/null @@ -1,3 +0,0 @@ -GramPerSquareMeter = ("g/m²", "gsm") -KilogramPerSquareMeter = ("kg/m²") -MilligramPerSquareMeter = ("mg/m²") diff --git a/UnitsNet/GeneratedCode/Resources/AreaMomentOfInertia.restext b/UnitsNet/GeneratedCode/Resources/AreaMomentOfInertia.restext deleted file mode 100644 index 4da508257c..0000000000 --- a/UnitsNet/GeneratedCode/Resources/AreaMomentOfInertia.restext +++ /dev/null @@ -1,6 +0,0 @@ -CentimeterToTheFourth = ("cm⁴", "cm^4") -DecimeterToTheFourth = ("dm⁴", "dm^4") -FootToTheFourth = ("ft⁴", "ft^4") -InchToTheFourth = ("in⁴", "in^4") -MeterToTheFourth = ("m⁴", "m^4") -MillimeterToTheFourth = ("mm⁴", "mm^4") diff --git a/UnitsNet/GeneratedCode/Resources/BitRate.restext b/UnitsNet/GeneratedCode/Resources/BitRate.restext deleted file mode 100644 index c4b4da3300..0000000000 --- a/UnitsNet/GeneratedCode/Resources/BitRate.restext +++ /dev/null @@ -1,26 +0,0 @@ -BitPerSecond = ("bit/s", "bps") -BytePerSecond = ("B/s") -ExabitPerSecond = ("Ebit/s", "Ebps") -ExabytePerSecond = ("EB/s") -ExbibitPerSecond = ("Eibit/s", "Eibps") -ExbibytePerSecond = ("EiB/s") -GibibitPerSecond = ("Gibit/s", "Gibps") -GibibytePerSecond = ("GiB/s") -GigabitPerSecond = ("Gbit/s", "Gbps") -GigabytePerSecond = ("GB/s") -KibibitPerSecond = ("Kibit/s", "Kibps") -KibibytePerSecond = ("KiB/s") -KilobitPerSecond = ("kbit/s", "kbps") -KilobytePerSecond = ("kB/s") -MebibitPerSecond = ("Mibit/s", "Mibps") -MebibytePerSecond = ("MiB/s") -MegabitPerSecond = ("Mbit/s", "Mbps") -MegabytePerSecond = ("MB/s") -PebibitPerSecond = ("Pibit/s", "Pibps") -PebibytePerSecond = ("PiB/s") -PetabitPerSecond = ("Pbit/s", "Pbps") -PetabytePerSecond = ("PB/s") -TebibitPerSecond = ("Tibit/s", "Tibps") -TebibytePerSecond = ("TiB/s") -TerabitPerSecond = ("Tbit/s", "Tbps") -TerabytePerSecond = ("TB/s") diff --git a/UnitsNet/GeneratedCode/Resources/BrakeSpecificFuelConsumption.restext b/UnitsNet/GeneratedCode/Resources/BrakeSpecificFuelConsumption.restext deleted file mode 100644 index a5136686d1..0000000000 --- a/UnitsNet/GeneratedCode/Resources/BrakeSpecificFuelConsumption.restext +++ /dev/null @@ -1,3 +0,0 @@ -GramPerKiloWattHour = ("g/kWh") -KilogramPerJoule = ("kg/J") -PoundPerMechanicalHorsepowerHour = ("lb/hph") diff --git a/UnitsNet/GeneratedCode/Resources/Capacitance.restext b/UnitsNet/GeneratedCode/Resources/Capacitance.restext deleted file mode 100644 index 3473746d2b..0000000000 --- a/UnitsNet/GeneratedCode/Resources/Capacitance.restext +++ /dev/null @@ -1,7 +0,0 @@ -Farad = ("F") -Kilofarad = ("kF") -Megafarad = ("MF") -Microfarad = ("µF") -Millifarad = ("mF") -Nanofarad = ("nF") -Picofarad = ("pF") diff --git a/UnitsNet/GeneratedCode/Resources/CoefficientOfThermalExpansion.restext b/UnitsNet/GeneratedCode/Resources/CoefficientOfThermalExpansion.restext deleted file mode 100644 index 224a759b95..0000000000 --- a/UnitsNet/GeneratedCode/Resources/CoefficientOfThermalExpansion.restext +++ /dev/null @@ -1,3 +0,0 @@ -InverseDegreeCelsius = ("°C⁻¹", "1/°C") -InverseDegreeFahrenheit = ("°F⁻¹", "1/°F") -InverseKelvin = ("K⁻¹", "1/K") diff --git a/UnitsNet/GeneratedCode/Resources/Compressibility.restext b/UnitsNet/GeneratedCode/Resources/Compressibility.restext deleted file mode 100644 index 00697a6828..0000000000 --- a/UnitsNet/GeneratedCode/Resources/Compressibility.restext +++ /dev/null @@ -1,7 +0,0 @@ -InverseAtmosphere = ("atm⁻¹", "1/atm") -InverseBar = ("bar⁻¹", "1/bar") -InverseKilopascal = ("kPa⁻¹", "1/kPa") -InverseMegapascal = ("MPa⁻¹", "1/MPa") -InverseMillibar = ("mbar⁻¹", "1/mbar") -InversePascal = ("Pa⁻¹", "1/Pa") -InversePoundForcePerSquareInch = ("psi⁻¹", "1/psi") diff --git a/UnitsNet/GeneratedCode/Resources/Density.restext b/UnitsNet/GeneratedCode/Resources/Density.restext deleted file mode 100644 index 026deadb6e..0000000000 --- a/UnitsNet/GeneratedCode/Resources/Density.restext +++ /dev/null @@ -1,51 +0,0 @@ -CentigramPerDeciliter = ("cg/dl") -CentigramPerLiter = ("cg/L") -CentigramPerMilliliter = ("cg/ml") -DecigramPerDeciliter = ("dg/dl") -DecigramPerLiter = ("dg/L") -DecigramPerMilliliter = ("dg/ml") -GramPerCubicCentimeter = ("g/cm³") -GramPerCubicFoot = ("g/ft³") -GramPerCubicInch = ("g/in³") -GramPerCubicMeter = ("g/m³") -GramPerCubicMillimeter = ("g/mm³") -GramPerDeciliter = ("g/dl") -GramPerLiter = ("g/L") -GramPerMilliliter = ("g/ml") -KilogramPerCubicCentimeter = ("kg/cm³") -KilogramPerCubicMeter = ("kg/m³") -KilogramPerCubicMillimeter = ("kg/mm³") -KilogramPerLiter = ("kg/l") -KilopoundPerCubicFoot = ("kip/ft³") -KilopoundPerCubicInch = ("kip/in³") -MicrogramPerCubicMeter = ("µg/m³") -MicrogramPerDeciliter = ("µg/dl") -MicrogramPerLiter = ("µg/L") -MicrogramPerMilliliter = ("µg/ml") -MilligramPerCubicMeter = ("mg/m³") -MilligramPerDeciliter = ("mg/dl") -MilligramPerLiter = ("mg/L") -MilligramPerMilliliter = ("mg/ml") -NanogramPerDeciliter = ("ng/dl") -NanogramPerLiter = ("ng/L") -NanogramPerMilliliter = ("ng/ml") -PicogramPerDeciliter = ("pg/dl") -PicogramPerLiter = ("pg/L") -PicogramPerMilliliter = ("pg/ml") -PoundPerCubicCentimeter = ("lb/cm³") -PoundPerCubicFoot = ("lb/ft³") -PoundPerCubicInch = ("lb/in³") -PoundPerCubicMeter = ("lb/m³") -PoundPerCubicMillimeter = ("lb/mm³") -PoundPerImperialGallon = ("ppg (imp.)") -PoundPerUSGallon = ("ppg (U.S.)") -SlugPerCubicCentimeter = ("slug/cm³") -SlugPerCubicFoot = ("slug/ft³") -SlugPerCubicInch = ("slug/in³") -SlugPerCubicMeter = ("slug/m³") -SlugPerCubicMillimeter = ("slug/mm³") -TonnePerCubicCentimeter = ("t/cm³") -TonnePerCubicFoot = ("t/ft³") -TonnePerCubicInch = ("t/in³") -TonnePerCubicMeter = ("t/m³") -TonnePerCubicMillimeter = ("t/mm³") diff --git a/UnitsNet/GeneratedCode/Resources/Duration.restext b/UnitsNet/GeneratedCode/Resources/Duration.restext deleted file mode 100644 index 14c7e05261..0000000000 --- a/UnitsNet/GeneratedCode/Resources/Duration.restext +++ /dev/null @@ -1,11 +0,0 @@ -Day = ("d", "day", "days") -Hour = ("h", "hr", "hrs", "hour", "hours") -JulianYear = ("jyr", "jyear", "jyears") -Microsecond = ("µs", "µsec", "µsecs", "µsecond", "µseconds") -Millisecond = ("ms", "msec", "msecs", "msecond", "mseconds") -Minute = ("m", "min", "minute", "minutes") -Month30 = ("mo", "month", "months") -Nanosecond = ("ns", "nsec", "nsecs", "nsecond", "nseconds") -Second = ("s", "sec", "secs", "second", "seconds") -Week = ("wk", "week", "weeks") -Year365 = ("yr", "year", "years") diff --git a/UnitsNet/GeneratedCode/Resources/DynamicViscosity.restext b/UnitsNet/GeneratedCode/Resources/DynamicViscosity.restext deleted file mode 100644 index 9c42b8ab55..0000000000 --- a/UnitsNet/GeneratedCode/Resources/DynamicViscosity.restext +++ /dev/null @@ -1,10 +0,0 @@ -Centipoise = ("cP") -MicropascalSecond = ("µPa·s", "µPaS") -MillipascalSecond = ("mPa·s", "mPaS") -NewtonSecondPerMeterSquared = ("Ns/m²") -PascalSecond = ("Pa·s", "PaS") -Poise = ("P") -PoundForceSecondPerSquareFoot = ("lbf·s/ft²") -PoundForceSecondPerSquareInch = ("lbf·s/in²") -PoundPerFootSecond = ("lb/ft·s") -Reyn = ("reyn") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricAdmittance.restext b/UnitsNet/GeneratedCode/Resources/ElectricAdmittance.restext deleted file mode 100644 index 177f246394..0000000000 --- a/UnitsNet/GeneratedCode/Resources/ElectricAdmittance.restext +++ /dev/null @@ -1,4 +0,0 @@ -Microsiemens = ("µS") -Millisiemens = ("mS") -Nanosiemens = ("nS") -Siemens = ("S") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricCharge.restext b/UnitsNet/GeneratedCode/Resources/ElectricCharge.restext deleted file mode 100644 index 4bd0d8eb7e..0000000000 --- a/UnitsNet/GeneratedCode/Resources/ElectricCharge.restext +++ /dev/null @@ -1,11 +0,0 @@ -AmpereHour = ("A-h", "Ah") -Coulomb = ("C") -KiloampereHour = ("kA-h", "kAh") -Kilocoulomb = ("kC") -MegaampereHour = ("MA-h", "MAh") -Megacoulomb = ("MC") -Microcoulomb = ("µC") -MilliampereHour = ("mA-h", "mAh") -Millicoulomb = ("mC") -Nanocoulomb = ("nC") -Picocoulomb = ("pC") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricChargeDensity.restext b/UnitsNet/GeneratedCode/Resources/ElectricChargeDensity.restext deleted file mode 100644 index 1f5d7b5aeb..0000000000 --- a/UnitsNet/GeneratedCode/Resources/ElectricChargeDensity.restext +++ /dev/null @@ -1 +0,0 @@ -CoulombPerCubicMeter = ("C/m³") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricConductance.restext b/UnitsNet/GeneratedCode/Resources/ElectricConductance.restext deleted file mode 100644 index 0c8ecb72fa..0000000000 --- a/UnitsNet/GeneratedCode/Resources/ElectricConductance.restext +++ /dev/null @@ -1,5 +0,0 @@ -Kilosiemens = ("kS") -Microsiemens = ("µS") -Millisiemens = ("mS") -Nanosiemens = ("nS") -Siemens = ("S") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricConductivity.restext b/UnitsNet/GeneratedCode/Resources/ElectricConductivity.restext deleted file mode 100644 index 617677f93b..0000000000 --- a/UnitsNet/GeneratedCode/Resources/ElectricConductivity.restext +++ /dev/null @@ -1,6 +0,0 @@ -MicrosiemensPerCentimeter = ("µS/cm") -MillisiemensPerCentimeter = ("mS/cm") -SiemensPerCentimeter = ("S/cm") -SiemensPerFoot = ("S/ft") -SiemensPerInch = ("S/in") -SiemensPerMeter = ("S/m") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricCurrent.restext b/UnitsNet/GeneratedCode/Resources/ElectricCurrent.restext deleted file mode 100644 index 1dceb800c5..0000000000 --- a/UnitsNet/GeneratedCode/Resources/ElectricCurrent.restext +++ /dev/null @@ -1,9 +0,0 @@ -Ampere = ("A") -Centiampere = ("cA") -Femtoampere = ("fA") -Kiloampere = ("kA") -Megaampere = ("MA") -Microampere = ("µA") -Milliampere = ("mA") -Nanoampere = ("nA") -Picoampere = ("pA") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricCurrentDensity.restext b/UnitsNet/GeneratedCode/Resources/ElectricCurrentDensity.restext deleted file mode 100644 index f40dcf9f92..0000000000 --- a/UnitsNet/GeneratedCode/Resources/ElectricCurrentDensity.restext +++ /dev/null @@ -1,3 +0,0 @@ -AmperePerSquareFoot = ("A/ft²") -AmperePerSquareInch = ("A/in²") -AmperePerSquareMeter = ("A/m²") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricCurrentGradient.restext b/UnitsNet/GeneratedCode/Resources/ElectricCurrentGradient.restext deleted file mode 100644 index 8f67335ebe..0000000000 --- a/UnitsNet/GeneratedCode/Resources/ElectricCurrentGradient.restext +++ /dev/null @@ -1,4 +0,0 @@ -AmperePerMicrosecond = ("A/μs") -AmperePerMillisecond = ("A/ms") -AmperePerNanosecond = ("A/ns") -AmperePerSecond = ("A/s") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricField.restext b/UnitsNet/GeneratedCode/Resources/ElectricField.restext deleted file mode 100644 index 0dfc0439fa..0000000000 --- a/UnitsNet/GeneratedCode/Resources/ElectricField.restext +++ /dev/null @@ -1 +0,0 @@ -VoltPerMeter = ("V/m") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricInductance.restext b/UnitsNet/GeneratedCode/Resources/ElectricInductance.restext deleted file mode 100644 index 6fb8faacb9..0000000000 --- a/UnitsNet/GeneratedCode/Resources/ElectricInductance.restext +++ /dev/null @@ -1,5 +0,0 @@ -Henry = ("H") -Microhenry = ("µH") -Millihenry = ("mH") -Nanohenry = ("nH") -Picohenry = ("pH") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricPotential.restext b/UnitsNet/GeneratedCode/Resources/ElectricPotential.restext deleted file mode 100644 index f2e198b00b..0000000000 --- a/UnitsNet/GeneratedCode/Resources/ElectricPotential.restext +++ /dev/null @@ -1,6 +0,0 @@ -Kilovolt = ("kV") -Megavolt = ("MV") -Microvolt = ("µV") -Millivolt = ("mV") -Nanovolt = ("nV") -Volt = ("V") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricPotentialAc.restext b/UnitsNet/GeneratedCode/Resources/ElectricPotentialAc.restext deleted file mode 100644 index 3e245cf3eb..0000000000 --- a/UnitsNet/GeneratedCode/Resources/ElectricPotentialAc.restext +++ /dev/null @@ -1,5 +0,0 @@ -KilovoltAc = ("kVac") -MegavoltAc = ("MVac") -MicrovoltAc = ("µVac") -MillivoltAc = ("mVac") -VoltAc = ("Vac") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricPotentialChangeRate.restext b/UnitsNet/GeneratedCode/Resources/ElectricPotentialChangeRate.restext deleted file mode 100644 index 20638248fe..0000000000 --- a/UnitsNet/GeneratedCode/Resources/ElectricPotentialChangeRate.restext +++ /dev/null @@ -1,20 +0,0 @@ -KilovoltPerHour = ("kV/h") -KilovoltPerMicrosecond = ("kV/μs") -KilovoltPerMinute = ("kV/min") -KilovoltPerSecond = ("kV/s") -MegavoltPerHour = ("MV/h") -MegavoltPerMicrosecond = ("MV/μs") -MegavoltPerMinute = ("MV/min") -MegavoltPerSecond = ("MV/s") -MicrovoltPerHour = ("µV/h") -MicrovoltPerMicrosecond = ("µV/μs") -MicrovoltPerMinute = ("µV/min") -MicrovoltPerSecond = ("µV/s") -MillivoltPerHour = ("mV/h") -MillivoltPerMicrosecond = ("mV/μs") -MillivoltPerMinute = ("mV/min") -MillivoltPerSecond = ("mV/s") -VoltPerHour = ("V/h") -VoltPerMicrosecond = ("V/μs") -VoltPerMinute = ("V/min") -VoltPerSecond = ("V/s") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricPotentialDc.restext b/UnitsNet/GeneratedCode/Resources/ElectricPotentialDc.restext deleted file mode 100644 index 0292b3502d..0000000000 --- a/UnitsNet/GeneratedCode/Resources/ElectricPotentialDc.restext +++ /dev/null @@ -1,5 +0,0 @@ -KilovoltDc = ("kVdc") -MegavoltDc = ("MVdc") -MicrovoltDc = ("µVdc") -MillivoltDc = ("mVdc") -VoltDc = ("Vdc") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricResistance.restext b/UnitsNet/GeneratedCode/Resources/ElectricResistance.restext deleted file mode 100644 index a94cfc713d..0000000000 --- a/UnitsNet/GeneratedCode/Resources/ElectricResistance.restext +++ /dev/null @@ -1,7 +0,0 @@ -Gigaohm = ("GΩ") -Kiloohm = ("kΩ") -Megaohm = ("MΩ") -Microohm = ("µΩ") -Milliohm = ("mΩ") -Ohm = ("Ω") -Teraohm = ("TΩ") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricResistivity.restext b/UnitsNet/GeneratedCode/Resources/ElectricResistivity.restext deleted file mode 100644 index fcc319d411..0000000000 --- a/UnitsNet/GeneratedCode/Resources/ElectricResistivity.restext +++ /dev/null @@ -1,14 +0,0 @@ -KiloohmCentimeter = ("kΩ·cm") -KiloohmMeter = ("kΩ·m") -MegaohmCentimeter = ("MΩ·cm") -MegaohmMeter = ("MΩ·m") -MicroohmCentimeter = ("µΩ·cm") -MicroohmMeter = ("µΩ·m") -MilliohmCentimeter = ("mΩ·cm") -MilliohmMeter = ("mΩ·m") -NanoohmCentimeter = ("nΩ·cm") -NanoohmMeter = ("nΩ·m") -OhmCentimeter = ("Ω·cm") -OhmMeter = ("Ω·m") -PicoohmCentimeter = ("pΩ·cm") -PicoohmMeter = ("pΩ·m") diff --git a/UnitsNet/GeneratedCode/Resources/ElectricSurfaceChargeDensity.restext b/UnitsNet/GeneratedCode/Resources/ElectricSurfaceChargeDensity.restext deleted file mode 100644 index 242843ed23..0000000000 --- a/UnitsNet/GeneratedCode/Resources/ElectricSurfaceChargeDensity.restext +++ /dev/null @@ -1,3 +0,0 @@ -CoulombPerSquareCentimeter = ("C/cm²") -CoulombPerSquareInch = ("C/in²") -CoulombPerSquareMeter = ("C/m²") diff --git a/UnitsNet/GeneratedCode/Resources/Energy.restext b/UnitsNet/GeneratedCode/Resources/Energy.restext deleted file mode 100644 index 4591938a1d..0000000000 --- a/UnitsNet/GeneratedCode/Resources/Energy.restext +++ /dev/null @@ -1,38 +0,0 @@ -BritishThermalUnit = ("BTU") -Calorie = ("cal") -DecathermEc = ("Dth (E.C.)") -DecathermImperial = ("Dth (imp.)") -DecathermUs = ("Dth (U.S.)") -ElectronVolt = ("eV") -Erg = ("erg") -FootPound = ("ft·lb") -GigabritishThermalUnit = ("GBTU") -GigaelectronVolt = ("GeV") -Gigajoule = ("GJ") -GigawattDay = ("GWd") -GigawattHour = ("GWh") -HorsepowerHour = ("hp·h") -Joule = ("J") -KilobritishThermalUnit = ("kBTU") -Kilocalorie = ("kcal") -KiloelectronVolt = ("keV") -Kilojoule = ("kJ") -KilowattDay = ("kWd") -KilowattHour = ("kWh") -MegabritishThermalUnit = ("MBTU") -Megacalorie = ("Mcal") -MegaelectronVolt = ("MeV") -Megajoule = ("MJ") -MegawattDay = ("MWd") -MegawattHour = ("MWh") -Millijoule = ("mJ") -Petajoule = ("PJ") -TeraelectronVolt = ("TeV") -Terajoule = ("TJ") -TerawattDay = ("TWd") -TerawattHour = ("TWh") -ThermEc = ("th (E.C.)") -ThermImperial = ("th (imp.)") -ThermUs = ("th (U.S.)") -WattDay = ("Wd") -WattHour = ("Wh") diff --git a/UnitsNet/GeneratedCode/Resources/EnergyDensity.restext b/UnitsNet/GeneratedCode/Resources/EnergyDensity.restext deleted file mode 100644 index 71eb151665..0000000000 --- a/UnitsNet/GeneratedCode/Resources/EnergyDensity.restext +++ /dev/null @@ -1,12 +0,0 @@ -GigajoulePerCubicMeter = ("GJ/m³") -GigawattHourPerCubicMeter = ("GWh/m³") -JoulePerCubicMeter = ("J/m³") -KilojoulePerCubicMeter = ("kJ/m³") -KilowattHourPerCubicMeter = ("kWh/m³") -MegajoulePerCubicMeter = ("MJ/m³") -MegawattHourPerCubicMeter = ("MWh/m³") -PetajoulePerCubicMeter = ("PJ/m³") -PetawattHourPerCubicMeter = ("PWh/m³") -TerajoulePerCubicMeter = ("TJ/m³") -TerawattHourPerCubicMeter = ("TWh/m³") -WattHourPerCubicMeter = ("Wh/m³") diff --git a/UnitsNet/GeneratedCode/Resources/Entropy.restext b/UnitsNet/GeneratedCode/Resources/Entropy.restext deleted file mode 100644 index 0f8bfa3fbc..0000000000 --- a/UnitsNet/GeneratedCode/Resources/Entropy.restext +++ /dev/null @@ -1,7 +0,0 @@ -CaloriePerKelvin = ("cal/K") -JoulePerDegreeCelsius = ("J/C") -JoulePerKelvin = ("J/K") -KilocaloriePerKelvin = ("kcal/K") -KilojoulePerDegreeCelsius = ("kJ/C") -KilojoulePerKelvin = ("kJ/K") -MegajoulePerKelvin = ("MJ/K") diff --git a/UnitsNet/GeneratedCode/Resources/Force.restext b/UnitsNet/GeneratedCode/Resources/Force.restext deleted file mode 100644 index 6e1c93148e..0000000000 --- a/UnitsNet/GeneratedCode/Resources/Force.restext +++ /dev/null @@ -1,15 +0,0 @@ -Decanewton = ("daN") -Dyn = ("dyn") -KilogramForce = ("kgf") -Kilonewton = ("kN") -KiloPond = ("kp") -KilopoundForce = ("kipf", "kip", "k") -Meganewton = ("MN") -Micronewton = ("µN") -Millinewton = ("mN") -Newton = ("N") -OunceForce = ("ozf") -Poundal = ("pdl") -PoundForce = ("lbf") -ShortTonForce = ("tf (short)", "t (US)f", "short tons-force") -TonneForce = ("tf", "Ton") diff --git a/UnitsNet/GeneratedCode/Resources/ForceChangeRate.restext b/UnitsNet/GeneratedCode/Resources/ForceChangeRate.restext deleted file mode 100644 index 7128d1d7c1..0000000000 --- a/UnitsNet/GeneratedCode/Resources/ForceChangeRate.restext +++ /dev/null @@ -1,15 +0,0 @@ -CentinewtonPerSecond = ("cN/s") -DecanewtonPerMinute = ("daN/min") -DecanewtonPerSecond = ("daN/s") -DecinewtonPerSecond = ("dN/s") -KilonewtonPerMinute = ("kN/min") -KilonewtonPerSecond = ("kN/s") -KilopoundForcePerMinute = ("kipf/min", "kip/min", "k/min") -KilopoundForcePerSecond = ("kipf/s", "kip/s", "k/s") -MicronewtonPerSecond = ("µN/s") -MillinewtonPerSecond = ("mN/s") -NanonewtonPerSecond = ("nN/s") -NewtonPerMinute = ("N/min") -NewtonPerSecond = ("N/s") -PoundForcePerMinute = ("lbf/min") -PoundForcePerSecond = ("lbf/s") diff --git a/UnitsNet/GeneratedCode/Resources/ForcePerLength.restext b/UnitsNet/GeneratedCode/Resources/ForcePerLength.restext deleted file mode 100644 index d0129cbd2e..0000000000 --- a/UnitsNet/GeneratedCode/Resources/ForcePerLength.restext +++ /dev/null @@ -1,38 +0,0 @@ -CentinewtonPerCentimeter = ("cN/cm") -CentinewtonPerMeter = ("cN/m") -CentinewtonPerMillimeter = ("cN/mm") -DecanewtonPerCentimeter = ("daN/cm") -DecanewtonPerMeter = ("daN/m") -DecanewtonPerMillimeter = ("daN/mm") -DecinewtonPerCentimeter = ("dN/cm") -DecinewtonPerMeter = ("dN/m") -DecinewtonPerMillimeter = ("dN/mm") -KilogramForcePerCentimeter = ("kgf/cm") -KilogramForcePerMeter = ("kgf/m") -KilogramForcePerMillimeter = ("kgf/mm") -KilonewtonPerCentimeter = ("kN/cm") -KilonewtonPerMeter = ("kN/m") -KilonewtonPerMillimeter = ("kN/mm") -KilopoundForcePerFoot = ("kipf/ft", "kip/ft", "k/ft") -KilopoundForcePerInch = ("kipf/in", "kip/in", "k/in") -MeganewtonPerCentimeter = ("MN/cm") -MeganewtonPerMeter = ("MN/m") -MeganewtonPerMillimeter = ("MN/mm") -MicronewtonPerCentimeter = ("µN/cm") -MicronewtonPerMeter = ("µN/m") -MicronewtonPerMillimeter = ("µN/mm") -MillinewtonPerCentimeter = ("mN/cm") -MillinewtonPerMeter = ("mN/m") -MillinewtonPerMillimeter = ("mN/mm") -NanonewtonPerCentimeter = ("nN/cm") -NanonewtonPerMeter = ("nN/m") -NanonewtonPerMillimeter = ("nN/mm") -NewtonPerCentimeter = ("N/cm") -NewtonPerMeter = ("N/m") -NewtonPerMillimeter = ("N/mm") -PoundForcePerFoot = ("lbf/ft") -PoundForcePerInch = ("lbf/in") -PoundForcePerYard = ("lbf/yd") -TonneForcePerCentimeter = ("tf/cm") -TonneForcePerMeter = ("tf/m") -TonneForcePerMillimeter = ("tf/mm") diff --git a/UnitsNet/GeneratedCode/Resources/Frequency.restext b/UnitsNet/GeneratedCode/Resources/Frequency.restext deleted file mode 100644 index 3574cb0de4..0000000000 --- a/UnitsNet/GeneratedCode/Resources/Frequency.restext +++ /dev/null @@ -1,13 +0,0 @@ -BeatPerMinute = ("bpm") -BUnit = ("B Units") -CyclePerHour = ("cph") -CyclePerMinute = ("cpm") -Gigahertz = ("GHz") -Hertz = ("Hz") -Kilohertz = ("kHz") -Megahertz = ("MHz") -Microhertz = ("µHz") -Millihertz = ("mHz") -PerSecond = ("s⁻¹") -RadianPerSecond = ("rad/s") -Terahertz = ("THz") diff --git a/UnitsNet/GeneratedCode/Resources/FuelEfficiency.restext b/UnitsNet/GeneratedCode/Resources/FuelEfficiency.restext deleted file mode 100644 index 6ffec182db..0000000000 --- a/UnitsNet/GeneratedCode/Resources/FuelEfficiency.restext +++ /dev/null @@ -1,4 +0,0 @@ -KilometerPerLiter = ("km/L") -LiterPer100Kilometers = ("L/100km") -MilePerUkGallon = ("mpg (imp.)") -MilePerUsGallon = ("mpg (U.S.)") diff --git a/UnitsNet/GeneratedCode/Resources/HeatFlux.restext b/UnitsNet/GeneratedCode/Resources/HeatFlux.restext deleted file mode 100644 index 27ccf3f119..0000000000 --- a/UnitsNet/GeneratedCode/Resources/HeatFlux.restext +++ /dev/null @@ -1,18 +0,0 @@ -BtuPerHourSquareFoot = ("BTU/h·ft²") -BtuPerMinuteSquareFoot = ("BTU/min·ft²") -BtuPerSecondSquareFoot = ("BTU/s·ft²") -BtuPerSecondSquareInch = ("BTU/s·in²") -CaloriePerSecondSquareCentimeter = ("cal/s·cm²") -CentiwattPerSquareMeter = ("cW/m²") -DeciwattPerSquareMeter = ("dW/m²") -KilocaloriePerHourSquareMeter = ("kcal/h·m²") -KilocaloriePerSecondSquareCentimeter = ("kcal/s·cm²") -KilowattPerSquareMeter = ("kW/m²") -MicrowattPerSquareMeter = ("µW/m²") -MilliwattPerSquareMeter = ("mW/m²") -NanowattPerSquareMeter = ("nW/m²") -PoundForcePerFootSecond = ("lbf/(ft·s)") -PoundPerSecondCubed = ("lb/s³", "lbm/s³") -WattPerSquareFoot = ("W/ft²") -WattPerSquareInch = ("W/in²") -WattPerSquareMeter = ("W/m²") diff --git a/UnitsNet/GeneratedCode/Resources/HeatTransferCoefficient.restext b/UnitsNet/GeneratedCode/Resources/HeatTransferCoefficient.restext deleted file mode 100644 index 3e7280bade..0000000000 --- a/UnitsNet/GeneratedCode/Resources/HeatTransferCoefficient.restext +++ /dev/null @@ -1,6 +0,0 @@ -BtuPerHourSquareFootDegreeFahrenheit = ("Btu/h·ft²·°F", "Btu/ft²·h·°F", "Btu/hr·ft²·°F", "Btu/ft²·hr·°F") -BtuPerSquareFootDegreeFahrenheit = ("Btu/ft²·°F") -CaloriePerHourSquareMeterDegreeCelsius = ("kcal/h·m²·°C", "kcal/m²·h·°C", "kcal/hr·m²·°C", "kcal/m²·hr·°C") -KilocaloriePerHourSquareMeterDegreeCelsius = ("kkcal/h·m²·°C", "kkcal/m²·h·°C", "kkcal/hr·m²·°C", "kkcal/m²·hr·°C") -WattPerSquareMeterCelsius = ("W/m²·°C") -WattPerSquareMeterKelvin = ("W/m²·K") diff --git a/UnitsNet/GeneratedCode/Resources/Illuminance.restext b/UnitsNet/GeneratedCode/Resources/Illuminance.restext deleted file mode 100644 index 49970097e4..0000000000 --- a/UnitsNet/GeneratedCode/Resources/Illuminance.restext +++ /dev/null @@ -1,4 +0,0 @@ -Kilolux = ("klx") -Lux = ("lx") -Megalux = ("Mlx") -Millilux = ("mlx") diff --git a/UnitsNet/GeneratedCode/Resources/Impulse.restext b/UnitsNet/GeneratedCode/Resources/Impulse.restext deleted file mode 100644 index 0f853df9da..0000000000 --- a/UnitsNet/GeneratedCode/Resources/Impulse.restext +++ /dev/null @@ -1,13 +0,0 @@ -CentinewtonSecond = ("cN·s") -DecanewtonSecond = ("daN·s") -DecinewtonSecond = ("dN·s") -KilogramMeterPerSecond = ("kg·m/s") -KilonewtonSecond = ("kN·s") -MeganewtonSecond = ("MN·s") -MicronewtonSecond = ("µN·s") -MillinewtonSecond = ("mN·s") -NanonewtonSecond = ("nN·s") -NewtonSecond = ("N·s") -PoundFootPerSecond = ("lb·ft/s") -PoundForceSecond = ("lbf·s") -SlugFootPerSecond = ("slug·ft/s") diff --git a/UnitsNet/GeneratedCode/Resources/Information.restext b/UnitsNet/GeneratedCode/Resources/Information.restext deleted file mode 100644 index ca7939a90a..0000000000 --- a/UnitsNet/GeneratedCode/Resources/Information.restext +++ /dev/null @@ -1,26 +0,0 @@ -Bit = ("b") -Byte = ("B") -Exabit = ("Eb") -Exabyte = ("EB") -Exbibit = ("Eib") -Exbibyte = ("EiB") -Gibibit = ("Gib") -Gibibyte = ("GiB") -Gigabit = ("Gb") -Gigabyte = ("GB") -Kibibit = ("Kib") -Kibibyte = ("KiB") -Kilobit = ("kb") -Kilobyte = ("kB") -Mebibit = ("Mib") -Mebibyte = ("MiB") -Megabit = ("Mb") -Megabyte = ("MB") -Pebibit = ("Pib") -Pebibyte = ("PiB") -Petabit = ("Pb") -Petabyte = ("PB") -Tebibit = ("Tib") -Tebibyte = ("TiB") -Terabit = ("Tb") -Terabyte = ("TB") diff --git a/UnitsNet/GeneratedCode/Resources/Irradiance.restext b/UnitsNet/GeneratedCode/Resources/Irradiance.restext deleted file mode 100644 index 52e42eb2d7..0000000000 --- a/UnitsNet/GeneratedCode/Resources/Irradiance.restext +++ /dev/null @@ -1,14 +0,0 @@ -KilowattPerSquareCentimeter = ("kW/cm²") -KilowattPerSquareMeter = ("kW/m²") -MegawattPerSquareCentimeter = ("MW/cm²") -MegawattPerSquareMeter = ("MW/m²") -MicrowattPerSquareCentimeter = ("µW/cm²") -MicrowattPerSquareMeter = ("µW/m²") -MilliwattPerSquareCentimeter = ("mW/cm²") -MilliwattPerSquareMeter = ("mW/m²") -NanowattPerSquareCentimeter = ("nW/cm²") -NanowattPerSquareMeter = ("nW/m²") -PicowattPerSquareCentimeter = ("pW/cm²") -PicowattPerSquareMeter = ("pW/m²") -WattPerSquareCentimeter = ("W/cm²") -WattPerSquareMeter = ("W/m²") diff --git a/UnitsNet/GeneratedCode/Resources/Irradiation.restext b/UnitsNet/GeneratedCode/Resources/Irradiation.restext deleted file mode 100644 index b57331b8c9..0000000000 --- a/UnitsNet/GeneratedCode/Resources/Irradiation.restext +++ /dev/null @@ -1,7 +0,0 @@ -JoulePerSquareCentimeter = ("J/cm²") -JoulePerSquareMeter = ("J/m²") -JoulePerSquareMillimeter = ("J/mm²") -KilojoulePerSquareMeter = ("kJ/m²") -KilowattHourPerSquareMeter = ("kWh/m²") -MillijoulePerSquareCentimeter = ("mJ/cm²") -WattHourPerSquareMeter = ("Wh/m²") diff --git a/UnitsNet/GeneratedCode/Resources/Jerk.restext b/UnitsNet/GeneratedCode/Resources/Jerk.restext deleted file mode 100644 index 614e8bb0c9..0000000000 --- a/UnitsNet/GeneratedCode/Resources/Jerk.restext +++ /dev/null @@ -1,11 +0,0 @@ -CentimeterPerSecondCubed = ("cm/s³") -DecimeterPerSecondCubed = ("dm/s³") -FootPerSecondCubed = ("ft/s³") -InchPerSecondCubed = ("in/s³") -KilometerPerSecondCubed = ("km/s³") -MeterPerSecondCubed = ("m/s³") -MicrometerPerSecondCubed = ("µm/s³") -MillimeterPerSecondCubed = ("mm/s³") -MillistandardGravitiesPerSecond = ("mg/s") -NanometerPerSecondCubed = ("nm/s³") -StandardGravitiesPerSecond = ("g/s") diff --git a/UnitsNet/GeneratedCode/Resources/KinematicViscosity.restext b/UnitsNet/GeneratedCode/Resources/KinematicViscosity.restext deleted file mode 100644 index 9fd1f6e562..0000000000 --- a/UnitsNet/GeneratedCode/Resources/KinematicViscosity.restext +++ /dev/null @@ -1,9 +0,0 @@ -Centistokes = ("cSt") -Decistokes = ("dSt") -Kilostokes = ("kSt") -Microstokes = ("µSt") -Millistokes = ("mSt") -Nanostokes = ("nSt") -SquareFootPerSecond = ("ft²/s") -SquareMeterPerSecond = ("m²/s") -Stokes = ("St") diff --git a/UnitsNet/GeneratedCode/Resources/Length.restext b/UnitsNet/GeneratedCode/Resources/Length.restext deleted file mode 100644 index 03b9a9c209..0000000000 --- a/UnitsNet/GeneratedCode/Resources/Length.restext +++ /dev/null @@ -1,36 +0,0 @@ -Angstrom = ("Å", "A") -AstronomicalUnit = ("au", "ua") -Centimeter = ("cm") -Chain = ("ch") -DataMile = ("DM") -Decameter = ("dam") -Decimeter = ("dm") -DtpPica = ("pica") -DtpPoint = ("pt") -Fathom = ("fathom") -Foot = ("ft", "'", "′") -Hand = ("h", "hh") -Hectometer = ("hm") -Inch = ("in", "\"", "″") -KilolightYear = ("kly") -Kilometer = ("km") -Kiloparsec = ("kpc") -LightYear = ("ly") -MegalightYear = ("Mly") -Megaparsec = ("Mpc") -Meter = ("m") -Microinch = ("µin") -Micrometer = ("µm") -Mil = ("mil") -Mile = ("mi") -Millimeter = ("mm") -Nanometer = ("nm") -NauticalMile = ("NM") -Parsec = ("pc") -PrinterPica = ("pica") -PrinterPoint = ("pt") -Shackle = ("shackle") -SolarRadius = ("R⊙") -Twip = ("twip") -UsSurveyFoot = ("ftUS") -Yard = ("yd") diff --git a/UnitsNet/GeneratedCode/Resources/Level.restext b/UnitsNet/GeneratedCode/Resources/Level.restext deleted file mode 100644 index 2fe4486c1c..0000000000 --- a/UnitsNet/GeneratedCode/Resources/Level.restext +++ /dev/null @@ -1,2 +0,0 @@ -Decibel = ("dB") -Neper = ("Np") diff --git a/UnitsNet/GeneratedCode/Resources/LinearDensity.restext b/UnitsNet/GeneratedCode/Resources/LinearDensity.restext deleted file mode 100644 index 07e137b834..0000000000 --- a/UnitsNet/GeneratedCode/Resources/LinearDensity.restext +++ /dev/null @@ -1,14 +0,0 @@ -GramPerCentimeter = ("g/cm") -GramPerMeter = ("g/m") -GramPerMillimeter = ("g/mm") -KilogramPerCentimeter = ("kg/cm") -KilogramPerMeter = ("kg/m") -KilogramPerMillimeter = ("kg/mm") -MicrogramPerCentimeter = ("µg/cm") -MicrogramPerMeter = ("µg/m") -MicrogramPerMillimeter = ("µg/mm") -MilligramPerCentimeter = ("mg/cm") -MilligramPerMeter = ("mg/m") -MilligramPerMillimeter = ("mg/mm") -PoundPerFoot = ("lb/ft") -PoundPerInch = ("lb/in") diff --git a/UnitsNet/GeneratedCode/Resources/LinearPowerDensity.restext b/UnitsNet/GeneratedCode/Resources/LinearPowerDensity.restext deleted file mode 100644 index 734787cab0..0000000000 --- a/UnitsNet/GeneratedCode/Resources/LinearPowerDensity.restext +++ /dev/null @@ -1,25 +0,0 @@ -GigawattPerCentimeter = ("GW/cm") -GigawattPerFoot = ("GW/ft") -GigawattPerInch = ("GW/in") -GigawattPerMeter = ("GW/m") -GigawattPerMillimeter = ("GW/mm") -KilowattPerCentimeter = ("kW/cm") -KilowattPerFoot = ("kW/ft") -KilowattPerInch = ("kW/in") -KilowattPerMeter = ("kW/m") -KilowattPerMillimeter = ("kW/mm") -MegawattPerCentimeter = ("MW/cm") -MegawattPerFoot = ("MW/ft") -MegawattPerInch = ("MW/in") -MegawattPerMeter = ("MW/m") -MegawattPerMillimeter = ("MW/mm") -MilliwattPerCentimeter = ("mW/cm") -MilliwattPerFoot = ("mW/ft") -MilliwattPerInch = ("mW/in") -MilliwattPerMeter = ("mW/m") -MilliwattPerMillimeter = ("mW/mm") -WattPerCentimeter = ("W/cm") -WattPerFoot = ("W/ft") -WattPerInch = ("W/in") -WattPerMeter = ("W/m") -WattPerMillimeter = ("W/mm") diff --git a/UnitsNet/GeneratedCode/Resources/Luminance.restext b/UnitsNet/GeneratedCode/Resources/Luminance.restext deleted file mode 100644 index a107746ca0..0000000000 --- a/UnitsNet/GeneratedCode/Resources/Luminance.restext +++ /dev/null @@ -1,10 +0,0 @@ -CandelaPerSquareFoot = ("Cd/ft²") -CandelaPerSquareInch = ("Cd/in²") -CandelaPerSquareMeter = ("Cd/m²") -CenticandelaPerSquareMeter = ("cCd/m²") -DecicandelaPerSquareMeter = ("dCd/m²") -KilocandelaPerSquareMeter = ("kCd/m²") -MicrocandelaPerSquareMeter = ("µCd/m²") -MillicandelaPerSquareMeter = ("mCd/m²") -NanocandelaPerSquareMeter = ("nCd/m²") -Nit = ("nt") diff --git a/UnitsNet/GeneratedCode/Resources/Luminosity.restext b/UnitsNet/GeneratedCode/Resources/Luminosity.restext deleted file mode 100644 index 703791ac0e..0000000000 --- a/UnitsNet/GeneratedCode/Resources/Luminosity.restext +++ /dev/null @@ -1,14 +0,0 @@ -Decawatt = ("daW") -Deciwatt = ("dW") -Femtowatt = ("fW") -Gigawatt = ("GW") -Kilowatt = ("kW") -Megawatt = ("MW") -Microwatt = ("µW") -Milliwatt = ("mW") -Nanowatt = ("nW") -Petawatt = ("PW") -Picowatt = ("pW") -SolarLuminosity = ("L⊙") -Terawatt = ("TW") -Watt = ("W") diff --git a/UnitsNet/GeneratedCode/Resources/LuminousFlux.restext b/UnitsNet/GeneratedCode/Resources/LuminousFlux.restext deleted file mode 100644 index c9e35bb8fb..0000000000 --- a/UnitsNet/GeneratedCode/Resources/LuminousFlux.restext +++ /dev/null @@ -1 +0,0 @@ -Lumen = ("lm") diff --git a/UnitsNet/GeneratedCode/Resources/LuminousIntensity.restext b/UnitsNet/GeneratedCode/Resources/LuminousIntensity.restext deleted file mode 100644 index df752e8c36..0000000000 --- a/UnitsNet/GeneratedCode/Resources/LuminousIntensity.restext +++ /dev/null @@ -1 +0,0 @@ -Candela = ("cd") diff --git a/UnitsNet/GeneratedCode/Resources/MagneticField.restext b/UnitsNet/GeneratedCode/Resources/MagneticField.restext deleted file mode 100644 index 1b0f26da50..0000000000 --- a/UnitsNet/GeneratedCode/Resources/MagneticField.restext +++ /dev/null @@ -1,6 +0,0 @@ -Gauss = ("G") -Microtesla = ("µT") -Milligauss = ("mG") -Millitesla = ("mT") -Nanotesla = ("nT") -Tesla = ("T") diff --git a/UnitsNet/GeneratedCode/Resources/MagneticFlux.restext b/UnitsNet/GeneratedCode/Resources/MagneticFlux.restext deleted file mode 100644 index cf9400d33c..0000000000 --- a/UnitsNet/GeneratedCode/Resources/MagneticFlux.restext +++ /dev/null @@ -1 +0,0 @@ -Weber = ("Wb") diff --git a/UnitsNet/GeneratedCode/Resources/Magnetization.restext b/UnitsNet/GeneratedCode/Resources/Magnetization.restext deleted file mode 100644 index 4512d68141..0000000000 --- a/UnitsNet/GeneratedCode/Resources/Magnetization.restext +++ /dev/null @@ -1 +0,0 @@ -AmperePerMeter = ("A/m") diff --git a/UnitsNet/GeneratedCode/Resources/Mass.restext b/UnitsNet/GeneratedCode/Resources/Mass.restext deleted file mode 100644 index e94c332a57..0000000000 --- a/UnitsNet/GeneratedCode/Resources/Mass.restext +++ /dev/null @@ -1,25 +0,0 @@ -Centigram = ("cg") -Decagram = ("dag") -Decigram = ("dg") -EarthMass = ("em") -Grain = ("gr") -Gram = ("g") -Hectogram = ("hg") -Kilogram = ("kg") -Kilopound = ("klb", "klbs", "klbm") -Kilotonne = ("kt") -LongHundredweight = ("cwt") -LongTon = ("long tn") -Megapound = ("Mlb", "Mlbs", "Mlbm") -Megatonne = ("Mt") -Microgram = ("µg") -Milligram = ("mg") -Nanogram = ("ng") -Ounce = ("oz") -Pound = ("lb", "lbs", "lbm") -ShortHundredweight = ("cwt") -ShortTon = ("t (short)", "short tn", "ST") -Slug = ("slug") -SolarMass = ("M☉", "M⊙") -Stone = ("st") -Tonne = ("t") diff --git a/UnitsNet/GeneratedCode/Resources/MassConcentration.restext b/UnitsNet/GeneratedCode/Resources/MassConcentration.restext deleted file mode 100644 index 132d30b09e..0000000000 --- a/UnitsNet/GeneratedCode/Resources/MassConcentration.restext +++ /dev/null @@ -1,49 +0,0 @@ -CentigramPerDeciliter = ("cg/dL") -CentigramPerLiter = ("cg/L") -CentigramPerMicroliter = ("cg/μL") -CentigramPerMilliliter = ("cg/mL") -DecigramPerDeciliter = ("dg/dL") -DecigramPerLiter = ("dg/L") -DecigramPerMicroliter = ("dg/μL") -DecigramPerMilliliter = ("dg/mL") -GramPerCubicCentimeter = ("g/cm³") -GramPerCubicMeter = ("g/m³") -GramPerCubicMillimeter = ("g/mm³") -GramPerDeciliter = ("g/dL") -GramPerLiter = ("g/L") -GramPerMicroliter = ("g/μL") -GramPerMilliliter = ("g/mL") -KilogramPerCubicCentimeter = ("kg/cm³") -KilogramPerCubicMeter = ("kg/m³") -KilogramPerCubicMillimeter = ("kg/mm³") -KilogramPerLiter = ("kg/L") -KilopoundPerCubicFoot = ("kip/ft³") -KilopoundPerCubicInch = ("kip/in³") -MicrogramPerCubicMeter = ("µg/m³") -MicrogramPerDeciliter = ("µg/dL") -MicrogramPerLiter = ("µg/L") -MicrogramPerMicroliter = ("µg/μL") -MicrogramPerMilliliter = ("µg/mL") -MilligramPerCubicMeter = ("mg/m³") -MilligramPerDeciliter = ("mg/dL") -MilligramPerLiter = ("mg/L") -MilligramPerMicroliter = ("mg/μL") -MilligramPerMilliliter = ("mg/mL") -NanogramPerDeciliter = ("ng/dL") -NanogramPerLiter = ("ng/L") -NanogramPerMicroliter = ("ng/μL") -NanogramPerMilliliter = ("ng/mL") -OuncePerImperialGallon = ("oz/gal (imp.)") -OuncePerUSGallon = ("oz/gal (U.S.)") -PicogramPerDeciliter = ("pg/dL") -PicogramPerLiter = ("pg/L") -PicogramPerMicroliter = ("pg/μL") -PicogramPerMilliliter = ("pg/mL") -PoundPerCubicFoot = ("lb/ft³") -PoundPerCubicInch = ("lb/in³") -PoundPerImperialGallon = ("ppg (imp.)") -PoundPerUSGallon = ("ppg (U.S.)") -SlugPerCubicFoot = ("slug/ft³") -TonnePerCubicCentimeter = ("t/cm³") -TonnePerCubicMeter = ("t/m³") -TonnePerCubicMillimeter = ("t/mm³") diff --git a/UnitsNet/GeneratedCode/Resources/MassFlow.restext b/UnitsNet/GeneratedCode/Resources/MassFlow.restext deleted file mode 100644 index 6a8135cf92..0000000000 --- a/UnitsNet/GeneratedCode/Resources/MassFlow.restext +++ /dev/null @@ -1,33 +0,0 @@ -CentigramPerDay = ("cg/d") -CentigramPerSecond = ("cg/s", "cg/S") -DecagramPerDay = ("dag/d") -DecagramPerSecond = ("dag/s", "dag/S") -DecigramPerDay = ("dg/d") -DecigramPerSecond = ("dg/s", "dg/S") -GramPerDay = ("g/d") -GramPerHour = ("g/h") -GramPerSecond = ("g/s", "g/S") -HectogramPerDay = ("hg/d") -HectogramPerSecond = ("hg/s", "hg/S") -KilogramPerDay = ("kg/d") -KilogramPerHour = ("kg/h") -KilogramPerMinute = ("kg/min") -KilogramPerSecond = ("kg/s", "kg/S") -MegagramPerDay = ("Mg/d") -MegapoundPerDay = ("Mlb/d") -MegapoundPerHour = ("Mlb/h") -MegapoundPerMinute = ("Mlb/min") -MegapoundPerSecond = ("Mlb/s") -MicrogramPerDay = ("µg/d") -MicrogramPerSecond = ("µg/s", "µg/S") -MilligramPerDay = ("mg/d") -MilligramPerSecond = ("mg/s", "mg/S") -NanogramPerDay = ("ng/d") -NanogramPerSecond = ("ng/s", "ng/S") -PoundPerDay = ("lb/d") -PoundPerHour = ("lb/h") -PoundPerMinute = ("lb/min") -PoundPerSecond = ("lb/s") -ShortTonPerHour = ("short tn/h") -TonnePerDay = ("t/d") -TonnePerHour = ("t/h") diff --git a/UnitsNet/GeneratedCode/Resources/MassFlux.restext b/UnitsNet/GeneratedCode/Resources/MassFlux.restext deleted file mode 100644 index d02bbc6ccd..0000000000 --- a/UnitsNet/GeneratedCode/Resources/MassFlux.restext +++ /dev/null @@ -1,12 +0,0 @@ -GramPerHourPerSquareCentimeter = ("g·h⁻¹·cm⁻²") -GramPerHourPerSquareMeter = ("g·h⁻¹·m⁻²") -GramPerHourPerSquareMillimeter = ("g·h⁻¹·mm⁻²") -GramPerSecondPerSquareCentimeter = ("g·s⁻¹·cm⁻²") -GramPerSecondPerSquareMeter = ("g·s⁻¹·m⁻²") -GramPerSecondPerSquareMillimeter = ("g·s⁻¹·mm⁻²") -KilogramPerHourPerSquareCentimeter = ("kg·h⁻¹·cm⁻²") -KilogramPerHourPerSquareMeter = ("kg·h⁻¹·m⁻²") -KilogramPerHourPerSquareMillimeter = ("kg·h⁻¹·mm⁻²") -KilogramPerSecondPerSquareCentimeter = ("kg·s⁻¹·cm⁻²") -KilogramPerSecondPerSquareMeter = ("kg·s⁻¹·m⁻²") -KilogramPerSecondPerSquareMillimeter = ("kg·s⁻¹·mm⁻²") diff --git a/UnitsNet/GeneratedCode/Resources/MassFraction.restext b/UnitsNet/GeneratedCode/Resources/MassFraction.restext deleted file mode 100644 index 09dfd346fe..0000000000 --- a/UnitsNet/GeneratedCode/Resources/MassFraction.restext +++ /dev/null @@ -1,24 +0,0 @@ -CentigramPerGram = ("cg/g") -CentigramPerKilogram = ("cg/kg") -DecagramPerGram = ("dag/g") -DecagramPerKilogram = ("dag/kg") -DecigramPerGram = ("dg/g") -DecigramPerKilogram = ("dg/kg") -DecimalFraction = ("") -GramPerGram = ("g/g") -GramPerKilogram = ("g/kg") -HectogramPerGram = ("hg/g") -HectogramPerKilogram = ("hg/kg") -KilogramPerGram = ("kg/g") -KilogramPerKilogram = ("kg/kg") -MicrogramPerGram = ("µg/g") -MicrogramPerKilogram = ("µg/kg") -MilligramPerGram = ("mg/g") -MilligramPerKilogram = ("mg/kg") -NanogramPerGram = ("ng/g") -NanogramPerKilogram = ("ng/kg") -PartPerBillion = ("ppb") -PartPerMillion = ("ppm") -PartPerThousand = ("‰") -PartPerTrillion = ("ppt") -Percent = ("%", "% (w/w)") diff --git a/UnitsNet/GeneratedCode/Resources/MassMomentOfInertia.restext b/UnitsNet/GeneratedCode/Resources/MassMomentOfInertia.restext deleted file mode 100644 index e4918fe527..0000000000 --- a/UnitsNet/GeneratedCode/Resources/MassMomentOfInertia.restext +++ /dev/null @@ -1,28 +0,0 @@ -GramSquareCentimeter = ("g·cm²") -GramSquareDecimeter = ("g·dm²") -GramSquareMeter = ("g·m²") -GramSquareMillimeter = ("g·mm²") -KilogramSquareCentimeter = ("kg·cm²") -KilogramSquareDecimeter = ("kg·dm²") -KilogramSquareMeter = ("kg·m²") -KilogramSquareMillimeter = ("kg·mm²") -KilotonneSquareCentimeter = ("kt·cm²") -KilotonneSquareDecimeter = ("kt·dm²") -KilotonneSquareMeter = ("kt·m²") -KilotonneSquareMilimeter = ("kt·mm²") -MegatonneSquareCentimeter = ("Mt·cm²") -MegatonneSquareDecimeter = ("Mt·dm²") -MegatonneSquareMeter = ("Mt·m²") -MegatonneSquareMilimeter = ("Mt·mm²") -MilligramSquareCentimeter = ("mg·cm²") -MilligramSquareDecimeter = ("mg·dm²") -MilligramSquareMeter = ("mg·m²") -MilligramSquareMillimeter = ("mg·mm²") -PoundSquareFoot = ("lb·ft²") -PoundSquareInch = ("lb·in²") -SlugSquareFoot = ("slug·ft²") -SlugSquareInch = ("slug·in²") -TonneSquareCentimeter = ("t·cm²") -TonneSquareDecimeter = ("t·dm²") -TonneSquareMeter = ("t·m²") -TonneSquareMilimeter = ("t·mm²") diff --git a/UnitsNet/GeneratedCode/Resources/MolarEnergy.restext b/UnitsNet/GeneratedCode/Resources/MolarEnergy.restext deleted file mode 100644 index 8c4ea7ad1e..0000000000 --- a/UnitsNet/GeneratedCode/Resources/MolarEnergy.restext +++ /dev/null @@ -1,3 +0,0 @@ -JoulePerMole = ("J/mol") -KilojoulePerMole = ("kJ/mol") -MegajoulePerMole = ("MJ/mol") diff --git a/UnitsNet/GeneratedCode/Resources/MolarEntropy.restext b/UnitsNet/GeneratedCode/Resources/MolarEntropy.restext deleted file mode 100644 index dbc70b29a0..0000000000 --- a/UnitsNet/GeneratedCode/Resources/MolarEntropy.restext +++ /dev/null @@ -1,3 +0,0 @@ -JoulePerMoleKelvin = ("J/(mol*K)") -KilojoulePerMoleKelvin = ("kJ/(mol*K)") -MegajoulePerMoleKelvin = ("MJ/(mol*K)") diff --git a/UnitsNet/GeneratedCode/Resources/MolarFlow.restext b/UnitsNet/GeneratedCode/Resources/MolarFlow.restext deleted file mode 100644 index b2caad2427..0000000000 --- a/UnitsNet/GeneratedCode/Resources/MolarFlow.restext +++ /dev/null @@ -1,9 +0,0 @@ -KilomolePerHour = ("kkmol/h") -KilomolePerMinute = ("kmol/min") -KilomolePerSecond = ("kmol/s") -MolePerHour = ("kmol/h") -MolePerMinute = ("mol/min") -MolePerSecond = ("mol/s") -PoundMolePerHour = ("lbmol/h") -PoundMolePerMinute = ("lbmol/min") -PoundMolePerSecond = ("lbmol/s") diff --git a/UnitsNet/GeneratedCode/Resources/MolarMass.restext b/UnitsNet/GeneratedCode/Resources/MolarMass.restext deleted file mode 100644 index 62face4da8..0000000000 --- a/UnitsNet/GeneratedCode/Resources/MolarMass.restext +++ /dev/null @@ -1,13 +0,0 @@ -CentigramPerMole = ("cg/mol") -DecagramPerMole = ("dag/mol") -DecigramPerMole = ("dg/mol") -GramPerMole = ("g/mol") -HectogramPerMole = ("hg/mol") -KilogramPerKilomole = ("kg/kmol") -KilogramPerMole = ("kg/mol") -KilopoundPerMole = ("klb/mol") -MegapoundPerMole = ("Mlb/mol") -MicrogramPerMole = ("µg/mol") -MilligramPerMole = ("mg/mol") -NanogramPerMole = ("ng/mol") -PoundPerMole = ("lb/mol") diff --git a/UnitsNet/GeneratedCode/Resources/Molarity.restext b/UnitsNet/GeneratedCode/Resources/Molarity.restext deleted file mode 100644 index 68ae055510..0000000000 --- a/UnitsNet/GeneratedCode/Resources/Molarity.restext +++ /dev/null @@ -1,11 +0,0 @@ -CentimolePerLiter = ("cmol/L", "cM") -DecimolePerLiter = ("dmol/L", "dM") -FemtomolePerLiter = ("fmol/L", "fM") -KilomolePerCubicMeter = ("kmol/m³") -MicromolePerLiter = ("µmol/L", "µM") -MillimolePerLiter = ("mmol/L", "mM") -MolePerCubicMeter = ("mol/m³") -MolePerLiter = ("mol/L", "M") -NanomolePerLiter = ("nmol/L", "nM") -PicomolePerLiter = ("pmol/L", "pM") -PoundMolePerCubicFoot = ("lbmol/ft³") diff --git a/UnitsNet/GeneratedCode/Resources/Permeability.restext b/UnitsNet/GeneratedCode/Resources/Permeability.restext deleted file mode 100644 index cd40eeadb3..0000000000 --- a/UnitsNet/GeneratedCode/Resources/Permeability.restext +++ /dev/null @@ -1 +0,0 @@ -HenryPerMeter = ("H/m") diff --git a/UnitsNet/GeneratedCode/Resources/Permittivity.restext b/UnitsNet/GeneratedCode/Resources/Permittivity.restext deleted file mode 100644 index 0ab9ab1f1d..0000000000 --- a/UnitsNet/GeneratedCode/Resources/Permittivity.restext +++ /dev/null @@ -1 +0,0 @@ -FaradPerMeter = ("F/m") diff --git a/UnitsNet/GeneratedCode/Resources/PorousMediumPermeability.restext b/UnitsNet/GeneratedCode/Resources/PorousMediumPermeability.restext deleted file mode 100644 index 4af9248edb..0000000000 --- a/UnitsNet/GeneratedCode/Resources/PorousMediumPermeability.restext +++ /dev/null @@ -1,5 +0,0 @@ -Darcy = ("D") -Microdarcy = ("µD") -Millidarcy = ("mD") -SquareCentimeter = ("cm²") -SquareMeter = ("m²") diff --git a/UnitsNet/GeneratedCode/Resources/Power.restext b/UnitsNet/GeneratedCode/Resources/Power.restext deleted file mode 100644 index 74d1bf453c..0000000000 --- a/UnitsNet/GeneratedCode/Resources/Power.restext +++ /dev/null @@ -1,26 +0,0 @@ -BoilerHorsepower = ("hp(S)") -BritishThermalUnitPerHour = ("Btu/h", "Btu/hr") -Decawatt = ("daW") -Deciwatt = ("dW") -ElectricalHorsepower = ("hp(E)") -Femtowatt = ("fW") -GigajoulePerHour = ("GJ/h") -Gigawatt = ("GW") -HydraulicHorsepower = ("hp(H)") -JoulePerHour = ("J/h") -KilobritishThermalUnitPerHour = ("kBtu/h", "kBtu/hr") -KilojoulePerHour = ("kJ/h") -Kilowatt = ("kW") -MechanicalHorsepower = ("hp(I)") -MegabritishThermalUnitPerHour = ("MBtu/h", "MBtu/hr") -MegajoulePerHour = ("MJ/h") -Megawatt = ("MW") -MetricHorsepower = ("hp(M)") -Microwatt = ("µW") -MillijoulePerHour = ("mJ/h") -Milliwatt = ("mW") -Nanowatt = ("nW") -Petawatt = ("PW") -Picowatt = ("pW") -Terawatt = ("TW") -Watt = ("W") diff --git a/UnitsNet/GeneratedCode/Resources/PowerDensity.restext b/UnitsNet/GeneratedCode/Resources/PowerDensity.restext deleted file mode 100644 index 08e896d6be..0000000000 --- a/UnitsNet/GeneratedCode/Resources/PowerDensity.restext +++ /dev/null @@ -1,44 +0,0 @@ -DecawattPerCubicFoot = ("daW/ft³") -DecawattPerCubicInch = ("daW/in³") -DecawattPerCubicMeter = ("daW/m³") -DecawattPerLiter = ("daW/l") -DeciwattPerCubicFoot = ("dW/ft³") -DeciwattPerCubicInch = ("dW/in³") -DeciwattPerCubicMeter = ("dW/m³") -DeciwattPerLiter = ("dW/l") -GigawattPerCubicFoot = ("GW/ft³") -GigawattPerCubicInch = ("GW/in³") -GigawattPerCubicMeter = ("GW/m³") -GigawattPerLiter = ("GW/l") -KilowattPerCubicFoot = ("kW/ft³") -KilowattPerCubicInch = ("kW/in³") -KilowattPerCubicMeter = ("kW/m³") -KilowattPerLiter = ("kW/l") -MegawattPerCubicFoot = ("MW/ft³") -MegawattPerCubicInch = ("MW/in³") -MegawattPerCubicMeter = ("MW/m³") -MegawattPerLiter = ("MW/l") -MicrowattPerCubicFoot = ("µW/ft³") -MicrowattPerCubicInch = ("µW/in³") -MicrowattPerCubicMeter = ("µW/m³") -MicrowattPerLiter = ("µW/l") -MilliwattPerCubicFoot = ("mW/ft³") -MilliwattPerCubicInch = ("mW/in³") -MilliwattPerCubicMeter = ("mW/m³") -MilliwattPerLiter = ("mW/l") -NanowattPerCubicFoot = ("nW/ft³") -NanowattPerCubicInch = ("nW/in³") -NanowattPerCubicMeter = ("nW/m³") -NanowattPerLiter = ("nW/l") -PicowattPerCubicFoot = ("pW/ft³") -PicowattPerCubicInch = ("pW/in³") -PicowattPerCubicMeter = ("pW/m³") -PicowattPerLiter = ("pW/l") -TerawattPerCubicFoot = ("TW/ft³") -TerawattPerCubicInch = ("TW/in³") -TerawattPerCubicMeter = ("TW/m³") -TerawattPerLiter = ("TW/l") -WattPerCubicFoot = ("W/ft³") -WattPerCubicInch = ("W/in³") -WattPerCubicMeter = ("W/m³") -WattPerLiter = ("W/l") diff --git a/UnitsNet/GeneratedCode/Resources/PowerRatio.restext b/UnitsNet/GeneratedCode/Resources/PowerRatio.restext deleted file mode 100644 index 7e8a6001e5..0000000000 --- a/UnitsNet/GeneratedCode/Resources/PowerRatio.restext +++ /dev/null @@ -1,2 +0,0 @@ -DecibelMilliwatt = ("dBmW", "dBm") -DecibelWatt = ("dBW") diff --git a/UnitsNet/GeneratedCode/Resources/Pressure.restext b/UnitsNet/GeneratedCode/Resources/Pressure.restext deleted file mode 100644 index b27ed211fc..0000000000 --- a/UnitsNet/GeneratedCode/Resources/Pressure.restext +++ /dev/null @@ -1,47 +0,0 @@ -Atmosphere = ("atm") -Bar = ("bar") -Centibar = ("cbar") -Decapascal = ("daPa") -Decibar = ("dbar") -DynePerSquareCentimeter = ("dyn/cm²") -FootOfElevation = ("ft of elevation") -FootOfHead = ("ft of head") -Gigapascal = ("GPa") -Hectopascal = ("hPa") -InchOfMercury = ("inHg") -InchOfWaterColumn = ("inH2O", "inch wc", "wc") -Kilobar = ("kbar") -KilogramForcePerSquareCentimeter = ("kgf/cm²") -KilogramForcePerSquareMeter = ("kgf/m²") -KilogramForcePerSquareMillimeter = ("kgf/mm²") -KilonewtonPerSquareCentimeter = ("kN/cm²") -KilonewtonPerSquareMeter = ("kN/m²") -KilonewtonPerSquareMillimeter = ("kN/mm²") -Kilopascal = ("kPa") -KilopoundForcePerSquareFoot = ("kipf/ft²") -KilopoundForcePerSquareInch = ("ksi", "kipf/in²") -KilopoundForcePerSquareMil = ("kipf/mil²") -Megabar = ("Mbar") -MeganewtonPerSquareMeter = ("MN/m²") -Megapascal = ("MPa") -MeterOfElevation = ("m of elevation") -MeterOfHead = ("m of head") -Microbar = ("µbar") -Micropascal = ("µPa") -Millibar = ("mbar") -MillimeterOfMercury = ("mmHg") -MillimeterOfWaterColumn = ("mmH2O", "mm wc") -Millipascal = ("mPa") -NewtonPerSquareCentimeter = ("N/cm²") -NewtonPerSquareMeter = ("N/m²") -NewtonPerSquareMillimeter = ("N/mm²") -Pascal = ("Pa") -PoundForcePerSquareFoot = ("lb/ft²") -PoundForcePerSquareInch = ("psi", "lb/in²") -PoundForcePerSquareMil = ("lb/mil²", "lbs/mil²") -PoundPerInchSecondSquared = ("lbm/(in·s²)", "lb/(in·s²)") -TechnicalAtmosphere = ("at") -TonneForcePerSquareCentimeter = ("tf/cm²") -TonneForcePerSquareMeter = ("tf/m²") -TonneForcePerSquareMillimeter = ("tf/mm²") -Torr = ("torr") diff --git a/UnitsNet/GeneratedCode/Resources/PressureChangeRate.restext b/UnitsNet/GeneratedCode/Resources/PressureChangeRate.restext deleted file mode 100644 index 2df40aa34e..0000000000 --- a/UnitsNet/GeneratedCode/Resources/PressureChangeRate.restext +++ /dev/null @@ -1,14 +0,0 @@ -AtmospherePerSecond = ("atm/s") -KilopascalPerMinute = ("kPa/min") -KilopascalPerSecond = ("kPa/s") -KilopoundForcePerSquareInchPerMinute = ("ksi/min", "kipf/in²/min") -KilopoundForcePerSquareInchPerSecond = ("ksi/s", "kipf/in²/s") -MegapascalPerMinute = ("MPa/min") -MegapascalPerSecond = ("MPa/s") -MegapoundForcePerSquareInchPerMinute = ("Mpsi/min", "Mlb/in²/min") -MegapoundForcePerSquareInchPerSecond = ("Mpsi/s", "Mlb/in²/s") -MillimeterOfMercuryPerSecond = ("mmHg/s") -PascalPerMinute = ("Pa/min") -PascalPerSecond = ("Pa/s") -PoundForcePerSquareInchPerMinute = ("psi/min", "lb/in²/min") -PoundForcePerSquareInchPerSecond = ("psi/s", "lb/in²/s") diff --git a/UnitsNet/GeneratedCode/Resources/Ratio.restext b/UnitsNet/GeneratedCode/Resources/Ratio.restext deleted file mode 100644 index 7f94b4bfae..0000000000 --- a/UnitsNet/GeneratedCode/Resources/Ratio.restext +++ /dev/null @@ -1,6 +0,0 @@ -DecimalFraction = ("") -PartPerBillion = ("ppb") -PartPerMillion = ("ppm") -PartPerThousand = ("‰") -PartPerTrillion = ("ppt") -Percent = ("%") diff --git a/UnitsNet/GeneratedCode/Resources/RatioChangeRate.restext b/UnitsNet/GeneratedCode/Resources/RatioChangeRate.restext deleted file mode 100644 index bfc3b132eb..0000000000 --- a/UnitsNet/GeneratedCode/Resources/RatioChangeRate.restext +++ /dev/null @@ -1,2 +0,0 @@ -DecimalFractionPerSecond = ("/s") -PercentPerSecond = ("%/s") diff --git a/UnitsNet/GeneratedCode/Resources/ReactiveEnergy.restext b/UnitsNet/GeneratedCode/Resources/ReactiveEnergy.restext deleted file mode 100644 index 78c00ad4ee..0000000000 --- a/UnitsNet/GeneratedCode/Resources/ReactiveEnergy.restext +++ /dev/null @@ -1,3 +0,0 @@ -KilovoltampereReactiveHour = ("kvarh") -MegavoltampereReactiveHour = ("Mvarh") -VoltampereReactiveHour = ("varh") diff --git a/UnitsNet/GeneratedCode/Resources/ReactivePower.restext b/UnitsNet/GeneratedCode/Resources/ReactivePower.restext deleted file mode 100644 index 7abc65e55d..0000000000 --- a/UnitsNet/GeneratedCode/Resources/ReactivePower.restext +++ /dev/null @@ -1,4 +0,0 @@ -GigavoltampereReactive = ("Gvar") -KilovoltampereReactive = ("kvar") -MegavoltampereReactive = ("Mvar") -VoltampereReactive = ("var") diff --git a/UnitsNet/GeneratedCode/Resources/ReciprocalArea.restext b/UnitsNet/GeneratedCode/Resources/ReciprocalArea.restext deleted file mode 100644 index 555d558fb6..0000000000 --- a/UnitsNet/GeneratedCode/Resources/ReciprocalArea.restext +++ /dev/null @@ -1,11 +0,0 @@ -InverseSquareCentimeter = ("cm⁻²") -InverseSquareDecimeter = ("dm⁻²") -InverseSquareFoot = ("ft⁻²") -InverseSquareInch = ("in⁻²") -InverseSquareKilometer = ("km⁻²") -InverseSquareMeter = ("m⁻²") -InverseSquareMicrometer = ("µm⁻²") -InverseSquareMile = ("mi⁻²") -InverseSquareMillimeter = ("mm⁻²") -InverseSquareYard = ("yd⁻²") -InverseUsSurveySquareFoot = ("ft⁻² (US)") diff --git a/UnitsNet/GeneratedCode/Resources/ReciprocalLength.restext b/UnitsNet/GeneratedCode/Resources/ReciprocalLength.restext deleted file mode 100644 index c95fe3c06c..0000000000 --- a/UnitsNet/GeneratedCode/Resources/ReciprocalLength.restext +++ /dev/null @@ -1,10 +0,0 @@ -InverseCentimeter = ("cm⁻¹", "1/cm") -InverseFoot = ("ft⁻¹", "1/ft") -InverseInch = ("in⁻¹", "1/in") -InverseMeter = ("m⁻¹", "1/m") -InverseMicroinch = ("µin⁻¹", "1/µin") -InverseMil = ("mil⁻¹", "1/mil") -InverseMile = ("mi⁻¹", "1/mi") -InverseMillimeter = ("mm⁻¹", "1/mm") -InverseUsSurveyFoot = ("ftUS⁻¹", "1/ftUS") -InverseYard = ("yd⁻¹", "1/yd") diff --git a/UnitsNet/GeneratedCode/Resources/RelativeHumidity.restext b/UnitsNet/GeneratedCode/Resources/RelativeHumidity.restext deleted file mode 100644 index 78c88034d3..0000000000 --- a/UnitsNet/GeneratedCode/Resources/RelativeHumidity.restext +++ /dev/null @@ -1 +0,0 @@ -Percent = ("%RH") diff --git a/UnitsNet/GeneratedCode/Resources/RotationalAcceleration.restext b/UnitsNet/GeneratedCode/Resources/RotationalAcceleration.restext deleted file mode 100644 index a05729de46..0000000000 --- a/UnitsNet/GeneratedCode/Resources/RotationalAcceleration.restext +++ /dev/null @@ -1,4 +0,0 @@ -DegreePerSecondSquared = ("°/s²", "deg/s²") -RadianPerSecondSquared = ("rad/s²") -RevolutionPerMinutePerSecond = ("rpm/s") -RevolutionPerSecondSquared = ("r/s²") diff --git a/UnitsNet/GeneratedCode/Resources/RotationalSpeed.restext b/UnitsNet/GeneratedCode/Resources/RotationalSpeed.restext deleted file mode 100644 index ebe053b5f5..0000000000 --- a/UnitsNet/GeneratedCode/Resources/RotationalSpeed.restext +++ /dev/null @@ -1,13 +0,0 @@ -CentiradianPerSecond = ("crad/s") -DeciradianPerSecond = ("drad/s") -DegreePerMinute = ("°/min", "deg/min") -DegreePerSecond = ("°/s", "deg/s") -MicrodegreePerSecond = ("µ°/s", "µdeg/s") -MicroradianPerSecond = ("µrad/s") -MillidegreePerSecond = ("m°/s", "mdeg/s") -MilliradianPerSecond = ("mrad/s") -NanodegreePerSecond = ("n°/s", "ndeg/s") -NanoradianPerSecond = ("nrad/s") -RadianPerSecond = ("rad/s") -RevolutionPerMinute = ("rpm", "r/min") -RevolutionPerSecond = ("r/s") diff --git a/UnitsNet/GeneratedCode/Resources/RotationalStiffness.restext b/UnitsNet/GeneratedCode/Resources/RotationalStiffness.restext deleted file mode 100644 index ad0af65e6b..0000000000 --- a/UnitsNet/GeneratedCode/Resources/RotationalStiffness.restext +++ /dev/null @@ -1,33 +0,0 @@ -CentinewtonMeterPerDegree = ("cN·m/deg", "cNm/deg", "cN·m/°", "cNm/°") -CentinewtonMillimeterPerDegree = ("cN·mm/deg", "cNmm/deg", "cN·mm/°", "cNmm/°") -CentinewtonMillimeterPerRadian = ("cN·mm/rad", "cNmm/rad") -DecanewtonMeterPerDegree = ("daN·m/deg", "daNm/deg", "daN·m/°", "daNm/°") -DecanewtonMillimeterPerDegree = ("daN·mm/deg", "daNmm/deg", "daN·mm/°", "daNmm/°") -DecanewtonMillimeterPerRadian = ("daN·mm/rad", "daNmm/rad") -DecinewtonMeterPerDegree = ("dN·m/deg", "dNm/deg", "dN·m/°", "dNm/°") -DecinewtonMillimeterPerDegree = ("dN·mm/deg", "dNmm/deg", "dN·mm/°", "dNmm/°") -DecinewtonMillimeterPerRadian = ("dN·mm/rad", "dNmm/rad") -KilonewtonMeterPerDegree = ("kN·m/deg", "kNm/deg", "kN·m/°", "kNm/°") -KilonewtonMeterPerRadian = ("kN·m/rad", "kNm/rad") -KilonewtonMillimeterPerDegree = ("kN·mm/deg", "kNmm/deg", "kN·mm/°", "kNmm/°") -KilonewtonMillimeterPerRadian = ("kN·mm/rad", "kNmm/rad") -KilopoundForceFootPerDegrees = ("kipf·ft/°", "kip·ft/°g", "k·ft/°", "kipf·ft/deg", "kip·ft/deg", "k·ft/deg") -MeganewtonMeterPerDegree = ("MN·m/deg", "MNm/deg", "MN·m/°", "MNm/°") -MeganewtonMeterPerRadian = ("MN·m/rad", "MNm/rad") -MeganewtonMillimeterPerDegree = ("MN·mm/deg", "MNmm/deg", "MN·mm/°", "MNmm/°") -MeganewtonMillimeterPerRadian = ("MN·mm/rad", "MNmm/rad") -MicronewtonMeterPerDegree = ("µN·m/deg", "µNm/deg", "µN·m/°", "µNm/°") -MicronewtonMillimeterPerDegree = ("µN·mm/deg", "µNmm/deg", "µN·mm/°", "µNmm/°") -MicronewtonMillimeterPerRadian = ("µN·mm/rad", "µNmm/rad") -MillinewtonMeterPerDegree = ("mN·m/deg", "mNm/deg", "mN·m/°", "mNm/°") -MillinewtonMillimeterPerDegree = ("mN·mm/deg", "mNmm/deg", "mN·mm/°", "mNmm/°") -MillinewtonMillimeterPerRadian = ("mN·mm/rad", "mNmm/rad") -NanonewtonMeterPerDegree = ("nN·m/deg", "nNm/deg", "nN·m/°", "nNm/°") -NanonewtonMillimeterPerDegree = ("nN·mm/deg", "nNmm/deg", "nN·mm/°", "nNmm/°") -NanonewtonMillimeterPerRadian = ("nN·mm/rad", "nNmm/rad") -NewtonMeterPerDegree = ("N·m/deg", "Nm/deg", "N·m/°", "Nm/°") -NewtonMeterPerRadian = ("N·m/rad", "Nm/rad") -NewtonMillimeterPerDegree = ("N·mm/deg", "Nmm/deg", "N·mm/°", "Nmm/°") -NewtonMillimeterPerRadian = ("N·mm/rad", "Nmm/rad") -PoundForceFeetPerRadian = ("lbf·ft/rad") -PoundForceFootPerDegrees = ("lbf·ft/deg") diff --git a/UnitsNet/GeneratedCode/Resources/RotationalStiffnessPerLength.restext b/UnitsNet/GeneratedCode/Resources/RotationalStiffnessPerLength.restext deleted file mode 100644 index c567e68bcf..0000000000 --- a/UnitsNet/GeneratedCode/Resources/RotationalStiffnessPerLength.restext +++ /dev/null @@ -1,5 +0,0 @@ -KilonewtonMeterPerRadianPerMeter = ("kN·m/rad/m", "kNm/rad/m") -KilopoundForceFootPerDegreesPerFoot = ("kipf·ft/°/ft", "kip·ft/°/ft", "k·ft/°/ft", "kipf·ft/deg/ft", "kip·ft/deg/ft", "k·ft/deg/ft") -MeganewtonMeterPerRadianPerMeter = ("MN·m/rad/m", "MNm/rad/m") -NewtonMeterPerRadianPerMeter = ("N·m/rad/m", "Nm/rad/m") -PoundForceFootPerDegreesPerFoot = ("lbf·ft/deg/ft") diff --git a/UnitsNet/GeneratedCode/Resources/Scalar.restext b/UnitsNet/GeneratedCode/Resources/Scalar.restext deleted file mode 100644 index f2220753f7..0000000000 --- a/UnitsNet/GeneratedCode/Resources/Scalar.restext +++ /dev/null @@ -1 +0,0 @@ -Amount = ("") diff --git a/UnitsNet/GeneratedCode/Resources/SolidAngle.restext b/UnitsNet/GeneratedCode/Resources/SolidAngle.restext deleted file mode 100644 index c526b3ee3c..0000000000 --- a/UnitsNet/GeneratedCode/Resources/SolidAngle.restext +++ /dev/null @@ -1 +0,0 @@ -Steradian = ("sr") diff --git a/UnitsNet/GeneratedCode/Resources/SpecificEnergy.restext b/UnitsNet/GeneratedCode/Resources/SpecificEnergy.restext deleted file mode 100644 index 5200a8ba14..0000000000 --- a/UnitsNet/GeneratedCode/Resources/SpecificEnergy.restext +++ /dev/null @@ -1,30 +0,0 @@ -BtuPerPound = ("btu/lb") -CaloriePerGram = ("cal/g") -GigawattDayPerKilogram = ("GWd/kg") -GigawattDayPerShortTon = ("GWd/ST") -GigawattDayPerTonne = ("GWd/t") -GigawattHourPerKilogram = ("GWh/kg") -GigawattHourPerPound = ("GWh/lbs") -JoulePerKilogram = ("J/kg") -KilocaloriePerGram = ("kcal/g") -KilojoulePerKilogram = ("kJ/kg") -KilowattDayPerKilogram = ("kWd/kg") -KilowattDayPerShortTon = ("kWd/ST") -KilowattDayPerTonne = ("kWd/t") -KilowattHourPerKilogram = ("kWh/kg") -KilowattHourPerPound = ("kWh/lbs") -MegajoulePerKilogram = ("MJ/kg") -MegaJoulePerTonne = ("MJ/t") -MegawattDayPerKilogram = ("MWd/kg") -MegawattDayPerShortTon = ("MWd/ST") -MegawattDayPerTonne = ("MWd/t") -MegawattHourPerKilogram = ("MWh/kg") -MegawattHourPerPound = ("MWh/lbs") -TerawattDayPerKilogram = ("TWd/kg") -TerawattDayPerShortTon = ("TWd/ST") -TerawattDayPerTonne = ("TWd/t") -WattDayPerKilogram = ("Wd/kg") -WattDayPerShortTon = ("Wd/ST") -WattDayPerTonne = ("Wd/t") -WattHourPerKilogram = ("Wh/kg") -WattHourPerPound = ("Wh/lbs") diff --git a/UnitsNet/GeneratedCode/Resources/SpecificEntropy.restext b/UnitsNet/GeneratedCode/Resources/SpecificEntropy.restext deleted file mode 100644 index 6fd71a76c7..0000000000 --- a/UnitsNet/GeneratedCode/Resources/SpecificEntropy.restext +++ /dev/null @@ -1,9 +0,0 @@ -BtuPerPoundFahrenheit = ("BTU/lb·°F", "BTU/lbm·°F") -CaloriePerGramKelvin = ("cal/g.K") -JoulePerKilogramDegreeCelsius = ("J/kg.C") -JoulePerKilogramKelvin = ("J/kg.K") -KilocaloriePerGramKelvin = ("kcal/g.K") -KilojoulePerKilogramDegreeCelsius = ("kJ/kg.C") -KilojoulePerKilogramKelvin = ("kJ/kg.K") -MegajoulePerKilogramDegreeCelsius = ("MJ/kg.C") -MegajoulePerKilogramKelvin = ("MJ/kg.K") diff --git a/UnitsNet/GeneratedCode/Resources/SpecificFuelConsumption.restext b/UnitsNet/GeneratedCode/Resources/SpecificFuelConsumption.restext deleted file mode 100644 index 0eb517caa5..0000000000 --- a/UnitsNet/GeneratedCode/Resources/SpecificFuelConsumption.restext +++ /dev/null @@ -1,4 +0,0 @@ -GramPerKiloNewtonSecond = ("g/(kN�s)") -KilogramPerKilogramForceHour = ("kg/(kgf�h)") -KilogramPerKiloNewtonSecond = ("kg/(kN�s)") -PoundMassPerPoundForceHour = ("lb/(lbf·h)") diff --git a/UnitsNet/GeneratedCode/Resources/SpecificVolume.restext b/UnitsNet/GeneratedCode/Resources/SpecificVolume.restext deleted file mode 100644 index 83ade71717..0000000000 --- a/UnitsNet/GeneratedCode/Resources/SpecificVolume.restext +++ /dev/null @@ -1,3 +0,0 @@ -CubicFootPerPound = ("ft³/lb") -CubicMeterPerKilogram = ("m³/kg") -MillicubicMeterPerKilogram = ("mm³/kg") diff --git a/UnitsNet/GeneratedCode/Resources/SpecificWeight.restext b/UnitsNet/GeneratedCode/Resources/SpecificWeight.restext deleted file mode 100644 index ee017c4479..0000000000 --- a/UnitsNet/GeneratedCode/Resources/SpecificWeight.restext +++ /dev/null @@ -1,17 +0,0 @@ -KilogramForcePerCubicCentimeter = ("kgf/cm³") -KilogramForcePerCubicMeter = ("kgf/m³") -KilogramForcePerCubicMillimeter = ("kgf/mm³") -KilonewtonPerCubicCentimeter = ("kN/cm³") -KilonewtonPerCubicMeter = ("kN/m³") -KilonewtonPerCubicMillimeter = ("kN/mm³") -KilopoundForcePerCubicFoot = ("kipf/ft³") -KilopoundForcePerCubicInch = ("kipf/in³") -MeganewtonPerCubicMeter = ("MN/m³") -NewtonPerCubicCentimeter = ("N/cm³") -NewtonPerCubicMeter = ("N/m³") -NewtonPerCubicMillimeter = ("N/mm³") -PoundForcePerCubicFoot = ("lbf/ft³") -PoundForcePerCubicInch = ("lbf/in³") -TonneForcePerCubicCentimeter = ("tf/cm³") -TonneForcePerCubicMeter = ("tf/m³") -TonneForcePerCubicMillimeter = ("tf/mm³") diff --git a/UnitsNet/GeneratedCode/Resources/Speed.restext b/UnitsNet/GeneratedCode/Resources/Speed.restext deleted file mode 100644 index cf07e1e06b..0000000000 --- a/UnitsNet/GeneratedCode/Resources/Speed.restext +++ /dev/null @@ -1,33 +0,0 @@ -CentimeterPerHour = ("cm/h") -CentimeterPerMinute = ("cm/min") -CentimeterPerSecond = ("cm/s") -DecimeterPerMinute = ("dm/min") -DecimeterPerSecond = ("dm/s") -FootPerHour = ("ft/h") -FootPerMinute = ("ft/min") -FootPerSecond = ("ft/s") -InchPerHour = ("in/h") -InchPerMinute = ("in/min") -InchPerSecond = ("in/s") -KilometerPerHour = ("km/h") -KilometerPerMinute = ("km/min") -KilometerPerSecond = ("km/s") -Knot = ("kn", "kt", "knot", "knots") -Mach = ("M", "Ma", "MN", "MACH") -MeterPerHour = ("m/h") -MeterPerMinute = ("m/min") -MeterPerSecond = ("m/s") -MicrometerPerMinute = ("µm/min") -MicrometerPerSecond = ("µm/s") -MilePerHour = ("mph") -MillimeterPerHour = ("mm/h") -MillimeterPerMinute = ("mm/min") -MillimeterPerSecond = ("mm/s") -NanometerPerMinute = ("nm/min") -NanometerPerSecond = ("nm/s") -UsSurveyFootPerHour = ("ftUS/h") -UsSurveyFootPerMinute = ("ftUS/min") -UsSurveyFootPerSecond = ("ftUS/s") -YardPerHour = ("yd/h") -YardPerMinute = ("yd/min") -YardPerSecond = ("yd/s") diff --git a/UnitsNet/GeneratedCode/Resources/StandardVolumeFlow.restext b/UnitsNet/GeneratedCode/Resources/StandardVolumeFlow.restext deleted file mode 100644 index c97c3c0ea0..0000000000 --- a/UnitsNet/GeneratedCode/Resources/StandardVolumeFlow.restext +++ /dev/null @@ -1,9 +0,0 @@ -StandardCubicCentimeterPerMinute = ("sccm") -StandardCubicFootPerHour = ("scfh") -StandardCubicFootPerMinute = ("scfm") -StandardCubicFootPerSecond = ("Sft³/s") -StandardCubicMeterPerDay = ("Sm³/d") -StandardCubicMeterPerHour = ("Sm³/h") -StandardCubicMeterPerMinute = ("Sm³/min") -StandardCubicMeterPerSecond = ("Sm³/s") -StandardLiterPerMinute = ("slm") diff --git a/UnitsNet/GeneratedCode/Resources/Temperature.restext b/UnitsNet/GeneratedCode/Resources/Temperature.restext deleted file mode 100644 index 3179bd6910..0000000000 --- a/UnitsNet/GeneratedCode/Resources/Temperature.restext +++ /dev/null @@ -1,10 +0,0 @@ -DegreeCelsius = ("°C") -DegreeDelisle = ("°De") -DegreeFahrenheit = ("°F") -DegreeNewton = ("°N") -DegreeRankine = ("°R") -DegreeReaumur = ("°Ré") -DegreeRoemer = ("°Rø") -Kelvin = ("K") -MillidegreeCelsius = ("m°C") -SolarTemperature = ("T⊙") diff --git a/UnitsNet/GeneratedCode/Resources/TemperatureChangeRate.restext b/UnitsNet/GeneratedCode/Resources/TemperatureChangeRate.restext deleted file mode 100644 index 8255db7990..0000000000 --- a/UnitsNet/GeneratedCode/Resources/TemperatureChangeRate.restext +++ /dev/null @@ -1,10 +0,0 @@ -CentidegreeCelsiusPerSecond = ("c°C/s") -DecadegreeCelsiusPerSecond = ("da°C/s") -DecidegreeCelsiusPerSecond = ("d°C/s") -DegreeCelsiusPerMinute = ("°C/min") -DegreeCelsiusPerSecond = ("°C/s") -HectodegreeCelsiusPerSecond = ("h°C/s") -KilodegreeCelsiusPerSecond = ("k°C/s") -MicrodegreeCelsiusPerSecond = ("µ°C/s") -MillidegreeCelsiusPerSecond = ("m°C/s") -NanodegreeCelsiusPerSecond = ("n°C/s") diff --git a/UnitsNet/GeneratedCode/Resources/TemperatureDelta.restext b/UnitsNet/GeneratedCode/Resources/TemperatureDelta.restext deleted file mode 100644 index 3d1c2de632..0000000000 --- a/UnitsNet/GeneratedCode/Resources/TemperatureDelta.restext +++ /dev/null @@ -1,9 +0,0 @@ -DegreeCelsius = ("∆°C") -DegreeDelisle = ("∆°De") -DegreeFahrenheit = ("∆°F") -DegreeNewton = ("∆°N") -DegreeRankine = ("∆°R") -DegreeReaumur = ("∆°Ré") -DegreeRoemer = ("∆°Rø") -Kelvin = ("∆K") -MillidegreeCelsius = ("∆m°C") diff --git a/UnitsNet/GeneratedCode/Resources/TemperatureGradient.restext b/UnitsNet/GeneratedCode/Resources/TemperatureGradient.restext deleted file mode 100644 index a05b6b13dd..0000000000 --- a/UnitsNet/GeneratedCode/Resources/TemperatureGradient.restext +++ /dev/null @@ -1,4 +0,0 @@ -DegreeCelsiusPerKilometer = ("∆°C/km") -DegreeCelsiusPerMeter = ("∆°C/m") -DegreeFahrenheitPerFoot = ("∆°F/ft") -KelvinPerMeter = ("∆°K/m") diff --git a/UnitsNet/GeneratedCode/Resources/ThermalConductivity.restext b/UnitsNet/GeneratedCode/Resources/ThermalConductivity.restext deleted file mode 100644 index 947a9e3dbf..0000000000 --- a/UnitsNet/GeneratedCode/Resources/ThermalConductivity.restext +++ /dev/null @@ -1,2 +0,0 @@ -BtuPerHourFootFahrenheit = ("BTU/h·ft·°F") -WattPerMeterKelvin = ("W/m·K") diff --git a/UnitsNet/GeneratedCode/Resources/ThermalResistance.restext b/UnitsNet/GeneratedCode/Resources/ThermalResistance.restext deleted file mode 100644 index 192f9991cf..0000000000 --- a/UnitsNet/GeneratedCode/Resources/ThermalResistance.restext +++ /dev/null @@ -1,6 +0,0 @@ -HourSquareFeetDegreeFahrenheitPerBtu = ("Hrft²°F/Btu") -SquareCentimeterHourDegreeCelsiusPerKilocalorie = ("cm²Hr°C/kcal") -SquareCentimeterKelvinPerWatt = ("cm²K/W") -SquareMeterDegreeCelsiusPerWatt = ("m²°C/W") -SquareMeterKelvinPerKilowatt = ("m²K/kW") -SquareMeterKelvinPerWatt = ("m²K/W") diff --git a/UnitsNet/GeneratedCode/Resources/Torque.restext b/UnitsNet/GeneratedCode/Resources/Torque.restext deleted file mode 100644 index ac732fd9c3..0000000000 --- a/UnitsNet/GeneratedCode/Resources/Torque.restext +++ /dev/null @@ -1,25 +0,0 @@ -GramForceCentimeter = ("gf·cm") -GramForceMeter = ("gf·m") -GramForceMillimeter = ("gf·mm") -KilogramForceCentimeter = ("kgf·cm") -KilogramForceMeter = ("kgf·m") -KilogramForceMillimeter = ("kgf·mm") -KilonewtonCentimeter = ("kN·cm") -KilonewtonMeter = ("kN·m") -KilonewtonMillimeter = ("kN·mm") -KilopoundForceFoot = ("kipf·ft") -KilopoundForceInch = ("kipf·in") -MeganewtonCentimeter = ("MN·cm") -MeganewtonMeter = ("MN·m") -MeganewtonMillimeter = ("MN·mm") -MegapoundForceFoot = ("Mlbf·ft") -MegapoundForceInch = ("Mlbf·in") -NewtonCentimeter = ("N·cm") -NewtonMeter = ("N·m") -NewtonMillimeter = ("N·mm") -PoundalFoot = ("pdl·ft") -PoundForceFoot = ("lbf·ft") -PoundForceInch = ("lbf·in") -TonneForceCentimeter = ("tf·cm") -TonneForceMeter = ("tf·m") -TonneForceMillimeter = ("tf·mm") diff --git a/UnitsNet/GeneratedCode/Resources/TorquePerLength.restext b/UnitsNet/GeneratedCode/Resources/TorquePerLength.restext deleted file mode 100644 index dcaf3c40c6..0000000000 --- a/UnitsNet/GeneratedCode/Resources/TorquePerLength.restext +++ /dev/null @@ -1,21 +0,0 @@ -KilogramForceCentimeterPerMeter = ("kgf·cm/m") -KilogramForceMeterPerMeter = ("kgf·m/m") -KilogramForceMillimeterPerMeter = ("kgf·mm/m") -KilonewtonCentimeterPerMeter = ("kN·cm/m") -KilonewtonMeterPerMeter = ("kN·m/m") -KilonewtonMillimeterPerMeter = ("kN·mm/m") -KilopoundForceFootPerFoot = ("kipf·ft/ft") -KilopoundForceInchPerFoot = ("kipf·in/ft") -MeganewtonCentimeterPerMeter = ("MN·cm/m") -MeganewtonMeterPerMeter = ("MN·m/m") -MeganewtonMillimeterPerMeter = ("MN·mm/m") -MegapoundForceFootPerFoot = ("Mlbf·ft/ft") -MegapoundForceInchPerFoot = ("Mlbf·in/ft") -NewtonCentimeterPerMeter = ("N·cm/m") -NewtonMeterPerMeter = ("N·m/m") -NewtonMillimeterPerMeter = ("N·mm/m") -PoundForceFootPerFoot = ("lbf·ft/ft") -PoundForceInchPerFoot = ("lbf·in/ft") -TonneForceCentimeterPerMeter = ("tf·cm/m") -TonneForceMeterPerMeter = ("tf·m/m") -TonneForceMillimeterPerMeter = ("tf·mm/m") diff --git a/UnitsNet/GeneratedCode/Resources/Turbidity.restext b/UnitsNet/GeneratedCode/Resources/Turbidity.restext deleted file mode 100644 index 42332b88b9..0000000000 --- a/UnitsNet/GeneratedCode/Resources/Turbidity.restext +++ /dev/null @@ -1 +0,0 @@ -NTU = ("NTU") diff --git a/UnitsNet/GeneratedCode/Resources/VitaminA.restext b/UnitsNet/GeneratedCode/Resources/VitaminA.restext deleted file mode 100644 index f8da7c7e6c..0000000000 --- a/UnitsNet/GeneratedCode/Resources/VitaminA.restext +++ /dev/null @@ -1 +0,0 @@ -InternationalUnit = ("IU") diff --git a/UnitsNet/GeneratedCode/Resources/Volume.restext b/UnitsNet/GeneratedCode/Resources/Volume.restext deleted file mode 100644 index b9c1db3619..0000000000 --- a/UnitsNet/GeneratedCode/Resources/Volume.restext +++ /dev/null @@ -1,46 +0,0 @@ -AcreFoot = ("ac-ft", "acre-foot", "acre-feet") -BoardFoot = ("bf", "board foot", "board feet") -Centiliter = ("cl") -CubicCentimeter = ("cm³") -CubicDecimeter = ("dm³") -CubicFoot = ("ft³") -CubicHectometer = ("hm³") -CubicInch = ("in³") -CubicKilometer = ("km³") -CubicMeter = ("m³") -CubicMicrometer = ("µm³") -CubicMile = ("mi³") -CubicMillimeter = ("mm³") -CubicYard = ("yd³") -Decaliter = ("dal") -DecausGallon = ("dagal (U.S.)") -Deciliter = ("dl") -DeciusGallon = ("dgal (U.S.)") -HectocubicFoot = ("hft³") -HectocubicMeter = ("hm³") -Hectoliter = ("hl") -HectousGallon = ("hgal (U.S.)") -ImperialBeerBarrel = ("bl (imp.)") -ImperialGallon = ("gal (imp.)") -ImperialOunce = ("oz (imp.)") -ImperialPint = ("pt (imp.)", "UK pt", "pt", "p") -KilocubicFoot = ("kft³") -KilocubicMeter = ("km³") -KiloimperialGallon = ("kgal (imp.)") -Kiloliter = ("kl") -KilousGallon = ("kgal (U.S.)") -Liter = ("l") -MegacubicFoot = ("Mft³") -MegaimperialGallon = ("Mgal (imp.)") -Megaliter = ("Ml") -MegausGallon = ("Mgal (U.S.)") -MetricTeaspoon = ("tsp", "t", "ts", "tspn", "t.", "ts.", "tsp.", "tspn.", "teaspoon") -Microliter = ("µl") -Milliliter = ("ml") -Nanoliter = ("nl") -OilBarrel = ("bbl") -UsBeerBarrel = ("bl (U.S.)") -UsGallon = ("gal (U.S.)") -UsOunce = ("oz (U.S.)") -UsPint = ("pt (U.S.)") -UsQuart = ("qt (U.S.)") diff --git a/UnitsNet/GeneratedCode/Resources/VolumeConcentration.restext b/UnitsNet/GeneratedCode/Resources/VolumeConcentration.restext deleted file mode 100644 index ad9b6fc2c0..0000000000 --- a/UnitsNet/GeneratedCode/Resources/VolumeConcentration.restext +++ /dev/null @@ -1,20 +0,0 @@ -CentilitersPerLiter = ("cL/L") -CentilitersPerMililiter = ("cL/mL") -DecilitersPerLiter = ("dL/L") -DecilitersPerMililiter = ("dL/mL") -DecimalFraction = ("") -LitersPerLiter = ("L/L") -LitersPerMililiter = ("L/mL") -MicrolitersPerLiter = ("µL/L") -MicrolitersPerMililiter = ("µL/mL") -MillilitersPerLiter = ("mL/L") -MillilitersPerMililiter = ("mL/mL") -NanolitersPerLiter = ("nL/L") -NanolitersPerMililiter = ("nL/mL") -PartPerBillion = ("ppb") -PartPerMillion = ("ppm") -PartPerThousand = ("‰") -PartPerTrillion = ("ppt") -Percent = ("%", "% (v/v)") -PicolitersPerLiter = ("pL/L") -PicolitersPerMililiter = ("pL/mL") diff --git a/UnitsNet/GeneratedCode/Resources/VolumeFlow.restext b/UnitsNet/GeneratedCode/Resources/VolumeFlow.restext deleted file mode 100644 index 36d16bd97a..0000000000 --- a/UnitsNet/GeneratedCode/Resources/VolumeFlow.restext +++ /dev/null @@ -1,62 +0,0 @@ -AcreFootPerDay = ("af/d") -AcreFootPerHour = ("af/h") -AcreFootPerMinute = ("af/m") -AcreFootPerSecond = ("af/s") -CentiliterPerDay = ("cl/day", "cL/d", "cLPD") -CentiliterPerHour = ("cL/h", "cLPH") -CentiliterPerMinute = ("cL/min", "cLPM") -CentiliterPerSecond = ("cL/s", "cLPS") -CubicCentimeterPerMinute = ("cm³/min") -CubicDecimeterPerMinute = ("dm³/min") -CubicFootPerHour = ("ft³/h", "cf/hr") -CubicFootPerMinute = ("ft³/min", "CFM") -CubicFootPerSecond = ("ft³/s") -CubicMeterPerDay = ("m³/d") -CubicMeterPerHour = ("m³/h") -CubicMeterPerMinute = ("m³/min") -CubicMeterPerSecond = ("m³/s") -CubicMillimeterPerSecond = ("mm³/s") -CubicYardPerDay = ("cy/day") -CubicYardPerHour = ("yd³/h") -CubicYardPerMinute = ("yd³/min") -CubicYardPerSecond = ("yd³/s") -DeciliterPerDay = ("dl/day", "dL/d", "dLPD") -DeciliterPerHour = ("dL/h", "dLPH") -DeciliterPerMinute = ("dL/min", "dLPM") -DeciliterPerSecond = ("dL/s", "dLPS") -KiloliterPerDay = ("kl/day", "kL/d", "kLPD") -KiloliterPerHour = ("kL/h", "kLPH") -KiloliterPerMinute = ("kL/min", "kLPM") -KiloliterPerSecond = ("kL/s", "kLPS") -KilousGallonPerMinute = ("kgal (U.S.)/min", "KGPM") -LiterPerDay = ("l/day", "L/d", "LPD") -LiterPerHour = ("L/h", "LPH") -LiterPerMinute = ("L/min", "LPM") -LiterPerSecond = ("L/s", "LPS") -MegaliterPerDay = ("Ml/day", "ML/d", "MLPD") -MegaukGallonPerSecond = ("Mgal (imp.)/s") -MicroliterPerDay = ("µl/day", "µL/d", "µLPD") -MicroliterPerHour = ("µL/h", "µLPH") -MicroliterPerMinute = ("µL/min", "µLPM") -MicroliterPerSecond = ("µL/s", "µLPS") -MilliliterPerDay = ("ml/day", "mL/d", "mLPD") -MilliliterPerHour = ("mL/h", "mLPH") -MilliliterPerMinute = ("mL/min", "mLPM") -MilliliterPerSecond = ("mL/s", "mLPS") -MillionUsGallonPerDay = ("MGD") -NanoliterPerDay = ("nl/day", "nL/d", "nLPD") -NanoliterPerHour = ("nL/h", "nLPH") -NanoliterPerMinute = ("nL/min", "nLPM") -NanoliterPerSecond = ("nL/s", "nLPS") -OilBarrelPerDay = ("bbl/d", "BOPD") -OilBarrelPerHour = ("bbl/hr", "bph") -OilBarrelPerMinute = ("bbl/min", "bpm") -OilBarrelPerSecond = ("bbl/s") -UkGallonPerDay = ("gal (U. K.)/d") -UkGallonPerHour = ("gal (imp.)/h") -UkGallonPerMinute = ("gal (imp.)/min") -UkGallonPerSecond = ("gal (imp.)/s") -UsGallonPerDay = ("gpd", "gal/d") -UsGallonPerHour = ("gal (U.S.)/h") -UsGallonPerMinute = ("gal (U.S.)/min", "GPM") -UsGallonPerSecond = ("gal (U.S.)/s") diff --git a/UnitsNet/GeneratedCode/Resources/VolumeFlowPerArea.restext b/UnitsNet/GeneratedCode/Resources/VolumeFlowPerArea.restext deleted file mode 100644 index 92c6735b8d..0000000000 --- a/UnitsNet/GeneratedCode/Resources/VolumeFlowPerArea.restext +++ /dev/null @@ -1,2 +0,0 @@ -CubicFootPerMinutePerSquareFoot = ("CFM/ft²") -CubicMeterPerSecondPerSquareMeter = ("m³/(s·m²)") diff --git a/UnitsNet/GeneratedCode/Resources/VolumePerLength.restext b/UnitsNet/GeneratedCode/Resources/VolumePerLength.restext deleted file mode 100644 index 21731df5c8..0000000000 --- a/UnitsNet/GeneratedCode/Resources/VolumePerLength.restext +++ /dev/null @@ -1,7 +0,0 @@ -CubicMeterPerMeter = ("m³/m") -CubicYardPerFoot = ("yd³/ft") -CubicYardPerUsSurveyFoot = ("yd³/ftUS") -LiterPerKilometer = ("l/km") -LiterPerMeter = ("l/m") -LiterPerMillimeter = ("l/mm") -OilBarrelPerFoot = ("bbl/ft") diff --git a/UnitsNet/GeneratedCode/Resources/VolumetricHeatCapacity.restext b/UnitsNet/GeneratedCode/Resources/VolumetricHeatCapacity.restext deleted file mode 100644 index 69718edc1b..0000000000 --- a/UnitsNet/GeneratedCode/Resources/VolumetricHeatCapacity.restext +++ /dev/null @@ -1,9 +0,0 @@ -BtuPerCubicFootDegreeFahrenheit = ("BTU/ft³·°F") -CaloriePerCubicCentimeterDegreeCelsius = ("cal/cm³·°C") -JoulePerCubicMeterDegreeCelsius = ("J/m³·°C") -JoulePerCubicMeterKelvin = ("J/m³·K") -KilocaloriePerCubicCentimeterDegreeCelsius = ("kcal/cm³·°C") -KilojoulePerCubicMeterDegreeCelsius = ("kJ/m³·°C") -KilojoulePerCubicMeterKelvin = ("kJ/m³·K") -MegajoulePerCubicMeterDegreeCelsius = ("MJ/m³·°C") -MegajoulePerCubicMeterKelvin = ("MJ/m³·K") diff --git a/UnitsNet/GeneratedCode/Resources/WarpingMomentOfInertia.restext b/UnitsNet/GeneratedCode/Resources/WarpingMomentOfInertia.restext deleted file mode 100644 index 8ff5452f20..0000000000 --- a/UnitsNet/GeneratedCode/Resources/WarpingMomentOfInertia.restext +++ /dev/null @@ -1,6 +0,0 @@ -CentimeterToTheSixth = ("cm⁶", "cm^6") -DecimeterToTheSixth = ("dm⁶", "dm^6") -FootToTheSixth = ("ft⁶", "ft^6") -InchToTheSixth = ("in⁶", "in^6") -MeterToTheSixth = ("m⁶", "m^6") -MillimeterToTheSixth = ("mm⁶", "mm^6") From 89ca024ecdbc45aa9dc8a560b75942736bd0eaaa Mon Sep 17 00:00:00 2001 From: Tristan Milnthorp Date: Tue, 21 Feb 2023 16:25:47 -0500 Subject: [PATCH 06/26] We do want an assembly default --- CodeGen/Generators/UnitsNetGenerator.cs | 9 ++++---- ...ion.en-US.restext => Acceleration.restext} | 0 ...n-US.restext => AmountOfSubstance.restext} | 0 ...o.en-US.restext => AmplitudeRatio.restext} | 0 .../{Angle.en-US.restext => Angle.restext} | 0 ...y.en-US.restext => ApparentEnergy.restext} | 0 ...er.en-US.restext => ApparentPower.restext} | 0 .../{Area.en-US.restext => Area.restext} | 0 ...sity.en-US.restext => AreaDensity.restext} | 0 ...US.restext => AreaMomentOfInertia.restext} | 0 ...{BitRate.en-US.restext => BitRate.restext} | 0 ...t => BrakeSpecificFuelConsumption.restext} | 0 ...ance.en-US.restext => Capacitance.restext} | 0 ... => CoefficientOfThermalExpansion.restext} | 0 ....en-US.restext => Compressibility.restext} | 0 ...{Density.en-US.restext => Density.restext} | 0 ...uration.en-US.restext => Duration.restext} | 0 ...en-US.restext => DynamicViscosity.restext} | 0 ...-US.restext => ElectricAdmittance.restext} | 0 ...e.en-US.restext => ElectricCharge.restext} | 0 ....restext => ElectricChargeDensity.restext} | 0 ...US.restext => ElectricConductance.restext} | 0 ...S.restext => ElectricConductivity.restext} | 0 ....en-US.restext => ElectricCurrent.restext} | 0 ...restext => ElectricCurrentDensity.restext} | 0 ...estext => ElectricCurrentGradient.restext} | 0 ...ld.en-US.restext => ElectricField.restext} | 0 ...-US.restext => ElectricInductance.restext} | 0 ...n-US.restext => ElectricPotential.restext} | 0 ...US.restext => ElectricPotentialAc.restext} | 0 ...xt => ElectricPotentialChangeRate.restext} | 0 ...US.restext => ElectricPotentialDc.restext} | 0 ...-US.restext => ElectricResistance.restext} | 0 ...US.restext => ElectricResistivity.restext} | 0 ...t => ElectricSurfaceChargeDensity.restext} | 0 .../{Energy.en-US.restext => Energy.restext} | 0 ...ty.en-US.restext => EnergyDensity.restext} | 0 ...{Entropy.en-US.restext => Entropy.restext} | 0 .../{Force.en-US.restext => Force.restext} | 0 ....en-US.restext => ForceChangeRate.restext} | 0 ...h.en-US.restext => ForcePerLength.restext} | 0 ...quency.en-US.restext => Frequency.restext} | 0 ...y.en-US.restext => FuelEfficiency.restext} | 0 ...eatFlux.en-US.restext => HeatFlux.restext} | 0 ...estext => HeatTransferCoefficient.restext} | 0 ...ance.en-US.restext => Illuminance.restext} | 0 ...{Impulse.en-US.restext => Impulse.restext} | 0 ...tion.en-US.restext => Information.restext} | 0 ...iance.en-US.restext => Irradiance.restext} | 0 ...tion.en-US.restext => Irradiation.restext} | 0 .../{Jerk.en-US.restext => Jerk.restext} | 0 ...-US.restext => KinematicViscosity.restext} | 0 .../{Length.en-US.restext => Length.restext} | 0 .../{Level.en-US.restext => Level.restext} | 0 ...ty.en-US.restext => LinearDensity.restext} | 0 ...-US.restext => LinearPowerDensity.restext} | 0 ...inance.en-US.restext => Luminance.restext} | 0 ...osity.en-US.restext => Luminosity.restext} | 0 ...lux.en-US.restext => LuminousFlux.restext} | 0 ...n-US.restext => LuminousIntensity.restext} | 0 ...ld.en-US.restext => MagneticField.restext} | 0 ...lux.en-US.restext => MagneticFlux.restext} | 0 ...on.en-US.restext => Magnetization.restext} | 0 .../{Mass.en-US.restext => Mass.restext} | 0 ...n-US.restext => MassConcentration.restext} | 0 ...assFlow.en-US.restext => MassFlow.restext} | 0 ...assFlux.en-US.restext => MassFlux.restext} | 0 ...ion.en-US.restext => MassFraction.restext} | 0 ...US.restext => MassMomentOfInertia.restext} | 0 ...ergy.en-US.restext => MolarEnergy.restext} | 0 ...opy.en-US.restext => MolarEntropy.restext} | 0 ...arFlow.en-US.restext => MolarFlow.restext} | 0 ...arMass.en-US.restext => MolarMass.restext} | 0 ...olarity.en-US.restext => Molarity.restext} | 0 ...ity.en-US.restext => Permeability.restext} | 0 ...ity.en-US.restext => Permittivity.restext} | 0 ...stext => PorousMediumPermeability.restext} | 0 .../{Power.en-US.restext => Power.restext} | 0 ...ity.en-US.restext => PowerDensity.restext} | 0 ...Ratio.en-US.restext => PowerRatio.restext} | 0 ...ressure.en-US.restext => Pressure.restext} | 0 ...-US.restext => PressureChangeRate.restext} | 0 .../{Ratio.en-US.restext => Ratio.restext} | 0 ....en-US.restext => RatioChangeRate.restext} | 0 ...y.en-US.restext => ReactiveEnergy.restext} | 0 ...er.en-US.restext => ReactivePower.restext} | 0 ...a.en-US.restext => ReciprocalArea.restext} | 0 ...en-US.restext => ReciprocalLength.restext} | 0 ...en-US.restext => RelativeHumidity.restext} | 0 ...restext => RotationalAcceleration.restext} | 0 ....en-US.restext => RotationalSpeed.restext} | 0 ...US.restext => RotationalStiffness.restext} | 0 ...t => RotationalStiffnessPerLength.restext} | 0 .../{Scalar.en-US.restext => Scalar.restext} | 0 ...Angle.en-US.restext => SolidAngle.restext} | 0 ...y.en-US.restext => SpecificEnergy.restext} | 0 ....en-US.restext => SpecificEntropy.restext} | 0 ...estext => SpecificFuelConsumption.restext} | 0 ...e.en-US.restext => SpecificVolume.restext} | 0 ...t.en-US.restext => SpecificWeight.restext} | 0 .../{Speed.en-US.restext => Speed.restext} | 0 ...-US.restext => StandardVolumeFlow.restext} | 0 ...ture.en-US.restext => Temperature.restext} | 0 ....restext => TemperatureChangeRate.restext} | 0 ...en-US.restext => TemperatureDelta.restext} | 0 ...US.restext => TemperatureGradient.restext} | 0 ...US.restext => ThermalConductivity.restext} | 0 ...n-US.restext => ThermalResistance.restext} | 0 .../{Torque.en-US.restext => Torque.restext} | 0 ....en-US.restext => TorquePerLength.restext} | 0 ...bidity.en-US.restext => Turbidity.restext} | 0 ...itaminA.en-US.restext => VitaminA.restext} | 0 .../{Volume.en-US.restext => Volume.restext} | 0 ...US.restext => VolumeConcentration.restext} | 0 ...eFlow.en-US.restext => VolumeFlow.restext} | 0 ...n-US.restext => VolumeFlowPerArea.restext} | 0 ....en-US.restext => VolumePerLength.restext} | 0 ...restext => VolumetricHeatCapacity.restext} | 0 ...restext => WarpingMomentOfInertia.restext} | 0 UnitsNet/UnitFormatter.cs | 21 ++++++++++++++++++- 120 files changed, 25 insertions(+), 5 deletions(-) rename UnitsNet/GeneratedCode/Resources/{Acceleration.en-US.restext => Acceleration.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{AmountOfSubstance.en-US.restext => AmountOfSubstance.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{AmplitudeRatio.en-US.restext => AmplitudeRatio.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{Angle.en-US.restext => Angle.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{ApparentEnergy.en-US.restext => ApparentEnergy.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{ApparentPower.en-US.restext => ApparentPower.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{Area.en-US.restext => Area.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{AreaDensity.en-US.restext => AreaDensity.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{AreaMomentOfInertia.en-US.restext => AreaMomentOfInertia.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{BitRate.en-US.restext => BitRate.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{BrakeSpecificFuelConsumption.en-US.restext => BrakeSpecificFuelConsumption.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{Capacitance.en-US.restext => Capacitance.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{CoefficientOfThermalExpansion.en-US.restext => CoefficientOfThermalExpansion.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{Compressibility.en-US.restext => Compressibility.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{Density.en-US.restext => Density.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{Duration.en-US.restext => Duration.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{DynamicViscosity.en-US.restext => DynamicViscosity.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{ElectricAdmittance.en-US.restext => ElectricAdmittance.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{ElectricCharge.en-US.restext => ElectricCharge.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{ElectricChargeDensity.en-US.restext => ElectricChargeDensity.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{ElectricConductance.en-US.restext => ElectricConductance.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{ElectricConductivity.en-US.restext => ElectricConductivity.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{ElectricCurrent.en-US.restext => ElectricCurrent.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{ElectricCurrentDensity.en-US.restext => ElectricCurrentDensity.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{ElectricCurrentGradient.en-US.restext => ElectricCurrentGradient.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{ElectricField.en-US.restext => ElectricField.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{ElectricInductance.en-US.restext => ElectricInductance.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{ElectricPotential.en-US.restext => ElectricPotential.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{ElectricPotentialAc.en-US.restext => ElectricPotentialAc.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{ElectricPotentialChangeRate.en-US.restext => ElectricPotentialChangeRate.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{ElectricPotentialDc.en-US.restext => ElectricPotentialDc.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{ElectricResistance.en-US.restext => ElectricResistance.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{ElectricResistivity.en-US.restext => ElectricResistivity.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{ElectricSurfaceChargeDensity.en-US.restext => ElectricSurfaceChargeDensity.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{Energy.en-US.restext => Energy.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{EnergyDensity.en-US.restext => EnergyDensity.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{Entropy.en-US.restext => Entropy.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{Force.en-US.restext => Force.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{ForceChangeRate.en-US.restext => ForceChangeRate.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{ForcePerLength.en-US.restext => ForcePerLength.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{Frequency.en-US.restext => Frequency.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{FuelEfficiency.en-US.restext => FuelEfficiency.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{HeatFlux.en-US.restext => HeatFlux.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{HeatTransferCoefficient.en-US.restext => HeatTransferCoefficient.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{Illuminance.en-US.restext => Illuminance.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{Impulse.en-US.restext => Impulse.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{Information.en-US.restext => Information.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{Irradiance.en-US.restext => Irradiance.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{Irradiation.en-US.restext => Irradiation.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{Jerk.en-US.restext => Jerk.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{KinematicViscosity.en-US.restext => KinematicViscosity.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{Length.en-US.restext => Length.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{Level.en-US.restext => Level.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{LinearDensity.en-US.restext => LinearDensity.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{LinearPowerDensity.en-US.restext => LinearPowerDensity.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{Luminance.en-US.restext => Luminance.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{Luminosity.en-US.restext => Luminosity.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{LuminousFlux.en-US.restext => LuminousFlux.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{LuminousIntensity.en-US.restext => LuminousIntensity.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{MagneticField.en-US.restext => MagneticField.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{MagneticFlux.en-US.restext => MagneticFlux.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{Magnetization.en-US.restext => Magnetization.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{Mass.en-US.restext => Mass.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{MassConcentration.en-US.restext => MassConcentration.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{MassFlow.en-US.restext => MassFlow.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{MassFlux.en-US.restext => MassFlux.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{MassFraction.en-US.restext => MassFraction.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{MassMomentOfInertia.en-US.restext => MassMomentOfInertia.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{MolarEnergy.en-US.restext => MolarEnergy.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{MolarEntropy.en-US.restext => MolarEntropy.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{MolarFlow.en-US.restext => MolarFlow.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{MolarMass.en-US.restext => MolarMass.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{Molarity.en-US.restext => Molarity.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{Permeability.en-US.restext => Permeability.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{Permittivity.en-US.restext => Permittivity.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{PorousMediumPermeability.en-US.restext => PorousMediumPermeability.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{Power.en-US.restext => Power.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{PowerDensity.en-US.restext => PowerDensity.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{PowerRatio.en-US.restext => PowerRatio.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{Pressure.en-US.restext => Pressure.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{PressureChangeRate.en-US.restext => PressureChangeRate.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{Ratio.en-US.restext => Ratio.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{RatioChangeRate.en-US.restext => RatioChangeRate.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{ReactiveEnergy.en-US.restext => ReactiveEnergy.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{ReactivePower.en-US.restext => ReactivePower.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{ReciprocalArea.en-US.restext => ReciprocalArea.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{ReciprocalLength.en-US.restext => ReciprocalLength.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{RelativeHumidity.en-US.restext => RelativeHumidity.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{RotationalAcceleration.en-US.restext => RotationalAcceleration.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{RotationalSpeed.en-US.restext => RotationalSpeed.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{RotationalStiffness.en-US.restext => RotationalStiffness.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{RotationalStiffnessPerLength.en-US.restext => RotationalStiffnessPerLength.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{Scalar.en-US.restext => Scalar.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{SolidAngle.en-US.restext => SolidAngle.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{SpecificEnergy.en-US.restext => SpecificEnergy.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{SpecificEntropy.en-US.restext => SpecificEntropy.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{SpecificFuelConsumption.en-US.restext => SpecificFuelConsumption.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{SpecificVolume.en-US.restext => SpecificVolume.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{SpecificWeight.en-US.restext => SpecificWeight.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{Speed.en-US.restext => Speed.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{StandardVolumeFlow.en-US.restext => StandardVolumeFlow.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{Temperature.en-US.restext => Temperature.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{TemperatureChangeRate.en-US.restext => TemperatureChangeRate.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{TemperatureDelta.en-US.restext => TemperatureDelta.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{TemperatureGradient.en-US.restext => TemperatureGradient.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{ThermalConductivity.en-US.restext => ThermalConductivity.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{ThermalResistance.en-US.restext => ThermalResistance.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{Torque.en-US.restext => Torque.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{TorquePerLength.en-US.restext => TorquePerLength.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{Turbidity.en-US.restext => Turbidity.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{VitaminA.en-US.restext => VitaminA.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{Volume.en-US.restext => Volume.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{VolumeConcentration.en-US.restext => VolumeConcentration.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{VolumeFlow.en-US.restext => VolumeFlow.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{VolumeFlowPerArea.en-US.restext => VolumeFlowPerArea.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{VolumePerLength.en-US.restext => VolumePerLength.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{VolumetricHeatCapacity.en-US.restext => VolumetricHeatCapacity.restext} (100%) rename UnitsNet/GeneratedCode/Resources/{WarpingMomentOfInertia.en-US.restext => WarpingMomentOfInertia.restext} (100%) diff --git a/CodeGen/Generators/UnitsNetGenerator.cs b/CodeGen/Generators/UnitsNetGenerator.cs index 9bcdc247a1..b617118a82 100644 --- a/CodeGen/Generators/UnitsNetGenerator.cs +++ b/CodeGen/Generators/UnitsNetGenerator.cs @@ -149,7 +149,11 @@ private static void GenerateResourceFiles(Quantity[] quantities, string resource foreach(var culture in cultures) { - using var writer = File.CreateText($"{resourcesDirectory}/{quantity.Name}.{culture}.restext"); + var fileName = culture.Equals("en-US", System.StringComparison.InvariantCultureIgnoreCase) ? + $"{resourcesDirectory}/{quantity.Name}.restext" : + $"{resourcesDirectory}/{quantity.Name}.{culture}.restext"; + + using var writer = File.CreateText(fileName); foreach(Unit unit in quantity.Units) { @@ -157,9 +161,6 @@ private static void GenerateResourceFiles(Quantity[] quantities, string resource { if(localization.Culture == culture) { - //unitConverter.SetConversionFunction <{ _quantity.Name}> ({ _unitEnumName}.{ _quantity.BaseUnit}, { _quantity.Name} - //Unit.{ unit.SingularName}, quantity => quantity.ToUnit({ _quantity.Name} - //Unit.{ unit.SingularName})); "); if(localization.Abbreviations.Any()) { writer.Write($"{unit.SingularName} = ("); diff --git a/UnitsNet/GeneratedCode/Resources/Acceleration.en-US.restext b/UnitsNet/GeneratedCode/Resources/Acceleration.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/Acceleration.en-US.restext rename to UnitsNet/GeneratedCode/Resources/Acceleration.restext diff --git a/UnitsNet/GeneratedCode/Resources/AmountOfSubstance.en-US.restext b/UnitsNet/GeneratedCode/Resources/AmountOfSubstance.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/AmountOfSubstance.en-US.restext rename to UnitsNet/GeneratedCode/Resources/AmountOfSubstance.restext diff --git a/UnitsNet/GeneratedCode/Resources/AmplitudeRatio.en-US.restext b/UnitsNet/GeneratedCode/Resources/AmplitudeRatio.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/AmplitudeRatio.en-US.restext rename to UnitsNet/GeneratedCode/Resources/AmplitudeRatio.restext diff --git a/UnitsNet/GeneratedCode/Resources/Angle.en-US.restext b/UnitsNet/GeneratedCode/Resources/Angle.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/Angle.en-US.restext rename to UnitsNet/GeneratedCode/Resources/Angle.restext diff --git a/UnitsNet/GeneratedCode/Resources/ApparentEnergy.en-US.restext b/UnitsNet/GeneratedCode/Resources/ApparentEnergy.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/ApparentEnergy.en-US.restext rename to UnitsNet/GeneratedCode/Resources/ApparentEnergy.restext diff --git a/UnitsNet/GeneratedCode/Resources/ApparentPower.en-US.restext b/UnitsNet/GeneratedCode/Resources/ApparentPower.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/ApparentPower.en-US.restext rename to UnitsNet/GeneratedCode/Resources/ApparentPower.restext diff --git a/UnitsNet/GeneratedCode/Resources/Area.en-US.restext b/UnitsNet/GeneratedCode/Resources/Area.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/Area.en-US.restext rename to UnitsNet/GeneratedCode/Resources/Area.restext diff --git a/UnitsNet/GeneratedCode/Resources/AreaDensity.en-US.restext b/UnitsNet/GeneratedCode/Resources/AreaDensity.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/AreaDensity.en-US.restext rename to UnitsNet/GeneratedCode/Resources/AreaDensity.restext diff --git a/UnitsNet/GeneratedCode/Resources/AreaMomentOfInertia.en-US.restext b/UnitsNet/GeneratedCode/Resources/AreaMomentOfInertia.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/AreaMomentOfInertia.en-US.restext rename to UnitsNet/GeneratedCode/Resources/AreaMomentOfInertia.restext diff --git a/UnitsNet/GeneratedCode/Resources/BitRate.en-US.restext b/UnitsNet/GeneratedCode/Resources/BitRate.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/BitRate.en-US.restext rename to UnitsNet/GeneratedCode/Resources/BitRate.restext diff --git a/UnitsNet/GeneratedCode/Resources/BrakeSpecificFuelConsumption.en-US.restext b/UnitsNet/GeneratedCode/Resources/BrakeSpecificFuelConsumption.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/BrakeSpecificFuelConsumption.en-US.restext rename to UnitsNet/GeneratedCode/Resources/BrakeSpecificFuelConsumption.restext diff --git a/UnitsNet/GeneratedCode/Resources/Capacitance.en-US.restext b/UnitsNet/GeneratedCode/Resources/Capacitance.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/Capacitance.en-US.restext rename to UnitsNet/GeneratedCode/Resources/Capacitance.restext diff --git a/UnitsNet/GeneratedCode/Resources/CoefficientOfThermalExpansion.en-US.restext b/UnitsNet/GeneratedCode/Resources/CoefficientOfThermalExpansion.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/CoefficientOfThermalExpansion.en-US.restext rename to UnitsNet/GeneratedCode/Resources/CoefficientOfThermalExpansion.restext diff --git a/UnitsNet/GeneratedCode/Resources/Compressibility.en-US.restext b/UnitsNet/GeneratedCode/Resources/Compressibility.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/Compressibility.en-US.restext rename to UnitsNet/GeneratedCode/Resources/Compressibility.restext diff --git a/UnitsNet/GeneratedCode/Resources/Density.en-US.restext b/UnitsNet/GeneratedCode/Resources/Density.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/Density.en-US.restext rename to UnitsNet/GeneratedCode/Resources/Density.restext diff --git a/UnitsNet/GeneratedCode/Resources/Duration.en-US.restext b/UnitsNet/GeneratedCode/Resources/Duration.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/Duration.en-US.restext rename to UnitsNet/GeneratedCode/Resources/Duration.restext diff --git a/UnitsNet/GeneratedCode/Resources/DynamicViscosity.en-US.restext b/UnitsNet/GeneratedCode/Resources/DynamicViscosity.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/DynamicViscosity.en-US.restext rename to UnitsNet/GeneratedCode/Resources/DynamicViscosity.restext diff --git a/UnitsNet/GeneratedCode/Resources/ElectricAdmittance.en-US.restext b/UnitsNet/GeneratedCode/Resources/ElectricAdmittance.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/ElectricAdmittance.en-US.restext rename to UnitsNet/GeneratedCode/Resources/ElectricAdmittance.restext diff --git a/UnitsNet/GeneratedCode/Resources/ElectricCharge.en-US.restext b/UnitsNet/GeneratedCode/Resources/ElectricCharge.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/ElectricCharge.en-US.restext rename to UnitsNet/GeneratedCode/Resources/ElectricCharge.restext diff --git a/UnitsNet/GeneratedCode/Resources/ElectricChargeDensity.en-US.restext b/UnitsNet/GeneratedCode/Resources/ElectricChargeDensity.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/ElectricChargeDensity.en-US.restext rename to UnitsNet/GeneratedCode/Resources/ElectricChargeDensity.restext diff --git a/UnitsNet/GeneratedCode/Resources/ElectricConductance.en-US.restext b/UnitsNet/GeneratedCode/Resources/ElectricConductance.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/ElectricConductance.en-US.restext rename to UnitsNet/GeneratedCode/Resources/ElectricConductance.restext diff --git a/UnitsNet/GeneratedCode/Resources/ElectricConductivity.en-US.restext b/UnitsNet/GeneratedCode/Resources/ElectricConductivity.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/ElectricConductivity.en-US.restext rename to UnitsNet/GeneratedCode/Resources/ElectricConductivity.restext diff --git a/UnitsNet/GeneratedCode/Resources/ElectricCurrent.en-US.restext b/UnitsNet/GeneratedCode/Resources/ElectricCurrent.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/ElectricCurrent.en-US.restext rename to UnitsNet/GeneratedCode/Resources/ElectricCurrent.restext diff --git a/UnitsNet/GeneratedCode/Resources/ElectricCurrentDensity.en-US.restext b/UnitsNet/GeneratedCode/Resources/ElectricCurrentDensity.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/ElectricCurrentDensity.en-US.restext rename to UnitsNet/GeneratedCode/Resources/ElectricCurrentDensity.restext diff --git a/UnitsNet/GeneratedCode/Resources/ElectricCurrentGradient.en-US.restext b/UnitsNet/GeneratedCode/Resources/ElectricCurrentGradient.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/ElectricCurrentGradient.en-US.restext rename to UnitsNet/GeneratedCode/Resources/ElectricCurrentGradient.restext diff --git a/UnitsNet/GeneratedCode/Resources/ElectricField.en-US.restext b/UnitsNet/GeneratedCode/Resources/ElectricField.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/ElectricField.en-US.restext rename to UnitsNet/GeneratedCode/Resources/ElectricField.restext diff --git a/UnitsNet/GeneratedCode/Resources/ElectricInductance.en-US.restext b/UnitsNet/GeneratedCode/Resources/ElectricInductance.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/ElectricInductance.en-US.restext rename to UnitsNet/GeneratedCode/Resources/ElectricInductance.restext diff --git a/UnitsNet/GeneratedCode/Resources/ElectricPotential.en-US.restext b/UnitsNet/GeneratedCode/Resources/ElectricPotential.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/ElectricPotential.en-US.restext rename to UnitsNet/GeneratedCode/Resources/ElectricPotential.restext diff --git a/UnitsNet/GeneratedCode/Resources/ElectricPotentialAc.en-US.restext b/UnitsNet/GeneratedCode/Resources/ElectricPotentialAc.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/ElectricPotentialAc.en-US.restext rename to UnitsNet/GeneratedCode/Resources/ElectricPotentialAc.restext diff --git a/UnitsNet/GeneratedCode/Resources/ElectricPotentialChangeRate.en-US.restext b/UnitsNet/GeneratedCode/Resources/ElectricPotentialChangeRate.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/ElectricPotentialChangeRate.en-US.restext rename to UnitsNet/GeneratedCode/Resources/ElectricPotentialChangeRate.restext diff --git a/UnitsNet/GeneratedCode/Resources/ElectricPotentialDc.en-US.restext b/UnitsNet/GeneratedCode/Resources/ElectricPotentialDc.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/ElectricPotentialDc.en-US.restext rename to UnitsNet/GeneratedCode/Resources/ElectricPotentialDc.restext diff --git a/UnitsNet/GeneratedCode/Resources/ElectricResistance.en-US.restext b/UnitsNet/GeneratedCode/Resources/ElectricResistance.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/ElectricResistance.en-US.restext rename to UnitsNet/GeneratedCode/Resources/ElectricResistance.restext diff --git a/UnitsNet/GeneratedCode/Resources/ElectricResistivity.en-US.restext b/UnitsNet/GeneratedCode/Resources/ElectricResistivity.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/ElectricResistivity.en-US.restext rename to UnitsNet/GeneratedCode/Resources/ElectricResistivity.restext diff --git a/UnitsNet/GeneratedCode/Resources/ElectricSurfaceChargeDensity.en-US.restext b/UnitsNet/GeneratedCode/Resources/ElectricSurfaceChargeDensity.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/ElectricSurfaceChargeDensity.en-US.restext rename to UnitsNet/GeneratedCode/Resources/ElectricSurfaceChargeDensity.restext diff --git a/UnitsNet/GeneratedCode/Resources/Energy.en-US.restext b/UnitsNet/GeneratedCode/Resources/Energy.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/Energy.en-US.restext rename to UnitsNet/GeneratedCode/Resources/Energy.restext diff --git a/UnitsNet/GeneratedCode/Resources/EnergyDensity.en-US.restext b/UnitsNet/GeneratedCode/Resources/EnergyDensity.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/EnergyDensity.en-US.restext rename to UnitsNet/GeneratedCode/Resources/EnergyDensity.restext diff --git a/UnitsNet/GeneratedCode/Resources/Entropy.en-US.restext b/UnitsNet/GeneratedCode/Resources/Entropy.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/Entropy.en-US.restext rename to UnitsNet/GeneratedCode/Resources/Entropy.restext diff --git a/UnitsNet/GeneratedCode/Resources/Force.en-US.restext b/UnitsNet/GeneratedCode/Resources/Force.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/Force.en-US.restext rename to UnitsNet/GeneratedCode/Resources/Force.restext diff --git a/UnitsNet/GeneratedCode/Resources/ForceChangeRate.en-US.restext b/UnitsNet/GeneratedCode/Resources/ForceChangeRate.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/ForceChangeRate.en-US.restext rename to UnitsNet/GeneratedCode/Resources/ForceChangeRate.restext diff --git a/UnitsNet/GeneratedCode/Resources/ForcePerLength.en-US.restext b/UnitsNet/GeneratedCode/Resources/ForcePerLength.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/ForcePerLength.en-US.restext rename to UnitsNet/GeneratedCode/Resources/ForcePerLength.restext diff --git a/UnitsNet/GeneratedCode/Resources/Frequency.en-US.restext b/UnitsNet/GeneratedCode/Resources/Frequency.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/Frequency.en-US.restext rename to UnitsNet/GeneratedCode/Resources/Frequency.restext diff --git a/UnitsNet/GeneratedCode/Resources/FuelEfficiency.en-US.restext b/UnitsNet/GeneratedCode/Resources/FuelEfficiency.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/FuelEfficiency.en-US.restext rename to UnitsNet/GeneratedCode/Resources/FuelEfficiency.restext diff --git a/UnitsNet/GeneratedCode/Resources/HeatFlux.en-US.restext b/UnitsNet/GeneratedCode/Resources/HeatFlux.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/HeatFlux.en-US.restext rename to UnitsNet/GeneratedCode/Resources/HeatFlux.restext diff --git a/UnitsNet/GeneratedCode/Resources/HeatTransferCoefficient.en-US.restext b/UnitsNet/GeneratedCode/Resources/HeatTransferCoefficient.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/HeatTransferCoefficient.en-US.restext rename to UnitsNet/GeneratedCode/Resources/HeatTransferCoefficient.restext diff --git a/UnitsNet/GeneratedCode/Resources/Illuminance.en-US.restext b/UnitsNet/GeneratedCode/Resources/Illuminance.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/Illuminance.en-US.restext rename to UnitsNet/GeneratedCode/Resources/Illuminance.restext diff --git a/UnitsNet/GeneratedCode/Resources/Impulse.en-US.restext b/UnitsNet/GeneratedCode/Resources/Impulse.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/Impulse.en-US.restext rename to UnitsNet/GeneratedCode/Resources/Impulse.restext diff --git a/UnitsNet/GeneratedCode/Resources/Information.en-US.restext b/UnitsNet/GeneratedCode/Resources/Information.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/Information.en-US.restext rename to UnitsNet/GeneratedCode/Resources/Information.restext diff --git a/UnitsNet/GeneratedCode/Resources/Irradiance.en-US.restext b/UnitsNet/GeneratedCode/Resources/Irradiance.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/Irradiance.en-US.restext rename to UnitsNet/GeneratedCode/Resources/Irradiance.restext diff --git a/UnitsNet/GeneratedCode/Resources/Irradiation.en-US.restext b/UnitsNet/GeneratedCode/Resources/Irradiation.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/Irradiation.en-US.restext rename to UnitsNet/GeneratedCode/Resources/Irradiation.restext diff --git a/UnitsNet/GeneratedCode/Resources/Jerk.en-US.restext b/UnitsNet/GeneratedCode/Resources/Jerk.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/Jerk.en-US.restext rename to UnitsNet/GeneratedCode/Resources/Jerk.restext diff --git a/UnitsNet/GeneratedCode/Resources/KinematicViscosity.en-US.restext b/UnitsNet/GeneratedCode/Resources/KinematicViscosity.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/KinematicViscosity.en-US.restext rename to UnitsNet/GeneratedCode/Resources/KinematicViscosity.restext diff --git a/UnitsNet/GeneratedCode/Resources/Length.en-US.restext b/UnitsNet/GeneratedCode/Resources/Length.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/Length.en-US.restext rename to UnitsNet/GeneratedCode/Resources/Length.restext diff --git a/UnitsNet/GeneratedCode/Resources/Level.en-US.restext b/UnitsNet/GeneratedCode/Resources/Level.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/Level.en-US.restext rename to UnitsNet/GeneratedCode/Resources/Level.restext diff --git a/UnitsNet/GeneratedCode/Resources/LinearDensity.en-US.restext b/UnitsNet/GeneratedCode/Resources/LinearDensity.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/LinearDensity.en-US.restext rename to UnitsNet/GeneratedCode/Resources/LinearDensity.restext diff --git a/UnitsNet/GeneratedCode/Resources/LinearPowerDensity.en-US.restext b/UnitsNet/GeneratedCode/Resources/LinearPowerDensity.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/LinearPowerDensity.en-US.restext rename to UnitsNet/GeneratedCode/Resources/LinearPowerDensity.restext diff --git a/UnitsNet/GeneratedCode/Resources/Luminance.en-US.restext b/UnitsNet/GeneratedCode/Resources/Luminance.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/Luminance.en-US.restext rename to UnitsNet/GeneratedCode/Resources/Luminance.restext diff --git a/UnitsNet/GeneratedCode/Resources/Luminosity.en-US.restext b/UnitsNet/GeneratedCode/Resources/Luminosity.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/Luminosity.en-US.restext rename to UnitsNet/GeneratedCode/Resources/Luminosity.restext diff --git a/UnitsNet/GeneratedCode/Resources/LuminousFlux.en-US.restext b/UnitsNet/GeneratedCode/Resources/LuminousFlux.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/LuminousFlux.en-US.restext rename to UnitsNet/GeneratedCode/Resources/LuminousFlux.restext diff --git a/UnitsNet/GeneratedCode/Resources/LuminousIntensity.en-US.restext b/UnitsNet/GeneratedCode/Resources/LuminousIntensity.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/LuminousIntensity.en-US.restext rename to UnitsNet/GeneratedCode/Resources/LuminousIntensity.restext diff --git a/UnitsNet/GeneratedCode/Resources/MagneticField.en-US.restext b/UnitsNet/GeneratedCode/Resources/MagneticField.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/MagneticField.en-US.restext rename to UnitsNet/GeneratedCode/Resources/MagneticField.restext diff --git a/UnitsNet/GeneratedCode/Resources/MagneticFlux.en-US.restext b/UnitsNet/GeneratedCode/Resources/MagneticFlux.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/MagneticFlux.en-US.restext rename to UnitsNet/GeneratedCode/Resources/MagneticFlux.restext diff --git a/UnitsNet/GeneratedCode/Resources/Magnetization.en-US.restext b/UnitsNet/GeneratedCode/Resources/Magnetization.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/Magnetization.en-US.restext rename to UnitsNet/GeneratedCode/Resources/Magnetization.restext diff --git a/UnitsNet/GeneratedCode/Resources/Mass.en-US.restext b/UnitsNet/GeneratedCode/Resources/Mass.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/Mass.en-US.restext rename to UnitsNet/GeneratedCode/Resources/Mass.restext diff --git a/UnitsNet/GeneratedCode/Resources/MassConcentration.en-US.restext b/UnitsNet/GeneratedCode/Resources/MassConcentration.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/MassConcentration.en-US.restext rename to UnitsNet/GeneratedCode/Resources/MassConcentration.restext diff --git a/UnitsNet/GeneratedCode/Resources/MassFlow.en-US.restext b/UnitsNet/GeneratedCode/Resources/MassFlow.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/MassFlow.en-US.restext rename to UnitsNet/GeneratedCode/Resources/MassFlow.restext diff --git a/UnitsNet/GeneratedCode/Resources/MassFlux.en-US.restext b/UnitsNet/GeneratedCode/Resources/MassFlux.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/MassFlux.en-US.restext rename to UnitsNet/GeneratedCode/Resources/MassFlux.restext diff --git a/UnitsNet/GeneratedCode/Resources/MassFraction.en-US.restext b/UnitsNet/GeneratedCode/Resources/MassFraction.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/MassFraction.en-US.restext rename to UnitsNet/GeneratedCode/Resources/MassFraction.restext diff --git a/UnitsNet/GeneratedCode/Resources/MassMomentOfInertia.en-US.restext b/UnitsNet/GeneratedCode/Resources/MassMomentOfInertia.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/MassMomentOfInertia.en-US.restext rename to UnitsNet/GeneratedCode/Resources/MassMomentOfInertia.restext diff --git a/UnitsNet/GeneratedCode/Resources/MolarEnergy.en-US.restext b/UnitsNet/GeneratedCode/Resources/MolarEnergy.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/MolarEnergy.en-US.restext rename to UnitsNet/GeneratedCode/Resources/MolarEnergy.restext diff --git a/UnitsNet/GeneratedCode/Resources/MolarEntropy.en-US.restext b/UnitsNet/GeneratedCode/Resources/MolarEntropy.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/MolarEntropy.en-US.restext rename to UnitsNet/GeneratedCode/Resources/MolarEntropy.restext diff --git a/UnitsNet/GeneratedCode/Resources/MolarFlow.en-US.restext b/UnitsNet/GeneratedCode/Resources/MolarFlow.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/MolarFlow.en-US.restext rename to UnitsNet/GeneratedCode/Resources/MolarFlow.restext diff --git a/UnitsNet/GeneratedCode/Resources/MolarMass.en-US.restext b/UnitsNet/GeneratedCode/Resources/MolarMass.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/MolarMass.en-US.restext rename to UnitsNet/GeneratedCode/Resources/MolarMass.restext diff --git a/UnitsNet/GeneratedCode/Resources/Molarity.en-US.restext b/UnitsNet/GeneratedCode/Resources/Molarity.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/Molarity.en-US.restext rename to UnitsNet/GeneratedCode/Resources/Molarity.restext diff --git a/UnitsNet/GeneratedCode/Resources/Permeability.en-US.restext b/UnitsNet/GeneratedCode/Resources/Permeability.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/Permeability.en-US.restext rename to UnitsNet/GeneratedCode/Resources/Permeability.restext diff --git a/UnitsNet/GeneratedCode/Resources/Permittivity.en-US.restext b/UnitsNet/GeneratedCode/Resources/Permittivity.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/Permittivity.en-US.restext rename to UnitsNet/GeneratedCode/Resources/Permittivity.restext diff --git a/UnitsNet/GeneratedCode/Resources/PorousMediumPermeability.en-US.restext b/UnitsNet/GeneratedCode/Resources/PorousMediumPermeability.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/PorousMediumPermeability.en-US.restext rename to UnitsNet/GeneratedCode/Resources/PorousMediumPermeability.restext diff --git a/UnitsNet/GeneratedCode/Resources/Power.en-US.restext b/UnitsNet/GeneratedCode/Resources/Power.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/Power.en-US.restext rename to UnitsNet/GeneratedCode/Resources/Power.restext diff --git a/UnitsNet/GeneratedCode/Resources/PowerDensity.en-US.restext b/UnitsNet/GeneratedCode/Resources/PowerDensity.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/PowerDensity.en-US.restext rename to UnitsNet/GeneratedCode/Resources/PowerDensity.restext diff --git a/UnitsNet/GeneratedCode/Resources/PowerRatio.en-US.restext b/UnitsNet/GeneratedCode/Resources/PowerRatio.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/PowerRatio.en-US.restext rename to UnitsNet/GeneratedCode/Resources/PowerRatio.restext diff --git a/UnitsNet/GeneratedCode/Resources/Pressure.en-US.restext b/UnitsNet/GeneratedCode/Resources/Pressure.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/Pressure.en-US.restext rename to UnitsNet/GeneratedCode/Resources/Pressure.restext diff --git a/UnitsNet/GeneratedCode/Resources/PressureChangeRate.en-US.restext b/UnitsNet/GeneratedCode/Resources/PressureChangeRate.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/PressureChangeRate.en-US.restext rename to UnitsNet/GeneratedCode/Resources/PressureChangeRate.restext diff --git a/UnitsNet/GeneratedCode/Resources/Ratio.en-US.restext b/UnitsNet/GeneratedCode/Resources/Ratio.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/Ratio.en-US.restext rename to UnitsNet/GeneratedCode/Resources/Ratio.restext diff --git a/UnitsNet/GeneratedCode/Resources/RatioChangeRate.en-US.restext b/UnitsNet/GeneratedCode/Resources/RatioChangeRate.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/RatioChangeRate.en-US.restext rename to UnitsNet/GeneratedCode/Resources/RatioChangeRate.restext diff --git a/UnitsNet/GeneratedCode/Resources/ReactiveEnergy.en-US.restext b/UnitsNet/GeneratedCode/Resources/ReactiveEnergy.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/ReactiveEnergy.en-US.restext rename to UnitsNet/GeneratedCode/Resources/ReactiveEnergy.restext diff --git a/UnitsNet/GeneratedCode/Resources/ReactivePower.en-US.restext b/UnitsNet/GeneratedCode/Resources/ReactivePower.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/ReactivePower.en-US.restext rename to UnitsNet/GeneratedCode/Resources/ReactivePower.restext diff --git a/UnitsNet/GeneratedCode/Resources/ReciprocalArea.en-US.restext b/UnitsNet/GeneratedCode/Resources/ReciprocalArea.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/ReciprocalArea.en-US.restext rename to UnitsNet/GeneratedCode/Resources/ReciprocalArea.restext diff --git a/UnitsNet/GeneratedCode/Resources/ReciprocalLength.en-US.restext b/UnitsNet/GeneratedCode/Resources/ReciprocalLength.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/ReciprocalLength.en-US.restext rename to UnitsNet/GeneratedCode/Resources/ReciprocalLength.restext diff --git a/UnitsNet/GeneratedCode/Resources/RelativeHumidity.en-US.restext b/UnitsNet/GeneratedCode/Resources/RelativeHumidity.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/RelativeHumidity.en-US.restext rename to UnitsNet/GeneratedCode/Resources/RelativeHumidity.restext diff --git a/UnitsNet/GeneratedCode/Resources/RotationalAcceleration.en-US.restext b/UnitsNet/GeneratedCode/Resources/RotationalAcceleration.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/RotationalAcceleration.en-US.restext rename to UnitsNet/GeneratedCode/Resources/RotationalAcceleration.restext diff --git a/UnitsNet/GeneratedCode/Resources/RotationalSpeed.en-US.restext b/UnitsNet/GeneratedCode/Resources/RotationalSpeed.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/RotationalSpeed.en-US.restext rename to UnitsNet/GeneratedCode/Resources/RotationalSpeed.restext diff --git a/UnitsNet/GeneratedCode/Resources/RotationalStiffness.en-US.restext b/UnitsNet/GeneratedCode/Resources/RotationalStiffness.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/RotationalStiffness.en-US.restext rename to UnitsNet/GeneratedCode/Resources/RotationalStiffness.restext diff --git a/UnitsNet/GeneratedCode/Resources/RotationalStiffnessPerLength.en-US.restext b/UnitsNet/GeneratedCode/Resources/RotationalStiffnessPerLength.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/RotationalStiffnessPerLength.en-US.restext rename to UnitsNet/GeneratedCode/Resources/RotationalStiffnessPerLength.restext diff --git a/UnitsNet/GeneratedCode/Resources/Scalar.en-US.restext b/UnitsNet/GeneratedCode/Resources/Scalar.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/Scalar.en-US.restext rename to UnitsNet/GeneratedCode/Resources/Scalar.restext diff --git a/UnitsNet/GeneratedCode/Resources/SolidAngle.en-US.restext b/UnitsNet/GeneratedCode/Resources/SolidAngle.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/SolidAngle.en-US.restext rename to UnitsNet/GeneratedCode/Resources/SolidAngle.restext diff --git a/UnitsNet/GeneratedCode/Resources/SpecificEnergy.en-US.restext b/UnitsNet/GeneratedCode/Resources/SpecificEnergy.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/SpecificEnergy.en-US.restext rename to UnitsNet/GeneratedCode/Resources/SpecificEnergy.restext diff --git a/UnitsNet/GeneratedCode/Resources/SpecificEntropy.en-US.restext b/UnitsNet/GeneratedCode/Resources/SpecificEntropy.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/SpecificEntropy.en-US.restext rename to UnitsNet/GeneratedCode/Resources/SpecificEntropy.restext diff --git a/UnitsNet/GeneratedCode/Resources/SpecificFuelConsumption.en-US.restext b/UnitsNet/GeneratedCode/Resources/SpecificFuelConsumption.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/SpecificFuelConsumption.en-US.restext rename to UnitsNet/GeneratedCode/Resources/SpecificFuelConsumption.restext diff --git a/UnitsNet/GeneratedCode/Resources/SpecificVolume.en-US.restext b/UnitsNet/GeneratedCode/Resources/SpecificVolume.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/SpecificVolume.en-US.restext rename to UnitsNet/GeneratedCode/Resources/SpecificVolume.restext diff --git a/UnitsNet/GeneratedCode/Resources/SpecificWeight.en-US.restext b/UnitsNet/GeneratedCode/Resources/SpecificWeight.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/SpecificWeight.en-US.restext rename to UnitsNet/GeneratedCode/Resources/SpecificWeight.restext diff --git a/UnitsNet/GeneratedCode/Resources/Speed.en-US.restext b/UnitsNet/GeneratedCode/Resources/Speed.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/Speed.en-US.restext rename to UnitsNet/GeneratedCode/Resources/Speed.restext diff --git a/UnitsNet/GeneratedCode/Resources/StandardVolumeFlow.en-US.restext b/UnitsNet/GeneratedCode/Resources/StandardVolumeFlow.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/StandardVolumeFlow.en-US.restext rename to UnitsNet/GeneratedCode/Resources/StandardVolumeFlow.restext diff --git a/UnitsNet/GeneratedCode/Resources/Temperature.en-US.restext b/UnitsNet/GeneratedCode/Resources/Temperature.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/Temperature.en-US.restext rename to UnitsNet/GeneratedCode/Resources/Temperature.restext diff --git a/UnitsNet/GeneratedCode/Resources/TemperatureChangeRate.en-US.restext b/UnitsNet/GeneratedCode/Resources/TemperatureChangeRate.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/TemperatureChangeRate.en-US.restext rename to UnitsNet/GeneratedCode/Resources/TemperatureChangeRate.restext diff --git a/UnitsNet/GeneratedCode/Resources/TemperatureDelta.en-US.restext b/UnitsNet/GeneratedCode/Resources/TemperatureDelta.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/TemperatureDelta.en-US.restext rename to UnitsNet/GeneratedCode/Resources/TemperatureDelta.restext diff --git a/UnitsNet/GeneratedCode/Resources/TemperatureGradient.en-US.restext b/UnitsNet/GeneratedCode/Resources/TemperatureGradient.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/TemperatureGradient.en-US.restext rename to UnitsNet/GeneratedCode/Resources/TemperatureGradient.restext diff --git a/UnitsNet/GeneratedCode/Resources/ThermalConductivity.en-US.restext b/UnitsNet/GeneratedCode/Resources/ThermalConductivity.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/ThermalConductivity.en-US.restext rename to UnitsNet/GeneratedCode/Resources/ThermalConductivity.restext diff --git a/UnitsNet/GeneratedCode/Resources/ThermalResistance.en-US.restext b/UnitsNet/GeneratedCode/Resources/ThermalResistance.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/ThermalResistance.en-US.restext rename to UnitsNet/GeneratedCode/Resources/ThermalResistance.restext diff --git a/UnitsNet/GeneratedCode/Resources/Torque.en-US.restext b/UnitsNet/GeneratedCode/Resources/Torque.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/Torque.en-US.restext rename to UnitsNet/GeneratedCode/Resources/Torque.restext diff --git a/UnitsNet/GeneratedCode/Resources/TorquePerLength.en-US.restext b/UnitsNet/GeneratedCode/Resources/TorquePerLength.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/TorquePerLength.en-US.restext rename to UnitsNet/GeneratedCode/Resources/TorquePerLength.restext diff --git a/UnitsNet/GeneratedCode/Resources/Turbidity.en-US.restext b/UnitsNet/GeneratedCode/Resources/Turbidity.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/Turbidity.en-US.restext rename to UnitsNet/GeneratedCode/Resources/Turbidity.restext diff --git a/UnitsNet/GeneratedCode/Resources/VitaminA.en-US.restext b/UnitsNet/GeneratedCode/Resources/VitaminA.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/VitaminA.en-US.restext rename to UnitsNet/GeneratedCode/Resources/VitaminA.restext diff --git a/UnitsNet/GeneratedCode/Resources/Volume.en-US.restext b/UnitsNet/GeneratedCode/Resources/Volume.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/Volume.en-US.restext rename to UnitsNet/GeneratedCode/Resources/Volume.restext diff --git a/UnitsNet/GeneratedCode/Resources/VolumeConcentration.en-US.restext b/UnitsNet/GeneratedCode/Resources/VolumeConcentration.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/VolumeConcentration.en-US.restext rename to UnitsNet/GeneratedCode/Resources/VolumeConcentration.restext diff --git a/UnitsNet/GeneratedCode/Resources/VolumeFlow.en-US.restext b/UnitsNet/GeneratedCode/Resources/VolumeFlow.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/VolumeFlow.en-US.restext rename to UnitsNet/GeneratedCode/Resources/VolumeFlow.restext diff --git a/UnitsNet/GeneratedCode/Resources/VolumeFlowPerArea.en-US.restext b/UnitsNet/GeneratedCode/Resources/VolumeFlowPerArea.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/VolumeFlowPerArea.en-US.restext rename to UnitsNet/GeneratedCode/Resources/VolumeFlowPerArea.restext diff --git a/UnitsNet/GeneratedCode/Resources/VolumePerLength.en-US.restext b/UnitsNet/GeneratedCode/Resources/VolumePerLength.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/VolumePerLength.en-US.restext rename to UnitsNet/GeneratedCode/Resources/VolumePerLength.restext diff --git a/UnitsNet/GeneratedCode/Resources/VolumetricHeatCapacity.en-US.restext b/UnitsNet/GeneratedCode/Resources/VolumetricHeatCapacity.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/VolumetricHeatCapacity.en-US.restext rename to UnitsNet/GeneratedCode/Resources/VolumetricHeatCapacity.restext diff --git a/UnitsNet/GeneratedCode/Resources/WarpingMomentOfInertia.en-US.restext b/UnitsNet/GeneratedCode/Resources/WarpingMomentOfInertia.restext similarity index 100% rename from UnitsNet/GeneratedCode/Resources/WarpingMomentOfInertia.en-US.restext rename to UnitsNet/GeneratedCode/Resources/WarpingMomentOfInertia.restext diff --git a/UnitsNet/UnitFormatter.cs b/UnitsNet/UnitFormatter.cs index 06ecbbf700..2bed8d0215 100644 --- a/UnitsNet/UnitFormatter.cs +++ b/UnitsNet/UnitFormatter.cs @@ -3,7 +3,12 @@ using System; using System.Collections.Generic; +using System.Globalization; +using System.IO; using System.Linq; +using System.Reflection; +using System.Resources; +using System.Threading; namespace UnitsNet { @@ -73,8 +78,22 @@ private static bool NearlyEqual(double a, double b) public static object[] GetFormatArgs(TUnitType unit, double value, IFormatProvider? culture, IEnumerable args) where TUnitType : Enum { - string abbreviation = UnitAbbreviationsCache.Default.GetDefaultAbbreviation(typeof(TUnitType), Convert.ToInt32(unit), culture); + string abbreviation = GetAbbreviations2("Length", "Meter").FirstOrDefault() ?? string.Empty; return new object[] {value, abbreviation}.Concat(args).ToArray(); } + + private static string[] GetAbbreviations2(string quantityName, string unitString, CultureInfo? culture = null) + { + var resourceName = $"UnitsNet.GeneratedCode.Resources.{quantityName}"; + var resourceManager = new ResourceManager(resourceName, typeof(Length).Assembly); + + var abbreviation = resourceManager.GetString(unitString, culture ?? Thread.CurrentThread.CurrentCulture); + if(abbreviation is null) + return Array.Empty(); + + abbreviation = abbreviation.Trim('(', ')'); + var abbreviations = abbreviation.Split(','); + return abbreviations; + } } } From 3c478430539dbfaa6276ab1591904a1b37c8a463 Mon Sep 17 00:00:00 2001 From: Tristan Milnthorp Date: Tue, 21 Feb 2023 16:35:05 -0500 Subject: [PATCH 07/26] Trim on output --- CodeGen/Generators/UnitsNetGenerator.cs | 6 +- .../Resources/Acceleration.restext | 28 ++-- .../Resources/Acceleration.ru-RU.restext | 28 ++-- .../Resources/AmountOfSubstance.restext | 30 ++--- .../Resources/AmplitudeRatio.restext | 8 +- .../GeneratedCode/Resources/Angle.restext | 32 ++--- .../Resources/Angle.ru-RU.restext | 24 ++-- .../Resources/ApparentEnergy.restext | 6 +- .../Resources/ApparentPower.restext | 12 +- UnitsNet/GeneratedCode/Resources/Area.restext | 28 ++-- .../Resources/Area.ru-RU.restext | 28 ++-- .../Resources/Area.zh-CN.restext | 26 ++-- .../Resources/AreaDensity.restext | 6 +- .../Resources/AreaMomentOfInertia.restext | 12 +- .../GeneratedCode/Resources/BitRate.restext | 52 ++++---- .../BrakeSpecificFuelConsumption.restext | 6 +- .../Resources/Capacitance.restext | 14 +- .../CoefficientOfThermalExpansion.restext | 6 +- .../Resources/Compressibility.restext | 14 +- .../GeneratedCode/Resources/Density.restext | 102 +++++++------- .../Resources/Density.ru-RU.restext | 8 +- .../GeneratedCode/Resources/Duration.restext | 22 ++-- .../Resources/Duration.ru-RU.restext | 20 +-- .../Resources/DynamicViscosity.restext | 20 +-- .../Resources/ElectricAdmittance.restext | 8 +- .../Resources/ElectricCharge.restext | 22 ++-- .../Resources/ElectricChargeDensity.restext | 2 +- .../Resources/ElectricConductance.restext | 10 +- .../Resources/ElectricConductivity.restext | 12 +- .../Resources/ElectricCurrent.restext | 18 +-- .../Resources/ElectricCurrentDensity.restext | 6 +- .../Resources/ElectricCurrentGradient.restext | 8 +- .../Resources/ElectricField.restext | 2 +- .../Resources/ElectricInductance.restext | 10 +- .../Resources/ElectricPotential.restext | 12 +- .../Resources/ElectricPotential.ru-RU.restext | 12 +- .../Resources/ElectricPotentialAc.restext | 10 +- .../ElectricPotentialChangeRate.restext | 40 +++--- .../Resources/ElectricPotentialDc.restext | 10 +- .../Resources/ElectricResistance.restext | 14 +- .../Resources/ElectricResistivity.restext | 28 ++-- .../ElectricSurfaceChargeDensity.restext | 6 +- .../GeneratedCode/Resources/Energy.restext | 76 +++++------ .../Resources/Energy.ru-RU.restext | 42 +++--- .../Resources/EnergyDensity.restext | 24 ++-- .../GeneratedCode/Resources/Entropy.restext | 14 +- .../GeneratedCode/Resources/Force.restext | 30 ++--- .../Resources/Force.ru-RU.restext | 26 ++-- .../Resources/ForceChangeRate.restext | 30 ++--- .../Resources/ForcePerLength.restext | 76 +++++------ .../Resources/ForcePerLength.ru-RU.restext | 12 +- .../GeneratedCode/Resources/Frequency.restext | 26 ++-- .../Resources/Frequency.ru-RU.restext | 18 +-- .../Resources/FuelEfficiency.restext | 8 +- .../GeneratedCode/Resources/HeatFlux.restext | 36 ++--- .../Resources/HeatTransferCoefficient.restext | 12 +- .../Resources/Illuminance.restext | 8 +- .../GeneratedCode/Resources/Impulse.restext | 26 ++-- .../Resources/Information.restext | 52 ++++---- .../Resources/Irradiance.restext | 28 ++-- .../Resources/Irradiation.restext | 14 +- UnitsNet/GeneratedCode/Resources/Jerk.restext | 22 ++-- .../Resources/Jerk.ru-RU.restext | 22 ++-- .../Resources/KinematicViscosity.restext | 18 +-- .../KinematicViscosity.ru-RU.restext | 16 +-- .../GeneratedCode/Resources/Length.restext | 72 +++++----- .../Resources/Length.ru-RU.restext | 32 ++--- .../Resources/Length.zh-CN.restext | 32 ++--- .../GeneratedCode/Resources/Level.restext | 4 +- .../Resources/LinearDensity.restext | 28 ++-- .../Resources/LinearPowerDensity.restext | 50 +++---- .../GeneratedCode/Resources/Luminance.restext | 20 +-- .../Resources/Luminosity.restext | 28 ++-- .../Resources/LuminousFlux.restext | 2 +- .../Resources/LuminousIntensity.restext | 2 +- .../Resources/MagneticField.restext | 12 +- .../Resources/MagneticFlux.restext | 2 +- .../Resources/Magnetization.restext | 2 +- UnitsNet/GeneratedCode/Resources/Mass.restext | 50 +++---- .../Resources/Mass.ru-RU.restext | 34 ++--- .../Resources/Mass.zh-CN.restext | 36 ++--- .../Resources/MassConcentration.restext | 98 +++++++------- .../Resources/MassConcentration.ru-RU.restext | 8 +- .../GeneratedCode/Resources/MassFlow.restext | 66 +++++----- .../Resources/MassFlow.ru-RU.restext | 4 +- .../GeneratedCode/Resources/MassFlux.restext | 24 ++-- .../Resources/MassFraction.restext | 48 +++---- .../Resources/MassMomentOfInertia.restext | 56 ++++---- .../Resources/MolarEnergy.restext | 6 +- .../Resources/MolarEntropy.restext | 6 +- .../GeneratedCode/Resources/MolarFlow.restext | 18 +-- .../GeneratedCode/Resources/MolarMass.restext | 26 ++-- .../Resources/MolarMass.ru-RU.restext | 24 ++-- .../GeneratedCode/Resources/Molarity.restext | 22 ++-- .../Resources/Permeability.restext | 2 +- .../Resources/Permittivity.restext | 2 +- .../PorousMediumPermeability.restext | 10 +- .../GeneratedCode/Resources/Power.restext | 52 ++++---- .../Resources/PowerDensity.restext | 88 ++++++------- .../Resources/PowerRatio.restext | 4 +- .../GeneratedCode/Resources/Pressure.restext | 94 ++++++------- .../Resources/Pressure.ru-RU.restext | 62 ++++----- .../Resources/PressureChangeRate.restext | 28 ++-- .../PressureChangeRate.ru-RU.restext | 28 ++-- .../GeneratedCode/Resources/Ratio.restext | 12 +- .../Resources/RatioChangeRate.restext | 4 +- .../Resources/ReactiveEnergy.restext | 6 +- .../Resources/ReactivePower.restext | 8 +- .../Resources/ReciprocalArea.restext | 22 ++-- .../Resources/ReciprocalLength.restext | 20 +-- .../Resources/RelativeHumidity.restext | 2 +- .../Resources/RotationalAcceleration.restext | 8 +- .../Resources/RotationalSpeed.restext | 26 ++-- .../Resources/RotationalSpeed.ru-RU.restext | 24 ++-- .../Resources/RotationalStiffness.restext | 66 +++++----- .../RotationalStiffnessPerLength.restext | 10 +- .../GeneratedCode/Resources/Scalar.restext | 2 +- .../Resources/SolidAngle.restext | 2 +- .../Resources/SpecificEnergy.restext | 60 ++++----- .../Resources/SpecificEntropy.restext | 18 +-- .../Resources/SpecificFuelConsumption.restext | 8 +- .../Resources/SpecificVolume.restext | 6 +- .../Resources/SpecificWeight.restext | 34 ++--- .../GeneratedCode/Resources/Speed.restext | 66 +++++----- .../Resources/Speed.ru-RU.restext | 48 +++---- .../Resources/StandardVolumeFlow.restext | 18 +-- .../Resources/Temperature.restext | 20 +-- .../Resources/TemperatureChangeRate.restext | 20 +-- .../Resources/TemperatureDelta.restext | 18 +-- .../Resources/TemperatureGradient.restext | 8 +- .../Resources/ThermalConductivity.restext | 4 +- .../Resources/ThermalResistance.restext | 12 +- .../GeneratedCode/Resources/Torque.restext | 50 +++---- .../Resources/Torque.ru-RU.restext | 6 +- .../Resources/TorquePerLength.restext | 42 +++--- .../Resources/TorquePerLength.ru-RU.restext | 6 +- .../GeneratedCode/Resources/Turbidity.restext | 2 +- .../GeneratedCode/Resources/VitaminA.restext | 2 +- .../Resources/Volume.fr-CA.restext | 2 +- .../GeneratedCode/Resources/Volume.restext | 92 ++++++------- .../Resources/Volume.ru-RU.restext | 74 +++++------ .../Resources/VolumeConcentration.restext | 40 +++--- .../Resources/VolumeFlow.restext | 124 +++++++++--------- .../Resources/VolumeFlow.ru-RU.restext | 54 ++++---- .../Resources/VolumeFlowPerArea.restext | 4 +- .../Resources/VolumePerLength.restext | 14 +- .../Resources/VolumetricHeatCapacity.restext | 18 +-- .../Resources/WarpingMomentOfInertia.restext | 12 +- 148 files changed, 1840 insertions(+), 1840 deletions(-) diff --git a/CodeGen/Generators/UnitsNetGenerator.cs b/CodeGen/Generators/UnitsNetGenerator.cs index b617118a82..e0a3386f66 100644 --- a/CodeGen/Generators/UnitsNetGenerator.cs +++ b/CodeGen/Generators/UnitsNetGenerator.cs @@ -163,17 +163,17 @@ private static void GenerateResourceFiles(Quantity[] quantities, string resource { if(localization.Abbreviations.Any()) { - writer.Write($"{unit.SingularName} = ("); + writer.Write($"{unit.SingularName} = "); for(int i = 0; i < localization.Abbreviations.Length; i++) { writer.Write($"\"{localization.Abbreviations[i]}\""); if(i != localization.Abbreviations.Length - 1) - writer.Write(", "); + writer.Write(","); } - writer.WriteLine(")"); + writer.WriteLine(); } } } diff --git a/UnitsNet/GeneratedCode/Resources/Acceleration.restext b/UnitsNet/GeneratedCode/Resources/Acceleration.restext index 839031b259..58813d3246 100644 --- a/UnitsNet/GeneratedCode/Resources/Acceleration.restext +++ b/UnitsNet/GeneratedCode/Resources/Acceleration.restext @@ -1,14 +1,14 @@ -CentimeterPerSecondSquared = ("cm/s²") -DecimeterPerSecondSquared = ("dm/s²") -FootPerSecondSquared = ("ft/s²") -InchPerSecondSquared = ("in/s²") -KilometerPerSecondSquared = ("km/s²") -KnotPerHour = ("kn/h") -KnotPerMinute = ("kn/min") -KnotPerSecond = ("kn/s") -MeterPerSecondSquared = ("m/s²") -MicrometerPerSecondSquared = ("µm/s²") -MillimeterPerSecondSquared = ("mm/s²") -MillistandardGravity = ("mg") -NanometerPerSecondSquared = ("nm/s²") -StandardGravity = ("g") +CentimeterPerSecondSquared = "cm/s²" +DecimeterPerSecondSquared = "dm/s²" +FootPerSecondSquared = "ft/s²" +InchPerSecondSquared = "in/s²" +KilometerPerSecondSquared = "km/s²" +KnotPerHour = "kn/h" +KnotPerMinute = "kn/min" +KnotPerSecond = "kn/s" +MeterPerSecondSquared = "m/s²" +MicrometerPerSecondSquared = "µm/s²" +MillimeterPerSecondSquared = "mm/s²" +MillistandardGravity = "mg" +NanometerPerSecondSquared = "nm/s²" +StandardGravity = "g" diff --git a/UnitsNet/GeneratedCode/Resources/Acceleration.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Acceleration.ru-RU.restext index 68e6152629..bf47e243cf 100644 --- a/UnitsNet/GeneratedCode/Resources/Acceleration.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Acceleration.ru-RU.restext @@ -1,14 +1,14 @@ -CentimeterPerSecondSquared = ("см/с²") -DecimeterPerSecondSquared = ("дм/с²") -FootPerSecondSquared = ("фут/с²") -InchPerSecondSquared = ("дюйм/с²") -KilometerPerSecondSquared = ("км/с²") -KnotPerHour = ("узел/час") -KnotPerMinute = ("узел/мин") -KnotPerSecond = ("узел/с") -MeterPerSecondSquared = ("м/с²") -MicrometerPerSecondSquared = ("мкм/с²") -MillimeterPerSecondSquared = ("мм/с²") -MillistandardGravity = ("мg") -NanometerPerSecondSquared = ("нм/с²") -StandardGravity = ("g") +CentimeterPerSecondSquared = "см/с²" +DecimeterPerSecondSquared = "дм/с²" +FootPerSecondSquared = "фут/с²" +InchPerSecondSquared = "дюйм/с²" +KilometerPerSecondSquared = "км/с²" +KnotPerHour = "узел/час" +KnotPerMinute = "узел/мин" +KnotPerSecond = "узел/с" +MeterPerSecondSquared = "м/с²" +MicrometerPerSecondSquared = "мкм/с²" +MillimeterPerSecondSquared = "мм/с²" +MillistandardGravity = "мg" +NanometerPerSecondSquared = "нм/с²" +StandardGravity = "g" diff --git a/UnitsNet/GeneratedCode/Resources/AmountOfSubstance.restext b/UnitsNet/GeneratedCode/Resources/AmountOfSubstance.restext index 55ac260539..6e5a8528ec 100644 --- a/UnitsNet/GeneratedCode/Resources/AmountOfSubstance.restext +++ b/UnitsNet/GeneratedCode/Resources/AmountOfSubstance.restext @@ -1,15 +1,15 @@ -Centimole = ("cmol") -CentipoundMole = ("clbmol") -Decimole = ("dmol") -DecipoundMole = ("dlbmol") -Kilomole = ("kmol") -KilopoundMole = ("klbmol") -Megamole = ("Mmol") -Micromole = ("µmol") -MicropoundMole = ("µlbmol") -Millimole = ("mmol") -MillipoundMole = ("mlbmol") -Mole = ("mol") -Nanomole = ("nmol") -NanopoundMole = ("nlbmol") -PoundMole = ("lbmol") +Centimole = "cmol" +CentipoundMole = "clbmol" +Decimole = "dmol" +DecipoundMole = "dlbmol" +Kilomole = "kmol" +KilopoundMole = "klbmol" +Megamole = "Mmol" +Micromole = "µmol" +MicropoundMole = "µlbmol" +Millimole = "mmol" +MillipoundMole = "mlbmol" +Mole = "mol" +Nanomole = "nmol" +NanopoundMole = "nlbmol" +PoundMole = "lbmol" diff --git a/UnitsNet/GeneratedCode/Resources/AmplitudeRatio.restext b/UnitsNet/GeneratedCode/Resources/AmplitudeRatio.restext index e3ded2c5e9..5a37fe634c 100644 --- a/UnitsNet/GeneratedCode/Resources/AmplitudeRatio.restext +++ b/UnitsNet/GeneratedCode/Resources/AmplitudeRatio.restext @@ -1,4 +1,4 @@ -DecibelMicrovolt = ("dBµV") -DecibelMillivolt = ("dBmV") -DecibelUnloaded = ("dBu") -DecibelVolt = ("dBV") +DecibelMicrovolt = "dBµV" +DecibelMillivolt = "dBmV" +DecibelUnloaded = "dBu" +DecibelVolt = "dBV" diff --git a/UnitsNet/GeneratedCode/Resources/Angle.restext b/UnitsNet/GeneratedCode/Resources/Angle.restext index 662a021af6..5b74699e9c 100644 --- a/UnitsNet/GeneratedCode/Resources/Angle.restext +++ b/UnitsNet/GeneratedCode/Resources/Angle.restext @@ -1,16 +1,16 @@ -Arcminute = ("'", "arcmin", "amin", "min") -Arcsecond = ("″", "arcsec", "asec", "sec") -Centiradian = ("crad") -Deciradian = ("drad") -Degree = ("°", "deg") -Gradian = ("g") -Microdegree = ("µ°", "µdeg") -Microradian = ("µrad") -Millidegree = ("m°", "mdeg") -Milliradian = ("mrad") -Nanodegree = ("n°", "ndeg") -Nanoradian = ("nrad") -NatoMil = ("mil") -Radian = ("rad") -Revolution = ("r") -Tilt = ("sin(θ)") +Arcminute = "'","arcmin","amin","min" +Arcsecond = "″","arcsec","asec","sec" +Centiradian = "crad" +Deciradian = "drad" +Degree = "°","deg" +Gradian = "g" +Microdegree = "µ°","µdeg" +Microradian = "µrad" +Millidegree = "m°","mdeg" +Milliradian = "mrad" +Nanodegree = "n°","ndeg" +Nanoradian = "nrad" +NatoMil = "mil" +Radian = "rad" +Revolution = "r" +Tilt = "sin(θ)" diff --git a/UnitsNet/GeneratedCode/Resources/Angle.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Angle.ru-RU.restext index c89415ca01..fe5cf26235 100644 --- a/UnitsNet/GeneratedCode/Resources/Angle.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Angle.ru-RU.restext @@ -1,12 +1,12 @@ -Centiradian = ("срад") -Deciradian = ("драд") -Degree = ("°") -Gradian = ("g") -Microdegree = ("мк°") -Microradian = ("мкрад") -Millidegree = ("м°") -Milliradian = ("мрад") -Nanodegree = ("н°") -Nanoradian = ("нрад") -Radian = ("рад") -Revolution = ("r") +Centiradian = "срад" +Deciradian = "драд" +Degree = "°" +Gradian = "g" +Microdegree = "мк°" +Microradian = "мкрад" +Millidegree = "м°" +Milliradian = "мрад" +Nanodegree = "н°" +Nanoradian = "нрад" +Radian = "рад" +Revolution = "r" diff --git a/UnitsNet/GeneratedCode/Resources/ApparentEnergy.restext b/UnitsNet/GeneratedCode/Resources/ApparentEnergy.restext index c4fde5196b..5e0f9dfa67 100644 --- a/UnitsNet/GeneratedCode/Resources/ApparentEnergy.restext +++ b/UnitsNet/GeneratedCode/Resources/ApparentEnergy.restext @@ -1,3 +1,3 @@ -KilovoltampereHour = ("kVAh") -MegavoltampereHour = ("MVAh") -VoltampereHour = ("VAh") +KilovoltampereHour = "kVAh" +MegavoltampereHour = "MVAh" +VoltampereHour = "VAh" diff --git a/UnitsNet/GeneratedCode/Resources/ApparentPower.restext b/UnitsNet/GeneratedCode/Resources/ApparentPower.restext index cc05dd136d..e19d3a93b2 100644 --- a/UnitsNet/GeneratedCode/Resources/ApparentPower.restext +++ b/UnitsNet/GeneratedCode/Resources/ApparentPower.restext @@ -1,6 +1,6 @@ -Gigavoltampere = ("GVA") -Kilovoltampere = ("kVA") -Megavoltampere = ("MVA") -Microvoltampere = ("µVA") -Millivoltampere = ("mVA") -Voltampere = ("VA") +Gigavoltampere = "GVA" +Kilovoltampere = "kVA" +Megavoltampere = "MVA" +Microvoltampere = "µVA" +Millivoltampere = "mVA" +Voltampere = "VA" diff --git a/UnitsNet/GeneratedCode/Resources/Area.restext b/UnitsNet/GeneratedCode/Resources/Area.restext index e28966f1a1..db3a79047b 100644 --- a/UnitsNet/GeneratedCode/Resources/Area.restext +++ b/UnitsNet/GeneratedCode/Resources/Area.restext @@ -1,14 +1,14 @@ -Acre = ("ac") -Hectare = ("ha") -SquareCentimeter = ("cm²") -SquareDecimeter = ("dm²") -SquareFoot = ("ft²") -SquareInch = ("in²") -SquareKilometer = ("km²") -SquareMeter = ("m²") -SquareMicrometer = ("µm²") -SquareMile = ("mi²") -SquareMillimeter = ("mm²") -SquareNauticalMile = ("nmi²") -SquareYard = ("yd²") -UsSurveySquareFoot = ("ft² (US)") +Acre = "ac" +Hectare = "ha" +SquareCentimeter = "cm²" +SquareDecimeter = "dm²" +SquareFoot = "ft²" +SquareInch = "in²" +SquareKilometer = "km²" +SquareMeter = "m²" +SquareMicrometer = "µm²" +SquareMile = "mi²" +SquareMillimeter = "mm²" +SquareNauticalMile = "nmi²" +SquareYard = "yd²" +UsSurveySquareFoot = "ft² (US)" diff --git a/UnitsNet/GeneratedCode/Resources/Area.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Area.ru-RU.restext index 7689fab5d2..a09d31cd95 100644 --- a/UnitsNet/GeneratedCode/Resources/Area.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Area.ru-RU.restext @@ -1,14 +1,14 @@ -Acre = ("акр") -Hectare = ("га") -SquareCentimeter = ("см²") -SquareDecimeter = ("дм²") -SquareFoot = ("фут²") -SquareInch = ("дюйм²") -SquareKilometer = ("км²") -SquareMeter = ("м²") -SquareMicrometer = ("мкм²") -SquareMile = ("миля²") -SquareMillimeter = ("мм²") -SquareNauticalMile = ("морск.миля²") -SquareYard = ("ярд²") -UsSurveySquareFoot = ("фут² (US)") +Acre = "акр" +Hectare = "га" +SquareCentimeter = "см²" +SquareDecimeter = "дм²" +SquareFoot = "фут²" +SquareInch = "дюйм²" +SquareKilometer = "км²" +SquareMeter = "м²" +SquareMicrometer = "мкм²" +SquareMile = "миля²" +SquareMillimeter = "мм²" +SquareNauticalMile = "морск.миля²" +SquareYard = "ярд²" +UsSurveySquareFoot = "фут² (US)" diff --git a/UnitsNet/GeneratedCode/Resources/Area.zh-CN.restext b/UnitsNet/GeneratedCode/Resources/Area.zh-CN.restext index 744e3b889c..f127c72037 100644 --- a/UnitsNet/GeneratedCode/Resources/Area.zh-CN.restext +++ b/UnitsNet/GeneratedCode/Resources/Area.zh-CN.restext @@ -1,13 +1,13 @@ -Acre = ("英亩") -Hectare = ("英亩") -SquareCentimeter = ("平方厘米") -SquareDecimeter = ("平方分米") -SquareFoot = ("平方英尺") -SquareInch = ("平方英寸") -SquareKilometer = ("平方公里") -SquareMeter = ("平方米") -SquareMicrometer = ("平方微米") -SquareMile = ("平方英里") -SquareMillimeter = ("平方毫米") -SquareNauticalMile = ("平方海里") -SquareYard = ("平方码") +Acre = "英亩" +Hectare = "英亩" +SquareCentimeter = "平方厘米" +SquareDecimeter = "平方分米" +SquareFoot = "平方英尺" +SquareInch = "平方英寸" +SquareKilometer = "平方公里" +SquareMeter = "平方米" +SquareMicrometer = "平方微米" +SquareMile = "平方英里" +SquareMillimeter = "平方毫米" +SquareNauticalMile = "平方海里" +SquareYard = "平方码" diff --git a/UnitsNet/GeneratedCode/Resources/AreaDensity.restext b/UnitsNet/GeneratedCode/Resources/AreaDensity.restext index 9c093db370..af9f9bf310 100644 --- a/UnitsNet/GeneratedCode/Resources/AreaDensity.restext +++ b/UnitsNet/GeneratedCode/Resources/AreaDensity.restext @@ -1,3 +1,3 @@ -GramPerSquareMeter = ("g/m²", "gsm") -KilogramPerSquareMeter = ("kg/m²") -MilligramPerSquareMeter = ("mg/m²") +GramPerSquareMeter = "g/m²","gsm" +KilogramPerSquareMeter = "kg/m²" +MilligramPerSquareMeter = "mg/m²" diff --git a/UnitsNet/GeneratedCode/Resources/AreaMomentOfInertia.restext b/UnitsNet/GeneratedCode/Resources/AreaMomentOfInertia.restext index 4da508257c..401d9f850e 100644 --- a/UnitsNet/GeneratedCode/Resources/AreaMomentOfInertia.restext +++ b/UnitsNet/GeneratedCode/Resources/AreaMomentOfInertia.restext @@ -1,6 +1,6 @@ -CentimeterToTheFourth = ("cm⁴", "cm^4") -DecimeterToTheFourth = ("dm⁴", "dm^4") -FootToTheFourth = ("ft⁴", "ft^4") -InchToTheFourth = ("in⁴", "in^4") -MeterToTheFourth = ("m⁴", "m^4") -MillimeterToTheFourth = ("mm⁴", "mm^4") +CentimeterToTheFourth = "cm⁴","cm^4" +DecimeterToTheFourth = "dm⁴","dm^4" +FootToTheFourth = "ft⁴","ft^4" +InchToTheFourth = "in⁴","in^4" +MeterToTheFourth = "m⁴","m^4" +MillimeterToTheFourth = "mm⁴","mm^4" diff --git a/UnitsNet/GeneratedCode/Resources/BitRate.restext b/UnitsNet/GeneratedCode/Resources/BitRate.restext index c4b4da3300..0e399b18c0 100644 --- a/UnitsNet/GeneratedCode/Resources/BitRate.restext +++ b/UnitsNet/GeneratedCode/Resources/BitRate.restext @@ -1,26 +1,26 @@ -BitPerSecond = ("bit/s", "bps") -BytePerSecond = ("B/s") -ExabitPerSecond = ("Ebit/s", "Ebps") -ExabytePerSecond = ("EB/s") -ExbibitPerSecond = ("Eibit/s", "Eibps") -ExbibytePerSecond = ("EiB/s") -GibibitPerSecond = ("Gibit/s", "Gibps") -GibibytePerSecond = ("GiB/s") -GigabitPerSecond = ("Gbit/s", "Gbps") -GigabytePerSecond = ("GB/s") -KibibitPerSecond = ("Kibit/s", "Kibps") -KibibytePerSecond = ("KiB/s") -KilobitPerSecond = ("kbit/s", "kbps") -KilobytePerSecond = ("kB/s") -MebibitPerSecond = ("Mibit/s", "Mibps") -MebibytePerSecond = ("MiB/s") -MegabitPerSecond = ("Mbit/s", "Mbps") -MegabytePerSecond = ("MB/s") -PebibitPerSecond = ("Pibit/s", "Pibps") -PebibytePerSecond = ("PiB/s") -PetabitPerSecond = ("Pbit/s", "Pbps") -PetabytePerSecond = ("PB/s") -TebibitPerSecond = ("Tibit/s", "Tibps") -TebibytePerSecond = ("TiB/s") -TerabitPerSecond = ("Tbit/s", "Tbps") -TerabytePerSecond = ("TB/s") +BitPerSecond = "bit/s","bps" +BytePerSecond = "B/s" +ExabitPerSecond = "Ebit/s","Ebps" +ExabytePerSecond = "EB/s" +ExbibitPerSecond = "Eibit/s","Eibps" +ExbibytePerSecond = "EiB/s" +GibibitPerSecond = "Gibit/s","Gibps" +GibibytePerSecond = "GiB/s" +GigabitPerSecond = "Gbit/s","Gbps" +GigabytePerSecond = "GB/s" +KibibitPerSecond = "Kibit/s","Kibps" +KibibytePerSecond = "KiB/s" +KilobitPerSecond = "kbit/s","kbps" +KilobytePerSecond = "kB/s" +MebibitPerSecond = "Mibit/s","Mibps" +MebibytePerSecond = "MiB/s" +MegabitPerSecond = "Mbit/s","Mbps" +MegabytePerSecond = "MB/s" +PebibitPerSecond = "Pibit/s","Pibps" +PebibytePerSecond = "PiB/s" +PetabitPerSecond = "Pbit/s","Pbps" +PetabytePerSecond = "PB/s" +TebibitPerSecond = "Tibit/s","Tibps" +TebibytePerSecond = "TiB/s" +TerabitPerSecond = "Tbit/s","Tbps" +TerabytePerSecond = "TB/s" diff --git a/UnitsNet/GeneratedCode/Resources/BrakeSpecificFuelConsumption.restext b/UnitsNet/GeneratedCode/Resources/BrakeSpecificFuelConsumption.restext index a5136686d1..0e0803e92e 100644 --- a/UnitsNet/GeneratedCode/Resources/BrakeSpecificFuelConsumption.restext +++ b/UnitsNet/GeneratedCode/Resources/BrakeSpecificFuelConsumption.restext @@ -1,3 +1,3 @@ -GramPerKiloWattHour = ("g/kWh") -KilogramPerJoule = ("kg/J") -PoundPerMechanicalHorsepowerHour = ("lb/hph") +GramPerKiloWattHour = "g/kWh" +KilogramPerJoule = "kg/J" +PoundPerMechanicalHorsepowerHour = "lb/hph" diff --git a/UnitsNet/GeneratedCode/Resources/Capacitance.restext b/UnitsNet/GeneratedCode/Resources/Capacitance.restext index 3473746d2b..e1649c1641 100644 --- a/UnitsNet/GeneratedCode/Resources/Capacitance.restext +++ b/UnitsNet/GeneratedCode/Resources/Capacitance.restext @@ -1,7 +1,7 @@ -Farad = ("F") -Kilofarad = ("kF") -Megafarad = ("MF") -Microfarad = ("µF") -Millifarad = ("mF") -Nanofarad = ("nF") -Picofarad = ("pF") +Farad = "F" +Kilofarad = "kF" +Megafarad = "MF" +Microfarad = "µF" +Millifarad = "mF" +Nanofarad = "nF" +Picofarad = "pF" diff --git a/UnitsNet/GeneratedCode/Resources/CoefficientOfThermalExpansion.restext b/UnitsNet/GeneratedCode/Resources/CoefficientOfThermalExpansion.restext index 224a759b95..c6cef79ae2 100644 --- a/UnitsNet/GeneratedCode/Resources/CoefficientOfThermalExpansion.restext +++ b/UnitsNet/GeneratedCode/Resources/CoefficientOfThermalExpansion.restext @@ -1,3 +1,3 @@ -InverseDegreeCelsius = ("°C⁻¹", "1/°C") -InverseDegreeFahrenheit = ("°F⁻¹", "1/°F") -InverseKelvin = ("K⁻¹", "1/K") +InverseDegreeCelsius = "°C⁻¹","1/°C" +InverseDegreeFahrenheit = "°F⁻¹","1/°F" +InverseKelvin = "K⁻¹","1/K" diff --git a/UnitsNet/GeneratedCode/Resources/Compressibility.restext b/UnitsNet/GeneratedCode/Resources/Compressibility.restext index 00697a6828..6ed0a047f3 100644 --- a/UnitsNet/GeneratedCode/Resources/Compressibility.restext +++ b/UnitsNet/GeneratedCode/Resources/Compressibility.restext @@ -1,7 +1,7 @@ -InverseAtmosphere = ("atm⁻¹", "1/atm") -InverseBar = ("bar⁻¹", "1/bar") -InverseKilopascal = ("kPa⁻¹", "1/kPa") -InverseMegapascal = ("MPa⁻¹", "1/MPa") -InverseMillibar = ("mbar⁻¹", "1/mbar") -InversePascal = ("Pa⁻¹", "1/Pa") -InversePoundForcePerSquareInch = ("psi⁻¹", "1/psi") +InverseAtmosphere = "atm⁻¹","1/atm" +InverseBar = "bar⁻¹","1/bar" +InverseKilopascal = "kPa⁻¹","1/kPa" +InverseMegapascal = "MPa⁻¹","1/MPa" +InverseMillibar = "mbar⁻¹","1/mbar" +InversePascal = "Pa⁻¹","1/Pa" +InversePoundForcePerSquareInch = "psi⁻¹","1/psi" diff --git a/UnitsNet/GeneratedCode/Resources/Density.restext b/UnitsNet/GeneratedCode/Resources/Density.restext index 026deadb6e..22c5ee8b37 100644 --- a/UnitsNet/GeneratedCode/Resources/Density.restext +++ b/UnitsNet/GeneratedCode/Resources/Density.restext @@ -1,51 +1,51 @@ -CentigramPerDeciliter = ("cg/dl") -CentigramPerLiter = ("cg/L") -CentigramPerMilliliter = ("cg/ml") -DecigramPerDeciliter = ("dg/dl") -DecigramPerLiter = ("dg/L") -DecigramPerMilliliter = ("dg/ml") -GramPerCubicCentimeter = ("g/cm³") -GramPerCubicFoot = ("g/ft³") -GramPerCubicInch = ("g/in³") -GramPerCubicMeter = ("g/m³") -GramPerCubicMillimeter = ("g/mm³") -GramPerDeciliter = ("g/dl") -GramPerLiter = ("g/L") -GramPerMilliliter = ("g/ml") -KilogramPerCubicCentimeter = ("kg/cm³") -KilogramPerCubicMeter = ("kg/m³") -KilogramPerCubicMillimeter = ("kg/mm³") -KilogramPerLiter = ("kg/l") -KilopoundPerCubicFoot = ("kip/ft³") -KilopoundPerCubicInch = ("kip/in³") -MicrogramPerCubicMeter = ("µg/m³") -MicrogramPerDeciliter = ("µg/dl") -MicrogramPerLiter = ("µg/L") -MicrogramPerMilliliter = ("µg/ml") -MilligramPerCubicMeter = ("mg/m³") -MilligramPerDeciliter = ("mg/dl") -MilligramPerLiter = ("mg/L") -MilligramPerMilliliter = ("mg/ml") -NanogramPerDeciliter = ("ng/dl") -NanogramPerLiter = ("ng/L") -NanogramPerMilliliter = ("ng/ml") -PicogramPerDeciliter = ("pg/dl") -PicogramPerLiter = ("pg/L") -PicogramPerMilliliter = ("pg/ml") -PoundPerCubicCentimeter = ("lb/cm³") -PoundPerCubicFoot = ("lb/ft³") -PoundPerCubicInch = ("lb/in³") -PoundPerCubicMeter = ("lb/m³") -PoundPerCubicMillimeter = ("lb/mm³") -PoundPerImperialGallon = ("ppg (imp.)") -PoundPerUSGallon = ("ppg (U.S.)") -SlugPerCubicCentimeter = ("slug/cm³") -SlugPerCubicFoot = ("slug/ft³") -SlugPerCubicInch = ("slug/in³") -SlugPerCubicMeter = ("slug/m³") -SlugPerCubicMillimeter = ("slug/mm³") -TonnePerCubicCentimeter = ("t/cm³") -TonnePerCubicFoot = ("t/ft³") -TonnePerCubicInch = ("t/in³") -TonnePerCubicMeter = ("t/m³") -TonnePerCubicMillimeter = ("t/mm³") +CentigramPerDeciliter = "cg/dl" +CentigramPerLiter = "cg/L" +CentigramPerMilliliter = "cg/ml" +DecigramPerDeciliter = "dg/dl" +DecigramPerLiter = "dg/L" +DecigramPerMilliliter = "dg/ml" +GramPerCubicCentimeter = "g/cm³" +GramPerCubicFoot = "g/ft³" +GramPerCubicInch = "g/in³" +GramPerCubicMeter = "g/m³" +GramPerCubicMillimeter = "g/mm³" +GramPerDeciliter = "g/dl" +GramPerLiter = "g/L" +GramPerMilliliter = "g/ml" +KilogramPerCubicCentimeter = "kg/cm³" +KilogramPerCubicMeter = "kg/m³" +KilogramPerCubicMillimeter = "kg/mm³" +KilogramPerLiter = "kg/l" +KilopoundPerCubicFoot = "kip/ft³" +KilopoundPerCubicInch = "kip/in³" +MicrogramPerCubicMeter = "µg/m³" +MicrogramPerDeciliter = "µg/dl" +MicrogramPerLiter = "µg/L" +MicrogramPerMilliliter = "µg/ml" +MilligramPerCubicMeter = "mg/m³" +MilligramPerDeciliter = "mg/dl" +MilligramPerLiter = "mg/L" +MilligramPerMilliliter = "mg/ml" +NanogramPerDeciliter = "ng/dl" +NanogramPerLiter = "ng/L" +NanogramPerMilliliter = "ng/ml" +PicogramPerDeciliter = "pg/dl" +PicogramPerLiter = "pg/L" +PicogramPerMilliliter = "pg/ml" +PoundPerCubicCentimeter = "lb/cm³" +PoundPerCubicFoot = "lb/ft³" +PoundPerCubicInch = "lb/in³" +PoundPerCubicMeter = "lb/m³" +PoundPerCubicMillimeter = "lb/mm³" +PoundPerImperialGallon = "ppg (imp.)" +PoundPerUSGallon = "ppg (U.S.)" +SlugPerCubicCentimeter = "slug/cm³" +SlugPerCubicFoot = "slug/ft³" +SlugPerCubicInch = "slug/in³" +SlugPerCubicMeter = "slug/m³" +SlugPerCubicMillimeter = "slug/mm³" +TonnePerCubicCentimeter = "t/cm³" +TonnePerCubicFoot = "t/ft³" +TonnePerCubicInch = "t/in³" +TonnePerCubicMeter = "t/m³" +TonnePerCubicMillimeter = "t/mm³" diff --git a/UnitsNet/GeneratedCode/Resources/Density.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Density.ru-RU.restext index 6664407759..80a1847318 100644 --- a/UnitsNet/GeneratedCode/Resources/Density.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Density.ru-RU.restext @@ -1,4 +1,4 @@ -GramPerCubicMeter = ("г/м³") -KilogramPerCubicMeter = ("кг/м³") -MicrogramPerCubicMeter = ("мкг/м³") -MilligramPerCubicMeter = ("мг/м³") +GramPerCubicMeter = "г/м³" +KilogramPerCubicMeter = "кг/м³" +MicrogramPerCubicMeter = "мкг/м³" +MilligramPerCubicMeter = "мг/м³" diff --git a/UnitsNet/GeneratedCode/Resources/Duration.restext b/UnitsNet/GeneratedCode/Resources/Duration.restext index 14c7e05261..a4904dca1e 100644 --- a/UnitsNet/GeneratedCode/Resources/Duration.restext +++ b/UnitsNet/GeneratedCode/Resources/Duration.restext @@ -1,11 +1,11 @@ -Day = ("d", "day", "days") -Hour = ("h", "hr", "hrs", "hour", "hours") -JulianYear = ("jyr", "jyear", "jyears") -Microsecond = ("µs", "µsec", "µsecs", "µsecond", "µseconds") -Millisecond = ("ms", "msec", "msecs", "msecond", "mseconds") -Minute = ("m", "min", "minute", "minutes") -Month30 = ("mo", "month", "months") -Nanosecond = ("ns", "nsec", "nsecs", "nsecond", "nseconds") -Second = ("s", "sec", "secs", "second", "seconds") -Week = ("wk", "week", "weeks") -Year365 = ("yr", "year", "years") +Day = "d","day","days" +Hour = "h","hr","hrs","hour","hours" +JulianYear = "jyr","jyear","jyears" +Microsecond = "µs","µsec","µsecs","µsecond","µseconds" +Millisecond = "ms","msec","msecs","msecond","mseconds" +Minute = "m","min","minute","minutes" +Month30 = "mo","month","months" +Nanosecond = "ns","nsec","nsecs","nsecond","nseconds" +Second = "s","sec","secs","second","seconds" +Week = "wk","week","weeks" +Year365 = "yr","year","years" diff --git a/UnitsNet/GeneratedCode/Resources/Duration.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Duration.ru-RU.restext index 6c99726cec..e87479078c 100644 --- a/UnitsNet/GeneratedCode/Resources/Duration.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Duration.ru-RU.restext @@ -1,10 +1,10 @@ -Day = ("сут", "д") -Hour = ("ч", "час") -Microsecond = ("мксек", "мкс") -Millisecond = ("мсек", "мс") -Minute = ("мин") -Month30 = ("месяц") -Nanosecond = ("нсек", "нс") -Second = ("сек", "с") -Week = ("нед") -Year365 = ("год") +Day = "сут","д" +Hour = "ч","час" +Microsecond = "мксек","мкс" +Millisecond = "мсек","мс" +Minute = "мин" +Month30 = "месяц" +Nanosecond = "нсек","нс" +Second = "сек","с" +Week = "нед" +Year365 = "год" diff --git a/UnitsNet/GeneratedCode/Resources/DynamicViscosity.restext b/UnitsNet/GeneratedCode/Resources/DynamicViscosity.restext index 9c42b8ab55..a5c52b69e9 100644 --- a/UnitsNet/GeneratedCode/Resources/DynamicViscosity.restext +++ b/UnitsNet/GeneratedCode/Resources/DynamicViscosity.restext @@ -1,10 +1,10 @@ -Centipoise = ("cP") -MicropascalSecond = ("µPa·s", "µPaS") -MillipascalSecond = ("mPa·s", "mPaS") -NewtonSecondPerMeterSquared = ("Ns/m²") -PascalSecond = ("Pa·s", "PaS") -Poise = ("P") -PoundForceSecondPerSquareFoot = ("lbf·s/ft²") -PoundForceSecondPerSquareInch = ("lbf·s/in²") -PoundPerFootSecond = ("lb/ft·s") -Reyn = ("reyn") +Centipoise = "cP" +MicropascalSecond = "µPa·s","µPaS" +MillipascalSecond = "mPa·s","mPaS" +NewtonSecondPerMeterSquared = "Ns/m²" +PascalSecond = "Pa·s","PaS" +Poise = "P" +PoundForceSecondPerSquareFoot = "lbf·s/ft²" +PoundForceSecondPerSquareInch = "lbf·s/in²" +PoundPerFootSecond = "lb/ft·s" +Reyn = "reyn" diff --git a/UnitsNet/GeneratedCode/Resources/ElectricAdmittance.restext b/UnitsNet/GeneratedCode/Resources/ElectricAdmittance.restext index 177f246394..13242ff5e8 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricAdmittance.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricAdmittance.restext @@ -1,4 +1,4 @@ -Microsiemens = ("µS") -Millisiemens = ("mS") -Nanosiemens = ("nS") -Siemens = ("S") +Microsiemens = "µS" +Millisiemens = "mS" +Nanosiemens = "nS" +Siemens = "S" diff --git a/UnitsNet/GeneratedCode/Resources/ElectricCharge.restext b/UnitsNet/GeneratedCode/Resources/ElectricCharge.restext index 4bd0d8eb7e..76b801fb8b 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricCharge.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricCharge.restext @@ -1,11 +1,11 @@ -AmpereHour = ("A-h", "Ah") -Coulomb = ("C") -KiloampereHour = ("kA-h", "kAh") -Kilocoulomb = ("kC") -MegaampereHour = ("MA-h", "MAh") -Megacoulomb = ("MC") -Microcoulomb = ("µC") -MilliampereHour = ("mA-h", "mAh") -Millicoulomb = ("mC") -Nanocoulomb = ("nC") -Picocoulomb = ("pC") +AmpereHour = "A-h","Ah" +Coulomb = "C" +KiloampereHour = "kA-h","kAh" +Kilocoulomb = "kC" +MegaampereHour = "MA-h","MAh" +Megacoulomb = "MC" +Microcoulomb = "µC" +MilliampereHour = "mA-h","mAh" +Millicoulomb = "mC" +Nanocoulomb = "nC" +Picocoulomb = "pC" diff --git a/UnitsNet/GeneratedCode/Resources/ElectricChargeDensity.restext b/UnitsNet/GeneratedCode/Resources/ElectricChargeDensity.restext index 1f5d7b5aeb..1d456a7136 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricChargeDensity.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricChargeDensity.restext @@ -1 +1 @@ -CoulombPerCubicMeter = ("C/m³") +CoulombPerCubicMeter = "C/m³" diff --git a/UnitsNet/GeneratedCode/Resources/ElectricConductance.restext b/UnitsNet/GeneratedCode/Resources/ElectricConductance.restext index 0c8ecb72fa..cb5700748a 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricConductance.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricConductance.restext @@ -1,5 +1,5 @@ -Kilosiemens = ("kS") -Microsiemens = ("µS") -Millisiemens = ("mS") -Nanosiemens = ("nS") -Siemens = ("S") +Kilosiemens = "kS" +Microsiemens = "µS" +Millisiemens = "mS" +Nanosiemens = "nS" +Siemens = "S" diff --git a/UnitsNet/GeneratedCode/Resources/ElectricConductivity.restext b/UnitsNet/GeneratedCode/Resources/ElectricConductivity.restext index 617677f93b..49a57ad755 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricConductivity.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricConductivity.restext @@ -1,6 +1,6 @@ -MicrosiemensPerCentimeter = ("µS/cm") -MillisiemensPerCentimeter = ("mS/cm") -SiemensPerCentimeter = ("S/cm") -SiemensPerFoot = ("S/ft") -SiemensPerInch = ("S/in") -SiemensPerMeter = ("S/m") +MicrosiemensPerCentimeter = "µS/cm" +MillisiemensPerCentimeter = "mS/cm" +SiemensPerCentimeter = "S/cm" +SiemensPerFoot = "S/ft" +SiemensPerInch = "S/in" +SiemensPerMeter = "S/m" diff --git a/UnitsNet/GeneratedCode/Resources/ElectricCurrent.restext b/UnitsNet/GeneratedCode/Resources/ElectricCurrent.restext index 1dceb800c5..e7a358d077 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricCurrent.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricCurrent.restext @@ -1,9 +1,9 @@ -Ampere = ("A") -Centiampere = ("cA") -Femtoampere = ("fA") -Kiloampere = ("kA") -Megaampere = ("MA") -Microampere = ("µA") -Milliampere = ("mA") -Nanoampere = ("nA") -Picoampere = ("pA") +Ampere = "A" +Centiampere = "cA" +Femtoampere = "fA" +Kiloampere = "kA" +Megaampere = "MA" +Microampere = "µA" +Milliampere = "mA" +Nanoampere = "nA" +Picoampere = "pA" diff --git a/UnitsNet/GeneratedCode/Resources/ElectricCurrentDensity.restext b/UnitsNet/GeneratedCode/Resources/ElectricCurrentDensity.restext index f40dcf9f92..e1c4a25eb2 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricCurrentDensity.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricCurrentDensity.restext @@ -1,3 +1,3 @@ -AmperePerSquareFoot = ("A/ft²") -AmperePerSquareInch = ("A/in²") -AmperePerSquareMeter = ("A/m²") +AmperePerSquareFoot = "A/ft²" +AmperePerSquareInch = "A/in²" +AmperePerSquareMeter = "A/m²" diff --git a/UnitsNet/GeneratedCode/Resources/ElectricCurrentGradient.restext b/UnitsNet/GeneratedCode/Resources/ElectricCurrentGradient.restext index 8f67335ebe..c2b1f367da 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricCurrentGradient.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricCurrentGradient.restext @@ -1,4 +1,4 @@ -AmperePerMicrosecond = ("A/μs") -AmperePerMillisecond = ("A/ms") -AmperePerNanosecond = ("A/ns") -AmperePerSecond = ("A/s") +AmperePerMicrosecond = "A/μs" +AmperePerMillisecond = "A/ms" +AmperePerNanosecond = "A/ns" +AmperePerSecond = "A/s" diff --git a/UnitsNet/GeneratedCode/Resources/ElectricField.restext b/UnitsNet/GeneratedCode/Resources/ElectricField.restext index 0dfc0439fa..8ee7399003 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricField.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricField.restext @@ -1 +1 @@ -VoltPerMeter = ("V/m") +VoltPerMeter = "V/m" diff --git a/UnitsNet/GeneratedCode/Resources/ElectricInductance.restext b/UnitsNet/GeneratedCode/Resources/ElectricInductance.restext index 6fb8faacb9..ca2f83ff01 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricInductance.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricInductance.restext @@ -1,5 +1,5 @@ -Henry = ("H") -Microhenry = ("µH") -Millihenry = ("mH") -Nanohenry = ("nH") -Picohenry = ("pH") +Henry = "H" +Microhenry = "µH" +Millihenry = "mH" +Nanohenry = "nH" +Picohenry = "pH" diff --git a/UnitsNet/GeneratedCode/Resources/ElectricPotential.restext b/UnitsNet/GeneratedCode/Resources/ElectricPotential.restext index f2e198b00b..b395b43d19 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricPotential.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricPotential.restext @@ -1,6 +1,6 @@ -Kilovolt = ("kV") -Megavolt = ("MV") -Microvolt = ("µV") -Millivolt = ("mV") -Nanovolt = ("nV") -Volt = ("V") +Kilovolt = "kV" +Megavolt = "MV" +Microvolt = "µV" +Millivolt = "mV" +Nanovolt = "nV" +Volt = "V" diff --git a/UnitsNet/GeneratedCode/Resources/ElectricPotential.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/ElectricPotential.ru-RU.restext index 2d28aaabdf..94f5a4d655 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricPotential.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricPotential.ru-RU.restext @@ -1,6 +1,6 @@ -Kilovolt = ("кВ") -Megavolt = ("МВ") -Microvolt = ("мкВ") -Millivolt = ("мВ") -Nanovolt = ("нВ") -Volt = ("В") +Kilovolt = "кВ" +Megavolt = "МВ" +Microvolt = "мкВ" +Millivolt = "мВ" +Nanovolt = "нВ" +Volt = "В" diff --git a/UnitsNet/GeneratedCode/Resources/ElectricPotentialAc.restext b/UnitsNet/GeneratedCode/Resources/ElectricPotentialAc.restext index 3e245cf3eb..b54f910f07 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricPotentialAc.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricPotentialAc.restext @@ -1,5 +1,5 @@ -KilovoltAc = ("kVac") -MegavoltAc = ("MVac") -MicrovoltAc = ("µVac") -MillivoltAc = ("mVac") -VoltAc = ("Vac") +KilovoltAc = "kVac" +MegavoltAc = "MVac" +MicrovoltAc = "µVac" +MillivoltAc = "mVac" +VoltAc = "Vac" diff --git a/UnitsNet/GeneratedCode/Resources/ElectricPotentialChangeRate.restext b/UnitsNet/GeneratedCode/Resources/ElectricPotentialChangeRate.restext index 20638248fe..e3b30aa13c 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricPotentialChangeRate.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricPotentialChangeRate.restext @@ -1,20 +1,20 @@ -KilovoltPerHour = ("kV/h") -KilovoltPerMicrosecond = ("kV/μs") -KilovoltPerMinute = ("kV/min") -KilovoltPerSecond = ("kV/s") -MegavoltPerHour = ("MV/h") -MegavoltPerMicrosecond = ("MV/μs") -MegavoltPerMinute = ("MV/min") -MegavoltPerSecond = ("MV/s") -MicrovoltPerHour = ("µV/h") -MicrovoltPerMicrosecond = ("µV/μs") -MicrovoltPerMinute = ("µV/min") -MicrovoltPerSecond = ("µV/s") -MillivoltPerHour = ("mV/h") -MillivoltPerMicrosecond = ("mV/μs") -MillivoltPerMinute = ("mV/min") -MillivoltPerSecond = ("mV/s") -VoltPerHour = ("V/h") -VoltPerMicrosecond = ("V/μs") -VoltPerMinute = ("V/min") -VoltPerSecond = ("V/s") +KilovoltPerHour = "kV/h" +KilovoltPerMicrosecond = "kV/μs" +KilovoltPerMinute = "kV/min" +KilovoltPerSecond = "kV/s" +MegavoltPerHour = "MV/h" +MegavoltPerMicrosecond = "MV/μs" +MegavoltPerMinute = "MV/min" +MegavoltPerSecond = "MV/s" +MicrovoltPerHour = "µV/h" +MicrovoltPerMicrosecond = "µV/μs" +MicrovoltPerMinute = "µV/min" +MicrovoltPerSecond = "µV/s" +MillivoltPerHour = "mV/h" +MillivoltPerMicrosecond = "mV/μs" +MillivoltPerMinute = "mV/min" +MillivoltPerSecond = "mV/s" +VoltPerHour = "V/h" +VoltPerMicrosecond = "V/μs" +VoltPerMinute = "V/min" +VoltPerSecond = "V/s" diff --git a/UnitsNet/GeneratedCode/Resources/ElectricPotentialDc.restext b/UnitsNet/GeneratedCode/Resources/ElectricPotentialDc.restext index 0292b3502d..7134889967 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricPotentialDc.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricPotentialDc.restext @@ -1,5 +1,5 @@ -KilovoltDc = ("kVdc") -MegavoltDc = ("MVdc") -MicrovoltDc = ("µVdc") -MillivoltDc = ("mVdc") -VoltDc = ("Vdc") +KilovoltDc = "kVdc" +MegavoltDc = "MVdc" +MicrovoltDc = "µVdc" +MillivoltDc = "mVdc" +VoltDc = "Vdc" diff --git a/UnitsNet/GeneratedCode/Resources/ElectricResistance.restext b/UnitsNet/GeneratedCode/Resources/ElectricResistance.restext index a94cfc713d..aa5bab19f9 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricResistance.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricResistance.restext @@ -1,7 +1,7 @@ -Gigaohm = ("GΩ") -Kiloohm = ("kΩ") -Megaohm = ("MΩ") -Microohm = ("µΩ") -Milliohm = ("mΩ") -Ohm = ("Ω") -Teraohm = ("TΩ") +Gigaohm = "GΩ" +Kiloohm = "kΩ" +Megaohm = "MΩ" +Microohm = "µΩ" +Milliohm = "mΩ" +Ohm = "Ω" +Teraohm = "TΩ" diff --git a/UnitsNet/GeneratedCode/Resources/ElectricResistivity.restext b/UnitsNet/GeneratedCode/Resources/ElectricResistivity.restext index fcc319d411..6281b7ab90 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricResistivity.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricResistivity.restext @@ -1,14 +1,14 @@ -KiloohmCentimeter = ("kΩ·cm") -KiloohmMeter = ("kΩ·m") -MegaohmCentimeter = ("MΩ·cm") -MegaohmMeter = ("MΩ·m") -MicroohmCentimeter = ("µΩ·cm") -MicroohmMeter = ("µΩ·m") -MilliohmCentimeter = ("mΩ·cm") -MilliohmMeter = ("mΩ·m") -NanoohmCentimeter = ("nΩ·cm") -NanoohmMeter = ("nΩ·m") -OhmCentimeter = ("Ω·cm") -OhmMeter = ("Ω·m") -PicoohmCentimeter = ("pΩ·cm") -PicoohmMeter = ("pΩ·m") +KiloohmCentimeter = "kΩ·cm" +KiloohmMeter = "kΩ·m" +MegaohmCentimeter = "MΩ·cm" +MegaohmMeter = "MΩ·m" +MicroohmCentimeter = "µΩ·cm" +MicroohmMeter = "µΩ·m" +MilliohmCentimeter = "mΩ·cm" +MilliohmMeter = "mΩ·m" +NanoohmCentimeter = "nΩ·cm" +NanoohmMeter = "nΩ·m" +OhmCentimeter = "Ω·cm" +OhmMeter = "Ω·m" +PicoohmCentimeter = "pΩ·cm" +PicoohmMeter = "pΩ·m" diff --git a/UnitsNet/GeneratedCode/Resources/ElectricSurfaceChargeDensity.restext b/UnitsNet/GeneratedCode/Resources/ElectricSurfaceChargeDensity.restext index 242843ed23..42e02f61d7 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricSurfaceChargeDensity.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricSurfaceChargeDensity.restext @@ -1,3 +1,3 @@ -CoulombPerSquareCentimeter = ("C/cm²") -CoulombPerSquareInch = ("C/in²") -CoulombPerSquareMeter = ("C/m²") +CoulombPerSquareCentimeter = "C/cm²" +CoulombPerSquareInch = "C/in²" +CoulombPerSquareMeter = "C/m²" diff --git a/UnitsNet/GeneratedCode/Resources/Energy.restext b/UnitsNet/GeneratedCode/Resources/Energy.restext index 4591938a1d..da300ac6c0 100644 --- a/UnitsNet/GeneratedCode/Resources/Energy.restext +++ b/UnitsNet/GeneratedCode/Resources/Energy.restext @@ -1,38 +1,38 @@ -BritishThermalUnit = ("BTU") -Calorie = ("cal") -DecathermEc = ("Dth (E.C.)") -DecathermImperial = ("Dth (imp.)") -DecathermUs = ("Dth (U.S.)") -ElectronVolt = ("eV") -Erg = ("erg") -FootPound = ("ft·lb") -GigabritishThermalUnit = ("GBTU") -GigaelectronVolt = ("GeV") -Gigajoule = ("GJ") -GigawattDay = ("GWd") -GigawattHour = ("GWh") -HorsepowerHour = ("hp·h") -Joule = ("J") -KilobritishThermalUnit = ("kBTU") -Kilocalorie = ("kcal") -KiloelectronVolt = ("keV") -Kilojoule = ("kJ") -KilowattDay = ("kWd") -KilowattHour = ("kWh") -MegabritishThermalUnit = ("MBTU") -Megacalorie = ("Mcal") -MegaelectronVolt = ("MeV") -Megajoule = ("MJ") -MegawattDay = ("MWd") -MegawattHour = ("MWh") -Millijoule = ("mJ") -Petajoule = ("PJ") -TeraelectronVolt = ("TeV") -Terajoule = ("TJ") -TerawattDay = ("TWd") -TerawattHour = ("TWh") -ThermEc = ("th (E.C.)") -ThermImperial = ("th (imp.)") -ThermUs = ("th (U.S.)") -WattDay = ("Wd") -WattHour = ("Wh") +BritishThermalUnit = "BTU" +Calorie = "cal" +DecathermEc = "Dth (E.C.)" +DecathermImperial = "Dth (imp.)" +DecathermUs = "Dth (U.S.)" +ElectronVolt = "eV" +Erg = "erg" +FootPound = "ft·lb" +GigabritishThermalUnit = "GBTU" +GigaelectronVolt = "GeV" +Gigajoule = "GJ" +GigawattDay = "GWd" +GigawattHour = "GWh" +HorsepowerHour = "hp·h" +Joule = "J" +KilobritishThermalUnit = "kBTU" +Kilocalorie = "kcal" +KiloelectronVolt = "keV" +Kilojoule = "kJ" +KilowattDay = "kWd" +KilowattHour = "kWh" +MegabritishThermalUnit = "MBTU" +Megacalorie = "Mcal" +MegaelectronVolt = "MeV" +Megajoule = "MJ" +MegawattDay = "MWd" +MegawattHour = "MWh" +Millijoule = "mJ" +Petajoule = "PJ" +TeraelectronVolt = "TeV" +Terajoule = "TJ" +TerawattDay = "TWd" +TerawattHour = "TWh" +ThermEc = "th (E.C.)" +ThermImperial = "th (imp.)" +ThermUs = "th (U.S.)" +WattDay = "Wd" +WattHour = "Wh" diff --git a/UnitsNet/GeneratedCode/Resources/Energy.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Energy.ru-RU.restext index 52c8599d39..8a0a77f3d9 100644 --- a/UnitsNet/GeneratedCode/Resources/Energy.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Energy.ru-RU.restext @@ -1,21 +1,21 @@ -DecathermEc = ("Европейский декатерм") -DecathermImperial = ("Английский декатерм") -DecathermUs = ("Американский декатерм") -ElectronVolt = ("эВ") -GigaelectronVolt = ("ГэВ") -GigawattDay = ("ГВт/д") -GigawattHour = ("ГВт/ч") -KiloelectronVolt = ("кэВ") -KilowattDay = ("кВт/д") -KilowattHour = ("кВт/ч") -MegaelectronVolt = ("МэВ") -MegawattDay = ("МВт/д") -MegawattHour = ("МВт/ч") -TeraelectronVolt = ("ТэВ") -TerawattDay = ("ТВт/д") -TerawattHour = ("ТВт/ч") -ThermEc = ("Европейский терм") -ThermImperial = ("Английский терм") -ThermUs = ("Американский терм") -WattDay = ("Вт/д") -WattHour = ("Вт/ч") +DecathermEc = "Европейский декатерм" +DecathermImperial = "Английский декатерм" +DecathermUs = "Американский декатерм" +ElectronVolt = "эВ" +GigaelectronVolt = "ГэВ" +GigawattDay = "ГВт/д" +GigawattHour = "ГВт/ч" +KiloelectronVolt = "кэВ" +KilowattDay = "кВт/д" +KilowattHour = "кВт/ч" +MegaelectronVolt = "МэВ" +MegawattDay = "МВт/д" +MegawattHour = "МВт/ч" +TeraelectronVolt = "ТэВ" +TerawattDay = "ТВт/д" +TerawattHour = "ТВт/ч" +ThermEc = "Европейский терм" +ThermImperial = "Английский терм" +ThermUs = "Американский терм" +WattDay = "Вт/д" +WattHour = "Вт/ч" diff --git a/UnitsNet/GeneratedCode/Resources/EnergyDensity.restext b/UnitsNet/GeneratedCode/Resources/EnergyDensity.restext index 71eb151665..f1535ca5fd 100644 --- a/UnitsNet/GeneratedCode/Resources/EnergyDensity.restext +++ b/UnitsNet/GeneratedCode/Resources/EnergyDensity.restext @@ -1,12 +1,12 @@ -GigajoulePerCubicMeter = ("GJ/m³") -GigawattHourPerCubicMeter = ("GWh/m³") -JoulePerCubicMeter = ("J/m³") -KilojoulePerCubicMeter = ("kJ/m³") -KilowattHourPerCubicMeter = ("kWh/m³") -MegajoulePerCubicMeter = ("MJ/m³") -MegawattHourPerCubicMeter = ("MWh/m³") -PetajoulePerCubicMeter = ("PJ/m³") -PetawattHourPerCubicMeter = ("PWh/m³") -TerajoulePerCubicMeter = ("TJ/m³") -TerawattHourPerCubicMeter = ("TWh/m³") -WattHourPerCubicMeter = ("Wh/m³") +GigajoulePerCubicMeter = "GJ/m³" +GigawattHourPerCubicMeter = "GWh/m³" +JoulePerCubicMeter = "J/m³" +KilojoulePerCubicMeter = "kJ/m³" +KilowattHourPerCubicMeter = "kWh/m³" +MegajoulePerCubicMeter = "MJ/m³" +MegawattHourPerCubicMeter = "MWh/m³" +PetajoulePerCubicMeter = "PJ/m³" +PetawattHourPerCubicMeter = "PWh/m³" +TerajoulePerCubicMeter = "TJ/m³" +TerawattHourPerCubicMeter = "TWh/m³" +WattHourPerCubicMeter = "Wh/m³" diff --git a/UnitsNet/GeneratedCode/Resources/Entropy.restext b/UnitsNet/GeneratedCode/Resources/Entropy.restext index 0f8bfa3fbc..995fbef6b7 100644 --- a/UnitsNet/GeneratedCode/Resources/Entropy.restext +++ b/UnitsNet/GeneratedCode/Resources/Entropy.restext @@ -1,7 +1,7 @@ -CaloriePerKelvin = ("cal/K") -JoulePerDegreeCelsius = ("J/C") -JoulePerKelvin = ("J/K") -KilocaloriePerKelvin = ("kcal/K") -KilojoulePerDegreeCelsius = ("kJ/C") -KilojoulePerKelvin = ("kJ/K") -MegajoulePerKelvin = ("MJ/K") +CaloriePerKelvin = "cal/K" +JoulePerDegreeCelsius = "J/C" +JoulePerKelvin = "J/K" +KilocaloriePerKelvin = "kcal/K" +KilojoulePerDegreeCelsius = "kJ/C" +KilojoulePerKelvin = "kJ/K" +MegajoulePerKelvin = "MJ/K" diff --git a/UnitsNet/GeneratedCode/Resources/Force.restext b/UnitsNet/GeneratedCode/Resources/Force.restext index 6e1c93148e..67532ec6c1 100644 --- a/UnitsNet/GeneratedCode/Resources/Force.restext +++ b/UnitsNet/GeneratedCode/Resources/Force.restext @@ -1,15 +1,15 @@ -Decanewton = ("daN") -Dyn = ("dyn") -KilogramForce = ("kgf") -Kilonewton = ("kN") -KiloPond = ("kp") -KilopoundForce = ("kipf", "kip", "k") -Meganewton = ("MN") -Micronewton = ("µN") -Millinewton = ("mN") -Newton = ("N") -OunceForce = ("ozf") -Poundal = ("pdl") -PoundForce = ("lbf") -ShortTonForce = ("tf (short)", "t (US)f", "short tons-force") -TonneForce = ("tf", "Ton") +Decanewton = "daN" +Dyn = "dyn" +KilogramForce = "kgf" +Kilonewton = "kN" +KiloPond = "kp" +KilopoundForce = "kipf","kip","k" +Meganewton = "MN" +Micronewton = "µN" +Millinewton = "mN" +Newton = "N" +OunceForce = "ozf" +Poundal = "pdl" +PoundForce = "lbf" +ShortTonForce = "tf (short)","t (US)f","short tons-force" +TonneForce = "tf","Ton" diff --git a/UnitsNet/GeneratedCode/Resources/Force.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Force.ru-RU.restext index 46d78afa8e..c8c2cd7630 100644 --- a/UnitsNet/GeneratedCode/Resources/Force.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Force.ru-RU.restext @@ -1,13 +1,13 @@ -Decanewton = ("даН") -Dyn = ("дин") -KilogramForce = ("кгс") -Kilonewton = ("кН") -KiloPond = ("кгс") -KilopoundForce = ("кипф", "койка", "К") -Meganewton = ("МН") -Micronewton = ("мкН") -Millinewton = ("мН") -Newton = ("Н") -Poundal = ("паундаль") -PoundForce = ("фунт-сила") -TonneForce = ("тс") +Decanewton = "даН" +Dyn = "дин" +KilogramForce = "кгс" +Kilonewton = "кН" +KiloPond = "кгс" +KilopoundForce = "кипф","койка","К" +Meganewton = "МН" +Micronewton = "мкН" +Millinewton = "мН" +Newton = "Н" +Poundal = "паундаль" +PoundForce = "фунт-сила" +TonneForce = "тс" diff --git a/UnitsNet/GeneratedCode/Resources/ForceChangeRate.restext b/UnitsNet/GeneratedCode/Resources/ForceChangeRate.restext index 7128d1d7c1..e1773316ee 100644 --- a/UnitsNet/GeneratedCode/Resources/ForceChangeRate.restext +++ b/UnitsNet/GeneratedCode/Resources/ForceChangeRate.restext @@ -1,15 +1,15 @@ -CentinewtonPerSecond = ("cN/s") -DecanewtonPerMinute = ("daN/min") -DecanewtonPerSecond = ("daN/s") -DecinewtonPerSecond = ("dN/s") -KilonewtonPerMinute = ("kN/min") -KilonewtonPerSecond = ("kN/s") -KilopoundForcePerMinute = ("kipf/min", "kip/min", "k/min") -KilopoundForcePerSecond = ("kipf/s", "kip/s", "k/s") -MicronewtonPerSecond = ("µN/s") -MillinewtonPerSecond = ("mN/s") -NanonewtonPerSecond = ("nN/s") -NewtonPerMinute = ("N/min") -NewtonPerSecond = ("N/s") -PoundForcePerMinute = ("lbf/min") -PoundForcePerSecond = ("lbf/s") +CentinewtonPerSecond = "cN/s" +DecanewtonPerMinute = "daN/min" +DecanewtonPerSecond = "daN/s" +DecinewtonPerSecond = "dN/s" +KilonewtonPerMinute = "kN/min" +KilonewtonPerSecond = "kN/s" +KilopoundForcePerMinute = "kipf/min","kip/min","k/min" +KilopoundForcePerSecond = "kipf/s","kip/s","k/s" +MicronewtonPerSecond = "µN/s" +MillinewtonPerSecond = "mN/s" +NanonewtonPerSecond = "nN/s" +NewtonPerMinute = "N/min" +NewtonPerSecond = "N/s" +PoundForcePerMinute = "lbf/min" +PoundForcePerSecond = "lbf/s" diff --git a/UnitsNet/GeneratedCode/Resources/ForcePerLength.restext b/UnitsNet/GeneratedCode/Resources/ForcePerLength.restext index d0129cbd2e..ddcc8f37a9 100644 --- a/UnitsNet/GeneratedCode/Resources/ForcePerLength.restext +++ b/UnitsNet/GeneratedCode/Resources/ForcePerLength.restext @@ -1,38 +1,38 @@ -CentinewtonPerCentimeter = ("cN/cm") -CentinewtonPerMeter = ("cN/m") -CentinewtonPerMillimeter = ("cN/mm") -DecanewtonPerCentimeter = ("daN/cm") -DecanewtonPerMeter = ("daN/m") -DecanewtonPerMillimeter = ("daN/mm") -DecinewtonPerCentimeter = ("dN/cm") -DecinewtonPerMeter = ("dN/m") -DecinewtonPerMillimeter = ("dN/mm") -KilogramForcePerCentimeter = ("kgf/cm") -KilogramForcePerMeter = ("kgf/m") -KilogramForcePerMillimeter = ("kgf/mm") -KilonewtonPerCentimeter = ("kN/cm") -KilonewtonPerMeter = ("kN/m") -KilonewtonPerMillimeter = ("kN/mm") -KilopoundForcePerFoot = ("kipf/ft", "kip/ft", "k/ft") -KilopoundForcePerInch = ("kipf/in", "kip/in", "k/in") -MeganewtonPerCentimeter = ("MN/cm") -MeganewtonPerMeter = ("MN/m") -MeganewtonPerMillimeter = ("MN/mm") -MicronewtonPerCentimeter = ("µN/cm") -MicronewtonPerMeter = ("µN/m") -MicronewtonPerMillimeter = ("µN/mm") -MillinewtonPerCentimeter = ("mN/cm") -MillinewtonPerMeter = ("mN/m") -MillinewtonPerMillimeter = ("mN/mm") -NanonewtonPerCentimeter = ("nN/cm") -NanonewtonPerMeter = ("nN/m") -NanonewtonPerMillimeter = ("nN/mm") -NewtonPerCentimeter = ("N/cm") -NewtonPerMeter = ("N/m") -NewtonPerMillimeter = ("N/mm") -PoundForcePerFoot = ("lbf/ft") -PoundForcePerInch = ("lbf/in") -PoundForcePerYard = ("lbf/yd") -TonneForcePerCentimeter = ("tf/cm") -TonneForcePerMeter = ("tf/m") -TonneForcePerMillimeter = ("tf/mm") +CentinewtonPerCentimeter = "cN/cm" +CentinewtonPerMeter = "cN/m" +CentinewtonPerMillimeter = "cN/mm" +DecanewtonPerCentimeter = "daN/cm" +DecanewtonPerMeter = "daN/m" +DecanewtonPerMillimeter = "daN/mm" +DecinewtonPerCentimeter = "dN/cm" +DecinewtonPerMeter = "dN/m" +DecinewtonPerMillimeter = "dN/mm" +KilogramForcePerCentimeter = "kgf/cm" +KilogramForcePerMeter = "kgf/m" +KilogramForcePerMillimeter = "kgf/mm" +KilonewtonPerCentimeter = "kN/cm" +KilonewtonPerMeter = "kN/m" +KilonewtonPerMillimeter = "kN/mm" +KilopoundForcePerFoot = "kipf/ft","kip/ft","k/ft" +KilopoundForcePerInch = "kipf/in","kip/in","k/in" +MeganewtonPerCentimeter = "MN/cm" +MeganewtonPerMeter = "MN/m" +MeganewtonPerMillimeter = "MN/mm" +MicronewtonPerCentimeter = "µN/cm" +MicronewtonPerMeter = "µN/m" +MicronewtonPerMillimeter = "µN/mm" +MillinewtonPerCentimeter = "mN/cm" +MillinewtonPerMeter = "mN/m" +MillinewtonPerMillimeter = "mN/mm" +NanonewtonPerCentimeter = "nN/cm" +NanonewtonPerMeter = "nN/m" +NanonewtonPerMillimeter = "nN/mm" +NewtonPerCentimeter = "N/cm" +NewtonPerMeter = "N/m" +NewtonPerMillimeter = "N/mm" +PoundForcePerFoot = "lbf/ft" +PoundForcePerInch = "lbf/in" +PoundForcePerYard = "lbf/yd" +TonneForcePerCentimeter = "tf/cm" +TonneForcePerMeter = "tf/m" +TonneForcePerMillimeter = "tf/mm" diff --git a/UnitsNet/GeneratedCode/Resources/ForcePerLength.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/ForcePerLength.ru-RU.restext index f15594863e..09e7974b86 100644 --- a/UnitsNet/GeneratedCode/Resources/ForcePerLength.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/ForcePerLength.ru-RU.restext @@ -1,6 +1,6 @@ -KilogramForcePerCentimeter = ("кгс/см") -KilogramForcePerMeter = ("кгс/м") -KilogramForcePerMillimeter = ("кгс/мм") -TonneForcePerCentimeter = ("тс/см") -TonneForcePerMeter = ("тс/м") -TonneForcePerMillimeter = ("тс/мм") +KilogramForcePerCentimeter = "кгс/см" +KilogramForcePerMeter = "кгс/м" +KilogramForcePerMillimeter = "кгс/мм" +TonneForcePerCentimeter = "тс/см" +TonneForcePerMeter = "тс/м" +TonneForcePerMillimeter = "тс/мм" diff --git a/UnitsNet/GeneratedCode/Resources/Frequency.restext b/UnitsNet/GeneratedCode/Resources/Frequency.restext index 3574cb0de4..4441d14d6e 100644 --- a/UnitsNet/GeneratedCode/Resources/Frequency.restext +++ b/UnitsNet/GeneratedCode/Resources/Frequency.restext @@ -1,13 +1,13 @@ -BeatPerMinute = ("bpm") -BUnit = ("B Units") -CyclePerHour = ("cph") -CyclePerMinute = ("cpm") -Gigahertz = ("GHz") -Hertz = ("Hz") -Kilohertz = ("kHz") -Megahertz = ("MHz") -Microhertz = ("µHz") -Millihertz = ("mHz") -PerSecond = ("s⁻¹") -RadianPerSecond = ("rad/s") -Terahertz = ("THz") +BeatPerMinute = "bpm" +BUnit = "B Units" +CyclePerHour = "cph" +CyclePerMinute = "cpm" +Gigahertz = "GHz" +Hertz = "Hz" +Kilohertz = "kHz" +Megahertz = "MHz" +Microhertz = "µHz" +Millihertz = "mHz" +PerSecond = "s⁻¹" +RadianPerSecond = "rad/s" +Terahertz = "THz" diff --git a/UnitsNet/GeneratedCode/Resources/Frequency.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Frequency.ru-RU.restext index 1f3afedbfb..82c6af4337 100644 --- a/UnitsNet/GeneratedCode/Resources/Frequency.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Frequency.ru-RU.restext @@ -1,9 +1,9 @@ -Gigahertz = ("ГГц") -Hertz = ("Гц") -Kilohertz = ("кГц") -Megahertz = ("МГц") -Microhertz = ("мкГц") -Millihertz = ("мГц") -PerSecond = ("с⁻¹") -RadianPerSecond = ("рад/с") -Terahertz = ("ТГц") +Gigahertz = "ГГц" +Hertz = "Гц" +Kilohertz = "кГц" +Megahertz = "МГц" +Microhertz = "мкГц" +Millihertz = "мГц" +PerSecond = "с⁻¹" +RadianPerSecond = "рад/с" +Terahertz = "ТГц" diff --git a/UnitsNet/GeneratedCode/Resources/FuelEfficiency.restext b/UnitsNet/GeneratedCode/Resources/FuelEfficiency.restext index 6ffec182db..c57ab1b792 100644 --- a/UnitsNet/GeneratedCode/Resources/FuelEfficiency.restext +++ b/UnitsNet/GeneratedCode/Resources/FuelEfficiency.restext @@ -1,4 +1,4 @@ -KilometerPerLiter = ("km/L") -LiterPer100Kilometers = ("L/100km") -MilePerUkGallon = ("mpg (imp.)") -MilePerUsGallon = ("mpg (U.S.)") +KilometerPerLiter = "km/L" +LiterPer100Kilometers = "L/100km" +MilePerUkGallon = "mpg (imp.)" +MilePerUsGallon = "mpg (U.S.)" diff --git a/UnitsNet/GeneratedCode/Resources/HeatFlux.restext b/UnitsNet/GeneratedCode/Resources/HeatFlux.restext index 27ccf3f119..ad1cabb9ef 100644 --- a/UnitsNet/GeneratedCode/Resources/HeatFlux.restext +++ b/UnitsNet/GeneratedCode/Resources/HeatFlux.restext @@ -1,18 +1,18 @@ -BtuPerHourSquareFoot = ("BTU/h·ft²") -BtuPerMinuteSquareFoot = ("BTU/min·ft²") -BtuPerSecondSquareFoot = ("BTU/s·ft²") -BtuPerSecondSquareInch = ("BTU/s·in²") -CaloriePerSecondSquareCentimeter = ("cal/s·cm²") -CentiwattPerSquareMeter = ("cW/m²") -DeciwattPerSquareMeter = ("dW/m²") -KilocaloriePerHourSquareMeter = ("kcal/h·m²") -KilocaloriePerSecondSquareCentimeter = ("kcal/s·cm²") -KilowattPerSquareMeter = ("kW/m²") -MicrowattPerSquareMeter = ("µW/m²") -MilliwattPerSquareMeter = ("mW/m²") -NanowattPerSquareMeter = ("nW/m²") -PoundForcePerFootSecond = ("lbf/(ft·s)") -PoundPerSecondCubed = ("lb/s³", "lbm/s³") -WattPerSquareFoot = ("W/ft²") -WattPerSquareInch = ("W/in²") -WattPerSquareMeter = ("W/m²") +BtuPerHourSquareFoot = "BTU/h·ft²" +BtuPerMinuteSquareFoot = "BTU/min·ft²" +BtuPerSecondSquareFoot = "BTU/s·ft²" +BtuPerSecondSquareInch = "BTU/s·in²" +CaloriePerSecondSquareCentimeter = "cal/s·cm²" +CentiwattPerSquareMeter = "cW/m²" +DeciwattPerSquareMeter = "dW/m²" +KilocaloriePerHourSquareMeter = "kcal/h·m²" +KilocaloriePerSecondSquareCentimeter = "kcal/s·cm²" +KilowattPerSquareMeter = "kW/m²" +MicrowattPerSquareMeter = "µW/m²" +MilliwattPerSquareMeter = "mW/m²" +NanowattPerSquareMeter = "nW/m²" +PoundForcePerFootSecond = "lbf/(ft·s)" +PoundPerSecondCubed = "lb/s³","lbm/s³" +WattPerSquareFoot = "W/ft²" +WattPerSquareInch = "W/in²" +WattPerSquareMeter = "W/m²" diff --git a/UnitsNet/GeneratedCode/Resources/HeatTransferCoefficient.restext b/UnitsNet/GeneratedCode/Resources/HeatTransferCoefficient.restext index 3e7280bade..b0931b1295 100644 --- a/UnitsNet/GeneratedCode/Resources/HeatTransferCoefficient.restext +++ b/UnitsNet/GeneratedCode/Resources/HeatTransferCoefficient.restext @@ -1,6 +1,6 @@ -BtuPerHourSquareFootDegreeFahrenheit = ("Btu/h·ft²·°F", "Btu/ft²·h·°F", "Btu/hr·ft²·°F", "Btu/ft²·hr·°F") -BtuPerSquareFootDegreeFahrenheit = ("Btu/ft²·°F") -CaloriePerHourSquareMeterDegreeCelsius = ("kcal/h·m²·°C", "kcal/m²·h·°C", "kcal/hr·m²·°C", "kcal/m²·hr·°C") -KilocaloriePerHourSquareMeterDegreeCelsius = ("kkcal/h·m²·°C", "kkcal/m²·h·°C", "kkcal/hr·m²·°C", "kkcal/m²·hr·°C") -WattPerSquareMeterCelsius = ("W/m²·°C") -WattPerSquareMeterKelvin = ("W/m²·K") +BtuPerHourSquareFootDegreeFahrenheit = "Btu/h·ft²·°F","Btu/ft²·h·°F","Btu/hr·ft²·°F","Btu/ft²·hr·°F" +BtuPerSquareFootDegreeFahrenheit = "Btu/ft²·°F" +CaloriePerHourSquareMeterDegreeCelsius = "kcal/h·m²·°C","kcal/m²·h·°C","kcal/hr·m²·°C","kcal/m²·hr·°C" +KilocaloriePerHourSquareMeterDegreeCelsius = "kkcal/h·m²·°C","kkcal/m²·h·°C","kkcal/hr·m²·°C","kkcal/m²·hr·°C" +WattPerSquareMeterCelsius = "W/m²·°C" +WattPerSquareMeterKelvin = "W/m²·K" diff --git a/UnitsNet/GeneratedCode/Resources/Illuminance.restext b/UnitsNet/GeneratedCode/Resources/Illuminance.restext index 49970097e4..4cb1b926d2 100644 --- a/UnitsNet/GeneratedCode/Resources/Illuminance.restext +++ b/UnitsNet/GeneratedCode/Resources/Illuminance.restext @@ -1,4 +1,4 @@ -Kilolux = ("klx") -Lux = ("lx") -Megalux = ("Mlx") -Millilux = ("mlx") +Kilolux = "klx" +Lux = "lx" +Megalux = "Mlx" +Millilux = "mlx" diff --git a/UnitsNet/GeneratedCode/Resources/Impulse.restext b/UnitsNet/GeneratedCode/Resources/Impulse.restext index 0f853df9da..1459e4ae37 100644 --- a/UnitsNet/GeneratedCode/Resources/Impulse.restext +++ b/UnitsNet/GeneratedCode/Resources/Impulse.restext @@ -1,13 +1,13 @@ -CentinewtonSecond = ("cN·s") -DecanewtonSecond = ("daN·s") -DecinewtonSecond = ("dN·s") -KilogramMeterPerSecond = ("kg·m/s") -KilonewtonSecond = ("kN·s") -MeganewtonSecond = ("MN·s") -MicronewtonSecond = ("µN·s") -MillinewtonSecond = ("mN·s") -NanonewtonSecond = ("nN·s") -NewtonSecond = ("N·s") -PoundFootPerSecond = ("lb·ft/s") -PoundForceSecond = ("lbf·s") -SlugFootPerSecond = ("slug·ft/s") +CentinewtonSecond = "cN·s" +DecanewtonSecond = "daN·s" +DecinewtonSecond = "dN·s" +KilogramMeterPerSecond = "kg·m/s" +KilonewtonSecond = "kN·s" +MeganewtonSecond = "MN·s" +MicronewtonSecond = "µN·s" +MillinewtonSecond = "mN·s" +NanonewtonSecond = "nN·s" +NewtonSecond = "N·s" +PoundFootPerSecond = "lb·ft/s" +PoundForceSecond = "lbf·s" +SlugFootPerSecond = "slug·ft/s" diff --git a/UnitsNet/GeneratedCode/Resources/Information.restext b/UnitsNet/GeneratedCode/Resources/Information.restext index ca7939a90a..f36878ee2f 100644 --- a/UnitsNet/GeneratedCode/Resources/Information.restext +++ b/UnitsNet/GeneratedCode/Resources/Information.restext @@ -1,26 +1,26 @@ -Bit = ("b") -Byte = ("B") -Exabit = ("Eb") -Exabyte = ("EB") -Exbibit = ("Eib") -Exbibyte = ("EiB") -Gibibit = ("Gib") -Gibibyte = ("GiB") -Gigabit = ("Gb") -Gigabyte = ("GB") -Kibibit = ("Kib") -Kibibyte = ("KiB") -Kilobit = ("kb") -Kilobyte = ("kB") -Mebibit = ("Mib") -Mebibyte = ("MiB") -Megabit = ("Mb") -Megabyte = ("MB") -Pebibit = ("Pib") -Pebibyte = ("PiB") -Petabit = ("Pb") -Petabyte = ("PB") -Tebibit = ("Tib") -Tebibyte = ("TiB") -Terabit = ("Tb") -Terabyte = ("TB") +Bit = "b" +Byte = "B" +Exabit = "Eb" +Exabyte = "EB" +Exbibit = "Eib" +Exbibyte = "EiB" +Gibibit = "Gib" +Gibibyte = "GiB" +Gigabit = "Gb" +Gigabyte = "GB" +Kibibit = "Kib" +Kibibyte = "KiB" +Kilobit = "kb" +Kilobyte = "kB" +Mebibit = "Mib" +Mebibyte = "MiB" +Megabit = "Mb" +Megabyte = "MB" +Pebibit = "Pib" +Pebibyte = "PiB" +Petabit = "Pb" +Petabyte = "PB" +Tebibit = "Tib" +Tebibyte = "TiB" +Terabit = "Tb" +Terabyte = "TB" diff --git a/UnitsNet/GeneratedCode/Resources/Irradiance.restext b/UnitsNet/GeneratedCode/Resources/Irradiance.restext index 52e42eb2d7..48ae8af783 100644 --- a/UnitsNet/GeneratedCode/Resources/Irradiance.restext +++ b/UnitsNet/GeneratedCode/Resources/Irradiance.restext @@ -1,14 +1,14 @@ -KilowattPerSquareCentimeter = ("kW/cm²") -KilowattPerSquareMeter = ("kW/m²") -MegawattPerSquareCentimeter = ("MW/cm²") -MegawattPerSquareMeter = ("MW/m²") -MicrowattPerSquareCentimeter = ("µW/cm²") -MicrowattPerSquareMeter = ("µW/m²") -MilliwattPerSquareCentimeter = ("mW/cm²") -MilliwattPerSquareMeter = ("mW/m²") -NanowattPerSquareCentimeter = ("nW/cm²") -NanowattPerSquareMeter = ("nW/m²") -PicowattPerSquareCentimeter = ("pW/cm²") -PicowattPerSquareMeter = ("pW/m²") -WattPerSquareCentimeter = ("W/cm²") -WattPerSquareMeter = ("W/m²") +KilowattPerSquareCentimeter = "kW/cm²" +KilowattPerSquareMeter = "kW/m²" +MegawattPerSquareCentimeter = "MW/cm²" +MegawattPerSquareMeter = "MW/m²" +MicrowattPerSquareCentimeter = "µW/cm²" +MicrowattPerSquareMeter = "µW/m²" +MilliwattPerSquareCentimeter = "mW/cm²" +MilliwattPerSquareMeter = "mW/m²" +NanowattPerSquareCentimeter = "nW/cm²" +NanowattPerSquareMeter = "nW/m²" +PicowattPerSquareCentimeter = "pW/cm²" +PicowattPerSquareMeter = "pW/m²" +WattPerSquareCentimeter = "W/cm²" +WattPerSquareMeter = "W/m²" diff --git a/UnitsNet/GeneratedCode/Resources/Irradiation.restext b/UnitsNet/GeneratedCode/Resources/Irradiation.restext index b57331b8c9..e7ffb9c0df 100644 --- a/UnitsNet/GeneratedCode/Resources/Irradiation.restext +++ b/UnitsNet/GeneratedCode/Resources/Irradiation.restext @@ -1,7 +1,7 @@ -JoulePerSquareCentimeter = ("J/cm²") -JoulePerSquareMeter = ("J/m²") -JoulePerSquareMillimeter = ("J/mm²") -KilojoulePerSquareMeter = ("kJ/m²") -KilowattHourPerSquareMeter = ("kWh/m²") -MillijoulePerSquareCentimeter = ("mJ/cm²") -WattHourPerSquareMeter = ("Wh/m²") +JoulePerSquareCentimeter = "J/cm²" +JoulePerSquareMeter = "J/m²" +JoulePerSquareMillimeter = "J/mm²" +KilojoulePerSquareMeter = "kJ/m²" +KilowattHourPerSquareMeter = "kWh/m²" +MillijoulePerSquareCentimeter = "mJ/cm²" +WattHourPerSquareMeter = "Wh/m²" diff --git a/UnitsNet/GeneratedCode/Resources/Jerk.restext b/UnitsNet/GeneratedCode/Resources/Jerk.restext index 614e8bb0c9..431e65dcf1 100644 --- a/UnitsNet/GeneratedCode/Resources/Jerk.restext +++ b/UnitsNet/GeneratedCode/Resources/Jerk.restext @@ -1,11 +1,11 @@ -CentimeterPerSecondCubed = ("cm/s³") -DecimeterPerSecondCubed = ("dm/s³") -FootPerSecondCubed = ("ft/s³") -InchPerSecondCubed = ("in/s³") -KilometerPerSecondCubed = ("km/s³") -MeterPerSecondCubed = ("m/s³") -MicrometerPerSecondCubed = ("µm/s³") -MillimeterPerSecondCubed = ("mm/s³") -MillistandardGravitiesPerSecond = ("mg/s") -NanometerPerSecondCubed = ("nm/s³") -StandardGravitiesPerSecond = ("g/s") +CentimeterPerSecondCubed = "cm/s³" +DecimeterPerSecondCubed = "dm/s³" +FootPerSecondCubed = "ft/s³" +InchPerSecondCubed = "in/s³" +KilometerPerSecondCubed = "km/s³" +MeterPerSecondCubed = "m/s³" +MicrometerPerSecondCubed = "µm/s³" +MillimeterPerSecondCubed = "mm/s³" +MillistandardGravitiesPerSecond = "mg/s" +NanometerPerSecondCubed = "nm/s³" +StandardGravitiesPerSecond = "g/s" diff --git a/UnitsNet/GeneratedCode/Resources/Jerk.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Jerk.ru-RU.restext index ca3874046c..fe3d32358d 100644 --- a/UnitsNet/GeneratedCode/Resources/Jerk.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Jerk.ru-RU.restext @@ -1,11 +1,11 @@ -CentimeterPerSecondCubed = ("см/с³") -DecimeterPerSecondCubed = ("дм/с³") -FootPerSecondCubed = ("фут/с³") -InchPerSecondCubed = ("дюйм/с³") -KilometerPerSecondCubed = ("км/с³") -MeterPerSecondCubed = ("м/с³") -MicrometerPerSecondCubed = ("мкм/с³") -MillimeterPerSecondCubed = ("мм/с³") -MillistandardGravitiesPerSecond = ("мg/s") -NanometerPerSecondCubed = ("нм/с³") -StandardGravitiesPerSecond = ("g/s") +CentimeterPerSecondCubed = "см/с³" +DecimeterPerSecondCubed = "дм/с³" +FootPerSecondCubed = "фут/с³" +InchPerSecondCubed = "дюйм/с³" +KilometerPerSecondCubed = "км/с³" +MeterPerSecondCubed = "м/с³" +MicrometerPerSecondCubed = "мкм/с³" +MillimeterPerSecondCubed = "мм/с³" +MillistandardGravitiesPerSecond = "мg/s" +NanometerPerSecondCubed = "нм/с³" +StandardGravitiesPerSecond = "g/s" diff --git a/UnitsNet/GeneratedCode/Resources/KinematicViscosity.restext b/UnitsNet/GeneratedCode/Resources/KinematicViscosity.restext index 9fd1f6e562..d893a20051 100644 --- a/UnitsNet/GeneratedCode/Resources/KinematicViscosity.restext +++ b/UnitsNet/GeneratedCode/Resources/KinematicViscosity.restext @@ -1,9 +1,9 @@ -Centistokes = ("cSt") -Decistokes = ("dSt") -Kilostokes = ("kSt") -Microstokes = ("µSt") -Millistokes = ("mSt") -Nanostokes = ("nSt") -SquareFootPerSecond = ("ft²/s") -SquareMeterPerSecond = ("m²/s") -Stokes = ("St") +Centistokes = "cSt" +Decistokes = "dSt" +Kilostokes = "kSt" +Microstokes = "µSt" +Millistokes = "mSt" +Nanostokes = "nSt" +SquareFootPerSecond = "ft²/s" +SquareMeterPerSecond = "m²/s" +Stokes = "St" diff --git a/UnitsNet/GeneratedCode/Resources/KinematicViscosity.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/KinematicViscosity.ru-RU.restext index 568ca283b8..3133a11b45 100644 --- a/UnitsNet/GeneratedCode/Resources/KinematicViscosity.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/KinematicViscosity.ru-RU.restext @@ -1,8 +1,8 @@ -Centistokes = ("сСт") -Decistokes = ("дСт") -Kilostokes = ("кСт") -Microstokes = ("мкСт") -Millistokes = ("мСт") -Nanostokes = ("нСт") -SquareMeterPerSecond = ("м²/с") -Stokes = ("Ст") +Centistokes = "сСт" +Decistokes = "дСт" +Kilostokes = "кСт" +Microstokes = "мкСт" +Millistokes = "мСт" +Nanostokes = "нСт" +SquareMeterPerSecond = "м²/с" +Stokes = "Ст" diff --git a/UnitsNet/GeneratedCode/Resources/Length.restext b/UnitsNet/GeneratedCode/Resources/Length.restext index 03b9a9c209..9f812d14a2 100644 --- a/UnitsNet/GeneratedCode/Resources/Length.restext +++ b/UnitsNet/GeneratedCode/Resources/Length.restext @@ -1,36 +1,36 @@ -Angstrom = ("Å", "A") -AstronomicalUnit = ("au", "ua") -Centimeter = ("cm") -Chain = ("ch") -DataMile = ("DM") -Decameter = ("dam") -Decimeter = ("dm") -DtpPica = ("pica") -DtpPoint = ("pt") -Fathom = ("fathom") -Foot = ("ft", "'", "′") -Hand = ("h", "hh") -Hectometer = ("hm") -Inch = ("in", "\"", "″") -KilolightYear = ("kly") -Kilometer = ("km") -Kiloparsec = ("kpc") -LightYear = ("ly") -MegalightYear = ("Mly") -Megaparsec = ("Mpc") -Meter = ("m") -Microinch = ("µin") -Micrometer = ("µm") -Mil = ("mil") -Mile = ("mi") -Millimeter = ("mm") -Nanometer = ("nm") -NauticalMile = ("NM") -Parsec = ("pc") -PrinterPica = ("pica") -PrinterPoint = ("pt") -Shackle = ("shackle") -SolarRadius = ("R⊙") -Twip = ("twip") -UsSurveyFoot = ("ftUS") -Yard = ("yd") +Angstrom = "Å","A" +AstronomicalUnit = "au","ua" +Centimeter = "cm" +Chain = "ch" +DataMile = "DM" +Decameter = "dam" +Decimeter = "dm" +DtpPica = "pica" +DtpPoint = "pt" +Fathom = "fathom" +Foot = "ft","'","′" +Hand = "h","hh" +Hectometer = "hm" +Inch = "in","\"","″" +KilolightYear = "kly" +Kilometer = "km" +Kiloparsec = "kpc" +LightYear = "ly" +MegalightYear = "Mly" +Megaparsec = "Mpc" +Meter = "m" +Microinch = "µin" +Micrometer = "µm" +Mil = "mil" +Mile = "mi" +Millimeter = "mm" +Nanometer = "nm" +NauticalMile = "NM" +Parsec = "pc" +PrinterPica = "pica" +PrinterPoint = "pt" +Shackle = "shackle" +SolarRadius = "R⊙" +Twip = "twip" +UsSurveyFoot = "ftUS" +Yard = "yd" diff --git a/UnitsNet/GeneratedCode/Resources/Length.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Length.ru-RU.restext index 3e0665af5e..da1bd75610 100644 --- a/UnitsNet/GeneratedCode/Resources/Length.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Length.ru-RU.restext @@ -1,16 +1,16 @@ -Centimeter = ("см") -Decameter = ("дам") -Decimeter = ("дм") -Foot = ("фут") -Hectometer = ("гм") -Inch = ("дюйм") -Kilometer = ("км") -Meter = ("м") -Microinch = ("микродюйм") -Micrometer = ("мкм") -Mil = ("мил") -Mile = ("миля") -Millimeter = ("мм") -Nanometer = ("нм") -NauticalMile = ("мил") -Yard = ("ярд") +Centimeter = "см" +Decameter = "дам" +Decimeter = "дм" +Foot = "фут" +Hectometer = "гм" +Inch = "дюйм" +Kilometer = "км" +Meter = "м" +Microinch = "микродюйм" +Micrometer = "мкм" +Mil = "мил" +Mile = "миля" +Millimeter = "мм" +Nanometer = "нм" +NauticalMile = "мил" +Yard = "ярд" diff --git a/UnitsNet/GeneratedCode/Resources/Length.zh-CN.restext b/UnitsNet/GeneratedCode/Resources/Length.zh-CN.restext index 37e1df9757..02c3e4e3cb 100644 --- a/UnitsNet/GeneratedCode/Resources/Length.zh-CN.restext +++ b/UnitsNet/GeneratedCode/Resources/Length.zh-CN.restext @@ -1,16 +1,16 @@ -Centimeter = ("厘米") -Decameter = ("十米") -Decimeter = ("分米") -Foot = ("英尺") -Hectometer = ("百米") -Inch = ("英寸") -Kilometer = ("千米") -Meter = ("米") -Microinch = ("微英寸") -Micrometer = ("微米") -Mil = ("密耳") -Mile = ("英里") -Millimeter = ("毫米") -Nanometer = ("纳米") -NauticalMile = ("纳米") -Yard = ("码") +Centimeter = "厘米" +Decameter = "十米" +Decimeter = "分米" +Foot = "英尺" +Hectometer = "百米" +Inch = "英寸" +Kilometer = "千米" +Meter = "米" +Microinch = "微英寸" +Micrometer = "微米" +Mil = "密耳" +Mile = "英里" +Millimeter = "毫米" +Nanometer = "纳米" +NauticalMile = "纳米" +Yard = "码" diff --git a/UnitsNet/GeneratedCode/Resources/Level.restext b/UnitsNet/GeneratedCode/Resources/Level.restext index 2fe4486c1c..95f9b60367 100644 --- a/UnitsNet/GeneratedCode/Resources/Level.restext +++ b/UnitsNet/GeneratedCode/Resources/Level.restext @@ -1,2 +1,2 @@ -Decibel = ("dB") -Neper = ("Np") +Decibel = "dB" +Neper = "Np" diff --git a/UnitsNet/GeneratedCode/Resources/LinearDensity.restext b/UnitsNet/GeneratedCode/Resources/LinearDensity.restext index 07e137b834..84c504ba31 100644 --- a/UnitsNet/GeneratedCode/Resources/LinearDensity.restext +++ b/UnitsNet/GeneratedCode/Resources/LinearDensity.restext @@ -1,14 +1,14 @@ -GramPerCentimeter = ("g/cm") -GramPerMeter = ("g/m") -GramPerMillimeter = ("g/mm") -KilogramPerCentimeter = ("kg/cm") -KilogramPerMeter = ("kg/m") -KilogramPerMillimeter = ("kg/mm") -MicrogramPerCentimeter = ("µg/cm") -MicrogramPerMeter = ("µg/m") -MicrogramPerMillimeter = ("µg/mm") -MilligramPerCentimeter = ("mg/cm") -MilligramPerMeter = ("mg/m") -MilligramPerMillimeter = ("mg/mm") -PoundPerFoot = ("lb/ft") -PoundPerInch = ("lb/in") +GramPerCentimeter = "g/cm" +GramPerMeter = "g/m" +GramPerMillimeter = "g/mm" +KilogramPerCentimeter = "kg/cm" +KilogramPerMeter = "kg/m" +KilogramPerMillimeter = "kg/mm" +MicrogramPerCentimeter = "µg/cm" +MicrogramPerMeter = "µg/m" +MicrogramPerMillimeter = "µg/mm" +MilligramPerCentimeter = "mg/cm" +MilligramPerMeter = "mg/m" +MilligramPerMillimeter = "mg/mm" +PoundPerFoot = "lb/ft" +PoundPerInch = "lb/in" diff --git a/UnitsNet/GeneratedCode/Resources/LinearPowerDensity.restext b/UnitsNet/GeneratedCode/Resources/LinearPowerDensity.restext index 734787cab0..4ca0387f1f 100644 --- a/UnitsNet/GeneratedCode/Resources/LinearPowerDensity.restext +++ b/UnitsNet/GeneratedCode/Resources/LinearPowerDensity.restext @@ -1,25 +1,25 @@ -GigawattPerCentimeter = ("GW/cm") -GigawattPerFoot = ("GW/ft") -GigawattPerInch = ("GW/in") -GigawattPerMeter = ("GW/m") -GigawattPerMillimeter = ("GW/mm") -KilowattPerCentimeter = ("kW/cm") -KilowattPerFoot = ("kW/ft") -KilowattPerInch = ("kW/in") -KilowattPerMeter = ("kW/m") -KilowattPerMillimeter = ("kW/mm") -MegawattPerCentimeter = ("MW/cm") -MegawattPerFoot = ("MW/ft") -MegawattPerInch = ("MW/in") -MegawattPerMeter = ("MW/m") -MegawattPerMillimeter = ("MW/mm") -MilliwattPerCentimeter = ("mW/cm") -MilliwattPerFoot = ("mW/ft") -MilliwattPerInch = ("mW/in") -MilliwattPerMeter = ("mW/m") -MilliwattPerMillimeter = ("mW/mm") -WattPerCentimeter = ("W/cm") -WattPerFoot = ("W/ft") -WattPerInch = ("W/in") -WattPerMeter = ("W/m") -WattPerMillimeter = ("W/mm") +GigawattPerCentimeter = "GW/cm" +GigawattPerFoot = "GW/ft" +GigawattPerInch = "GW/in" +GigawattPerMeter = "GW/m" +GigawattPerMillimeter = "GW/mm" +KilowattPerCentimeter = "kW/cm" +KilowattPerFoot = "kW/ft" +KilowattPerInch = "kW/in" +KilowattPerMeter = "kW/m" +KilowattPerMillimeter = "kW/mm" +MegawattPerCentimeter = "MW/cm" +MegawattPerFoot = "MW/ft" +MegawattPerInch = "MW/in" +MegawattPerMeter = "MW/m" +MegawattPerMillimeter = "MW/mm" +MilliwattPerCentimeter = "mW/cm" +MilliwattPerFoot = "mW/ft" +MilliwattPerInch = "mW/in" +MilliwattPerMeter = "mW/m" +MilliwattPerMillimeter = "mW/mm" +WattPerCentimeter = "W/cm" +WattPerFoot = "W/ft" +WattPerInch = "W/in" +WattPerMeter = "W/m" +WattPerMillimeter = "W/mm" diff --git a/UnitsNet/GeneratedCode/Resources/Luminance.restext b/UnitsNet/GeneratedCode/Resources/Luminance.restext index a107746ca0..83293ea9e2 100644 --- a/UnitsNet/GeneratedCode/Resources/Luminance.restext +++ b/UnitsNet/GeneratedCode/Resources/Luminance.restext @@ -1,10 +1,10 @@ -CandelaPerSquareFoot = ("Cd/ft²") -CandelaPerSquareInch = ("Cd/in²") -CandelaPerSquareMeter = ("Cd/m²") -CenticandelaPerSquareMeter = ("cCd/m²") -DecicandelaPerSquareMeter = ("dCd/m²") -KilocandelaPerSquareMeter = ("kCd/m²") -MicrocandelaPerSquareMeter = ("µCd/m²") -MillicandelaPerSquareMeter = ("mCd/m²") -NanocandelaPerSquareMeter = ("nCd/m²") -Nit = ("nt") +CandelaPerSquareFoot = "Cd/ft²" +CandelaPerSquareInch = "Cd/in²" +CandelaPerSquareMeter = "Cd/m²" +CenticandelaPerSquareMeter = "cCd/m²" +DecicandelaPerSquareMeter = "dCd/m²" +KilocandelaPerSquareMeter = "kCd/m²" +MicrocandelaPerSquareMeter = "µCd/m²" +MillicandelaPerSquareMeter = "mCd/m²" +NanocandelaPerSquareMeter = "nCd/m²" +Nit = "nt" diff --git a/UnitsNet/GeneratedCode/Resources/Luminosity.restext b/UnitsNet/GeneratedCode/Resources/Luminosity.restext index 703791ac0e..cb9e9db383 100644 --- a/UnitsNet/GeneratedCode/Resources/Luminosity.restext +++ b/UnitsNet/GeneratedCode/Resources/Luminosity.restext @@ -1,14 +1,14 @@ -Decawatt = ("daW") -Deciwatt = ("dW") -Femtowatt = ("fW") -Gigawatt = ("GW") -Kilowatt = ("kW") -Megawatt = ("MW") -Microwatt = ("µW") -Milliwatt = ("mW") -Nanowatt = ("nW") -Petawatt = ("PW") -Picowatt = ("pW") -SolarLuminosity = ("L⊙") -Terawatt = ("TW") -Watt = ("W") +Decawatt = "daW" +Deciwatt = "dW" +Femtowatt = "fW" +Gigawatt = "GW" +Kilowatt = "kW" +Megawatt = "MW" +Microwatt = "µW" +Milliwatt = "mW" +Nanowatt = "nW" +Petawatt = "PW" +Picowatt = "pW" +SolarLuminosity = "L⊙" +Terawatt = "TW" +Watt = "W" diff --git a/UnitsNet/GeneratedCode/Resources/LuminousFlux.restext b/UnitsNet/GeneratedCode/Resources/LuminousFlux.restext index c9e35bb8fb..5d4d12e24e 100644 --- a/UnitsNet/GeneratedCode/Resources/LuminousFlux.restext +++ b/UnitsNet/GeneratedCode/Resources/LuminousFlux.restext @@ -1 +1 @@ -Lumen = ("lm") +Lumen = "lm" diff --git a/UnitsNet/GeneratedCode/Resources/LuminousIntensity.restext b/UnitsNet/GeneratedCode/Resources/LuminousIntensity.restext index df752e8c36..db280a3398 100644 --- a/UnitsNet/GeneratedCode/Resources/LuminousIntensity.restext +++ b/UnitsNet/GeneratedCode/Resources/LuminousIntensity.restext @@ -1 +1 @@ -Candela = ("cd") +Candela = "cd" diff --git a/UnitsNet/GeneratedCode/Resources/MagneticField.restext b/UnitsNet/GeneratedCode/Resources/MagneticField.restext index 1b0f26da50..e2a58f1fa1 100644 --- a/UnitsNet/GeneratedCode/Resources/MagneticField.restext +++ b/UnitsNet/GeneratedCode/Resources/MagneticField.restext @@ -1,6 +1,6 @@ -Gauss = ("G") -Microtesla = ("µT") -Milligauss = ("mG") -Millitesla = ("mT") -Nanotesla = ("nT") -Tesla = ("T") +Gauss = "G" +Microtesla = "µT" +Milligauss = "mG" +Millitesla = "mT" +Nanotesla = "nT" +Tesla = "T" diff --git a/UnitsNet/GeneratedCode/Resources/MagneticFlux.restext b/UnitsNet/GeneratedCode/Resources/MagneticFlux.restext index cf9400d33c..227c27c825 100644 --- a/UnitsNet/GeneratedCode/Resources/MagneticFlux.restext +++ b/UnitsNet/GeneratedCode/Resources/MagneticFlux.restext @@ -1 +1 @@ -Weber = ("Wb") +Weber = "Wb" diff --git a/UnitsNet/GeneratedCode/Resources/Magnetization.restext b/UnitsNet/GeneratedCode/Resources/Magnetization.restext index 4512d68141..fcbe7218f5 100644 --- a/UnitsNet/GeneratedCode/Resources/Magnetization.restext +++ b/UnitsNet/GeneratedCode/Resources/Magnetization.restext @@ -1 +1 @@ -AmperePerMeter = ("A/m") +AmperePerMeter = "A/m" diff --git a/UnitsNet/GeneratedCode/Resources/Mass.restext b/UnitsNet/GeneratedCode/Resources/Mass.restext index e94c332a57..e1815d5ffc 100644 --- a/UnitsNet/GeneratedCode/Resources/Mass.restext +++ b/UnitsNet/GeneratedCode/Resources/Mass.restext @@ -1,25 +1,25 @@ -Centigram = ("cg") -Decagram = ("dag") -Decigram = ("dg") -EarthMass = ("em") -Grain = ("gr") -Gram = ("g") -Hectogram = ("hg") -Kilogram = ("kg") -Kilopound = ("klb", "klbs", "klbm") -Kilotonne = ("kt") -LongHundredweight = ("cwt") -LongTon = ("long tn") -Megapound = ("Mlb", "Mlbs", "Mlbm") -Megatonne = ("Mt") -Microgram = ("µg") -Milligram = ("mg") -Nanogram = ("ng") -Ounce = ("oz") -Pound = ("lb", "lbs", "lbm") -ShortHundredweight = ("cwt") -ShortTon = ("t (short)", "short tn", "ST") -Slug = ("slug") -SolarMass = ("M☉", "M⊙") -Stone = ("st") -Tonne = ("t") +Centigram = "cg" +Decagram = "dag" +Decigram = "dg" +EarthMass = "em" +Grain = "gr" +Gram = "g" +Hectogram = "hg" +Kilogram = "kg" +Kilopound = "klb","klbs","klbm" +Kilotonne = "kt" +LongHundredweight = "cwt" +LongTon = "long tn" +Megapound = "Mlb","Mlbs","Mlbm" +Megatonne = "Mt" +Microgram = "µg" +Milligram = "mg" +Nanogram = "ng" +Ounce = "oz" +Pound = "lb","lbs","lbm" +ShortHundredweight = "cwt" +ShortTon = "t (short)","short tn","ST" +Slug = "slug" +SolarMass = "M☉","M⊙" +Stone = "st" +Tonne = "t" diff --git a/UnitsNet/GeneratedCode/Resources/Mass.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Mass.ru-RU.restext index 0e5e0c862c..bc99321053 100644 --- a/UnitsNet/GeneratedCode/Resources/Mass.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Mass.ru-RU.restext @@ -1,17 +1,17 @@ -Centigram = ("сг") -Decagram = ("даг") -Decigram = ("дг") -Gram = ("г") -Hectogram = ("гг") -Kilogram = ("кг") -Kilopound = ("кфунт") -Kilotonne = ("кт") -LongTon = ("тонна большая") -Megapound = ("Мфунт") -Megatonne = ("Мт") -Microgram = ("мкг") -Milligram = ("мг") -Nanogram = ("нг") -Pound = ("фунт") -ShortTon = ("тонна малая") -Tonne = ("т") +Centigram = "сг" +Decagram = "даг" +Decigram = "дг" +Gram = "г" +Hectogram = "гг" +Kilogram = "кг" +Kilopound = "кфунт" +Kilotonne = "кт" +LongTon = "тонна большая" +Megapound = "Мфунт" +Megatonne = "Мт" +Microgram = "мкг" +Milligram = "мг" +Nanogram = "нг" +Pound = "фунт" +ShortTon = "тонна малая" +Tonne = "т" diff --git a/UnitsNet/GeneratedCode/Resources/Mass.zh-CN.restext b/UnitsNet/GeneratedCode/Resources/Mass.zh-CN.restext index d67fd83123..5ca42aaa5b 100644 --- a/UnitsNet/GeneratedCode/Resources/Mass.zh-CN.restext +++ b/UnitsNet/GeneratedCode/Resources/Mass.zh-CN.restext @@ -1,18 +1,18 @@ -Centigram = ("厘克") -Decagram = ("十克") -Decigram = ("分克") -Gram = ("克") -Hectogram = ("百克") -Kilogram = ("千克") -Kilopound = ("千磅") -Kilotonne = ("千吨") -LongTon = ("长吨") -Megapound = ("兆磅") -Megatonne = ("兆吨") -Microgram = ("微克") -Milligram = ("毫克") -Nanogram = ("纳克") -Ounce = ("盎司") -Pound = ("磅") -ShortTon = ("短吨") -Tonne = ("吨") +Centigram = "厘克" +Decagram = "十克" +Decigram = "分克" +Gram = "克" +Hectogram = "百克" +Kilogram = "千克" +Kilopound = "千磅" +Kilotonne = "千吨" +LongTon = "长吨" +Megapound = "兆磅" +Megatonne = "兆吨" +Microgram = "微克" +Milligram = "毫克" +Nanogram = "纳克" +Ounce = "盎司" +Pound = "磅" +ShortTon = "短吨" +Tonne = "吨" diff --git a/UnitsNet/GeneratedCode/Resources/MassConcentration.restext b/UnitsNet/GeneratedCode/Resources/MassConcentration.restext index 132d30b09e..07a7f1dbcf 100644 --- a/UnitsNet/GeneratedCode/Resources/MassConcentration.restext +++ b/UnitsNet/GeneratedCode/Resources/MassConcentration.restext @@ -1,49 +1,49 @@ -CentigramPerDeciliter = ("cg/dL") -CentigramPerLiter = ("cg/L") -CentigramPerMicroliter = ("cg/μL") -CentigramPerMilliliter = ("cg/mL") -DecigramPerDeciliter = ("dg/dL") -DecigramPerLiter = ("dg/L") -DecigramPerMicroliter = ("dg/μL") -DecigramPerMilliliter = ("dg/mL") -GramPerCubicCentimeter = ("g/cm³") -GramPerCubicMeter = ("g/m³") -GramPerCubicMillimeter = ("g/mm³") -GramPerDeciliter = ("g/dL") -GramPerLiter = ("g/L") -GramPerMicroliter = ("g/μL") -GramPerMilliliter = ("g/mL") -KilogramPerCubicCentimeter = ("kg/cm³") -KilogramPerCubicMeter = ("kg/m³") -KilogramPerCubicMillimeter = ("kg/mm³") -KilogramPerLiter = ("kg/L") -KilopoundPerCubicFoot = ("kip/ft³") -KilopoundPerCubicInch = ("kip/in³") -MicrogramPerCubicMeter = ("µg/m³") -MicrogramPerDeciliter = ("µg/dL") -MicrogramPerLiter = ("µg/L") -MicrogramPerMicroliter = ("µg/μL") -MicrogramPerMilliliter = ("µg/mL") -MilligramPerCubicMeter = ("mg/m³") -MilligramPerDeciliter = ("mg/dL") -MilligramPerLiter = ("mg/L") -MilligramPerMicroliter = ("mg/μL") -MilligramPerMilliliter = ("mg/mL") -NanogramPerDeciliter = ("ng/dL") -NanogramPerLiter = ("ng/L") -NanogramPerMicroliter = ("ng/μL") -NanogramPerMilliliter = ("ng/mL") -OuncePerImperialGallon = ("oz/gal (imp.)") -OuncePerUSGallon = ("oz/gal (U.S.)") -PicogramPerDeciliter = ("pg/dL") -PicogramPerLiter = ("pg/L") -PicogramPerMicroliter = ("pg/μL") -PicogramPerMilliliter = ("pg/mL") -PoundPerCubicFoot = ("lb/ft³") -PoundPerCubicInch = ("lb/in³") -PoundPerImperialGallon = ("ppg (imp.)") -PoundPerUSGallon = ("ppg (U.S.)") -SlugPerCubicFoot = ("slug/ft³") -TonnePerCubicCentimeter = ("t/cm³") -TonnePerCubicMeter = ("t/m³") -TonnePerCubicMillimeter = ("t/mm³") +CentigramPerDeciliter = "cg/dL" +CentigramPerLiter = "cg/L" +CentigramPerMicroliter = "cg/μL" +CentigramPerMilliliter = "cg/mL" +DecigramPerDeciliter = "dg/dL" +DecigramPerLiter = "dg/L" +DecigramPerMicroliter = "dg/μL" +DecigramPerMilliliter = "dg/mL" +GramPerCubicCentimeter = "g/cm³" +GramPerCubicMeter = "g/m³" +GramPerCubicMillimeter = "g/mm³" +GramPerDeciliter = "g/dL" +GramPerLiter = "g/L" +GramPerMicroliter = "g/μL" +GramPerMilliliter = "g/mL" +KilogramPerCubicCentimeter = "kg/cm³" +KilogramPerCubicMeter = "kg/m³" +KilogramPerCubicMillimeter = "kg/mm³" +KilogramPerLiter = "kg/L" +KilopoundPerCubicFoot = "kip/ft³" +KilopoundPerCubicInch = "kip/in³" +MicrogramPerCubicMeter = "µg/m³" +MicrogramPerDeciliter = "µg/dL" +MicrogramPerLiter = "µg/L" +MicrogramPerMicroliter = "µg/μL" +MicrogramPerMilliliter = "µg/mL" +MilligramPerCubicMeter = "mg/m³" +MilligramPerDeciliter = "mg/dL" +MilligramPerLiter = "mg/L" +MilligramPerMicroliter = "mg/μL" +MilligramPerMilliliter = "mg/mL" +NanogramPerDeciliter = "ng/dL" +NanogramPerLiter = "ng/L" +NanogramPerMicroliter = "ng/μL" +NanogramPerMilliliter = "ng/mL" +OuncePerImperialGallon = "oz/gal (imp.)" +OuncePerUSGallon = "oz/gal (U.S.)" +PicogramPerDeciliter = "pg/dL" +PicogramPerLiter = "pg/L" +PicogramPerMicroliter = "pg/μL" +PicogramPerMilliliter = "pg/mL" +PoundPerCubicFoot = "lb/ft³" +PoundPerCubicInch = "lb/in³" +PoundPerImperialGallon = "ppg (imp.)" +PoundPerUSGallon = "ppg (U.S.)" +SlugPerCubicFoot = "slug/ft³" +TonnePerCubicCentimeter = "t/cm³" +TonnePerCubicMeter = "t/m³" +TonnePerCubicMillimeter = "t/mm³" diff --git a/UnitsNet/GeneratedCode/Resources/MassConcentration.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/MassConcentration.ru-RU.restext index 6664407759..80a1847318 100644 --- a/UnitsNet/GeneratedCode/Resources/MassConcentration.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/MassConcentration.ru-RU.restext @@ -1,4 +1,4 @@ -GramPerCubicMeter = ("г/м³") -KilogramPerCubicMeter = ("кг/м³") -MicrogramPerCubicMeter = ("мкг/м³") -MilligramPerCubicMeter = ("мг/м³") +GramPerCubicMeter = "г/м³" +KilogramPerCubicMeter = "кг/м³" +MicrogramPerCubicMeter = "мкг/м³" +MilligramPerCubicMeter = "мг/м³" diff --git a/UnitsNet/GeneratedCode/Resources/MassFlow.restext b/UnitsNet/GeneratedCode/Resources/MassFlow.restext index 6a8135cf92..aa9bc67b09 100644 --- a/UnitsNet/GeneratedCode/Resources/MassFlow.restext +++ b/UnitsNet/GeneratedCode/Resources/MassFlow.restext @@ -1,33 +1,33 @@ -CentigramPerDay = ("cg/d") -CentigramPerSecond = ("cg/s", "cg/S") -DecagramPerDay = ("dag/d") -DecagramPerSecond = ("dag/s", "dag/S") -DecigramPerDay = ("dg/d") -DecigramPerSecond = ("dg/s", "dg/S") -GramPerDay = ("g/d") -GramPerHour = ("g/h") -GramPerSecond = ("g/s", "g/S") -HectogramPerDay = ("hg/d") -HectogramPerSecond = ("hg/s", "hg/S") -KilogramPerDay = ("kg/d") -KilogramPerHour = ("kg/h") -KilogramPerMinute = ("kg/min") -KilogramPerSecond = ("kg/s", "kg/S") -MegagramPerDay = ("Mg/d") -MegapoundPerDay = ("Mlb/d") -MegapoundPerHour = ("Mlb/h") -MegapoundPerMinute = ("Mlb/min") -MegapoundPerSecond = ("Mlb/s") -MicrogramPerDay = ("µg/d") -MicrogramPerSecond = ("µg/s", "µg/S") -MilligramPerDay = ("mg/d") -MilligramPerSecond = ("mg/s", "mg/S") -NanogramPerDay = ("ng/d") -NanogramPerSecond = ("ng/s", "ng/S") -PoundPerDay = ("lb/d") -PoundPerHour = ("lb/h") -PoundPerMinute = ("lb/min") -PoundPerSecond = ("lb/s") -ShortTonPerHour = ("short tn/h") -TonnePerDay = ("t/d") -TonnePerHour = ("t/h") +CentigramPerDay = "cg/d" +CentigramPerSecond = "cg/s","cg/S" +DecagramPerDay = "dag/d" +DecagramPerSecond = "dag/s","dag/S" +DecigramPerDay = "dg/d" +DecigramPerSecond = "dg/s","dg/S" +GramPerDay = "g/d" +GramPerHour = "g/h" +GramPerSecond = "g/s","g/S" +HectogramPerDay = "hg/d" +HectogramPerSecond = "hg/s","hg/S" +KilogramPerDay = "kg/d" +KilogramPerHour = "kg/h" +KilogramPerMinute = "kg/min" +KilogramPerSecond = "kg/s","kg/S" +MegagramPerDay = "Mg/d" +MegapoundPerDay = "Mlb/d" +MegapoundPerHour = "Mlb/h" +MegapoundPerMinute = "Mlb/min" +MegapoundPerSecond = "Mlb/s" +MicrogramPerDay = "µg/d" +MicrogramPerSecond = "µg/s","µg/S" +MilligramPerDay = "mg/d" +MilligramPerSecond = "mg/s","mg/S" +NanogramPerDay = "ng/d" +NanogramPerSecond = "ng/s","ng/S" +PoundPerDay = "lb/d" +PoundPerHour = "lb/h" +PoundPerMinute = "lb/min" +PoundPerSecond = "lb/s" +ShortTonPerHour = "short tn/h" +TonnePerDay = "t/d" +TonnePerHour = "t/h" diff --git a/UnitsNet/GeneratedCode/Resources/MassFlow.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/MassFlow.ru-RU.restext index 5f04da99f8..9131c19b96 100644 --- a/UnitsNet/GeneratedCode/Resources/MassFlow.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/MassFlow.ru-RU.restext @@ -1,2 +1,2 @@ -KilogramPerHour = ("кг/ч") -KilogramPerMinute = ("кг/мин") +KilogramPerHour = "кг/ч" +KilogramPerMinute = "кг/мин" diff --git a/UnitsNet/GeneratedCode/Resources/MassFlux.restext b/UnitsNet/GeneratedCode/Resources/MassFlux.restext index d02bbc6ccd..67e308e2ec 100644 --- a/UnitsNet/GeneratedCode/Resources/MassFlux.restext +++ b/UnitsNet/GeneratedCode/Resources/MassFlux.restext @@ -1,12 +1,12 @@ -GramPerHourPerSquareCentimeter = ("g·h⁻¹·cm⁻²") -GramPerHourPerSquareMeter = ("g·h⁻¹·m⁻²") -GramPerHourPerSquareMillimeter = ("g·h⁻¹·mm⁻²") -GramPerSecondPerSquareCentimeter = ("g·s⁻¹·cm⁻²") -GramPerSecondPerSquareMeter = ("g·s⁻¹·m⁻²") -GramPerSecondPerSquareMillimeter = ("g·s⁻¹·mm⁻²") -KilogramPerHourPerSquareCentimeter = ("kg·h⁻¹·cm⁻²") -KilogramPerHourPerSquareMeter = ("kg·h⁻¹·m⁻²") -KilogramPerHourPerSquareMillimeter = ("kg·h⁻¹·mm⁻²") -KilogramPerSecondPerSquareCentimeter = ("kg·s⁻¹·cm⁻²") -KilogramPerSecondPerSquareMeter = ("kg·s⁻¹·m⁻²") -KilogramPerSecondPerSquareMillimeter = ("kg·s⁻¹·mm⁻²") +GramPerHourPerSquareCentimeter = "g·h⁻¹·cm⁻²" +GramPerHourPerSquareMeter = "g·h⁻¹·m⁻²" +GramPerHourPerSquareMillimeter = "g·h⁻¹·mm⁻²" +GramPerSecondPerSquareCentimeter = "g·s⁻¹·cm⁻²" +GramPerSecondPerSquareMeter = "g·s⁻¹·m⁻²" +GramPerSecondPerSquareMillimeter = "g·s⁻¹·mm⁻²" +KilogramPerHourPerSquareCentimeter = "kg·h⁻¹·cm⁻²" +KilogramPerHourPerSquareMeter = "kg·h⁻¹·m⁻²" +KilogramPerHourPerSquareMillimeter = "kg·h⁻¹·mm⁻²" +KilogramPerSecondPerSquareCentimeter = "kg·s⁻¹·cm⁻²" +KilogramPerSecondPerSquareMeter = "kg·s⁻¹·m⁻²" +KilogramPerSecondPerSquareMillimeter = "kg·s⁻¹·mm⁻²" diff --git a/UnitsNet/GeneratedCode/Resources/MassFraction.restext b/UnitsNet/GeneratedCode/Resources/MassFraction.restext index 09dfd346fe..20cf2586de 100644 --- a/UnitsNet/GeneratedCode/Resources/MassFraction.restext +++ b/UnitsNet/GeneratedCode/Resources/MassFraction.restext @@ -1,24 +1,24 @@ -CentigramPerGram = ("cg/g") -CentigramPerKilogram = ("cg/kg") -DecagramPerGram = ("dag/g") -DecagramPerKilogram = ("dag/kg") -DecigramPerGram = ("dg/g") -DecigramPerKilogram = ("dg/kg") -DecimalFraction = ("") -GramPerGram = ("g/g") -GramPerKilogram = ("g/kg") -HectogramPerGram = ("hg/g") -HectogramPerKilogram = ("hg/kg") -KilogramPerGram = ("kg/g") -KilogramPerKilogram = ("kg/kg") -MicrogramPerGram = ("µg/g") -MicrogramPerKilogram = ("µg/kg") -MilligramPerGram = ("mg/g") -MilligramPerKilogram = ("mg/kg") -NanogramPerGram = ("ng/g") -NanogramPerKilogram = ("ng/kg") -PartPerBillion = ("ppb") -PartPerMillion = ("ppm") -PartPerThousand = ("‰") -PartPerTrillion = ("ppt") -Percent = ("%", "% (w/w)") +CentigramPerGram = "cg/g" +CentigramPerKilogram = "cg/kg" +DecagramPerGram = "dag/g" +DecagramPerKilogram = "dag/kg" +DecigramPerGram = "dg/g" +DecigramPerKilogram = "dg/kg" +DecimalFraction = "" +GramPerGram = "g/g" +GramPerKilogram = "g/kg" +HectogramPerGram = "hg/g" +HectogramPerKilogram = "hg/kg" +KilogramPerGram = "kg/g" +KilogramPerKilogram = "kg/kg" +MicrogramPerGram = "µg/g" +MicrogramPerKilogram = "µg/kg" +MilligramPerGram = "mg/g" +MilligramPerKilogram = "mg/kg" +NanogramPerGram = "ng/g" +NanogramPerKilogram = "ng/kg" +PartPerBillion = "ppb" +PartPerMillion = "ppm" +PartPerThousand = "‰" +PartPerTrillion = "ppt" +Percent = "%","% (w/w)" diff --git a/UnitsNet/GeneratedCode/Resources/MassMomentOfInertia.restext b/UnitsNet/GeneratedCode/Resources/MassMomentOfInertia.restext index e4918fe527..e830129cd3 100644 --- a/UnitsNet/GeneratedCode/Resources/MassMomentOfInertia.restext +++ b/UnitsNet/GeneratedCode/Resources/MassMomentOfInertia.restext @@ -1,28 +1,28 @@ -GramSquareCentimeter = ("g·cm²") -GramSquareDecimeter = ("g·dm²") -GramSquareMeter = ("g·m²") -GramSquareMillimeter = ("g·mm²") -KilogramSquareCentimeter = ("kg·cm²") -KilogramSquareDecimeter = ("kg·dm²") -KilogramSquareMeter = ("kg·m²") -KilogramSquareMillimeter = ("kg·mm²") -KilotonneSquareCentimeter = ("kt·cm²") -KilotonneSquareDecimeter = ("kt·dm²") -KilotonneSquareMeter = ("kt·m²") -KilotonneSquareMilimeter = ("kt·mm²") -MegatonneSquareCentimeter = ("Mt·cm²") -MegatonneSquareDecimeter = ("Mt·dm²") -MegatonneSquareMeter = ("Mt·m²") -MegatonneSquareMilimeter = ("Mt·mm²") -MilligramSquareCentimeter = ("mg·cm²") -MilligramSquareDecimeter = ("mg·dm²") -MilligramSquareMeter = ("mg·m²") -MilligramSquareMillimeter = ("mg·mm²") -PoundSquareFoot = ("lb·ft²") -PoundSquareInch = ("lb·in²") -SlugSquareFoot = ("slug·ft²") -SlugSquareInch = ("slug·in²") -TonneSquareCentimeter = ("t·cm²") -TonneSquareDecimeter = ("t·dm²") -TonneSquareMeter = ("t·m²") -TonneSquareMilimeter = ("t·mm²") +GramSquareCentimeter = "g·cm²" +GramSquareDecimeter = "g·dm²" +GramSquareMeter = "g·m²" +GramSquareMillimeter = "g·mm²" +KilogramSquareCentimeter = "kg·cm²" +KilogramSquareDecimeter = "kg·dm²" +KilogramSquareMeter = "kg·m²" +KilogramSquareMillimeter = "kg·mm²" +KilotonneSquareCentimeter = "kt·cm²" +KilotonneSquareDecimeter = "kt·dm²" +KilotonneSquareMeter = "kt·m²" +KilotonneSquareMilimeter = "kt·mm²" +MegatonneSquareCentimeter = "Mt·cm²" +MegatonneSquareDecimeter = "Mt·dm²" +MegatonneSquareMeter = "Mt·m²" +MegatonneSquareMilimeter = "Mt·mm²" +MilligramSquareCentimeter = "mg·cm²" +MilligramSquareDecimeter = "mg·dm²" +MilligramSquareMeter = "mg·m²" +MilligramSquareMillimeter = "mg·mm²" +PoundSquareFoot = "lb·ft²" +PoundSquareInch = "lb·in²" +SlugSquareFoot = "slug·ft²" +SlugSquareInch = "slug·in²" +TonneSquareCentimeter = "t·cm²" +TonneSquareDecimeter = "t·dm²" +TonneSquareMeter = "t·m²" +TonneSquareMilimeter = "t·mm²" diff --git a/UnitsNet/GeneratedCode/Resources/MolarEnergy.restext b/UnitsNet/GeneratedCode/Resources/MolarEnergy.restext index 8c4ea7ad1e..00937fd28b 100644 --- a/UnitsNet/GeneratedCode/Resources/MolarEnergy.restext +++ b/UnitsNet/GeneratedCode/Resources/MolarEnergy.restext @@ -1,3 +1,3 @@ -JoulePerMole = ("J/mol") -KilojoulePerMole = ("kJ/mol") -MegajoulePerMole = ("MJ/mol") +JoulePerMole = "J/mol" +KilojoulePerMole = "kJ/mol" +MegajoulePerMole = "MJ/mol" diff --git a/UnitsNet/GeneratedCode/Resources/MolarEntropy.restext b/UnitsNet/GeneratedCode/Resources/MolarEntropy.restext index dbc70b29a0..399c439f7b 100644 --- a/UnitsNet/GeneratedCode/Resources/MolarEntropy.restext +++ b/UnitsNet/GeneratedCode/Resources/MolarEntropy.restext @@ -1,3 +1,3 @@ -JoulePerMoleKelvin = ("J/(mol*K)") -KilojoulePerMoleKelvin = ("kJ/(mol*K)") -MegajoulePerMoleKelvin = ("MJ/(mol*K)") +JoulePerMoleKelvin = "J/(mol*K)" +KilojoulePerMoleKelvin = "kJ/(mol*K)" +MegajoulePerMoleKelvin = "MJ/(mol*K)" diff --git a/UnitsNet/GeneratedCode/Resources/MolarFlow.restext b/UnitsNet/GeneratedCode/Resources/MolarFlow.restext index b2caad2427..f843107262 100644 --- a/UnitsNet/GeneratedCode/Resources/MolarFlow.restext +++ b/UnitsNet/GeneratedCode/Resources/MolarFlow.restext @@ -1,9 +1,9 @@ -KilomolePerHour = ("kkmol/h") -KilomolePerMinute = ("kmol/min") -KilomolePerSecond = ("kmol/s") -MolePerHour = ("kmol/h") -MolePerMinute = ("mol/min") -MolePerSecond = ("mol/s") -PoundMolePerHour = ("lbmol/h") -PoundMolePerMinute = ("lbmol/min") -PoundMolePerSecond = ("lbmol/s") +KilomolePerHour = "kkmol/h" +KilomolePerMinute = "kmol/min" +KilomolePerSecond = "kmol/s" +MolePerHour = "kmol/h" +MolePerMinute = "mol/min" +MolePerSecond = "mol/s" +PoundMolePerHour = "lbmol/h" +PoundMolePerMinute = "lbmol/min" +PoundMolePerSecond = "lbmol/s" diff --git a/UnitsNet/GeneratedCode/Resources/MolarMass.restext b/UnitsNet/GeneratedCode/Resources/MolarMass.restext index 62face4da8..6bd2659bda 100644 --- a/UnitsNet/GeneratedCode/Resources/MolarMass.restext +++ b/UnitsNet/GeneratedCode/Resources/MolarMass.restext @@ -1,13 +1,13 @@ -CentigramPerMole = ("cg/mol") -DecagramPerMole = ("dag/mol") -DecigramPerMole = ("dg/mol") -GramPerMole = ("g/mol") -HectogramPerMole = ("hg/mol") -KilogramPerKilomole = ("kg/kmol") -KilogramPerMole = ("kg/mol") -KilopoundPerMole = ("klb/mol") -MegapoundPerMole = ("Mlb/mol") -MicrogramPerMole = ("µg/mol") -MilligramPerMole = ("mg/mol") -NanogramPerMole = ("ng/mol") -PoundPerMole = ("lb/mol") +CentigramPerMole = "cg/mol" +DecagramPerMole = "dag/mol" +DecigramPerMole = "dg/mol" +GramPerMole = "g/mol" +HectogramPerMole = "hg/mol" +KilogramPerKilomole = "kg/kmol" +KilogramPerMole = "kg/mol" +KilopoundPerMole = "klb/mol" +MegapoundPerMole = "Mlb/mol" +MicrogramPerMole = "µg/mol" +MilligramPerMole = "mg/mol" +NanogramPerMole = "ng/mol" +PoundPerMole = "lb/mol" diff --git a/UnitsNet/GeneratedCode/Resources/MolarMass.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/MolarMass.ru-RU.restext index 094a223ae0..127e548c66 100644 --- a/UnitsNet/GeneratedCode/Resources/MolarMass.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/MolarMass.ru-RU.restext @@ -1,12 +1,12 @@ -CentigramPerMole = ("сг/моль") -DecagramPerMole = ("даг/моль") -DecigramPerMole = ("дг/моль") -GramPerMole = ("г/моль") -HectogramPerMole = ("гг/моль") -KilogramPerMole = ("кг/моль") -KilopoundPerMole = ("кфунт/моль") -MegapoundPerMole = ("Мфунт/моль") -MicrogramPerMole = ("мкг/моль") -MilligramPerMole = ("мг/моль") -NanogramPerMole = ("нг/моль") -PoundPerMole = ("фунт/моль") +CentigramPerMole = "сг/моль" +DecagramPerMole = "даг/моль" +DecigramPerMole = "дг/моль" +GramPerMole = "г/моль" +HectogramPerMole = "гг/моль" +KilogramPerMole = "кг/моль" +KilopoundPerMole = "кфунт/моль" +MegapoundPerMole = "Мфунт/моль" +MicrogramPerMole = "мкг/моль" +MilligramPerMole = "мг/моль" +NanogramPerMole = "нг/моль" +PoundPerMole = "фунт/моль" diff --git a/UnitsNet/GeneratedCode/Resources/Molarity.restext b/UnitsNet/GeneratedCode/Resources/Molarity.restext index 68ae055510..33a40b89a8 100644 --- a/UnitsNet/GeneratedCode/Resources/Molarity.restext +++ b/UnitsNet/GeneratedCode/Resources/Molarity.restext @@ -1,11 +1,11 @@ -CentimolePerLiter = ("cmol/L", "cM") -DecimolePerLiter = ("dmol/L", "dM") -FemtomolePerLiter = ("fmol/L", "fM") -KilomolePerCubicMeter = ("kmol/m³") -MicromolePerLiter = ("µmol/L", "µM") -MillimolePerLiter = ("mmol/L", "mM") -MolePerCubicMeter = ("mol/m³") -MolePerLiter = ("mol/L", "M") -NanomolePerLiter = ("nmol/L", "nM") -PicomolePerLiter = ("pmol/L", "pM") -PoundMolePerCubicFoot = ("lbmol/ft³") +CentimolePerLiter = "cmol/L","cM" +DecimolePerLiter = "dmol/L","dM" +FemtomolePerLiter = "fmol/L","fM" +KilomolePerCubicMeter = "kmol/m³" +MicromolePerLiter = "µmol/L","µM" +MillimolePerLiter = "mmol/L","mM" +MolePerCubicMeter = "mol/m³" +MolePerLiter = "mol/L","M" +NanomolePerLiter = "nmol/L","nM" +PicomolePerLiter = "pmol/L","pM" +PoundMolePerCubicFoot = "lbmol/ft³" diff --git a/UnitsNet/GeneratedCode/Resources/Permeability.restext b/UnitsNet/GeneratedCode/Resources/Permeability.restext index cd40eeadb3..abc8e4cd9f 100644 --- a/UnitsNet/GeneratedCode/Resources/Permeability.restext +++ b/UnitsNet/GeneratedCode/Resources/Permeability.restext @@ -1 +1 @@ -HenryPerMeter = ("H/m") +HenryPerMeter = "H/m" diff --git a/UnitsNet/GeneratedCode/Resources/Permittivity.restext b/UnitsNet/GeneratedCode/Resources/Permittivity.restext index 0ab9ab1f1d..e4a0a6aee0 100644 --- a/UnitsNet/GeneratedCode/Resources/Permittivity.restext +++ b/UnitsNet/GeneratedCode/Resources/Permittivity.restext @@ -1 +1 @@ -FaradPerMeter = ("F/m") +FaradPerMeter = "F/m" diff --git a/UnitsNet/GeneratedCode/Resources/PorousMediumPermeability.restext b/UnitsNet/GeneratedCode/Resources/PorousMediumPermeability.restext index 4af9248edb..1ca268826e 100644 --- a/UnitsNet/GeneratedCode/Resources/PorousMediumPermeability.restext +++ b/UnitsNet/GeneratedCode/Resources/PorousMediumPermeability.restext @@ -1,5 +1,5 @@ -Darcy = ("D") -Microdarcy = ("µD") -Millidarcy = ("mD") -SquareCentimeter = ("cm²") -SquareMeter = ("m²") +Darcy = "D" +Microdarcy = "µD" +Millidarcy = "mD" +SquareCentimeter = "cm²" +SquareMeter = "m²" diff --git a/UnitsNet/GeneratedCode/Resources/Power.restext b/UnitsNet/GeneratedCode/Resources/Power.restext index 74d1bf453c..fb08e28a96 100644 --- a/UnitsNet/GeneratedCode/Resources/Power.restext +++ b/UnitsNet/GeneratedCode/Resources/Power.restext @@ -1,26 +1,26 @@ -BoilerHorsepower = ("hp(S)") -BritishThermalUnitPerHour = ("Btu/h", "Btu/hr") -Decawatt = ("daW") -Deciwatt = ("dW") -ElectricalHorsepower = ("hp(E)") -Femtowatt = ("fW") -GigajoulePerHour = ("GJ/h") -Gigawatt = ("GW") -HydraulicHorsepower = ("hp(H)") -JoulePerHour = ("J/h") -KilobritishThermalUnitPerHour = ("kBtu/h", "kBtu/hr") -KilojoulePerHour = ("kJ/h") -Kilowatt = ("kW") -MechanicalHorsepower = ("hp(I)") -MegabritishThermalUnitPerHour = ("MBtu/h", "MBtu/hr") -MegajoulePerHour = ("MJ/h") -Megawatt = ("MW") -MetricHorsepower = ("hp(M)") -Microwatt = ("µW") -MillijoulePerHour = ("mJ/h") -Milliwatt = ("mW") -Nanowatt = ("nW") -Petawatt = ("PW") -Picowatt = ("pW") -Terawatt = ("TW") -Watt = ("W") +BoilerHorsepower = "hp(S)" +BritishThermalUnitPerHour = "Btu/h","Btu/hr" +Decawatt = "daW" +Deciwatt = "dW" +ElectricalHorsepower = "hp(E)" +Femtowatt = "fW" +GigajoulePerHour = "GJ/h" +Gigawatt = "GW" +HydraulicHorsepower = "hp(H)" +JoulePerHour = "J/h" +KilobritishThermalUnitPerHour = "kBtu/h","kBtu/hr" +KilojoulePerHour = "kJ/h" +Kilowatt = "kW" +MechanicalHorsepower = "hp(I)" +MegabritishThermalUnitPerHour = "MBtu/h","MBtu/hr" +MegajoulePerHour = "MJ/h" +Megawatt = "MW" +MetricHorsepower = "hp(M)" +Microwatt = "µW" +MillijoulePerHour = "mJ/h" +Milliwatt = "mW" +Nanowatt = "nW" +Petawatt = "PW" +Picowatt = "pW" +Terawatt = "TW" +Watt = "W" diff --git a/UnitsNet/GeneratedCode/Resources/PowerDensity.restext b/UnitsNet/GeneratedCode/Resources/PowerDensity.restext index 08e896d6be..7aa6978e85 100644 --- a/UnitsNet/GeneratedCode/Resources/PowerDensity.restext +++ b/UnitsNet/GeneratedCode/Resources/PowerDensity.restext @@ -1,44 +1,44 @@ -DecawattPerCubicFoot = ("daW/ft³") -DecawattPerCubicInch = ("daW/in³") -DecawattPerCubicMeter = ("daW/m³") -DecawattPerLiter = ("daW/l") -DeciwattPerCubicFoot = ("dW/ft³") -DeciwattPerCubicInch = ("dW/in³") -DeciwattPerCubicMeter = ("dW/m³") -DeciwattPerLiter = ("dW/l") -GigawattPerCubicFoot = ("GW/ft³") -GigawattPerCubicInch = ("GW/in³") -GigawattPerCubicMeter = ("GW/m³") -GigawattPerLiter = ("GW/l") -KilowattPerCubicFoot = ("kW/ft³") -KilowattPerCubicInch = ("kW/in³") -KilowattPerCubicMeter = ("kW/m³") -KilowattPerLiter = ("kW/l") -MegawattPerCubicFoot = ("MW/ft³") -MegawattPerCubicInch = ("MW/in³") -MegawattPerCubicMeter = ("MW/m³") -MegawattPerLiter = ("MW/l") -MicrowattPerCubicFoot = ("µW/ft³") -MicrowattPerCubicInch = ("µW/in³") -MicrowattPerCubicMeter = ("µW/m³") -MicrowattPerLiter = ("µW/l") -MilliwattPerCubicFoot = ("mW/ft³") -MilliwattPerCubicInch = ("mW/in³") -MilliwattPerCubicMeter = ("mW/m³") -MilliwattPerLiter = ("mW/l") -NanowattPerCubicFoot = ("nW/ft³") -NanowattPerCubicInch = ("nW/in³") -NanowattPerCubicMeter = ("nW/m³") -NanowattPerLiter = ("nW/l") -PicowattPerCubicFoot = ("pW/ft³") -PicowattPerCubicInch = ("pW/in³") -PicowattPerCubicMeter = ("pW/m³") -PicowattPerLiter = ("pW/l") -TerawattPerCubicFoot = ("TW/ft³") -TerawattPerCubicInch = ("TW/in³") -TerawattPerCubicMeter = ("TW/m³") -TerawattPerLiter = ("TW/l") -WattPerCubicFoot = ("W/ft³") -WattPerCubicInch = ("W/in³") -WattPerCubicMeter = ("W/m³") -WattPerLiter = ("W/l") +DecawattPerCubicFoot = "daW/ft³" +DecawattPerCubicInch = "daW/in³" +DecawattPerCubicMeter = "daW/m³" +DecawattPerLiter = "daW/l" +DeciwattPerCubicFoot = "dW/ft³" +DeciwattPerCubicInch = "dW/in³" +DeciwattPerCubicMeter = "dW/m³" +DeciwattPerLiter = "dW/l" +GigawattPerCubicFoot = "GW/ft³" +GigawattPerCubicInch = "GW/in³" +GigawattPerCubicMeter = "GW/m³" +GigawattPerLiter = "GW/l" +KilowattPerCubicFoot = "kW/ft³" +KilowattPerCubicInch = "kW/in³" +KilowattPerCubicMeter = "kW/m³" +KilowattPerLiter = "kW/l" +MegawattPerCubicFoot = "MW/ft³" +MegawattPerCubicInch = "MW/in³" +MegawattPerCubicMeter = "MW/m³" +MegawattPerLiter = "MW/l" +MicrowattPerCubicFoot = "µW/ft³" +MicrowattPerCubicInch = "µW/in³" +MicrowattPerCubicMeter = "µW/m³" +MicrowattPerLiter = "µW/l" +MilliwattPerCubicFoot = "mW/ft³" +MilliwattPerCubicInch = "mW/in³" +MilliwattPerCubicMeter = "mW/m³" +MilliwattPerLiter = "mW/l" +NanowattPerCubicFoot = "nW/ft³" +NanowattPerCubicInch = "nW/in³" +NanowattPerCubicMeter = "nW/m³" +NanowattPerLiter = "nW/l" +PicowattPerCubicFoot = "pW/ft³" +PicowattPerCubicInch = "pW/in³" +PicowattPerCubicMeter = "pW/m³" +PicowattPerLiter = "pW/l" +TerawattPerCubicFoot = "TW/ft³" +TerawattPerCubicInch = "TW/in³" +TerawattPerCubicMeter = "TW/m³" +TerawattPerLiter = "TW/l" +WattPerCubicFoot = "W/ft³" +WattPerCubicInch = "W/in³" +WattPerCubicMeter = "W/m³" +WattPerLiter = "W/l" diff --git a/UnitsNet/GeneratedCode/Resources/PowerRatio.restext b/UnitsNet/GeneratedCode/Resources/PowerRatio.restext index 7e8a6001e5..10e89acf7f 100644 --- a/UnitsNet/GeneratedCode/Resources/PowerRatio.restext +++ b/UnitsNet/GeneratedCode/Resources/PowerRatio.restext @@ -1,2 +1,2 @@ -DecibelMilliwatt = ("dBmW", "dBm") -DecibelWatt = ("dBW") +DecibelMilliwatt = "dBmW","dBm" +DecibelWatt = "dBW" diff --git a/UnitsNet/GeneratedCode/Resources/Pressure.restext b/UnitsNet/GeneratedCode/Resources/Pressure.restext index b27ed211fc..f88959ea7c 100644 --- a/UnitsNet/GeneratedCode/Resources/Pressure.restext +++ b/UnitsNet/GeneratedCode/Resources/Pressure.restext @@ -1,47 +1,47 @@ -Atmosphere = ("atm") -Bar = ("bar") -Centibar = ("cbar") -Decapascal = ("daPa") -Decibar = ("dbar") -DynePerSquareCentimeter = ("dyn/cm²") -FootOfElevation = ("ft of elevation") -FootOfHead = ("ft of head") -Gigapascal = ("GPa") -Hectopascal = ("hPa") -InchOfMercury = ("inHg") -InchOfWaterColumn = ("inH2O", "inch wc", "wc") -Kilobar = ("kbar") -KilogramForcePerSquareCentimeter = ("kgf/cm²") -KilogramForcePerSquareMeter = ("kgf/m²") -KilogramForcePerSquareMillimeter = ("kgf/mm²") -KilonewtonPerSquareCentimeter = ("kN/cm²") -KilonewtonPerSquareMeter = ("kN/m²") -KilonewtonPerSquareMillimeter = ("kN/mm²") -Kilopascal = ("kPa") -KilopoundForcePerSquareFoot = ("kipf/ft²") -KilopoundForcePerSquareInch = ("ksi", "kipf/in²") -KilopoundForcePerSquareMil = ("kipf/mil²") -Megabar = ("Mbar") -MeganewtonPerSquareMeter = ("MN/m²") -Megapascal = ("MPa") -MeterOfElevation = ("m of elevation") -MeterOfHead = ("m of head") -Microbar = ("µbar") -Micropascal = ("µPa") -Millibar = ("mbar") -MillimeterOfMercury = ("mmHg") -MillimeterOfWaterColumn = ("mmH2O", "mm wc") -Millipascal = ("mPa") -NewtonPerSquareCentimeter = ("N/cm²") -NewtonPerSquareMeter = ("N/m²") -NewtonPerSquareMillimeter = ("N/mm²") -Pascal = ("Pa") -PoundForcePerSquareFoot = ("lb/ft²") -PoundForcePerSquareInch = ("psi", "lb/in²") -PoundForcePerSquareMil = ("lb/mil²", "lbs/mil²") -PoundPerInchSecondSquared = ("lbm/(in·s²)", "lb/(in·s²)") -TechnicalAtmosphere = ("at") -TonneForcePerSquareCentimeter = ("tf/cm²") -TonneForcePerSquareMeter = ("tf/m²") -TonneForcePerSquareMillimeter = ("tf/mm²") -Torr = ("torr") +Atmosphere = "atm" +Bar = "bar" +Centibar = "cbar" +Decapascal = "daPa" +Decibar = "dbar" +DynePerSquareCentimeter = "dyn/cm²" +FootOfElevation = "ft of elevation" +FootOfHead = "ft of head" +Gigapascal = "GPa" +Hectopascal = "hPa" +InchOfMercury = "inHg" +InchOfWaterColumn = "inH2O","inch wc","wc" +Kilobar = "kbar" +KilogramForcePerSquareCentimeter = "kgf/cm²" +KilogramForcePerSquareMeter = "kgf/m²" +KilogramForcePerSquareMillimeter = "kgf/mm²" +KilonewtonPerSquareCentimeter = "kN/cm²" +KilonewtonPerSquareMeter = "kN/m²" +KilonewtonPerSquareMillimeter = "kN/mm²" +Kilopascal = "kPa" +KilopoundForcePerSquareFoot = "kipf/ft²" +KilopoundForcePerSquareInch = "ksi","kipf/in²" +KilopoundForcePerSquareMil = "kipf/mil²" +Megabar = "Mbar" +MeganewtonPerSquareMeter = "MN/m²" +Megapascal = "MPa" +MeterOfElevation = "m of elevation" +MeterOfHead = "m of head" +Microbar = "µbar" +Micropascal = "µPa" +Millibar = "mbar" +MillimeterOfMercury = "mmHg" +MillimeterOfWaterColumn = "mmH2O","mm wc" +Millipascal = "mPa" +NewtonPerSquareCentimeter = "N/cm²" +NewtonPerSquareMeter = "N/m²" +NewtonPerSquareMillimeter = "N/mm²" +Pascal = "Pa" +PoundForcePerSquareFoot = "lb/ft²" +PoundForcePerSquareInch = "psi","lb/in²" +PoundForcePerSquareMil = "lb/mil²","lbs/mil²" +PoundPerInchSecondSquared = "lbm/(in·s²)","lb/(in·s²)" +TechnicalAtmosphere = "at" +TonneForcePerSquareCentimeter = "tf/cm²" +TonneForcePerSquareMeter = "tf/m²" +TonneForcePerSquareMillimeter = "tf/mm²" +Torr = "torr" diff --git a/UnitsNet/GeneratedCode/Resources/Pressure.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Pressure.ru-RU.restext index 3263fea4f7..9d506e8c8d 100644 --- a/UnitsNet/GeneratedCode/Resources/Pressure.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Pressure.ru-RU.restext @@ -1,31 +1,31 @@ -Atmosphere = ("атм") -Bar = ("бар") -Centibar = ("сбар") -Decapascal = ("даПа") -Decibar = ("дбар") -Gigapascal = ("ГПа") -Hectopascal = ("гПа") -Kilobar = ("кбар") -KilogramForcePerSquareCentimeter = ("кгс/см²") -KilogramForcePerSquareMeter = ("кгс/м²") -KilogramForcePerSquareMillimeter = ("кгс/мм²") -KilonewtonPerSquareCentimeter = ("кН/см²") -KilonewtonPerSquareMeter = ("кН/м²") -KilonewtonPerSquareMillimeter = ("кН/мм²") -Kilopascal = ("кПа") -KilopoundForcePerSquareInch = ("ksi", "kipf/in²") -Megabar = ("Мбар") -MeganewtonPerSquareMeter = ("МН/м²") -Megapascal = ("МПа") -Microbar = ("мкбар") -Micropascal = ("мкПа") -Millibar = ("мбар") -MillimeterOfMercury = ("мм рт.ст.") -Millipascal = ("мПа") -NewtonPerSquareCentimeter = ("Н/см²") -NewtonPerSquareMeter = ("Н/м²") -NewtonPerSquareMillimeter = ("Н/мм²") -Pascal = ("Па") -PoundForcePerSquareInch = ("psi", "lb/in²") -TechnicalAtmosphere = ("ат") -Torr = ("торр") +Atmosphere = "атм" +Bar = "бар" +Centibar = "сбар" +Decapascal = "даПа" +Decibar = "дбар" +Gigapascal = "ГПа" +Hectopascal = "гПа" +Kilobar = "кбар" +KilogramForcePerSquareCentimeter = "кгс/см²" +KilogramForcePerSquareMeter = "кгс/м²" +KilogramForcePerSquareMillimeter = "кгс/мм²" +KilonewtonPerSquareCentimeter = "кН/см²" +KilonewtonPerSquareMeter = "кН/м²" +KilonewtonPerSquareMillimeter = "кН/мм²" +Kilopascal = "кПа" +KilopoundForcePerSquareInch = "ksi","kipf/in²" +Megabar = "Мбар" +MeganewtonPerSquareMeter = "МН/м²" +Megapascal = "МПа" +Microbar = "мкбар" +Micropascal = "мкПа" +Millibar = "мбар" +MillimeterOfMercury = "мм рт.ст." +Millipascal = "мПа" +NewtonPerSquareCentimeter = "Н/см²" +NewtonPerSquareMeter = "Н/м²" +NewtonPerSquareMillimeter = "Н/мм²" +Pascal = "Па" +PoundForcePerSquareInch = "psi","lb/in²" +TechnicalAtmosphere = "ат" +Torr = "торр" diff --git a/UnitsNet/GeneratedCode/Resources/PressureChangeRate.restext b/UnitsNet/GeneratedCode/Resources/PressureChangeRate.restext index 2df40aa34e..8fed3934e2 100644 --- a/UnitsNet/GeneratedCode/Resources/PressureChangeRate.restext +++ b/UnitsNet/GeneratedCode/Resources/PressureChangeRate.restext @@ -1,14 +1,14 @@ -AtmospherePerSecond = ("atm/s") -KilopascalPerMinute = ("kPa/min") -KilopascalPerSecond = ("kPa/s") -KilopoundForcePerSquareInchPerMinute = ("ksi/min", "kipf/in²/min") -KilopoundForcePerSquareInchPerSecond = ("ksi/s", "kipf/in²/s") -MegapascalPerMinute = ("MPa/min") -MegapascalPerSecond = ("MPa/s") -MegapoundForcePerSquareInchPerMinute = ("Mpsi/min", "Mlb/in²/min") -MegapoundForcePerSquareInchPerSecond = ("Mpsi/s", "Mlb/in²/s") -MillimeterOfMercuryPerSecond = ("mmHg/s") -PascalPerMinute = ("Pa/min") -PascalPerSecond = ("Pa/s") -PoundForcePerSquareInchPerMinute = ("psi/min", "lb/in²/min") -PoundForcePerSquareInchPerSecond = ("psi/s", "lb/in²/s") +AtmospherePerSecond = "atm/s" +KilopascalPerMinute = "kPa/min" +KilopascalPerSecond = "kPa/s" +KilopoundForcePerSquareInchPerMinute = "ksi/min","kipf/in²/min" +KilopoundForcePerSquareInchPerSecond = "ksi/s","kipf/in²/s" +MegapascalPerMinute = "MPa/min" +MegapascalPerSecond = "MPa/s" +MegapoundForcePerSquareInchPerMinute = "Mpsi/min","Mlb/in²/min" +MegapoundForcePerSquareInchPerSecond = "Mpsi/s","Mlb/in²/s" +MillimeterOfMercuryPerSecond = "mmHg/s" +PascalPerMinute = "Pa/min" +PascalPerSecond = "Pa/s" +PoundForcePerSquareInchPerMinute = "psi/min","lb/in²/min" +PoundForcePerSquareInchPerSecond = "psi/s","lb/in²/s" diff --git a/UnitsNet/GeneratedCode/Resources/PressureChangeRate.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/PressureChangeRate.ru-RU.restext index 08c3778ada..99898b58f8 100644 --- a/UnitsNet/GeneratedCode/Resources/PressureChangeRate.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/PressureChangeRate.ru-RU.restext @@ -1,14 +1,14 @@ -AtmospherePerSecond = ("атм/с") -KilopascalPerMinute = ("кПа/мин") -KilopascalPerSecond = ("кПа/с") -KilopoundForcePerSquareInchPerMinute = ("ksi/мин", "kipf/in²/мин") -KilopoundForcePerSquareInchPerSecond = ("ksi/с", "kipf/in²/с") -MegapascalPerMinute = ("МПа/мин") -MegapascalPerSecond = ("МПа/с") -MegapoundForcePerSquareInchPerMinute = ("Мpsi/мин", "Мlb/in²/мин") -MegapoundForcePerSquareInchPerSecond = ("Мpsi/с", "Мlb/in²/с") -MillimeterOfMercuryPerSecond = ("mmHg/с") -PascalPerMinute = ("Па/мин") -PascalPerSecond = ("Па/с") -PoundForcePerSquareInchPerMinute = ("psi/мин", "lb/in²/мин") -PoundForcePerSquareInchPerSecond = ("psi/с", "lb/in²/с") +AtmospherePerSecond = "атм/с" +KilopascalPerMinute = "кПа/мин" +KilopascalPerSecond = "кПа/с" +KilopoundForcePerSquareInchPerMinute = "ksi/мин","kipf/in²/мин" +KilopoundForcePerSquareInchPerSecond = "ksi/с","kipf/in²/с" +MegapascalPerMinute = "МПа/мин" +MegapascalPerSecond = "МПа/с" +MegapoundForcePerSquareInchPerMinute = "Мpsi/мин","Мlb/in²/мин" +MegapoundForcePerSquareInchPerSecond = "Мpsi/с","Мlb/in²/с" +MillimeterOfMercuryPerSecond = "mmHg/с" +PascalPerMinute = "Па/мин" +PascalPerSecond = "Па/с" +PoundForcePerSquareInchPerMinute = "psi/мин","lb/in²/мин" +PoundForcePerSquareInchPerSecond = "psi/с","lb/in²/с" diff --git a/UnitsNet/GeneratedCode/Resources/Ratio.restext b/UnitsNet/GeneratedCode/Resources/Ratio.restext index 7f94b4bfae..6c6289edff 100644 --- a/UnitsNet/GeneratedCode/Resources/Ratio.restext +++ b/UnitsNet/GeneratedCode/Resources/Ratio.restext @@ -1,6 +1,6 @@ -DecimalFraction = ("") -PartPerBillion = ("ppb") -PartPerMillion = ("ppm") -PartPerThousand = ("‰") -PartPerTrillion = ("ppt") -Percent = ("%") +DecimalFraction = "" +PartPerBillion = "ppb" +PartPerMillion = "ppm" +PartPerThousand = "‰" +PartPerTrillion = "ppt" +Percent = "%" diff --git a/UnitsNet/GeneratedCode/Resources/RatioChangeRate.restext b/UnitsNet/GeneratedCode/Resources/RatioChangeRate.restext index bfc3b132eb..f2fde709dc 100644 --- a/UnitsNet/GeneratedCode/Resources/RatioChangeRate.restext +++ b/UnitsNet/GeneratedCode/Resources/RatioChangeRate.restext @@ -1,2 +1,2 @@ -DecimalFractionPerSecond = ("/s") -PercentPerSecond = ("%/s") +DecimalFractionPerSecond = "/s" +PercentPerSecond = "%/s" diff --git a/UnitsNet/GeneratedCode/Resources/ReactiveEnergy.restext b/UnitsNet/GeneratedCode/Resources/ReactiveEnergy.restext index 78c00ad4ee..78e0074b40 100644 --- a/UnitsNet/GeneratedCode/Resources/ReactiveEnergy.restext +++ b/UnitsNet/GeneratedCode/Resources/ReactiveEnergy.restext @@ -1,3 +1,3 @@ -KilovoltampereReactiveHour = ("kvarh") -MegavoltampereReactiveHour = ("Mvarh") -VoltampereReactiveHour = ("varh") +KilovoltampereReactiveHour = "kvarh" +MegavoltampereReactiveHour = "Mvarh" +VoltampereReactiveHour = "varh" diff --git a/UnitsNet/GeneratedCode/Resources/ReactivePower.restext b/UnitsNet/GeneratedCode/Resources/ReactivePower.restext index 7abc65e55d..929e35c90b 100644 --- a/UnitsNet/GeneratedCode/Resources/ReactivePower.restext +++ b/UnitsNet/GeneratedCode/Resources/ReactivePower.restext @@ -1,4 +1,4 @@ -GigavoltampereReactive = ("Gvar") -KilovoltampereReactive = ("kvar") -MegavoltampereReactive = ("Mvar") -VoltampereReactive = ("var") +GigavoltampereReactive = "Gvar" +KilovoltampereReactive = "kvar" +MegavoltampereReactive = "Mvar" +VoltampereReactive = "var" diff --git a/UnitsNet/GeneratedCode/Resources/ReciprocalArea.restext b/UnitsNet/GeneratedCode/Resources/ReciprocalArea.restext index 555d558fb6..b0710341cd 100644 --- a/UnitsNet/GeneratedCode/Resources/ReciprocalArea.restext +++ b/UnitsNet/GeneratedCode/Resources/ReciprocalArea.restext @@ -1,11 +1,11 @@ -InverseSquareCentimeter = ("cm⁻²") -InverseSquareDecimeter = ("dm⁻²") -InverseSquareFoot = ("ft⁻²") -InverseSquareInch = ("in⁻²") -InverseSquareKilometer = ("km⁻²") -InverseSquareMeter = ("m⁻²") -InverseSquareMicrometer = ("µm⁻²") -InverseSquareMile = ("mi⁻²") -InverseSquareMillimeter = ("mm⁻²") -InverseSquareYard = ("yd⁻²") -InverseUsSurveySquareFoot = ("ft⁻² (US)") +InverseSquareCentimeter = "cm⁻²" +InverseSquareDecimeter = "dm⁻²" +InverseSquareFoot = "ft⁻²" +InverseSquareInch = "in⁻²" +InverseSquareKilometer = "km⁻²" +InverseSquareMeter = "m⁻²" +InverseSquareMicrometer = "µm⁻²" +InverseSquareMile = "mi⁻²" +InverseSquareMillimeter = "mm⁻²" +InverseSquareYard = "yd⁻²" +InverseUsSurveySquareFoot = "ft⁻² (US)" diff --git a/UnitsNet/GeneratedCode/Resources/ReciprocalLength.restext b/UnitsNet/GeneratedCode/Resources/ReciprocalLength.restext index c95fe3c06c..7117edaa1a 100644 --- a/UnitsNet/GeneratedCode/Resources/ReciprocalLength.restext +++ b/UnitsNet/GeneratedCode/Resources/ReciprocalLength.restext @@ -1,10 +1,10 @@ -InverseCentimeter = ("cm⁻¹", "1/cm") -InverseFoot = ("ft⁻¹", "1/ft") -InverseInch = ("in⁻¹", "1/in") -InverseMeter = ("m⁻¹", "1/m") -InverseMicroinch = ("µin⁻¹", "1/µin") -InverseMil = ("mil⁻¹", "1/mil") -InverseMile = ("mi⁻¹", "1/mi") -InverseMillimeter = ("mm⁻¹", "1/mm") -InverseUsSurveyFoot = ("ftUS⁻¹", "1/ftUS") -InverseYard = ("yd⁻¹", "1/yd") +InverseCentimeter = "cm⁻¹","1/cm" +InverseFoot = "ft⁻¹","1/ft" +InverseInch = "in⁻¹","1/in" +InverseMeter = "m⁻¹","1/m" +InverseMicroinch = "µin⁻¹","1/µin" +InverseMil = "mil⁻¹","1/mil" +InverseMile = "mi⁻¹","1/mi" +InverseMillimeter = "mm⁻¹","1/mm" +InverseUsSurveyFoot = "ftUS⁻¹","1/ftUS" +InverseYard = "yd⁻¹","1/yd" diff --git a/UnitsNet/GeneratedCode/Resources/RelativeHumidity.restext b/UnitsNet/GeneratedCode/Resources/RelativeHumidity.restext index 78c88034d3..2cab70493c 100644 --- a/UnitsNet/GeneratedCode/Resources/RelativeHumidity.restext +++ b/UnitsNet/GeneratedCode/Resources/RelativeHumidity.restext @@ -1 +1 @@ -Percent = ("%RH") +Percent = "%RH" diff --git a/UnitsNet/GeneratedCode/Resources/RotationalAcceleration.restext b/UnitsNet/GeneratedCode/Resources/RotationalAcceleration.restext index a05729de46..8b0984706a 100644 --- a/UnitsNet/GeneratedCode/Resources/RotationalAcceleration.restext +++ b/UnitsNet/GeneratedCode/Resources/RotationalAcceleration.restext @@ -1,4 +1,4 @@ -DegreePerSecondSquared = ("°/s²", "deg/s²") -RadianPerSecondSquared = ("rad/s²") -RevolutionPerMinutePerSecond = ("rpm/s") -RevolutionPerSecondSquared = ("r/s²") +DegreePerSecondSquared = "°/s²","deg/s²" +RadianPerSecondSquared = "rad/s²" +RevolutionPerMinutePerSecond = "rpm/s" +RevolutionPerSecondSquared = "r/s²" diff --git a/UnitsNet/GeneratedCode/Resources/RotationalSpeed.restext b/UnitsNet/GeneratedCode/Resources/RotationalSpeed.restext index ebe053b5f5..e027fe15aa 100644 --- a/UnitsNet/GeneratedCode/Resources/RotationalSpeed.restext +++ b/UnitsNet/GeneratedCode/Resources/RotationalSpeed.restext @@ -1,13 +1,13 @@ -CentiradianPerSecond = ("crad/s") -DeciradianPerSecond = ("drad/s") -DegreePerMinute = ("°/min", "deg/min") -DegreePerSecond = ("°/s", "deg/s") -MicrodegreePerSecond = ("µ°/s", "µdeg/s") -MicroradianPerSecond = ("µrad/s") -MillidegreePerSecond = ("m°/s", "mdeg/s") -MilliradianPerSecond = ("mrad/s") -NanodegreePerSecond = ("n°/s", "ndeg/s") -NanoradianPerSecond = ("nrad/s") -RadianPerSecond = ("rad/s") -RevolutionPerMinute = ("rpm", "r/min") -RevolutionPerSecond = ("r/s") +CentiradianPerSecond = "crad/s" +DeciradianPerSecond = "drad/s" +DegreePerMinute = "°/min","deg/min" +DegreePerSecond = "°/s","deg/s" +MicrodegreePerSecond = "µ°/s","µdeg/s" +MicroradianPerSecond = "µrad/s" +MillidegreePerSecond = "m°/s","mdeg/s" +MilliradianPerSecond = "mrad/s" +NanodegreePerSecond = "n°/s","ndeg/s" +NanoradianPerSecond = "nrad/s" +RadianPerSecond = "rad/s" +RevolutionPerMinute = "rpm","r/min" +RevolutionPerSecond = "r/s" diff --git a/UnitsNet/GeneratedCode/Resources/RotationalSpeed.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/RotationalSpeed.ru-RU.restext index 7eb8c063cd..e910b3fad4 100644 --- a/UnitsNet/GeneratedCode/Resources/RotationalSpeed.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/RotationalSpeed.ru-RU.restext @@ -1,12 +1,12 @@ -CentiradianPerSecond = ("срад/с") -DeciradianPerSecond = ("драд/с") -DegreePerSecond = ("°/с") -MicrodegreePerSecond = ("мк°/с") -MicroradianPerSecond = ("мкрад/с") -MillidegreePerSecond = ("м°/с") -MilliradianPerSecond = ("мрад/с") -NanodegreePerSecond = ("н°/с") -NanoradianPerSecond = ("нрад/с") -RadianPerSecond = ("рад/с") -RevolutionPerMinute = ("об/мин") -RevolutionPerSecond = ("об/с") +CentiradianPerSecond = "срад/с" +DeciradianPerSecond = "драд/с" +DegreePerSecond = "°/с" +MicrodegreePerSecond = "мк°/с" +MicroradianPerSecond = "мкрад/с" +MillidegreePerSecond = "м°/с" +MilliradianPerSecond = "мрад/с" +NanodegreePerSecond = "н°/с" +NanoradianPerSecond = "нрад/с" +RadianPerSecond = "рад/с" +RevolutionPerMinute = "об/мин" +RevolutionPerSecond = "об/с" diff --git a/UnitsNet/GeneratedCode/Resources/RotationalStiffness.restext b/UnitsNet/GeneratedCode/Resources/RotationalStiffness.restext index ad0af65e6b..3ceb59443e 100644 --- a/UnitsNet/GeneratedCode/Resources/RotationalStiffness.restext +++ b/UnitsNet/GeneratedCode/Resources/RotationalStiffness.restext @@ -1,33 +1,33 @@ -CentinewtonMeterPerDegree = ("cN·m/deg", "cNm/deg", "cN·m/°", "cNm/°") -CentinewtonMillimeterPerDegree = ("cN·mm/deg", "cNmm/deg", "cN·mm/°", "cNmm/°") -CentinewtonMillimeterPerRadian = ("cN·mm/rad", "cNmm/rad") -DecanewtonMeterPerDegree = ("daN·m/deg", "daNm/deg", "daN·m/°", "daNm/°") -DecanewtonMillimeterPerDegree = ("daN·mm/deg", "daNmm/deg", "daN·mm/°", "daNmm/°") -DecanewtonMillimeterPerRadian = ("daN·mm/rad", "daNmm/rad") -DecinewtonMeterPerDegree = ("dN·m/deg", "dNm/deg", "dN·m/°", "dNm/°") -DecinewtonMillimeterPerDegree = ("dN·mm/deg", "dNmm/deg", "dN·mm/°", "dNmm/°") -DecinewtonMillimeterPerRadian = ("dN·mm/rad", "dNmm/rad") -KilonewtonMeterPerDegree = ("kN·m/deg", "kNm/deg", "kN·m/°", "kNm/°") -KilonewtonMeterPerRadian = ("kN·m/rad", "kNm/rad") -KilonewtonMillimeterPerDegree = ("kN·mm/deg", "kNmm/deg", "kN·mm/°", "kNmm/°") -KilonewtonMillimeterPerRadian = ("kN·mm/rad", "kNmm/rad") -KilopoundForceFootPerDegrees = ("kipf·ft/°", "kip·ft/°g", "k·ft/°", "kipf·ft/deg", "kip·ft/deg", "k·ft/deg") -MeganewtonMeterPerDegree = ("MN·m/deg", "MNm/deg", "MN·m/°", "MNm/°") -MeganewtonMeterPerRadian = ("MN·m/rad", "MNm/rad") -MeganewtonMillimeterPerDegree = ("MN·mm/deg", "MNmm/deg", "MN·mm/°", "MNmm/°") -MeganewtonMillimeterPerRadian = ("MN·mm/rad", "MNmm/rad") -MicronewtonMeterPerDegree = ("µN·m/deg", "µNm/deg", "µN·m/°", "µNm/°") -MicronewtonMillimeterPerDegree = ("µN·mm/deg", "µNmm/deg", "µN·mm/°", "µNmm/°") -MicronewtonMillimeterPerRadian = ("µN·mm/rad", "µNmm/rad") -MillinewtonMeterPerDegree = ("mN·m/deg", "mNm/deg", "mN·m/°", "mNm/°") -MillinewtonMillimeterPerDegree = ("mN·mm/deg", "mNmm/deg", "mN·mm/°", "mNmm/°") -MillinewtonMillimeterPerRadian = ("mN·mm/rad", "mNmm/rad") -NanonewtonMeterPerDegree = ("nN·m/deg", "nNm/deg", "nN·m/°", "nNm/°") -NanonewtonMillimeterPerDegree = ("nN·mm/deg", "nNmm/deg", "nN·mm/°", "nNmm/°") -NanonewtonMillimeterPerRadian = ("nN·mm/rad", "nNmm/rad") -NewtonMeterPerDegree = ("N·m/deg", "Nm/deg", "N·m/°", "Nm/°") -NewtonMeterPerRadian = ("N·m/rad", "Nm/rad") -NewtonMillimeterPerDegree = ("N·mm/deg", "Nmm/deg", "N·mm/°", "Nmm/°") -NewtonMillimeterPerRadian = ("N·mm/rad", "Nmm/rad") -PoundForceFeetPerRadian = ("lbf·ft/rad") -PoundForceFootPerDegrees = ("lbf·ft/deg") +CentinewtonMeterPerDegree = "cN·m/deg","cNm/deg","cN·m/°","cNm/°" +CentinewtonMillimeterPerDegree = "cN·mm/deg","cNmm/deg","cN·mm/°","cNmm/°" +CentinewtonMillimeterPerRadian = "cN·mm/rad","cNmm/rad" +DecanewtonMeterPerDegree = "daN·m/deg","daNm/deg","daN·m/°","daNm/°" +DecanewtonMillimeterPerDegree = "daN·mm/deg","daNmm/deg","daN·mm/°","daNmm/°" +DecanewtonMillimeterPerRadian = "daN·mm/rad","daNmm/rad" +DecinewtonMeterPerDegree = "dN·m/deg","dNm/deg","dN·m/°","dNm/°" +DecinewtonMillimeterPerDegree = "dN·mm/deg","dNmm/deg","dN·mm/°","dNmm/°" +DecinewtonMillimeterPerRadian = "dN·mm/rad","dNmm/rad" +KilonewtonMeterPerDegree = "kN·m/deg","kNm/deg","kN·m/°","kNm/°" +KilonewtonMeterPerRadian = "kN·m/rad","kNm/rad" +KilonewtonMillimeterPerDegree = "kN·mm/deg","kNmm/deg","kN·mm/°","kNmm/°" +KilonewtonMillimeterPerRadian = "kN·mm/rad","kNmm/rad" +KilopoundForceFootPerDegrees = "kipf·ft/°","kip·ft/°g","k·ft/°","kipf·ft/deg","kip·ft/deg","k·ft/deg" +MeganewtonMeterPerDegree = "MN·m/deg","MNm/deg","MN·m/°","MNm/°" +MeganewtonMeterPerRadian = "MN·m/rad","MNm/rad" +MeganewtonMillimeterPerDegree = "MN·mm/deg","MNmm/deg","MN·mm/°","MNmm/°" +MeganewtonMillimeterPerRadian = "MN·mm/rad","MNmm/rad" +MicronewtonMeterPerDegree = "µN·m/deg","µNm/deg","µN·m/°","µNm/°" +MicronewtonMillimeterPerDegree = "µN·mm/deg","µNmm/deg","µN·mm/°","µNmm/°" +MicronewtonMillimeterPerRadian = "µN·mm/rad","µNmm/rad" +MillinewtonMeterPerDegree = "mN·m/deg","mNm/deg","mN·m/°","mNm/°" +MillinewtonMillimeterPerDegree = "mN·mm/deg","mNmm/deg","mN·mm/°","mNmm/°" +MillinewtonMillimeterPerRadian = "mN·mm/rad","mNmm/rad" +NanonewtonMeterPerDegree = "nN·m/deg","nNm/deg","nN·m/°","nNm/°" +NanonewtonMillimeterPerDegree = "nN·mm/deg","nNmm/deg","nN·mm/°","nNmm/°" +NanonewtonMillimeterPerRadian = "nN·mm/rad","nNmm/rad" +NewtonMeterPerDegree = "N·m/deg","Nm/deg","N·m/°","Nm/°" +NewtonMeterPerRadian = "N·m/rad","Nm/rad" +NewtonMillimeterPerDegree = "N·mm/deg","Nmm/deg","N·mm/°","Nmm/°" +NewtonMillimeterPerRadian = "N·mm/rad","Nmm/rad" +PoundForceFeetPerRadian = "lbf·ft/rad" +PoundForceFootPerDegrees = "lbf·ft/deg" diff --git a/UnitsNet/GeneratedCode/Resources/RotationalStiffnessPerLength.restext b/UnitsNet/GeneratedCode/Resources/RotationalStiffnessPerLength.restext index c567e68bcf..66ae6483fd 100644 --- a/UnitsNet/GeneratedCode/Resources/RotationalStiffnessPerLength.restext +++ b/UnitsNet/GeneratedCode/Resources/RotationalStiffnessPerLength.restext @@ -1,5 +1,5 @@ -KilonewtonMeterPerRadianPerMeter = ("kN·m/rad/m", "kNm/rad/m") -KilopoundForceFootPerDegreesPerFoot = ("kipf·ft/°/ft", "kip·ft/°/ft", "k·ft/°/ft", "kipf·ft/deg/ft", "kip·ft/deg/ft", "k·ft/deg/ft") -MeganewtonMeterPerRadianPerMeter = ("MN·m/rad/m", "MNm/rad/m") -NewtonMeterPerRadianPerMeter = ("N·m/rad/m", "Nm/rad/m") -PoundForceFootPerDegreesPerFoot = ("lbf·ft/deg/ft") +KilonewtonMeterPerRadianPerMeter = "kN·m/rad/m","kNm/rad/m" +KilopoundForceFootPerDegreesPerFoot = "kipf·ft/°/ft","kip·ft/°/ft","k·ft/°/ft","kipf·ft/deg/ft","kip·ft/deg/ft","k·ft/deg/ft" +MeganewtonMeterPerRadianPerMeter = "MN·m/rad/m","MNm/rad/m" +NewtonMeterPerRadianPerMeter = "N·m/rad/m","Nm/rad/m" +PoundForceFootPerDegreesPerFoot = "lbf·ft/deg/ft" diff --git a/UnitsNet/GeneratedCode/Resources/Scalar.restext b/UnitsNet/GeneratedCode/Resources/Scalar.restext index f2220753f7..cd805ccbbc 100644 --- a/UnitsNet/GeneratedCode/Resources/Scalar.restext +++ b/UnitsNet/GeneratedCode/Resources/Scalar.restext @@ -1 +1 @@ -Amount = ("") +Amount = "" diff --git a/UnitsNet/GeneratedCode/Resources/SolidAngle.restext b/UnitsNet/GeneratedCode/Resources/SolidAngle.restext index c526b3ee3c..ae30490048 100644 --- a/UnitsNet/GeneratedCode/Resources/SolidAngle.restext +++ b/UnitsNet/GeneratedCode/Resources/SolidAngle.restext @@ -1 +1 @@ -Steradian = ("sr") +Steradian = "sr" diff --git a/UnitsNet/GeneratedCode/Resources/SpecificEnergy.restext b/UnitsNet/GeneratedCode/Resources/SpecificEnergy.restext index 5200a8ba14..d8b7977981 100644 --- a/UnitsNet/GeneratedCode/Resources/SpecificEnergy.restext +++ b/UnitsNet/GeneratedCode/Resources/SpecificEnergy.restext @@ -1,30 +1,30 @@ -BtuPerPound = ("btu/lb") -CaloriePerGram = ("cal/g") -GigawattDayPerKilogram = ("GWd/kg") -GigawattDayPerShortTon = ("GWd/ST") -GigawattDayPerTonne = ("GWd/t") -GigawattHourPerKilogram = ("GWh/kg") -GigawattHourPerPound = ("GWh/lbs") -JoulePerKilogram = ("J/kg") -KilocaloriePerGram = ("kcal/g") -KilojoulePerKilogram = ("kJ/kg") -KilowattDayPerKilogram = ("kWd/kg") -KilowattDayPerShortTon = ("kWd/ST") -KilowattDayPerTonne = ("kWd/t") -KilowattHourPerKilogram = ("kWh/kg") -KilowattHourPerPound = ("kWh/lbs") -MegajoulePerKilogram = ("MJ/kg") -MegaJoulePerTonne = ("MJ/t") -MegawattDayPerKilogram = ("MWd/kg") -MegawattDayPerShortTon = ("MWd/ST") -MegawattDayPerTonne = ("MWd/t") -MegawattHourPerKilogram = ("MWh/kg") -MegawattHourPerPound = ("MWh/lbs") -TerawattDayPerKilogram = ("TWd/kg") -TerawattDayPerShortTon = ("TWd/ST") -TerawattDayPerTonne = ("TWd/t") -WattDayPerKilogram = ("Wd/kg") -WattDayPerShortTon = ("Wd/ST") -WattDayPerTonne = ("Wd/t") -WattHourPerKilogram = ("Wh/kg") -WattHourPerPound = ("Wh/lbs") +BtuPerPound = "btu/lb" +CaloriePerGram = "cal/g" +GigawattDayPerKilogram = "GWd/kg" +GigawattDayPerShortTon = "GWd/ST" +GigawattDayPerTonne = "GWd/t" +GigawattHourPerKilogram = "GWh/kg" +GigawattHourPerPound = "GWh/lbs" +JoulePerKilogram = "J/kg" +KilocaloriePerGram = "kcal/g" +KilojoulePerKilogram = "kJ/kg" +KilowattDayPerKilogram = "kWd/kg" +KilowattDayPerShortTon = "kWd/ST" +KilowattDayPerTonne = "kWd/t" +KilowattHourPerKilogram = "kWh/kg" +KilowattHourPerPound = "kWh/lbs" +MegajoulePerKilogram = "MJ/kg" +MegaJoulePerTonne = "MJ/t" +MegawattDayPerKilogram = "MWd/kg" +MegawattDayPerShortTon = "MWd/ST" +MegawattDayPerTonne = "MWd/t" +MegawattHourPerKilogram = "MWh/kg" +MegawattHourPerPound = "MWh/lbs" +TerawattDayPerKilogram = "TWd/kg" +TerawattDayPerShortTon = "TWd/ST" +TerawattDayPerTonne = "TWd/t" +WattDayPerKilogram = "Wd/kg" +WattDayPerShortTon = "Wd/ST" +WattDayPerTonne = "Wd/t" +WattHourPerKilogram = "Wh/kg" +WattHourPerPound = "Wh/lbs" diff --git a/UnitsNet/GeneratedCode/Resources/SpecificEntropy.restext b/UnitsNet/GeneratedCode/Resources/SpecificEntropy.restext index 6fd71a76c7..7e954cf498 100644 --- a/UnitsNet/GeneratedCode/Resources/SpecificEntropy.restext +++ b/UnitsNet/GeneratedCode/Resources/SpecificEntropy.restext @@ -1,9 +1,9 @@ -BtuPerPoundFahrenheit = ("BTU/lb·°F", "BTU/lbm·°F") -CaloriePerGramKelvin = ("cal/g.K") -JoulePerKilogramDegreeCelsius = ("J/kg.C") -JoulePerKilogramKelvin = ("J/kg.K") -KilocaloriePerGramKelvin = ("kcal/g.K") -KilojoulePerKilogramDegreeCelsius = ("kJ/kg.C") -KilojoulePerKilogramKelvin = ("kJ/kg.K") -MegajoulePerKilogramDegreeCelsius = ("MJ/kg.C") -MegajoulePerKilogramKelvin = ("MJ/kg.K") +BtuPerPoundFahrenheit = "BTU/lb·°F","BTU/lbm·°F" +CaloriePerGramKelvin = "cal/g.K" +JoulePerKilogramDegreeCelsius = "J/kg.C" +JoulePerKilogramKelvin = "J/kg.K" +KilocaloriePerGramKelvin = "kcal/g.K" +KilojoulePerKilogramDegreeCelsius = "kJ/kg.C" +KilojoulePerKilogramKelvin = "kJ/kg.K" +MegajoulePerKilogramDegreeCelsius = "MJ/kg.C" +MegajoulePerKilogramKelvin = "MJ/kg.K" diff --git a/UnitsNet/GeneratedCode/Resources/SpecificFuelConsumption.restext b/UnitsNet/GeneratedCode/Resources/SpecificFuelConsumption.restext index 0eb517caa5..2a445e9857 100644 --- a/UnitsNet/GeneratedCode/Resources/SpecificFuelConsumption.restext +++ b/UnitsNet/GeneratedCode/Resources/SpecificFuelConsumption.restext @@ -1,4 +1,4 @@ -GramPerKiloNewtonSecond = ("g/(kN�s)") -KilogramPerKilogramForceHour = ("kg/(kgf�h)") -KilogramPerKiloNewtonSecond = ("kg/(kN�s)") -PoundMassPerPoundForceHour = ("lb/(lbf·h)") +GramPerKiloNewtonSecond = "g/(kN�s)" +KilogramPerKilogramForceHour = "kg/(kgf�h)" +KilogramPerKiloNewtonSecond = "kg/(kN�s)" +PoundMassPerPoundForceHour = "lb/(lbf·h)" diff --git a/UnitsNet/GeneratedCode/Resources/SpecificVolume.restext b/UnitsNet/GeneratedCode/Resources/SpecificVolume.restext index 83ade71717..1dc989235c 100644 --- a/UnitsNet/GeneratedCode/Resources/SpecificVolume.restext +++ b/UnitsNet/GeneratedCode/Resources/SpecificVolume.restext @@ -1,3 +1,3 @@ -CubicFootPerPound = ("ft³/lb") -CubicMeterPerKilogram = ("m³/kg") -MillicubicMeterPerKilogram = ("mm³/kg") +CubicFootPerPound = "ft³/lb" +CubicMeterPerKilogram = "m³/kg" +MillicubicMeterPerKilogram = "mm³/kg" diff --git a/UnitsNet/GeneratedCode/Resources/SpecificWeight.restext b/UnitsNet/GeneratedCode/Resources/SpecificWeight.restext index ee017c4479..1164edd67a 100644 --- a/UnitsNet/GeneratedCode/Resources/SpecificWeight.restext +++ b/UnitsNet/GeneratedCode/Resources/SpecificWeight.restext @@ -1,17 +1,17 @@ -KilogramForcePerCubicCentimeter = ("kgf/cm³") -KilogramForcePerCubicMeter = ("kgf/m³") -KilogramForcePerCubicMillimeter = ("kgf/mm³") -KilonewtonPerCubicCentimeter = ("kN/cm³") -KilonewtonPerCubicMeter = ("kN/m³") -KilonewtonPerCubicMillimeter = ("kN/mm³") -KilopoundForcePerCubicFoot = ("kipf/ft³") -KilopoundForcePerCubicInch = ("kipf/in³") -MeganewtonPerCubicMeter = ("MN/m³") -NewtonPerCubicCentimeter = ("N/cm³") -NewtonPerCubicMeter = ("N/m³") -NewtonPerCubicMillimeter = ("N/mm³") -PoundForcePerCubicFoot = ("lbf/ft³") -PoundForcePerCubicInch = ("lbf/in³") -TonneForcePerCubicCentimeter = ("tf/cm³") -TonneForcePerCubicMeter = ("tf/m³") -TonneForcePerCubicMillimeter = ("tf/mm³") +KilogramForcePerCubicCentimeter = "kgf/cm³" +KilogramForcePerCubicMeter = "kgf/m³" +KilogramForcePerCubicMillimeter = "kgf/mm³" +KilonewtonPerCubicCentimeter = "kN/cm³" +KilonewtonPerCubicMeter = "kN/m³" +KilonewtonPerCubicMillimeter = "kN/mm³" +KilopoundForcePerCubicFoot = "kipf/ft³" +KilopoundForcePerCubicInch = "kipf/in³" +MeganewtonPerCubicMeter = "MN/m³" +NewtonPerCubicCentimeter = "N/cm³" +NewtonPerCubicMeter = "N/m³" +NewtonPerCubicMillimeter = "N/mm³" +PoundForcePerCubicFoot = "lbf/ft³" +PoundForcePerCubicInch = "lbf/in³" +TonneForcePerCubicCentimeter = "tf/cm³" +TonneForcePerCubicMeter = "tf/m³" +TonneForcePerCubicMillimeter = "tf/mm³" diff --git a/UnitsNet/GeneratedCode/Resources/Speed.restext b/UnitsNet/GeneratedCode/Resources/Speed.restext index cf07e1e06b..fd061b154c 100644 --- a/UnitsNet/GeneratedCode/Resources/Speed.restext +++ b/UnitsNet/GeneratedCode/Resources/Speed.restext @@ -1,33 +1,33 @@ -CentimeterPerHour = ("cm/h") -CentimeterPerMinute = ("cm/min") -CentimeterPerSecond = ("cm/s") -DecimeterPerMinute = ("dm/min") -DecimeterPerSecond = ("dm/s") -FootPerHour = ("ft/h") -FootPerMinute = ("ft/min") -FootPerSecond = ("ft/s") -InchPerHour = ("in/h") -InchPerMinute = ("in/min") -InchPerSecond = ("in/s") -KilometerPerHour = ("km/h") -KilometerPerMinute = ("km/min") -KilometerPerSecond = ("km/s") -Knot = ("kn", "kt", "knot", "knots") -Mach = ("M", "Ma", "MN", "MACH") -MeterPerHour = ("m/h") -MeterPerMinute = ("m/min") -MeterPerSecond = ("m/s") -MicrometerPerMinute = ("µm/min") -MicrometerPerSecond = ("µm/s") -MilePerHour = ("mph") -MillimeterPerHour = ("mm/h") -MillimeterPerMinute = ("mm/min") -MillimeterPerSecond = ("mm/s") -NanometerPerMinute = ("nm/min") -NanometerPerSecond = ("nm/s") -UsSurveyFootPerHour = ("ftUS/h") -UsSurveyFootPerMinute = ("ftUS/min") -UsSurveyFootPerSecond = ("ftUS/s") -YardPerHour = ("yd/h") -YardPerMinute = ("yd/min") -YardPerSecond = ("yd/s") +CentimeterPerHour = "cm/h" +CentimeterPerMinute = "cm/min" +CentimeterPerSecond = "cm/s" +DecimeterPerMinute = "dm/min" +DecimeterPerSecond = "dm/s" +FootPerHour = "ft/h" +FootPerMinute = "ft/min" +FootPerSecond = "ft/s" +InchPerHour = "in/h" +InchPerMinute = "in/min" +InchPerSecond = "in/s" +KilometerPerHour = "km/h" +KilometerPerMinute = "km/min" +KilometerPerSecond = "km/s" +Knot = "kn","kt","knot","knots" +Mach = "M","Ma","MN","MACH" +MeterPerHour = "m/h" +MeterPerMinute = "m/min" +MeterPerSecond = "m/s" +MicrometerPerMinute = "µm/min" +MicrometerPerSecond = "µm/s" +MilePerHour = "mph" +MillimeterPerHour = "mm/h" +MillimeterPerMinute = "mm/min" +MillimeterPerSecond = "mm/s" +NanometerPerMinute = "nm/min" +NanometerPerSecond = "nm/s" +UsSurveyFootPerHour = "ftUS/h" +UsSurveyFootPerMinute = "ftUS/min" +UsSurveyFootPerSecond = "ftUS/s" +YardPerHour = "yd/h" +YardPerMinute = "yd/min" +YardPerSecond = "yd/s" diff --git a/UnitsNet/GeneratedCode/Resources/Speed.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Speed.ru-RU.restext index b57c9db687..8e20c00e8f 100644 --- a/UnitsNet/GeneratedCode/Resources/Speed.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Speed.ru-RU.restext @@ -1,24 +1,24 @@ -CentimeterPerHour = ("см/ч") -CentimeterPerMinute = ("см/мин") -CentimeterPerSecond = ("см/с") -DecimeterPerMinute = ("дм/мин") -DecimeterPerSecond = ("дм/с") -FootPerHour = ("фут/ч") -FootPerMinute = ("фут/мин") -FootPerSecond = ("фут/с") -KilometerPerHour = ("км/ч") -KilometerPerMinute = ("км/мин") -KilometerPerSecond = ("км/с") -Knot = ("уз.") -Mach = ("мах") -MeterPerHour = ("м/ч") -MeterPerMinute = ("м/мин") -MeterPerSecond = ("м/с") -MicrometerPerMinute = ("мкм/мин") -MicrometerPerSecond = ("мкм/с") -MilePerHour = ("миль/ч") -MillimeterPerHour = ("мм/ч") -MillimeterPerMinute = ("мм/мин") -MillimeterPerSecond = ("мм/с") -NanometerPerMinute = ("нм/мин") -NanometerPerSecond = ("нм/с") +CentimeterPerHour = "см/ч" +CentimeterPerMinute = "см/мин" +CentimeterPerSecond = "см/с" +DecimeterPerMinute = "дм/мин" +DecimeterPerSecond = "дм/с" +FootPerHour = "фут/ч" +FootPerMinute = "фут/мин" +FootPerSecond = "фут/с" +KilometerPerHour = "км/ч" +KilometerPerMinute = "км/мин" +KilometerPerSecond = "км/с" +Knot = "уз." +Mach = "мах" +MeterPerHour = "м/ч" +MeterPerMinute = "м/мин" +MeterPerSecond = "м/с" +MicrometerPerMinute = "мкм/мин" +MicrometerPerSecond = "мкм/с" +MilePerHour = "миль/ч" +MillimeterPerHour = "мм/ч" +MillimeterPerMinute = "мм/мин" +MillimeterPerSecond = "мм/с" +NanometerPerMinute = "нм/мин" +NanometerPerSecond = "нм/с" diff --git a/UnitsNet/GeneratedCode/Resources/StandardVolumeFlow.restext b/UnitsNet/GeneratedCode/Resources/StandardVolumeFlow.restext index c97c3c0ea0..d1aadf2923 100644 --- a/UnitsNet/GeneratedCode/Resources/StandardVolumeFlow.restext +++ b/UnitsNet/GeneratedCode/Resources/StandardVolumeFlow.restext @@ -1,9 +1,9 @@ -StandardCubicCentimeterPerMinute = ("sccm") -StandardCubicFootPerHour = ("scfh") -StandardCubicFootPerMinute = ("scfm") -StandardCubicFootPerSecond = ("Sft³/s") -StandardCubicMeterPerDay = ("Sm³/d") -StandardCubicMeterPerHour = ("Sm³/h") -StandardCubicMeterPerMinute = ("Sm³/min") -StandardCubicMeterPerSecond = ("Sm³/s") -StandardLiterPerMinute = ("slm") +StandardCubicCentimeterPerMinute = "sccm" +StandardCubicFootPerHour = "scfh" +StandardCubicFootPerMinute = "scfm" +StandardCubicFootPerSecond = "Sft³/s" +StandardCubicMeterPerDay = "Sm³/d" +StandardCubicMeterPerHour = "Sm³/h" +StandardCubicMeterPerMinute = "Sm³/min" +StandardCubicMeterPerSecond = "Sm³/s" +StandardLiterPerMinute = "slm" diff --git a/UnitsNet/GeneratedCode/Resources/Temperature.restext b/UnitsNet/GeneratedCode/Resources/Temperature.restext index 3179bd6910..e3215fcaf5 100644 --- a/UnitsNet/GeneratedCode/Resources/Temperature.restext +++ b/UnitsNet/GeneratedCode/Resources/Temperature.restext @@ -1,10 +1,10 @@ -DegreeCelsius = ("°C") -DegreeDelisle = ("°De") -DegreeFahrenheit = ("°F") -DegreeNewton = ("°N") -DegreeRankine = ("°R") -DegreeReaumur = ("°Ré") -DegreeRoemer = ("°Rø") -Kelvin = ("K") -MillidegreeCelsius = ("m°C") -SolarTemperature = ("T⊙") +DegreeCelsius = "°C" +DegreeDelisle = "°De" +DegreeFahrenheit = "°F" +DegreeNewton = "°N" +DegreeRankine = "°R" +DegreeReaumur = "°Ré" +DegreeRoemer = "°Rø" +Kelvin = "K" +MillidegreeCelsius = "m°C" +SolarTemperature = "T⊙" diff --git a/UnitsNet/GeneratedCode/Resources/TemperatureChangeRate.restext b/UnitsNet/GeneratedCode/Resources/TemperatureChangeRate.restext index 8255db7990..dc0f2c32e6 100644 --- a/UnitsNet/GeneratedCode/Resources/TemperatureChangeRate.restext +++ b/UnitsNet/GeneratedCode/Resources/TemperatureChangeRate.restext @@ -1,10 +1,10 @@ -CentidegreeCelsiusPerSecond = ("c°C/s") -DecadegreeCelsiusPerSecond = ("da°C/s") -DecidegreeCelsiusPerSecond = ("d°C/s") -DegreeCelsiusPerMinute = ("°C/min") -DegreeCelsiusPerSecond = ("°C/s") -HectodegreeCelsiusPerSecond = ("h°C/s") -KilodegreeCelsiusPerSecond = ("k°C/s") -MicrodegreeCelsiusPerSecond = ("µ°C/s") -MillidegreeCelsiusPerSecond = ("m°C/s") -NanodegreeCelsiusPerSecond = ("n°C/s") +CentidegreeCelsiusPerSecond = "c°C/s" +DecadegreeCelsiusPerSecond = "da°C/s" +DecidegreeCelsiusPerSecond = "d°C/s" +DegreeCelsiusPerMinute = "°C/min" +DegreeCelsiusPerSecond = "°C/s" +HectodegreeCelsiusPerSecond = "h°C/s" +KilodegreeCelsiusPerSecond = "k°C/s" +MicrodegreeCelsiusPerSecond = "µ°C/s" +MillidegreeCelsiusPerSecond = "m°C/s" +NanodegreeCelsiusPerSecond = "n°C/s" diff --git a/UnitsNet/GeneratedCode/Resources/TemperatureDelta.restext b/UnitsNet/GeneratedCode/Resources/TemperatureDelta.restext index 3d1c2de632..bcef837fa3 100644 --- a/UnitsNet/GeneratedCode/Resources/TemperatureDelta.restext +++ b/UnitsNet/GeneratedCode/Resources/TemperatureDelta.restext @@ -1,9 +1,9 @@ -DegreeCelsius = ("∆°C") -DegreeDelisle = ("∆°De") -DegreeFahrenheit = ("∆°F") -DegreeNewton = ("∆°N") -DegreeRankine = ("∆°R") -DegreeReaumur = ("∆°Ré") -DegreeRoemer = ("∆°Rø") -Kelvin = ("∆K") -MillidegreeCelsius = ("∆m°C") +DegreeCelsius = "∆°C" +DegreeDelisle = "∆°De" +DegreeFahrenheit = "∆°F" +DegreeNewton = "∆°N" +DegreeRankine = "∆°R" +DegreeReaumur = "∆°Ré" +DegreeRoemer = "∆°Rø" +Kelvin = "∆K" +MillidegreeCelsius = "∆m°C" diff --git a/UnitsNet/GeneratedCode/Resources/TemperatureGradient.restext b/UnitsNet/GeneratedCode/Resources/TemperatureGradient.restext index a05b6b13dd..8a3b09ee56 100644 --- a/UnitsNet/GeneratedCode/Resources/TemperatureGradient.restext +++ b/UnitsNet/GeneratedCode/Resources/TemperatureGradient.restext @@ -1,4 +1,4 @@ -DegreeCelsiusPerKilometer = ("∆°C/km") -DegreeCelsiusPerMeter = ("∆°C/m") -DegreeFahrenheitPerFoot = ("∆°F/ft") -KelvinPerMeter = ("∆°K/m") +DegreeCelsiusPerKilometer = "∆°C/km" +DegreeCelsiusPerMeter = "∆°C/m" +DegreeFahrenheitPerFoot = "∆°F/ft" +KelvinPerMeter = "∆°K/m" diff --git a/UnitsNet/GeneratedCode/Resources/ThermalConductivity.restext b/UnitsNet/GeneratedCode/Resources/ThermalConductivity.restext index 947a9e3dbf..7a94dfc47f 100644 --- a/UnitsNet/GeneratedCode/Resources/ThermalConductivity.restext +++ b/UnitsNet/GeneratedCode/Resources/ThermalConductivity.restext @@ -1,2 +1,2 @@ -BtuPerHourFootFahrenheit = ("BTU/h·ft·°F") -WattPerMeterKelvin = ("W/m·K") +BtuPerHourFootFahrenheit = "BTU/h·ft·°F" +WattPerMeterKelvin = "W/m·K" diff --git a/UnitsNet/GeneratedCode/Resources/ThermalResistance.restext b/UnitsNet/GeneratedCode/Resources/ThermalResistance.restext index 192f9991cf..e1e7fd49c8 100644 --- a/UnitsNet/GeneratedCode/Resources/ThermalResistance.restext +++ b/UnitsNet/GeneratedCode/Resources/ThermalResistance.restext @@ -1,6 +1,6 @@ -HourSquareFeetDegreeFahrenheitPerBtu = ("Hrft²°F/Btu") -SquareCentimeterHourDegreeCelsiusPerKilocalorie = ("cm²Hr°C/kcal") -SquareCentimeterKelvinPerWatt = ("cm²K/W") -SquareMeterDegreeCelsiusPerWatt = ("m²°C/W") -SquareMeterKelvinPerKilowatt = ("m²K/kW") -SquareMeterKelvinPerWatt = ("m²K/W") +HourSquareFeetDegreeFahrenheitPerBtu = "Hrft²°F/Btu" +SquareCentimeterHourDegreeCelsiusPerKilocalorie = "cm²Hr°C/kcal" +SquareCentimeterKelvinPerWatt = "cm²K/W" +SquareMeterDegreeCelsiusPerWatt = "m²°C/W" +SquareMeterKelvinPerKilowatt = "m²K/kW" +SquareMeterKelvinPerWatt = "m²K/W" diff --git a/UnitsNet/GeneratedCode/Resources/Torque.restext b/UnitsNet/GeneratedCode/Resources/Torque.restext index ac732fd9c3..231ce34d3c 100644 --- a/UnitsNet/GeneratedCode/Resources/Torque.restext +++ b/UnitsNet/GeneratedCode/Resources/Torque.restext @@ -1,25 +1,25 @@ -GramForceCentimeter = ("gf·cm") -GramForceMeter = ("gf·m") -GramForceMillimeter = ("gf·mm") -KilogramForceCentimeter = ("kgf·cm") -KilogramForceMeter = ("kgf·m") -KilogramForceMillimeter = ("kgf·mm") -KilonewtonCentimeter = ("kN·cm") -KilonewtonMeter = ("kN·m") -KilonewtonMillimeter = ("kN·mm") -KilopoundForceFoot = ("kipf·ft") -KilopoundForceInch = ("kipf·in") -MeganewtonCentimeter = ("MN·cm") -MeganewtonMeter = ("MN·m") -MeganewtonMillimeter = ("MN·mm") -MegapoundForceFoot = ("Mlbf·ft") -MegapoundForceInch = ("Mlbf·in") -NewtonCentimeter = ("N·cm") -NewtonMeter = ("N·m") -NewtonMillimeter = ("N·mm") -PoundalFoot = ("pdl·ft") -PoundForceFoot = ("lbf·ft") -PoundForceInch = ("lbf·in") -TonneForceCentimeter = ("tf·cm") -TonneForceMeter = ("tf·m") -TonneForceMillimeter = ("tf·mm") +GramForceCentimeter = "gf·cm" +GramForceMeter = "gf·m" +GramForceMillimeter = "gf·mm" +KilogramForceCentimeter = "kgf·cm" +KilogramForceMeter = "kgf·m" +KilogramForceMillimeter = "kgf·mm" +KilonewtonCentimeter = "kN·cm" +KilonewtonMeter = "kN·m" +KilonewtonMillimeter = "kN·mm" +KilopoundForceFoot = "kipf·ft" +KilopoundForceInch = "kipf·in" +MeganewtonCentimeter = "MN·cm" +MeganewtonMeter = "MN·m" +MeganewtonMillimeter = "MN·mm" +MegapoundForceFoot = "Mlbf·ft" +MegapoundForceInch = "Mlbf·in" +NewtonCentimeter = "N·cm" +NewtonMeter = "N·m" +NewtonMillimeter = "N·mm" +PoundalFoot = "pdl·ft" +PoundForceFoot = "lbf·ft" +PoundForceInch = "lbf·in" +TonneForceCentimeter = "tf·cm" +TonneForceMeter = "tf·m" +TonneForceMillimeter = "tf·mm" diff --git a/UnitsNet/GeneratedCode/Resources/Torque.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Torque.ru-RU.restext index c5f1e94097..3e575f5abc 100644 --- a/UnitsNet/GeneratedCode/Resources/Torque.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Torque.ru-RU.restext @@ -1,3 +1,3 @@ -KilonewtonMeter = ("кН·м") -MeganewtonMeter = ("МН·м") -NewtonMeter = ("Н·м") +KilonewtonMeter = "кН·м" +MeganewtonMeter = "МН·м" +NewtonMeter = "Н·м" diff --git a/UnitsNet/GeneratedCode/Resources/TorquePerLength.restext b/UnitsNet/GeneratedCode/Resources/TorquePerLength.restext index dcaf3c40c6..e4a044c018 100644 --- a/UnitsNet/GeneratedCode/Resources/TorquePerLength.restext +++ b/UnitsNet/GeneratedCode/Resources/TorquePerLength.restext @@ -1,21 +1,21 @@ -KilogramForceCentimeterPerMeter = ("kgf·cm/m") -KilogramForceMeterPerMeter = ("kgf·m/m") -KilogramForceMillimeterPerMeter = ("kgf·mm/m") -KilonewtonCentimeterPerMeter = ("kN·cm/m") -KilonewtonMeterPerMeter = ("kN·m/m") -KilonewtonMillimeterPerMeter = ("kN·mm/m") -KilopoundForceFootPerFoot = ("kipf·ft/ft") -KilopoundForceInchPerFoot = ("kipf·in/ft") -MeganewtonCentimeterPerMeter = ("MN·cm/m") -MeganewtonMeterPerMeter = ("MN·m/m") -MeganewtonMillimeterPerMeter = ("MN·mm/m") -MegapoundForceFootPerFoot = ("Mlbf·ft/ft") -MegapoundForceInchPerFoot = ("Mlbf·in/ft") -NewtonCentimeterPerMeter = ("N·cm/m") -NewtonMeterPerMeter = ("N·m/m") -NewtonMillimeterPerMeter = ("N·mm/m") -PoundForceFootPerFoot = ("lbf·ft/ft") -PoundForceInchPerFoot = ("lbf·in/ft") -TonneForceCentimeterPerMeter = ("tf·cm/m") -TonneForceMeterPerMeter = ("tf·m/m") -TonneForceMillimeterPerMeter = ("tf·mm/m") +KilogramForceCentimeterPerMeter = "kgf·cm/m" +KilogramForceMeterPerMeter = "kgf·m/m" +KilogramForceMillimeterPerMeter = "kgf·mm/m" +KilonewtonCentimeterPerMeter = "kN·cm/m" +KilonewtonMeterPerMeter = "kN·m/m" +KilonewtonMillimeterPerMeter = "kN·mm/m" +KilopoundForceFootPerFoot = "kipf·ft/ft" +KilopoundForceInchPerFoot = "kipf·in/ft" +MeganewtonCentimeterPerMeter = "MN·cm/m" +MeganewtonMeterPerMeter = "MN·m/m" +MeganewtonMillimeterPerMeter = "MN·mm/m" +MegapoundForceFootPerFoot = "Mlbf·ft/ft" +MegapoundForceInchPerFoot = "Mlbf·in/ft" +NewtonCentimeterPerMeter = "N·cm/m" +NewtonMeterPerMeter = "N·m/m" +NewtonMillimeterPerMeter = "N·mm/m" +PoundForceFootPerFoot = "lbf·ft/ft" +PoundForceInchPerFoot = "lbf·in/ft" +TonneForceCentimeterPerMeter = "tf·cm/m" +TonneForceMeterPerMeter = "tf·m/m" +TonneForceMillimeterPerMeter = "tf·mm/m" diff --git a/UnitsNet/GeneratedCode/Resources/TorquePerLength.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/TorquePerLength.ru-RU.restext index 5b3cceda8c..868a40f2bf 100644 --- a/UnitsNet/GeneratedCode/Resources/TorquePerLength.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/TorquePerLength.ru-RU.restext @@ -1,3 +1,3 @@ -KilonewtonMeterPerMeter = ("кН·м/м") -MeganewtonMeterPerMeter = ("МН·м/м") -NewtonMeterPerMeter = ("Н·м/м") +KilonewtonMeterPerMeter = "кН·м/м" +MeganewtonMeterPerMeter = "МН·м/м" +NewtonMeterPerMeter = "Н·м/м" diff --git a/UnitsNet/GeneratedCode/Resources/Turbidity.restext b/UnitsNet/GeneratedCode/Resources/Turbidity.restext index 42332b88b9..2f7b5fdcd1 100644 --- a/UnitsNet/GeneratedCode/Resources/Turbidity.restext +++ b/UnitsNet/GeneratedCode/Resources/Turbidity.restext @@ -1 +1 @@ -NTU = ("NTU") +NTU = "NTU" diff --git a/UnitsNet/GeneratedCode/Resources/VitaminA.restext b/UnitsNet/GeneratedCode/Resources/VitaminA.restext index f8da7c7e6c..70d99491fb 100644 --- a/UnitsNet/GeneratedCode/Resources/VitaminA.restext +++ b/UnitsNet/GeneratedCode/Resources/VitaminA.restext @@ -1 +1 @@ -InternationalUnit = ("IU") +InternationalUnit = "IU" diff --git a/UnitsNet/GeneratedCode/Resources/Volume.fr-CA.restext b/UnitsNet/GeneratedCode/Resources/Volume.fr-CA.restext index 3e9a5b7ae1..a6fc899ea2 100644 --- a/UnitsNet/GeneratedCode/Resources/Volume.fr-CA.restext +++ b/UnitsNet/GeneratedCode/Resources/Volume.fr-CA.restext @@ -1 +1 @@ -BoardFoot = ("pmp", "pied-planche", "pied de planche") +BoardFoot = "pmp","pied-planche","pied de planche" diff --git a/UnitsNet/GeneratedCode/Resources/Volume.restext b/UnitsNet/GeneratedCode/Resources/Volume.restext index b9c1db3619..510192b68a 100644 --- a/UnitsNet/GeneratedCode/Resources/Volume.restext +++ b/UnitsNet/GeneratedCode/Resources/Volume.restext @@ -1,46 +1,46 @@ -AcreFoot = ("ac-ft", "acre-foot", "acre-feet") -BoardFoot = ("bf", "board foot", "board feet") -Centiliter = ("cl") -CubicCentimeter = ("cm³") -CubicDecimeter = ("dm³") -CubicFoot = ("ft³") -CubicHectometer = ("hm³") -CubicInch = ("in³") -CubicKilometer = ("km³") -CubicMeter = ("m³") -CubicMicrometer = ("µm³") -CubicMile = ("mi³") -CubicMillimeter = ("mm³") -CubicYard = ("yd³") -Decaliter = ("dal") -DecausGallon = ("dagal (U.S.)") -Deciliter = ("dl") -DeciusGallon = ("dgal (U.S.)") -HectocubicFoot = ("hft³") -HectocubicMeter = ("hm³") -Hectoliter = ("hl") -HectousGallon = ("hgal (U.S.)") -ImperialBeerBarrel = ("bl (imp.)") -ImperialGallon = ("gal (imp.)") -ImperialOunce = ("oz (imp.)") -ImperialPint = ("pt (imp.)", "UK pt", "pt", "p") -KilocubicFoot = ("kft³") -KilocubicMeter = ("km³") -KiloimperialGallon = ("kgal (imp.)") -Kiloliter = ("kl") -KilousGallon = ("kgal (U.S.)") -Liter = ("l") -MegacubicFoot = ("Mft³") -MegaimperialGallon = ("Mgal (imp.)") -Megaliter = ("Ml") -MegausGallon = ("Mgal (U.S.)") -MetricTeaspoon = ("tsp", "t", "ts", "tspn", "t.", "ts.", "tsp.", "tspn.", "teaspoon") -Microliter = ("µl") -Milliliter = ("ml") -Nanoliter = ("nl") -OilBarrel = ("bbl") -UsBeerBarrel = ("bl (U.S.)") -UsGallon = ("gal (U.S.)") -UsOunce = ("oz (U.S.)") -UsPint = ("pt (U.S.)") -UsQuart = ("qt (U.S.)") +AcreFoot = "ac-ft","acre-foot","acre-feet" +BoardFoot = "bf","board foot","board feet" +Centiliter = "cl" +CubicCentimeter = "cm³" +CubicDecimeter = "dm³" +CubicFoot = "ft³" +CubicHectometer = "hm³" +CubicInch = "in³" +CubicKilometer = "km³" +CubicMeter = "m³" +CubicMicrometer = "µm³" +CubicMile = "mi³" +CubicMillimeter = "mm³" +CubicYard = "yd³" +Decaliter = "dal" +DecausGallon = "dagal (U.S.)" +Deciliter = "dl" +DeciusGallon = "dgal (U.S.)" +HectocubicFoot = "hft³" +HectocubicMeter = "hm³" +Hectoliter = "hl" +HectousGallon = "hgal (U.S.)" +ImperialBeerBarrel = "bl (imp.)" +ImperialGallon = "gal (imp.)" +ImperialOunce = "oz (imp.)" +ImperialPint = "pt (imp.)","UK pt","pt","p" +KilocubicFoot = "kft³" +KilocubicMeter = "km³" +KiloimperialGallon = "kgal (imp.)" +Kiloliter = "kl" +KilousGallon = "kgal (U.S.)" +Liter = "l" +MegacubicFoot = "Mft³" +MegaimperialGallon = "Mgal (imp.)" +Megaliter = "Ml" +MegausGallon = "Mgal (U.S.)" +MetricTeaspoon = "tsp","t","ts","tspn","t.","ts.","tsp.","tspn.","teaspoon" +Microliter = "µl" +Milliliter = "ml" +Nanoliter = "nl" +OilBarrel = "bbl" +UsBeerBarrel = "bl (U.S.)" +UsGallon = "gal (U.S.)" +UsOunce = "oz (U.S.)" +UsPint = "pt (U.S.)" +UsQuart = "qt (U.S.)" diff --git a/UnitsNet/GeneratedCode/Resources/Volume.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Volume.ru-RU.restext index b19c29a076..b5908cf856 100644 --- a/UnitsNet/GeneratedCode/Resources/Volume.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Volume.ru-RU.restext @@ -1,37 +1,37 @@ -Centiliter = ("сл") -CubicCentimeter = ("см³") -CubicDecimeter = ("дм³") -CubicFoot = ("фут³") -CubicHectometer = ("гм³") -CubicInch = ("дюйм³") -CubicKilometer = ("км³") -CubicMeter = ("м³") -CubicMicrometer = ("мкм³") -CubicMile = ("миля³") -CubicMillimeter = ("мм³") -CubicYard = ("ярд³") -Decaliter = ("дал") -DecausGallon = ("даАмериканский галлон") -Deciliter = ("дл") -DeciusGallon = ("дАмериканский галлон") -HectocubicFoot = ("гфут³") -HectocubicMeter = ("гм³") -Hectoliter = ("гл") -HectousGallon = ("гАмериканский галлон") -ImperialGallon = ("Английский галлон") -ImperialOunce = ("Английская унция") -KilocubicFoot = ("кфут³") -KilocubicMeter = ("км³") -KiloimperialGallon = ("кАнглийский галлон") -Kiloliter = ("кл") -KilousGallon = ("кАмериканский галлон") -Liter = ("л") -MegacubicFoot = ("Мфут³") -MegaimperialGallon = ("МАнглийский галлон") -Megaliter = ("Мл") -MegausGallon = ("МАмериканский галлон") -Microliter = ("мкл") -Milliliter = ("мл") -Nanoliter = ("нл") -UsGallon = ("Американский галлон") -UsOunce = ("Американская унция") +Centiliter = "сл" +CubicCentimeter = "см³" +CubicDecimeter = "дм³" +CubicFoot = "фут³" +CubicHectometer = "гм³" +CubicInch = "дюйм³" +CubicKilometer = "км³" +CubicMeter = "м³" +CubicMicrometer = "мкм³" +CubicMile = "миля³" +CubicMillimeter = "мм³" +CubicYard = "ярд³" +Decaliter = "дал" +DecausGallon = "даАмериканский галлон" +Deciliter = "дл" +DeciusGallon = "дАмериканский галлон" +HectocubicFoot = "гфут³" +HectocubicMeter = "гм³" +Hectoliter = "гл" +HectousGallon = "гАмериканский галлон" +ImperialGallon = "Английский галлон" +ImperialOunce = "Английская унция" +KilocubicFoot = "кфут³" +KilocubicMeter = "км³" +KiloimperialGallon = "кАнглийский галлон" +Kiloliter = "кл" +KilousGallon = "кАмериканский галлон" +Liter = "л" +MegacubicFoot = "Мфут³" +MegaimperialGallon = "МАнглийский галлон" +Megaliter = "Мл" +MegausGallon = "МАмериканский галлон" +Microliter = "мкл" +Milliliter = "мл" +Nanoliter = "нл" +UsGallon = "Американский галлон" +UsOunce = "Американская унция" diff --git a/UnitsNet/GeneratedCode/Resources/VolumeConcentration.restext b/UnitsNet/GeneratedCode/Resources/VolumeConcentration.restext index ad9b6fc2c0..bda5257c30 100644 --- a/UnitsNet/GeneratedCode/Resources/VolumeConcentration.restext +++ b/UnitsNet/GeneratedCode/Resources/VolumeConcentration.restext @@ -1,20 +1,20 @@ -CentilitersPerLiter = ("cL/L") -CentilitersPerMililiter = ("cL/mL") -DecilitersPerLiter = ("dL/L") -DecilitersPerMililiter = ("dL/mL") -DecimalFraction = ("") -LitersPerLiter = ("L/L") -LitersPerMililiter = ("L/mL") -MicrolitersPerLiter = ("µL/L") -MicrolitersPerMililiter = ("µL/mL") -MillilitersPerLiter = ("mL/L") -MillilitersPerMililiter = ("mL/mL") -NanolitersPerLiter = ("nL/L") -NanolitersPerMililiter = ("nL/mL") -PartPerBillion = ("ppb") -PartPerMillion = ("ppm") -PartPerThousand = ("‰") -PartPerTrillion = ("ppt") -Percent = ("%", "% (v/v)") -PicolitersPerLiter = ("pL/L") -PicolitersPerMililiter = ("pL/mL") +CentilitersPerLiter = "cL/L" +CentilitersPerMililiter = "cL/mL" +DecilitersPerLiter = "dL/L" +DecilitersPerMililiter = "dL/mL" +DecimalFraction = "" +LitersPerLiter = "L/L" +LitersPerMililiter = "L/mL" +MicrolitersPerLiter = "µL/L" +MicrolitersPerMililiter = "µL/mL" +MillilitersPerLiter = "mL/L" +MillilitersPerMililiter = "mL/mL" +NanolitersPerLiter = "nL/L" +NanolitersPerMililiter = "nL/mL" +PartPerBillion = "ppb" +PartPerMillion = "ppm" +PartPerThousand = "‰" +PartPerTrillion = "ppt" +Percent = "%","% (v/v)" +PicolitersPerLiter = "pL/L" +PicolitersPerMililiter = "pL/mL" diff --git a/UnitsNet/GeneratedCode/Resources/VolumeFlow.restext b/UnitsNet/GeneratedCode/Resources/VolumeFlow.restext index 36d16bd97a..7ecf42fd0b 100644 --- a/UnitsNet/GeneratedCode/Resources/VolumeFlow.restext +++ b/UnitsNet/GeneratedCode/Resources/VolumeFlow.restext @@ -1,62 +1,62 @@ -AcreFootPerDay = ("af/d") -AcreFootPerHour = ("af/h") -AcreFootPerMinute = ("af/m") -AcreFootPerSecond = ("af/s") -CentiliterPerDay = ("cl/day", "cL/d", "cLPD") -CentiliterPerHour = ("cL/h", "cLPH") -CentiliterPerMinute = ("cL/min", "cLPM") -CentiliterPerSecond = ("cL/s", "cLPS") -CubicCentimeterPerMinute = ("cm³/min") -CubicDecimeterPerMinute = ("dm³/min") -CubicFootPerHour = ("ft³/h", "cf/hr") -CubicFootPerMinute = ("ft³/min", "CFM") -CubicFootPerSecond = ("ft³/s") -CubicMeterPerDay = ("m³/d") -CubicMeterPerHour = ("m³/h") -CubicMeterPerMinute = ("m³/min") -CubicMeterPerSecond = ("m³/s") -CubicMillimeterPerSecond = ("mm³/s") -CubicYardPerDay = ("cy/day") -CubicYardPerHour = ("yd³/h") -CubicYardPerMinute = ("yd³/min") -CubicYardPerSecond = ("yd³/s") -DeciliterPerDay = ("dl/day", "dL/d", "dLPD") -DeciliterPerHour = ("dL/h", "dLPH") -DeciliterPerMinute = ("dL/min", "dLPM") -DeciliterPerSecond = ("dL/s", "dLPS") -KiloliterPerDay = ("kl/day", "kL/d", "kLPD") -KiloliterPerHour = ("kL/h", "kLPH") -KiloliterPerMinute = ("kL/min", "kLPM") -KiloliterPerSecond = ("kL/s", "kLPS") -KilousGallonPerMinute = ("kgal (U.S.)/min", "KGPM") -LiterPerDay = ("l/day", "L/d", "LPD") -LiterPerHour = ("L/h", "LPH") -LiterPerMinute = ("L/min", "LPM") -LiterPerSecond = ("L/s", "LPS") -MegaliterPerDay = ("Ml/day", "ML/d", "MLPD") -MegaukGallonPerSecond = ("Mgal (imp.)/s") -MicroliterPerDay = ("µl/day", "µL/d", "µLPD") -MicroliterPerHour = ("µL/h", "µLPH") -MicroliterPerMinute = ("µL/min", "µLPM") -MicroliterPerSecond = ("µL/s", "µLPS") -MilliliterPerDay = ("ml/day", "mL/d", "mLPD") -MilliliterPerHour = ("mL/h", "mLPH") -MilliliterPerMinute = ("mL/min", "mLPM") -MilliliterPerSecond = ("mL/s", "mLPS") -MillionUsGallonPerDay = ("MGD") -NanoliterPerDay = ("nl/day", "nL/d", "nLPD") -NanoliterPerHour = ("nL/h", "nLPH") -NanoliterPerMinute = ("nL/min", "nLPM") -NanoliterPerSecond = ("nL/s", "nLPS") -OilBarrelPerDay = ("bbl/d", "BOPD") -OilBarrelPerHour = ("bbl/hr", "bph") -OilBarrelPerMinute = ("bbl/min", "bpm") -OilBarrelPerSecond = ("bbl/s") -UkGallonPerDay = ("gal (U. K.)/d") -UkGallonPerHour = ("gal (imp.)/h") -UkGallonPerMinute = ("gal (imp.)/min") -UkGallonPerSecond = ("gal (imp.)/s") -UsGallonPerDay = ("gpd", "gal/d") -UsGallonPerHour = ("gal (U.S.)/h") -UsGallonPerMinute = ("gal (U.S.)/min", "GPM") -UsGallonPerSecond = ("gal (U.S.)/s") +AcreFootPerDay = "af/d" +AcreFootPerHour = "af/h" +AcreFootPerMinute = "af/m" +AcreFootPerSecond = "af/s" +CentiliterPerDay = "cl/day","cL/d","cLPD" +CentiliterPerHour = "cL/h","cLPH" +CentiliterPerMinute = "cL/min","cLPM" +CentiliterPerSecond = "cL/s","cLPS" +CubicCentimeterPerMinute = "cm³/min" +CubicDecimeterPerMinute = "dm³/min" +CubicFootPerHour = "ft³/h","cf/hr" +CubicFootPerMinute = "ft³/min","CFM" +CubicFootPerSecond = "ft³/s" +CubicMeterPerDay = "m³/d" +CubicMeterPerHour = "m³/h" +CubicMeterPerMinute = "m³/min" +CubicMeterPerSecond = "m³/s" +CubicMillimeterPerSecond = "mm³/s" +CubicYardPerDay = "cy/day" +CubicYardPerHour = "yd³/h" +CubicYardPerMinute = "yd³/min" +CubicYardPerSecond = "yd³/s" +DeciliterPerDay = "dl/day","dL/d","dLPD" +DeciliterPerHour = "dL/h","dLPH" +DeciliterPerMinute = "dL/min","dLPM" +DeciliterPerSecond = "dL/s","dLPS" +KiloliterPerDay = "kl/day","kL/d","kLPD" +KiloliterPerHour = "kL/h","kLPH" +KiloliterPerMinute = "kL/min","kLPM" +KiloliterPerSecond = "kL/s","kLPS" +KilousGallonPerMinute = "kgal (U.S.)/min","KGPM" +LiterPerDay = "l/day","L/d","LPD" +LiterPerHour = "L/h","LPH" +LiterPerMinute = "L/min","LPM" +LiterPerSecond = "L/s","LPS" +MegaliterPerDay = "Ml/day","ML/d","MLPD" +MegaukGallonPerSecond = "Mgal (imp.)/s" +MicroliterPerDay = "µl/day","µL/d","µLPD" +MicroliterPerHour = "µL/h","µLPH" +MicroliterPerMinute = "µL/min","µLPM" +MicroliterPerSecond = "µL/s","µLPS" +MilliliterPerDay = "ml/day","mL/d","mLPD" +MilliliterPerHour = "mL/h","mLPH" +MilliliterPerMinute = "mL/min","mLPM" +MilliliterPerSecond = "mL/s","mLPS" +MillionUsGallonPerDay = "MGD" +NanoliterPerDay = "nl/day","nL/d","nLPD" +NanoliterPerHour = "nL/h","nLPH" +NanoliterPerMinute = "nL/min","nLPM" +NanoliterPerSecond = "nL/s","nLPS" +OilBarrelPerDay = "bbl/d","BOPD" +OilBarrelPerHour = "bbl/hr","bph" +OilBarrelPerMinute = "bbl/min","bpm" +OilBarrelPerSecond = "bbl/s" +UkGallonPerDay = "gal (U. K.)/d" +UkGallonPerHour = "gal (imp.)/h" +UkGallonPerMinute = "gal (imp.)/min" +UkGallonPerSecond = "gal (imp.)/s" +UsGallonPerDay = "gpd","gal/d" +UsGallonPerHour = "gal (U.S.)/h" +UsGallonPerMinute = "gal (U.S.)/min","GPM" +UsGallonPerSecond = "gal (U.S.)/s" diff --git a/UnitsNet/GeneratedCode/Resources/VolumeFlow.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/VolumeFlow.ru-RU.restext index 147a06b354..349a9216e7 100644 --- a/UnitsNet/GeneratedCode/Resources/VolumeFlow.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/VolumeFlow.ru-RU.restext @@ -1,27 +1,27 @@ -CentiliterPerHour = ("сл/ч") -CentiliterPerMinute = ("сл/мин") -CentiliterPerSecond = ("сл/c") -CubicCentimeterPerMinute = ("см³/мин") -CubicDecimeterPerMinute = ("дм³/мин") -CubicMeterPerHour = ("м³/ч") -CubicMeterPerMinute = ("м³/мин") -CubicMeterPerSecond = ("м³/с") -CubicMillimeterPerSecond = ("мм³/с") -DeciliterPerHour = ("дл/ч") -DeciliterPerMinute = ("дл/мин") -DeciliterPerSecond = ("дл/c") -KiloliterPerHour = ("кл/ч") -KiloliterPerMinute = ("кл/мин") -KiloliterPerSecond = ("кл/c") -LiterPerHour = ("л/ч") -LiterPerMinute = ("л/мин") -LiterPerSecond = ("л/c") -MicroliterPerHour = ("мкл/ч") -MicroliterPerMinute = ("мкл/мин") -MicroliterPerSecond = ("мкл/c") -MilliliterPerHour = ("мл/ч") -MilliliterPerMinute = ("мл/мин") -MilliliterPerSecond = ("мл/c") -NanoliterPerHour = ("нл/ч") -NanoliterPerMinute = ("нл/мин") -NanoliterPerSecond = ("нл/c") +CentiliterPerHour = "сл/ч" +CentiliterPerMinute = "сл/мин" +CentiliterPerSecond = "сл/c" +CubicCentimeterPerMinute = "см³/мин" +CubicDecimeterPerMinute = "дм³/мин" +CubicMeterPerHour = "м³/ч" +CubicMeterPerMinute = "м³/мин" +CubicMeterPerSecond = "м³/с" +CubicMillimeterPerSecond = "мм³/с" +DeciliterPerHour = "дл/ч" +DeciliterPerMinute = "дл/мин" +DeciliterPerSecond = "дл/c" +KiloliterPerHour = "кл/ч" +KiloliterPerMinute = "кл/мин" +KiloliterPerSecond = "кл/c" +LiterPerHour = "л/ч" +LiterPerMinute = "л/мин" +LiterPerSecond = "л/c" +MicroliterPerHour = "мкл/ч" +MicroliterPerMinute = "мкл/мин" +MicroliterPerSecond = "мкл/c" +MilliliterPerHour = "мл/ч" +MilliliterPerMinute = "мл/мин" +MilliliterPerSecond = "мл/c" +NanoliterPerHour = "нл/ч" +NanoliterPerMinute = "нл/мин" +NanoliterPerSecond = "нл/c" diff --git a/UnitsNet/GeneratedCode/Resources/VolumeFlowPerArea.restext b/UnitsNet/GeneratedCode/Resources/VolumeFlowPerArea.restext index 92c6735b8d..db0ae95527 100644 --- a/UnitsNet/GeneratedCode/Resources/VolumeFlowPerArea.restext +++ b/UnitsNet/GeneratedCode/Resources/VolumeFlowPerArea.restext @@ -1,2 +1,2 @@ -CubicFootPerMinutePerSquareFoot = ("CFM/ft²") -CubicMeterPerSecondPerSquareMeter = ("m³/(s·m²)") +CubicFootPerMinutePerSquareFoot = "CFM/ft²" +CubicMeterPerSecondPerSquareMeter = "m³/(s·m²)" diff --git a/UnitsNet/GeneratedCode/Resources/VolumePerLength.restext b/UnitsNet/GeneratedCode/Resources/VolumePerLength.restext index 21731df5c8..a9139ecc52 100644 --- a/UnitsNet/GeneratedCode/Resources/VolumePerLength.restext +++ b/UnitsNet/GeneratedCode/Resources/VolumePerLength.restext @@ -1,7 +1,7 @@ -CubicMeterPerMeter = ("m³/m") -CubicYardPerFoot = ("yd³/ft") -CubicYardPerUsSurveyFoot = ("yd³/ftUS") -LiterPerKilometer = ("l/km") -LiterPerMeter = ("l/m") -LiterPerMillimeter = ("l/mm") -OilBarrelPerFoot = ("bbl/ft") +CubicMeterPerMeter = "m³/m" +CubicYardPerFoot = "yd³/ft" +CubicYardPerUsSurveyFoot = "yd³/ftUS" +LiterPerKilometer = "l/km" +LiterPerMeter = "l/m" +LiterPerMillimeter = "l/mm" +OilBarrelPerFoot = "bbl/ft" diff --git a/UnitsNet/GeneratedCode/Resources/VolumetricHeatCapacity.restext b/UnitsNet/GeneratedCode/Resources/VolumetricHeatCapacity.restext index 69718edc1b..dbd65e5d35 100644 --- a/UnitsNet/GeneratedCode/Resources/VolumetricHeatCapacity.restext +++ b/UnitsNet/GeneratedCode/Resources/VolumetricHeatCapacity.restext @@ -1,9 +1,9 @@ -BtuPerCubicFootDegreeFahrenheit = ("BTU/ft³·°F") -CaloriePerCubicCentimeterDegreeCelsius = ("cal/cm³·°C") -JoulePerCubicMeterDegreeCelsius = ("J/m³·°C") -JoulePerCubicMeterKelvin = ("J/m³·K") -KilocaloriePerCubicCentimeterDegreeCelsius = ("kcal/cm³·°C") -KilojoulePerCubicMeterDegreeCelsius = ("kJ/m³·°C") -KilojoulePerCubicMeterKelvin = ("kJ/m³·K") -MegajoulePerCubicMeterDegreeCelsius = ("MJ/m³·°C") -MegajoulePerCubicMeterKelvin = ("MJ/m³·K") +BtuPerCubicFootDegreeFahrenheit = "BTU/ft³·°F" +CaloriePerCubicCentimeterDegreeCelsius = "cal/cm³·°C" +JoulePerCubicMeterDegreeCelsius = "J/m³·°C" +JoulePerCubicMeterKelvin = "J/m³·K" +KilocaloriePerCubicCentimeterDegreeCelsius = "kcal/cm³·°C" +KilojoulePerCubicMeterDegreeCelsius = "kJ/m³·°C" +KilojoulePerCubicMeterKelvin = "kJ/m³·K" +MegajoulePerCubicMeterDegreeCelsius = "MJ/m³·°C" +MegajoulePerCubicMeterKelvin = "MJ/m³·K" diff --git a/UnitsNet/GeneratedCode/Resources/WarpingMomentOfInertia.restext b/UnitsNet/GeneratedCode/Resources/WarpingMomentOfInertia.restext index 8ff5452f20..326731dfaa 100644 --- a/UnitsNet/GeneratedCode/Resources/WarpingMomentOfInertia.restext +++ b/UnitsNet/GeneratedCode/Resources/WarpingMomentOfInertia.restext @@ -1,6 +1,6 @@ -CentimeterToTheSixth = ("cm⁶", "cm^6") -DecimeterToTheSixth = ("dm⁶", "dm^6") -FootToTheSixth = ("ft⁶", "ft^6") -InchToTheSixth = ("in⁶", "in^6") -MeterToTheSixth = ("m⁶", "m^6") -MillimeterToTheSixth = ("mm⁶", "mm^6") +CentimeterToTheSixth = "cm⁶","cm^6" +DecimeterToTheSixth = "dm⁶","dm^6" +FootToTheSixth = "ft⁶","ft^6" +InchToTheSixth = "in⁶","in^6" +MeterToTheSixth = "m⁶","m^6" +MillimeterToTheSixth = "mm⁶","mm^6" From 5fb964c32459447ea6787d5b5ed8fec0cd120974 Mon Sep 17 00:00:00 2001 From: Tristan Milnthorp Date: Tue, 21 Feb 2023 16:56:11 -0500 Subject: [PATCH 08/26] Add helper methods to quantities --- .../UnitsNetGen/QuantityGenerator.cs | 24 +++++++++++++++++++ .../Quantities/Acceleration.g.cs | 23 ++++++++++++++++++ .../Quantities/AmountOfSubstance.g.cs | 23 ++++++++++++++++++ .../Quantities/AmplitudeRatio.g.cs | 23 ++++++++++++++++++ UnitsNet/GeneratedCode/Quantities/Angle.g.cs | 23 ++++++++++++++++++ .../Quantities/ApparentEnergy.g.cs | 23 ++++++++++++++++++ .../Quantities/ApparentPower.g.cs | 23 ++++++++++++++++++ UnitsNet/GeneratedCode/Quantities/Area.g.cs | 23 ++++++++++++++++++ .../GeneratedCode/Quantities/AreaDensity.g.cs | 23 ++++++++++++++++++ .../Quantities/AreaMomentOfInertia.g.cs | 23 ++++++++++++++++++ .../GeneratedCode/Quantities/BitRate.g.cs | 23 ++++++++++++++++++ .../BrakeSpecificFuelConsumption.g.cs | 23 ++++++++++++++++++ .../GeneratedCode/Quantities/Capacitance.g.cs | 23 ++++++++++++++++++ .../CoefficientOfThermalExpansion.g.cs | 23 ++++++++++++++++++ .../Quantities/Compressibility.g.cs | 23 ++++++++++++++++++ .../GeneratedCode/Quantities/Density.g.cs | 23 ++++++++++++++++++ .../GeneratedCode/Quantities/Duration.g.cs | 23 ++++++++++++++++++ .../Quantities/DynamicViscosity.g.cs | 23 ++++++++++++++++++ .../Quantities/ElectricAdmittance.g.cs | 23 ++++++++++++++++++ .../Quantities/ElectricCharge.g.cs | 23 ++++++++++++++++++ .../Quantities/ElectricChargeDensity.g.cs | 23 ++++++++++++++++++ .../Quantities/ElectricConductance.g.cs | 23 ++++++++++++++++++ .../Quantities/ElectricConductivity.g.cs | 23 ++++++++++++++++++ .../Quantities/ElectricCurrent.g.cs | 23 ++++++++++++++++++ .../Quantities/ElectricCurrentDensity.g.cs | 23 ++++++++++++++++++ .../Quantities/ElectricCurrentGradient.g.cs | 23 ++++++++++++++++++ .../Quantities/ElectricField.g.cs | 23 ++++++++++++++++++ .../Quantities/ElectricInductance.g.cs | 23 ++++++++++++++++++ .../Quantities/ElectricPotential.g.cs | 23 ++++++++++++++++++ .../Quantities/ElectricPotentialAc.g.cs | 23 ++++++++++++++++++ .../ElectricPotentialChangeRate.g.cs | 23 ++++++++++++++++++ .../Quantities/ElectricPotentialDc.g.cs | 23 ++++++++++++++++++ .../Quantities/ElectricResistance.g.cs | 23 ++++++++++++++++++ .../Quantities/ElectricResistivity.g.cs | 23 ++++++++++++++++++ .../ElectricSurfaceChargeDensity.g.cs | 23 ++++++++++++++++++ UnitsNet/GeneratedCode/Quantities/Energy.g.cs | 23 ++++++++++++++++++ .../Quantities/EnergyDensity.g.cs | 23 ++++++++++++++++++ .../GeneratedCode/Quantities/Entropy.g.cs | 23 ++++++++++++++++++ UnitsNet/GeneratedCode/Quantities/Force.g.cs | 23 ++++++++++++++++++ .../Quantities/ForceChangeRate.g.cs | 23 ++++++++++++++++++ .../Quantities/ForcePerLength.g.cs | 23 ++++++++++++++++++ .../GeneratedCode/Quantities/Frequency.g.cs | 23 ++++++++++++++++++ .../Quantities/FuelEfficiency.g.cs | 23 ++++++++++++++++++ .../GeneratedCode/Quantities/HeatFlux.g.cs | 23 ++++++++++++++++++ .../Quantities/HeatTransferCoefficient.g.cs | 23 ++++++++++++++++++ .../GeneratedCode/Quantities/Illuminance.g.cs | 23 ++++++++++++++++++ .../GeneratedCode/Quantities/Impulse.g.cs | 23 ++++++++++++++++++ .../GeneratedCode/Quantities/Information.g.cs | 23 ++++++++++++++++++ .../GeneratedCode/Quantities/Irradiance.g.cs | 23 ++++++++++++++++++ .../GeneratedCode/Quantities/Irradiation.g.cs | 23 ++++++++++++++++++ UnitsNet/GeneratedCode/Quantities/Jerk.g.cs | 23 ++++++++++++++++++ .../Quantities/KinematicViscosity.g.cs | 23 ++++++++++++++++++ UnitsNet/GeneratedCode/Quantities/Length.g.cs | 23 ++++++++++++++++++ UnitsNet/GeneratedCode/Quantities/Level.g.cs | 23 ++++++++++++++++++ .../Quantities/LinearDensity.g.cs | 23 ++++++++++++++++++ .../Quantities/LinearPowerDensity.g.cs | 23 ++++++++++++++++++ .../GeneratedCode/Quantities/Luminance.g.cs | 23 ++++++++++++++++++ .../GeneratedCode/Quantities/Luminosity.g.cs | 23 ++++++++++++++++++ .../Quantities/LuminousFlux.g.cs | 23 ++++++++++++++++++ .../Quantities/LuminousIntensity.g.cs | 23 ++++++++++++++++++ .../Quantities/MagneticField.g.cs | 23 ++++++++++++++++++ .../Quantities/MagneticFlux.g.cs | 23 ++++++++++++++++++ .../Quantities/Magnetization.g.cs | 23 ++++++++++++++++++ UnitsNet/GeneratedCode/Quantities/Mass.g.cs | 23 ++++++++++++++++++ .../Quantities/MassConcentration.g.cs | 23 ++++++++++++++++++ .../GeneratedCode/Quantities/MassFlow.g.cs | 23 ++++++++++++++++++ .../GeneratedCode/Quantities/MassFlux.g.cs | 23 ++++++++++++++++++ .../Quantities/MassFraction.g.cs | 23 ++++++++++++++++++ .../Quantities/MassMomentOfInertia.g.cs | 23 ++++++++++++++++++ .../GeneratedCode/Quantities/MolarEnergy.g.cs | 23 ++++++++++++++++++ .../Quantities/MolarEntropy.g.cs | 23 ++++++++++++++++++ .../GeneratedCode/Quantities/MolarFlow.g.cs | 23 ++++++++++++++++++ .../GeneratedCode/Quantities/MolarMass.g.cs | 23 ++++++++++++++++++ .../GeneratedCode/Quantities/Molarity.g.cs | 23 ++++++++++++++++++ .../Quantities/Permeability.g.cs | 23 ++++++++++++++++++ .../Quantities/Permittivity.g.cs | 23 ++++++++++++++++++ .../Quantities/PorousMediumPermeability.g.cs | 23 ++++++++++++++++++ UnitsNet/GeneratedCode/Quantities/Power.g.cs | 23 ++++++++++++++++++ .../Quantities/PowerDensity.g.cs | 23 ++++++++++++++++++ .../GeneratedCode/Quantities/PowerRatio.g.cs | 23 ++++++++++++++++++ .../GeneratedCode/Quantities/Pressure.g.cs | 23 ++++++++++++++++++ .../Quantities/PressureChangeRate.g.cs | 23 ++++++++++++++++++ UnitsNet/GeneratedCode/Quantities/Ratio.g.cs | 23 ++++++++++++++++++ .../Quantities/RatioChangeRate.g.cs | 23 ++++++++++++++++++ .../Quantities/ReactiveEnergy.g.cs | 23 ++++++++++++++++++ .../Quantities/ReactivePower.g.cs | 23 ++++++++++++++++++ .../Quantities/ReciprocalArea.g.cs | 23 ++++++++++++++++++ .../Quantities/ReciprocalLength.g.cs | 23 ++++++++++++++++++ .../Quantities/RelativeHumidity.g.cs | 23 ++++++++++++++++++ .../Quantities/RotationalAcceleration.g.cs | 23 ++++++++++++++++++ .../Quantities/RotationalSpeed.g.cs | 23 ++++++++++++++++++ .../Quantities/RotationalStiffness.g.cs | 23 ++++++++++++++++++ .../RotationalStiffnessPerLength.g.cs | 23 ++++++++++++++++++ UnitsNet/GeneratedCode/Quantities/Scalar.g.cs | 23 ++++++++++++++++++ .../GeneratedCode/Quantities/SolidAngle.g.cs | 23 ++++++++++++++++++ .../Quantities/SpecificEnergy.g.cs | 23 ++++++++++++++++++ .../Quantities/SpecificEntropy.g.cs | 23 ++++++++++++++++++ .../Quantities/SpecificFuelConsumption.g.cs | 23 ++++++++++++++++++ .../Quantities/SpecificVolume.g.cs | 23 ++++++++++++++++++ .../Quantities/SpecificWeight.g.cs | 23 ++++++++++++++++++ UnitsNet/GeneratedCode/Quantities/Speed.g.cs | 23 ++++++++++++++++++ .../Quantities/StandardVolumeFlow.g.cs | 23 ++++++++++++++++++ .../GeneratedCode/Quantities/Temperature.g.cs | 23 ++++++++++++++++++ .../Quantities/TemperatureChangeRate.g.cs | 23 ++++++++++++++++++ .../Quantities/TemperatureDelta.g.cs | 23 ++++++++++++++++++ .../Quantities/TemperatureGradient.g.cs | 23 ++++++++++++++++++ .../Quantities/ThermalConductivity.g.cs | 23 ++++++++++++++++++ .../Quantities/ThermalResistance.g.cs | 23 ++++++++++++++++++ UnitsNet/GeneratedCode/Quantities/Torque.g.cs | 23 ++++++++++++++++++ .../Quantities/TorquePerLength.g.cs | 23 ++++++++++++++++++ .../GeneratedCode/Quantities/Turbidity.g.cs | 23 ++++++++++++++++++ .../GeneratedCode/Quantities/VitaminA.g.cs | 23 ++++++++++++++++++ UnitsNet/GeneratedCode/Quantities/Volume.g.cs | 23 ++++++++++++++++++ .../Quantities/VolumeConcentration.g.cs | 23 ++++++++++++++++++ .../GeneratedCode/Quantities/VolumeFlow.g.cs | 23 ++++++++++++++++++ .../Quantities/VolumeFlowPerArea.g.cs | 23 ++++++++++++++++++ .../Quantities/VolumePerLength.g.cs | 23 ++++++++++++++++++ .../Quantities/VolumetricHeatCapacity.g.cs | 23 ++++++++++++++++++ .../Quantities/WarpingMomentOfInertia.g.cs | 23 ++++++++++++++++++ UnitsNet/IQuantity.cs | 6 +++++ UnitsNet/QuantityFormatter.cs | 4 ++-- UnitsNet/UnitFormatter.cs | 3 +-- 122 files changed, 2747 insertions(+), 4 deletions(-) diff --git a/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs b/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs index e0daa70c6b..440e84c503 100644 --- a/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs +++ b/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs @@ -41,6 +41,7 @@ public string Generate() using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -1095,6 +1096,29 @@ IQuantity IQuantity.ToUnit(Enum unit) private void GenerateToString() { Writer.WL($@" + + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations({_unitEnumName} unit, CultureInfo? culture = null) + {{ + const string resourceName = $""UnitsNet.GeneratedCode.Resources.{_quantity.Name}""; + var resourceManager = new ResourceManager(resourceName, typeof({_quantity.Name}).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + }} + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs b/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs index 921f2e1482..cc1af02da0 100644 --- a/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -1030,6 +1031,28 @@ public Acceleration ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(AccelerationUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Acceleration"; + var resourceManager = new ResourceManager(resourceName, typeof(Acceleration).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs index 2842bf58c2..ccfdf7daff 100644 --- a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -1037,6 +1038,28 @@ public AmountOfSubstance ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(AmountOfSubstanceUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.AmountOfSubstance"; + var resourceManager = new ResourceManager(resourceName, typeof(AmountOfSubstance).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs b/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs index 5ccbac4995..d3ca555e6a 100644 --- a/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -814,6 +815,28 @@ public AmplitudeRatio ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(AmplitudeRatioUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.AmplitudeRatio"; + var resourceManager = new ResourceManager(resourceName, typeof(AmplitudeRatio).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Angle.g.cs b/UnitsNet/GeneratedCode/Quantities/Angle.g.cs index 05c1d86de0..841ecfc1f4 100644 --- a/UnitsNet/GeneratedCode/Quantities/Angle.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Angle.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -1070,6 +1071,28 @@ public Angle ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(AngleUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Angle"; + var resourceManager = new ResourceManager(resourceName, typeof(Angle).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs index 866f4d92c1..1282ef4e84 100644 --- a/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -785,6 +786,28 @@ public ApparentEnergy ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ApparentEnergyUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ApparentEnergy"; + var resourceManager = new ResourceManager(resourceName, typeof(ApparentEnergy).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs b/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs index 5b499b60e8..490833a891 100644 --- a/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -848,6 +849,28 @@ public ApparentPower ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ApparentPowerUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ApparentPower"; + var resourceManager = new ResourceManager(resourceName, typeof(ApparentPower).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Area.g.cs b/UnitsNet/GeneratedCode/Quantities/Area.g.cs index a148578631..0e49c7d47a 100644 --- a/UnitsNet/GeneratedCode/Quantities/Area.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Area.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -1043,6 +1044,28 @@ public Area ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(AreaUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Area"; + var resourceManager = new ResourceManager(resourceName, typeof(Area).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs index 4704fa98d9..918807fb48 100644 --- a/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -785,6 +786,28 @@ public AreaDensity ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(AreaDensityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.AreaDensity"; + var resourceManager = new ResourceManager(resourceName, typeof(AreaDensity).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs index a3578ecf26..6d342f7c95 100644 --- a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -848,6 +849,28 @@ public AreaMomentOfInertia ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(AreaMomentOfInertiaUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.AreaMomentOfInertia"; + var resourceManager = new ResourceManager(resourceName, typeof(AreaMomentOfInertia).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs b/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs index 96f894e4de..2f4e54acce 100644 --- a/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -1285,6 +1286,28 @@ public BitRate ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(BitRateUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.BitRate"; + var resourceManager = new ResourceManager(resourceName, typeof(BitRate).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs index 34eaf9533b..75d94f2a0e 100644 --- a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -785,6 +786,28 @@ public BrakeSpecificFuelConsumption ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(BrakeSpecificFuelConsumptionUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.BrakeSpecificFuelConsumption"; + var resourceManager = new ResourceManager(resourceName, typeof(BrakeSpecificFuelConsumption).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs b/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs index 4e390abdbd..e715000f15 100644 --- a/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -872,6 +873,28 @@ public Capacitance ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(CapacitanceUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Capacitance"; + var resourceManager = new ResourceManager(resourceName, typeof(Capacitance).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs b/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs index dec84fe60a..95723b984a 100644 --- a/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -785,6 +786,28 @@ public CoefficientOfThermalExpansion ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(CoefficientOfThermalExpansionUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.CoefficientOfThermalExpansion"; + var resourceManager = new ResourceManager(resourceName, typeof(CoefficientOfThermalExpansion).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Compressibility.g.cs b/UnitsNet/GeneratedCode/Quantities/Compressibility.g.cs index dbeb81660d..2bd34ab45e 100644 --- a/UnitsNet/GeneratedCode/Quantities/Compressibility.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Compressibility.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -869,6 +870,28 @@ public Compressibility ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(CompressibilityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Compressibility"; + var resourceManager = new ResourceManager(resourceName, typeof(Compressibility).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Density.g.cs b/UnitsNet/GeneratedCode/Quantities/Density.g.cs index 2490c40964..99c71019af 100644 --- a/UnitsNet/GeneratedCode/Quantities/Density.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Density.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -1800,6 +1801,28 @@ public Density ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(DensityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Density"; + var resourceManager = new ResourceManager(resourceName, typeof(Density).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Duration.g.cs b/UnitsNet/GeneratedCode/Quantities/Duration.g.cs index 7410c4f642..8cced9725b 100644 --- a/UnitsNet/GeneratedCode/Quantities/Duration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Duration.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -963,6 +964,28 @@ public Duration ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(DurationUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Duration"; + var resourceManager = new ResourceManager(resourceName, typeof(Duration).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs index 895ee1abb6..8964e4d9c5 100644 --- a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -935,6 +936,28 @@ public DynamicViscosity ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(DynamicViscosityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.DynamicViscosity"; + var resourceManager = new ResourceManager(resourceName, typeof(DynamicViscosity).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs index 0f61946654..a87a7f990e 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -806,6 +807,28 @@ public ElectricAdmittance ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ElectricAdmittanceUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricAdmittance"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricAdmittance).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs index c6d05e2719..b028029436 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -956,6 +957,28 @@ public ElectricCharge ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ElectricChargeUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricCharge"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricCharge).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs index f9ad7f0772..89c49d5ad1 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -746,6 +747,28 @@ public ElectricChargeDensity ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ElectricChargeDensityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricChargeDensity"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricChargeDensity).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs index ff471bba8a..2a6b3f238b 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -830,6 +831,28 @@ public ElectricConductance ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ElectricConductanceUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricConductance"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricConductance).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs index 6531fa140f..79f556ee1e 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -851,6 +852,28 @@ public ElectricConductivity ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ElectricConductivityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricConductivity"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricConductivity).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs index db044e38a1..fdb430502c 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -911,6 +912,28 @@ public ElectricCurrent ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ElectricCurrentUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricCurrent"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricCurrent).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs index 1916af48b1..c63abd524a 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -788,6 +789,28 @@ public ElectricCurrentDensity ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ElectricCurrentDensityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricCurrentDensity"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricCurrentDensity).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs index adeb31f58c..91cfff5915 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -806,6 +807,28 @@ public ElectricCurrentGradient ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ElectricCurrentGradientUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricCurrentGradient"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricCurrentGradient).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs index fac5a21a45..3c8cd9286a 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -746,6 +747,28 @@ public ElectricField ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ElectricFieldUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricField"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricField).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs index 3d8221c657..6d99eb979d 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -830,6 +831,28 @@ public ElectricInductance ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ElectricInductanceUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricInductance"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricInductance).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs index 0bb1134989..c48ded99c2 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -854,6 +855,28 @@ public ElectricPotential ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ElectricPotentialUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricPotential"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricPotential).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs index 867cc6cc47..5ebdb254ef 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -827,6 +828,28 @@ public ElectricPotentialAc ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ElectricPotentialAcUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricPotentialAc"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricPotentialAc).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs index 43452b2a53..5ba5831f80 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -1142,6 +1143,28 @@ public ElectricPotentialChangeRate ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ElectricPotentialChangeRateUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricPotentialChangeRate"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricPotentialChangeRate).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs index 2230876257..4e3b1e6da6 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -827,6 +828,28 @@ public ElectricPotentialDc ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ElectricPotentialDcUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricPotentialDc"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricPotentialDc).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs index 1faefc9fa5..be528a14bd 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -869,6 +870,28 @@ public ElectricResistance ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ElectricResistanceUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricResistance"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricResistance).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs index d19366611a..a50fee077e 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -1019,6 +1020,28 @@ public ElectricResistivity ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ElectricResistivityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricResistivity"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricResistivity).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs index 88f7b812ed..1e140a0a34 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -788,6 +789,28 @@ public ElectricSurfaceChargeDensity ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ElectricSurfaceChargeDensityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricSurfaceChargeDensity"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricSurfaceChargeDensity).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Energy.g.cs b/UnitsNet/GeneratedCode/Quantities/Energy.g.cs index 9797290495..b406968150 100644 --- a/UnitsNet/GeneratedCode/Quantities/Energy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Energy.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -1541,6 +1542,28 @@ public Energy ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(EnergyUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Energy"; + var resourceManager = new ResourceManager(resourceName, typeof(Energy).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/EnergyDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/EnergyDensity.g.cs index 84910f1749..811e41de83 100644 --- a/UnitsNet/GeneratedCode/Quantities/EnergyDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/EnergyDensity.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -974,6 +975,28 @@ public EnergyDensity ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(EnergyDensityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.EnergyDensity"; + var resourceManager = new ResourceManager(resourceName, typeof(EnergyDensity).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs b/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs index 2367158e28..e922d122d7 100644 --- a/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -869,6 +870,28 @@ public Entropy ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(EntropyUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Entropy"; + var resourceManager = new ResourceManager(resourceName, typeof(Entropy).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Force.g.cs b/UnitsNet/GeneratedCode/Quantities/Force.g.cs index ebac573589..49d914d9b6 100644 --- a/UnitsNet/GeneratedCode/Quantities/Force.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Force.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -1050,6 +1051,28 @@ public Force ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ForceUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Force"; + var resourceManager = new ResourceManager(resourceName, typeof(Force).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs index 2e8af89c60..1df4b16338 100644 --- a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -1037,6 +1038,28 @@ public ForceChangeRate ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ForceChangeRateUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ForceChangeRate"; + var resourceManager = new ResourceManager(resourceName, typeof(ForceChangeRate).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs index b4f7587b04..6fc922f7ff 100644 --- a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -1526,6 +1527,28 @@ public ForcePerLength ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ForcePerLengthUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ForcePerLength"; + var resourceManager = new ResourceManager(resourceName, typeof(ForcePerLength).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs b/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs index e7e54467ba..c48a17a452 100644 --- a/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -1004,6 +1005,28 @@ public Frequency ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(FrequencyUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Frequency"; + var resourceManager = new ResourceManager(resourceName, typeof(Frequency).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs b/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs index bfb3b0716a..c9e5098d04 100644 --- a/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -809,6 +810,28 @@ public FuelEfficiency ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(FuelEfficiencyUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.FuelEfficiency"; + var resourceManager = new ResourceManager(resourceName, typeof(FuelEfficiency).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs index 987298400c..4a501eaf29 100644 --- a/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -1100,6 +1101,28 @@ public HeatFlux ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(HeatFluxUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.HeatFlux"; + var resourceManager = new ResourceManager(resourceName, typeof(HeatFlux).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs index 2574b8dc77..94980e0d19 100644 --- a/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -850,6 +851,28 @@ public HeatTransferCoefficient ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(HeatTransferCoefficientUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.HeatTransferCoefficient"; + var resourceManager = new ResourceManager(resourceName, typeof(HeatTransferCoefficient).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs b/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs index 57018f10d8..0aa7148804 100644 --- a/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -809,6 +810,28 @@ public Illuminance ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(IlluminanceUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Illuminance"; + var resourceManager = new ResourceManager(resourceName, typeof(Illuminance).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Impulse.g.cs b/UnitsNet/GeneratedCode/Quantities/Impulse.g.cs index e94caf4f4c..5e352de911 100644 --- a/UnitsNet/GeneratedCode/Quantities/Impulse.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Impulse.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -995,6 +996,28 @@ public Impulse ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ImpulseUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Impulse"; + var resourceManager = new ResourceManager(resourceName, typeof(Impulse).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Information.g.cs b/UnitsNet/GeneratedCode/Quantities/Information.g.cs index 24ab07c03f..69bfa2f25b 100644 --- a/UnitsNet/GeneratedCode/Quantities/Information.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Information.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -1282,6 +1283,28 @@ public Information ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(InformationUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Information"; + var resourceManager = new ResourceManager(resourceName, typeof(Information).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs b/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs index 6db9d2de38..5f55aa1455 100644 --- a/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -1016,6 +1017,28 @@ public Irradiance ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(IrradianceUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Irradiance"; + var resourceManager = new ResourceManager(resourceName, typeof(Irradiance).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs b/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs index eb2fb8cb1e..3cf63aae9d 100644 --- a/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -872,6 +873,28 @@ public Irradiation ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(IrradiationUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Irradiation"; + var resourceManager = new ResourceManager(resourceName, typeof(Irradiation).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Jerk.g.cs b/UnitsNet/GeneratedCode/Quantities/Jerk.g.cs index 3d0c9eae05..9127a7fc8c 100644 --- a/UnitsNet/GeneratedCode/Quantities/Jerk.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Jerk.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -964,6 +965,28 @@ public Jerk ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(JerkUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Jerk"; + var resourceManager = new ResourceManager(resourceName, typeof(Jerk).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs index 621956eab2..8592b807a3 100644 --- a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -922,6 +923,28 @@ public KinematicViscosity ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(KinematicViscosityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.KinematicViscosity"; + var resourceManager = new ResourceManager(resourceName, typeof(KinematicViscosity).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Length.g.cs b/UnitsNet/GeneratedCode/Quantities/Length.g.cs index 25d00b10fc..1eb7c17db8 100644 --- a/UnitsNet/GeneratedCode/Quantities/Length.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Length.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -1510,6 +1511,28 @@ public Length ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(LengthUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Length"; + var resourceManager = new ResourceManager(resourceName, typeof(Length).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Level.g.cs b/UnitsNet/GeneratedCode/Quantities/Level.g.cs index d69d2b191a..dbcf0ae0d2 100644 --- a/UnitsNet/GeneratedCode/Quantities/Level.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Level.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -772,6 +773,28 @@ public Level ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(LevelUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Level"; + var resourceManager = new ResourceManager(resourceName, typeof(Level).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs index e2a252f20f..d0fba30d01 100644 --- a/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -1019,6 +1020,28 @@ public LinearDensity ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(LinearDensityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.LinearDensity"; + var resourceManager = new ResourceManager(resourceName, typeof(LinearDensity).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs index 776aacd938..75791070ab 100644 --- a/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -1250,6 +1251,28 @@ public LinearPowerDensity ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(LinearPowerDensityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.LinearPowerDensity"; + var resourceManager = new ResourceManager(resourceName, typeof(LinearPowerDensity).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Luminance.g.cs b/UnitsNet/GeneratedCode/Quantities/Luminance.g.cs index 0caa7f598d..5640e4fe52 100644 --- a/UnitsNet/GeneratedCode/Quantities/Luminance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Luminance.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -935,6 +936,28 @@ public Luminance ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(LuminanceUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Luminance"; + var resourceManager = new ResourceManager(resourceName, typeof(Luminance).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs b/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs index 7e67fb8b71..355f790d8e 100644 --- a/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -1019,6 +1020,28 @@ public Luminosity ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(LuminosityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Luminosity"; + var resourceManager = new ResourceManager(resourceName, typeof(Luminosity).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs index b299c010bf..50159d0471 100644 --- a/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -746,6 +747,28 @@ public LuminousFlux ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(LuminousFluxUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.LuminousFlux"; + var resourceManager = new ResourceManager(resourceName, typeof(LuminousFlux).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs b/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs index f2274c6cc5..e663938783 100644 --- a/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -746,6 +747,28 @@ public LuminousIntensity ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(LuminousIntensityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.LuminousIntensity"; + var resourceManager = new ResourceManager(resourceName, typeof(LuminousIntensity).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs b/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs index 4557dccb04..0f582b4d61 100644 --- a/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -851,6 +852,28 @@ public MagneticField ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(MagneticFieldUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MagneticField"; + var resourceManager = new ResourceManager(resourceName, typeof(MagneticField).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs index 28b8827150..6e096176df 100644 --- a/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -746,6 +747,28 @@ public MagneticFlux ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(MagneticFluxUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MagneticFlux"; + var resourceManager = new ResourceManager(resourceName, typeof(MagneticFlux).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs b/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs index 1bca0a2b61..814fb86c1f 100644 --- a/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -746,6 +747,28 @@ public Magnetization ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(MagnetizationUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Magnetization"; + var resourceManager = new ResourceManager(resourceName, typeof(Magnetization).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Mass.g.cs b/UnitsNet/GeneratedCode/Quantities/Mass.g.cs index d853214d61..5c46a10990 100644 --- a/UnitsNet/GeneratedCode/Quantities/Mass.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Mass.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -1282,6 +1283,28 @@ public Mass ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(MassUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Mass"; + var resourceManager = new ResourceManager(resourceName, typeof(Mass).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs b/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs index b5f34a6c52..27a506b9b2 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -1758,6 +1759,28 @@ public MassConcentration ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(MassConcentrationUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MassConcentration"; + var resourceManager = new ResourceManager(resourceName, typeof(MassConcentration).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs index 3bf50636ba..3ccb8d17fd 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -1417,6 +1418,28 @@ public MassFlow ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(MassFlowUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MassFlow"; + var resourceManager = new ResourceManager(resourceName, typeof(MassFlow).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs index af1d79e8c7..89bf7f3d94 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -974,6 +975,28 @@ public MassFlux ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(MassFluxUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MassFlux"; + var resourceManager = new ResourceManager(resourceName, typeof(MassFlux).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs index 28e05cdbe8..58de25ecb0 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -1229,6 +1230,28 @@ public MassFraction ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(MassFractionUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MassFraction"; + var resourceManager = new ResourceManager(resourceName, typeof(MassFraction).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs b/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs index 1e14c692e1..7701ac1ab8 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -1310,6 +1311,28 @@ public MassMomentOfInertia ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(MassMomentOfInertiaUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MassMomentOfInertia"; + var resourceManager = new ResourceManager(resourceName, typeof(MassMomentOfInertia).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs index 6047773807..ec8a0a7cd1 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -785,6 +786,28 @@ public MolarEnergy ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(MolarEnergyUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MolarEnergy"; + var resourceManager = new ResourceManager(resourceName, typeof(MolarEnergy).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs index d35c537df0..112ef82cae 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -785,6 +786,28 @@ public MolarEntropy ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(MolarEntropyUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MolarEntropy"; + var resourceManager = new ResourceManager(resourceName, typeof(MolarEntropy).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs index 0cf791e10f..33f796cf21 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -911,6 +912,28 @@ public MolarFlow ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(MolarFlowUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MolarFlow"; + var resourceManager = new ResourceManager(resourceName, typeof(MolarFlow).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs index 37c5edb8aa..c1d686cc10 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -1007,6 +1008,28 @@ public MolarMass ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(MolarMassUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MolarMass"; + var resourceManager = new ResourceManager(resourceName, typeof(MolarMass).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs b/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs index 13370129df..7ecd55ab32 100644 --- a/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -956,6 +957,28 @@ public Molarity ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(MolarityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Molarity"; + var resourceManager = new ResourceManager(resourceName, typeof(Molarity).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs b/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs index fd5c8a5aee..cf36e2df15 100644 --- a/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -746,6 +747,28 @@ public Permeability ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(PermeabilityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Permeability"; + var resourceManager = new ResourceManager(resourceName, typeof(Permeability).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs b/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs index 9c67df0418..52a736a4df 100644 --- a/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -746,6 +747,28 @@ public Permittivity ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(PermittivityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Permittivity"; + var resourceManager = new ResourceManager(resourceName, typeof(Permittivity).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/PorousMediumPermeability.g.cs b/UnitsNet/GeneratedCode/Quantities/PorousMediumPermeability.g.cs index b5ccb646d1..bfa24850dc 100644 --- a/UnitsNet/GeneratedCode/Quantities/PorousMediumPermeability.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PorousMediumPermeability.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -830,6 +831,28 @@ public PorousMediumPermeability ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(PorousMediumPermeabilityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.PorousMediumPermeability"; + var resourceManager = new ResourceManager(resourceName, typeof(PorousMediumPermeability).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Power.g.cs b/UnitsNet/GeneratedCode/Quantities/Power.g.cs index 0231219be2..8dbe54abdc 100644 --- a/UnitsNet/GeneratedCode/Quantities/Power.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Power.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -1282,6 +1283,28 @@ public Power ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(PowerUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Power"; + var resourceManager = new ResourceManager(resourceName, typeof(Power).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs index 205a7740fa..b0481dd372 100644 --- a/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -1646,6 +1647,28 @@ public PowerDensity ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(PowerDensityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.PowerDensity"; + var resourceManager = new ResourceManager(resourceName, typeof(PowerDensity).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs b/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs index ff388d847a..bff392c1ec 100644 --- a/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -772,6 +773,28 @@ public PowerRatio ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(PowerRatioUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.PowerRatio"; + var resourceManager = new ResourceManager(resourceName, typeof(PowerRatio).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs b/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs index cda567e6cd..838d217ece 100644 --- a/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -1740,6 +1741,28 @@ public Pressure ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(PressureUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Pressure"; + var resourceManager = new ResourceManager(resourceName, typeof(Pressure).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs index 9ffc554d25..08c5f702c8 100644 --- a/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -1030,6 +1031,28 @@ public PressureChangeRate ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(PressureChangeRateUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.PressureChangeRate"; + var resourceManager = new ResourceManager(resourceName, typeof(PressureChangeRate).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs b/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs index d135bd20e2..b45e53b155 100644 --- a/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -848,6 +849,28 @@ public Ratio ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(RatioUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Ratio"; + var resourceManager = new ResourceManager(resourceName, typeof(Ratio).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs index c222e51bf0..7712efcaa3 100644 --- a/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -764,6 +765,28 @@ public RatioChangeRate ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(RatioChangeRateUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.RatioChangeRate"; + var resourceManager = new ResourceManager(resourceName, typeof(RatioChangeRate).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs index ff9d52ac54..16df62ef8b 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -785,6 +786,28 @@ public ReactiveEnergy ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ReactiveEnergyUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ReactiveEnergy"; + var resourceManager = new ResourceManager(resourceName, typeof(ReactiveEnergy).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs b/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs index 4456bf47eb..d9b84cb57c 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -806,6 +807,28 @@ public ReactivePower ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ReactivePowerUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ReactivePower"; + var resourceManager = new ResourceManager(resourceName, typeof(ReactivePower).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs b/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs index 915724f559..f80e88368a 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -956,6 +957,28 @@ public ReciprocalArea ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ReciprocalAreaUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ReciprocalArea"; + var resourceManager = new ResourceManager(resourceName, typeof(ReciprocalArea).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs b/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs index 39ab8e8572..2c73137796 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -935,6 +936,28 @@ public ReciprocalLength ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ReciprocalLengthUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ReciprocalLength"; + var resourceManager = new ResourceManager(resourceName, typeof(ReciprocalLength).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs b/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs index 44de21aed7..73adb465e4 100644 --- a/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -743,6 +744,28 @@ public RelativeHumidity ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(RelativeHumidityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.RelativeHumidity"; + var resourceManager = new ResourceManager(resourceName, typeof(RelativeHumidity).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.g.cs index a494bcb16f..de150ce204 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -806,6 +807,28 @@ public RotationalAcceleration ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(RotationalAccelerationUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.RotationalAcceleration"; + var resourceManager = new ResourceManager(resourceName, typeof(RotationalAcceleration).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs index 0a0992ac54..1887e09605 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -1007,6 +1008,28 @@ public RotationalSpeed ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(RotationalSpeedUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.RotationalSpeed"; + var resourceManager = new ResourceManager(resourceName, typeof(RotationalSpeed).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs index ac493b59b0..ebc74123bb 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -1415,6 +1416,28 @@ public RotationalStiffness ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(RotationalStiffnessUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.RotationalStiffness"; + var resourceManager = new ResourceManager(resourceName, typeof(RotationalStiffness).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs index 4258cfea66..f10ce8f59f 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -827,6 +828,28 @@ public RotationalStiffnessPerLength ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(RotationalStiffnessPerLengthUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.RotationalStiffnessPerLength"; + var resourceManager = new ResourceManager(resourceName, typeof(RotationalStiffnessPerLength).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Scalar.g.cs b/UnitsNet/GeneratedCode/Quantities/Scalar.g.cs index 00e55d6fb7..b40b5fb320 100644 --- a/UnitsNet/GeneratedCode/Quantities/Scalar.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Scalar.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -743,6 +744,28 @@ public Scalar ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ScalarUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Scalar"; + var resourceManager = new ResourceManager(resourceName, typeof(Scalar).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs b/UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs index 59248425aa..f1922fa84f 100644 --- a/UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -746,6 +747,28 @@ public SolidAngle ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(SolidAngleUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.SolidAngle"; + var resourceManager = new ResourceManager(resourceName, typeof(SolidAngle).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs index 59487a9a03..94a83271d7 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -1355,6 +1356,28 @@ public SpecificEnergy ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(SpecificEnergyUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.SpecificEnergy"; + var resourceManager = new ResourceManager(resourceName, typeof(SpecificEnergy).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs index 242f08db4d..6f7fa18aa8 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -911,6 +912,28 @@ public SpecificEntropy ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(SpecificEntropyUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.SpecificEntropy"; + var resourceManager = new ResourceManager(resourceName, typeof(SpecificEntropy).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs index c1ef4d2777..6c1e547dbc 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -809,6 +810,28 @@ public SpecificFuelConsumption ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(SpecificFuelConsumptionUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.SpecificFuelConsumption"; + var resourceManager = new ResourceManager(resourceName, typeof(SpecificFuelConsumption).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs index 031fe02753..36914770b1 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -785,6 +786,28 @@ public SpecificVolume ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(SpecificVolumeUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.SpecificVolume"; + var resourceManager = new ResourceManager(resourceName, typeof(SpecificVolume).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs index bb6d7b8228..b5d31bf2c3 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -1082,6 +1083,28 @@ public SpecificWeight ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(SpecificWeightUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.SpecificWeight"; + var resourceManager = new ResourceManager(resourceName, typeof(SpecificWeight).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Speed.g.cs b/UnitsNet/GeneratedCode/Quantities/Speed.g.cs index 3c576dac4e..1a625f9efa 100644 --- a/UnitsNet/GeneratedCode/Quantities/Speed.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Speed.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -1439,6 +1440,28 @@ public Speed ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(SpeedUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Speed"; + var resourceManager = new ResourceManager(resourceName, typeof(Speed).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/StandardVolumeFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/StandardVolumeFlow.g.cs index 6cf1d8745f..7563e14f5f 100644 --- a/UnitsNet/GeneratedCode/Quantities/StandardVolumeFlow.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/StandardVolumeFlow.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -911,6 +912,28 @@ public StandardVolumeFlow ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(StandardVolumeFlowUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.StandardVolumeFlow"; + var resourceManager = new ResourceManager(resourceName, typeof(StandardVolumeFlow).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Temperature.g.cs b/UnitsNet/GeneratedCode/Quantities/Temperature.g.cs index 17e7545e48..89f83c3fe3 100644 --- a/UnitsNet/GeneratedCode/Quantities/Temperature.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Temperature.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -883,6 +884,28 @@ public Temperature ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(TemperatureUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Temperature"; + var resourceManager = new ResourceManager(resourceName, typeof(Temperature).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs index c5be0039ec..31ff830c04 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -932,6 +933,28 @@ public TemperatureChangeRate ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(TemperatureChangeRateUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.TemperatureChangeRate"; + var resourceManager = new ResourceManager(resourceName, typeof(TemperatureChangeRate).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs index 1b2f90a524..65b928c45c 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -911,6 +912,28 @@ public TemperatureDelta ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(TemperatureDeltaUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.TemperatureDelta"; + var resourceManager = new ResourceManager(resourceName, typeof(TemperatureDelta).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureGradient.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureGradient.g.cs index 7829ab0664..cb49c181e7 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureGradient.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureGradient.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -806,6 +807,28 @@ public TemperatureGradient ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(TemperatureGradientUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.TemperatureGradient"; + var resourceManager = new ResourceManager(resourceName, typeof(TemperatureGradient).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs b/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs index 9ded06f1cc..25a6f60880 100644 --- a/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -767,6 +768,28 @@ public ThermalConductivity ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ThermalConductivityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ThermalConductivity"; + var resourceManager = new ResourceManager(resourceName, typeof(ThermalConductivity).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs b/UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs index 755ad9144d..f7c3bccd2d 100644 --- a/UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -848,6 +849,28 @@ public ThermalResistance ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ThermalResistanceUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ThermalResistance"; + var resourceManager = new ResourceManager(resourceName, typeof(ThermalResistance).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Torque.g.cs b/UnitsNet/GeneratedCode/Quantities/Torque.g.cs index 433ca561fb..fa44d453f9 100644 --- a/UnitsNet/GeneratedCode/Quantities/Torque.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Torque.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -1250,6 +1251,28 @@ public Torque ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(TorqueUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Torque"; + var resourceManager = new ResourceManager(resourceName, typeof(Torque).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/TorquePerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/TorquePerLength.g.cs index 2cf994cf87..f9b7822921 100644 --- a/UnitsNet/GeneratedCode/Quantities/TorquePerLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TorquePerLength.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -1166,6 +1167,28 @@ public TorquePerLength ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(TorquePerLengthUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.TorquePerLength"; + var resourceManager = new ResourceManager(resourceName, typeof(TorquePerLength).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Turbidity.g.cs b/UnitsNet/GeneratedCode/Quantities/Turbidity.g.cs index 8b62dc4804..2f71ca5334 100644 --- a/UnitsNet/GeneratedCode/Quantities/Turbidity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Turbidity.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -746,6 +747,28 @@ public Turbidity ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(TurbidityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Turbidity"; + var resourceManager = new ResourceManager(resourceName, typeof(Turbidity).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs b/UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs index a640fa6707..238e2c5e18 100644 --- a/UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -743,6 +744,28 @@ public VitaminA ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(VitaminAUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.VitaminA"; + var resourceManager = new ResourceManager(resourceName, typeof(VitaminA).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Volume.g.cs b/UnitsNet/GeneratedCode/Quantities/Volume.g.cs index cd6c51293b..64d895799e 100644 --- a/UnitsNet/GeneratedCode/Quantities/Volume.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Volume.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -1883,6 +1884,28 @@ public Volume ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(VolumeUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Volume"; + var resourceManager = new ResourceManager(resourceName, typeof(Volume).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs index e806d9b997..2aa9645c74 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -1145,6 +1146,28 @@ public VolumeConcentration ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(VolumeConcentrationUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.VolumeConcentration"; + var resourceManager = new ResourceManager(resourceName, typeof(VolumeConcentration).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs index ffc626fd89..b37c444377 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -2051,6 +2052,28 @@ public VolumeFlow ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(VolumeFlowUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.VolumeFlow"; + var resourceManager = new ResourceManager(resourceName, typeof(VolumeFlow).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/VolumeFlowPerArea.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumeFlowPerArea.g.cs index d0c8472445..8a144126f0 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumeFlowPerArea.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumeFlowPerArea.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -764,6 +765,28 @@ public VolumeFlowPerArea ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(VolumeFlowPerAreaUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.VolumeFlowPerArea"; + var resourceManager = new ResourceManager(resourceName, typeof(VolumeFlowPerArea).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs index 2e174cce63..35d56b9a46 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -869,6 +870,28 @@ public VolumePerLength ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(VolumePerLengthUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.VolumePerLength"; + var resourceManager = new ResourceManager(resourceName, typeof(VolumePerLength).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs index 35a192850a..195d6e2a54 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -914,6 +915,28 @@ public VolumetricHeatCapacity ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(VolumetricHeatCapacityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.VolumetricHeatCapacity"; + var resourceManager = new ResourceManager(resourceName, typeof(VolumetricHeatCapacity).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs b/UnitsNet/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs index 39874471e7..b2ccf8c481 100644 --- a/UnitsNet/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs @@ -22,6 +22,7 @@ using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Resources; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -848,6 +849,28 @@ public WarpingMomentOfInertia ToUnit(UnitSystem unitSystem) #endregion + /// + public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(WarpingMomentOfInertiaUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.WarpingMomentOfInertia"; + var resourceManager = new ResourceManager(resourceName, typeof(WarpingMomentOfInertia).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); + } + #region ToString Methods /// diff --git a/UnitsNet/IQuantity.cs b/UnitsNet/IQuantity.cs index 1ea0530d90..fc23d3c26c 100644 --- a/UnitsNet/IQuantity.cs +++ b/UnitsNet/IQuantity.cs @@ -115,6 +115,12 @@ public interface IQuantity : IQuantity where TUnitType : Enum /// The to convert the quantity to. /// A new quantity with the determined unit. new IQuantity ToUnit(UnitSystem unitSystem); + + /// + /// + /// + /// + string[] GetAbbreviations(CultureInfo? culture = null); } /// diff --git a/UnitsNet/QuantityFormatter.cs b/UnitsNet/QuantityFormatter.cs index 4d8a10d1ce..7fe049ffc9 100644 --- a/UnitsNet/QuantityFormatter.cs +++ b/UnitsNet/QuantityFormatter.cs @@ -147,7 +147,7 @@ private static string FormatUntrimmed(IQuantity quantity, return ToStringWithSignificantDigitsAfterRadix(quantity, formatProvider, 2); case 'A': case 'a': - var abbreviations = UnitAbbreviationsCache.Default.GetUnitAbbreviations(quantity.Unit, formatProvider); + var abbreviations = quantity.GetAbbreviations((CultureInfo)formatProvider); if (precisionSpecifier >= abbreviations.Length) throw new FormatException($"The {format} format string is invalid because the abbreviation index does not exist."); @@ -173,7 +173,7 @@ private static string FormatUntrimmed(IQuantity quantity, { // Anything else is a standard numeric format string with default unit abbreviation postfix. - var abbreviations = UnitAbbreviationsCache.Default.GetUnitAbbreviations(quantity.Unit, formatProvider); + var abbreviations = quantity.GetAbbreviations((CultureInfo)formatProvider); return string.Format(formatProvider, $"{{0:{format}}} {{1}}", quantity.Value, abbreviations.First()); } } diff --git a/UnitsNet/UnitFormatter.cs b/UnitsNet/UnitFormatter.cs index 2bed8d0215..0862a47d29 100644 --- a/UnitsNet/UnitFormatter.cs +++ b/UnitsNet/UnitFormatter.cs @@ -78,7 +78,7 @@ private static bool NearlyEqual(double a, double b) public static object[] GetFormatArgs(TUnitType unit, double value, IFormatProvider? culture, IEnumerable args) where TUnitType : Enum { - string abbreviation = GetAbbreviations2("Length", "Meter").FirstOrDefault() ?? string.Empty; + string abbreviation = GetAbbreviations2("Duration", "Microsecond", new CultureInfo("ru-RU")).FirstOrDefault() ?? string.Empty; return new object[] {value, abbreviation}.Concat(args).ToArray(); } @@ -91,7 +91,6 @@ private static string[] GetAbbreviations2(string quantityName, string unitString if(abbreviation is null) return Array.Empty(); - abbreviation = abbreviation.Trim('(', ')'); var abbreviations = abbreviation.Split(','); return abbreviations; } From cad93b11f7c96e87a5127f37cb406642b96bbff1 Mon Sep 17 00:00:00 2001 From: Tristan Milnthorp Date: Tue, 21 Feb 2023 16:57:01 -0500 Subject: [PATCH 09/26] Revert --- UnitsNet/CustomCode/QuantityParser.cs | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/UnitsNet/CustomCode/QuantityParser.cs b/UnitsNet/CustomCode/QuantityParser.cs index 7ad2594a53..a029e13513 100644 --- a/UnitsNet/CustomCode/QuantityParser.cs +++ b/UnitsNet/CustomCode/QuantityParser.cs @@ -193,19 +193,20 @@ private static bool TryExtractValueAndUnit(Regex regex, string str, [NotNullWhen return true; } - private string CreateRegexPatternForQuantity(IFormatProvider? formatProvider) where TUnitType : Enum - { - var unitAbbreviations = _unitAbbreviationsCache.GetAllUnitAbbreviationsForQuantity(typeof(TUnitType), formatProvider); - var pattern = GetRegexPatternForUnitAbbreviations(unitAbbreviations); - - // Match entire string exactly - return $"^{pattern}$"; - } - - private Regex CreateRegexForQuantity(IFormatProvider? formatProvider) where TUnitType : Enum + /// + /// Gets ToString format arguments. + /// + /// The type of units to format. + /// The units + /// The unit value to format. + /// The current culture. + /// The list of format arguments. + /// An array of ToString format arguments. + public static object[] GetFormatArgs(TUnitType unit, double value, IFormatProvider? culture, IEnumerable args) + where TUnitType : Enum { - var pattern = CreateRegexPatternForQuantity(formatProvider); - return new Regex(pattern, RegexOptions.Singleline | RegexOptions.IgnoreCase); + string abbreviation = UnitAbbreviationsCache.Default.GetDefaultAbbreviation(typeof(TUnitType), Convert.ToInt32(unit), culture); + return new object[] { value, abbreviation }.Concat(args).ToArray(); } } } From 40a27a28096cfa24190c9d1fcc0aac1f347eb804 Mon Sep 17 00:00:00 2001 From: Tristan Milnthorp Date: Tue, 21 Feb 2023 16:58:05 -0500 Subject: [PATCH 10/26] Revert --- UnitsNet/CustomCode/QuantityParser.cs | 25 ++++++++++++------------- UnitsNet/UnitFormatter.cs | 20 +------------------- 2 files changed, 13 insertions(+), 32 deletions(-) diff --git a/UnitsNet/CustomCode/QuantityParser.cs b/UnitsNet/CustomCode/QuantityParser.cs index a029e13513..7ad2594a53 100644 --- a/UnitsNet/CustomCode/QuantityParser.cs +++ b/UnitsNet/CustomCode/QuantityParser.cs @@ -193,20 +193,19 @@ private static bool TryExtractValueAndUnit(Regex regex, string str, [NotNullWhen return true; } - /// - /// Gets ToString format arguments. - /// - /// The type of units to format. - /// The units - /// The unit value to format. - /// The current culture. - /// The list of format arguments. - /// An array of ToString format arguments. - public static object[] GetFormatArgs(TUnitType unit, double value, IFormatProvider? culture, IEnumerable args) - where TUnitType : Enum + private string CreateRegexPatternForQuantity(IFormatProvider? formatProvider) where TUnitType : Enum + { + var unitAbbreviations = _unitAbbreviationsCache.GetAllUnitAbbreviationsForQuantity(typeof(TUnitType), formatProvider); + var pattern = GetRegexPatternForUnitAbbreviations(unitAbbreviations); + + // Match entire string exactly + return $"^{pattern}$"; + } + + private Regex CreateRegexForQuantity(IFormatProvider? formatProvider) where TUnitType : Enum { - string abbreviation = UnitAbbreviationsCache.Default.GetDefaultAbbreviation(typeof(TUnitType), Convert.ToInt32(unit), culture); - return new object[] { value, abbreviation }.Concat(args).ToArray(); + var pattern = CreateRegexPatternForQuantity(formatProvider); + return new Regex(pattern, RegexOptions.Singleline | RegexOptions.IgnoreCase); } } } diff --git a/UnitsNet/UnitFormatter.cs b/UnitsNet/UnitFormatter.cs index 0862a47d29..06ecbbf700 100644 --- a/UnitsNet/UnitFormatter.cs +++ b/UnitsNet/UnitFormatter.cs @@ -3,12 +3,7 @@ using System; using System.Collections.Generic; -using System.Globalization; -using System.IO; using System.Linq; -using System.Reflection; -using System.Resources; -using System.Threading; namespace UnitsNet { @@ -78,21 +73,8 @@ private static bool NearlyEqual(double a, double b) public static object[] GetFormatArgs(TUnitType unit, double value, IFormatProvider? culture, IEnumerable args) where TUnitType : Enum { - string abbreviation = GetAbbreviations2("Duration", "Microsecond", new CultureInfo("ru-RU")).FirstOrDefault() ?? string.Empty; + string abbreviation = UnitAbbreviationsCache.Default.GetDefaultAbbreviation(typeof(TUnitType), Convert.ToInt32(unit), culture); return new object[] {value, abbreviation}.Concat(args).ToArray(); } - - private static string[] GetAbbreviations2(string quantityName, string unitString, CultureInfo? culture = null) - { - var resourceName = $"UnitsNet.GeneratedCode.Resources.{quantityName}"; - var resourceManager = new ResourceManager(resourceName, typeof(Length).Assembly); - - var abbreviation = resourceManager.GetString(unitString, culture ?? Thread.CurrentThread.CurrentCulture); - if(abbreviation is null) - return Array.Empty(); - - var abbreviations = abbreviation.Split(','); - return abbreviations; - } } } From 29498c16fffa4fa8dd6991402cc84d1325c9559d Mon Sep 17 00:00:00 2001 From: Tristan Milnthorp Date: Tue, 21 Feb 2023 17:01:09 -0500 Subject: [PATCH 11/26] Remove quotes --- CodeGen/Generators/UnitsNetGenerator.cs | 4 +- .../Resources/Acceleration.restext | 28 ++-- .../Resources/Acceleration.ru-RU.restext | 28 ++-- .../Resources/AmountOfSubstance.restext | 30 ++--- .../Resources/AmplitudeRatio.restext | 8 +- .../GeneratedCode/Resources/Angle.restext | 32 ++--- .../Resources/Angle.ru-RU.restext | 24 ++-- .../Resources/ApparentEnergy.restext | 6 +- .../Resources/ApparentPower.restext | 12 +- UnitsNet/GeneratedCode/Resources/Area.restext | 28 ++-- .../Resources/Area.ru-RU.restext | 28 ++-- .../Resources/Area.zh-CN.restext | 26 ++-- .../Resources/AreaDensity.restext | 6 +- .../Resources/AreaMomentOfInertia.restext | 12 +- .../GeneratedCode/Resources/BitRate.restext | 52 ++++---- .../BrakeSpecificFuelConsumption.restext | 6 +- .../Resources/Capacitance.restext | 14 +- .../CoefficientOfThermalExpansion.restext | 6 +- .../Resources/Compressibility.restext | 14 +- .../GeneratedCode/Resources/Density.restext | 102 +++++++------- .../Resources/Density.ru-RU.restext | 8 +- .../GeneratedCode/Resources/Duration.restext | 22 ++-- .../Resources/Duration.ru-RU.restext | 20 +-- .../Resources/DynamicViscosity.restext | 20 +-- .../Resources/ElectricAdmittance.restext | 8 +- .../Resources/ElectricCharge.restext | 22 ++-- .../Resources/ElectricChargeDensity.restext | 2 +- .../Resources/ElectricConductance.restext | 10 +- .../Resources/ElectricConductivity.restext | 12 +- .../Resources/ElectricCurrent.restext | 18 +-- .../Resources/ElectricCurrentDensity.restext | 6 +- .../Resources/ElectricCurrentGradient.restext | 8 +- .../Resources/ElectricField.restext | 2 +- .../Resources/ElectricInductance.restext | 10 +- .../Resources/ElectricPotential.restext | 12 +- .../Resources/ElectricPotential.ru-RU.restext | 12 +- .../Resources/ElectricPotentialAc.restext | 10 +- .../ElectricPotentialChangeRate.restext | 40 +++--- .../Resources/ElectricPotentialDc.restext | 10 +- .../Resources/ElectricResistance.restext | 14 +- .../Resources/ElectricResistivity.restext | 28 ++-- .../ElectricSurfaceChargeDensity.restext | 6 +- .../GeneratedCode/Resources/Energy.restext | 76 +++++------ .../Resources/Energy.ru-RU.restext | 42 +++--- .../Resources/EnergyDensity.restext | 24 ++-- .../GeneratedCode/Resources/Entropy.restext | 14 +- .../GeneratedCode/Resources/Force.restext | 30 ++--- .../Resources/Force.ru-RU.restext | 26 ++-- .../Resources/ForceChangeRate.restext | 30 ++--- .../Resources/ForcePerLength.restext | 76 +++++------ .../Resources/ForcePerLength.ru-RU.restext | 12 +- .../GeneratedCode/Resources/Frequency.restext | 26 ++-- .../Resources/Frequency.ru-RU.restext | 18 +-- .../Resources/FuelEfficiency.restext | 8 +- .../GeneratedCode/Resources/HeatFlux.restext | 36 ++--- .../Resources/HeatTransferCoefficient.restext | 12 +- .../Resources/Illuminance.restext | 8 +- .../GeneratedCode/Resources/Impulse.restext | 26 ++-- .../Resources/Information.restext | 52 ++++---- .../Resources/Irradiance.restext | 28 ++-- .../Resources/Irradiation.restext | 14 +- UnitsNet/GeneratedCode/Resources/Jerk.restext | 22 ++-- .../Resources/Jerk.ru-RU.restext | 22 ++-- .../Resources/KinematicViscosity.restext | 18 +-- .../KinematicViscosity.ru-RU.restext | 16 +-- .../GeneratedCode/Resources/Length.restext | 72 +++++----- .../Resources/Length.ru-RU.restext | 32 ++--- .../Resources/Length.zh-CN.restext | 32 ++--- .../GeneratedCode/Resources/Level.restext | 4 +- .../Resources/LinearDensity.restext | 28 ++-- .../Resources/LinearPowerDensity.restext | 50 +++---- .../GeneratedCode/Resources/Luminance.restext | 20 +-- .../Resources/Luminosity.restext | 28 ++-- .../Resources/LuminousFlux.restext | 2 +- .../Resources/LuminousIntensity.restext | 2 +- .../Resources/MagneticField.restext | 12 +- .../Resources/MagneticFlux.restext | 2 +- .../Resources/Magnetization.restext | 2 +- UnitsNet/GeneratedCode/Resources/Mass.restext | 50 +++---- .../Resources/Mass.ru-RU.restext | 34 ++--- .../Resources/Mass.zh-CN.restext | 36 ++--- .../Resources/MassConcentration.restext | 98 +++++++------- .../Resources/MassConcentration.ru-RU.restext | 8 +- .../GeneratedCode/Resources/MassFlow.restext | 66 +++++----- .../Resources/MassFlow.ru-RU.restext | 4 +- .../GeneratedCode/Resources/MassFlux.restext | 24 ++-- .../Resources/MassFraction.restext | 48 +++---- .../Resources/MassMomentOfInertia.restext | 56 ++++---- .../Resources/MolarEnergy.restext | 6 +- .../Resources/MolarEntropy.restext | 6 +- .../GeneratedCode/Resources/MolarFlow.restext | 18 +-- .../GeneratedCode/Resources/MolarMass.restext | 26 ++-- .../Resources/MolarMass.ru-RU.restext | 24 ++-- .../GeneratedCode/Resources/Molarity.restext | 22 ++-- .../Resources/Permeability.restext | 2 +- .../Resources/Permittivity.restext | 2 +- .../PorousMediumPermeability.restext | 10 +- .../GeneratedCode/Resources/Power.restext | 52 ++++---- .../Resources/PowerDensity.restext | 88 ++++++------- .../Resources/PowerRatio.restext | 4 +- .../GeneratedCode/Resources/Pressure.restext | 94 ++++++------- .../Resources/Pressure.ru-RU.restext | 62 ++++----- .../Resources/PressureChangeRate.restext | 28 ++-- .../PressureChangeRate.ru-RU.restext | 28 ++-- .../GeneratedCode/Resources/Ratio.restext | 12 +- .../Resources/RatioChangeRate.restext | 4 +- .../Resources/ReactiveEnergy.restext | 6 +- .../Resources/ReactivePower.restext | 8 +- .../Resources/ReciprocalArea.restext | 22 ++-- .../Resources/ReciprocalLength.restext | 20 +-- .../Resources/RelativeHumidity.restext | 2 +- .../Resources/RotationalAcceleration.restext | 8 +- .../Resources/RotationalSpeed.restext | 26 ++-- .../Resources/RotationalSpeed.ru-RU.restext | 24 ++-- .../Resources/RotationalStiffness.restext | 66 +++++----- .../RotationalStiffnessPerLength.restext | 10 +- .../GeneratedCode/Resources/Scalar.restext | 2 +- .../Resources/SolidAngle.restext | 2 +- .../Resources/SpecificEnergy.restext | 60 ++++----- .../Resources/SpecificEntropy.restext | 18 +-- .../Resources/SpecificFuelConsumption.restext | 8 +- .../Resources/SpecificVolume.restext | 6 +- .../Resources/SpecificWeight.restext | 34 ++--- .../GeneratedCode/Resources/Speed.restext | 66 +++++----- .../Resources/Speed.ru-RU.restext | 48 +++---- .../Resources/StandardVolumeFlow.restext | 18 +-- .../Resources/Temperature.restext | 20 +-- .../Resources/TemperatureChangeRate.restext | 20 +-- .../Resources/TemperatureDelta.restext | 18 +-- .../Resources/TemperatureGradient.restext | 8 +- .../Resources/ThermalConductivity.restext | 4 +- .../Resources/ThermalResistance.restext | 12 +- .../GeneratedCode/Resources/Torque.restext | 50 +++---- .../Resources/Torque.ru-RU.restext | 6 +- .../Resources/TorquePerLength.restext | 42 +++--- .../Resources/TorquePerLength.ru-RU.restext | 6 +- .../GeneratedCode/Resources/Turbidity.restext | 2 +- .../GeneratedCode/Resources/VitaminA.restext | 2 +- .../Resources/Volume.fr-CA.restext | 2 +- .../GeneratedCode/Resources/Volume.restext | 92 ++++++------- .../Resources/Volume.ru-RU.restext | 74 +++++------ .../Resources/VolumeConcentration.restext | 40 +++--- .../Resources/VolumeFlow.restext | 124 +++++++++--------- .../Resources/VolumeFlow.ru-RU.restext | 54 ++++---- .../Resources/VolumeFlowPerArea.restext | 4 +- .../Resources/VolumePerLength.restext | 14 +- .../Resources/VolumetricHeatCapacity.restext | 18 +-- .../Resources/WarpingMomentOfInertia.restext | 12 +- 148 files changed, 1839 insertions(+), 1839 deletions(-) diff --git a/CodeGen/Generators/UnitsNetGenerator.cs b/CodeGen/Generators/UnitsNetGenerator.cs index e0a3386f66..cf04e725b3 100644 --- a/CodeGen/Generators/UnitsNetGenerator.cs +++ b/CodeGen/Generators/UnitsNetGenerator.cs @@ -163,11 +163,11 @@ private static void GenerateResourceFiles(Quantity[] quantities, string resource { if(localization.Abbreviations.Any()) { - writer.Write($"{unit.SingularName} = "); + writer.Write($"{unit.SingularName}="); for(int i = 0; i < localization.Abbreviations.Length; i++) { - writer.Write($"\"{localization.Abbreviations[i]}\""); + writer.Write($"{localization.Abbreviations[i]}"); if(i != localization.Abbreviations.Length - 1) writer.Write(","); diff --git a/UnitsNet/GeneratedCode/Resources/Acceleration.restext b/UnitsNet/GeneratedCode/Resources/Acceleration.restext index 58813d3246..69f3ccefbf 100644 --- a/UnitsNet/GeneratedCode/Resources/Acceleration.restext +++ b/UnitsNet/GeneratedCode/Resources/Acceleration.restext @@ -1,14 +1,14 @@ -CentimeterPerSecondSquared = "cm/s²" -DecimeterPerSecondSquared = "dm/s²" -FootPerSecondSquared = "ft/s²" -InchPerSecondSquared = "in/s²" -KilometerPerSecondSquared = "km/s²" -KnotPerHour = "kn/h" -KnotPerMinute = "kn/min" -KnotPerSecond = "kn/s" -MeterPerSecondSquared = "m/s²" -MicrometerPerSecondSquared = "µm/s²" -MillimeterPerSecondSquared = "mm/s²" -MillistandardGravity = "mg" -NanometerPerSecondSquared = "nm/s²" -StandardGravity = "g" +CentimeterPerSecondSquared=cm/s² +DecimeterPerSecondSquared=dm/s² +FootPerSecondSquared=ft/s² +InchPerSecondSquared=in/s² +KilometerPerSecondSquared=km/s² +KnotPerHour=kn/h +KnotPerMinute=kn/min +KnotPerSecond=kn/s +MeterPerSecondSquared=m/s² +MicrometerPerSecondSquared=µm/s² +MillimeterPerSecondSquared=mm/s² +MillistandardGravity=mg +NanometerPerSecondSquared=nm/s² +StandardGravity=g diff --git a/UnitsNet/GeneratedCode/Resources/Acceleration.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Acceleration.ru-RU.restext index bf47e243cf..dd35dc9172 100644 --- a/UnitsNet/GeneratedCode/Resources/Acceleration.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Acceleration.ru-RU.restext @@ -1,14 +1,14 @@ -CentimeterPerSecondSquared = "см/с²" -DecimeterPerSecondSquared = "дм/с²" -FootPerSecondSquared = "фут/с²" -InchPerSecondSquared = "дюйм/с²" -KilometerPerSecondSquared = "км/с²" -KnotPerHour = "узел/час" -KnotPerMinute = "узел/мин" -KnotPerSecond = "узел/с" -MeterPerSecondSquared = "м/с²" -MicrometerPerSecondSquared = "мкм/с²" -MillimeterPerSecondSquared = "мм/с²" -MillistandardGravity = "мg" -NanometerPerSecondSquared = "нм/с²" -StandardGravity = "g" +CentimeterPerSecondSquared=см/с² +DecimeterPerSecondSquared=дм/с² +FootPerSecondSquared=фут/с² +InchPerSecondSquared=дюйм/с² +KilometerPerSecondSquared=км/с² +KnotPerHour=узел/час +KnotPerMinute=узел/мин +KnotPerSecond=узел/с +MeterPerSecondSquared=м/с² +MicrometerPerSecondSquared=мкм/с² +MillimeterPerSecondSquared=мм/с² +MillistandardGravity=мg +NanometerPerSecondSquared=нм/с² +StandardGravity=g diff --git a/UnitsNet/GeneratedCode/Resources/AmountOfSubstance.restext b/UnitsNet/GeneratedCode/Resources/AmountOfSubstance.restext index 6e5a8528ec..dfc38b060d 100644 --- a/UnitsNet/GeneratedCode/Resources/AmountOfSubstance.restext +++ b/UnitsNet/GeneratedCode/Resources/AmountOfSubstance.restext @@ -1,15 +1,15 @@ -Centimole = "cmol" -CentipoundMole = "clbmol" -Decimole = "dmol" -DecipoundMole = "dlbmol" -Kilomole = "kmol" -KilopoundMole = "klbmol" -Megamole = "Mmol" -Micromole = "µmol" -MicropoundMole = "µlbmol" -Millimole = "mmol" -MillipoundMole = "mlbmol" -Mole = "mol" -Nanomole = "nmol" -NanopoundMole = "nlbmol" -PoundMole = "lbmol" +Centimole=cmol +CentipoundMole=clbmol +Decimole=dmol +DecipoundMole=dlbmol +Kilomole=kmol +KilopoundMole=klbmol +Megamole=Mmol +Micromole=µmol +MicropoundMole=µlbmol +Millimole=mmol +MillipoundMole=mlbmol +Mole=mol +Nanomole=nmol +NanopoundMole=nlbmol +PoundMole=lbmol diff --git a/UnitsNet/GeneratedCode/Resources/AmplitudeRatio.restext b/UnitsNet/GeneratedCode/Resources/AmplitudeRatio.restext index 5a37fe634c..bb18e275dc 100644 --- a/UnitsNet/GeneratedCode/Resources/AmplitudeRatio.restext +++ b/UnitsNet/GeneratedCode/Resources/AmplitudeRatio.restext @@ -1,4 +1,4 @@ -DecibelMicrovolt = "dBµV" -DecibelMillivolt = "dBmV" -DecibelUnloaded = "dBu" -DecibelVolt = "dBV" +DecibelMicrovolt=dBµV +DecibelMillivolt=dBmV +DecibelUnloaded=dBu +DecibelVolt=dBV diff --git a/UnitsNet/GeneratedCode/Resources/Angle.restext b/UnitsNet/GeneratedCode/Resources/Angle.restext index 5b74699e9c..e95a202bfd 100644 --- a/UnitsNet/GeneratedCode/Resources/Angle.restext +++ b/UnitsNet/GeneratedCode/Resources/Angle.restext @@ -1,16 +1,16 @@ -Arcminute = "'","arcmin","amin","min" -Arcsecond = "″","arcsec","asec","sec" -Centiradian = "crad" -Deciradian = "drad" -Degree = "°","deg" -Gradian = "g" -Microdegree = "µ°","µdeg" -Microradian = "µrad" -Millidegree = "m°","mdeg" -Milliradian = "mrad" -Nanodegree = "n°","ndeg" -Nanoradian = "nrad" -NatoMil = "mil" -Radian = "rad" -Revolution = "r" -Tilt = "sin(θ)" +Arcminute=',arcmin,amin,min +Arcsecond=″,arcsec,asec,sec +Centiradian=crad +Deciradian=drad +Degree=°,deg +Gradian=g +Microdegree=µ°,µdeg +Microradian=µrad +Millidegree=m°,mdeg +Milliradian=mrad +Nanodegree=n°,ndeg +Nanoradian=nrad +NatoMil=mil +Radian=rad +Revolution=r +Tilt=sin(θ) diff --git a/UnitsNet/GeneratedCode/Resources/Angle.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Angle.ru-RU.restext index fe5cf26235..4d2c71960c 100644 --- a/UnitsNet/GeneratedCode/Resources/Angle.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Angle.ru-RU.restext @@ -1,12 +1,12 @@ -Centiradian = "срад" -Deciradian = "драд" -Degree = "°" -Gradian = "g" -Microdegree = "мк°" -Microradian = "мкрад" -Millidegree = "м°" -Milliradian = "мрад" -Nanodegree = "н°" -Nanoradian = "нрад" -Radian = "рад" -Revolution = "r" +Centiradian=срад +Deciradian=драд +Degree=° +Gradian=g +Microdegree=мк° +Microradian=мкрад +Millidegree=м° +Milliradian=мрад +Nanodegree=н° +Nanoradian=нрад +Radian=рад +Revolution=r diff --git a/UnitsNet/GeneratedCode/Resources/ApparentEnergy.restext b/UnitsNet/GeneratedCode/Resources/ApparentEnergy.restext index 5e0f9dfa67..bc7123747b 100644 --- a/UnitsNet/GeneratedCode/Resources/ApparentEnergy.restext +++ b/UnitsNet/GeneratedCode/Resources/ApparentEnergy.restext @@ -1,3 +1,3 @@ -KilovoltampereHour = "kVAh" -MegavoltampereHour = "MVAh" -VoltampereHour = "VAh" +KilovoltampereHour=kVAh +MegavoltampereHour=MVAh +VoltampereHour=VAh diff --git a/UnitsNet/GeneratedCode/Resources/ApparentPower.restext b/UnitsNet/GeneratedCode/Resources/ApparentPower.restext index e19d3a93b2..a59c422c66 100644 --- a/UnitsNet/GeneratedCode/Resources/ApparentPower.restext +++ b/UnitsNet/GeneratedCode/Resources/ApparentPower.restext @@ -1,6 +1,6 @@ -Gigavoltampere = "GVA" -Kilovoltampere = "kVA" -Megavoltampere = "MVA" -Microvoltampere = "µVA" -Millivoltampere = "mVA" -Voltampere = "VA" +Gigavoltampere=GVA +Kilovoltampere=kVA +Megavoltampere=MVA +Microvoltampere=µVA +Millivoltampere=mVA +Voltampere=VA diff --git a/UnitsNet/GeneratedCode/Resources/Area.restext b/UnitsNet/GeneratedCode/Resources/Area.restext index db3a79047b..92c87f24d6 100644 --- a/UnitsNet/GeneratedCode/Resources/Area.restext +++ b/UnitsNet/GeneratedCode/Resources/Area.restext @@ -1,14 +1,14 @@ -Acre = "ac" -Hectare = "ha" -SquareCentimeter = "cm²" -SquareDecimeter = "dm²" -SquareFoot = "ft²" -SquareInch = "in²" -SquareKilometer = "km²" -SquareMeter = "m²" -SquareMicrometer = "µm²" -SquareMile = "mi²" -SquareMillimeter = "mm²" -SquareNauticalMile = "nmi²" -SquareYard = "yd²" -UsSurveySquareFoot = "ft² (US)" +Acre=ac +Hectare=ha +SquareCentimeter=cm² +SquareDecimeter=dm² +SquareFoot=ft² +SquareInch=in² +SquareKilometer=km² +SquareMeter=m² +SquareMicrometer=µm² +SquareMile=mi² +SquareMillimeter=mm² +SquareNauticalMile=nmi² +SquareYard=yd² +UsSurveySquareFoot=ft² (US) diff --git a/UnitsNet/GeneratedCode/Resources/Area.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Area.ru-RU.restext index a09d31cd95..6359baa179 100644 --- a/UnitsNet/GeneratedCode/Resources/Area.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Area.ru-RU.restext @@ -1,14 +1,14 @@ -Acre = "акр" -Hectare = "га" -SquareCentimeter = "см²" -SquareDecimeter = "дм²" -SquareFoot = "фут²" -SquareInch = "дюйм²" -SquareKilometer = "км²" -SquareMeter = "м²" -SquareMicrometer = "мкм²" -SquareMile = "миля²" -SquareMillimeter = "мм²" -SquareNauticalMile = "морск.миля²" -SquareYard = "ярд²" -UsSurveySquareFoot = "фут² (US)" +Acre=акр +Hectare=га +SquareCentimeter=см² +SquareDecimeter=дм² +SquareFoot=фут² +SquareInch=дюйм² +SquareKilometer=км² +SquareMeter=м² +SquareMicrometer=мкм² +SquareMile=миля² +SquareMillimeter=мм² +SquareNauticalMile=морск.миля² +SquareYard=ярд² +UsSurveySquareFoot=фут² (US) diff --git a/UnitsNet/GeneratedCode/Resources/Area.zh-CN.restext b/UnitsNet/GeneratedCode/Resources/Area.zh-CN.restext index f127c72037..8dd2e77c7d 100644 --- a/UnitsNet/GeneratedCode/Resources/Area.zh-CN.restext +++ b/UnitsNet/GeneratedCode/Resources/Area.zh-CN.restext @@ -1,13 +1,13 @@ -Acre = "英亩" -Hectare = "英亩" -SquareCentimeter = "平方厘米" -SquareDecimeter = "平方分米" -SquareFoot = "平方英尺" -SquareInch = "平方英寸" -SquareKilometer = "平方公里" -SquareMeter = "平方米" -SquareMicrometer = "平方微米" -SquareMile = "平方英里" -SquareMillimeter = "平方毫米" -SquareNauticalMile = "平方海里" -SquareYard = "平方码" +Acre=英亩 +Hectare=英亩 +SquareCentimeter=平方厘米 +SquareDecimeter=平方分米 +SquareFoot=平方英尺 +SquareInch=平方英寸 +SquareKilometer=平方公里 +SquareMeter=平方米 +SquareMicrometer=平方微米 +SquareMile=平方英里 +SquareMillimeter=平方毫米 +SquareNauticalMile=平方海里 +SquareYard=平方码 diff --git a/UnitsNet/GeneratedCode/Resources/AreaDensity.restext b/UnitsNet/GeneratedCode/Resources/AreaDensity.restext index af9f9bf310..d9b69f9ab7 100644 --- a/UnitsNet/GeneratedCode/Resources/AreaDensity.restext +++ b/UnitsNet/GeneratedCode/Resources/AreaDensity.restext @@ -1,3 +1,3 @@ -GramPerSquareMeter = "g/m²","gsm" -KilogramPerSquareMeter = "kg/m²" -MilligramPerSquareMeter = "mg/m²" +GramPerSquareMeter=g/m²,gsm +KilogramPerSquareMeter=kg/m² +MilligramPerSquareMeter=mg/m² diff --git a/UnitsNet/GeneratedCode/Resources/AreaMomentOfInertia.restext b/UnitsNet/GeneratedCode/Resources/AreaMomentOfInertia.restext index 401d9f850e..af72e156b3 100644 --- a/UnitsNet/GeneratedCode/Resources/AreaMomentOfInertia.restext +++ b/UnitsNet/GeneratedCode/Resources/AreaMomentOfInertia.restext @@ -1,6 +1,6 @@ -CentimeterToTheFourth = "cm⁴","cm^4" -DecimeterToTheFourth = "dm⁴","dm^4" -FootToTheFourth = "ft⁴","ft^4" -InchToTheFourth = "in⁴","in^4" -MeterToTheFourth = "m⁴","m^4" -MillimeterToTheFourth = "mm⁴","mm^4" +CentimeterToTheFourth=cm⁴,cm^4 +DecimeterToTheFourth=dm⁴,dm^4 +FootToTheFourth=ft⁴,ft^4 +InchToTheFourth=in⁴,in^4 +MeterToTheFourth=m⁴,m^4 +MillimeterToTheFourth=mm⁴,mm^4 diff --git a/UnitsNet/GeneratedCode/Resources/BitRate.restext b/UnitsNet/GeneratedCode/Resources/BitRate.restext index 0e399b18c0..7e08163427 100644 --- a/UnitsNet/GeneratedCode/Resources/BitRate.restext +++ b/UnitsNet/GeneratedCode/Resources/BitRate.restext @@ -1,26 +1,26 @@ -BitPerSecond = "bit/s","bps" -BytePerSecond = "B/s" -ExabitPerSecond = "Ebit/s","Ebps" -ExabytePerSecond = "EB/s" -ExbibitPerSecond = "Eibit/s","Eibps" -ExbibytePerSecond = "EiB/s" -GibibitPerSecond = "Gibit/s","Gibps" -GibibytePerSecond = "GiB/s" -GigabitPerSecond = "Gbit/s","Gbps" -GigabytePerSecond = "GB/s" -KibibitPerSecond = "Kibit/s","Kibps" -KibibytePerSecond = "KiB/s" -KilobitPerSecond = "kbit/s","kbps" -KilobytePerSecond = "kB/s" -MebibitPerSecond = "Mibit/s","Mibps" -MebibytePerSecond = "MiB/s" -MegabitPerSecond = "Mbit/s","Mbps" -MegabytePerSecond = "MB/s" -PebibitPerSecond = "Pibit/s","Pibps" -PebibytePerSecond = "PiB/s" -PetabitPerSecond = "Pbit/s","Pbps" -PetabytePerSecond = "PB/s" -TebibitPerSecond = "Tibit/s","Tibps" -TebibytePerSecond = "TiB/s" -TerabitPerSecond = "Tbit/s","Tbps" -TerabytePerSecond = "TB/s" +BitPerSecond=bit/s,bps +BytePerSecond=B/s +ExabitPerSecond=Ebit/s,Ebps +ExabytePerSecond=EB/s +ExbibitPerSecond=Eibit/s,Eibps +ExbibytePerSecond=EiB/s +GibibitPerSecond=Gibit/s,Gibps +GibibytePerSecond=GiB/s +GigabitPerSecond=Gbit/s,Gbps +GigabytePerSecond=GB/s +KibibitPerSecond=Kibit/s,Kibps +KibibytePerSecond=KiB/s +KilobitPerSecond=kbit/s,kbps +KilobytePerSecond=kB/s +MebibitPerSecond=Mibit/s,Mibps +MebibytePerSecond=MiB/s +MegabitPerSecond=Mbit/s,Mbps +MegabytePerSecond=MB/s +PebibitPerSecond=Pibit/s,Pibps +PebibytePerSecond=PiB/s +PetabitPerSecond=Pbit/s,Pbps +PetabytePerSecond=PB/s +TebibitPerSecond=Tibit/s,Tibps +TebibytePerSecond=TiB/s +TerabitPerSecond=Tbit/s,Tbps +TerabytePerSecond=TB/s diff --git a/UnitsNet/GeneratedCode/Resources/BrakeSpecificFuelConsumption.restext b/UnitsNet/GeneratedCode/Resources/BrakeSpecificFuelConsumption.restext index 0e0803e92e..c9f0ed2141 100644 --- a/UnitsNet/GeneratedCode/Resources/BrakeSpecificFuelConsumption.restext +++ b/UnitsNet/GeneratedCode/Resources/BrakeSpecificFuelConsumption.restext @@ -1,3 +1,3 @@ -GramPerKiloWattHour = "g/kWh" -KilogramPerJoule = "kg/J" -PoundPerMechanicalHorsepowerHour = "lb/hph" +GramPerKiloWattHour=g/kWh +KilogramPerJoule=kg/J +PoundPerMechanicalHorsepowerHour=lb/hph diff --git a/UnitsNet/GeneratedCode/Resources/Capacitance.restext b/UnitsNet/GeneratedCode/Resources/Capacitance.restext index e1649c1641..376405fd41 100644 --- a/UnitsNet/GeneratedCode/Resources/Capacitance.restext +++ b/UnitsNet/GeneratedCode/Resources/Capacitance.restext @@ -1,7 +1,7 @@ -Farad = "F" -Kilofarad = "kF" -Megafarad = "MF" -Microfarad = "µF" -Millifarad = "mF" -Nanofarad = "nF" -Picofarad = "pF" +Farad=F +Kilofarad=kF +Megafarad=MF +Microfarad=µF +Millifarad=mF +Nanofarad=nF +Picofarad=pF diff --git a/UnitsNet/GeneratedCode/Resources/CoefficientOfThermalExpansion.restext b/UnitsNet/GeneratedCode/Resources/CoefficientOfThermalExpansion.restext index c6cef79ae2..fb188c8ab0 100644 --- a/UnitsNet/GeneratedCode/Resources/CoefficientOfThermalExpansion.restext +++ b/UnitsNet/GeneratedCode/Resources/CoefficientOfThermalExpansion.restext @@ -1,3 +1,3 @@ -InverseDegreeCelsius = "°C⁻¹","1/°C" -InverseDegreeFahrenheit = "°F⁻¹","1/°F" -InverseKelvin = "K⁻¹","1/K" +InverseDegreeCelsius=°C⁻¹,1/°C +InverseDegreeFahrenheit=°F⁻¹,1/°F +InverseKelvin=K⁻¹,1/K diff --git a/UnitsNet/GeneratedCode/Resources/Compressibility.restext b/UnitsNet/GeneratedCode/Resources/Compressibility.restext index 6ed0a047f3..2463f0563c 100644 --- a/UnitsNet/GeneratedCode/Resources/Compressibility.restext +++ b/UnitsNet/GeneratedCode/Resources/Compressibility.restext @@ -1,7 +1,7 @@ -InverseAtmosphere = "atm⁻¹","1/atm" -InverseBar = "bar⁻¹","1/bar" -InverseKilopascal = "kPa⁻¹","1/kPa" -InverseMegapascal = "MPa⁻¹","1/MPa" -InverseMillibar = "mbar⁻¹","1/mbar" -InversePascal = "Pa⁻¹","1/Pa" -InversePoundForcePerSquareInch = "psi⁻¹","1/psi" +InverseAtmosphere=atm⁻¹,1/atm +InverseBar=bar⁻¹,1/bar +InverseKilopascal=kPa⁻¹,1/kPa +InverseMegapascal=MPa⁻¹,1/MPa +InverseMillibar=mbar⁻¹,1/mbar +InversePascal=Pa⁻¹,1/Pa +InversePoundForcePerSquareInch=psi⁻¹,1/psi diff --git a/UnitsNet/GeneratedCode/Resources/Density.restext b/UnitsNet/GeneratedCode/Resources/Density.restext index 22c5ee8b37..81efd2e0ee 100644 --- a/UnitsNet/GeneratedCode/Resources/Density.restext +++ b/UnitsNet/GeneratedCode/Resources/Density.restext @@ -1,51 +1,51 @@ -CentigramPerDeciliter = "cg/dl" -CentigramPerLiter = "cg/L" -CentigramPerMilliliter = "cg/ml" -DecigramPerDeciliter = "dg/dl" -DecigramPerLiter = "dg/L" -DecigramPerMilliliter = "dg/ml" -GramPerCubicCentimeter = "g/cm³" -GramPerCubicFoot = "g/ft³" -GramPerCubicInch = "g/in³" -GramPerCubicMeter = "g/m³" -GramPerCubicMillimeter = "g/mm³" -GramPerDeciliter = "g/dl" -GramPerLiter = "g/L" -GramPerMilliliter = "g/ml" -KilogramPerCubicCentimeter = "kg/cm³" -KilogramPerCubicMeter = "kg/m³" -KilogramPerCubicMillimeter = "kg/mm³" -KilogramPerLiter = "kg/l" -KilopoundPerCubicFoot = "kip/ft³" -KilopoundPerCubicInch = "kip/in³" -MicrogramPerCubicMeter = "µg/m³" -MicrogramPerDeciliter = "µg/dl" -MicrogramPerLiter = "µg/L" -MicrogramPerMilliliter = "µg/ml" -MilligramPerCubicMeter = "mg/m³" -MilligramPerDeciliter = "mg/dl" -MilligramPerLiter = "mg/L" -MilligramPerMilliliter = "mg/ml" -NanogramPerDeciliter = "ng/dl" -NanogramPerLiter = "ng/L" -NanogramPerMilliliter = "ng/ml" -PicogramPerDeciliter = "pg/dl" -PicogramPerLiter = "pg/L" -PicogramPerMilliliter = "pg/ml" -PoundPerCubicCentimeter = "lb/cm³" -PoundPerCubicFoot = "lb/ft³" -PoundPerCubicInch = "lb/in³" -PoundPerCubicMeter = "lb/m³" -PoundPerCubicMillimeter = "lb/mm³" -PoundPerImperialGallon = "ppg (imp.)" -PoundPerUSGallon = "ppg (U.S.)" -SlugPerCubicCentimeter = "slug/cm³" -SlugPerCubicFoot = "slug/ft³" -SlugPerCubicInch = "slug/in³" -SlugPerCubicMeter = "slug/m³" -SlugPerCubicMillimeter = "slug/mm³" -TonnePerCubicCentimeter = "t/cm³" -TonnePerCubicFoot = "t/ft³" -TonnePerCubicInch = "t/in³" -TonnePerCubicMeter = "t/m³" -TonnePerCubicMillimeter = "t/mm³" +CentigramPerDeciliter=cg/dl +CentigramPerLiter=cg/L +CentigramPerMilliliter=cg/ml +DecigramPerDeciliter=dg/dl +DecigramPerLiter=dg/L +DecigramPerMilliliter=dg/ml +GramPerCubicCentimeter=g/cm³ +GramPerCubicFoot=g/ft³ +GramPerCubicInch=g/in³ +GramPerCubicMeter=g/m³ +GramPerCubicMillimeter=g/mm³ +GramPerDeciliter=g/dl +GramPerLiter=g/L +GramPerMilliliter=g/ml +KilogramPerCubicCentimeter=kg/cm³ +KilogramPerCubicMeter=kg/m³ +KilogramPerCubicMillimeter=kg/mm³ +KilogramPerLiter=kg/l +KilopoundPerCubicFoot=kip/ft³ +KilopoundPerCubicInch=kip/in³ +MicrogramPerCubicMeter=µg/m³ +MicrogramPerDeciliter=µg/dl +MicrogramPerLiter=µg/L +MicrogramPerMilliliter=µg/ml +MilligramPerCubicMeter=mg/m³ +MilligramPerDeciliter=mg/dl +MilligramPerLiter=mg/L +MilligramPerMilliliter=mg/ml +NanogramPerDeciliter=ng/dl +NanogramPerLiter=ng/L +NanogramPerMilliliter=ng/ml +PicogramPerDeciliter=pg/dl +PicogramPerLiter=pg/L +PicogramPerMilliliter=pg/ml +PoundPerCubicCentimeter=lb/cm³ +PoundPerCubicFoot=lb/ft³ +PoundPerCubicInch=lb/in³ +PoundPerCubicMeter=lb/m³ +PoundPerCubicMillimeter=lb/mm³ +PoundPerImperialGallon=ppg (imp.) +PoundPerUSGallon=ppg (U.S.) +SlugPerCubicCentimeter=slug/cm³ +SlugPerCubicFoot=slug/ft³ +SlugPerCubicInch=slug/in³ +SlugPerCubicMeter=slug/m³ +SlugPerCubicMillimeter=slug/mm³ +TonnePerCubicCentimeter=t/cm³ +TonnePerCubicFoot=t/ft³ +TonnePerCubicInch=t/in³ +TonnePerCubicMeter=t/m³ +TonnePerCubicMillimeter=t/mm³ diff --git a/UnitsNet/GeneratedCode/Resources/Density.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Density.ru-RU.restext index 80a1847318..fbe5dcd91e 100644 --- a/UnitsNet/GeneratedCode/Resources/Density.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Density.ru-RU.restext @@ -1,4 +1,4 @@ -GramPerCubicMeter = "г/м³" -KilogramPerCubicMeter = "кг/м³" -MicrogramPerCubicMeter = "мкг/м³" -MilligramPerCubicMeter = "мг/м³" +GramPerCubicMeter=г/м³ +KilogramPerCubicMeter=кг/м³ +MicrogramPerCubicMeter=мкг/м³ +MilligramPerCubicMeter=мг/м³ diff --git a/UnitsNet/GeneratedCode/Resources/Duration.restext b/UnitsNet/GeneratedCode/Resources/Duration.restext index a4904dca1e..ad9e1f2be0 100644 --- a/UnitsNet/GeneratedCode/Resources/Duration.restext +++ b/UnitsNet/GeneratedCode/Resources/Duration.restext @@ -1,11 +1,11 @@ -Day = "d","day","days" -Hour = "h","hr","hrs","hour","hours" -JulianYear = "jyr","jyear","jyears" -Microsecond = "µs","µsec","µsecs","µsecond","µseconds" -Millisecond = "ms","msec","msecs","msecond","mseconds" -Minute = "m","min","minute","minutes" -Month30 = "mo","month","months" -Nanosecond = "ns","nsec","nsecs","nsecond","nseconds" -Second = "s","sec","secs","second","seconds" -Week = "wk","week","weeks" -Year365 = "yr","year","years" +Day=d,day,days +Hour=h,hr,hrs,hour,hours +JulianYear=jyr,jyear,jyears +Microsecond=µs,µsec,µsecs,µsecond,µseconds +Millisecond=ms,msec,msecs,msecond,mseconds +Minute=m,min,minute,minutes +Month30=mo,month,months +Nanosecond=ns,nsec,nsecs,nsecond,nseconds +Second=s,sec,secs,second,seconds +Week=wk,week,weeks +Year365=yr,year,years diff --git a/UnitsNet/GeneratedCode/Resources/Duration.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Duration.ru-RU.restext index e87479078c..0dede1d00b 100644 --- a/UnitsNet/GeneratedCode/Resources/Duration.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Duration.ru-RU.restext @@ -1,10 +1,10 @@ -Day = "сут","д" -Hour = "ч","час" -Microsecond = "мксек","мкс" -Millisecond = "мсек","мс" -Minute = "мин" -Month30 = "месяц" -Nanosecond = "нсек","нс" -Second = "сек","с" -Week = "нед" -Year365 = "год" +Day=сут,д +Hour=ч,час +Microsecond=мксек,мкс +Millisecond=мсек,мс +Minute=мин +Month30=месяц +Nanosecond=нсек,нс +Second=сек,с +Week=нед +Year365=год diff --git a/UnitsNet/GeneratedCode/Resources/DynamicViscosity.restext b/UnitsNet/GeneratedCode/Resources/DynamicViscosity.restext index a5c52b69e9..e5c5fb2167 100644 --- a/UnitsNet/GeneratedCode/Resources/DynamicViscosity.restext +++ b/UnitsNet/GeneratedCode/Resources/DynamicViscosity.restext @@ -1,10 +1,10 @@ -Centipoise = "cP" -MicropascalSecond = "µPa·s","µPaS" -MillipascalSecond = "mPa·s","mPaS" -NewtonSecondPerMeterSquared = "Ns/m²" -PascalSecond = "Pa·s","PaS" -Poise = "P" -PoundForceSecondPerSquareFoot = "lbf·s/ft²" -PoundForceSecondPerSquareInch = "lbf·s/in²" -PoundPerFootSecond = "lb/ft·s" -Reyn = "reyn" +Centipoise=cP +MicropascalSecond=µPa·s,µPaS +MillipascalSecond=mPa·s,mPaS +NewtonSecondPerMeterSquared=Ns/m² +PascalSecond=Pa·s,PaS +Poise=P +PoundForceSecondPerSquareFoot=lbf·s/ft² +PoundForceSecondPerSquareInch=lbf·s/in² +PoundPerFootSecond=lb/ft·s +Reyn=reyn diff --git a/UnitsNet/GeneratedCode/Resources/ElectricAdmittance.restext b/UnitsNet/GeneratedCode/Resources/ElectricAdmittance.restext index 13242ff5e8..052a7782bf 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricAdmittance.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricAdmittance.restext @@ -1,4 +1,4 @@ -Microsiemens = "µS" -Millisiemens = "mS" -Nanosiemens = "nS" -Siemens = "S" +Microsiemens=µS +Millisiemens=mS +Nanosiemens=nS +Siemens=S diff --git a/UnitsNet/GeneratedCode/Resources/ElectricCharge.restext b/UnitsNet/GeneratedCode/Resources/ElectricCharge.restext index 76b801fb8b..5c20939fa2 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricCharge.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricCharge.restext @@ -1,11 +1,11 @@ -AmpereHour = "A-h","Ah" -Coulomb = "C" -KiloampereHour = "kA-h","kAh" -Kilocoulomb = "kC" -MegaampereHour = "MA-h","MAh" -Megacoulomb = "MC" -Microcoulomb = "µC" -MilliampereHour = "mA-h","mAh" -Millicoulomb = "mC" -Nanocoulomb = "nC" -Picocoulomb = "pC" +AmpereHour=A-h,Ah +Coulomb=C +KiloampereHour=kA-h,kAh +Kilocoulomb=kC +MegaampereHour=MA-h,MAh +Megacoulomb=MC +Microcoulomb=µC +MilliampereHour=mA-h,mAh +Millicoulomb=mC +Nanocoulomb=nC +Picocoulomb=pC diff --git a/UnitsNet/GeneratedCode/Resources/ElectricChargeDensity.restext b/UnitsNet/GeneratedCode/Resources/ElectricChargeDensity.restext index 1d456a7136..a956cab450 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricChargeDensity.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricChargeDensity.restext @@ -1 +1 @@ -CoulombPerCubicMeter = "C/m³" +CoulombPerCubicMeter=C/m³ diff --git a/UnitsNet/GeneratedCode/Resources/ElectricConductance.restext b/UnitsNet/GeneratedCode/Resources/ElectricConductance.restext index cb5700748a..72b72d444e 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricConductance.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricConductance.restext @@ -1,5 +1,5 @@ -Kilosiemens = "kS" -Microsiemens = "µS" -Millisiemens = "mS" -Nanosiemens = "nS" -Siemens = "S" +Kilosiemens=kS +Microsiemens=µS +Millisiemens=mS +Nanosiemens=nS +Siemens=S diff --git a/UnitsNet/GeneratedCode/Resources/ElectricConductivity.restext b/UnitsNet/GeneratedCode/Resources/ElectricConductivity.restext index 49a57ad755..e86928b7c4 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricConductivity.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricConductivity.restext @@ -1,6 +1,6 @@ -MicrosiemensPerCentimeter = "µS/cm" -MillisiemensPerCentimeter = "mS/cm" -SiemensPerCentimeter = "S/cm" -SiemensPerFoot = "S/ft" -SiemensPerInch = "S/in" -SiemensPerMeter = "S/m" +MicrosiemensPerCentimeter=µS/cm +MillisiemensPerCentimeter=mS/cm +SiemensPerCentimeter=S/cm +SiemensPerFoot=S/ft +SiemensPerInch=S/in +SiemensPerMeter=S/m diff --git a/UnitsNet/GeneratedCode/Resources/ElectricCurrent.restext b/UnitsNet/GeneratedCode/Resources/ElectricCurrent.restext index e7a358d077..f9354eb517 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricCurrent.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricCurrent.restext @@ -1,9 +1,9 @@ -Ampere = "A" -Centiampere = "cA" -Femtoampere = "fA" -Kiloampere = "kA" -Megaampere = "MA" -Microampere = "µA" -Milliampere = "mA" -Nanoampere = "nA" -Picoampere = "pA" +Ampere=A +Centiampere=cA +Femtoampere=fA +Kiloampere=kA +Megaampere=MA +Microampere=µA +Milliampere=mA +Nanoampere=nA +Picoampere=pA diff --git a/UnitsNet/GeneratedCode/Resources/ElectricCurrentDensity.restext b/UnitsNet/GeneratedCode/Resources/ElectricCurrentDensity.restext index e1c4a25eb2..2f8f890e31 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricCurrentDensity.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricCurrentDensity.restext @@ -1,3 +1,3 @@ -AmperePerSquareFoot = "A/ft²" -AmperePerSquareInch = "A/in²" -AmperePerSquareMeter = "A/m²" +AmperePerSquareFoot=A/ft² +AmperePerSquareInch=A/in² +AmperePerSquareMeter=A/m² diff --git a/UnitsNet/GeneratedCode/Resources/ElectricCurrentGradient.restext b/UnitsNet/GeneratedCode/Resources/ElectricCurrentGradient.restext index c2b1f367da..df2a4dd81f 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricCurrentGradient.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricCurrentGradient.restext @@ -1,4 +1,4 @@ -AmperePerMicrosecond = "A/μs" -AmperePerMillisecond = "A/ms" -AmperePerNanosecond = "A/ns" -AmperePerSecond = "A/s" +AmperePerMicrosecond=A/μs +AmperePerMillisecond=A/ms +AmperePerNanosecond=A/ns +AmperePerSecond=A/s diff --git a/UnitsNet/GeneratedCode/Resources/ElectricField.restext b/UnitsNet/GeneratedCode/Resources/ElectricField.restext index 8ee7399003..0a66b5d3be 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricField.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricField.restext @@ -1 +1 @@ -VoltPerMeter = "V/m" +VoltPerMeter=V/m diff --git a/UnitsNet/GeneratedCode/Resources/ElectricInductance.restext b/UnitsNet/GeneratedCode/Resources/ElectricInductance.restext index ca2f83ff01..b17dfe78c1 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricInductance.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricInductance.restext @@ -1,5 +1,5 @@ -Henry = "H" -Microhenry = "µH" -Millihenry = "mH" -Nanohenry = "nH" -Picohenry = "pH" +Henry=H +Microhenry=µH +Millihenry=mH +Nanohenry=nH +Picohenry=pH diff --git a/UnitsNet/GeneratedCode/Resources/ElectricPotential.restext b/UnitsNet/GeneratedCode/Resources/ElectricPotential.restext index b395b43d19..b9d89cf767 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricPotential.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricPotential.restext @@ -1,6 +1,6 @@ -Kilovolt = "kV" -Megavolt = "MV" -Microvolt = "µV" -Millivolt = "mV" -Nanovolt = "nV" -Volt = "V" +Kilovolt=kV +Megavolt=MV +Microvolt=µV +Millivolt=mV +Nanovolt=nV +Volt=V diff --git a/UnitsNet/GeneratedCode/Resources/ElectricPotential.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/ElectricPotential.ru-RU.restext index 94f5a4d655..3529a78323 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricPotential.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricPotential.ru-RU.restext @@ -1,6 +1,6 @@ -Kilovolt = "кВ" -Megavolt = "МВ" -Microvolt = "мкВ" -Millivolt = "мВ" -Nanovolt = "нВ" -Volt = "В" +Kilovolt=кВ +Megavolt=МВ +Microvolt=мкВ +Millivolt=мВ +Nanovolt=нВ +Volt=В diff --git a/UnitsNet/GeneratedCode/Resources/ElectricPotentialAc.restext b/UnitsNet/GeneratedCode/Resources/ElectricPotentialAc.restext index b54f910f07..3d714e0990 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricPotentialAc.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricPotentialAc.restext @@ -1,5 +1,5 @@ -KilovoltAc = "kVac" -MegavoltAc = "MVac" -MicrovoltAc = "µVac" -MillivoltAc = "mVac" -VoltAc = "Vac" +KilovoltAc=kVac +MegavoltAc=MVac +MicrovoltAc=µVac +MillivoltAc=mVac +VoltAc=Vac diff --git a/UnitsNet/GeneratedCode/Resources/ElectricPotentialChangeRate.restext b/UnitsNet/GeneratedCode/Resources/ElectricPotentialChangeRate.restext index e3b30aa13c..85496aa3ec 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricPotentialChangeRate.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricPotentialChangeRate.restext @@ -1,20 +1,20 @@ -KilovoltPerHour = "kV/h" -KilovoltPerMicrosecond = "kV/μs" -KilovoltPerMinute = "kV/min" -KilovoltPerSecond = "kV/s" -MegavoltPerHour = "MV/h" -MegavoltPerMicrosecond = "MV/μs" -MegavoltPerMinute = "MV/min" -MegavoltPerSecond = "MV/s" -MicrovoltPerHour = "µV/h" -MicrovoltPerMicrosecond = "µV/μs" -MicrovoltPerMinute = "µV/min" -MicrovoltPerSecond = "µV/s" -MillivoltPerHour = "mV/h" -MillivoltPerMicrosecond = "mV/μs" -MillivoltPerMinute = "mV/min" -MillivoltPerSecond = "mV/s" -VoltPerHour = "V/h" -VoltPerMicrosecond = "V/μs" -VoltPerMinute = "V/min" -VoltPerSecond = "V/s" +KilovoltPerHour=kV/h +KilovoltPerMicrosecond=kV/μs +KilovoltPerMinute=kV/min +KilovoltPerSecond=kV/s +MegavoltPerHour=MV/h +MegavoltPerMicrosecond=MV/μs +MegavoltPerMinute=MV/min +MegavoltPerSecond=MV/s +MicrovoltPerHour=µV/h +MicrovoltPerMicrosecond=µV/μs +MicrovoltPerMinute=µV/min +MicrovoltPerSecond=µV/s +MillivoltPerHour=mV/h +MillivoltPerMicrosecond=mV/μs +MillivoltPerMinute=mV/min +MillivoltPerSecond=mV/s +VoltPerHour=V/h +VoltPerMicrosecond=V/μs +VoltPerMinute=V/min +VoltPerSecond=V/s diff --git a/UnitsNet/GeneratedCode/Resources/ElectricPotentialDc.restext b/UnitsNet/GeneratedCode/Resources/ElectricPotentialDc.restext index 7134889967..563fd165ac 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricPotentialDc.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricPotentialDc.restext @@ -1,5 +1,5 @@ -KilovoltDc = "kVdc" -MegavoltDc = "MVdc" -MicrovoltDc = "µVdc" -MillivoltDc = "mVdc" -VoltDc = "Vdc" +KilovoltDc=kVdc +MegavoltDc=MVdc +MicrovoltDc=µVdc +MillivoltDc=mVdc +VoltDc=Vdc diff --git a/UnitsNet/GeneratedCode/Resources/ElectricResistance.restext b/UnitsNet/GeneratedCode/Resources/ElectricResistance.restext index aa5bab19f9..9bd346aad8 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricResistance.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricResistance.restext @@ -1,7 +1,7 @@ -Gigaohm = "GΩ" -Kiloohm = "kΩ" -Megaohm = "MΩ" -Microohm = "µΩ" -Milliohm = "mΩ" -Ohm = "Ω" -Teraohm = "TΩ" +Gigaohm=GΩ +Kiloohm=kΩ +Megaohm=MΩ +Microohm=µΩ +Milliohm=mΩ +Ohm=Ω +Teraohm=TΩ diff --git a/UnitsNet/GeneratedCode/Resources/ElectricResistivity.restext b/UnitsNet/GeneratedCode/Resources/ElectricResistivity.restext index 6281b7ab90..d9301cc6f0 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricResistivity.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricResistivity.restext @@ -1,14 +1,14 @@ -KiloohmCentimeter = "kΩ·cm" -KiloohmMeter = "kΩ·m" -MegaohmCentimeter = "MΩ·cm" -MegaohmMeter = "MΩ·m" -MicroohmCentimeter = "µΩ·cm" -MicroohmMeter = "µΩ·m" -MilliohmCentimeter = "mΩ·cm" -MilliohmMeter = "mΩ·m" -NanoohmCentimeter = "nΩ·cm" -NanoohmMeter = "nΩ·m" -OhmCentimeter = "Ω·cm" -OhmMeter = "Ω·m" -PicoohmCentimeter = "pΩ·cm" -PicoohmMeter = "pΩ·m" +KiloohmCentimeter=kΩ·cm +KiloohmMeter=kΩ·m +MegaohmCentimeter=MΩ·cm +MegaohmMeter=MΩ·m +MicroohmCentimeter=µΩ·cm +MicroohmMeter=µΩ·m +MilliohmCentimeter=mΩ·cm +MilliohmMeter=mΩ·m +NanoohmCentimeter=nΩ·cm +NanoohmMeter=nΩ·m +OhmCentimeter=Ω·cm +OhmMeter=Ω·m +PicoohmCentimeter=pΩ·cm +PicoohmMeter=pΩ·m diff --git a/UnitsNet/GeneratedCode/Resources/ElectricSurfaceChargeDensity.restext b/UnitsNet/GeneratedCode/Resources/ElectricSurfaceChargeDensity.restext index 42e02f61d7..c70a636f66 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricSurfaceChargeDensity.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricSurfaceChargeDensity.restext @@ -1,3 +1,3 @@ -CoulombPerSquareCentimeter = "C/cm²" -CoulombPerSquareInch = "C/in²" -CoulombPerSquareMeter = "C/m²" +CoulombPerSquareCentimeter=C/cm² +CoulombPerSquareInch=C/in² +CoulombPerSquareMeter=C/m² diff --git a/UnitsNet/GeneratedCode/Resources/Energy.restext b/UnitsNet/GeneratedCode/Resources/Energy.restext index da300ac6c0..5f7d8d6128 100644 --- a/UnitsNet/GeneratedCode/Resources/Energy.restext +++ b/UnitsNet/GeneratedCode/Resources/Energy.restext @@ -1,38 +1,38 @@ -BritishThermalUnit = "BTU" -Calorie = "cal" -DecathermEc = "Dth (E.C.)" -DecathermImperial = "Dth (imp.)" -DecathermUs = "Dth (U.S.)" -ElectronVolt = "eV" -Erg = "erg" -FootPound = "ft·lb" -GigabritishThermalUnit = "GBTU" -GigaelectronVolt = "GeV" -Gigajoule = "GJ" -GigawattDay = "GWd" -GigawattHour = "GWh" -HorsepowerHour = "hp·h" -Joule = "J" -KilobritishThermalUnit = "kBTU" -Kilocalorie = "kcal" -KiloelectronVolt = "keV" -Kilojoule = "kJ" -KilowattDay = "kWd" -KilowattHour = "kWh" -MegabritishThermalUnit = "MBTU" -Megacalorie = "Mcal" -MegaelectronVolt = "MeV" -Megajoule = "MJ" -MegawattDay = "MWd" -MegawattHour = "MWh" -Millijoule = "mJ" -Petajoule = "PJ" -TeraelectronVolt = "TeV" -Terajoule = "TJ" -TerawattDay = "TWd" -TerawattHour = "TWh" -ThermEc = "th (E.C.)" -ThermImperial = "th (imp.)" -ThermUs = "th (U.S.)" -WattDay = "Wd" -WattHour = "Wh" +BritishThermalUnit=BTU +Calorie=cal +DecathermEc=Dth (E.C.) +DecathermImperial=Dth (imp.) +DecathermUs=Dth (U.S.) +ElectronVolt=eV +Erg=erg +FootPound=ft·lb +GigabritishThermalUnit=GBTU +GigaelectronVolt=GeV +Gigajoule=GJ +GigawattDay=GWd +GigawattHour=GWh +HorsepowerHour=hp·h +Joule=J +KilobritishThermalUnit=kBTU +Kilocalorie=kcal +KiloelectronVolt=keV +Kilojoule=kJ +KilowattDay=kWd +KilowattHour=kWh +MegabritishThermalUnit=MBTU +Megacalorie=Mcal +MegaelectronVolt=MeV +Megajoule=MJ +MegawattDay=MWd +MegawattHour=MWh +Millijoule=mJ +Petajoule=PJ +TeraelectronVolt=TeV +Terajoule=TJ +TerawattDay=TWd +TerawattHour=TWh +ThermEc=th (E.C.) +ThermImperial=th (imp.) +ThermUs=th (U.S.) +WattDay=Wd +WattHour=Wh diff --git a/UnitsNet/GeneratedCode/Resources/Energy.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Energy.ru-RU.restext index 8a0a77f3d9..06420a5e7a 100644 --- a/UnitsNet/GeneratedCode/Resources/Energy.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Energy.ru-RU.restext @@ -1,21 +1,21 @@ -DecathermEc = "Европейский декатерм" -DecathermImperial = "Английский декатерм" -DecathermUs = "Американский декатерм" -ElectronVolt = "эВ" -GigaelectronVolt = "ГэВ" -GigawattDay = "ГВт/д" -GigawattHour = "ГВт/ч" -KiloelectronVolt = "кэВ" -KilowattDay = "кВт/д" -KilowattHour = "кВт/ч" -MegaelectronVolt = "МэВ" -MegawattDay = "МВт/д" -MegawattHour = "МВт/ч" -TeraelectronVolt = "ТэВ" -TerawattDay = "ТВт/д" -TerawattHour = "ТВт/ч" -ThermEc = "Европейский терм" -ThermImperial = "Английский терм" -ThermUs = "Американский терм" -WattDay = "Вт/д" -WattHour = "Вт/ч" +DecathermEc=Европейский декатерм +DecathermImperial=Английский декатерм +DecathermUs=Американский декатерм +ElectronVolt=эВ +GigaelectronVolt=ГэВ +GigawattDay=ГВт/д +GigawattHour=ГВт/ч +KiloelectronVolt=кэВ +KilowattDay=кВт/д +KilowattHour=кВт/ч +MegaelectronVolt=МэВ +MegawattDay=МВт/д +MegawattHour=МВт/ч +TeraelectronVolt=ТэВ +TerawattDay=ТВт/д +TerawattHour=ТВт/ч +ThermEc=Европейский терм +ThermImperial=Английский терм +ThermUs=Американский терм +WattDay=Вт/д +WattHour=Вт/ч diff --git a/UnitsNet/GeneratedCode/Resources/EnergyDensity.restext b/UnitsNet/GeneratedCode/Resources/EnergyDensity.restext index f1535ca5fd..0c7195646e 100644 --- a/UnitsNet/GeneratedCode/Resources/EnergyDensity.restext +++ b/UnitsNet/GeneratedCode/Resources/EnergyDensity.restext @@ -1,12 +1,12 @@ -GigajoulePerCubicMeter = "GJ/m³" -GigawattHourPerCubicMeter = "GWh/m³" -JoulePerCubicMeter = "J/m³" -KilojoulePerCubicMeter = "kJ/m³" -KilowattHourPerCubicMeter = "kWh/m³" -MegajoulePerCubicMeter = "MJ/m³" -MegawattHourPerCubicMeter = "MWh/m³" -PetajoulePerCubicMeter = "PJ/m³" -PetawattHourPerCubicMeter = "PWh/m³" -TerajoulePerCubicMeter = "TJ/m³" -TerawattHourPerCubicMeter = "TWh/m³" -WattHourPerCubicMeter = "Wh/m³" +GigajoulePerCubicMeter=GJ/m³ +GigawattHourPerCubicMeter=GWh/m³ +JoulePerCubicMeter=J/m³ +KilojoulePerCubicMeter=kJ/m³ +KilowattHourPerCubicMeter=kWh/m³ +MegajoulePerCubicMeter=MJ/m³ +MegawattHourPerCubicMeter=MWh/m³ +PetajoulePerCubicMeter=PJ/m³ +PetawattHourPerCubicMeter=PWh/m³ +TerajoulePerCubicMeter=TJ/m³ +TerawattHourPerCubicMeter=TWh/m³ +WattHourPerCubicMeter=Wh/m³ diff --git a/UnitsNet/GeneratedCode/Resources/Entropy.restext b/UnitsNet/GeneratedCode/Resources/Entropy.restext index 995fbef6b7..ed8a37ceb5 100644 --- a/UnitsNet/GeneratedCode/Resources/Entropy.restext +++ b/UnitsNet/GeneratedCode/Resources/Entropy.restext @@ -1,7 +1,7 @@ -CaloriePerKelvin = "cal/K" -JoulePerDegreeCelsius = "J/C" -JoulePerKelvin = "J/K" -KilocaloriePerKelvin = "kcal/K" -KilojoulePerDegreeCelsius = "kJ/C" -KilojoulePerKelvin = "kJ/K" -MegajoulePerKelvin = "MJ/K" +CaloriePerKelvin=cal/K +JoulePerDegreeCelsius=J/C +JoulePerKelvin=J/K +KilocaloriePerKelvin=kcal/K +KilojoulePerDegreeCelsius=kJ/C +KilojoulePerKelvin=kJ/K +MegajoulePerKelvin=MJ/K diff --git a/UnitsNet/GeneratedCode/Resources/Force.restext b/UnitsNet/GeneratedCode/Resources/Force.restext index 67532ec6c1..abec40ab0e 100644 --- a/UnitsNet/GeneratedCode/Resources/Force.restext +++ b/UnitsNet/GeneratedCode/Resources/Force.restext @@ -1,15 +1,15 @@ -Decanewton = "daN" -Dyn = "dyn" -KilogramForce = "kgf" -Kilonewton = "kN" -KiloPond = "kp" -KilopoundForce = "kipf","kip","k" -Meganewton = "MN" -Micronewton = "µN" -Millinewton = "mN" -Newton = "N" -OunceForce = "ozf" -Poundal = "pdl" -PoundForce = "lbf" -ShortTonForce = "tf (short)","t (US)f","short tons-force" -TonneForce = "tf","Ton" +Decanewton=daN +Dyn=dyn +KilogramForce=kgf +Kilonewton=kN +KiloPond=kp +KilopoundForce=kipf,kip,k +Meganewton=MN +Micronewton=µN +Millinewton=mN +Newton=N +OunceForce=ozf +Poundal=pdl +PoundForce=lbf +ShortTonForce=tf (short),t (US)f,short tons-force +TonneForce=tf,Ton diff --git a/UnitsNet/GeneratedCode/Resources/Force.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Force.ru-RU.restext index c8c2cd7630..ef7d5aadfe 100644 --- a/UnitsNet/GeneratedCode/Resources/Force.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Force.ru-RU.restext @@ -1,13 +1,13 @@ -Decanewton = "даН" -Dyn = "дин" -KilogramForce = "кгс" -Kilonewton = "кН" -KiloPond = "кгс" -KilopoundForce = "кипф","койка","К" -Meganewton = "МН" -Micronewton = "мкН" -Millinewton = "мН" -Newton = "Н" -Poundal = "паундаль" -PoundForce = "фунт-сила" -TonneForce = "тс" +Decanewton=даН +Dyn=дин +KilogramForce=кгс +Kilonewton=кН +KiloPond=кгс +KilopoundForce=кипф,койка,К +Meganewton=МН +Micronewton=мкН +Millinewton=мН +Newton=Н +Poundal=паундаль +PoundForce=фунт-сила +TonneForce=тс diff --git a/UnitsNet/GeneratedCode/Resources/ForceChangeRate.restext b/UnitsNet/GeneratedCode/Resources/ForceChangeRate.restext index e1773316ee..063483ee23 100644 --- a/UnitsNet/GeneratedCode/Resources/ForceChangeRate.restext +++ b/UnitsNet/GeneratedCode/Resources/ForceChangeRate.restext @@ -1,15 +1,15 @@ -CentinewtonPerSecond = "cN/s" -DecanewtonPerMinute = "daN/min" -DecanewtonPerSecond = "daN/s" -DecinewtonPerSecond = "dN/s" -KilonewtonPerMinute = "kN/min" -KilonewtonPerSecond = "kN/s" -KilopoundForcePerMinute = "kipf/min","kip/min","k/min" -KilopoundForcePerSecond = "kipf/s","kip/s","k/s" -MicronewtonPerSecond = "µN/s" -MillinewtonPerSecond = "mN/s" -NanonewtonPerSecond = "nN/s" -NewtonPerMinute = "N/min" -NewtonPerSecond = "N/s" -PoundForcePerMinute = "lbf/min" -PoundForcePerSecond = "lbf/s" +CentinewtonPerSecond=cN/s +DecanewtonPerMinute=daN/min +DecanewtonPerSecond=daN/s +DecinewtonPerSecond=dN/s +KilonewtonPerMinute=kN/min +KilonewtonPerSecond=kN/s +KilopoundForcePerMinute=kipf/min,kip/min,k/min +KilopoundForcePerSecond=kipf/s,kip/s,k/s +MicronewtonPerSecond=µN/s +MillinewtonPerSecond=mN/s +NanonewtonPerSecond=nN/s +NewtonPerMinute=N/min +NewtonPerSecond=N/s +PoundForcePerMinute=lbf/min +PoundForcePerSecond=lbf/s diff --git a/UnitsNet/GeneratedCode/Resources/ForcePerLength.restext b/UnitsNet/GeneratedCode/Resources/ForcePerLength.restext index ddcc8f37a9..976525182d 100644 --- a/UnitsNet/GeneratedCode/Resources/ForcePerLength.restext +++ b/UnitsNet/GeneratedCode/Resources/ForcePerLength.restext @@ -1,38 +1,38 @@ -CentinewtonPerCentimeter = "cN/cm" -CentinewtonPerMeter = "cN/m" -CentinewtonPerMillimeter = "cN/mm" -DecanewtonPerCentimeter = "daN/cm" -DecanewtonPerMeter = "daN/m" -DecanewtonPerMillimeter = "daN/mm" -DecinewtonPerCentimeter = "dN/cm" -DecinewtonPerMeter = "dN/m" -DecinewtonPerMillimeter = "dN/mm" -KilogramForcePerCentimeter = "kgf/cm" -KilogramForcePerMeter = "kgf/m" -KilogramForcePerMillimeter = "kgf/mm" -KilonewtonPerCentimeter = "kN/cm" -KilonewtonPerMeter = "kN/m" -KilonewtonPerMillimeter = "kN/mm" -KilopoundForcePerFoot = "kipf/ft","kip/ft","k/ft" -KilopoundForcePerInch = "kipf/in","kip/in","k/in" -MeganewtonPerCentimeter = "MN/cm" -MeganewtonPerMeter = "MN/m" -MeganewtonPerMillimeter = "MN/mm" -MicronewtonPerCentimeter = "µN/cm" -MicronewtonPerMeter = "µN/m" -MicronewtonPerMillimeter = "µN/mm" -MillinewtonPerCentimeter = "mN/cm" -MillinewtonPerMeter = "mN/m" -MillinewtonPerMillimeter = "mN/mm" -NanonewtonPerCentimeter = "nN/cm" -NanonewtonPerMeter = "nN/m" -NanonewtonPerMillimeter = "nN/mm" -NewtonPerCentimeter = "N/cm" -NewtonPerMeter = "N/m" -NewtonPerMillimeter = "N/mm" -PoundForcePerFoot = "lbf/ft" -PoundForcePerInch = "lbf/in" -PoundForcePerYard = "lbf/yd" -TonneForcePerCentimeter = "tf/cm" -TonneForcePerMeter = "tf/m" -TonneForcePerMillimeter = "tf/mm" +CentinewtonPerCentimeter=cN/cm +CentinewtonPerMeter=cN/m +CentinewtonPerMillimeter=cN/mm +DecanewtonPerCentimeter=daN/cm +DecanewtonPerMeter=daN/m +DecanewtonPerMillimeter=daN/mm +DecinewtonPerCentimeter=dN/cm +DecinewtonPerMeter=dN/m +DecinewtonPerMillimeter=dN/mm +KilogramForcePerCentimeter=kgf/cm +KilogramForcePerMeter=kgf/m +KilogramForcePerMillimeter=kgf/mm +KilonewtonPerCentimeter=kN/cm +KilonewtonPerMeter=kN/m +KilonewtonPerMillimeter=kN/mm +KilopoundForcePerFoot=kipf/ft,kip/ft,k/ft +KilopoundForcePerInch=kipf/in,kip/in,k/in +MeganewtonPerCentimeter=MN/cm +MeganewtonPerMeter=MN/m +MeganewtonPerMillimeter=MN/mm +MicronewtonPerCentimeter=µN/cm +MicronewtonPerMeter=µN/m +MicronewtonPerMillimeter=µN/mm +MillinewtonPerCentimeter=mN/cm +MillinewtonPerMeter=mN/m +MillinewtonPerMillimeter=mN/mm +NanonewtonPerCentimeter=nN/cm +NanonewtonPerMeter=nN/m +NanonewtonPerMillimeter=nN/mm +NewtonPerCentimeter=N/cm +NewtonPerMeter=N/m +NewtonPerMillimeter=N/mm +PoundForcePerFoot=lbf/ft +PoundForcePerInch=lbf/in +PoundForcePerYard=lbf/yd +TonneForcePerCentimeter=tf/cm +TonneForcePerMeter=tf/m +TonneForcePerMillimeter=tf/mm diff --git a/UnitsNet/GeneratedCode/Resources/ForcePerLength.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/ForcePerLength.ru-RU.restext index 09e7974b86..2ade9db4e0 100644 --- a/UnitsNet/GeneratedCode/Resources/ForcePerLength.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/ForcePerLength.ru-RU.restext @@ -1,6 +1,6 @@ -KilogramForcePerCentimeter = "кгс/см" -KilogramForcePerMeter = "кгс/м" -KilogramForcePerMillimeter = "кгс/мм" -TonneForcePerCentimeter = "тс/см" -TonneForcePerMeter = "тс/м" -TonneForcePerMillimeter = "тс/мм" +KilogramForcePerCentimeter=кгс/см +KilogramForcePerMeter=кгс/м +KilogramForcePerMillimeter=кгс/мм +TonneForcePerCentimeter=тс/см +TonneForcePerMeter=тс/м +TonneForcePerMillimeter=тс/мм diff --git a/UnitsNet/GeneratedCode/Resources/Frequency.restext b/UnitsNet/GeneratedCode/Resources/Frequency.restext index 4441d14d6e..0819c0f45b 100644 --- a/UnitsNet/GeneratedCode/Resources/Frequency.restext +++ b/UnitsNet/GeneratedCode/Resources/Frequency.restext @@ -1,13 +1,13 @@ -BeatPerMinute = "bpm" -BUnit = "B Units" -CyclePerHour = "cph" -CyclePerMinute = "cpm" -Gigahertz = "GHz" -Hertz = "Hz" -Kilohertz = "kHz" -Megahertz = "MHz" -Microhertz = "µHz" -Millihertz = "mHz" -PerSecond = "s⁻¹" -RadianPerSecond = "rad/s" -Terahertz = "THz" +BeatPerMinute=bpm +BUnit=B Units +CyclePerHour=cph +CyclePerMinute=cpm +Gigahertz=GHz +Hertz=Hz +Kilohertz=kHz +Megahertz=MHz +Microhertz=µHz +Millihertz=mHz +PerSecond=s⁻¹ +RadianPerSecond=rad/s +Terahertz=THz diff --git a/UnitsNet/GeneratedCode/Resources/Frequency.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Frequency.ru-RU.restext index 82c6af4337..d267498d6b 100644 --- a/UnitsNet/GeneratedCode/Resources/Frequency.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Frequency.ru-RU.restext @@ -1,9 +1,9 @@ -Gigahertz = "ГГц" -Hertz = "Гц" -Kilohertz = "кГц" -Megahertz = "МГц" -Microhertz = "мкГц" -Millihertz = "мГц" -PerSecond = "с⁻¹" -RadianPerSecond = "рад/с" -Terahertz = "ТГц" +Gigahertz=ГГц +Hertz=Гц +Kilohertz=кГц +Megahertz=МГц +Microhertz=мкГц +Millihertz=мГц +PerSecond=с⁻¹ +RadianPerSecond=рад/с +Terahertz=ТГц diff --git a/UnitsNet/GeneratedCode/Resources/FuelEfficiency.restext b/UnitsNet/GeneratedCode/Resources/FuelEfficiency.restext index c57ab1b792..7fb8197044 100644 --- a/UnitsNet/GeneratedCode/Resources/FuelEfficiency.restext +++ b/UnitsNet/GeneratedCode/Resources/FuelEfficiency.restext @@ -1,4 +1,4 @@ -KilometerPerLiter = "km/L" -LiterPer100Kilometers = "L/100km" -MilePerUkGallon = "mpg (imp.)" -MilePerUsGallon = "mpg (U.S.)" +KilometerPerLiter=km/L +LiterPer100Kilometers=L/100km +MilePerUkGallon=mpg (imp.) +MilePerUsGallon=mpg (U.S.) diff --git a/UnitsNet/GeneratedCode/Resources/HeatFlux.restext b/UnitsNet/GeneratedCode/Resources/HeatFlux.restext index ad1cabb9ef..9133478834 100644 --- a/UnitsNet/GeneratedCode/Resources/HeatFlux.restext +++ b/UnitsNet/GeneratedCode/Resources/HeatFlux.restext @@ -1,18 +1,18 @@ -BtuPerHourSquareFoot = "BTU/h·ft²" -BtuPerMinuteSquareFoot = "BTU/min·ft²" -BtuPerSecondSquareFoot = "BTU/s·ft²" -BtuPerSecondSquareInch = "BTU/s·in²" -CaloriePerSecondSquareCentimeter = "cal/s·cm²" -CentiwattPerSquareMeter = "cW/m²" -DeciwattPerSquareMeter = "dW/m²" -KilocaloriePerHourSquareMeter = "kcal/h·m²" -KilocaloriePerSecondSquareCentimeter = "kcal/s·cm²" -KilowattPerSquareMeter = "kW/m²" -MicrowattPerSquareMeter = "µW/m²" -MilliwattPerSquareMeter = "mW/m²" -NanowattPerSquareMeter = "nW/m²" -PoundForcePerFootSecond = "lbf/(ft·s)" -PoundPerSecondCubed = "lb/s³","lbm/s³" -WattPerSquareFoot = "W/ft²" -WattPerSquareInch = "W/in²" -WattPerSquareMeter = "W/m²" +BtuPerHourSquareFoot=BTU/h·ft² +BtuPerMinuteSquareFoot=BTU/min·ft² +BtuPerSecondSquareFoot=BTU/s·ft² +BtuPerSecondSquareInch=BTU/s·in² +CaloriePerSecondSquareCentimeter=cal/s·cm² +CentiwattPerSquareMeter=cW/m² +DeciwattPerSquareMeter=dW/m² +KilocaloriePerHourSquareMeter=kcal/h·m² +KilocaloriePerSecondSquareCentimeter=kcal/s·cm² +KilowattPerSquareMeter=kW/m² +MicrowattPerSquareMeter=µW/m² +MilliwattPerSquareMeter=mW/m² +NanowattPerSquareMeter=nW/m² +PoundForcePerFootSecond=lbf/(ft·s) +PoundPerSecondCubed=lb/s³,lbm/s³ +WattPerSquareFoot=W/ft² +WattPerSquareInch=W/in² +WattPerSquareMeter=W/m² diff --git a/UnitsNet/GeneratedCode/Resources/HeatTransferCoefficient.restext b/UnitsNet/GeneratedCode/Resources/HeatTransferCoefficient.restext index b0931b1295..104aedcb9a 100644 --- a/UnitsNet/GeneratedCode/Resources/HeatTransferCoefficient.restext +++ b/UnitsNet/GeneratedCode/Resources/HeatTransferCoefficient.restext @@ -1,6 +1,6 @@ -BtuPerHourSquareFootDegreeFahrenheit = "Btu/h·ft²·°F","Btu/ft²·h·°F","Btu/hr·ft²·°F","Btu/ft²·hr·°F" -BtuPerSquareFootDegreeFahrenheit = "Btu/ft²·°F" -CaloriePerHourSquareMeterDegreeCelsius = "kcal/h·m²·°C","kcal/m²·h·°C","kcal/hr·m²·°C","kcal/m²·hr·°C" -KilocaloriePerHourSquareMeterDegreeCelsius = "kkcal/h·m²·°C","kkcal/m²·h·°C","kkcal/hr·m²·°C","kkcal/m²·hr·°C" -WattPerSquareMeterCelsius = "W/m²·°C" -WattPerSquareMeterKelvin = "W/m²·K" +BtuPerHourSquareFootDegreeFahrenheit=Btu/h·ft²·°F,Btu/ft²·h·°F,Btu/hr·ft²·°F,Btu/ft²·hr·°F +BtuPerSquareFootDegreeFahrenheit=Btu/ft²·°F +CaloriePerHourSquareMeterDegreeCelsius=kcal/h·m²·°C,kcal/m²·h·°C,kcal/hr·m²·°C,kcal/m²·hr·°C +KilocaloriePerHourSquareMeterDegreeCelsius=kkcal/h·m²·°C,kkcal/m²·h·°C,kkcal/hr·m²·°C,kkcal/m²·hr·°C +WattPerSquareMeterCelsius=W/m²·°C +WattPerSquareMeterKelvin=W/m²·K diff --git a/UnitsNet/GeneratedCode/Resources/Illuminance.restext b/UnitsNet/GeneratedCode/Resources/Illuminance.restext index 4cb1b926d2..7be0e145b5 100644 --- a/UnitsNet/GeneratedCode/Resources/Illuminance.restext +++ b/UnitsNet/GeneratedCode/Resources/Illuminance.restext @@ -1,4 +1,4 @@ -Kilolux = "klx" -Lux = "lx" -Megalux = "Mlx" -Millilux = "mlx" +Kilolux=klx +Lux=lx +Megalux=Mlx +Millilux=mlx diff --git a/UnitsNet/GeneratedCode/Resources/Impulse.restext b/UnitsNet/GeneratedCode/Resources/Impulse.restext index 1459e4ae37..cc3f860f0a 100644 --- a/UnitsNet/GeneratedCode/Resources/Impulse.restext +++ b/UnitsNet/GeneratedCode/Resources/Impulse.restext @@ -1,13 +1,13 @@ -CentinewtonSecond = "cN·s" -DecanewtonSecond = "daN·s" -DecinewtonSecond = "dN·s" -KilogramMeterPerSecond = "kg·m/s" -KilonewtonSecond = "kN·s" -MeganewtonSecond = "MN·s" -MicronewtonSecond = "µN·s" -MillinewtonSecond = "mN·s" -NanonewtonSecond = "nN·s" -NewtonSecond = "N·s" -PoundFootPerSecond = "lb·ft/s" -PoundForceSecond = "lbf·s" -SlugFootPerSecond = "slug·ft/s" +CentinewtonSecond=cN·s +DecanewtonSecond=daN·s +DecinewtonSecond=dN·s +KilogramMeterPerSecond=kg·m/s +KilonewtonSecond=kN·s +MeganewtonSecond=MN·s +MicronewtonSecond=µN·s +MillinewtonSecond=mN·s +NanonewtonSecond=nN·s +NewtonSecond=N·s +PoundFootPerSecond=lb·ft/s +PoundForceSecond=lbf·s +SlugFootPerSecond=slug·ft/s diff --git a/UnitsNet/GeneratedCode/Resources/Information.restext b/UnitsNet/GeneratedCode/Resources/Information.restext index f36878ee2f..9a627d3739 100644 --- a/UnitsNet/GeneratedCode/Resources/Information.restext +++ b/UnitsNet/GeneratedCode/Resources/Information.restext @@ -1,26 +1,26 @@ -Bit = "b" -Byte = "B" -Exabit = "Eb" -Exabyte = "EB" -Exbibit = "Eib" -Exbibyte = "EiB" -Gibibit = "Gib" -Gibibyte = "GiB" -Gigabit = "Gb" -Gigabyte = "GB" -Kibibit = "Kib" -Kibibyte = "KiB" -Kilobit = "kb" -Kilobyte = "kB" -Mebibit = "Mib" -Mebibyte = "MiB" -Megabit = "Mb" -Megabyte = "MB" -Pebibit = "Pib" -Pebibyte = "PiB" -Petabit = "Pb" -Petabyte = "PB" -Tebibit = "Tib" -Tebibyte = "TiB" -Terabit = "Tb" -Terabyte = "TB" +Bit=b +Byte=B +Exabit=Eb +Exabyte=EB +Exbibit=Eib +Exbibyte=EiB +Gibibit=Gib +Gibibyte=GiB +Gigabit=Gb +Gigabyte=GB +Kibibit=Kib +Kibibyte=KiB +Kilobit=kb +Kilobyte=kB +Mebibit=Mib +Mebibyte=MiB +Megabit=Mb +Megabyte=MB +Pebibit=Pib +Pebibyte=PiB +Petabit=Pb +Petabyte=PB +Tebibit=Tib +Tebibyte=TiB +Terabit=Tb +Terabyte=TB diff --git a/UnitsNet/GeneratedCode/Resources/Irradiance.restext b/UnitsNet/GeneratedCode/Resources/Irradiance.restext index 48ae8af783..80fffb2ccf 100644 --- a/UnitsNet/GeneratedCode/Resources/Irradiance.restext +++ b/UnitsNet/GeneratedCode/Resources/Irradiance.restext @@ -1,14 +1,14 @@ -KilowattPerSquareCentimeter = "kW/cm²" -KilowattPerSquareMeter = "kW/m²" -MegawattPerSquareCentimeter = "MW/cm²" -MegawattPerSquareMeter = "MW/m²" -MicrowattPerSquareCentimeter = "µW/cm²" -MicrowattPerSquareMeter = "µW/m²" -MilliwattPerSquareCentimeter = "mW/cm²" -MilliwattPerSquareMeter = "mW/m²" -NanowattPerSquareCentimeter = "nW/cm²" -NanowattPerSquareMeter = "nW/m²" -PicowattPerSquareCentimeter = "pW/cm²" -PicowattPerSquareMeter = "pW/m²" -WattPerSquareCentimeter = "W/cm²" -WattPerSquareMeter = "W/m²" +KilowattPerSquareCentimeter=kW/cm² +KilowattPerSquareMeter=kW/m² +MegawattPerSquareCentimeter=MW/cm² +MegawattPerSquareMeter=MW/m² +MicrowattPerSquareCentimeter=µW/cm² +MicrowattPerSquareMeter=µW/m² +MilliwattPerSquareCentimeter=mW/cm² +MilliwattPerSquareMeter=mW/m² +NanowattPerSquareCentimeter=nW/cm² +NanowattPerSquareMeter=nW/m² +PicowattPerSquareCentimeter=pW/cm² +PicowattPerSquareMeter=pW/m² +WattPerSquareCentimeter=W/cm² +WattPerSquareMeter=W/m² diff --git a/UnitsNet/GeneratedCode/Resources/Irradiation.restext b/UnitsNet/GeneratedCode/Resources/Irradiation.restext index e7ffb9c0df..1c1c74c87f 100644 --- a/UnitsNet/GeneratedCode/Resources/Irradiation.restext +++ b/UnitsNet/GeneratedCode/Resources/Irradiation.restext @@ -1,7 +1,7 @@ -JoulePerSquareCentimeter = "J/cm²" -JoulePerSquareMeter = "J/m²" -JoulePerSquareMillimeter = "J/mm²" -KilojoulePerSquareMeter = "kJ/m²" -KilowattHourPerSquareMeter = "kWh/m²" -MillijoulePerSquareCentimeter = "mJ/cm²" -WattHourPerSquareMeter = "Wh/m²" +JoulePerSquareCentimeter=J/cm² +JoulePerSquareMeter=J/m² +JoulePerSquareMillimeter=J/mm² +KilojoulePerSquareMeter=kJ/m² +KilowattHourPerSquareMeter=kWh/m² +MillijoulePerSquareCentimeter=mJ/cm² +WattHourPerSquareMeter=Wh/m² diff --git a/UnitsNet/GeneratedCode/Resources/Jerk.restext b/UnitsNet/GeneratedCode/Resources/Jerk.restext index 431e65dcf1..75d951de47 100644 --- a/UnitsNet/GeneratedCode/Resources/Jerk.restext +++ b/UnitsNet/GeneratedCode/Resources/Jerk.restext @@ -1,11 +1,11 @@ -CentimeterPerSecondCubed = "cm/s³" -DecimeterPerSecondCubed = "dm/s³" -FootPerSecondCubed = "ft/s³" -InchPerSecondCubed = "in/s³" -KilometerPerSecondCubed = "km/s³" -MeterPerSecondCubed = "m/s³" -MicrometerPerSecondCubed = "µm/s³" -MillimeterPerSecondCubed = "mm/s³" -MillistandardGravitiesPerSecond = "mg/s" -NanometerPerSecondCubed = "nm/s³" -StandardGravitiesPerSecond = "g/s" +CentimeterPerSecondCubed=cm/s³ +DecimeterPerSecondCubed=dm/s³ +FootPerSecondCubed=ft/s³ +InchPerSecondCubed=in/s³ +KilometerPerSecondCubed=km/s³ +MeterPerSecondCubed=m/s³ +MicrometerPerSecondCubed=µm/s³ +MillimeterPerSecondCubed=mm/s³ +MillistandardGravitiesPerSecond=mg/s +NanometerPerSecondCubed=nm/s³ +StandardGravitiesPerSecond=g/s diff --git a/UnitsNet/GeneratedCode/Resources/Jerk.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Jerk.ru-RU.restext index fe3d32358d..782fca6a20 100644 --- a/UnitsNet/GeneratedCode/Resources/Jerk.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Jerk.ru-RU.restext @@ -1,11 +1,11 @@ -CentimeterPerSecondCubed = "см/с³" -DecimeterPerSecondCubed = "дм/с³" -FootPerSecondCubed = "фут/с³" -InchPerSecondCubed = "дюйм/с³" -KilometerPerSecondCubed = "км/с³" -MeterPerSecondCubed = "м/с³" -MicrometerPerSecondCubed = "мкм/с³" -MillimeterPerSecondCubed = "мм/с³" -MillistandardGravitiesPerSecond = "мg/s" -NanometerPerSecondCubed = "нм/с³" -StandardGravitiesPerSecond = "g/s" +CentimeterPerSecondCubed=см/с³ +DecimeterPerSecondCubed=дм/с³ +FootPerSecondCubed=фут/с³ +InchPerSecondCubed=дюйм/с³ +KilometerPerSecondCubed=км/с³ +MeterPerSecondCubed=м/с³ +MicrometerPerSecondCubed=мкм/с³ +MillimeterPerSecondCubed=мм/с³ +MillistandardGravitiesPerSecond=мg/s +NanometerPerSecondCubed=нм/с³ +StandardGravitiesPerSecond=g/s diff --git a/UnitsNet/GeneratedCode/Resources/KinematicViscosity.restext b/UnitsNet/GeneratedCode/Resources/KinematicViscosity.restext index d893a20051..dec8c6615c 100644 --- a/UnitsNet/GeneratedCode/Resources/KinematicViscosity.restext +++ b/UnitsNet/GeneratedCode/Resources/KinematicViscosity.restext @@ -1,9 +1,9 @@ -Centistokes = "cSt" -Decistokes = "dSt" -Kilostokes = "kSt" -Microstokes = "µSt" -Millistokes = "mSt" -Nanostokes = "nSt" -SquareFootPerSecond = "ft²/s" -SquareMeterPerSecond = "m²/s" -Stokes = "St" +Centistokes=cSt +Decistokes=dSt +Kilostokes=kSt +Microstokes=µSt +Millistokes=mSt +Nanostokes=nSt +SquareFootPerSecond=ft²/s +SquareMeterPerSecond=m²/s +Stokes=St diff --git a/UnitsNet/GeneratedCode/Resources/KinematicViscosity.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/KinematicViscosity.ru-RU.restext index 3133a11b45..bbfa686c89 100644 --- a/UnitsNet/GeneratedCode/Resources/KinematicViscosity.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/KinematicViscosity.ru-RU.restext @@ -1,8 +1,8 @@ -Centistokes = "сСт" -Decistokes = "дСт" -Kilostokes = "кСт" -Microstokes = "мкСт" -Millistokes = "мСт" -Nanostokes = "нСт" -SquareMeterPerSecond = "м²/с" -Stokes = "Ст" +Centistokes=сСт +Decistokes=дСт +Kilostokes=кСт +Microstokes=мкСт +Millistokes=мСт +Nanostokes=нСт +SquareMeterPerSecond=м²/с +Stokes=Ст diff --git a/UnitsNet/GeneratedCode/Resources/Length.restext b/UnitsNet/GeneratedCode/Resources/Length.restext index 9f812d14a2..c5da8c4950 100644 --- a/UnitsNet/GeneratedCode/Resources/Length.restext +++ b/UnitsNet/GeneratedCode/Resources/Length.restext @@ -1,36 +1,36 @@ -Angstrom = "Å","A" -AstronomicalUnit = "au","ua" -Centimeter = "cm" -Chain = "ch" -DataMile = "DM" -Decameter = "dam" -Decimeter = "dm" -DtpPica = "pica" -DtpPoint = "pt" -Fathom = "fathom" -Foot = "ft","'","′" -Hand = "h","hh" -Hectometer = "hm" -Inch = "in","\"","″" -KilolightYear = "kly" -Kilometer = "km" -Kiloparsec = "kpc" -LightYear = "ly" -MegalightYear = "Mly" -Megaparsec = "Mpc" -Meter = "m" -Microinch = "µin" -Micrometer = "µm" -Mil = "mil" -Mile = "mi" -Millimeter = "mm" -Nanometer = "nm" -NauticalMile = "NM" -Parsec = "pc" -PrinterPica = "pica" -PrinterPoint = "pt" -Shackle = "shackle" -SolarRadius = "R⊙" -Twip = "twip" -UsSurveyFoot = "ftUS" -Yard = "yd" +Angstrom=Å,A +AstronomicalUnit=au,ua +Centimeter=cm +Chain=ch +DataMile=DM +Decameter=dam +Decimeter=dm +DtpPica=pica +DtpPoint=pt +Fathom=fathom +Foot=ft,',′ +Hand=h,hh +Hectometer=hm +Inch=in,\",″ +KilolightYear=kly +Kilometer=km +Kiloparsec=kpc +LightYear=ly +MegalightYear=Mly +Megaparsec=Mpc +Meter=m +Microinch=µin +Micrometer=µm +Mil=mil +Mile=mi +Millimeter=mm +Nanometer=nm +NauticalMile=NM +Parsec=pc +PrinterPica=pica +PrinterPoint=pt +Shackle=shackle +SolarRadius=R⊙ +Twip=twip +UsSurveyFoot=ftUS +Yard=yd diff --git a/UnitsNet/GeneratedCode/Resources/Length.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Length.ru-RU.restext index da1bd75610..faaf1c9ffa 100644 --- a/UnitsNet/GeneratedCode/Resources/Length.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Length.ru-RU.restext @@ -1,16 +1,16 @@ -Centimeter = "см" -Decameter = "дам" -Decimeter = "дм" -Foot = "фут" -Hectometer = "гм" -Inch = "дюйм" -Kilometer = "км" -Meter = "м" -Microinch = "микродюйм" -Micrometer = "мкм" -Mil = "мил" -Mile = "миля" -Millimeter = "мм" -Nanometer = "нм" -NauticalMile = "мил" -Yard = "ярд" +Centimeter=см +Decameter=дам +Decimeter=дм +Foot=фут +Hectometer=гм +Inch=дюйм +Kilometer=км +Meter=м +Microinch=микродюйм +Micrometer=мкм +Mil=мил +Mile=миля +Millimeter=мм +Nanometer=нм +NauticalMile=мил +Yard=ярд diff --git a/UnitsNet/GeneratedCode/Resources/Length.zh-CN.restext b/UnitsNet/GeneratedCode/Resources/Length.zh-CN.restext index 02c3e4e3cb..5f32de27ee 100644 --- a/UnitsNet/GeneratedCode/Resources/Length.zh-CN.restext +++ b/UnitsNet/GeneratedCode/Resources/Length.zh-CN.restext @@ -1,16 +1,16 @@ -Centimeter = "厘米" -Decameter = "十米" -Decimeter = "分米" -Foot = "英尺" -Hectometer = "百米" -Inch = "英寸" -Kilometer = "千米" -Meter = "米" -Microinch = "微英寸" -Micrometer = "微米" -Mil = "密耳" -Mile = "英里" -Millimeter = "毫米" -Nanometer = "纳米" -NauticalMile = "纳米" -Yard = "码" +Centimeter=厘米 +Decameter=十米 +Decimeter=分米 +Foot=英尺 +Hectometer=百米 +Inch=英寸 +Kilometer=千米 +Meter=米 +Microinch=微英寸 +Micrometer=微米 +Mil=密耳 +Mile=英里 +Millimeter=毫米 +Nanometer=纳米 +NauticalMile=纳米 +Yard=码 diff --git a/UnitsNet/GeneratedCode/Resources/Level.restext b/UnitsNet/GeneratedCode/Resources/Level.restext index 95f9b60367..0d7343d645 100644 --- a/UnitsNet/GeneratedCode/Resources/Level.restext +++ b/UnitsNet/GeneratedCode/Resources/Level.restext @@ -1,2 +1,2 @@ -Decibel = "dB" -Neper = "Np" +Decibel=dB +Neper=Np diff --git a/UnitsNet/GeneratedCode/Resources/LinearDensity.restext b/UnitsNet/GeneratedCode/Resources/LinearDensity.restext index 84c504ba31..72f428a88b 100644 --- a/UnitsNet/GeneratedCode/Resources/LinearDensity.restext +++ b/UnitsNet/GeneratedCode/Resources/LinearDensity.restext @@ -1,14 +1,14 @@ -GramPerCentimeter = "g/cm" -GramPerMeter = "g/m" -GramPerMillimeter = "g/mm" -KilogramPerCentimeter = "kg/cm" -KilogramPerMeter = "kg/m" -KilogramPerMillimeter = "kg/mm" -MicrogramPerCentimeter = "µg/cm" -MicrogramPerMeter = "µg/m" -MicrogramPerMillimeter = "µg/mm" -MilligramPerCentimeter = "mg/cm" -MilligramPerMeter = "mg/m" -MilligramPerMillimeter = "mg/mm" -PoundPerFoot = "lb/ft" -PoundPerInch = "lb/in" +GramPerCentimeter=g/cm +GramPerMeter=g/m +GramPerMillimeter=g/mm +KilogramPerCentimeter=kg/cm +KilogramPerMeter=kg/m +KilogramPerMillimeter=kg/mm +MicrogramPerCentimeter=µg/cm +MicrogramPerMeter=µg/m +MicrogramPerMillimeter=µg/mm +MilligramPerCentimeter=mg/cm +MilligramPerMeter=mg/m +MilligramPerMillimeter=mg/mm +PoundPerFoot=lb/ft +PoundPerInch=lb/in diff --git a/UnitsNet/GeneratedCode/Resources/LinearPowerDensity.restext b/UnitsNet/GeneratedCode/Resources/LinearPowerDensity.restext index 4ca0387f1f..c5f673df0f 100644 --- a/UnitsNet/GeneratedCode/Resources/LinearPowerDensity.restext +++ b/UnitsNet/GeneratedCode/Resources/LinearPowerDensity.restext @@ -1,25 +1,25 @@ -GigawattPerCentimeter = "GW/cm" -GigawattPerFoot = "GW/ft" -GigawattPerInch = "GW/in" -GigawattPerMeter = "GW/m" -GigawattPerMillimeter = "GW/mm" -KilowattPerCentimeter = "kW/cm" -KilowattPerFoot = "kW/ft" -KilowattPerInch = "kW/in" -KilowattPerMeter = "kW/m" -KilowattPerMillimeter = "kW/mm" -MegawattPerCentimeter = "MW/cm" -MegawattPerFoot = "MW/ft" -MegawattPerInch = "MW/in" -MegawattPerMeter = "MW/m" -MegawattPerMillimeter = "MW/mm" -MilliwattPerCentimeter = "mW/cm" -MilliwattPerFoot = "mW/ft" -MilliwattPerInch = "mW/in" -MilliwattPerMeter = "mW/m" -MilliwattPerMillimeter = "mW/mm" -WattPerCentimeter = "W/cm" -WattPerFoot = "W/ft" -WattPerInch = "W/in" -WattPerMeter = "W/m" -WattPerMillimeter = "W/mm" +GigawattPerCentimeter=GW/cm +GigawattPerFoot=GW/ft +GigawattPerInch=GW/in +GigawattPerMeter=GW/m +GigawattPerMillimeter=GW/mm +KilowattPerCentimeter=kW/cm +KilowattPerFoot=kW/ft +KilowattPerInch=kW/in +KilowattPerMeter=kW/m +KilowattPerMillimeter=kW/mm +MegawattPerCentimeter=MW/cm +MegawattPerFoot=MW/ft +MegawattPerInch=MW/in +MegawattPerMeter=MW/m +MegawattPerMillimeter=MW/mm +MilliwattPerCentimeter=mW/cm +MilliwattPerFoot=mW/ft +MilliwattPerInch=mW/in +MilliwattPerMeter=mW/m +MilliwattPerMillimeter=mW/mm +WattPerCentimeter=W/cm +WattPerFoot=W/ft +WattPerInch=W/in +WattPerMeter=W/m +WattPerMillimeter=W/mm diff --git a/UnitsNet/GeneratedCode/Resources/Luminance.restext b/UnitsNet/GeneratedCode/Resources/Luminance.restext index 83293ea9e2..ee2a55ccb7 100644 --- a/UnitsNet/GeneratedCode/Resources/Luminance.restext +++ b/UnitsNet/GeneratedCode/Resources/Luminance.restext @@ -1,10 +1,10 @@ -CandelaPerSquareFoot = "Cd/ft²" -CandelaPerSquareInch = "Cd/in²" -CandelaPerSquareMeter = "Cd/m²" -CenticandelaPerSquareMeter = "cCd/m²" -DecicandelaPerSquareMeter = "dCd/m²" -KilocandelaPerSquareMeter = "kCd/m²" -MicrocandelaPerSquareMeter = "µCd/m²" -MillicandelaPerSquareMeter = "mCd/m²" -NanocandelaPerSquareMeter = "nCd/m²" -Nit = "nt" +CandelaPerSquareFoot=Cd/ft² +CandelaPerSquareInch=Cd/in² +CandelaPerSquareMeter=Cd/m² +CenticandelaPerSquareMeter=cCd/m² +DecicandelaPerSquareMeter=dCd/m² +KilocandelaPerSquareMeter=kCd/m² +MicrocandelaPerSquareMeter=µCd/m² +MillicandelaPerSquareMeter=mCd/m² +NanocandelaPerSquareMeter=nCd/m² +Nit=nt diff --git a/UnitsNet/GeneratedCode/Resources/Luminosity.restext b/UnitsNet/GeneratedCode/Resources/Luminosity.restext index cb9e9db383..34fa337fe1 100644 --- a/UnitsNet/GeneratedCode/Resources/Luminosity.restext +++ b/UnitsNet/GeneratedCode/Resources/Luminosity.restext @@ -1,14 +1,14 @@ -Decawatt = "daW" -Deciwatt = "dW" -Femtowatt = "fW" -Gigawatt = "GW" -Kilowatt = "kW" -Megawatt = "MW" -Microwatt = "µW" -Milliwatt = "mW" -Nanowatt = "nW" -Petawatt = "PW" -Picowatt = "pW" -SolarLuminosity = "L⊙" -Terawatt = "TW" -Watt = "W" +Decawatt=daW +Deciwatt=dW +Femtowatt=fW +Gigawatt=GW +Kilowatt=kW +Megawatt=MW +Microwatt=µW +Milliwatt=mW +Nanowatt=nW +Petawatt=PW +Picowatt=pW +SolarLuminosity=L⊙ +Terawatt=TW +Watt=W diff --git a/UnitsNet/GeneratedCode/Resources/LuminousFlux.restext b/UnitsNet/GeneratedCode/Resources/LuminousFlux.restext index 5d4d12e24e..447b13f838 100644 --- a/UnitsNet/GeneratedCode/Resources/LuminousFlux.restext +++ b/UnitsNet/GeneratedCode/Resources/LuminousFlux.restext @@ -1 +1 @@ -Lumen = "lm" +Lumen=lm diff --git a/UnitsNet/GeneratedCode/Resources/LuminousIntensity.restext b/UnitsNet/GeneratedCode/Resources/LuminousIntensity.restext index db280a3398..0a24cbf0b1 100644 --- a/UnitsNet/GeneratedCode/Resources/LuminousIntensity.restext +++ b/UnitsNet/GeneratedCode/Resources/LuminousIntensity.restext @@ -1 +1 @@ -Candela = "cd" +Candela=cd diff --git a/UnitsNet/GeneratedCode/Resources/MagneticField.restext b/UnitsNet/GeneratedCode/Resources/MagneticField.restext index e2a58f1fa1..4af073c9a1 100644 --- a/UnitsNet/GeneratedCode/Resources/MagneticField.restext +++ b/UnitsNet/GeneratedCode/Resources/MagneticField.restext @@ -1,6 +1,6 @@ -Gauss = "G" -Microtesla = "µT" -Milligauss = "mG" -Millitesla = "mT" -Nanotesla = "nT" -Tesla = "T" +Gauss=G +Microtesla=µT +Milligauss=mG +Millitesla=mT +Nanotesla=nT +Tesla=T diff --git a/UnitsNet/GeneratedCode/Resources/MagneticFlux.restext b/UnitsNet/GeneratedCode/Resources/MagneticFlux.restext index 227c27c825..060a0b586b 100644 --- a/UnitsNet/GeneratedCode/Resources/MagneticFlux.restext +++ b/UnitsNet/GeneratedCode/Resources/MagneticFlux.restext @@ -1 +1 @@ -Weber = "Wb" +Weber=Wb diff --git a/UnitsNet/GeneratedCode/Resources/Magnetization.restext b/UnitsNet/GeneratedCode/Resources/Magnetization.restext index fcbe7218f5..81c5ef341c 100644 --- a/UnitsNet/GeneratedCode/Resources/Magnetization.restext +++ b/UnitsNet/GeneratedCode/Resources/Magnetization.restext @@ -1 +1 @@ -AmperePerMeter = "A/m" +AmperePerMeter=A/m diff --git a/UnitsNet/GeneratedCode/Resources/Mass.restext b/UnitsNet/GeneratedCode/Resources/Mass.restext index e1815d5ffc..c873ef6b62 100644 --- a/UnitsNet/GeneratedCode/Resources/Mass.restext +++ b/UnitsNet/GeneratedCode/Resources/Mass.restext @@ -1,25 +1,25 @@ -Centigram = "cg" -Decagram = "dag" -Decigram = "dg" -EarthMass = "em" -Grain = "gr" -Gram = "g" -Hectogram = "hg" -Kilogram = "kg" -Kilopound = "klb","klbs","klbm" -Kilotonne = "kt" -LongHundredweight = "cwt" -LongTon = "long tn" -Megapound = "Mlb","Mlbs","Mlbm" -Megatonne = "Mt" -Microgram = "µg" -Milligram = "mg" -Nanogram = "ng" -Ounce = "oz" -Pound = "lb","lbs","lbm" -ShortHundredweight = "cwt" -ShortTon = "t (short)","short tn","ST" -Slug = "slug" -SolarMass = "M☉","M⊙" -Stone = "st" -Tonne = "t" +Centigram=cg +Decagram=dag +Decigram=dg +EarthMass=em +Grain=gr +Gram=g +Hectogram=hg +Kilogram=kg +Kilopound=klb,klbs,klbm +Kilotonne=kt +LongHundredweight=cwt +LongTon=long tn +Megapound=Mlb,Mlbs,Mlbm +Megatonne=Mt +Microgram=µg +Milligram=mg +Nanogram=ng +Ounce=oz +Pound=lb,lbs,lbm +ShortHundredweight=cwt +ShortTon=t (short),short tn,ST +Slug=slug +SolarMass=M☉,M⊙ +Stone=st +Tonne=t diff --git a/UnitsNet/GeneratedCode/Resources/Mass.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Mass.ru-RU.restext index bc99321053..b1b75b0996 100644 --- a/UnitsNet/GeneratedCode/Resources/Mass.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Mass.ru-RU.restext @@ -1,17 +1,17 @@ -Centigram = "сг" -Decagram = "даг" -Decigram = "дг" -Gram = "г" -Hectogram = "гг" -Kilogram = "кг" -Kilopound = "кфунт" -Kilotonne = "кт" -LongTon = "тонна большая" -Megapound = "Мфунт" -Megatonne = "Мт" -Microgram = "мкг" -Milligram = "мг" -Nanogram = "нг" -Pound = "фунт" -ShortTon = "тонна малая" -Tonne = "т" +Centigram=сг +Decagram=даг +Decigram=дг +Gram=г +Hectogram=гг +Kilogram=кг +Kilopound=кфунт +Kilotonne=кт +LongTon=тонна большая +Megapound=Мфунт +Megatonne=Мт +Microgram=мкг +Milligram=мг +Nanogram=нг +Pound=фунт +ShortTon=тонна малая +Tonne=т diff --git a/UnitsNet/GeneratedCode/Resources/Mass.zh-CN.restext b/UnitsNet/GeneratedCode/Resources/Mass.zh-CN.restext index 5ca42aaa5b..3ac11fb634 100644 --- a/UnitsNet/GeneratedCode/Resources/Mass.zh-CN.restext +++ b/UnitsNet/GeneratedCode/Resources/Mass.zh-CN.restext @@ -1,18 +1,18 @@ -Centigram = "厘克" -Decagram = "十克" -Decigram = "分克" -Gram = "克" -Hectogram = "百克" -Kilogram = "千克" -Kilopound = "千磅" -Kilotonne = "千吨" -LongTon = "长吨" -Megapound = "兆磅" -Megatonne = "兆吨" -Microgram = "微克" -Milligram = "毫克" -Nanogram = "纳克" -Ounce = "盎司" -Pound = "磅" -ShortTon = "短吨" -Tonne = "吨" +Centigram=厘克 +Decagram=十克 +Decigram=分克 +Gram=克 +Hectogram=百克 +Kilogram=千克 +Kilopound=千磅 +Kilotonne=千吨 +LongTon=长吨 +Megapound=兆磅 +Megatonne=兆吨 +Microgram=微克 +Milligram=毫克 +Nanogram=纳克 +Ounce=盎司 +Pound=磅 +ShortTon=短吨 +Tonne=吨 diff --git a/UnitsNet/GeneratedCode/Resources/MassConcentration.restext b/UnitsNet/GeneratedCode/Resources/MassConcentration.restext index 07a7f1dbcf..7e6b02571e 100644 --- a/UnitsNet/GeneratedCode/Resources/MassConcentration.restext +++ b/UnitsNet/GeneratedCode/Resources/MassConcentration.restext @@ -1,49 +1,49 @@ -CentigramPerDeciliter = "cg/dL" -CentigramPerLiter = "cg/L" -CentigramPerMicroliter = "cg/μL" -CentigramPerMilliliter = "cg/mL" -DecigramPerDeciliter = "dg/dL" -DecigramPerLiter = "dg/L" -DecigramPerMicroliter = "dg/μL" -DecigramPerMilliliter = "dg/mL" -GramPerCubicCentimeter = "g/cm³" -GramPerCubicMeter = "g/m³" -GramPerCubicMillimeter = "g/mm³" -GramPerDeciliter = "g/dL" -GramPerLiter = "g/L" -GramPerMicroliter = "g/μL" -GramPerMilliliter = "g/mL" -KilogramPerCubicCentimeter = "kg/cm³" -KilogramPerCubicMeter = "kg/m³" -KilogramPerCubicMillimeter = "kg/mm³" -KilogramPerLiter = "kg/L" -KilopoundPerCubicFoot = "kip/ft³" -KilopoundPerCubicInch = "kip/in³" -MicrogramPerCubicMeter = "µg/m³" -MicrogramPerDeciliter = "µg/dL" -MicrogramPerLiter = "µg/L" -MicrogramPerMicroliter = "µg/μL" -MicrogramPerMilliliter = "µg/mL" -MilligramPerCubicMeter = "mg/m³" -MilligramPerDeciliter = "mg/dL" -MilligramPerLiter = "mg/L" -MilligramPerMicroliter = "mg/μL" -MilligramPerMilliliter = "mg/mL" -NanogramPerDeciliter = "ng/dL" -NanogramPerLiter = "ng/L" -NanogramPerMicroliter = "ng/μL" -NanogramPerMilliliter = "ng/mL" -OuncePerImperialGallon = "oz/gal (imp.)" -OuncePerUSGallon = "oz/gal (U.S.)" -PicogramPerDeciliter = "pg/dL" -PicogramPerLiter = "pg/L" -PicogramPerMicroliter = "pg/μL" -PicogramPerMilliliter = "pg/mL" -PoundPerCubicFoot = "lb/ft³" -PoundPerCubicInch = "lb/in³" -PoundPerImperialGallon = "ppg (imp.)" -PoundPerUSGallon = "ppg (U.S.)" -SlugPerCubicFoot = "slug/ft³" -TonnePerCubicCentimeter = "t/cm³" -TonnePerCubicMeter = "t/m³" -TonnePerCubicMillimeter = "t/mm³" +CentigramPerDeciliter=cg/dL +CentigramPerLiter=cg/L +CentigramPerMicroliter=cg/μL +CentigramPerMilliliter=cg/mL +DecigramPerDeciliter=dg/dL +DecigramPerLiter=dg/L +DecigramPerMicroliter=dg/μL +DecigramPerMilliliter=dg/mL +GramPerCubicCentimeter=g/cm³ +GramPerCubicMeter=g/m³ +GramPerCubicMillimeter=g/mm³ +GramPerDeciliter=g/dL +GramPerLiter=g/L +GramPerMicroliter=g/μL +GramPerMilliliter=g/mL +KilogramPerCubicCentimeter=kg/cm³ +KilogramPerCubicMeter=kg/m³ +KilogramPerCubicMillimeter=kg/mm³ +KilogramPerLiter=kg/L +KilopoundPerCubicFoot=kip/ft³ +KilopoundPerCubicInch=kip/in³ +MicrogramPerCubicMeter=µg/m³ +MicrogramPerDeciliter=µg/dL +MicrogramPerLiter=µg/L +MicrogramPerMicroliter=µg/μL +MicrogramPerMilliliter=µg/mL +MilligramPerCubicMeter=mg/m³ +MilligramPerDeciliter=mg/dL +MilligramPerLiter=mg/L +MilligramPerMicroliter=mg/μL +MilligramPerMilliliter=mg/mL +NanogramPerDeciliter=ng/dL +NanogramPerLiter=ng/L +NanogramPerMicroliter=ng/μL +NanogramPerMilliliter=ng/mL +OuncePerImperialGallon=oz/gal (imp.) +OuncePerUSGallon=oz/gal (U.S.) +PicogramPerDeciliter=pg/dL +PicogramPerLiter=pg/L +PicogramPerMicroliter=pg/μL +PicogramPerMilliliter=pg/mL +PoundPerCubicFoot=lb/ft³ +PoundPerCubicInch=lb/in³ +PoundPerImperialGallon=ppg (imp.) +PoundPerUSGallon=ppg (U.S.) +SlugPerCubicFoot=slug/ft³ +TonnePerCubicCentimeter=t/cm³ +TonnePerCubicMeter=t/m³ +TonnePerCubicMillimeter=t/mm³ diff --git a/UnitsNet/GeneratedCode/Resources/MassConcentration.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/MassConcentration.ru-RU.restext index 80a1847318..fbe5dcd91e 100644 --- a/UnitsNet/GeneratedCode/Resources/MassConcentration.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/MassConcentration.ru-RU.restext @@ -1,4 +1,4 @@ -GramPerCubicMeter = "г/м³" -KilogramPerCubicMeter = "кг/м³" -MicrogramPerCubicMeter = "мкг/м³" -MilligramPerCubicMeter = "мг/м³" +GramPerCubicMeter=г/м³ +KilogramPerCubicMeter=кг/м³ +MicrogramPerCubicMeter=мкг/м³ +MilligramPerCubicMeter=мг/м³ diff --git a/UnitsNet/GeneratedCode/Resources/MassFlow.restext b/UnitsNet/GeneratedCode/Resources/MassFlow.restext index aa9bc67b09..ccfdeebb65 100644 --- a/UnitsNet/GeneratedCode/Resources/MassFlow.restext +++ b/UnitsNet/GeneratedCode/Resources/MassFlow.restext @@ -1,33 +1,33 @@ -CentigramPerDay = "cg/d" -CentigramPerSecond = "cg/s","cg/S" -DecagramPerDay = "dag/d" -DecagramPerSecond = "dag/s","dag/S" -DecigramPerDay = "dg/d" -DecigramPerSecond = "dg/s","dg/S" -GramPerDay = "g/d" -GramPerHour = "g/h" -GramPerSecond = "g/s","g/S" -HectogramPerDay = "hg/d" -HectogramPerSecond = "hg/s","hg/S" -KilogramPerDay = "kg/d" -KilogramPerHour = "kg/h" -KilogramPerMinute = "kg/min" -KilogramPerSecond = "kg/s","kg/S" -MegagramPerDay = "Mg/d" -MegapoundPerDay = "Mlb/d" -MegapoundPerHour = "Mlb/h" -MegapoundPerMinute = "Mlb/min" -MegapoundPerSecond = "Mlb/s" -MicrogramPerDay = "µg/d" -MicrogramPerSecond = "µg/s","µg/S" -MilligramPerDay = "mg/d" -MilligramPerSecond = "mg/s","mg/S" -NanogramPerDay = "ng/d" -NanogramPerSecond = "ng/s","ng/S" -PoundPerDay = "lb/d" -PoundPerHour = "lb/h" -PoundPerMinute = "lb/min" -PoundPerSecond = "lb/s" -ShortTonPerHour = "short tn/h" -TonnePerDay = "t/d" -TonnePerHour = "t/h" +CentigramPerDay=cg/d +CentigramPerSecond=cg/s,cg/S +DecagramPerDay=dag/d +DecagramPerSecond=dag/s,dag/S +DecigramPerDay=dg/d +DecigramPerSecond=dg/s,dg/S +GramPerDay=g/d +GramPerHour=g/h +GramPerSecond=g/s,g/S +HectogramPerDay=hg/d +HectogramPerSecond=hg/s,hg/S +KilogramPerDay=kg/d +KilogramPerHour=kg/h +KilogramPerMinute=kg/min +KilogramPerSecond=kg/s,kg/S +MegagramPerDay=Mg/d +MegapoundPerDay=Mlb/d +MegapoundPerHour=Mlb/h +MegapoundPerMinute=Mlb/min +MegapoundPerSecond=Mlb/s +MicrogramPerDay=µg/d +MicrogramPerSecond=µg/s,µg/S +MilligramPerDay=mg/d +MilligramPerSecond=mg/s,mg/S +NanogramPerDay=ng/d +NanogramPerSecond=ng/s,ng/S +PoundPerDay=lb/d +PoundPerHour=lb/h +PoundPerMinute=lb/min +PoundPerSecond=lb/s +ShortTonPerHour=short tn/h +TonnePerDay=t/d +TonnePerHour=t/h diff --git a/UnitsNet/GeneratedCode/Resources/MassFlow.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/MassFlow.ru-RU.restext index 9131c19b96..208299ff65 100644 --- a/UnitsNet/GeneratedCode/Resources/MassFlow.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/MassFlow.ru-RU.restext @@ -1,2 +1,2 @@ -KilogramPerHour = "кг/ч" -KilogramPerMinute = "кг/мин" +KilogramPerHour=кг/ч +KilogramPerMinute=кг/мин diff --git a/UnitsNet/GeneratedCode/Resources/MassFlux.restext b/UnitsNet/GeneratedCode/Resources/MassFlux.restext index 67e308e2ec..614e02f2da 100644 --- a/UnitsNet/GeneratedCode/Resources/MassFlux.restext +++ b/UnitsNet/GeneratedCode/Resources/MassFlux.restext @@ -1,12 +1,12 @@ -GramPerHourPerSquareCentimeter = "g·h⁻¹·cm⁻²" -GramPerHourPerSquareMeter = "g·h⁻¹·m⁻²" -GramPerHourPerSquareMillimeter = "g·h⁻¹·mm⁻²" -GramPerSecondPerSquareCentimeter = "g·s⁻¹·cm⁻²" -GramPerSecondPerSquareMeter = "g·s⁻¹·m⁻²" -GramPerSecondPerSquareMillimeter = "g·s⁻¹·mm⁻²" -KilogramPerHourPerSquareCentimeter = "kg·h⁻¹·cm⁻²" -KilogramPerHourPerSquareMeter = "kg·h⁻¹·m⁻²" -KilogramPerHourPerSquareMillimeter = "kg·h⁻¹·mm⁻²" -KilogramPerSecondPerSquareCentimeter = "kg·s⁻¹·cm⁻²" -KilogramPerSecondPerSquareMeter = "kg·s⁻¹·m⁻²" -KilogramPerSecondPerSquareMillimeter = "kg·s⁻¹·mm⁻²" +GramPerHourPerSquareCentimeter=g·h⁻¹·cm⁻² +GramPerHourPerSquareMeter=g·h⁻¹·m⁻² +GramPerHourPerSquareMillimeter=g·h⁻¹·mm⁻² +GramPerSecondPerSquareCentimeter=g·s⁻¹·cm⁻² +GramPerSecondPerSquareMeter=g·s⁻¹·m⁻² +GramPerSecondPerSquareMillimeter=g·s⁻¹·mm⁻² +KilogramPerHourPerSquareCentimeter=kg·h⁻¹·cm⁻² +KilogramPerHourPerSquareMeter=kg·h⁻¹·m⁻² +KilogramPerHourPerSquareMillimeter=kg·h⁻¹·mm⁻² +KilogramPerSecondPerSquareCentimeter=kg·s⁻¹·cm⁻² +KilogramPerSecondPerSquareMeter=kg·s⁻¹·m⁻² +KilogramPerSecondPerSquareMillimeter=kg·s⁻¹·mm⁻² diff --git a/UnitsNet/GeneratedCode/Resources/MassFraction.restext b/UnitsNet/GeneratedCode/Resources/MassFraction.restext index 20cf2586de..3f6536253f 100644 --- a/UnitsNet/GeneratedCode/Resources/MassFraction.restext +++ b/UnitsNet/GeneratedCode/Resources/MassFraction.restext @@ -1,24 +1,24 @@ -CentigramPerGram = "cg/g" -CentigramPerKilogram = "cg/kg" -DecagramPerGram = "dag/g" -DecagramPerKilogram = "dag/kg" -DecigramPerGram = "dg/g" -DecigramPerKilogram = "dg/kg" -DecimalFraction = "" -GramPerGram = "g/g" -GramPerKilogram = "g/kg" -HectogramPerGram = "hg/g" -HectogramPerKilogram = "hg/kg" -KilogramPerGram = "kg/g" -KilogramPerKilogram = "kg/kg" -MicrogramPerGram = "µg/g" -MicrogramPerKilogram = "µg/kg" -MilligramPerGram = "mg/g" -MilligramPerKilogram = "mg/kg" -NanogramPerGram = "ng/g" -NanogramPerKilogram = "ng/kg" -PartPerBillion = "ppb" -PartPerMillion = "ppm" -PartPerThousand = "‰" -PartPerTrillion = "ppt" -Percent = "%","% (w/w)" +CentigramPerGram=cg/g +CentigramPerKilogram=cg/kg +DecagramPerGram=dag/g +DecagramPerKilogram=dag/kg +DecigramPerGram=dg/g +DecigramPerKilogram=dg/kg +DecimalFraction= +GramPerGram=g/g +GramPerKilogram=g/kg +HectogramPerGram=hg/g +HectogramPerKilogram=hg/kg +KilogramPerGram=kg/g +KilogramPerKilogram=kg/kg +MicrogramPerGram=µg/g +MicrogramPerKilogram=µg/kg +MilligramPerGram=mg/g +MilligramPerKilogram=mg/kg +NanogramPerGram=ng/g +NanogramPerKilogram=ng/kg +PartPerBillion=ppb +PartPerMillion=ppm +PartPerThousand=‰ +PartPerTrillion=ppt +Percent=%,% (w/w) diff --git a/UnitsNet/GeneratedCode/Resources/MassMomentOfInertia.restext b/UnitsNet/GeneratedCode/Resources/MassMomentOfInertia.restext index e830129cd3..006ad0fd63 100644 --- a/UnitsNet/GeneratedCode/Resources/MassMomentOfInertia.restext +++ b/UnitsNet/GeneratedCode/Resources/MassMomentOfInertia.restext @@ -1,28 +1,28 @@ -GramSquareCentimeter = "g·cm²" -GramSquareDecimeter = "g·dm²" -GramSquareMeter = "g·m²" -GramSquareMillimeter = "g·mm²" -KilogramSquareCentimeter = "kg·cm²" -KilogramSquareDecimeter = "kg·dm²" -KilogramSquareMeter = "kg·m²" -KilogramSquareMillimeter = "kg·mm²" -KilotonneSquareCentimeter = "kt·cm²" -KilotonneSquareDecimeter = "kt·dm²" -KilotonneSquareMeter = "kt·m²" -KilotonneSquareMilimeter = "kt·mm²" -MegatonneSquareCentimeter = "Mt·cm²" -MegatonneSquareDecimeter = "Mt·dm²" -MegatonneSquareMeter = "Mt·m²" -MegatonneSquareMilimeter = "Mt·mm²" -MilligramSquareCentimeter = "mg·cm²" -MilligramSquareDecimeter = "mg·dm²" -MilligramSquareMeter = "mg·m²" -MilligramSquareMillimeter = "mg·mm²" -PoundSquareFoot = "lb·ft²" -PoundSquareInch = "lb·in²" -SlugSquareFoot = "slug·ft²" -SlugSquareInch = "slug·in²" -TonneSquareCentimeter = "t·cm²" -TonneSquareDecimeter = "t·dm²" -TonneSquareMeter = "t·m²" -TonneSquareMilimeter = "t·mm²" +GramSquareCentimeter=g·cm² +GramSquareDecimeter=g·dm² +GramSquareMeter=g·m² +GramSquareMillimeter=g·mm² +KilogramSquareCentimeter=kg·cm² +KilogramSquareDecimeter=kg·dm² +KilogramSquareMeter=kg·m² +KilogramSquareMillimeter=kg·mm² +KilotonneSquareCentimeter=kt·cm² +KilotonneSquareDecimeter=kt·dm² +KilotonneSquareMeter=kt·m² +KilotonneSquareMilimeter=kt·mm² +MegatonneSquareCentimeter=Mt·cm² +MegatonneSquareDecimeter=Mt·dm² +MegatonneSquareMeter=Mt·m² +MegatonneSquareMilimeter=Mt·mm² +MilligramSquareCentimeter=mg·cm² +MilligramSquareDecimeter=mg·dm² +MilligramSquareMeter=mg·m² +MilligramSquareMillimeter=mg·mm² +PoundSquareFoot=lb·ft² +PoundSquareInch=lb·in² +SlugSquareFoot=slug·ft² +SlugSquareInch=slug·in² +TonneSquareCentimeter=t·cm² +TonneSquareDecimeter=t·dm² +TonneSquareMeter=t·m² +TonneSquareMilimeter=t·mm² diff --git a/UnitsNet/GeneratedCode/Resources/MolarEnergy.restext b/UnitsNet/GeneratedCode/Resources/MolarEnergy.restext index 00937fd28b..24f12dcf09 100644 --- a/UnitsNet/GeneratedCode/Resources/MolarEnergy.restext +++ b/UnitsNet/GeneratedCode/Resources/MolarEnergy.restext @@ -1,3 +1,3 @@ -JoulePerMole = "J/mol" -KilojoulePerMole = "kJ/mol" -MegajoulePerMole = "MJ/mol" +JoulePerMole=J/mol +KilojoulePerMole=kJ/mol +MegajoulePerMole=MJ/mol diff --git a/UnitsNet/GeneratedCode/Resources/MolarEntropy.restext b/UnitsNet/GeneratedCode/Resources/MolarEntropy.restext index 399c439f7b..caf3862d28 100644 --- a/UnitsNet/GeneratedCode/Resources/MolarEntropy.restext +++ b/UnitsNet/GeneratedCode/Resources/MolarEntropy.restext @@ -1,3 +1,3 @@ -JoulePerMoleKelvin = "J/(mol*K)" -KilojoulePerMoleKelvin = "kJ/(mol*K)" -MegajoulePerMoleKelvin = "MJ/(mol*K)" +JoulePerMoleKelvin=J/(mol*K) +KilojoulePerMoleKelvin=kJ/(mol*K) +MegajoulePerMoleKelvin=MJ/(mol*K) diff --git a/UnitsNet/GeneratedCode/Resources/MolarFlow.restext b/UnitsNet/GeneratedCode/Resources/MolarFlow.restext index f843107262..c64822f163 100644 --- a/UnitsNet/GeneratedCode/Resources/MolarFlow.restext +++ b/UnitsNet/GeneratedCode/Resources/MolarFlow.restext @@ -1,9 +1,9 @@ -KilomolePerHour = "kkmol/h" -KilomolePerMinute = "kmol/min" -KilomolePerSecond = "kmol/s" -MolePerHour = "kmol/h" -MolePerMinute = "mol/min" -MolePerSecond = "mol/s" -PoundMolePerHour = "lbmol/h" -PoundMolePerMinute = "lbmol/min" -PoundMolePerSecond = "lbmol/s" +KilomolePerHour=kkmol/h +KilomolePerMinute=kmol/min +KilomolePerSecond=kmol/s +MolePerHour=kmol/h +MolePerMinute=mol/min +MolePerSecond=mol/s +PoundMolePerHour=lbmol/h +PoundMolePerMinute=lbmol/min +PoundMolePerSecond=lbmol/s diff --git a/UnitsNet/GeneratedCode/Resources/MolarMass.restext b/UnitsNet/GeneratedCode/Resources/MolarMass.restext index 6bd2659bda..54a0cea3b6 100644 --- a/UnitsNet/GeneratedCode/Resources/MolarMass.restext +++ b/UnitsNet/GeneratedCode/Resources/MolarMass.restext @@ -1,13 +1,13 @@ -CentigramPerMole = "cg/mol" -DecagramPerMole = "dag/mol" -DecigramPerMole = "dg/mol" -GramPerMole = "g/mol" -HectogramPerMole = "hg/mol" -KilogramPerKilomole = "kg/kmol" -KilogramPerMole = "kg/mol" -KilopoundPerMole = "klb/mol" -MegapoundPerMole = "Mlb/mol" -MicrogramPerMole = "µg/mol" -MilligramPerMole = "mg/mol" -NanogramPerMole = "ng/mol" -PoundPerMole = "lb/mol" +CentigramPerMole=cg/mol +DecagramPerMole=dag/mol +DecigramPerMole=dg/mol +GramPerMole=g/mol +HectogramPerMole=hg/mol +KilogramPerKilomole=kg/kmol +KilogramPerMole=kg/mol +KilopoundPerMole=klb/mol +MegapoundPerMole=Mlb/mol +MicrogramPerMole=µg/mol +MilligramPerMole=mg/mol +NanogramPerMole=ng/mol +PoundPerMole=lb/mol diff --git a/UnitsNet/GeneratedCode/Resources/MolarMass.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/MolarMass.ru-RU.restext index 127e548c66..60ffaccef1 100644 --- a/UnitsNet/GeneratedCode/Resources/MolarMass.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/MolarMass.ru-RU.restext @@ -1,12 +1,12 @@ -CentigramPerMole = "сг/моль" -DecagramPerMole = "даг/моль" -DecigramPerMole = "дг/моль" -GramPerMole = "г/моль" -HectogramPerMole = "гг/моль" -KilogramPerMole = "кг/моль" -KilopoundPerMole = "кфунт/моль" -MegapoundPerMole = "Мфунт/моль" -MicrogramPerMole = "мкг/моль" -MilligramPerMole = "мг/моль" -NanogramPerMole = "нг/моль" -PoundPerMole = "фунт/моль" +CentigramPerMole=сг/моль +DecagramPerMole=даг/моль +DecigramPerMole=дг/моль +GramPerMole=г/моль +HectogramPerMole=гг/моль +KilogramPerMole=кг/моль +KilopoundPerMole=кфунт/моль +MegapoundPerMole=Мфунт/моль +MicrogramPerMole=мкг/моль +MilligramPerMole=мг/моль +NanogramPerMole=нг/моль +PoundPerMole=фунт/моль diff --git a/UnitsNet/GeneratedCode/Resources/Molarity.restext b/UnitsNet/GeneratedCode/Resources/Molarity.restext index 33a40b89a8..d87d50fc75 100644 --- a/UnitsNet/GeneratedCode/Resources/Molarity.restext +++ b/UnitsNet/GeneratedCode/Resources/Molarity.restext @@ -1,11 +1,11 @@ -CentimolePerLiter = "cmol/L","cM" -DecimolePerLiter = "dmol/L","dM" -FemtomolePerLiter = "fmol/L","fM" -KilomolePerCubicMeter = "kmol/m³" -MicromolePerLiter = "µmol/L","µM" -MillimolePerLiter = "mmol/L","mM" -MolePerCubicMeter = "mol/m³" -MolePerLiter = "mol/L","M" -NanomolePerLiter = "nmol/L","nM" -PicomolePerLiter = "pmol/L","pM" -PoundMolePerCubicFoot = "lbmol/ft³" +CentimolePerLiter=cmol/L,cM +DecimolePerLiter=dmol/L,dM +FemtomolePerLiter=fmol/L,fM +KilomolePerCubicMeter=kmol/m³ +MicromolePerLiter=µmol/L,µM +MillimolePerLiter=mmol/L,mM +MolePerCubicMeter=mol/m³ +MolePerLiter=mol/L,M +NanomolePerLiter=nmol/L,nM +PicomolePerLiter=pmol/L,pM +PoundMolePerCubicFoot=lbmol/ft³ diff --git a/UnitsNet/GeneratedCode/Resources/Permeability.restext b/UnitsNet/GeneratedCode/Resources/Permeability.restext index abc8e4cd9f..2174805a93 100644 --- a/UnitsNet/GeneratedCode/Resources/Permeability.restext +++ b/UnitsNet/GeneratedCode/Resources/Permeability.restext @@ -1 +1 @@ -HenryPerMeter = "H/m" +HenryPerMeter=H/m diff --git a/UnitsNet/GeneratedCode/Resources/Permittivity.restext b/UnitsNet/GeneratedCode/Resources/Permittivity.restext index e4a0a6aee0..6c3d3aa674 100644 --- a/UnitsNet/GeneratedCode/Resources/Permittivity.restext +++ b/UnitsNet/GeneratedCode/Resources/Permittivity.restext @@ -1 +1 @@ -FaradPerMeter = "F/m" +FaradPerMeter=F/m diff --git a/UnitsNet/GeneratedCode/Resources/PorousMediumPermeability.restext b/UnitsNet/GeneratedCode/Resources/PorousMediumPermeability.restext index 1ca268826e..7dc7f0d9af 100644 --- a/UnitsNet/GeneratedCode/Resources/PorousMediumPermeability.restext +++ b/UnitsNet/GeneratedCode/Resources/PorousMediumPermeability.restext @@ -1,5 +1,5 @@ -Darcy = "D" -Microdarcy = "µD" -Millidarcy = "mD" -SquareCentimeter = "cm²" -SquareMeter = "m²" +Darcy=D +Microdarcy=µD +Millidarcy=mD +SquareCentimeter=cm² +SquareMeter=m² diff --git a/UnitsNet/GeneratedCode/Resources/Power.restext b/UnitsNet/GeneratedCode/Resources/Power.restext index fb08e28a96..fbc338dff1 100644 --- a/UnitsNet/GeneratedCode/Resources/Power.restext +++ b/UnitsNet/GeneratedCode/Resources/Power.restext @@ -1,26 +1,26 @@ -BoilerHorsepower = "hp(S)" -BritishThermalUnitPerHour = "Btu/h","Btu/hr" -Decawatt = "daW" -Deciwatt = "dW" -ElectricalHorsepower = "hp(E)" -Femtowatt = "fW" -GigajoulePerHour = "GJ/h" -Gigawatt = "GW" -HydraulicHorsepower = "hp(H)" -JoulePerHour = "J/h" -KilobritishThermalUnitPerHour = "kBtu/h","kBtu/hr" -KilojoulePerHour = "kJ/h" -Kilowatt = "kW" -MechanicalHorsepower = "hp(I)" -MegabritishThermalUnitPerHour = "MBtu/h","MBtu/hr" -MegajoulePerHour = "MJ/h" -Megawatt = "MW" -MetricHorsepower = "hp(M)" -Microwatt = "µW" -MillijoulePerHour = "mJ/h" -Milliwatt = "mW" -Nanowatt = "nW" -Petawatt = "PW" -Picowatt = "pW" -Terawatt = "TW" -Watt = "W" +BoilerHorsepower=hp(S) +BritishThermalUnitPerHour=Btu/h,Btu/hr +Decawatt=daW +Deciwatt=dW +ElectricalHorsepower=hp(E) +Femtowatt=fW +GigajoulePerHour=GJ/h +Gigawatt=GW +HydraulicHorsepower=hp(H) +JoulePerHour=J/h +KilobritishThermalUnitPerHour=kBtu/h,kBtu/hr +KilojoulePerHour=kJ/h +Kilowatt=kW +MechanicalHorsepower=hp(I) +MegabritishThermalUnitPerHour=MBtu/h,MBtu/hr +MegajoulePerHour=MJ/h +Megawatt=MW +MetricHorsepower=hp(M) +Microwatt=µW +MillijoulePerHour=mJ/h +Milliwatt=mW +Nanowatt=nW +Petawatt=PW +Picowatt=pW +Terawatt=TW +Watt=W diff --git a/UnitsNet/GeneratedCode/Resources/PowerDensity.restext b/UnitsNet/GeneratedCode/Resources/PowerDensity.restext index 7aa6978e85..1851d48613 100644 --- a/UnitsNet/GeneratedCode/Resources/PowerDensity.restext +++ b/UnitsNet/GeneratedCode/Resources/PowerDensity.restext @@ -1,44 +1,44 @@ -DecawattPerCubicFoot = "daW/ft³" -DecawattPerCubicInch = "daW/in³" -DecawattPerCubicMeter = "daW/m³" -DecawattPerLiter = "daW/l" -DeciwattPerCubicFoot = "dW/ft³" -DeciwattPerCubicInch = "dW/in³" -DeciwattPerCubicMeter = "dW/m³" -DeciwattPerLiter = "dW/l" -GigawattPerCubicFoot = "GW/ft³" -GigawattPerCubicInch = "GW/in³" -GigawattPerCubicMeter = "GW/m³" -GigawattPerLiter = "GW/l" -KilowattPerCubicFoot = "kW/ft³" -KilowattPerCubicInch = "kW/in³" -KilowattPerCubicMeter = "kW/m³" -KilowattPerLiter = "kW/l" -MegawattPerCubicFoot = "MW/ft³" -MegawattPerCubicInch = "MW/in³" -MegawattPerCubicMeter = "MW/m³" -MegawattPerLiter = "MW/l" -MicrowattPerCubicFoot = "µW/ft³" -MicrowattPerCubicInch = "µW/in³" -MicrowattPerCubicMeter = "µW/m³" -MicrowattPerLiter = "µW/l" -MilliwattPerCubicFoot = "mW/ft³" -MilliwattPerCubicInch = "mW/in³" -MilliwattPerCubicMeter = "mW/m³" -MilliwattPerLiter = "mW/l" -NanowattPerCubicFoot = "nW/ft³" -NanowattPerCubicInch = "nW/in³" -NanowattPerCubicMeter = "nW/m³" -NanowattPerLiter = "nW/l" -PicowattPerCubicFoot = "pW/ft³" -PicowattPerCubicInch = "pW/in³" -PicowattPerCubicMeter = "pW/m³" -PicowattPerLiter = "pW/l" -TerawattPerCubicFoot = "TW/ft³" -TerawattPerCubicInch = "TW/in³" -TerawattPerCubicMeter = "TW/m³" -TerawattPerLiter = "TW/l" -WattPerCubicFoot = "W/ft³" -WattPerCubicInch = "W/in³" -WattPerCubicMeter = "W/m³" -WattPerLiter = "W/l" +DecawattPerCubicFoot=daW/ft³ +DecawattPerCubicInch=daW/in³ +DecawattPerCubicMeter=daW/m³ +DecawattPerLiter=daW/l +DeciwattPerCubicFoot=dW/ft³ +DeciwattPerCubicInch=dW/in³ +DeciwattPerCubicMeter=dW/m³ +DeciwattPerLiter=dW/l +GigawattPerCubicFoot=GW/ft³ +GigawattPerCubicInch=GW/in³ +GigawattPerCubicMeter=GW/m³ +GigawattPerLiter=GW/l +KilowattPerCubicFoot=kW/ft³ +KilowattPerCubicInch=kW/in³ +KilowattPerCubicMeter=kW/m³ +KilowattPerLiter=kW/l +MegawattPerCubicFoot=MW/ft³ +MegawattPerCubicInch=MW/in³ +MegawattPerCubicMeter=MW/m³ +MegawattPerLiter=MW/l +MicrowattPerCubicFoot=µW/ft³ +MicrowattPerCubicInch=µW/in³ +MicrowattPerCubicMeter=µW/m³ +MicrowattPerLiter=µW/l +MilliwattPerCubicFoot=mW/ft³ +MilliwattPerCubicInch=mW/in³ +MilliwattPerCubicMeter=mW/m³ +MilliwattPerLiter=mW/l +NanowattPerCubicFoot=nW/ft³ +NanowattPerCubicInch=nW/in³ +NanowattPerCubicMeter=nW/m³ +NanowattPerLiter=nW/l +PicowattPerCubicFoot=pW/ft³ +PicowattPerCubicInch=pW/in³ +PicowattPerCubicMeter=pW/m³ +PicowattPerLiter=pW/l +TerawattPerCubicFoot=TW/ft³ +TerawattPerCubicInch=TW/in³ +TerawattPerCubicMeter=TW/m³ +TerawattPerLiter=TW/l +WattPerCubicFoot=W/ft³ +WattPerCubicInch=W/in³ +WattPerCubicMeter=W/m³ +WattPerLiter=W/l diff --git a/UnitsNet/GeneratedCode/Resources/PowerRatio.restext b/UnitsNet/GeneratedCode/Resources/PowerRatio.restext index 10e89acf7f..b581392ed8 100644 --- a/UnitsNet/GeneratedCode/Resources/PowerRatio.restext +++ b/UnitsNet/GeneratedCode/Resources/PowerRatio.restext @@ -1,2 +1,2 @@ -DecibelMilliwatt = "dBmW","dBm" -DecibelWatt = "dBW" +DecibelMilliwatt=dBmW,dBm +DecibelWatt=dBW diff --git a/UnitsNet/GeneratedCode/Resources/Pressure.restext b/UnitsNet/GeneratedCode/Resources/Pressure.restext index f88959ea7c..bc640b0a09 100644 --- a/UnitsNet/GeneratedCode/Resources/Pressure.restext +++ b/UnitsNet/GeneratedCode/Resources/Pressure.restext @@ -1,47 +1,47 @@ -Atmosphere = "atm" -Bar = "bar" -Centibar = "cbar" -Decapascal = "daPa" -Decibar = "dbar" -DynePerSquareCentimeter = "dyn/cm²" -FootOfElevation = "ft of elevation" -FootOfHead = "ft of head" -Gigapascal = "GPa" -Hectopascal = "hPa" -InchOfMercury = "inHg" -InchOfWaterColumn = "inH2O","inch wc","wc" -Kilobar = "kbar" -KilogramForcePerSquareCentimeter = "kgf/cm²" -KilogramForcePerSquareMeter = "kgf/m²" -KilogramForcePerSquareMillimeter = "kgf/mm²" -KilonewtonPerSquareCentimeter = "kN/cm²" -KilonewtonPerSquareMeter = "kN/m²" -KilonewtonPerSquareMillimeter = "kN/mm²" -Kilopascal = "kPa" -KilopoundForcePerSquareFoot = "kipf/ft²" -KilopoundForcePerSquareInch = "ksi","kipf/in²" -KilopoundForcePerSquareMil = "kipf/mil²" -Megabar = "Mbar" -MeganewtonPerSquareMeter = "MN/m²" -Megapascal = "MPa" -MeterOfElevation = "m of elevation" -MeterOfHead = "m of head" -Microbar = "µbar" -Micropascal = "µPa" -Millibar = "mbar" -MillimeterOfMercury = "mmHg" -MillimeterOfWaterColumn = "mmH2O","mm wc" -Millipascal = "mPa" -NewtonPerSquareCentimeter = "N/cm²" -NewtonPerSquareMeter = "N/m²" -NewtonPerSquareMillimeter = "N/mm²" -Pascal = "Pa" -PoundForcePerSquareFoot = "lb/ft²" -PoundForcePerSquareInch = "psi","lb/in²" -PoundForcePerSquareMil = "lb/mil²","lbs/mil²" -PoundPerInchSecondSquared = "lbm/(in·s²)","lb/(in·s²)" -TechnicalAtmosphere = "at" -TonneForcePerSquareCentimeter = "tf/cm²" -TonneForcePerSquareMeter = "tf/m²" -TonneForcePerSquareMillimeter = "tf/mm²" -Torr = "torr" +Atmosphere=atm +Bar=bar +Centibar=cbar +Decapascal=daPa +Decibar=dbar +DynePerSquareCentimeter=dyn/cm² +FootOfElevation=ft of elevation +FootOfHead=ft of head +Gigapascal=GPa +Hectopascal=hPa +InchOfMercury=inHg +InchOfWaterColumn=inH2O,inch wc,wc +Kilobar=kbar +KilogramForcePerSquareCentimeter=kgf/cm² +KilogramForcePerSquareMeter=kgf/m² +KilogramForcePerSquareMillimeter=kgf/mm² +KilonewtonPerSquareCentimeter=kN/cm² +KilonewtonPerSquareMeter=kN/m² +KilonewtonPerSquareMillimeter=kN/mm² +Kilopascal=kPa +KilopoundForcePerSquareFoot=kipf/ft² +KilopoundForcePerSquareInch=ksi,kipf/in² +KilopoundForcePerSquareMil=kipf/mil² +Megabar=Mbar +MeganewtonPerSquareMeter=MN/m² +Megapascal=MPa +MeterOfElevation=m of elevation +MeterOfHead=m of head +Microbar=µbar +Micropascal=µPa +Millibar=mbar +MillimeterOfMercury=mmHg +MillimeterOfWaterColumn=mmH2O,mm wc +Millipascal=mPa +NewtonPerSquareCentimeter=N/cm² +NewtonPerSquareMeter=N/m² +NewtonPerSquareMillimeter=N/mm² +Pascal=Pa +PoundForcePerSquareFoot=lb/ft² +PoundForcePerSquareInch=psi,lb/in² +PoundForcePerSquareMil=lb/mil²,lbs/mil² +PoundPerInchSecondSquared=lbm/(in·s²),lb/(in·s²) +TechnicalAtmosphere=at +TonneForcePerSquareCentimeter=tf/cm² +TonneForcePerSquareMeter=tf/m² +TonneForcePerSquareMillimeter=tf/mm² +Torr=torr diff --git a/UnitsNet/GeneratedCode/Resources/Pressure.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Pressure.ru-RU.restext index 9d506e8c8d..48f0fafd28 100644 --- a/UnitsNet/GeneratedCode/Resources/Pressure.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Pressure.ru-RU.restext @@ -1,31 +1,31 @@ -Atmosphere = "атм" -Bar = "бар" -Centibar = "сбар" -Decapascal = "даПа" -Decibar = "дбар" -Gigapascal = "ГПа" -Hectopascal = "гПа" -Kilobar = "кбар" -KilogramForcePerSquareCentimeter = "кгс/см²" -KilogramForcePerSquareMeter = "кгс/м²" -KilogramForcePerSquareMillimeter = "кгс/мм²" -KilonewtonPerSquareCentimeter = "кН/см²" -KilonewtonPerSquareMeter = "кН/м²" -KilonewtonPerSquareMillimeter = "кН/мм²" -Kilopascal = "кПа" -KilopoundForcePerSquareInch = "ksi","kipf/in²" -Megabar = "Мбар" -MeganewtonPerSquareMeter = "МН/м²" -Megapascal = "МПа" -Microbar = "мкбар" -Micropascal = "мкПа" -Millibar = "мбар" -MillimeterOfMercury = "мм рт.ст." -Millipascal = "мПа" -NewtonPerSquareCentimeter = "Н/см²" -NewtonPerSquareMeter = "Н/м²" -NewtonPerSquareMillimeter = "Н/мм²" -Pascal = "Па" -PoundForcePerSquareInch = "psi","lb/in²" -TechnicalAtmosphere = "ат" -Torr = "торр" +Atmosphere=атм +Bar=бар +Centibar=сбар +Decapascal=даПа +Decibar=дбар +Gigapascal=ГПа +Hectopascal=гПа +Kilobar=кбар +KilogramForcePerSquareCentimeter=кгс/см² +KilogramForcePerSquareMeter=кгс/м² +KilogramForcePerSquareMillimeter=кгс/мм² +KilonewtonPerSquareCentimeter=кН/см² +KilonewtonPerSquareMeter=кН/м² +KilonewtonPerSquareMillimeter=кН/мм² +Kilopascal=кПа +KilopoundForcePerSquareInch=ksi,kipf/in² +Megabar=Мбар +MeganewtonPerSquareMeter=МН/м² +Megapascal=МПа +Microbar=мкбар +Micropascal=мкПа +Millibar=мбар +MillimeterOfMercury=мм рт.ст. +Millipascal=мПа +NewtonPerSquareCentimeter=Н/см² +NewtonPerSquareMeter=Н/м² +NewtonPerSquareMillimeter=Н/мм² +Pascal=Па +PoundForcePerSquareInch=psi,lb/in² +TechnicalAtmosphere=ат +Torr=торр diff --git a/UnitsNet/GeneratedCode/Resources/PressureChangeRate.restext b/UnitsNet/GeneratedCode/Resources/PressureChangeRate.restext index 8fed3934e2..117d2adfc5 100644 --- a/UnitsNet/GeneratedCode/Resources/PressureChangeRate.restext +++ b/UnitsNet/GeneratedCode/Resources/PressureChangeRate.restext @@ -1,14 +1,14 @@ -AtmospherePerSecond = "atm/s" -KilopascalPerMinute = "kPa/min" -KilopascalPerSecond = "kPa/s" -KilopoundForcePerSquareInchPerMinute = "ksi/min","kipf/in²/min" -KilopoundForcePerSquareInchPerSecond = "ksi/s","kipf/in²/s" -MegapascalPerMinute = "MPa/min" -MegapascalPerSecond = "MPa/s" -MegapoundForcePerSquareInchPerMinute = "Mpsi/min","Mlb/in²/min" -MegapoundForcePerSquareInchPerSecond = "Mpsi/s","Mlb/in²/s" -MillimeterOfMercuryPerSecond = "mmHg/s" -PascalPerMinute = "Pa/min" -PascalPerSecond = "Pa/s" -PoundForcePerSquareInchPerMinute = "psi/min","lb/in²/min" -PoundForcePerSquareInchPerSecond = "psi/s","lb/in²/s" +AtmospherePerSecond=atm/s +KilopascalPerMinute=kPa/min +KilopascalPerSecond=kPa/s +KilopoundForcePerSquareInchPerMinute=ksi/min,kipf/in²/min +KilopoundForcePerSquareInchPerSecond=ksi/s,kipf/in²/s +MegapascalPerMinute=MPa/min +MegapascalPerSecond=MPa/s +MegapoundForcePerSquareInchPerMinute=Mpsi/min,Mlb/in²/min +MegapoundForcePerSquareInchPerSecond=Mpsi/s,Mlb/in²/s +MillimeterOfMercuryPerSecond=mmHg/s +PascalPerMinute=Pa/min +PascalPerSecond=Pa/s +PoundForcePerSquareInchPerMinute=psi/min,lb/in²/min +PoundForcePerSquareInchPerSecond=psi/s,lb/in²/s diff --git a/UnitsNet/GeneratedCode/Resources/PressureChangeRate.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/PressureChangeRate.ru-RU.restext index 99898b58f8..3a5d5f30a9 100644 --- a/UnitsNet/GeneratedCode/Resources/PressureChangeRate.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/PressureChangeRate.ru-RU.restext @@ -1,14 +1,14 @@ -AtmospherePerSecond = "атм/с" -KilopascalPerMinute = "кПа/мин" -KilopascalPerSecond = "кПа/с" -KilopoundForcePerSquareInchPerMinute = "ksi/мин","kipf/in²/мин" -KilopoundForcePerSquareInchPerSecond = "ksi/с","kipf/in²/с" -MegapascalPerMinute = "МПа/мин" -MegapascalPerSecond = "МПа/с" -MegapoundForcePerSquareInchPerMinute = "Мpsi/мин","Мlb/in²/мин" -MegapoundForcePerSquareInchPerSecond = "Мpsi/с","Мlb/in²/с" -MillimeterOfMercuryPerSecond = "mmHg/с" -PascalPerMinute = "Па/мин" -PascalPerSecond = "Па/с" -PoundForcePerSquareInchPerMinute = "psi/мин","lb/in²/мин" -PoundForcePerSquareInchPerSecond = "psi/с","lb/in²/с" +AtmospherePerSecond=атм/с +KilopascalPerMinute=кПа/мин +KilopascalPerSecond=кПа/с +KilopoundForcePerSquareInchPerMinute=ksi/мин,kipf/in²/мин +KilopoundForcePerSquareInchPerSecond=ksi/с,kipf/in²/с +MegapascalPerMinute=МПа/мин +MegapascalPerSecond=МПа/с +MegapoundForcePerSquareInchPerMinute=Мpsi/мин,Мlb/in²/мин +MegapoundForcePerSquareInchPerSecond=Мpsi/с,Мlb/in²/с +MillimeterOfMercuryPerSecond=mmHg/с +PascalPerMinute=Па/мин +PascalPerSecond=Па/с +PoundForcePerSquareInchPerMinute=psi/мин,lb/in²/мин +PoundForcePerSquareInchPerSecond=psi/с,lb/in²/с diff --git a/UnitsNet/GeneratedCode/Resources/Ratio.restext b/UnitsNet/GeneratedCode/Resources/Ratio.restext index 6c6289edff..788c6171d8 100644 --- a/UnitsNet/GeneratedCode/Resources/Ratio.restext +++ b/UnitsNet/GeneratedCode/Resources/Ratio.restext @@ -1,6 +1,6 @@ -DecimalFraction = "" -PartPerBillion = "ppb" -PartPerMillion = "ppm" -PartPerThousand = "‰" -PartPerTrillion = "ppt" -Percent = "%" +DecimalFraction= +PartPerBillion=ppb +PartPerMillion=ppm +PartPerThousand=‰ +PartPerTrillion=ppt +Percent=% diff --git a/UnitsNet/GeneratedCode/Resources/RatioChangeRate.restext b/UnitsNet/GeneratedCode/Resources/RatioChangeRate.restext index f2fde709dc..2874835d4e 100644 --- a/UnitsNet/GeneratedCode/Resources/RatioChangeRate.restext +++ b/UnitsNet/GeneratedCode/Resources/RatioChangeRate.restext @@ -1,2 +1,2 @@ -DecimalFractionPerSecond = "/s" -PercentPerSecond = "%/s" +DecimalFractionPerSecond=/s +PercentPerSecond=%/s diff --git a/UnitsNet/GeneratedCode/Resources/ReactiveEnergy.restext b/UnitsNet/GeneratedCode/Resources/ReactiveEnergy.restext index 78e0074b40..5af31030fb 100644 --- a/UnitsNet/GeneratedCode/Resources/ReactiveEnergy.restext +++ b/UnitsNet/GeneratedCode/Resources/ReactiveEnergy.restext @@ -1,3 +1,3 @@ -KilovoltampereReactiveHour = "kvarh" -MegavoltampereReactiveHour = "Mvarh" -VoltampereReactiveHour = "varh" +KilovoltampereReactiveHour=kvarh +MegavoltampereReactiveHour=Mvarh +VoltampereReactiveHour=varh diff --git a/UnitsNet/GeneratedCode/Resources/ReactivePower.restext b/UnitsNet/GeneratedCode/Resources/ReactivePower.restext index 929e35c90b..3721773707 100644 --- a/UnitsNet/GeneratedCode/Resources/ReactivePower.restext +++ b/UnitsNet/GeneratedCode/Resources/ReactivePower.restext @@ -1,4 +1,4 @@ -GigavoltampereReactive = "Gvar" -KilovoltampereReactive = "kvar" -MegavoltampereReactive = "Mvar" -VoltampereReactive = "var" +GigavoltampereReactive=Gvar +KilovoltampereReactive=kvar +MegavoltampereReactive=Mvar +VoltampereReactive=var diff --git a/UnitsNet/GeneratedCode/Resources/ReciprocalArea.restext b/UnitsNet/GeneratedCode/Resources/ReciprocalArea.restext index b0710341cd..a3eeffda01 100644 --- a/UnitsNet/GeneratedCode/Resources/ReciprocalArea.restext +++ b/UnitsNet/GeneratedCode/Resources/ReciprocalArea.restext @@ -1,11 +1,11 @@ -InverseSquareCentimeter = "cm⁻²" -InverseSquareDecimeter = "dm⁻²" -InverseSquareFoot = "ft⁻²" -InverseSquareInch = "in⁻²" -InverseSquareKilometer = "km⁻²" -InverseSquareMeter = "m⁻²" -InverseSquareMicrometer = "µm⁻²" -InverseSquareMile = "mi⁻²" -InverseSquareMillimeter = "mm⁻²" -InverseSquareYard = "yd⁻²" -InverseUsSurveySquareFoot = "ft⁻² (US)" +InverseSquareCentimeter=cm⁻² +InverseSquareDecimeter=dm⁻² +InverseSquareFoot=ft⁻² +InverseSquareInch=in⁻² +InverseSquareKilometer=km⁻² +InverseSquareMeter=m⁻² +InverseSquareMicrometer=µm⁻² +InverseSquareMile=mi⁻² +InverseSquareMillimeter=mm⁻² +InverseSquareYard=yd⁻² +InverseUsSurveySquareFoot=ft⁻² (US) diff --git a/UnitsNet/GeneratedCode/Resources/ReciprocalLength.restext b/UnitsNet/GeneratedCode/Resources/ReciprocalLength.restext index 7117edaa1a..065b7a4a55 100644 --- a/UnitsNet/GeneratedCode/Resources/ReciprocalLength.restext +++ b/UnitsNet/GeneratedCode/Resources/ReciprocalLength.restext @@ -1,10 +1,10 @@ -InverseCentimeter = "cm⁻¹","1/cm" -InverseFoot = "ft⁻¹","1/ft" -InverseInch = "in⁻¹","1/in" -InverseMeter = "m⁻¹","1/m" -InverseMicroinch = "µin⁻¹","1/µin" -InverseMil = "mil⁻¹","1/mil" -InverseMile = "mi⁻¹","1/mi" -InverseMillimeter = "mm⁻¹","1/mm" -InverseUsSurveyFoot = "ftUS⁻¹","1/ftUS" -InverseYard = "yd⁻¹","1/yd" +InverseCentimeter=cm⁻¹,1/cm +InverseFoot=ft⁻¹,1/ft +InverseInch=in⁻¹,1/in +InverseMeter=m⁻¹,1/m +InverseMicroinch=µin⁻¹,1/µin +InverseMil=mil⁻¹,1/mil +InverseMile=mi⁻¹,1/mi +InverseMillimeter=mm⁻¹,1/mm +InverseUsSurveyFoot=ftUS⁻¹,1/ftUS +InverseYard=yd⁻¹,1/yd diff --git a/UnitsNet/GeneratedCode/Resources/RelativeHumidity.restext b/UnitsNet/GeneratedCode/Resources/RelativeHumidity.restext index 2cab70493c..d77b73c585 100644 --- a/UnitsNet/GeneratedCode/Resources/RelativeHumidity.restext +++ b/UnitsNet/GeneratedCode/Resources/RelativeHumidity.restext @@ -1 +1 @@ -Percent = "%RH" +Percent=%RH diff --git a/UnitsNet/GeneratedCode/Resources/RotationalAcceleration.restext b/UnitsNet/GeneratedCode/Resources/RotationalAcceleration.restext index 8b0984706a..ed6f7b4233 100644 --- a/UnitsNet/GeneratedCode/Resources/RotationalAcceleration.restext +++ b/UnitsNet/GeneratedCode/Resources/RotationalAcceleration.restext @@ -1,4 +1,4 @@ -DegreePerSecondSquared = "°/s²","deg/s²" -RadianPerSecondSquared = "rad/s²" -RevolutionPerMinutePerSecond = "rpm/s" -RevolutionPerSecondSquared = "r/s²" +DegreePerSecondSquared=°/s²,deg/s² +RadianPerSecondSquared=rad/s² +RevolutionPerMinutePerSecond=rpm/s +RevolutionPerSecondSquared=r/s² diff --git a/UnitsNet/GeneratedCode/Resources/RotationalSpeed.restext b/UnitsNet/GeneratedCode/Resources/RotationalSpeed.restext index e027fe15aa..7036b8ddb8 100644 --- a/UnitsNet/GeneratedCode/Resources/RotationalSpeed.restext +++ b/UnitsNet/GeneratedCode/Resources/RotationalSpeed.restext @@ -1,13 +1,13 @@ -CentiradianPerSecond = "crad/s" -DeciradianPerSecond = "drad/s" -DegreePerMinute = "°/min","deg/min" -DegreePerSecond = "°/s","deg/s" -MicrodegreePerSecond = "µ°/s","µdeg/s" -MicroradianPerSecond = "µrad/s" -MillidegreePerSecond = "m°/s","mdeg/s" -MilliradianPerSecond = "mrad/s" -NanodegreePerSecond = "n°/s","ndeg/s" -NanoradianPerSecond = "nrad/s" -RadianPerSecond = "rad/s" -RevolutionPerMinute = "rpm","r/min" -RevolutionPerSecond = "r/s" +CentiradianPerSecond=crad/s +DeciradianPerSecond=drad/s +DegreePerMinute=°/min,deg/min +DegreePerSecond=°/s,deg/s +MicrodegreePerSecond=µ°/s,µdeg/s +MicroradianPerSecond=µrad/s +MillidegreePerSecond=m°/s,mdeg/s +MilliradianPerSecond=mrad/s +NanodegreePerSecond=n°/s,ndeg/s +NanoradianPerSecond=nrad/s +RadianPerSecond=rad/s +RevolutionPerMinute=rpm,r/min +RevolutionPerSecond=r/s diff --git a/UnitsNet/GeneratedCode/Resources/RotationalSpeed.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/RotationalSpeed.ru-RU.restext index e910b3fad4..9be83eb667 100644 --- a/UnitsNet/GeneratedCode/Resources/RotationalSpeed.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/RotationalSpeed.ru-RU.restext @@ -1,12 +1,12 @@ -CentiradianPerSecond = "срад/с" -DeciradianPerSecond = "драд/с" -DegreePerSecond = "°/с" -MicrodegreePerSecond = "мк°/с" -MicroradianPerSecond = "мкрад/с" -MillidegreePerSecond = "м°/с" -MilliradianPerSecond = "мрад/с" -NanodegreePerSecond = "н°/с" -NanoradianPerSecond = "нрад/с" -RadianPerSecond = "рад/с" -RevolutionPerMinute = "об/мин" -RevolutionPerSecond = "об/с" +CentiradianPerSecond=срад/с +DeciradianPerSecond=драд/с +DegreePerSecond=°/с +MicrodegreePerSecond=мк°/с +MicroradianPerSecond=мкрад/с +MillidegreePerSecond=м°/с +MilliradianPerSecond=мрад/с +NanodegreePerSecond=н°/с +NanoradianPerSecond=нрад/с +RadianPerSecond=рад/с +RevolutionPerMinute=об/мин +RevolutionPerSecond=об/с diff --git a/UnitsNet/GeneratedCode/Resources/RotationalStiffness.restext b/UnitsNet/GeneratedCode/Resources/RotationalStiffness.restext index 3ceb59443e..0e0894451c 100644 --- a/UnitsNet/GeneratedCode/Resources/RotationalStiffness.restext +++ b/UnitsNet/GeneratedCode/Resources/RotationalStiffness.restext @@ -1,33 +1,33 @@ -CentinewtonMeterPerDegree = "cN·m/deg","cNm/deg","cN·m/°","cNm/°" -CentinewtonMillimeterPerDegree = "cN·mm/deg","cNmm/deg","cN·mm/°","cNmm/°" -CentinewtonMillimeterPerRadian = "cN·mm/rad","cNmm/rad" -DecanewtonMeterPerDegree = "daN·m/deg","daNm/deg","daN·m/°","daNm/°" -DecanewtonMillimeterPerDegree = "daN·mm/deg","daNmm/deg","daN·mm/°","daNmm/°" -DecanewtonMillimeterPerRadian = "daN·mm/rad","daNmm/rad" -DecinewtonMeterPerDegree = "dN·m/deg","dNm/deg","dN·m/°","dNm/°" -DecinewtonMillimeterPerDegree = "dN·mm/deg","dNmm/deg","dN·mm/°","dNmm/°" -DecinewtonMillimeterPerRadian = "dN·mm/rad","dNmm/rad" -KilonewtonMeterPerDegree = "kN·m/deg","kNm/deg","kN·m/°","kNm/°" -KilonewtonMeterPerRadian = "kN·m/rad","kNm/rad" -KilonewtonMillimeterPerDegree = "kN·mm/deg","kNmm/deg","kN·mm/°","kNmm/°" -KilonewtonMillimeterPerRadian = "kN·mm/rad","kNmm/rad" -KilopoundForceFootPerDegrees = "kipf·ft/°","kip·ft/°g","k·ft/°","kipf·ft/deg","kip·ft/deg","k·ft/deg" -MeganewtonMeterPerDegree = "MN·m/deg","MNm/deg","MN·m/°","MNm/°" -MeganewtonMeterPerRadian = "MN·m/rad","MNm/rad" -MeganewtonMillimeterPerDegree = "MN·mm/deg","MNmm/deg","MN·mm/°","MNmm/°" -MeganewtonMillimeterPerRadian = "MN·mm/rad","MNmm/rad" -MicronewtonMeterPerDegree = "µN·m/deg","µNm/deg","µN·m/°","µNm/°" -MicronewtonMillimeterPerDegree = "µN·mm/deg","µNmm/deg","µN·mm/°","µNmm/°" -MicronewtonMillimeterPerRadian = "µN·mm/rad","µNmm/rad" -MillinewtonMeterPerDegree = "mN·m/deg","mNm/deg","mN·m/°","mNm/°" -MillinewtonMillimeterPerDegree = "mN·mm/deg","mNmm/deg","mN·mm/°","mNmm/°" -MillinewtonMillimeterPerRadian = "mN·mm/rad","mNmm/rad" -NanonewtonMeterPerDegree = "nN·m/deg","nNm/deg","nN·m/°","nNm/°" -NanonewtonMillimeterPerDegree = "nN·mm/deg","nNmm/deg","nN·mm/°","nNmm/°" -NanonewtonMillimeterPerRadian = "nN·mm/rad","nNmm/rad" -NewtonMeterPerDegree = "N·m/deg","Nm/deg","N·m/°","Nm/°" -NewtonMeterPerRadian = "N·m/rad","Nm/rad" -NewtonMillimeterPerDegree = "N·mm/deg","Nmm/deg","N·mm/°","Nmm/°" -NewtonMillimeterPerRadian = "N·mm/rad","Nmm/rad" -PoundForceFeetPerRadian = "lbf·ft/rad" -PoundForceFootPerDegrees = "lbf·ft/deg" +CentinewtonMeterPerDegree=cN·m/deg,cNm/deg,cN·m/°,cNm/° +CentinewtonMillimeterPerDegree=cN·mm/deg,cNmm/deg,cN·mm/°,cNmm/° +CentinewtonMillimeterPerRadian=cN·mm/rad,cNmm/rad +DecanewtonMeterPerDegree=daN·m/deg,daNm/deg,daN·m/°,daNm/° +DecanewtonMillimeterPerDegree=daN·mm/deg,daNmm/deg,daN·mm/°,daNmm/° +DecanewtonMillimeterPerRadian=daN·mm/rad,daNmm/rad +DecinewtonMeterPerDegree=dN·m/deg,dNm/deg,dN·m/°,dNm/° +DecinewtonMillimeterPerDegree=dN·mm/deg,dNmm/deg,dN·mm/°,dNmm/° +DecinewtonMillimeterPerRadian=dN·mm/rad,dNmm/rad +KilonewtonMeterPerDegree=kN·m/deg,kNm/deg,kN·m/°,kNm/° +KilonewtonMeterPerRadian=kN·m/rad,kNm/rad +KilonewtonMillimeterPerDegree=kN·mm/deg,kNmm/deg,kN·mm/°,kNmm/° +KilonewtonMillimeterPerRadian=kN·mm/rad,kNmm/rad +KilopoundForceFootPerDegrees=kipf·ft/°,kip·ft/°g,k·ft/°,kipf·ft/deg,kip·ft/deg,k·ft/deg +MeganewtonMeterPerDegree=MN·m/deg,MNm/deg,MN·m/°,MNm/° +MeganewtonMeterPerRadian=MN·m/rad,MNm/rad +MeganewtonMillimeterPerDegree=MN·mm/deg,MNmm/deg,MN·mm/°,MNmm/° +MeganewtonMillimeterPerRadian=MN·mm/rad,MNmm/rad +MicronewtonMeterPerDegree=µN·m/deg,µNm/deg,µN·m/°,µNm/° +MicronewtonMillimeterPerDegree=µN·mm/deg,µNmm/deg,µN·mm/°,µNmm/° +MicronewtonMillimeterPerRadian=µN·mm/rad,µNmm/rad +MillinewtonMeterPerDegree=mN·m/deg,mNm/deg,mN·m/°,mNm/° +MillinewtonMillimeterPerDegree=mN·mm/deg,mNmm/deg,mN·mm/°,mNmm/° +MillinewtonMillimeterPerRadian=mN·mm/rad,mNmm/rad +NanonewtonMeterPerDegree=nN·m/deg,nNm/deg,nN·m/°,nNm/° +NanonewtonMillimeterPerDegree=nN·mm/deg,nNmm/deg,nN·mm/°,nNmm/° +NanonewtonMillimeterPerRadian=nN·mm/rad,nNmm/rad +NewtonMeterPerDegree=N·m/deg,Nm/deg,N·m/°,Nm/° +NewtonMeterPerRadian=N·m/rad,Nm/rad +NewtonMillimeterPerDegree=N·mm/deg,Nmm/deg,N·mm/°,Nmm/° +NewtonMillimeterPerRadian=N·mm/rad,Nmm/rad +PoundForceFeetPerRadian=lbf·ft/rad +PoundForceFootPerDegrees=lbf·ft/deg diff --git a/UnitsNet/GeneratedCode/Resources/RotationalStiffnessPerLength.restext b/UnitsNet/GeneratedCode/Resources/RotationalStiffnessPerLength.restext index 66ae6483fd..f551c8933e 100644 --- a/UnitsNet/GeneratedCode/Resources/RotationalStiffnessPerLength.restext +++ b/UnitsNet/GeneratedCode/Resources/RotationalStiffnessPerLength.restext @@ -1,5 +1,5 @@ -KilonewtonMeterPerRadianPerMeter = "kN·m/rad/m","kNm/rad/m" -KilopoundForceFootPerDegreesPerFoot = "kipf·ft/°/ft","kip·ft/°/ft","k·ft/°/ft","kipf·ft/deg/ft","kip·ft/deg/ft","k·ft/deg/ft" -MeganewtonMeterPerRadianPerMeter = "MN·m/rad/m","MNm/rad/m" -NewtonMeterPerRadianPerMeter = "N·m/rad/m","Nm/rad/m" -PoundForceFootPerDegreesPerFoot = "lbf·ft/deg/ft" +KilonewtonMeterPerRadianPerMeter=kN·m/rad/m,kNm/rad/m +KilopoundForceFootPerDegreesPerFoot=kipf·ft/°/ft,kip·ft/°/ft,k·ft/°/ft,kipf·ft/deg/ft,kip·ft/deg/ft,k·ft/deg/ft +MeganewtonMeterPerRadianPerMeter=MN·m/rad/m,MNm/rad/m +NewtonMeterPerRadianPerMeter=N·m/rad/m,Nm/rad/m +PoundForceFootPerDegreesPerFoot=lbf·ft/deg/ft diff --git a/UnitsNet/GeneratedCode/Resources/Scalar.restext b/UnitsNet/GeneratedCode/Resources/Scalar.restext index cd805ccbbc..8a5376da0d 100644 --- a/UnitsNet/GeneratedCode/Resources/Scalar.restext +++ b/UnitsNet/GeneratedCode/Resources/Scalar.restext @@ -1 +1 @@ -Amount = "" +Amount= diff --git a/UnitsNet/GeneratedCode/Resources/SolidAngle.restext b/UnitsNet/GeneratedCode/Resources/SolidAngle.restext index ae30490048..c93cedea51 100644 --- a/UnitsNet/GeneratedCode/Resources/SolidAngle.restext +++ b/UnitsNet/GeneratedCode/Resources/SolidAngle.restext @@ -1 +1 @@ -Steradian = "sr" +Steradian=sr diff --git a/UnitsNet/GeneratedCode/Resources/SpecificEnergy.restext b/UnitsNet/GeneratedCode/Resources/SpecificEnergy.restext index d8b7977981..dbc4829091 100644 --- a/UnitsNet/GeneratedCode/Resources/SpecificEnergy.restext +++ b/UnitsNet/GeneratedCode/Resources/SpecificEnergy.restext @@ -1,30 +1,30 @@ -BtuPerPound = "btu/lb" -CaloriePerGram = "cal/g" -GigawattDayPerKilogram = "GWd/kg" -GigawattDayPerShortTon = "GWd/ST" -GigawattDayPerTonne = "GWd/t" -GigawattHourPerKilogram = "GWh/kg" -GigawattHourPerPound = "GWh/lbs" -JoulePerKilogram = "J/kg" -KilocaloriePerGram = "kcal/g" -KilojoulePerKilogram = "kJ/kg" -KilowattDayPerKilogram = "kWd/kg" -KilowattDayPerShortTon = "kWd/ST" -KilowattDayPerTonne = "kWd/t" -KilowattHourPerKilogram = "kWh/kg" -KilowattHourPerPound = "kWh/lbs" -MegajoulePerKilogram = "MJ/kg" -MegaJoulePerTonne = "MJ/t" -MegawattDayPerKilogram = "MWd/kg" -MegawattDayPerShortTon = "MWd/ST" -MegawattDayPerTonne = "MWd/t" -MegawattHourPerKilogram = "MWh/kg" -MegawattHourPerPound = "MWh/lbs" -TerawattDayPerKilogram = "TWd/kg" -TerawattDayPerShortTon = "TWd/ST" -TerawattDayPerTonne = "TWd/t" -WattDayPerKilogram = "Wd/kg" -WattDayPerShortTon = "Wd/ST" -WattDayPerTonne = "Wd/t" -WattHourPerKilogram = "Wh/kg" -WattHourPerPound = "Wh/lbs" +BtuPerPound=btu/lb +CaloriePerGram=cal/g +GigawattDayPerKilogram=GWd/kg +GigawattDayPerShortTon=GWd/ST +GigawattDayPerTonne=GWd/t +GigawattHourPerKilogram=GWh/kg +GigawattHourPerPound=GWh/lbs +JoulePerKilogram=J/kg +KilocaloriePerGram=kcal/g +KilojoulePerKilogram=kJ/kg +KilowattDayPerKilogram=kWd/kg +KilowattDayPerShortTon=kWd/ST +KilowattDayPerTonne=kWd/t +KilowattHourPerKilogram=kWh/kg +KilowattHourPerPound=kWh/lbs +MegajoulePerKilogram=MJ/kg +MegaJoulePerTonne=MJ/t +MegawattDayPerKilogram=MWd/kg +MegawattDayPerShortTon=MWd/ST +MegawattDayPerTonne=MWd/t +MegawattHourPerKilogram=MWh/kg +MegawattHourPerPound=MWh/lbs +TerawattDayPerKilogram=TWd/kg +TerawattDayPerShortTon=TWd/ST +TerawattDayPerTonne=TWd/t +WattDayPerKilogram=Wd/kg +WattDayPerShortTon=Wd/ST +WattDayPerTonne=Wd/t +WattHourPerKilogram=Wh/kg +WattHourPerPound=Wh/lbs diff --git a/UnitsNet/GeneratedCode/Resources/SpecificEntropy.restext b/UnitsNet/GeneratedCode/Resources/SpecificEntropy.restext index 7e954cf498..6fbd29e5e4 100644 --- a/UnitsNet/GeneratedCode/Resources/SpecificEntropy.restext +++ b/UnitsNet/GeneratedCode/Resources/SpecificEntropy.restext @@ -1,9 +1,9 @@ -BtuPerPoundFahrenheit = "BTU/lb·°F","BTU/lbm·°F" -CaloriePerGramKelvin = "cal/g.K" -JoulePerKilogramDegreeCelsius = "J/kg.C" -JoulePerKilogramKelvin = "J/kg.K" -KilocaloriePerGramKelvin = "kcal/g.K" -KilojoulePerKilogramDegreeCelsius = "kJ/kg.C" -KilojoulePerKilogramKelvin = "kJ/kg.K" -MegajoulePerKilogramDegreeCelsius = "MJ/kg.C" -MegajoulePerKilogramKelvin = "MJ/kg.K" +BtuPerPoundFahrenheit=BTU/lb·°F,BTU/lbm·°F +CaloriePerGramKelvin=cal/g.K +JoulePerKilogramDegreeCelsius=J/kg.C +JoulePerKilogramKelvin=J/kg.K +KilocaloriePerGramKelvin=kcal/g.K +KilojoulePerKilogramDegreeCelsius=kJ/kg.C +KilojoulePerKilogramKelvin=kJ/kg.K +MegajoulePerKilogramDegreeCelsius=MJ/kg.C +MegajoulePerKilogramKelvin=MJ/kg.K diff --git a/UnitsNet/GeneratedCode/Resources/SpecificFuelConsumption.restext b/UnitsNet/GeneratedCode/Resources/SpecificFuelConsumption.restext index 2a445e9857..5ec70c784b 100644 --- a/UnitsNet/GeneratedCode/Resources/SpecificFuelConsumption.restext +++ b/UnitsNet/GeneratedCode/Resources/SpecificFuelConsumption.restext @@ -1,4 +1,4 @@ -GramPerKiloNewtonSecond = "g/(kN�s)" -KilogramPerKilogramForceHour = "kg/(kgf�h)" -KilogramPerKiloNewtonSecond = "kg/(kN�s)" -PoundMassPerPoundForceHour = "lb/(lbf·h)" +GramPerKiloNewtonSecond=g/(kN�s) +KilogramPerKilogramForceHour=kg/(kgf�h) +KilogramPerKiloNewtonSecond=kg/(kN�s) +PoundMassPerPoundForceHour=lb/(lbf·h) diff --git a/UnitsNet/GeneratedCode/Resources/SpecificVolume.restext b/UnitsNet/GeneratedCode/Resources/SpecificVolume.restext index 1dc989235c..02e270381d 100644 --- a/UnitsNet/GeneratedCode/Resources/SpecificVolume.restext +++ b/UnitsNet/GeneratedCode/Resources/SpecificVolume.restext @@ -1,3 +1,3 @@ -CubicFootPerPound = "ft³/lb" -CubicMeterPerKilogram = "m³/kg" -MillicubicMeterPerKilogram = "mm³/kg" +CubicFootPerPound=ft³/lb +CubicMeterPerKilogram=m³/kg +MillicubicMeterPerKilogram=mm³/kg diff --git a/UnitsNet/GeneratedCode/Resources/SpecificWeight.restext b/UnitsNet/GeneratedCode/Resources/SpecificWeight.restext index 1164edd67a..228ef2cd1e 100644 --- a/UnitsNet/GeneratedCode/Resources/SpecificWeight.restext +++ b/UnitsNet/GeneratedCode/Resources/SpecificWeight.restext @@ -1,17 +1,17 @@ -KilogramForcePerCubicCentimeter = "kgf/cm³" -KilogramForcePerCubicMeter = "kgf/m³" -KilogramForcePerCubicMillimeter = "kgf/mm³" -KilonewtonPerCubicCentimeter = "kN/cm³" -KilonewtonPerCubicMeter = "kN/m³" -KilonewtonPerCubicMillimeter = "kN/mm³" -KilopoundForcePerCubicFoot = "kipf/ft³" -KilopoundForcePerCubicInch = "kipf/in³" -MeganewtonPerCubicMeter = "MN/m³" -NewtonPerCubicCentimeter = "N/cm³" -NewtonPerCubicMeter = "N/m³" -NewtonPerCubicMillimeter = "N/mm³" -PoundForcePerCubicFoot = "lbf/ft³" -PoundForcePerCubicInch = "lbf/in³" -TonneForcePerCubicCentimeter = "tf/cm³" -TonneForcePerCubicMeter = "tf/m³" -TonneForcePerCubicMillimeter = "tf/mm³" +KilogramForcePerCubicCentimeter=kgf/cm³ +KilogramForcePerCubicMeter=kgf/m³ +KilogramForcePerCubicMillimeter=kgf/mm³ +KilonewtonPerCubicCentimeter=kN/cm³ +KilonewtonPerCubicMeter=kN/m³ +KilonewtonPerCubicMillimeter=kN/mm³ +KilopoundForcePerCubicFoot=kipf/ft³ +KilopoundForcePerCubicInch=kipf/in³ +MeganewtonPerCubicMeter=MN/m³ +NewtonPerCubicCentimeter=N/cm³ +NewtonPerCubicMeter=N/m³ +NewtonPerCubicMillimeter=N/mm³ +PoundForcePerCubicFoot=lbf/ft³ +PoundForcePerCubicInch=lbf/in³ +TonneForcePerCubicCentimeter=tf/cm³ +TonneForcePerCubicMeter=tf/m³ +TonneForcePerCubicMillimeter=tf/mm³ diff --git a/UnitsNet/GeneratedCode/Resources/Speed.restext b/UnitsNet/GeneratedCode/Resources/Speed.restext index fd061b154c..7bafb4490c 100644 --- a/UnitsNet/GeneratedCode/Resources/Speed.restext +++ b/UnitsNet/GeneratedCode/Resources/Speed.restext @@ -1,33 +1,33 @@ -CentimeterPerHour = "cm/h" -CentimeterPerMinute = "cm/min" -CentimeterPerSecond = "cm/s" -DecimeterPerMinute = "dm/min" -DecimeterPerSecond = "dm/s" -FootPerHour = "ft/h" -FootPerMinute = "ft/min" -FootPerSecond = "ft/s" -InchPerHour = "in/h" -InchPerMinute = "in/min" -InchPerSecond = "in/s" -KilometerPerHour = "km/h" -KilometerPerMinute = "km/min" -KilometerPerSecond = "km/s" -Knot = "kn","kt","knot","knots" -Mach = "M","Ma","MN","MACH" -MeterPerHour = "m/h" -MeterPerMinute = "m/min" -MeterPerSecond = "m/s" -MicrometerPerMinute = "µm/min" -MicrometerPerSecond = "µm/s" -MilePerHour = "mph" -MillimeterPerHour = "mm/h" -MillimeterPerMinute = "mm/min" -MillimeterPerSecond = "mm/s" -NanometerPerMinute = "nm/min" -NanometerPerSecond = "nm/s" -UsSurveyFootPerHour = "ftUS/h" -UsSurveyFootPerMinute = "ftUS/min" -UsSurveyFootPerSecond = "ftUS/s" -YardPerHour = "yd/h" -YardPerMinute = "yd/min" -YardPerSecond = "yd/s" +CentimeterPerHour=cm/h +CentimeterPerMinute=cm/min +CentimeterPerSecond=cm/s +DecimeterPerMinute=dm/min +DecimeterPerSecond=dm/s +FootPerHour=ft/h +FootPerMinute=ft/min +FootPerSecond=ft/s +InchPerHour=in/h +InchPerMinute=in/min +InchPerSecond=in/s +KilometerPerHour=km/h +KilometerPerMinute=km/min +KilometerPerSecond=km/s +Knot=kn,kt,knot,knots +Mach=M,Ma,MN,MACH +MeterPerHour=m/h +MeterPerMinute=m/min +MeterPerSecond=m/s +MicrometerPerMinute=µm/min +MicrometerPerSecond=µm/s +MilePerHour=mph +MillimeterPerHour=mm/h +MillimeterPerMinute=mm/min +MillimeterPerSecond=mm/s +NanometerPerMinute=nm/min +NanometerPerSecond=nm/s +UsSurveyFootPerHour=ftUS/h +UsSurveyFootPerMinute=ftUS/min +UsSurveyFootPerSecond=ftUS/s +YardPerHour=yd/h +YardPerMinute=yd/min +YardPerSecond=yd/s diff --git a/UnitsNet/GeneratedCode/Resources/Speed.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Speed.ru-RU.restext index 8e20c00e8f..d8b0bf5ac3 100644 --- a/UnitsNet/GeneratedCode/Resources/Speed.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Speed.ru-RU.restext @@ -1,24 +1,24 @@ -CentimeterPerHour = "см/ч" -CentimeterPerMinute = "см/мин" -CentimeterPerSecond = "см/с" -DecimeterPerMinute = "дм/мин" -DecimeterPerSecond = "дм/с" -FootPerHour = "фут/ч" -FootPerMinute = "фут/мин" -FootPerSecond = "фут/с" -KilometerPerHour = "км/ч" -KilometerPerMinute = "км/мин" -KilometerPerSecond = "км/с" -Knot = "уз." -Mach = "мах" -MeterPerHour = "м/ч" -MeterPerMinute = "м/мин" -MeterPerSecond = "м/с" -MicrometerPerMinute = "мкм/мин" -MicrometerPerSecond = "мкм/с" -MilePerHour = "миль/ч" -MillimeterPerHour = "мм/ч" -MillimeterPerMinute = "мм/мин" -MillimeterPerSecond = "мм/с" -NanometerPerMinute = "нм/мин" -NanometerPerSecond = "нм/с" +CentimeterPerHour=см/ч +CentimeterPerMinute=см/мин +CentimeterPerSecond=см/с +DecimeterPerMinute=дм/мин +DecimeterPerSecond=дм/с +FootPerHour=фут/ч +FootPerMinute=фут/мин +FootPerSecond=фут/с +KilometerPerHour=км/ч +KilometerPerMinute=км/мин +KilometerPerSecond=км/с +Knot=уз. +Mach=мах +MeterPerHour=м/ч +MeterPerMinute=м/мин +MeterPerSecond=м/с +MicrometerPerMinute=мкм/мин +MicrometerPerSecond=мкм/с +MilePerHour=миль/ч +MillimeterPerHour=мм/ч +MillimeterPerMinute=мм/мин +MillimeterPerSecond=мм/с +NanometerPerMinute=нм/мин +NanometerPerSecond=нм/с diff --git a/UnitsNet/GeneratedCode/Resources/StandardVolumeFlow.restext b/UnitsNet/GeneratedCode/Resources/StandardVolumeFlow.restext index d1aadf2923..edf79da995 100644 --- a/UnitsNet/GeneratedCode/Resources/StandardVolumeFlow.restext +++ b/UnitsNet/GeneratedCode/Resources/StandardVolumeFlow.restext @@ -1,9 +1,9 @@ -StandardCubicCentimeterPerMinute = "sccm" -StandardCubicFootPerHour = "scfh" -StandardCubicFootPerMinute = "scfm" -StandardCubicFootPerSecond = "Sft³/s" -StandardCubicMeterPerDay = "Sm³/d" -StandardCubicMeterPerHour = "Sm³/h" -StandardCubicMeterPerMinute = "Sm³/min" -StandardCubicMeterPerSecond = "Sm³/s" -StandardLiterPerMinute = "slm" +StandardCubicCentimeterPerMinute=sccm +StandardCubicFootPerHour=scfh +StandardCubicFootPerMinute=scfm +StandardCubicFootPerSecond=Sft³/s +StandardCubicMeterPerDay=Sm³/d +StandardCubicMeterPerHour=Sm³/h +StandardCubicMeterPerMinute=Sm³/min +StandardCubicMeterPerSecond=Sm³/s +StandardLiterPerMinute=slm diff --git a/UnitsNet/GeneratedCode/Resources/Temperature.restext b/UnitsNet/GeneratedCode/Resources/Temperature.restext index e3215fcaf5..490f5e3c00 100644 --- a/UnitsNet/GeneratedCode/Resources/Temperature.restext +++ b/UnitsNet/GeneratedCode/Resources/Temperature.restext @@ -1,10 +1,10 @@ -DegreeCelsius = "°C" -DegreeDelisle = "°De" -DegreeFahrenheit = "°F" -DegreeNewton = "°N" -DegreeRankine = "°R" -DegreeReaumur = "°Ré" -DegreeRoemer = "°Rø" -Kelvin = "K" -MillidegreeCelsius = "m°C" -SolarTemperature = "T⊙" +DegreeCelsius=°C +DegreeDelisle=°De +DegreeFahrenheit=°F +DegreeNewton=°N +DegreeRankine=°R +DegreeReaumur=°Ré +DegreeRoemer=°Rø +Kelvin=K +MillidegreeCelsius=m°C +SolarTemperature=T⊙ diff --git a/UnitsNet/GeneratedCode/Resources/TemperatureChangeRate.restext b/UnitsNet/GeneratedCode/Resources/TemperatureChangeRate.restext index dc0f2c32e6..3017c201e0 100644 --- a/UnitsNet/GeneratedCode/Resources/TemperatureChangeRate.restext +++ b/UnitsNet/GeneratedCode/Resources/TemperatureChangeRate.restext @@ -1,10 +1,10 @@ -CentidegreeCelsiusPerSecond = "c°C/s" -DecadegreeCelsiusPerSecond = "da°C/s" -DecidegreeCelsiusPerSecond = "d°C/s" -DegreeCelsiusPerMinute = "°C/min" -DegreeCelsiusPerSecond = "°C/s" -HectodegreeCelsiusPerSecond = "h°C/s" -KilodegreeCelsiusPerSecond = "k°C/s" -MicrodegreeCelsiusPerSecond = "µ°C/s" -MillidegreeCelsiusPerSecond = "m°C/s" -NanodegreeCelsiusPerSecond = "n°C/s" +CentidegreeCelsiusPerSecond=c°C/s +DecadegreeCelsiusPerSecond=da°C/s +DecidegreeCelsiusPerSecond=d°C/s +DegreeCelsiusPerMinute=°C/min +DegreeCelsiusPerSecond=°C/s +HectodegreeCelsiusPerSecond=h°C/s +KilodegreeCelsiusPerSecond=k°C/s +MicrodegreeCelsiusPerSecond=µ°C/s +MillidegreeCelsiusPerSecond=m°C/s +NanodegreeCelsiusPerSecond=n°C/s diff --git a/UnitsNet/GeneratedCode/Resources/TemperatureDelta.restext b/UnitsNet/GeneratedCode/Resources/TemperatureDelta.restext index bcef837fa3..0e65578a76 100644 --- a/UnitsNet/GeneratedCode/Resources/TemperatureDelta.restext +++ b/UnitsNet/GeneratedCode/Resources/TemperatureDelta.restext @@ -1,9 +1,9 @@ -DegreeCelsius = "∆°C" -DegreeDelisle = "∆°De" -DegreeFahrenheit = "∆°F" -DegreeNewton = "∆°N" -DegreeRankine = "∆°R" -DegreeReaumur = "∆°Ré" -DegreeRoemer = "∆°Rø" -Kelvin = "∆K" -MillidegreeCelsius = "∆m°C" +DegreeCelsius=∆°C +DegreeDelisle=∆°De +DegreeFahrenheit=∆°F +DegreeNewton=∆°N +DegreeRankine=∆°R +DegreeReaumur=∆°Ré +DegreeRoemer=∆°Rø +Kelvin=∆K +MillidegreeCelsius=∆m°C diff --git a/UnitsNet/GeneratedCode/Resources/TemperatureGradient.restext b/UnitsNet/GeneratedCode/Resources/TemperatureGradient.restext index 8a3b09ee56..350837df31 100644 --- a/UnitsNet/GeneratedCode/Resources/TemperatureGradient.restext +++ b/UnitsNet/GeneratedCode/Resources/TemperatureGradient.restext @@ -1,4 +1,4 @@ -DegreeCelsiusPerKilometer = "∆°C/km" -DegreeCelsiusPerMeter = "∆°C/m" -DegreeFahrenheitPerFoot = "∆°F/ft" -KelvinPerMeter = "∆°K/m" +DegreeCelsiusPerKilometer=∆°C/km +DegreeCelsiusPerMeter=∆°C/m +DegreeFahrenheitPerFoot=∆°F/ft +KelvinPerMeter=∆°K/m diff --git a/UnitsNet/GeneratedCode/Resources/ThermalConductivity.restext b/UnitsNet/GeneratedCode/Resources/ThermalConductivity.restext index 7a94dfc47f..4250b3667b 100644 --- a/UnitsNet/GeneratedCode/Resources/ThermalConductivity.restext +++ b/UnitsNet/GeneratedCode/Resources/ThermalConductivity.restext @@ -1,2 +1,2 @@ -BtuPerHourFootFahrenheit = "BTU/h·ft·°F" -WattPerMeterKelvin = "W/m·K" +BtuPerHourFootFahrenheit=BTU/h·ft·°F +WattPerMeterKelvin=W/m·K diff --git a/UnitsNet/GeneratedCode/Resources/ThermalResistance.restext b/UnitsNet/GeneratedCode/Resources/ThermalResistance.restext index e1e7fd49c8..c0a6e34575 100644 --- a/UnitsNet/GeneratedCode/Resources/ThermalResistance.restext +++ b/UnitsNet/GeneratedCode/Resources/ThermalResistance.restext @@ -1,6 +1,6 @@ -HourSquareFeetDegreeFahrenheitPerBtu = "Hrft²°F/Btu" -SquareCentimeterHourDegreeCelsiusPerKilocalorie = "cm²Hr°C/kcal" -SquareCentimeterKelvinPerWatt = "cm²K/W" -SquareMeterDegreeCelsiusPerWatt = "m²°C/W" -SquareMeterKelvinPerKilowatt = "m²K/kW" -SquareMeterKelvinPerWatt = "m²K/W" +HourSquareFeetDegreeFahrenheitPerBtu=Hrft²°F/Btu +SquareCentimeterHourDegreeCelsiusPerKilocalorie=cm²Hr°C/kcal +SquareCentimeterKelvinPerWatt=cm²K/W +SquareMeterDegreeCelsiusPerWatt=m²°C/W +SquareMeterKelvinPerKilowatt=m²K/kW +SquareMeterKelvinPerWatt=m²K/W diff --git a/UnitsNet/GeneratedCode/Resources/Torque.restext b/UnitsNet/GeneratedCode/Resources/Torque.restext index 231ce34d3c..545f2f535c 100644 --- a/UnitsNet/GeneratedCode/Resources/Torque.restext +++ b/UnitsNet/GeneratedCode/Resources/Torque.restext @@ -1,25 +1,25 @@ -GramForceCentimeter = "gf·cm" -GramForceMeter = "gf·m" -GramForceMillimeter = "gf·mm" -KilogramForceCentimeter = "kgf·cm" -KilogramForceMeter = "kgf·m" -KilogramForceMillimeter = "kgf·mm" -KilonewtonCentimeter = "kN·cm" -KilonewtonMeter = "kN·m" -KilonewtonMillimeter = "kN·mm" -KilopoundForceFoot = "kipf·ft" -KilopoundForceInch = "kipf·in" -MeganewtonCentimeter = "MN·cm" -MeganewtonMeter = "MN·m" -MeganewtonMillimeter = "MN·mm" -MegapoundForceFoot = "Mlbf·ft" -MegapoundForceInch = "Mlbf·in" -NewtonCentimeter = "N·cm" -NewtonMeter = "N·m" -NewtonMillimeter = "N·mm" -PoundalFoot = "pdl·ft" -PoundForceFoot = "lbf·ft" -PoundForceInch = "lbf·in" -TonneForceCentimeter = "tf·cm" -TonneForceMeter = "tf·m" -TonneForceMillimeter = "tf·mm" +GramForceCentimeter=gf·cm +GramForceMeter=gf·m +GramForceMillimeter=gf·mm +KilogramForceCentimeter=kgf·cm +KilogramForceMeter=kgf·m +KilogramForceMillimeter=kgf·mm +KilonewtonCentimeter=kN·cm +KilonewtonMeter=kN·m +KilonewtonMillimeter=kN·mm +KilopoundForceFoot=kipf·ft +KilopoundForceInch=kipf·in +MeganewtonCentimeter=MN·cm +MeganewtonMeter=MN·m +MeganewtonMillimeter=MN·mm +MegapoundForceFoot=Mlbf·ft +MegapoundForceInch=Mlbf·in +NewtonCentimeter=N·cm +NewtonMeter=N·m +NewtonMillimeter=N·mm +PoundalFoot=pdl·ft +PoundForceFoot=lbf·ft +PoundForceInch=lbf·in +TonneForceCentimeter=tf·cm +TonneForceMeter=tf·m +TonneForceMillimeter=tf·mm diff --git a/UnitsNet/GeneratedCode/Resources/Torque.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Torque.ru-RU.restext index 3e575f5abc..03704d21d8 100644 --- a/UnitsNet/GeneratedCode/Resources/Torque.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Torque.ru-RU.restext @@ -1,3 +1,3 @@ -KilonewtonMeter = "кН·м" -MeganewtonMeter = "МН·м" -NewtonMeter = "Н·м" +KilonewtonMeter=кН·м +MeganewtonMeter=МН·м +NewtonMeter=Н·м diff --git a/UnitsNet/GeneratedCode/Resources/TorquePerLength.restext b/UnitsNet/GeneratedCode/Resources/TorquePerLength.restext index e4a044c018..55d8b5481f 100644 --- a/UnitsNet/GeneratedCode/Resources/TorquePerLength.restext +++ b/UnitsNet/GeneratedCode/Resources/TorquePerLength.restext @@ -1,21 +1,21 @@ -KilogramForceCentimeterPerMeter = "kgf·cm/m" -KilogramForceMeterPerMeter = "kgf·m/m" -KilogramForceMillimeterPerMeter = "kgf·mm/m" -KilonewtonCentimeterPerMeter = "kN·cm/m" -KilonewtonMeterPerMeter = "kN·m/m" -KilonewtonMillimeterPerMeter = "kN·mm/m" -KilopoundForceFootPerFoot = "kipf·ft/ft" -KilopoundForceInchPerFoot = "kipf·in/ft" -MeganewtonCentimeterPerMeter = "MN·cm/m" -MeganewtonMeterPerMeter = "MN·m/m" -MeganewtonMillimeterPerMeter = "MN·mm/m" -MegapoundForceFootPerFoot = "Mlbf·ft/ft" -MegapoundForceInchPerFoot = "Mlbf·in/ft" -NewtonCentimeterPerMeter = "N·cm/m" -NewtonMeterPerMeter = "N·m/m" -NewtonMillimeterPerMeter = "N·mm/m" -PoundForceFootPerFoot = "lbf·ft/ft" -PoundForceInchPerFoot = "lbf·in/ft" -TonneForceCentimeterPerMeter = "tf·cm/m" -TonneForceMeterPerMeter = "tf·m/m" -TonneForceMillimeterPerMeter = "tf·mm/m" +KilogramForceCentimeterPerMeter=kgf·cm/m +KilogramForceMeterPerMeter=kgf·m/m +KilogramForceMillimeterPerMeter=kgf·mm/m +KilonewtonCentimeterPerMeter=kN·cm/m +KilonewtonMeterPerMeter=kN·m/m +KilonewtonMillimeterPerMeter=kN·mm/m +KilopoundForceFootPerFoot=kipf·ft/ft +KilopoundForceInchPerFoot=kipf·in/ft +MeganewtonCentimeterPerMeter=MN·cm/m +MeganewtonMeterPerMeter=MN·m/m +MeganewtonMillimeterPerMeter=MN·mm/m +MegapoundForceFootPerFoot=Mlbf·ft/ft +MegapoundForceInchPerFoot=Mlbf·in/ft +NewtonCentimeterPerMeter=N·cm/m +NewtonMeterPerMeter=N·m/m +NewtonMillimeterPerMeter=N·mm/m +PoundForceFootPerFoot=lbf·ft/ft +PoundForceInchPerFoot=lbf·in/ft +TonneForceCentimeterPerMeter=tf·cm/m +TonneForceMeterPerMeter=tf·m/m +TonneForceMillimeterPerMeter=tf·mm/m diff --git a/UnitsNet/GeneratedCode/Resources/TorquePerLength.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/TorquePerLength.ru-RU.restext index 868a40f2bf..3593222c87 100644 --- a/UnitsNet/GeneratedCode/Resources/TorquePerLength.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/TorquePerLength.ru-RU.restext @@ -1,3 +1,3 @@ -KilonewtonMeterPerMeter = "кН·м/м" -MeganewtonMeterPerMeter = "МН·м/м" -NewtonMeterPerMeter = "Н·м/м" +KilonewtonMeterPerMeter=кН·м/м +MeganewtonMeterPerMeter=МН·м/м +NewtonMeterPerMeter=Н·м/м diff --git a/UnitsNet/GeneratedCode/Resources/Turbidity.restext b/UnitsNet/GeneratedCode/Resources/Turbidity.restext index 2f7b5fdcd1..525d967754 100644 --- a/UnitsNet/GeneratedCode/Resources/Turbidity.restext +++ b/UnitsNet/GeneratedCode/Resources/Turbidity.restext @@ -1 +1 @@ -NTU = "NTU" +NTU=NTU diff --git a/UnitsNet/GeneratedCode/Resources/VitaminA.restext b/UnitsNet/GeneratedCode/Resources/VitaminA.restext index 70d99491fb..5e00d27ae2 100644 --- a/UnitsNet/GeneratedCode/Resources/VitaminA.restext +++ b/UnitsNet/GeneratedCode/Resources/VitaminA.restext @@ -1 +1 @@ -InternationalUnit = "IU" +InternationalUnit=IU diff --git a/UnitsNet/GeneratedCode/Resources/Volume.fr-CA.restext b/UnitsNet/GeneratedCode/Resources/Volume.fr-CA.restext index a6fc899ea2..e7a9899a71 100644 --- a/UnitsNet/GeneratedCode/Resources/Volume.fr-CA.restext +++ b/UnitsNet/GeneratedCode/Resources/Volume.fr-CA.restext @@ -1 +1 @@ -BoardFoot = "pmp","pied-planche","pied de planche" +BoardFoot=pmp,pied-planche,pied de planche diff --git a/UnitsNet/GeneratedCode/Resources/Volume.restext b/UnitsNet/GeneratedCode/Resources/Volume.restext index 510192b68a..ad06f539a6 100644 --- a/UnitsNet/GeneratedCode/Resources/Volume.restext +++ b/UnitsNet/GeneratedCode/Resources/Volume.restext @@ -1,46 +1,46 @@ -AcreFoot = "ac-ft","acre-foot","acre-feet" -BoardFoot = "bf","board foot","board feet" -Centiliter = "cl" -CubicCentimeter = "cm³" -CubicDecimeter = "dm³" -CubicFoot = "ft³" -CubicHectometer = "hm³" -CubicInch = "in³" -CubicKilometer = "km³" -CubicMeter = "m³" -CubicMicrometer = "µm³" -CubicMile = "mi³" -CubicMillimeter = "mm³" -CubicYard = "yd³" -Decaliter = "dal" -DecausGallon = "dagal (U.S.)" -Deciliter = "dl" -DeciusGallon = "dgal (U.S.)" -HectocubicFoot = "hft³" -HectocubicMeter = "hm³" -Hectoliter = "hl" -HectousGallon = "hgal (U.S.)" -ImperialBeerBarrel = "bl (imp.)" -ImperialGallon = "gal (imp.)" -ImperialOunce = "oz (imp.)" -ImperialPint = "pt (imp.)","UK pt","pt","p" -KilocubicFoot = "kft³" -KilocubicMeter = "km³" -KiloimperialGallon = "kgal (imp.)" -Kiloliter = "kl" -KilousGallon = "kgal (U.S.)" -Liter = "l" -MegacubicFoot = "Mft³" -MegaimperialGallon = "Mgal (imp.)" -Megaliter = "Ml" -MegausGallon = "Mgal (U.S.)" -MetricTeaspoon = "tsp","t","ts","tspn","t.","ts.","tsp.","tspn.","teaspoon" -Microliter = "µl" -Milliliter = "ml" -Nanoliter = "nl" -OilBarrel = "bbl" -UsBeerBarrel = "bl (U.S.)" -UsGallon = "gal (U.S.)" -UsOunce = "oz (U.S.)" -UsPint = "pt (U.S.)" -UsQuart = "qt (U.S.)" +AcreFoot=ac-ft,acre-foot,acre-feet +BoardFoot=bf,board foot,board feet +Centiliter=cl +CubicCentimeter=cm³ +CubicDecimeter=dm³ +CubicFoot=ft³ +CubicHectometer=hm³ +CubicInch=in³ +CubicKilometer=km³ +CubicMeter=m³ +CubicMicrometer=µm³ +CubicMile=mi³ +CubicMillimeter=mm³ +CubicYard=yd³ +Decaliter=dal +DecausGallon=dagal (U.S.) +Deciliter=dl +DeciusGallon=dgal (U.S.) +HectocubicFoot=hft³ +HectocubicMeter=hm³ +Hectoliter=hl +HectousGallon=hgal (U.S.) +ImperialBeerBarrel=bl (imp.) +ImperialGallon=gal (imp.) +ImperialOunce=oz (imp.) +ImperialPint=pt (imp.),UK pt,pt,p +KilocubicFoot=kft³ +KilocubicMeter=km³ +KiloimperialGallon=kgal (imp.) +Kiloliter=kl +KilousGallon=kgal (U.S.) +Liter=l +MegacubicFoot=Mft³ +MegaimperialGallon=Mgal (imp.) +Megaliter=Ml +MegausGallon=Mgal (U.S.) +MetricTeaspoon=tsp,t,ts,tspn,t.,ts.,tsp.,tspn.,teaspoon +Microliter=µl +Milliliter=ml +Nanoliter=nl +OilBarrel=bbl +UsBeerBarrel=bl (U.S.) +UsGallon=gal (U.S.) +UsOunce=oz (U.S.) +UsPint=pt (U.S.) +UsQuart=qt (U.S.) diff --git a/UnitsNet/GeneratedCode/Resources/Volume.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Volume.ru-RU.restext index b5908cf856..d75ce3377b 100644 --- a/UnitsNet/GeneratedCode/Resources/Volume.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Volume.ru-RU.restext @@ -1,37 +1,37 @@ -Centiliter = "сл" -CubicCentimeter = "см³" -CubicDecimeter = "дм³" -CubicFoot = "фут³" -CubicHectometer = "гм³" -CubicInch = "дюйм³" -CubicKilometer = "км³" -CubicMeter = "м³" -CubicMicrometer = "мкм³" -CubicMile = "миля³" -CubicMillimeter = "мм³" -CubicYard = "ярд³" -Decaliter = "дал" -DecausGallon = "даАмериканский галлон" -Deciliter = "дл" -DeciusGallon = "дАмериканский галлон" -HectocubicFoot = "гфут³" -HectocubicMeter = "гм³" -Hectoliter = "гл" -HectousGallon = "гАмериканский галлон" -ImperialGallon = "Английский галлон" -ImperialOunce = "Английская унция" -KilocubicFoot = "кфут³" -KilocubicMeter = "км³" -KiloimperialGallon = "кАнглийский галлон" -Kiloliter = "кл" -KilousGallon = "кАмериканский галлон" -Liter = "л" -MegacubicFoot = "Мфут³" -MegaimperialGallon = "МАнглийский галлон" -Megaliter = "Мл" -MegausGallon = "МАмериканский галлон" -Microliter = "мкл" -Milliliter = "мл" -Nanoliter = "нл" -UsGallon = "Американский галлон" -UsOunce = "Американская унция" +Centiliter=сл +CubicCentimeter=см³ +CubicDecimeter=дм³ +CubicFoot=фут³ +CubicHectometer=гм³ +CubicInch=дюйм³ +CubicKilometer=км³ +CubicMeter=м³ +CubicMicrometer=мкм³ +CubicMile=миля³ +CubicMillimeter=мм³ +CubicYard=ярд³ +Decaliter=дал +DecausGallon=даАмериканский галлон +Deciliter=дл +DeciusGallon=дАмериканский галлон +HectocubicFoot=гфут³ +HectocubicMeter=гм³ +Hectoliter=гл +HectousGallon=гАмериканский галлон +ImperialGallon=Английский галлон +ImperialOunce=Английская унция +KilocubicFoot=кфут³ +KilocubicMeter=км³ +KiloimperialGallon=кАнглийский галлон +Kiloliter=кл +KilousGallon=кАмериканский галлон +Liter=л +MegacubicFoot=Мфут³ +MegaimperialGallon=МАнглийский галлон +Megaliter=Мл +MegausGallon=МАмериканский галлон +Microliter=мкл +Milliliter=мл +Nanoliter=нл +UsGallon=Американский галлон +UsOunce=Американская унция diff --git a/UnitsNet/GeneratedCode/Resources/VolumeConcentration.restext b/UnitsNet/GeneratedCode/Resources/VolumeConcentration.restext index bda5257c30..2a7f2500dd 100644 --- a/UnitsNet/GeneratedCode/Resources/VolumeConcentration.restext +++ b/UnitsNet/GeneratedCode/Resources/VolumeConcentration.restext @@ -1,20 +1,20 @@ -CentilitersPerLiter = "cL/L" -CentilitersPerMililiter = "cL/mL" -DecilitersPerLiter = "dL/L" -DecilitersPerMililiter = "dL/mL" -DecimalFraction = "" -LitersPerLiter = "L/L" -LitersPerMililiter = "L/mL" -MicrolitersPerLiter = "µL/L" -MicrolitersPerMililiter = "µL/mL" -MillilitersPerLiter = "mL/L" -MillilitersPerMililiter = "mL/mL" -NanolitersPerLiter = "nL/L" -NanolitersPerMililiter = "nL/mL" -PartPerBillion = "ppb" -PartPerMillion = "ppm" -PartPerThousand = "‰" -PartPerTrillion = "ppt" -Percent = "%","% (v/v)" -PicolitersPerLiter = "pL/L" -PicolitersPerMililiter = "pL/mL" +CentilitersPerLiter=cL/L +CentilitersPerMililiter=cL/mL +DecilitersPerLiter=dL/L +DecilitersPerMililiter=dL/mL +DecimalFraction= +LitersPerLiter=L/L +LitersPerMililiter=L/mL +MicrolitersPerLiter=µL/L +MicrolitersPerMililiter=µL/mL +MillilitersPerLiter=mL/L +MillilitersPerMililiter=mL/mL +NanolitersPerLiter=nL/L +NanolitersPerMililiter=nL/mL +PartPerBillion=ppb +PartPerMillion=ppm +PartPerThousand=‰ +PartPerTrillion=ppt +Percent=%,% (v/v) +PicolitersPerLiter=pL/L +PicolitersPerMililiter=pL/mL diff --git a/UnitsNet/GeneratedCode/Resources/VolumeFlow.restext b/UnitsNet/GeneratedCode/Resources/VolumeFlow.restext index 7ecf42fd0b..5a2f6c65c0 100644 --- a/UnitsNet/GeneratedCode/Resources/VolumeFlow.restext +++ b/UnitsNet/GeneratedCode/Resources/VolumeFlow.restext @@ -1,62 +1,62 @@ -AcreFootPerDay = "af/d" -AcreFootPerHour = "af/h" -AcreFootPerMinute = "af/m" -AcreFootPerSecond = "af/s" -CentiliterPerDay = "cl/day","cL/d","cLPD" -CentiliterPerHour = "cL/h","cLPH" -CentiliterPerMinute = "cL/min","cLPM" -CentiliterPerSecond = "cL/s","cLPS" -CubicCentimeterPerMinute = "cm³/min" -CubicDecimeterPerMinute = "dm³/min" -CubicFootPerHour = "ft³/h","cf/hr" -CubicFootPerMinute = "ft³/min","CFM" -CubicFootPerSecond = "ft³/s" -CubicMeterPerDay = "m³/d" -CubicMeterPerHour = "m³/h" -CubicMeterPerMinute = "m³/min" -CubicMeterPerSecond = "m³/s" -CubicMillimeterPerSecond = "mm³/s" -CubicYardPerDay = "cy/day" -CubicYardPerHour = "yd³/h" -CubicYardPerMinute = "yd³/min" -CubicYardPerSecond = "yd³/s" -DeciliterPerDay = "dl/day","dL/d","dLPD" -DeciliterPerHour = "dL/h","dLPH" -DeciliterPerMinute = "dL/min","dLPM" -DeciliterPerSecond = "dL/s","dLPS" -KiloliterPerDay = "kl/day","kL/d","kLPD" -KiloliterPerHour = "kL/h","kLPH" -KiloliterPerMinute = "kL/min","kLPM" -KiloliterPerSecond = "kL/s","kLPS" -KilousGallonPerMinute = "kgal (U.S.)/min","KGPM" -LiterPerDay = "l/day","L/d","LPD" -LiterPerHour = "L/h","LPH" -LiterPerMinute = "L/min","LPM" -LiterPerSecond = "L/s","LPS" -MegaliterPerDay = "Ml/day","ML/d","MLPD" -MegaukGallonPerSecond = "Mgal (imp.)/s" -MicroliterPerDay = "µl/day","µL/d","µLPD" -MicroliterPerHour = "µL/h","µLPH" -MicroliterPerMinute = "µL/min","µLPM" -MicroliterPerSecond = "µL/s","µLPS" -MilliliterPerDay = "ml/day","mL/d","mLPD" -MilliliterPerHour = "mL/h","mLPH" -MilliliterPerMinute = "mL/min","mLPM" -MilliliterPerSecond = "mL/s","mLPS" -MillionUsGallonPerDay = "MGD" -NanoliterPerDay = "nl/day","nL/d","nLPD" -NanoliterPerHour = "nL/h","nLPH" -NanoliterPerMinute = "nL/min","nLPM" -NanoliterPerSecond = "nL/s","nLPS" -OilBarrelPerDay = "bbl/d","BOPD" -OilBarrelPerHour = "bbl/hr","bph" -OilBarrelPerMinute = "bbl/min","bpm" -OilBarrelPerSecond = "bbl/s" -UkGallonPerDay = "gal (U. K.)/d" -UkGallonPerHour = "gal (imp.)/h" -UkGallonPerMinute = "gal (imp.)/min" -UkGallonPerSecond = "gal (imp.)/s" -UsGallonPerDay = "gpd","gal/d" -UsGallonPerHour = "gal (U.S.)/h" -UsGallonPerMinute = "gal (U.S.)/min","GPM" -UsGallonPerSecond = "gal (U.S.)/s" +AcreFootPerDay=af/d +AcreFootPerHour=af/h +AcreFootPerMinute=af/m +AcreFootPerSecond=af/s +CentiliterPerDay=cl/day,cL/d,cLPD +CentiliterPerHour=cL/h,cLPH +CentiliterPerMinute=cL/min,cLPM +CentiliterPerSecond=cL/s,cLPS +CubicCentimeterPerMinute=cm³/min +CubicDecimeterPerMinute=dm³/min +CubicFootPerHour=ft³/h,cf/hr +CubicFootPerMinute=ft³/min,CFM +CubicFootPerSecond=ft³/s +CubicMeterPerDay=m³/d +CubicMeterPerHour=m³/h +CubicMeterPerMinute=m³/min +CubicMeterPerSecond=m³/s +CubicMillimeterPerSecond=mm³/s +CubicYardPerDay=cy/day +CubicYardPerHour=yd³/h +CubicYardPerMinute=yd³/min +CubicYardPerSecond=yd³/s +DeciliterPerDay=dl/day,dL/d,dLPD +DeciliterPerHour=dL/h,dLPH +DeciliterPerMinute=dL/min,dLPM +DeciliterPerSecond=dL/s,dLPS +KiloliterPerDay=kl/day,kL/d,kLPD +KiloliterPerHour=kL/h,kLPH +KiloliterPerMinute=kL/min,kLPM +KiloliterPerSecond=kL/s,kLPS +KilousGallonPerMinute=kgal (U.S.)/min,KGPM +LiterPerDay=l/day,L/d,LPD +LiterPerHour=L/h,LPH +LiterPerMinute=L/min,LPM +LiterPerSecond=L/s,LPS +MegaliterPerDay=Ml/day,ML/d,MLPD +MegaukGallonPerSecond=Mgal (imp.)/s +MicroliterPerDay=µl/day,µL/d,µLPD +MicroliterPerHour=µL/h,µLPH +MicroliterPerMinute=µL/min,µLPM +MicroliterPerSecond=µL/s,µLPS +MilliliterPerDay=ml/day,mL/d,mLPD +MilliliterPerHour=mL/h,mLPH +MilliliterPerMinute=mL/min,mLPM +MilliliterPerSecond=mL/s,mLPS +MillionUsGallonPerDay=MGD +NanoliterPerDay=nl/day,nL/d,nLPD +NanoliterPerHour=nL/h,nLPH +NanoliterPerMinute=nL/min,nLPM +NanoliterPerSecond=nL/s,nLPS +OilBarrelPerDay=bbl/d,BOPD +OilBarrelPerHour=bbl/hr,bph +OilBarrelPerMinute=bbl/min,bpm +OilBarrelPerSecond=bbl/s +UkGallonPerDay=gal (U. K.)/d +UkGallonPerHour=gal (imp.)/h +UkGallonPerMinute=gal (imp.)/min +UkGallonPerSecond=gal (imp.)/s +UsGallonPerDay=gpd,gal/d +UsGallonPerHour=gal (U.S.)/h +UsGallonPerMinute=gal (U.S.)/min,GPM +UsGallonPerSecond=gal (U.S.)/s diff --git a/UnitsNet/GeneratedCode/Resources/VolumeFlow.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/VolumeFlow.ru-RU.restext index 349a9216e7..256c4b4e05 100644 --- a/UnitsNet/GeneratedCode/Resources/VolumeFlow.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/VolumeFlow.ru-RU.restext @@ -1,27 +1,27 @@ -CentiliterPerHour = "сл/ч" -CentiliterPerMinute = "сл/мин" -CentiliterPerSecond = "сл/c" -CubicCentimeterPerMinute = "см³/мин" -CubicDecimeterPerMinute = "дм³/мин" -CubicMeterPerHour = "м³/ч" -CubicMeterPerMinute = "м³/мин" -CubicMeterPerSecond = "м³/с" -CubicMillimeterPerSecond = "мм³/с" -DeciliterPerHour = "дл/ч" -DeciliterPerMinute = "дл/мин" -DeciliterPerSecond = "дл/c" -KiloliterPerHour = "кл/ч" -KiloliterPerMinute = "кл/мин" -KiloliterPerSecond = "кл/c" -LiterPerHour = "л/ч" -LiterPerMinute = "л/мин" -LiterPerSecond = "л/c" -MicroliterPerHour = "мкл/ч" -MicroliterPerMinute = "мкл/мин" -MicroliterPerSecond = "мкл/c" -MilliliterPerHour = "мл/ч" -MilliliterPerMinute = "мл/мин" -MilliliterPerSecond = "мл/c" -NanoliterPerHour = "нл/ч" -NanoliterPerMinute = "нл/мин" -NanoliterPerSecond = "нл/c" +CentiliterPerHour=сл/ч +CentiliterPerMinute=сл/мин +CentiliterPerSecond=сл/c +CubicCentimeterPerMinute=см³/мин +CubicDecimeterPerMinute=дм³/мин +CubicMeterPerHour=м³/ч +CubicMeterPerMinute=м³/мин +CubicMeterPerSecond=м³/с +CubicMillimeterPerSecond=мм³/с +DeciliterPerHour=дл/ч +DeciliterPerMinute=дл/мин +DeciliterPerSecond=дл/c +KiloliterPerHour=кл/ч +KiloliterPerMinute=кл/мин +KiloliterPerSecond=кл/c +LiterPerHour=л/ч +LiterPerMinute=л/мин +LiterPerSecond=л/c +MicroliterPerHour=мкл/ч +MicroliterPerMinute=мкл/мин +MicroliterPerSecond=мкл/c +MilliliterPerHour=мл/ч +MilliliterPerMinute=мл/мин +MilliliterPerSecond=мл/c +NanoliterPerHour=нл/ч +NanoliterPerMinute=нл/мин +NanoliterPerSecond=нл/c diff --git a/UnitsNet/GeneratedCode/Resources/VolumeFlowPerArea.restext b/UnitsNet/GeneratedCode/Resources/VolumeFlowPerArea.restext index db0ae95527..fee7f480c6 100644 --- a/UnitsNet/GeneratedCode/Resources/VolumeFlowPerArea.restext +++ b/UnitsNet/GeneratedCode/Resources/VolumeFlowPerArea.restext @@ -1,2 +1,2 @@ -CubicFootPerMinutePerSquareFoot = "CFM/ft²" -CubicMeterPerSecondPerSquareMeter = "m³/(s·m²)" +CubicFootPerMinutePerSquareFoot=CFM/ft² +CubicMeterPerSecondPerSquareMeter=m³/(s·m²) diff --git a/UnitsNet/GeneratedCode/Resources/VolumePerLength.restext b/UnitsNet/GeneratedCode/Resources/VolumePerLength.restext index a9139ecc52..2c94e88c19 100644 --- a/UnitsNet/GeneratedCode/Resources/VolumePerLength.restext +++ b/UnitsNet/GeneratedCode/Resources/VolumePerLength.restext @@ -1,7 +1,7 @@ -CubicMeterPerMeter = "m³/m" -CubicYardPerFoot = "yd³/ft" -CubicYardPerUsSurveyFoot = "yd³/ftUS" -LiterPerKilometer = "l/km" -LiterPerMeter = "l/m" -LiterPerMillimeter = "l/mm" -OilBarrelPerFoot = "bbl/ft" +CubicMeterPerMeter=m³/m +CubicYardPerFoot=yd³/ft +CubicYardPerUsSurveyFoot=yd³/ftUS +LiterPerKilometer=l/km +LiterPerMeter=l/m +LiterPerMillimeter=l/mm +OilBarrelPerFoot=bbl/ft diff --git a/UnitsNet/GeneratedCode/Resources/VolumetricHeatCapacity.restext b/UnitsNet/GeneratedCode/Resources/VolumetricHeatCapacity.restext index dbd65e5d35..dcb9dc8559 100644 --- a/UnitsNet/GeneratedCode/Resources/VolumetricHeatCapacity.restext +++ b/UnitsNet/GeneratedCode/Resources/VolumetricHeatCapacity.restext @@ -1,9 +1,9 @@ -BtuPerCubicFootDegreeFahrenheit = "BTU/ft³·°F" -CaloriePerCubicCentimeterDegreeCelsius = "cal/cm³·°C" -JoulePerCubicMeterDegreeCelsius = "J/m³·°C" -JoulePerCubicMeterKelvin = "J/m³·K" -KilocaloriePerCubicCentimeterDegreeCelsius = "kcal/cm³·°C" -KilojoulePerCubicMeterDegreeCelsius = "kJ/m³·°C" -KilojoulePerCubicMeterKelvin = "kJ/m³·K" -MegajoulePerCubicMeterDegreeCelsius = "MJ/m³·°C" -MegajoulePerCubicMeterKelvin = "MJ/m³·K" +BtuPerCubicFootDegreeFahrenheit=BTU/ft³·°F +CaloriePerCubicCentimeterDegreeCelsius=cal/cm³·°C +JoulePerCubicMeterDegreeCelsius=J/m³·°C +JoulePerCubicMeterKelvin=J/m³·K +KilocaloriePerCubicCentimeterDegreeCelsius=kcal/cm³·°C +KilojoulePerCubicMeterDegreeCelsius=kJ/m³·°C +KilojoulePerCubicMeterKelvin=kJ/m³·K +MegajoulePerCubicMeterDegreeCelsius=MJ/m³·°C +MegajoulePerCubicMeterKelvin=MJ/m³·K diff --git a/UnitsNet/GeneratedCode/Resources/WarpingMomentOfInertia.restext b/UnitsNet/GeneratedCode/Resources/WarpingMomentOfInertia.restext index 326731dfaa..a83ca073f8 100644 --- a/UnitsNet/GeneratedCode/Resources/WarpingMomentOfInertia.restext +++ b/UnitsNet/GeneratedCode/Resources/WarpingMomentOfInertia.restext @@ -1,6 +1,6 @@ -CentimeterToTheSixth = "cm⁶","cm^6" -DecimeterToTheSixth = "dm⁶","dm^6" -FootToTheSixth = "ft⁶","ft^6" -InchToTheSixth = "in⁶","in^6" -MeterToTheSixth = "m⁶","m^6" -MillimeterToTheSixth = "mm⁶","mm^6" +CentimeterToTheSixth=cm⁶,cm^6 +DecimeterToTheSixth=dm⁶,dm^6 +FootToTheSixth=ft⁶,ft^6 +InchToTheSixth=in⁶,in^6 +MeterToTheSixth=m⁶,m^6 +MillimeterToTheSixth=mm⁶,mm^6 From 7289df260f18b9870a463469a06b56d672437208 Mon Sep 17 00:00:00 2001 From: Tristan Milnthorp Date: Tue, 21 Feb 2023 17:11:26 -0500 Subject: [PATCH 12/26] Rerotue methods --- .../UnitsNetGen/QuantityGenerator.cs | 45 +++++++++---------- .../CustomCode/Quantities/Length.extra.cs | 4 +- UnitsNet/CustomCode/Quantities/Mass.extra.cs | 4 +- .../Quantities/Acceleration.g.cs | 45 +++++++++---------- .../Quantities/AmountOfSubstance.g.cs | 45 +++++++++---------- .../Quantities/AmplitudeRatio.g.cs | 45 +++++++++---------- UnitsNet/GeneratedCode/Quantities/Angle.g.cs | 45 +++++++++---------- .../Quantities/ApparentEnergy.g.cs | 45 +++++++++---------- .../Quantities/ApparentPower.g.cs | 45 +++++++++---------- UnitsNet/GeneratedCode/Quantities/Area.g.cs | 45 +++++++++---------- .../GeneratedCode/Quantities/AreaDensity.g.cs | 45 +++++++++---------- .../Quantities/AreaMomentOfInertia.g.cs | 45 +++++++++---------- .../GeneratedCode/Quantities/BitRate.g.cs | 45 +++++++++---------- .../BrakeSpecificFuelConsumption.g.cs | 45 +++++++++---------- .../GeneratedCode/Quantities/Capacitance.g.cs | 45 +++++++++---------- .../CoefficientOfThermalExpansion.g.cs | 45 +++++++++---------- .../Quantities/Compressibility.g.cs | 45 +++++++++---------- .../GeneratedCode/Quantities/Density.g.cs | 45 +++++++++---------- .../GeneratedCode/Quantities/Duration.g.cs | 45 +++++++++---------- .../Quantities/DynamicViscosity.g.cs | 45 +++++++++---------- .../Quantities/ElectricAdmittance.g.cs | 45 +++++++++---------- .../Quantities/ElectricCharge.g.cs | 45 +++++++++---------- .../Quantities/ElectricChargeDensity.g.cs | 45 +++++++++---------- .../Quantities/ElectricConductance.g.cs | 45 +++++++++---------- .../Quantities/ElectricConductivity.g.cs | 45 +++++++++---------- .../Quantities/ElectricCurrent.g.cs | 45 +++++++++---------- .../Quantities/ElectricCurrentDensity.g.cs | 45 +++++++++---------- .../Quantities/ElectricCurrentGradient.g.cs | 45 +++++++++---------- .../Quantities/ElectricField.g.cs | 45 +++++++++---------- .../Quantities/ElectricInductance.g.cs | 45 +++++++++---------- .../Quantities/ElectricPotential.g.cs | 45 +++++++++---------- .../Quantities/ElectricPotentialAc.g.cs | 45 +++++++++---------- .../ElectricPotentialChangeRate.g.cs | 45 +++++++++---------- .../Quantities/ElectricPotentialDc.g.cs | 45 +++++++++---------- .../Quantities/ElectricResistance.g.cs | 45 +++++++++---------- .../Quantities/ElectricResistivity.g.cs | 45 +++++++++---------- .../ElectricSurfaceChargeDensity.g.cs | 45 +++++++++---------- UnitsNet/GeneratedCode/Quantities/Energy.g.cs | 45 +++++++++---------- .../Quantities/EnergyDensity.g.cs | 45 +++++++++---------- .../GeneratedCode/Quantities/Entropy.g.cs | 45 +++++++++---------- UnitsNet/GeneratedCode/Quantities/Force.g.cs | 45 +++++++++---------- .../Quantities/ForceChangeRate.g.cs | 45 +++++++++---------- .../Quantities/ForcePerLength.g.cs | 45 +++++++++---------- .../GeneratedCode/Quantities/Frequency.g.cs | 45 +++++++++---------- .../Quantities/FuelEfficiency.g.cs | 45 +++++++++---------- .../GeneratedCode/Quantities/HeatFlux.g.cs | 45 +++++++++---------- .../Quantities/HeatTransferCoefficient.g.cs | 45 +++++++++---------- .../GeneratedCode/Quantities/Illuminance.g.cs | 45 +++++++++---------- .../GeneratedCode/Quantities/Impulse.g.cs | 45 +++++++++---------- .../GeneratedCode/Quantities/Information.g.cs | 45 +++++++++---------- .../GeneratedCode/Quantities/Irradiance.g.cs | 45 +++++++++---------- .../GeneratedCode/Quantities/Irradiation.g.cs | 45 +++++++++---------- UnitsNet/GeneratedCode/Quantities/Jerk.g.cs | 45 +++++++++---------- .../Quantities/KinematicViscosity.g.cs | 45 +++++++++---------- UnitsNet/GeneratedCode/Quantities/Length.g.cs | 45 +++++++++---------- UnitsNet/GeneratedCode/Quantities/Level.g.cs | 45 +++++++++---------- .../Quantities/LinearDensity.g.cs | 45 +++++++++---------- .../Quantities/LinearPowerDensity.g.cs | 45 +++++++++---------- .../GeneratedCode/Quantities/Luminance.g.cs | 45 +++++++++---------- .../GeneratedCode/Quantities/Luminosity.g.cs | 45 +++++++++---------- .../Quantities/LuminousFlux.g.cs | 45 +++++++++---------- .../Quantities/LuminousIntensity.g.cs | 45 +++++++++---------- .../Quantities/MagneticField.g.cs | 45 +++++++++---------- .../Quantities/MagneticFlux.g.cs | 45 +++++++++---------- .../Quantities/Magnetization.g.cs | 45 +++++++++---------- UnitsNet/GeneratedCode/Quantities/Mass.g.cs | 45 +++++++++---------- .../Quantities/MassConcentration.g.cs | 45 +++++++++---------- .../GeneratedCode/Quantities/MassFlow.g.cs | 45 +++++++++---------- .../GeneratedCode/Quantities/MassFlux.g.cs | 45 +++++++++---------- .../Quantities/MassFraction.g.cs | 45 +++++++++---------- .../Quantities/MassMomentOfInertia.g.cs | 45 +++++++++---------- .../GeneratedCode/Quantities/MolarEnergy.g.cs | 45 +++++++++---------- .../Quantities/MolarEntropy.g.cs | 45 +++++++++---------- .../GeneratedCode/Quantities/MolarFlow.g.cs | 45 +++++++++---------- .../GeneratedCode/Quantities/MolarMass.g.cs | 45 +++++++++---------- .../GeneratedCode/Quantities/Molarity.g.cs | 45 +++++++++---------- .../Quantities/Permeability.g.cs | 45 +++++++++---------- .../Quantities/Permittivity.g.cs | 45 +++++++++---------- .../Quantities/PorousMediumPermeability.g.cs | 45 +++++++++---------- UnitsNet/GeneratedCode/Quantities/Power.g.cs | 45 +++++++++---------- .../Quantities/PowerDensity.g.cs | 45 +++++++++---------- .../GeneratedCode/Quantities/PowerRatio.g.cs | 45 +++++++++---------- .../GeneratedCode/Quantities/Pressure.g.cs | 45 +++++++++---------- .../Quantities/PressureChangeRate.g.cs | 45 +++++++++---------- UnitsNet/GeneratedCode/Quantities/Ratio.g.cs | 45 +++++++++---------- .../Quantities/RatioChangeRate.g.cs | 45 +++++++++---------- .../Quantities/ReactiveEnergy.g.cs | 45 +++++++++---------- .../Quantities/ReactivePower.g.cs | 45 +++++++++---------- .../Quantities/ReciprocalArea.g.cs | 45 +++++++++---------- .../Quantities/ReciprocalLength.g.cs | 45 +++++++++---------- .../Quantities/RelativeHumidity.g.cs | 45 +++++++++---------- .../Quantities/RotationalAcceleration.g.cs | 45 +++++++++---------- .../Quantities/RotationalSpeed.g.cs | 45 +++++++++---------- .../Quantities/RotationalStiffness.g.cs | 45 +++++++++---------- .../RotationalStiffnessPerLength.g.cs | 45 +++++++++---------- UnitsNet/GeneratedCode/Quantities/Scalar.g.cs | 45 +++++++++---------- .../GeneratedCode/Quantities/SolidAngle.g.cs | 45 +++++++++---------- .../Quantities/SpecificEnergy.g.cs | 45 +++++++++---------- .../Quantities/SpecificEntropy.g.cs | 45 +++++++++---------- .../Quantities/SpecificFuelConsumption.g.cs | 45 +++++++++---------- .../Quantities/SpecificVolume.g.cs | 45 +++++++++---------- .../Quantities/SpecificWeight.g.cs | 45 +++++++++---------- UnitsNet/GeneratedCode/Quantities/Speed.g.cs | 45 +++++++++---------- .../Quantities/StandardVolumeFlow.g.cs | 45 +++++++++---------- .../GeneratedCode/Quantities/Temperature.g.cs | 45 +++++++++---------- .../Quantities/TemperatureChangeRate.g.cs | 45 +++++++++---------- .../Quantities/TemperatureDelta.g.cs | 45 +++++++++---------- .../Quantities/TemperatureGradient.g.cs | 45 +++++++++---------- .../Quantities/ThermalConductivity.g.cs | 45 +++++++++---------- .../Quantities/ThermalResistance.g.cs | 45 +++++++++---------- UnitsNet/GeneratedCode/Quantities/Torque.g.cs | 45 +++++++++---------- .../Quantities/TorquePerLength.g.cs | 45 +++++++++---------- .../GeneratedCode/Quantities/Turbidity.g.cs | 45 +++++++++---------- .../GeneratedCode/Quantities/VitaminA.g.cs | 45 +++++++++---------- UnitsNet/GeneratedCode/Quantities/Volume.g.cs | 45 +++++++++---------- .../Quantities/VolumeConcentration.g.cs | 45 +++++++++---------- .../GeneratedCode/Quantities/VolumeFlow.g.cs | 45 +++++++++---------- .../Quantities/VolumeFlowPerArea.g.cs | 45 +++++++++---------- .../Quantities/VolumePerLength.g.cs | 45 +++++++++---------- .../Quantities/VolumetricHeatCapacity.g.cs | 45 +++++++++---------- .../Quantities/WarpingMomentOfInertia.g.cs | 45 +++++++++---------- 121 files changed, 2503 insertions(+), 2860 deletions(-) diff --git a/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs b/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs index 440e84c503..04c81550fa 100644 --- a/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs +++ b/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs @@ -388,10 +388,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation({_unitEnumName} unit) - {{ - return GetAbbreviation(unit, null); - }} + public static string GetAbbreviation({_unitEnumName} unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -401,7 +398,26 @@ public static string GetAbbreviation({_unitEnumName} unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation({_unitEnumName} unit, IFormatProvider? provider) {{ - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + }} + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations({_unitEnumName} unit, CultureInfo? culture = null) + {{ + const string resourceName = $""UnitsNet.GeneratedCode.Resources.{_quantity.Name}""; + var resourceManager = new ResourceManager(resourceName, typeof({_quantity.Name}).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); }} #endregion @@ -1100,25 +1116,6 @@ private void GenerateToString() /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations({_unitEnumName} unit, CultureInfo? culture = null) - {{ - const string resourceName = $""UnitsNet.GeneratedCode.Resources.{_quantity.Name}""; - var resourceManager = new ResourceManager(resourceName, typeof({_quantity.Name}).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - }} - #region ToString Methods /// diff --git a/UnitsNet/CustomCode/Quantities/Length.extra.cs b/UnitsNet/CustomCode/Quantities/Length.extra.cs index 5e161269a7..7c41035344 100644 --- a/UnitsNet/CustomCode/Quantities/Length.extra.cs +++ b/UnitsNet/CustomCode/Quantities/Length.extra.cs @@ -227,8 +227,8 @@ public string ToString(IFormatProvider? cultureInfo) { cultureInfo = cultureInfo ?? CultureInfo.CurrentCulture; - var footUnit = UnitAbbreviationsCache.Default.GetDefaultAbbreviation(LengthUnit.Foot, cultureInfo); - var inchUnit = UnitAbbreviationsCache.Default.GetDefaultAbbreviation(LengthUnit.Inch, cultureInfo); + var footUnit = Length.GetAbbreviation(LengthUnit.Foot, cultureInfo); + var inchUnit = Length.GetAbbreviation(LengthUnit.Inch, cultureInfo); // Note that it isn't customary to use fractions - one wouldn't say "I am 5 feet and 4.5 inches". // So inches are rounded when converting from base units to feet/inches. diff --git a/UnitsNet/CustomCode/Quantities/Mass.extra.cs b/UnitsNet/CustomCode/Quantities/Mass.extra.cs index 2db89dfd84..b4529d30ea 100644 --- a/UnitsNet/CustomCode/Quantities/Mass.extra.cs +++ b/UnitsNet/CustomCode/Quantities/Mass.extra.cs @@ -144,8 +144,8 @@ public string ToString(IFormatProvider? cultureInfo) { cultureInfo = cultureInfo ?? CultureInfo.CurrentCulture; - var stoneUnit = UnitAbbreviationsCache.Default.GetDefaultAbbreviation(MassUnit.Stone, cultureInfo); - var poundUnit = UnitAbbreviationsCache.Default.GetDefaultAbbreviation(MassUnit.Pound, cultureInfo); + var stoneUnit = Mass.GetAbbreviation(MassUnit.Stone, cultureInfo); + var poundUnit = Mass.GetAbbreviation(MassUnit.Pound, cultureInfo); // Note that it isn't customary to use fractions - one wouldn't say "I am 11 stone and 4.5 pounds". // So pounds are rounded here. diff --git a/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs b/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs index cc1af02da0..04258ac9ed 100644 --- a/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs @@ -328,10 +328,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(AccelerationUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(AccelerationUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -341,7 +338,26 @@ public static string GetAbbreviation(AccelerationUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(AccelerationUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(AccelerationUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Acceleration"; + var resourceManager = new ResourceManager(resourceName, typeof(Acceleration).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -1034,25 +1050,6 @@ public Acceleration ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(AccelerationUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Acceleration"; - var resourceManager = new ResourceManager(resourceName, typeof(Acceleration).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs index ccfdf7daff..fbcc30bbdd 100644 --- a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs @@ -323,10 +323,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(AmountOfSubstanceUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(AmountOfSubstanceUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -336,7 +333,26 @@ public static string GetAbbreviation(AmountOfSubstanceUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(AmountOfSubstanceUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(AmountOfSubstanceUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.AmountOfSubstance"; + var resourceManager = new ResourceManager(resourceName, typeof(AmountOfSubstance).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -1041,25 +1057,6 @@ public AmountOfSubstance ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(AmountOfSubstanceUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.AmountOfSubstance"; - var resourceManager = new ResourceManager(resourceName, typeof(AmountOfSubstance).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs b/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs index d3ca555e6a..3d2bb30b12 100644 --- a/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs @@ -224,10 +224,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(AmplitudeRatioUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(AmplitudeRatioUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -237,7 +234,26 @@ public static string GetAbbreviation(AmplitudeRatioUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(AmplitudeRatioUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(AmplitudeRatioUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.AmplitudeRatio"; + var resourceManager = new ResourceManager(resourceName, typeof(AmplitudeRatio).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -818,25 +834,6 @@ public AmplitudeRatio ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(AmplitudeRatioUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.AmplitudeRatio"; - var resourceManager = new ResourceManager(resourceName, typeof(AmplitudeRatio).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Angle.g.cs b/UnitsNet/GeneratedCode/Quantities/Angle.g.cs index 841ecfc1f4..7a64f85dae 100644 --- a/UnitsNet/GeneratedCode/Quantities/Angle.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Angle.g.cs @@ -344,10 +344,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(AngleUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(AngleUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -357,7 +354,26 @@ public static string GetAbbreviation(AngleUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(AngleUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(AngleUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Angle"; + var resourceManager = new ResourceManager(resourceName, typeof(Angle).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -1074,25 +1090,6 @@ public Angle ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(AngleUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Angle"; - var resourceManager = new ResourceManager(resourceName, typeof(Angle).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs index 1282ef4e84..41c5594c34 100644 --- a/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs @@ -215,10 +215,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ApparentEnergyUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(ApparentEnergyUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -228,7 +225,26 @@ public static string GetAbbreviation(ApparentEnergyUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ApparentEnergyUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ApparentEnergyUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ApparentEnergy"; + var resourceManager = new ResourceManager(resourceName, typeof(ApparentEnergy).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -789,25 +805,6 @@ public ApparentEnergy ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(ApparentEnergyUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ApparentEnergy"; - var resourceManager = new ResourceManager(resourceName, typeof(ApparentEnergy).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs b/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs index 490833a891..ec86495f42 100644 --- a/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs @@ -242,10 +242,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ApparentPowerUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(ApparentPowerUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -255,7 +252,26 @@ public static string GetAbbreviation(ApparentPowerUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ApparentPowerUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ApparentPowerUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ApparentPower"; + var resourceManager = new ResourceManager(resourceName, typeof(ApparentPower).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -852,25 +868,6 @@ public ApparentPower ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(ApparentPowerUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ApparentPower"; - var resourceManager = new ResourceManager(resourceName, typeof(ApparentPower).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Area.g.cs b/UnitsNet/GeneratedCode/Quantities/Area.g.cs index 0e49c7d47a..3ce79eac9a 100644 --- a/UnitsNet/GeneratedCode/Quantities/Area.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Area.g.cs @@ -341,10 +341,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(AreaUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(AreaUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -354,7 +351,26 @@ public static string GetAbbreviation(AreaUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(AreaUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(AreaUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Area"; + var resourceManager = new ResourceManager(resourceName, typeof(Area).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -1047,25 +1063,6 @@ public Area ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(AreaUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Area"; - var resourceManager = new ResourceManager(resourceName, typeof(Area).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs index 918807fb48..100f6d68b0 100644 --- a/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs @@ -215,10 +215,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(AreaDensityUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(AreaDensityUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -228,7 +225,26 @@ public static string GetAbbreviation(AreaDensityUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(AreaDensityUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(AreaDensityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.AreaDensity"; + var resourceManager = new ResourceManager(resourceName, typeof(AreaDensity).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -789,25 +805,6 @@ public AreaDensity ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(AreaDensityUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.AreaDensity"; - var resourceManager = new ResourceManager(resourceName, typeof(AreaDensity).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs index 6d342f7c95..693fc42f18 100644 --- a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs @@ -242,10 +242,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(AreaMomentOfInertiaUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(AreaMomentOfInertiaUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -255,7 +252,26 @@ public static string GetAbbreviation(AreaMomentOfInertiaUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(AreaMomentOfInertiaUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(AreaMomentOfInertiaUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.AreaMomentOfInertia"; + var resourceManager = new ResourceManager(resourceName, typeof(AreaMomentOfInertia).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -852,25 +868,6 @@ public AreaMomentOfInertia ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(AreaMomentOfInertiaUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.AreaMomentOfInertia"; - var resourceManager = new ResourceManager(resourceName, typeof(AreaMomentOfInertia).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs b/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs index 2f4e54acce..92a03c3ca0 100644 --- a/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs @@ -428,10 +428,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(BitRateUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(BitRateUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -441,7 +438,26 @@ public static string GetAbbreviation(BitRateUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(BitRateUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(BitRateUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.BitRate"; + var resourceManager = new ResourceManager(resourceName, typeof(BitRate).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -1289,25 +1305,6 @@ public BitRate ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(BitRateUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.BitRate"; - var resourceManager = new ResourceManager(resourceName, typeof(BitRate).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs index 75d94f2a0e..24f5c91178 100644 --- a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs @@ -215,10 +215,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(BrakeSpecificFuelConsumptionUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(BrakeSpecificFuelConsumptionUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -228,7 +225,26 @@ public static string GetAbbreviation(BrakeSpecificFuelConsumptionUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(BrakeSpecificFuelConsumptionUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(BrakeSpecificFuelConsumptionUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.BrakeSpecificFuelConsumption"; + var resourceManager = new ResourceManager(resourceName, typeof(BrakeSpecificFuelConsumption).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -789,25 +805,6 @@ public BrakeSpecificFuelConsumption ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(BrakeSpecificFuelConsumptionUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.BrakeSpecificFuelConsumption"; - var resourceManager = new ResourceManager(resourceName, typeof(BrakeSpecificFuelConsumption).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs b/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs index e715000f15..d6212d05ab 100644 --- a/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs @@ -254,10 +254,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(CapacitanceUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(CapacitanceUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -267,7 +264,26 @@ public static string GetAbbreviation(CapacitanceUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(CapacitanceUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(CapacitanceUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Capacitance"; + var resourceManager = new ResourceManager(resourceName, typeof(Capacitance).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -876,25 +892,6 @@ public Capacitance ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(CapacitanceUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Capacitance"; - var resourceManager = new ResourceManager(resourceName, typeof(Capacitance).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs b/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs index 95723b984a..1c392dc231 100644 --- a/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs @@ -215,10 +215,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(CoefficientOfThermalExpansionUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(CoefficientOfThermalExpansionUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -228,7 +225,26 @@ public static string GetAbbreviation(CoefficientOfThermalExpansionUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(CoefficientOfThermalExpansionUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(CoefficientOfThermalExpansionUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.CoefficientOfThermalExpansion"; + var resourceManager = new ResourceManager(resourceName, typeof(CoefficientOfThermalExpansion).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -789,25 +805,6 @@ public CoefficientOfThermalExpansion ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(CoefficientOfThermalExpansionUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.CoefficientOfThermalExpansion"; - var resourceManager = new ResourceManager(resourceName, typeof(CoefficientOfThermalExpansion).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Compressibility.g.cs b/UnitsNet/GeneratedCode/Quantities/Compressibility.g.cs index 2bd34ab45e..bd0981c7f1 100644 --- a/UnitsNet/GeneratedCode/Quantities/Compressibility.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Compressibility.g.cs @@ -251,10 +251,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(CompressibilityUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(CompressibilityUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -264,7 +261,26 @@ public static string GetAbbreviation(CompressibilityUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(CompressibilityUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(CompressibilityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Compressibility"; + var resourceManager = new ResourceManager(resourceName, typeof(Compressibility).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -873,25 +889,6 @@ public Compressibility ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(CompressibilityUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Compressibility"; - var resourceManager = new ResourceManager(resourceName, typeof(Compressibility).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Density.g.cs b/UnitsNet/GeneratedCode/Quantities/Density.g.cs index 99c71019af..d96544b030 100644 --- a/UnitsNet/GeneratedCode/Quantities/Density.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Density.g.cs @@ -654,10 +654,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(DensityUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(DensityUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -667,7 +664,26 @@ public static string GetAbbreviation(DensityUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(DensityUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(DensityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Density"; + var resourceManager = new ResourceManager(resourceName, typeof(Density).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -1804,25 +1820,6 @@ public Density ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(DensityUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Density"; - var resourceManager = new ResourceManager(resourceName, typeof(Density).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Duration.g.cs b/UnitsNet/GeneratedCode/Quantities/Duration.g.cs index 8cced9725b..bb7929d355 100644 --- a/UnitsNet/GeneratedCode/Quantities/Duration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Duration.g.cs @@ -297,10 +297,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(DurationUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(DurationUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -310,7 +307,26 @@ public static string GetAbbreviation(DurationUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(DurationUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(DurationUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Duration"; + var resourceManager = new ResourceManager(resourceName, typeof(Duration).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -967,25 +983,6 @@ public Duration ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(DurationUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Duration"; - var resourceManager = new ResourceManager(resourceName, typeof(Duration).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs index 8964e4d9c5..474dfd947a 100644 --- a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs @@ -281,10 +281,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(DynamicViscosityUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(DynamicViscosityUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -294,7 +291,26 @@ public static string GetAbbreviation(DynamicViscosityUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(DynamicViscosityUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(DynamicViscosityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.DynamicViscosity"; + var resourceManager = new ResourceManager(resourceName, typeof(DynamicViscosity).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -939,25 +955,6 @@ public DynamicViscosity ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(DynamicViscosityUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.DynamicViscosity"; - var resourceManager = new ResourceManager(resourceName, typeof(DynamicViscosity).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs index a87a7f990e..d9febd75ec 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs @@ -224,10 +224,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ElectricAdmittanceUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(ElectricAdmittanceUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -237,7 +234,26 @@ public static string GetAbbreviation(ElectricAdmittanceUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricAdmittanceUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ElectricAdmittanceUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricAdmittance"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricAdmittance).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -810,25 +826,6 @@ public ElectricAdmittance ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(ElectricAdmittanceUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricAdmittance"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricAdmittance).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs index b028029436..cb27604f19 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs @@ -290,10 +290,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ElectricChargeUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(ElectricChargeUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -303,7 +300,26 @@ public static string GetAbbreviation(ElectricChargeUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricChargeUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ElectricChargeUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricCharge"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricCharge).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -960,25 +976,6 @@ public ElectricCharge ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(ElectricChargeUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricCharge"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricCharge).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs index 89c49d5ad1..e1a62a0ce5 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs @@ -200,10 +200,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ElectricChargeDensityUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(ElectricChargeDensityUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -213,7 +210,26 @@ public static string GetAbbreviation(ElectricChargeDensityUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricChargeDensityUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ElectricChargeDensityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricChargeDensity"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricChargeDensity).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -750,25 +766,6 @@ public ElectricChargeDensity ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(ElectricChargeDensityUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricChargeDensity"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricChargeDensity).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs index 2a6b3f238b..ba04e74d77 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs @@ -236,10 +236,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ElectricConductanceUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(ElectricConductanceUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -249,7 +246,26 @@ public static string GetAbbreviation(ElectricConductanceUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricConductanceUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ElectricConductanceUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricConductance"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricConductance).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -834,25 +850,6 @@ public ElectricConductance ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(ElectricConductanceUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricConductance"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricConductance).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs index 79f556ee1e..9e9bd49384 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs @@ -245,10 +245,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ElectricConductivityUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(ElectricConductivityUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -258,7 +255,26 @@ public static string GetAbbreviation(ElectricConductivityUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricConductivityUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ElectricConductivityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricConductivity"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricConductivity).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -855,25 +871,6 @@ public ElectricConductivity ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(ElectricConductivityUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricConductivity"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricConductivity).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs index fdb430502c..aad969fc07 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs @@ -269,10 +269,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ElectricCurrentUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(ElectricCurrentUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -282,7 +279,26 @@ public static string GetAbbreviation(ElectricCurrentUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricCurrentUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ElectricCurrentUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricCurrent"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricCurrent).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -915,25 +931,6 @@ public ElectricCurrent ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(ElectricCurrentUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricCurrent"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricCurrent).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs index c63abd524a..3d035ba8b8 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs @@ -218,10 +218,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ElectricCurrentDensityUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(ElectricCurrentDensityUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -231,7 +228,26 @@ public static string GetAbbreviation(ElectricCurrentDensityUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricCurrentDensityUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ElectricCurrentDensityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricCurrentDensity"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricCurrentDensity).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -792,25 +808,6 @@ public ElectricCurrentDensity ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(ElectricCurrentDensityUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricCurrentDensity"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricCurrentDensity).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs index 91cfff5915..c6514d1d3b 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs @@ -224,10 +224,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ElectricCurrentGradientUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(ElectricCurrentGradientUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -237,7 +234,26 @@ public static string GetAbbreviation(ElectricCurrentGradientUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricCurrentGradientUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ElectricCurrentGradientUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricCurrentGradient"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricCurrentGradient).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -810,25 +826,6 @@ public ElectricCurrentGradient ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(ElectricCurrentGradientUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricCurrentGradient"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricCurrentGradient).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs index 3c8cd9286a..8d838f84f9 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs @@ -200,10 +200,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ElectricFieldUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(ElectricFieldUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -213,7 +210,26 @@ public static string GetAbbreviation(ElectricFieldUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricFieldUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ElectricFieldUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricField"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricField).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -750,25 +766,6 @@ public ElectricField ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(ElectricFieldUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricField"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricField).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs index 6d99eb979d..38566dfcd7 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs @@ -236,10 +236,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ElectricInductanceUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(ElectricInductanceUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -249,7 +246,26 @@ public static string GetAbbreviation(ElectricInductanceUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricInductanceUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ElectricInductanceUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricInductance"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricInductance).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -834,25 +850,6 @@ public ElectricInductance ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(ElectricInductanceUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricInductance"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricInductance).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs index c48ded99c2..78b480b1bb 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs @@ -248,10 +248,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ElectricPotentialUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(ElectricPotentialUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -261,7 +258,26 @@ public static string GetAbbreviation(ElectricPotentialUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricPotentialUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ElectricPotentialUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricPotential"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricPotential).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -858,25 +874,6 @@ public ElectricPotential ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(ElectricPotentialUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricPotential"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricPotential).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs index 5ebdb254ef..4c7d635131 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs @@ -233,10 +233,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ElectricPotentialAcUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(ElectricPotentialAcUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -246,7 +243,26 @@ public static string GetAbbreviation(ElectricPotentialAcUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricPotentialAcUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ElectricPotentialAcUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricPotentialAc"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricPotentialAc).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -831,25 +847,6 @@ public ElectricPotentialAc ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(ElectricPotentialAcUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricPotentialAc"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricPotentialAc).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs index 5ba5831f80..025bc54af1 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs @@ -368,10 +368,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ElectricPotentialChangeRateUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(ElectricPotentialChangeRateUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -381,7 +378,26 @@ public static string GetAbbreviation(ElectricPotentialChangeRateUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricPotentialChangeRateUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ElectricPotentialChangeRateUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricPotentialChangeRate"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricPotentialChangeRate).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -1146,25 +1162,6 @@ public ElectricPotentialChangeRate ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(ElectricPotentialChangeRateUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricPotentialChangeRate"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricPotentialChangeRate).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs index 4e3b1e6da6..dca234bcd8 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs @@ -233,10 +233,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ElectricPotentialDcUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(ElectricPotentialDcUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -246,7 +243,26 @@ public static string GetAbbreviation(ElectricPotentialDcUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricPotentialDcUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ElectricPotentialDcUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricPotentialDc"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricPotentialDc).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -831,25 +847,6 @@ public ElectricPotentialDc ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(ElectricPotentialDcUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricPotentialDc"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricPotentialDc).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs index be528a14bd..bd23be6411 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs @@ -251,10 +251,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ElectricResistanceUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(ElectricResistanceUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -264,7 +261,26 @@ public static string GetAbbreviation(ElectricResistanceUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricResistanceUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ElectricResistanceUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricResistance"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricResistance).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -873,25 +889,6 @@ public ElectricResistance ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(ElectricResistanceUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricResistance"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricResistance).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs index a50fee077e..f8c38c88ff 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs @@ -317,10 +317,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ElectricResistivityUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(ElectricResistivityUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -330,7 +327,26 @@ public static string GetAbbreviation(ElectricResistivityUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricResistivityUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ElectricResistivityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricResistivity"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricResistivity).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -1023,25 +1039,6 @@ public ElectricResistivity ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(ElectricResistivityUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricResistivity"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricResistivity).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs index 1e140a0a34..07520b388f 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs @@ -218,10 +218,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ElectricSurfaceChargeDensityUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(ElectricSurfaceChargeDensityUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -231,7 +228,26 @@ public static string GetAbbreviation(ElectricSurfaceChargeDensityUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricSurfaceChargeDensityUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ElectricSurfaceChargeDensityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricSurfaceChargeDensity"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricSurfaceChargeDensity).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -792,25 +808,6 @@ public ElectricSurfaceChargeDensity ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(ElectricSurfaceChargeDensityUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricSurfaceChargeDensity"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricSurfaceChargeDensity).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Energy.g.cs b/UnitsNet/GeneratedCode/Quantities/Energy.g.cs index b406968150..c4537af373 100644 --- a/UnitsNet/GeneratedCode/Quantities/Energy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Energy.g.cs @@ -551,10 +551,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(EnergyUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(EnergyUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -564,7 +561,26 @@ public static string GetAbbreviation(EnergyUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(EnergyUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(EnergyUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Energy"; + var resourceManager = new ResourceManager(resourceName, typeof(Energy).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -1545,25 +1561,6 @@ public Energy ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(EnergyUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Energy"; - var resourceManager = new ResourceManager(resourceName, typeof(Energy).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/EnergyDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/EnergyDensity.g.cs index 811e41de83..7a536aa898 100644 --- a/UnitsNet/GeneratedCode/Quantities/EnergyDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/EnergyDensity.g.cs @@ -296,10 +296,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(EnergyDensityUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(EnergyDensityUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -309,7 +306,26 @@ public static string GetAbbreviation(EnergyDensityUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(EnergyDensityUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(EnergyDensityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.EnergyDensity"; + var resourceManager = new ResourceManager(resourceName, typeof(EnergyDensity).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -978,25 +994,6 @@ public EnergyDensity ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(EnergyDensityUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.EnergyDensity"; - var resourceManager = new ResourceManager(resourceName, typeof(EnergyDensity).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs b/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs index e922d122d7..f0767a19d1 100644 --- a/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs @@ -251,10 +251,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(EntropyUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(EntropyUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -264,7 +261,26 @@ public static string GetAbbreviation(EntropyUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(EntropyUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(EntropyUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Entropy"; + var resourceManager = new ResourceManager(resourceName, typeof(Entropy).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -873,25 +889,6 @@ public Entropy ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(EntropyUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Entropy"; - var resourceManager = new ResourceManager(resourceName, typeof(Entropy).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Force.g.cs b/UnitsNet/GeneratedCode/Quantities/Force.g.cs index 49d914d9b6..b6be03fbfe 100644 --- a/UnitsNet/GeneratedCode/Quantities/Force.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Force.g.cs @@ -336,10 +336,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ForceUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(ForceUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -349,7 +346,26 @@ public static string GetAbbreviation(ForceUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ForceUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ForceUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Force"; + var resourceManager = new ResourceManager(resourceName, typeof(Force).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -1054,25 +1070,6 @@ public Force ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(ForceUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Force"; - var resourceManager = new ResourceManager(resourceName, typeof(Force).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs index 1df4b16338..7fcbd18ff1 100644 --- a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs @@ -323,10 +323,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ForceChangeRateUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(ForceChangeRateUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -336,7 +333,26 @@ public static string GetAbbreviation(ForceChangeRateUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ForceChangeRateUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ForceChangeRateUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ForceChangeRate"; + var resourceManager = new ResourceManager(resourceName, typeof(ForceChangeRate).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -1041,25 +1057,6 @@ public ForceChangeRate ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(ForceChangeRateUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ForceChangeRate"; - var resourceManager = new ResourceManager(resourceName, typeof(ForceChangeRate).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs index 6fc922f7ff..227599c213 100644 --- a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs @@ -536,10 +536,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ForcePerLengthUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(ForcePerLengthUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -549,7 +546,26 @@ public static string GetAbbreviation(ForcePerLengthUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ForcePerLengthUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ForcePerLengthUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ForcePerLength"; + var resourceManager = new ResourceManager(resourceName, typeof(ForcePerLength).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -1530,25 +1546,6 @@ public ForcePerLength ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(ForcePerLengthUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ForcePerLength"; - var resourceManager = new ResourceManager(resourceName, typeof(ForcePerLength).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs b/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs index c48a17a452..d67b78dd18 100644 --- a/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs @@ -314,10 +314,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(FrequencyUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(FrequencyUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -327,7 +324,26 @@ public static string GetAbbreviation(FrequencyUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(FrequencyUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(FrequencyUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Frequency"; + var resourceManager = new ResourceManager(resourceName, typeof(Frequency).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -1008,25 +1024,6 @@ public Frequency ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(FrequencyUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Frequency"; - var resourceManager = new ResourceManager(resourceName, typeof(Frequency).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs b/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs index c9e5098d04..7f6bd25586 100644 --- a/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs @@ -227,10 +227,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(FuelEfficiencyUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(FuelEfficiencyUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -240,7 +237,26 @@ public static string GetAbbreviation(FuelEfficiencyUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(FuelEfficiencyUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(FuelEfficiencyUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.FuelEfficiency"; + var resourceManager = new ResourceManager(resourceName, typeof(FuelEfficiency).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -813,25 +829,6 @@ public FuelEfficiency ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(FuelEfficiencyUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.FuelEfficiency"; - var resourceManager = new ResourceManager(resourceName, typeof(FuelEfficiency).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs index 4a501eaf29..9d76c75434 100644 --- a/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs @@ -350,10 +350,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(HeatFluxUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(HeatFluxUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -363,7 +360,26 @@ public static string GetAbbreviation(HeatFluxUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(HeatFluxUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(HeatFluxUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.HeatFlux"; + var resourceManager = new ResourceManager(resourceName, typeof(HeatFlux).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -1104,25 +1120,6 @@ public HeatFlux ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(HeatFluxUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.HeatFlux"; - var resourceManager = new ResourceManager(resourceName, typeof(HeatFlux).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs index 94980e0d19..992fb5180d 100644 --- a/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs @@ -243,10 +243,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(HeatTransferCoefficientUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(HeatTransferCoefficientUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -256,7 +253,26 @@ public static string GetAbbreviation(HeatTransferCoefficientUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(HeatTransferCoefficientUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(HeatTransferCoefficientUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.HeatTransferCoefficient"; + var resourceManager = new ResourceManager(resourceName, typeof(HeatTransferCoefficient).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -854,25 +870,6 @@ public HeatTransferCoefficient ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(HeatTransferCoefficientUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.HeatTransferCoefficient"; - var resourceManager = new ResourceManager(resourceName, typeof(HeatTransferCoefficient).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs b/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs index 0aa7148804..9179201c11 100644 --- a/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs @@ -227,10 +227,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(IlluminanceUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(IlluminanceUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -240,7 +237,26 @@ public static string GetAbbreviation(IlluminanceUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(IlluminanceUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(IlluminanceUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Illuminance"; + var resourceManager = new ResourceManager(resourceName, typeof(Illuminance).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -813,25 +829,6 @@ public Illuminance ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(IlluminanceUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Illuminance"; - var resourceManager = new ResourceManager(resourceName, typeof(Illuminance).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Impulse.g.cs b/UnitsNet/GeneratedCode/Quantities/Impulse.g.cs index 5e352de911..7e880e9a1a 100644 --- a/UnitsNet/GeneratedCode/Quantities/Impulse.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Impulse.g.cs @@ -305,10 +305,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ImpulseUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(ImpulseUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -318,7 +315,26 @@ public static string GetAbbreviation(ImpulseUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ImpulseUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ImpulseUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Impulse"; + var resourceManager = new ResourceManager(resourceName, typeof(Impulse).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -999,25 +1015,6 @@ public Impulse ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(ImpulseUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Impulse"; - var resourceManager = new ResourceManager(resourceName, typeof(Impulse).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Information.g.cs b/UnitsNet/GeneratedCode/Quantities/Information.g.cs index 69bfa2f25b..2510e99fce 100644 --- a/UnitsNet/GeneratedCode/Quantities/Information.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Information.g.cs @@ -425,10 +425,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(InformationUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(InformationUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -438,7 +435,26 @@ public static string GetAbbreviation(InformationUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(InformationUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(InformationUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Information"; + var resourceManager = new ResourceManager(resourceName, typeof(Information).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -1286,25 +1302,6 @@ public Information ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(InformationUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Information"; - var resourceManager = new ResourceManager(resourceName, typeof(Information).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs b/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs index 5f55aa1455..ebe81f6474 100644 --- a/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs @@ -314,10 +314,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(IrradianceUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(IrradianceUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -327,7 +324,26 @@ public static string GetAbbreviation(IrradianceUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(IrradianceUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(IrradianceUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Irradiance"; + var resourceManager = new ResourceManager(resourceName, typeof(Irradiance).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -1020,25 +1036,6 @@ public Irradiance ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(IrradianceUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Irradiance"; - var resourceManager = new ResourceManager(resourceName, typeof(Irradiance).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs b/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs index 3cf63aae9d..1059797b2a 100644 --- a/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs @@ -254,10 +254,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(IrradiationUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(IrradiationUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -267,7 +264,26 @@ public static string GetAbbreviation(IrradiationUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(IrradiationUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(IrradiationUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Irradiation"; + var resourceManager = new ResourceManager(resourceName, typeof(Irradiation).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -876,25 +892,6 @@ public Irradiation ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(IrradiationUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Irradiation"; - var resourceManager = new ResourceManager(resourceName, typeof(Irradiation).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Jerk.g.cs b/UnitsNet/GeneratedCode/Quantities/Jerk.g.cs index 9127a7fc8c..2270b865be 100644 --- a/UnitsNet/GeneratedCode/Quantities/Jerk.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Jerk.g.cs @@ -298,10 +298,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(JerkUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(JerkUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -311,7 +308,26 @@ public static string GetAbbreviation(JerkUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(JerkUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(JerkUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Jerk"; + var resourceManager = new ResourceManager(resourceName, typeof(Jerk).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -968,25 +984,6 @@ public Jerk ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(JerkUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Jerk"; - var resourceManager = new ResourceManager(resourceName, typeof(Jerk).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs index 8592b807a3..e8cf71f750 100644 --- a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs @@ -280,10 +280,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(KinematicViscosityUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(KinematicViscosityUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -293,7 +290,26 @@ public static string GetAbbreviation(KinematicViscosityUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(KinematicViscosityUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(KinematicViscosityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.KinematicViscosity"; + var resourceManager = new ResourceManager(resourceName, typeof(KinematicViscosity).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -926,25 +942,6 @@ public KinematicViscosity ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(KinematicViscosityUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.KinematicViscosity"; - var resourceManager = new ResourceManager(resourceName, typeof(KinematicViscosity).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Length.g.cs b/UnitsNet/GeneratedCode/Quantities/Length.g.cs index 1eb7c17db8..9b7c2df4be 100644 --- a/UnitsNet/GeneratedCode/Quantities/Length.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Length.g.cs @@ -544,10 +544,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(LengthUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(LengthUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -557,7 +554,26 @@ public static string GetAbbreviation(LengthUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(LengthUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(LengthUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Length"; + var resourceManager = new ResourceManager(resourceName, typeof(Length).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -1514,25 +1530,6 @@ public Length ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(LengthUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Length"; - var resourceManager = new ResourceManager(resourceName, typeof(Length).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Level.g.cs b/UnitsNet/GeneratedCode/Quantities/Level.g.cs index dbcf0ae0d2..0544daedf7 100644 --- a/UnitsNet/GeneratedCode/Quantities/Level.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Level.g.cs @@ -206,10 +206,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(LevelUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(LevelUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -219,7 +216,26 @@ public static string GetAbbreviation(LevelUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(LevelUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(LevelUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Level"; + var resourceManager = new ResourceManager(resourceName, typeof(Level).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -776,25 +792,6 @@ public Level ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(LevelUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Level"; - var resourceManager = new ResourceManager(resourceName, typeof(Level).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs index d0fba30d01..5bf034d1ae 100644 --- a/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs @@ -317,10 +317,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(LinearDensityUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(LinearDensityUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -330,7 +327,26 @@ public static string GetAbbreviation(LinearDensityUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(LinearDensityUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(LinearDensityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.LinearDensity"; + var resourceManager = new ResourceManager(resourceName, typeof(LinearDensity).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -1023,25 +1039,6 @@ public LinearDensity ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(LinearDensityUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.LinearDensity"; - var resourceManager = new ResourceManager(resourceName, typeof(LinearDensity).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs index 75791070ab..4260108881 100644 --- a/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs @@ -416,10 +416,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(LinearPowerDensityUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(LinearPowerDensityUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -429,7 +426,26 @@ public static string GetAbbreviation(LinearPowerDensityUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(LinearPowerDensityUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(LinearPowerDensityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.LinearPowerDensity"; + var resourceManager = new ResourceManager(resourceName, typeof(LinearPowerDensity).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -1254,25 +1270,6 @@ public LinearPowerDensity ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(LinearPowerDensityUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.LinearPowerDensity"; - var resourceManager = new ResourceManager(resourceName, typeof(LinearPowerDensity).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Luminance.g.cs b/UnitsNet/GeneratedCode/Quantities/Luminance.g.cs index 5640e4fe52..90fd865760 100644 --- a/UnitsNet/GeneratedCode/Quantities/Luminance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Luminance.g.cs @@ -281,10 +281,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(LuminanceUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(LuminanceUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -294,7 +291,26 @@ public static string GetAbbreviation(LuminanceUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(LuminanceUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(LuminanceUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Luminance"; + var resourceManager = new ResourceManager(resourceName, typeof(Luminance).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -939,25 +955,6 @@ public Luminance ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(LuminanceUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Luminance"; - var resourceManager = new ResourceManager(resourceName, typeof(Luminance).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs b/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs index 355f790d8e..373cba1d22 100644 --- a/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs @@ -317,10 +317,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(LuminosityUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(LuminosityUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -330,7 +327,26 @@ public static string GetAbbreviation(LuminosityUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(LuminosityUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(LuminosityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Luminosity"; + var resourceManager = new ResourceManager(resourceName, typeof(Luminosity).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -1023,25 +1039,6 @@ public Luminosity ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(LuminosityUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Luminosity"; - var resourceManager = new ResourceManager(resourceName, typeof(Luminosity).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs index 50159d0471..f780582f58 100644 --- a/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs @@ -200,10 +200,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(LuminousFluxUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(LuminousFluxUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -213,7 +210,26 @@ public static string GetAbbreviation(LuminousFluxUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(LuminousFluxUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(LuminousFluxUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.LuminousFlux"; + var resourceManager = new ResourceManager(resourceName, typeof(LuminousFlux).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -750,25 +766,6 @@ public LuminousFlux ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(LuminousFluxUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.LuminousFlux"; - var resourceManager = new ResourceManager(resourceName, typeof(LuminousFlux).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs b/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs index e663938783..de3b4228d0 100644 --- a/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs @@ -200,10 +200,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(LuminousIntensityUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(LuminousIntensityUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -213,7 +210,26 @@ public static string GetAbbreviation(LuminousIntensityUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(LuminousIntensityUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(LuminousIntensityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.LuminousIntensity"; + var resourceManager = new ResourceManager(resourceName, typeof(LuminousIntensity).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -750,25 +766,6 @@ public LuminousIntensity ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(LuminousIntensityUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.LuminousIntensity"; - var resourceManager = new ResourceManager(resourceName, typeof(LuminousIntensity).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs b/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs index 0f582b4d61..a2acbe4cba 100644 --- a/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs @@ -245,10 +245,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(MagneticFieldUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(MagneticFieldUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -258,7 +255,26 @@ public static string GetAbbreviation(MagneticFieldUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(MagneticFieldUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(MagneticFieldUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MagneticField"; + var resourceManager = new ResourceManager(resourceName, typeof(MagneticField).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -855,25 +871,6 @@ public MagneticField ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(MagneticFieldUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.MagneticField"; - var resourceManager = new ResourceManager(resourceName, typeof(MagneticField).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs index 6e096176df..8ee97f452b 100644 --- a/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs @@ -200,10 +200,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(MagneticFluxUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(MagneticFluxUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -213,7 +210,26 @@ public static string GetAbbreviation(MagneticFluxUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(MagneticFluxUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(MagneticFluxUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MagneticFlux"; + var resourceManager = new ResourceManager(resourceName, typeof(MagneticFlux).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -750,25 +766,6 @@ public MagneticFlux ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(MagneticFluxUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.MagneticFlux"; - var resourceManager = new ResourceManager(resourceName, typeof(MagneticFlux).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs b/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs index 814fb86c1f..154afc5ba2 100644 --- a/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs @@ -200,10 +200,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(MagnetizationUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(MagnetizationUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -213,7 +210,26 @@ public static string GetAbbreviation(MagnetizationUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(MagnetizationUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(MagnetizationUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Magnetization"; + var resourceManager = new ResourceManager(resourceName, typeof(Magnetization).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -750,25 +766,6 @@ public Magnetization ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(MagnetizationUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Magnetization"; - var resourceManager = new ResourceManager(resourceName, typeof(Magnetization).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Mass.g.cs b/UnitsNet/GeneratedCode/Quantities/Mass.g.cs index 5c46a10990..a0046e5e7d 100644 --- a/UnitsNet/GeneratedCode/Quantities/Mass.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Mass.g.cs @@ -448,10 +448,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(MassUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(MassUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -461,7 +458,26 @@ public static string GetAbbreviation(MassUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(MassUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(MassUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Mass"; + var resourceManager = new ResourceManager(resourceName, typeof(Mass).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -1286,25 +1302,6 @@ public Mass ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(MassUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Mass"; - var resourceManager = new ResourceManager(resourceName, typeof(Mass).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs b/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs index 27a506b9b2..cfc980761f 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs @@ -636,10 +636,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(MassConcentrationUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(MassConcentrationUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -649,7 +646,26 @@ public static string GetAbbreviation(MassConcentrationUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(MassConcentrationUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(MassConcentrationUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MassConcentration"; + var resourceManager = new ResourceManager(resourceName, typeof(MassConcentration).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -1762,25 +1778,6 @@ public MassConcentration ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(MassConcentrationUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.MassConcentration"; - var resourceManager = new ResourceManager(resourceName, typeof(MassConcentration).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs index 3ccb8d17fd..447fdf2178 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs @@ -487,10 +487,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(MassFlowUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(MassFlowUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -500,7 +497,26 @@ public static string GetAbbreviation(MassFlowUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(MassFlowUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(MassFlowUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MassFlow"; + var resourceManager = new ResourceManager(resourceName, typeof(MassFlow).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -1421,25 +1437,6 @@ public MassFlow ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(MassFlowUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.MassFlow"; - var resourceManager = new ResourceManager(resourceName, typeof(MassFlow).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs index 89bf7f3d94..23bd3d0d4c 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs @@ -296,10 +296,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(MassFluxUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(MassFluxUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -309,7 +306,26 @@ public static string GetAbbreviation(MassFluxUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(MassFluxUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(MassFluxUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MassFlux"; + var resourceManager = new ResourceManager(resourceName, typeof(MassFlux).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -978,25 +994,6 @@ public MassFlux ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(MassFluxUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.MassFlux"; - var resourceManager = new ResourceManager(resourceName, typeof(MassFlux).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs index 58de25ecb0..4fc1b3a06b 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs @@ -407,10 +407,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(MassFractionUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(MassFractionUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -420,7 +417,26 @@ public static string GetAbbreviation(MassFractionUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(MassFractionUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(MassFractionUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MassFraction"; + var resourceManager = new ResourceManager(resourceName, typeof(MassFraction).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -1233,25 +1249,6 @@ public MassFraction ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(MassFractionUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.MassFraction"; - var resourceManager = new ResourceManager(resourceName, typeof(MassFraction).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs b/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs index 7701ac1ab8..f7569c77aa 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs @@ -440,10 +440,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(MassMomentOfInertiaUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(MassMomentOfInertiaUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -453,7 +450,26 @@ public static string GetAbbreviation(MassMomentOfInertiaUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(MassMomentOfInertiaUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(MassMomentOfInertiaUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MassMomentOfInertia"; + var resourceManager = new ResourceManager(resourceName, typeof(MassMomentOfInertia).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -1314,25 +1330,6 @@ public MassMomentOfInertia ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(MassMomentOfInertiaUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.MassMomentOfInertia"; - var resourceManager = new ResourceManager(resourceName, typeof(MassMomentOfInertia).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs index ec8a0a7cd1..7108cee00c 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs @@ -215,10 +215,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(MolarEnergyUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(MolarEnergyUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -228,7 +225,26 @@ public static string GetAbbreviation(MolarEnergyUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(MolarEnergyUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(MolarEnergyUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MolarEnergy"; + var resourceManager = new ResourceManager(resourceName, typeof(MolarEnergy).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -789,25 +805,6 @@ public MolarEnergy ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(MolarEnergyUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.MolarEnergy"; - var resourceManager = new ResourceManager(resourceName, typeof(MolarEnergy).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs index 112ef82cae..83b3a3d69a 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs @@ -215,10 +215,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(MolarEntropyUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(MolarEntropyUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -228,7 +225,26 @@ public static string GetAbbreviation(MolarEntropyUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(MolarEntropyUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(MolarEntropyUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MolarEntropy"; + var resourceManager = new ResourceManager(resourceName, typeof(MolarEntropy).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -789,25 +805,6 @@ public MolarEntropy ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(MolarEntropyUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.MolarEntropy"; - var resourceManager = new ResourceManager(resourceName, typeof(MolarEntropy).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs index 33f796cf21..a8e2c616f5 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs @@ -269,10 +269,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(MolarFlowUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(MolarFlowUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -282,7 +279,26 @@ public static string GetAbbreviation(MolarFlowUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(MolarFlowUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(MolarFlowUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MolarFlow"; + var resourceManager = new ResourceManager(resourceName, typeof(MolarFlow).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -915,25 +931,6 @@ public MolarFlow ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(MolarFlowUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.MolarFlow"; - var resourceManager = new ResourceManager(resourceName, typeof(MolarFlow).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs index c1d686cc10..3afce93150 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs @@ -317,10 +317,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(MolarMassUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(MolarMassUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -330,7 +327,26 @@ public static string GetAbbreviation(MolarMassUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(MolarMassUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(MolarMassUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MolarMass"; + var resourceManager = new ResourceManager(resourceName, typeof(MolarMass).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -1011,25 +1027,6 @@ public MolarMass ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(MolarMassUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.MolarMass"; - var resourceManager = new ResourceManager(resourceName, typeof(MolarMass).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs b/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs index 7ecd55ab32..a1a905c097 100644 --- a/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs @@ -290,10 +290,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(MolarityUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(MolarityUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -303,7 +300,26 @@ public static string GetAbbreviation(MolarityUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(MolarityUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(MolarityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Molarity"; + var resourceManager = new ResourceManager(resourceName, typeof(Molarity).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -960,25 +976,6 @@ public Molarity ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(MolarityUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Molarity"; - var resourceManager = new ResourceManager(resourceName, typeof(Molarity).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs b/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs index cf36e2df15..8b26b4ac5b 100644 --- a/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs @@ -200,10 +200,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(PermeabilityUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(PermeabilityUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -213,7 +210,26 @@ public static string GetAbbreviation(PermeabilityUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(PermeabilityUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(PermeabilityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Permeability"; + var resourceManager = new ResourceManager(resourceName, typeof(Permeability).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -750,25 +766,6 @@ public Permeability ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(PermeabilityUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Permeability"; - var resourceManager = new ResourceManager(resourceName, typeof(Permeability).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs b/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs index 52a736a4df..27fd0be9dd 100644 --- a/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs @@ -200,10 +200,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(PermittivityUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(PermittivityUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -213,7 +210,26 @@ public static string GetAbbreviation(PermittivityUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(PermittivityUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(PermittivityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Permittivity"; + var resourceManager = new ResourceManager(resourceName, typeof(Permittivity).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -750,25 +766,6 @@ public Permittivity ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(PermittivityUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Permittivity"; - var resourceManager = new ResourceManager(resourceName, typeof(Permittivity).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/PorousMediumPermeability.g.cs b/UnitsNet/GeneratedCode/Quantities/PorousMediumPermeability.g.cs index bfa24850dc..5089e24c9c 100644 --- a/UnitsNet/GeneratedCode/Quantities/PorousMediumPermeability.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PorousMediumPermeability.g.cs @@ -236,10 +236,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(PorousMediumPermeabilityUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(PorousMediumPermeabilityUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -249,7 +246,26 @@ public static string GetAbbreviation(PorousMediumPermeabilityUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(PorousMediumPermeabilityUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(PorousMediumPermeabilityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.PorousMediumPermeability"; + var resourceManager = new ResourceManager(resourceName, typeof(PorousMediumPermeability).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -834,25 +850,6 @@ public PorousMediumPermeability ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(PorousMediumPermeabilityUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.PorousMediumPermeability"; - var resourceManager = new ResourceManager(resourceName, typeof(PorousMediumPermeability).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Power.g.cs b/UnitsNet/GeneratedCode/Quantities/Power.g.cs index 8dbe54abdc..742f1922d5 100644 --- a/UnitsNet/GeneratedCode/Quantities/Power.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Power.g.cs @@ -425,10 +425,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(PowerUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(PowerUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -438,7 +435,26 @@ public static string GetAbbreviation(PowerUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(PowerUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(PowerUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Power"; + var resourceManager = new ResourceManager(resourceName, typeof(Power).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -1286,25 +1302,6 @@ public Power ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(PowerUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Power"; - var resourceManager = new ResourceManager(resourceName, typeof(Power).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs index b0481dd372..ccbbe27a86 100644 --- a/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs @@ -584,10 +584,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(PowerDensityUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(PowerDensityUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -597,7 +594,26 @@ public static string GetAbbreviation(PowerDensityUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(PowerDensityUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(PowerDensityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.PowerDensity"; + var resourceManager = new ResourceManager(resourceName, typeof(PowerDensity).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -1650,25 +1666,6 @@ public PowerDensity ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(PowerDensityUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.PowerDensity"; - var resourceManager = new ResourceManager(resourceName, typeof(PowerDensity).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs b/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs index bff392c1ec..6dcd834d4e 100644 --- a/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs @@ -206,10 +206,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(PowerRatioUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(PowerRatioUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -219,7 +216,26 @@ public static string GetAbbreviation(PowerRatioUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(PowerRatioUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(PowerRatioUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.PowerRatio"; + var resourceManager = new ResourceManager(resourceName, typeof(PowerRatio).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -776,25 +792,6 @@ public PowerRatio ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(PowerRatioUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.PowerRatio"; - var resourceManager = new ResourceManager(resourceName, typeof(PowerRatio).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs b/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs index 838d217ece..c930fc83f5 100644 --- a/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs @@ -642,10 +642,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(PressureUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(PressureUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -655,7 +652,26 @@ public static string GetAbbreviation(PressureUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(PressureUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(PressureUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Pressure"; + var resourceManager = new ResourceManager(resourceName, typeof(Pressure).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -1744,25 +1760,6 @@ public Pressure ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(PressureUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Pressure"; - var resourceManager = new ResourceManager(resourceName, typeof(Pressure).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs index 08c5f702c8..3e994f62bb 100644 --- a/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs @@ -328,10 +328,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(PressureChangeRateUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(PressureChangeRateUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -341,7 +338,26 @@ public static string GetAbbreviation(PressureChangeRateUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(PressureChangeRateUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(PressureChangeRateUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.PressureChangeRate"; + var resourceManager = new ResourceManager(resourceName, typeof(PressureChangeRate).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -1034,25 +1050,6 @@ public PressureChangeRate ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(PressureChangeRateUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.PressureChangeRate"; - var resourceManager = new ResourceManager(resourceName, typeof(PressureChangeRate).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs b/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs index b45e53b155..13f18fd5af 100644 --- a/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs @@ -242,10 +242,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(RatioUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(RatioUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -255,7 +252,26 @@ public static string GetAbbreviation(RatioUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(RatioUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(RatioUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Ratio"; + var resourceManager = new ResourceManager(resourceName, typeof(Ratio).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -852,25 +868,6 @@ public Ratio ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(RatioUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Ratio"; - var resourceManager = new ResourceManager(resourceName, typeof(Ratio).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs index 7712efcaa3..484ae714af 100644 --- a/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs @@ -206,10 +206,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(RatioChangeRateUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(RatioChangeRateUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -219,7 +216,26 @@ public static string GetAbbreviation(RatioChangeRateUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(RatioChangeRateUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(RatioChangeRateUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.RatioChangeRate"; + var resourceManager = new ResourceManager(resourceName, typeof(RatioChangeRate).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -768,25 +784,6 @@ public RatioChangeRate ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(RatioChangeRateUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.RatioChangeRate"; - var resourceManager = new ResourceManager(resourceName, typeof(RatioChangeRate).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs index 16df62ef8b..4a984fea9e 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs @@ -215,10 +215,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ReactiveEnergyUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(ReactiveEnergyUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -228,7 +225,26 @@ public static string GetAbbreviation(ReactiveEnergyUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ReactiveEnergyUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ReactiveEnergyUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ReactiveEnergy"; + var resourceManager = new ResourceManager(resourceName, typeof(ReactiveEnergy).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -789,25 +805,6 @@ public ReactiveEnergy ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(ReactiveEnergyUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ReactiveEnergy"; - var resourceManager = new ResourceManager(resourceName, typeof(ReactiveEnergy).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs b/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs index d9b84cb57c..58962e472d 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs @@ -224,10 +224,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ReactivePowerUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(ReactivePowerUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -237,7 +234,26 @@ public static string GetAbbreviation(ReactivePowerUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ReactivePowerUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ReactivePowerUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ReactivePower"; + var resourceManager = new ResourceManager(resourceName, typeof(ReactivePower).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -810,25 +826,6 @@ public ReactivePower ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(ReactivePowerUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ReactivePower"; - var resourceManager = new ResourceManager(resourceName, typeof(ReactivePower).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs b/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs index f80e88368a..4e0cf7cc2c 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs @@ -290,10 +290,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ReciprocalAreaUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(ReciprocalAreaUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -303,7 +300,26 @@ public static string GetAbbreviation(ReciprocalAreaUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ReciprocalAreaUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ReciprocalAreaUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ReciprocalArea"; + var resourceManager = new ResourceManager(resourceName, typeof(ReciprocalArea).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -960,25 +976,6 @@ public ReciprocalArea ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(ReciprocalAreaUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ReciprocalArea"; - var resourceManager = new ResourceManager(resourceName, typeof(ReciprocalArea).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs b/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs index 2c73137796..d6de0f89eb 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs @@ -281,10 +281,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ReciprocalLengthUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(ReciprocalLengthUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -294,7 +291,26 @@ public static string GetAbbreviation(ReciprocalLengthUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ReciprocalLengthUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ReciprocalLengthUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ReciprocalLength"; + var resourceManager = new ResourceManager(resourceName, typeof(ReciprocalLength).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -939,25 +955,6 @@ public ReciprocalLength ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(ReciprocalLengthUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ReciprocalLength"; - var resourceManager = new ResourceManager(resourceName, typeof(ReciprocalLength).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs b/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs index 73adb465e4..155dc2ba73 100644 --- a/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs @@ -197,10 +197,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(RelativeHumidityUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(RelativeHumidityUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -210,7 +207,26 @@ public static string GetAbbreviation(RelativeHumidityUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(RelativeHumidityUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(RelativeHumidityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.RelativeHumidity"; + var resourceManager = new ResourceManager(resourceName, typeof(RelativeHumidity).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -747,25 +763,6 @@ public RelativeHumidity ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(RelativeHumidityUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.RelativeHumidity"; - var resourceManager = new ResourceManager(resourceName, typeof(RelativeHumidity).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.g.cs index de150ce204..cbf2531ff8 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.g.cs @@ -224,10 +224,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(RotationalAccelerationUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(RotationalAccelerationUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -237,7 +234,26 @@ public static string GetAbbreviation(RotationalAccelerationUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(RotationalAccelerationUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(RotationalAccelerationUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.RotationalAcceleration"; + var resourceManager = new ResourceManager(resourceName, typeof(RotationalAcceleration).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -810,25 +826,6 @@ public RotationalAcceleration ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(RotationalAccelerationUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.RotationalAcceleration"; - var resourceManager = new ResourceManager(resourceName, typeof(RotationalAcceleration).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs index 1887e09605..e0748d87e5 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs @@ -317,10 +317,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(RotationalSpeedUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(RotationalSpeedUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -330,7 +327,26 @@ public static string GetAbbreviation(RotationalSpeedUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(RotationalSpeedUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(RotationalSpeedUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.RotationalSpeed"; + var resourceManager = new ResourceManager(resourceName, typeof(RotationalSpeed).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -1011,25 +1027,6 @@ public RotationalSpeed ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(RotationalSpeedUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.RotationalSpeed"; - var resourceManager = new ResourceManager(resourceName, typeof(RotationalSpeed).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs index ebc74123bb..04eec97b4d 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs @@ -485,10 +485,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(RotationalStiffnessUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(RotationalStiffnessUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -498,7 +495,26 @@ public static string GetAbbreviation(RotationalStiffnessUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(RotationalStiffnessUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(RotationalStiffnessUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.RotationalStiffness"; + var resourceManager = new ResourceManager(resourceName, typeof(RotationalStiffness).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -1419,25 +1435,6 @@ public RotationalStiffness ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(RotationalStiffnessUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.RotationalStiffness"; - var resourceManager = new ResourceManager(resourceName, typeof(RotationalStiffness).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs index f10ce8f59f..48b88bd070 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs @@ -233,10 +233,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(RotationalStiffnessPerLengthUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(RotationalStiffnessPerLengthUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -246,7 +243,26 @@ public static string GetAbbreviation(RotationalStiffnessPerLengthUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(RotationalStiffnessPerLengthUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(RotationalStiffnessPerLengthUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.RotationalStiffnessPerLength"; + var resourceManager = new ResourceManager(resourceName, typeof(RotationalStiffnessPerLength).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -831,25 +847,6 @@ public RotationalStiffnessPerLength ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(RotationalStiffnessPerLengthUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.RotationalStiffnessPerLength"; - var resourceManager = new ResourceManager(resourceName, typeof(RotationalStiffnessPerLength).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Scalar.g.cs b/UnitsNet/GeneratedCode/Quantities/Scalar.g.cs index b40b5fb320..73dfea8910 100644 --- a/UnitsNet/GeneratedCode/Quantities/Scalar.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Scalar.g.cs @@ -197,10 +197,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ScalarUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(ScalarUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -210,7 +207,26 @@ public static string GetAbbreviation(ScalarUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ScalarUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ScalarUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Scalar"; + var resourceManager = new ResourceManager(resourceName, typeof(Scalar).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -747,25 +763,6 @@ public Scalar ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(ScalarUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Scalar"; - var resourceManager = new ResourceManager(resourceName, typeof(Scalar).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs b/UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs index f1922fa84f..c81e316c36 100644 --- a/UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs @@ -200,10 +200,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(SolidAngleUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(SolidAngleUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -213,7 +210,26 @@ public static string GetAbbreviation(SolidAngleUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(SolidAngleUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(SolidAngleUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.SolidAngle"; + var resourceManager = new ResourceManager(resourceName, typeof(SolidAngle).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -750,25 +766,6 @@ public SolidAngle ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(SolidAngleUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.SolidAngle"; - var resourceManager = new ResourceManager(resourceName, typeof(SolidAngle).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs index 94a83271d7..73435221e2 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs @@ -461,10 +461,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(SpecificEnergyUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(SpecificEnergyUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -474,7 +471,26 @@ public static string GetAbbreviation(SpecificEnergyUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(SpecificEnergyUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(SpecificEnergyUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.SpecificEnergy"; + var resourceManager = new ResourceManager(resourceName, typeof(SpecificEnergy).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -1359,25 +1375,6 @@ public SpecificEnergy ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(SpecificEnergyUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.SpecificEnergy"; - var resourceManager = new ResourceManager(resourceName, typeof(SpecificEnergy).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs index 6f7fa18aa8..dd657ab61b 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs @@ -269,10 +269,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(SpecificEntropyUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(SpecificEntropyUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -282,7 +279,26 @@ public static string GetAbbreviation(SpecificEntropyUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(SpecificEntropyUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(SpecificEntropyUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.SpecificEntropy"; + var resourceManager = new ResourceManager(resourceName, typeof(SpecificEntropy).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -915,25 +931,6 @@ public SpecificEntropy ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(SpecificEntropyUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.SpecificEntropy"; - var resourceManager = new ResourceManager(resourceName, typeof(SpecificEntropy).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs index 6c1e547dbc..dac21fc049 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs @@ -227,10 +227,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(SpecificFuelConsumptionUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(SpecificFuelConsumptionUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -240,7 +237,26 @@ public static string GetAbbreviation(SpecificFuelConsumptionUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(SpecificFuelConsumptionUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(SpecificFuelConsumptionUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.SpecificFuelConsumption"; + var resourceManager = new ResourceManager(resourceName, typeof(SpecificFuelConsumption).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -813,25 +829,6 @@ public SpecificFuelConsumption ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(SpecificFuelConsumptionUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.SpecificFuelConsumption"; - var resourceManager = new ResourceManager(resourceName, typeof(SpecificFuelConsumption).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs index 36914770b1..13ab9aefa7 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs @@ -215,10 +215,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(SpecificVolumeUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(SpecificVolumeUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -228,7 +225,26 @@ public static string GetAbbreviation(SpecificVolumeUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(SpecificVolumeUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(SpecificVolumeUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.SpecificVolume"; + var resourceManager = new ResourceManager(resourceName, typeof(SpecificVolume).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -789,25 +805,6 @@ public SpecificVolume ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(SpecificVolumeUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.SpecificVolume"; - var resourceManager = new ResourceManager(resourceName, typeof(SpecificVolume).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs index b5d31bf2c3..d4afbf3f8b 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs @@ -344,10 +344,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(SpecificWeightUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(SpecificWeightUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -357,7 +354,26 @@ public static string GetAbbreviation(SpecificWeightUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(SpecificWeightUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(SpecificWeightUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.SpecificWeight"; + var resourceManager = new ResourceManager(resourceName, typeof(SpecificWeight).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -1086,25 +1102,6 @@ public SpecificWeight ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(SpecificWeightUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.SpecificWeight"; - var resourceManager = new ResourceManager(resourceName, typeof(SpecificWeight).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Speed.g.cs b/UnitsNet/GeneratedCode/Quantities/Speed.g.cs index 1a625f9efa..73c7e6435c 100644 --- a/UnitsNet/GeneratedCode/Quantities/Speed.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Speed.g.cs @@ -509,10 +509,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(SpeedUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(SpeedUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -522,7 +519,26 @@ public static string GetAbbreviation(SpeedUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(SpeedUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(SpeedUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Speed"; + var resourceManager = new ResourceManager(resourceName, typeof(Speed).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -1443,25 +1459,6 @@ public Speed ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(SpeedUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Speed"; - var resourceManager = new ResourceManager(resourceName, typeof(Speed).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/StandardVolumeFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/StandardVolumeFlow.g.cs index 7563e14f5f..8cc4d6a844 100644 --- a/UnitsNet/GeneratedCode/Quantities/StandardVolumeFlow.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/StandardVolumeFlow.g.cs @@ -269,10 +269,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(StandardVolumeFlowUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(StandardVolumeFlowUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -282,7 +279,26 @@ public static string GetAbbreviation(StandardVolumeFlowUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(StandardVolumeFlowUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(StandardVolumeFlowUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.StandardVolumeFlow"; + var resourceManager = new ResourceManager(resourceName, typeof(StandardVolumeFlow).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -915,25 +931,6 @@ public StandardVolumeFlow ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(StandardVolumeFlowUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.StandardVolumeFlow"; - var resourceManager = new ResourceManager(resourceName, typeof(StandardVolumeFlow).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Temperature.g.cs b/UnitsNet/GeneratedCode/Quantities/Temperature.g.cs index 89f83c3fe3..59a93ed5da 100644 --- a/UnitsNet/GeneratedCode/Quantities/Temperature.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Temperature.g.cs @@ -275,10 +275,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(TemperatureUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(TemperatureUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -288,7 +285,26 @@ public static string GetAbbreviation(TemperatureUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(TemperatureUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(TemperatureUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Temperature"; + var resourceManager = new ResourceManager(resourceName, typeof(Temperature).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -887,25 +903,6 @@ public Temperature ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(TemperatureUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Temperature"; - var resourceManager = new ResourceManager(resourceName, typeof(Temperature).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs index 31ff830c04..8496eaae82 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs @@ -278,10 +278,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(TemperatureChangeRateUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(TemperatureChangeRateUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -291,7 +288,26 @@ public static string GetAbbreviation(TemperatureChangeRateUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(TemperatureChangeRateUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(TemperatureChangeRateUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.TemperatureChangeRate"; + var resourceManager = new ResourceManager(resourceName, typeof(TemperatureChangeRate).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -936,25 +952,6 @@ public TemperatureChangeRate ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(TemperatureChangeRateUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.TemperatureChangeRate"; - var resourceManager = new ResourceManager(resourceName, typeof(TemperatureChangeRate).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs index 65b928c45c..64cf426bcd 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs @@ -269,10 +269,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(TemperatureDeltaUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(TemperatureDeltaUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -282,7 +279,26 @@ public static string GetAbbreviation(TemperatureDeltaUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(TemperatureDeltaUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(TemperatureDeltaUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.TemperatureDelta"; + var resourceManager = new ResourceManager(resourceName, typeof(TemperatureDelta).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -915,25 +931,6 @@ public TemperatureDelta ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(TemperatureDeltaUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.TemperatureDelta"; - var resourceManager = new ResourceManager(resourceName, typeof(TemperatureDelta).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureGradient.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureGradient.g.cs index cb49c181e7..5aabf9b255 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureGradient.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureGradient.g.cs @@ -224,10 +224,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(TemperatureGradientUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(TemperatureGradientUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -237,7 +234,26 @@ public static string GetAbbreviation(TemperatureGradientUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(TemperatureGradientUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(TemperatureGradientUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.TemperatureGradient"; + var resourceManager = new ResourceManager(resourceName, typeof(TemperatureGradient).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -810,25 +826,6 @@ public TemperatureGradient ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(TemperatureGradientUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.TemperatureGradient"; - var resourceManager = new ResourceManager(resourceName, typeof(TemperatureGradient).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs b/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs index 25a6f60880..39e85acddf 100644 --- a/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs @@ -209,10 +209,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ThermalConductivityUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(ThermalConductivityUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -222,7 +219,26 @@ public static string GetAbbreviation(ThermalConductivityUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ThermalConductivityUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ThermalConductivityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ThermalConductivity"; + var resourceManager = new ResourceManager(resourceName, typeof(ThermalConductivity).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -771,25 +787,6 @@ public ThermalConductivity ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(ThermalConductivityUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ThermalConductivity"; - var resourceManager = new ResourceManager(resourceName, typeof(ThermalConductivity).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs b/UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs index f7c3bccd2d..3765387df2 100644 --- a/UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs @@ -242,10 +242,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ThermalResistanceUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(ThermalResistanceUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -255,7 +252,26 @@ public static string GetAbbreviation(ThermalResistanceUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ThermalResistanceUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(ThermalResistanceUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ThermalResistance"; + var resourceManager = new ResourceManager(resourceName, typeof(ThermalResistance).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -852,25 +868,6 @@ public ThermalResistance ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(ThermalResistanceUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ThermalResistance"; - var resourceManager = new ResourceManager(resourceName, typeof(ThermalResistance).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Torque.g.cs b/UnitsNet/GeneratedCode/Quantities/Torque.g.cs index fa44d453f9..7632e50fe2 100644 --- a/UnitsNet/GeneratedCode/Quantities/Torque.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Torque.g.cs @@ -416,10 +416,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(TorqueUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(TorqueUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -429,7 +426,26 @@ public static string GetAbbreviation(TorqueUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(TorqueUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(TorqueUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Torque"; + var resourceManager = new ResourceManager(resourceName, typeof(Torque).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -1254,25 +1270,6 @@ public Torque ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(TorqueUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Torque"; - var resourceManager = new ResourceManager(resourceName, typeof(Torque).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/TorquePerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/TorquePerLength.g.cs index f9b7822921..e11ddd404a 100644 --- a/UnitsNet/GeneratedCode/Quantities/TorquePerLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TorquePerLength.g.cs @@ -380,10 +380,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(TorquePerLengthUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(TorquePerLengthUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -393,7 +390,26 @@ public static string GetAbbreviation(TorquePerLengthUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(TorquePerLengthUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(TorquePerLengthUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.TorquePerLength"; + var resourceManager = new ResourceManager(resourceName, typeof(TorquePerLength).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -1170,25 +1186,6 @@ public TorquePerLength ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(TorquePerLengthUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.TorquePerLength"; - var resourceManager = new ResourceManager(resourceName, typeof(TorquePerLength).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Turbidity.g.cs b/UnitsNet/GeneratedCode/Quantities/Turbidity.g.cs index 2f71ca5334..aaa8c5c2d3 100644 --- a/UnitsNet/GeneratedCode/Quantities/Turbidity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Turbidity.g.cs @@ -200,10 +200,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(TurbidityUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(TurbidityUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -213,7 +210,26 @@ public static string GetAbbreviation(TurbidityUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(TurbidityUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(TurbidityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Turbidity"; + var resourceManager = new ResourceManager(resourceName, typeof(Turbidity).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -750,25 +766,6 @@ public Turbidity ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(TurbidityUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Turbidity"; - var resourceManager = new ResourceManager(resourceName, typeof(Turbidity).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs b/UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs index 238e2c5e18..653843a639 100644 --- a/UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs @@ -197,10 +197,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(VitaminAUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(VitaminAUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -210,7 +207,26 @@ public static string GetAbbreviation(VitaminAUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(VitaminAUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(VitaminAUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.VitaminA"; + var resourceManager = new ResourceManager(resourceName, typeof(VitaminA).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -747,25 +763,6 @@ public VitaminA ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(VitaminAUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.VitaminA"; - var resourceManager = new ResourceManager(resourceName, typeof(VitaminA).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Volume.g.cs b/UnitsNet/GeneratedCode/Quantities/Volume.g.cs index 64d895799e..cb9866c464 100644 --- a/UnitsNet/GeneratedCode/Quantities/Volume.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Volume.g.cs @@ -713,10 +713,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(VolumeUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(VolumeUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -726,7 +723,26 @@ public static string GetAbbreviation(VolumeUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(VolumeUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(VolumeUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Volume"; + var resourceManager = new ResourceManager(resourceName, typeof(Volume).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -1887,25 +1903,6 @@ public Volume ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(VolumeUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Volume"; - var resourceManager = new ResourceManager(resourceName, typeof(Volume).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs index 2aa9645c74..f12d66a144 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs @@ -371,10 +371,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(VolumeConcentrationUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(VolumeConcentrationUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -384,7 +381,26 @@ public static string GetAbbreviation(VolumeConcentrationUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(VolumeConcentrationUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(VolumeConcentrationUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.VolumeConcentration"; + var resourceManager = new ResourceManager(resourceName, typeof(VolumeConcentration).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -1149,25 +1165,6 @@ public VolumeConcentration ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(VolumeConcentrationUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.VolumeConcentration"; - var resourceManager = new ResourceManager(resourceName, typeof(VolumeConcentration).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs index b37c444377..c0a3aac97b 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs @@ -773,10 +773,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(VolumeFlowUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(VolumeFlowUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -786,7 +783,26 @@ public static string GetAbbreviation(VolumeFlowUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(VolumeFlowUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(VolumeFlowUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.VolumeFlow"; + var resourceManager = new ResourceManager(resourceName, typeof(VolumeFlow).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -2055,25 +2071,6 @@ public VolumeFlow ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(VolumeFlowUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.VolumeFlow"; - var resourceManager = new ResourceManager(resourceName, typeof(VolumeFlow).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/VolumeFlowPerArea.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumeFlowPerArea.g.cs index 8a144126f0..b00cea77c9 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumeFlowPerArea.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumeFlowPerArea.g.cs @@ -206,10 +206,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(VolumeFlowPerAreaUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(VolumeFlowPerAreaUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -219,7 +216,26 @@ public static string GetAbbreviation(VolumeFlowPerAreaUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(VolumeFlowPerAreaUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(VolumeFlowPerAreaUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.VolumeFlowPerArea"; + var resourceManager = new ResourceManager(resourceName, typeof(VolumeFlowPerArea).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -768,25 +784,6 @@ public VolumeFlowPerArea ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(VolumeFlowPerAreaUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.VolumeFlowPerArea"; - var resourceManager = new ResourceManager(resourceName, typeof(VolumeFlowPerArea).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs index 35d56b9a46..5df63b1faa 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs @@ -251,10 +251,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(VolumePerLengthUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(VolumePerLengthUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -264,7 +261,26 @@ public static string GetAbbreviation(VolumePerLengthUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(VolumePerLengthUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(VolumePerLengthUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.VolumePerLength"; + var resourceManager = new ResourceManager(resourceName, typeof(VolumePerLength).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -873,25 +889,6 @@ public VolumePerLength ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(VolumePerLengthUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.VolumePerLength"; - var resourceManager = new ResourceManager(resourceName, typeof(VolumePerLength).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs index 195d6e2a54..2761ac0b6b 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs @@ -272,10 +272,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(VolumetricHeatCapacityUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(VolumetricHeatCapacityUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -285,7 +282,26 @@ public static string GetAbbreviation(VolumetricHeatCapacityUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(VolumetricHeatCapacityUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(VolumetricHeatCapacityUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.VolumetricHeatCapacity"; + var resourceManager = new ResourceManager(resourceName, typeof(VolumetricHeatCapacity).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -918,25 +934,6 @@ public VolumetricHeatCapacity ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(VolumetricHeatCapacityUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.VolumetricHeatCapacity"; - var resourceManager = new ResourceManager(resourceName, typeof(VolumetricHeatCapacity).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs b/UnitsNet/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs index b2ccf8c481..a3ce367237 100644 --- a/UnitsNet/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs @@ -242,10 +242,7 @@ internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbrev /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(WarpingMomentOfInertiaUnit unit) - { - return GetAbbreviation(unit, null); - } + public static string GetAbbreviation(WarpingMomentOfInertiaUnit unit) => GetAbbreviation(unit, null); /// /// Get unit abbreviation string. @@ -255,7 +252,26 @@ public static string GetAbbreviation(WarpingMomentOfInertiaUnit unit) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(WarpingMomentOfInertiaUnit unit, IFormatProvider? provider) { - return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); + return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; + } + + /// + /// + /// + /// + /// + /// + public static string[] GetAbbreviations(WarpingMomentOfInertiaUnit unit, CultureInfo? culture = null) + { + const string resourceName = $"UnitsNet.GeneratedCode.Resources.WarpingMomentOfInertia"; + var resourceManager = new ResourceManager(resourceName, typeof(WarpingMomentOfInertia).Assembly); + + var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + + if(abbreviation is not null) + return abbreviation.Split(','); + else + return Array.Empty(); } #endregion @@ -852,25 +868,6 @@ public WarpingMomentOfInertia ToUnit(UnitSystem unitSystem) /// public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - /// - /// - /// - /// - /// - /// - public static string[] GetAbbreviations(WarpingMomentOfInertiaUnit unit, CultureInfo? culture = null) - { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.WarpingMomentOfInertia"; - var resourceManager = new ResourceManager(resourceName, typeof(WarpingMomentOfInertia).Assembly); - - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); - - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); - } - #region ToString Methods /// From fce938292e39c817b3f05d50bb189c3f9986d8e0 Mon Sep 17 00:00:00 2001 From: Tristan Milnthorp Date: Tue, 28 Feb 2023 16:34:13 -0500 Subject: [PATCH 13/26] Don't map in unit --- .../UnitsNetGen/QuantityGenerator.cs | 26 +--- UnitsNet/CustomCode/UnitAbbreviationsCache.cs | 11 -- .../Quantities/Acceleration.g.cs | 39 +----- .../Quantities/AmountOfSubstance.g.cs | 26 +--- .../Quantities/AmplitudeRatio.g.cs | 15 +-- UnitsNet/GeneratedCode/Quantities/Angle.g.cs | 39 +----- .../Quantities/ApparentEnergy.g.cs | 14 +-- .../Quantities/ApparentPower.g.cs | 17 +-- UnitsNet/GeneratedCode/Quantities/Area.g.cs | 52 +------- .../GeneratedCode/Quantities/AreaDensity.g.cs | 14 +-- .../Quantities/AreaMomentOfInertia.g.cs | 17 +-- .../GeneratedCode/Quantities/BitRate.g.cs | 37 +----- .../BrakeSpecificFuelConsumption.g.cs | 14 +-- .../GeneratedCode/Quantities/Capacitance.g.cs | 18 +-- .../CoefficientOfThermalExpansion.g.cs | 14 +-- .../Quantities/Compressibility.g.cs | 18 +-- .../GeneratedCode/Quantities/Density.g.cs | 66 +---------- .../GeneratedCode/Quantities/Duration.g.cs | 32 +---- .../Quantities/DynamicViscosity.g.cs | 21 +--- .../Quantities/ElectricAdmittance.g.cs | 15 +-- .../Quantities/ElectricCharge.g.cs | 22 +--- .../Quantities/ElectricChargeDensity.g.cs | 12 +- .../Quantities/ElectricConductance.g.cs | 16 +-- .../Quantities/ElectricConductivity.g.cs | 17 +-- .../Quantities/ElectricCurrent.g.cs | 20 +--- .../Quantities/ElectricCurrentDensity.g.cs | 14 +-- .../Quantities/ElectricCurrentGradient.g.cs | 15 +-- .../Quantities/ElectricField.g.cs | 12 +- .../Quantities/ElectricInductance.g.cs | 16 +-- .../Quantities/ElectricPotential.g.cs | 23 +--- .../Quantities/ElectricPotentialAc.g.cs | 16 +-- .../ElectricPotentialChangeRate.g.cs | 31 +---- .../Quantities/ElectricPotentialDc.g.cs | 16 +-- .../Quantities/ElectricResistance.g.cs | 18 +-- .../Quantities/ElectricResistivity.g.cs | 25 +--- .../ElectricSurfaceChargeDensity.g.cs | 14 +-- UnitsNet/GeneratedCode/Quantities/Energy.g.cs | 70 +---------- .../Quantities/EnergyDensity.g.cs | 23 +--- .../GeneratedCode/Quantities/Entropy.g.cs | 18 +-- UnitsNet/GeneratedCode/Quantities/Force.g.cs | 39 +----- .../Quantities/ForceChangeRate.g.cs | 26 +--- .../Quantities/ForcePerLength.g.cs | 55 +-------- .../GeneratedCode/Quantities/Frequency.g.cs | 33 +----- .../Quantities/FuelEfficiency.g.cs | 15 +-- .../GeneratedCode/Quantities/HeatFlux.g.cs | 29 +---- .../Quantities/HeatTransferCoefficient.g.cs | 17 +-- .../GeneratedCode/Quantities/Illuminance.g.cs | 15 +-- .../GeneratedCode/Quantities/Impulse.g.cs | 24 +--- .../GeneratedCode/Quantities/Information.g.cs | 37 +----- .../GeneratedCode/Quantities/Irradiance.g.cs | 25 +--- .../GeneratedCode/Quantities/Irradiation.g.cs | 18 +-- UnitsNet/GeneratedCode/Quantities/Jerk.g.cs | 33 +----- .../Quantities/KinematicViscosity.g.cs | 28 +---- UnitsNet/GeneratedCode/Quantities/Length.g.cs | 82 +------------ UnitsNet/GeneratedCode/Quantities/Level.g.cs | 13 +- .../Quantities/LinearDensity.g.cs | 25 +--- .../Quantities/LinearPowerDensity.g.cs | 36 +----- .../GeneratedCode/Quantities/Luminance.g.cs | 21 +--- .../GeneratedCode/Quantities/Luminosity.g.cs | 25 +--- .../Quantities/LuminousFlux.g.cs | 12 +- .../Quantities/LuminousIntensity.g.cs | 12 +- .../Quantities/MagneticField.g.cs | 17 +-- .../Quantities/MagneticFlux.g.cs | 12 +- .../Quantities/Magnetization.g.cs | 12 +- UnitsNet/GeneratedCode/Quantities/Mass.g.cs | 71 +---------- .../Quantities/MassConcentration.g.cs | 64 +--------- .../GeneratedCode/Quantities/MassFlow.g.cs | 46 +------ .../GeneratedCode/Quantities/MassFlux.g.cs | 23 +--- .../Quantities/MassFraction.g.cs | 35 +----- .../Quantities/MassMomentOfInertia.g.cs | 39 +----- .../GeneratedCode/Quantities/MolarEnergy.g.cs | 14 +-- .../Quantities/MolarEntropy.g.cs | 14 +-- .../GeneratedCode/Quantities/MolarFlow.g.cs | 20 +--- .../GeneratedCode/Quantities/MolarMass.g.cs | 36 +----- .../GeneratedCode/Quantities/Molarity.g.cs | 22 +--- .../Quantities/Permeability.g.cs | 12 +- .../Quantities/Permittivity.g.cs | 12 +- .../Quantities/PorousMediumPermeability.g.cs | 16 +-- UnitsNet/GeneratedCode/Quantities/Power.g.cs | 37 +----- .../Quantities/PowerDensity.g.cs | 55 +-------- .../GeneratedCode/Quantities/PowerRatio.g.cs | 13 +- .../GeneratedCode/Quantities/Pressure.g.cs | 89 +------------- .../Quantities/PressureChangeRate.g.cs | 39 +----- UnitsNet/GeneratedCode/Quantities/Ratio.g.cs | 17 +-- .../Quantities/RatioChangeRate.g.cs | 13 +- .../Quantities/ReactiveEnergy.g.cs | 14 +-- .../Quantities/ReactivePower.g.cs | 15 +-- .../Quantities/ReciprocalArea.g.cs | 22 +--- .../Quantities/ReciprocalLength.g.cs | 21 +--- .../Quantities/RelativeHumidity.g.cs | 12 +- .../Quantities/RotationalAcceleration.g.cs | 15 +-- .../Quantities/RotationalSpeed.g.cs | 36 +----- .../Quantities/RotationalStiffness.g.cs | 44 +------ .../RotationalStiffnessPerLength.g.cs | 16 +-- UnitsNet/GeneratedCode/Quantities/Scalar.g.cs | 12 +- .../GeneratedCode/Quantities/SolidAngle.g.cs | 12 +- .../Quantities/SpecificEnergy.g.cs | 41 +------ .../Quantities/SpecificEntropy.g.cs | 20 +--- .../Quantities/SpecificFuelConsumption.g.cs | 15 +-- .../Quantities/SpecificVolume.g.cs | 14 +-- .../Quantities/SpecificWeight.g.cs | 28 +---- UnitsNet/GeneratedCode/Quantities/Speed.g.cs | 68 +---------- .../Quantities/StandardVolumeFlow.g.cs | 20 +--- .../GeneratedCode/Quantities/Temperature.g.cs | 21 +--- .../Quantities/TemperatureChangeRate.g.cs | 21 +--- .../Quantities/TemperatureDelta.g.cs | 20 +--- .../Quantities/TemperatureGradient.g.cs | 15 +-- .../Quantities/ThermalConductivity.g.cs | 13 +- .../Quantities/ThermalResistance.g.cs | 17 +-- UnitsNet/GeneratedCode/Quantities/Torque.g.cs | 39 +----- .../Quantities/TorquePerLength.g.cs | 35 +----- .../GeneratedCode/Quantities/Turbidity.g.cs | 12 +- .../GeneratedCode/Quantities/VitaminA.g.cs | 12 +- UnitsNet/GeneratedCode/Quantities/Volume.g.cs | 112 +----------------- .../Quantities/VolumeConcentration.g.cs | 31 +---- .../GeneratedCode/Quantities/VolumeFlow.g.cs | 100 +--------------- .../Quantities/VolumeFlowPerArea.g.cs | 13 +- .../Quantities/VolumePerLength.g.cs | 18 +-- .../Quantities/VolumetricHeatCapacity.g.cs | 20 +--- .../Quantities/WarpingMomentOfInertia.g.cs | 17 +-- UnitsNet/IQuantity.cs | 3 +- UnitsNet/QuantityFormatter.cs | 2 +- 122 files changed, 479 insertions(+), 2718 deletions(-) diff --git a/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs b/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs index b5f5eef708..bd3d8b22f0 100644 --- a/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs +++ b/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs @@ -37,11 +37,12 @@ public string Generate() Writer.WL(GeneratedFileHeader); Writer.WL(@" using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -360,25 +361,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) Writer.WL($@" }} - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - {{"); - foreach(Unit unit in _quantity.Units) - { - foreach(Localization localization in unit.Localization) - { - // All units must have a unit abbreviation, so fallback to "" for units with no abbreviations defined in JSON - var abbreviationParams = localization.Abbreviations.Any() ? - string.Join(", ", localization.Abbreviations.Select(abbr => $@"""{abbr}""")) : - $@""""""; - - Writer.WL($@" - unitAbbreviationsCache.PerformAbbreviationMapping({_unitEnumName}.{unit.SingularName}, new CultureInfo(""{localization.Culture}""), false, {unit.AllowAbbreviationLookup.ToString().ToLower()}, new string[]{{{abbreviationParams}}});"); - } - } - - Writer.WL($@" - }} - /// /// Get unit abbreviation string. /// @@ -403,7 +385,7 @@ public static string GetAbbreviation({_unitEnumName} unit, IFormatProvider? prov /// /// /// - public static string[] GetAbbreviations({_unitEnumName} unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations({_unitEnumName} unit, CultureInfo? culture = null) {{ const string resourceName = $""UnitsNet.GeneratedCode.Resources.{_quantity.Name}""; var resourceManager = new ResourceManager(resourceName, typeof({_quantity.Name}).Assembly); @@ -1119,7 +1101,7 @@ private void GenerateToString() Writer.WL($@" /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/CustomCode/UnitAbbreviationsCache.cs b/UnitsNet/CustomCode/UnitAbbreviationsCache.cs index 6bb34bf28f..1b72676542 100644 --- a/UnitsNet/CustomCode/UnitAbbreviationsCache.cs +++ b/UnitsNet/CustomCode/UnitAbbreviationsCache.cs @@ -43,8 +43,6 @@ public sealed class UnitAbbreviationsCache public UnitAbbreviationsCache() { _lookupsForCulture = new Dictionary(); - - LoadGeneratedAbbreviations(); } static UnitAbbreviationsCache() @@ -52,15 +50,6 @@ static UnitAbbreviationsCache() Default = new UnitAbbreviationsCache(); } - private void LoadGeneratedAbbreviations() - { - foreach (Type quantity in Quantity.GetQuantityTypes()) - { - var mapGeneratedLocalizationsMethod = quantity.GetMethod(nameof(Length.MapGeneratedLocalizations), BindingFlags.NonPublic | BindingFlags.Static); - mapGeneratedLocalizationsMethod?.Invoke(null, new object[]{this}); - } - } - /// /// Adds one or more unit abbreviation for the given unit enum value. /// This is used to dynamically add abbreviations for existing unit enums such as or to extend with third-party unit enums diff --git a/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs b/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs index bbd432b087..8b3f6639ba 100644 --- a/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -297,38 +298,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(AccelerationUnit.MeterPerSecondSquared, AccelerationUnit.StandardGravity, quantity => quantity.ToUnit(AccelerationUnit.StandardGravity)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.CentimeterPerSecondSquared, new CultureInfo("en-US"), false, true, new string[]{"cm/s²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.CentimeterPerSecondSquared, new CultureInfo("ru-RU"), false, true, new string[]{"см/с²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.DecimeterPerSecondSquared, new CultureInfo("en-US"), false, true, new string[]{"dm/s²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.DecimeterPerSecondSquared, new CultureInfo("ru-RU"), false, true, new string[]{"дм/с²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.FootPerSecondSquared, new CultureInfo("en-US"), false, true, new string[]{"ft/s²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.FootPerSecondSquared, new CultureInfo("ru-RU"), false, true, new string[]{"фут/с²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.InchPerSecondSquared, new CultureInfo("en-US"), false, true, new string[]{"in/s²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.InchPerSecondSquared, new CultureInfo("ru-RU"), false, true, new string[]{"дюйм/с²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.KilometerPerSecondSquared, new CultureInfo("en-US"), false, true, new string[]{"km/s²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.KilometerPerSecondSquared, new CultureInfo("ru-RU"), false, true, new string[]{"км/с²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.KnotPerHour, new CultureInfo("en-US"), false, true, new string[]{"kn/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.KnotPerHour, new CultureInfo("ru-RU"), false, true, new string[]{"узел/час"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.KnotPerMinute, new CultureInfo("en-US"), false, true, new string[]{"kn/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.KnotPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"узел/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.KnotPerSecond, new CultureInfo("en-US"), false, true, new string[]{"kn/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.KnotPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"узел/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.MeterPerSecondSquared, new CultureInfo("en-US"), false, true, new string[]{"m/s²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.MeterPerSecondSquared, new CultureInfo("ru-RU"), false, true, new string[]{"м/с²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.MicrometerPerSecondSquared, new CultureInfo("en-US"), false, true, new string[]{"µm/s²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.MicrometerPerSecondSquared, new CultureInfo("ru-RU"), false, true, new string[]{"мкм/с²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.MillimeterPerSecondSquared, new CultureInfo("en-US"), false, true, new string[]{"mm/s²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.MillimeterPerSecondSquared, new CultureInfo("ru-RU"), false, true, new string[]{"мм/с²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.MillistandardGravity, new CultureInfo("en-US"), false, true, new string[]{"mg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.MillistandardGravity, new CultureInfo("ru-RU"), false, true, new string[]{"мg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.NanometerPerSecondSquared, new CultureInfo("en-US"), false, true, new string[]{"nm/s²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.NanometerPerSecondSquared, new CultureInfo("ru-RU"), false, true, new string[]{"нм/с²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.StandardGravity, new CultureInfo("en-US"), false, true, new string[]{"g"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.StandardGravity, new CultureInfo("ru-RU"), false, true, new string[]{"g"}); - } - /// /// Get unit abbreviation string. /// @@ -353,7 +322,7 @@ public static string GetAbbreviation(AccelerationUnit unit, IFormatProvider? pro /// /// /// - public static string[] GetAbbreviations(AccelerationUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(AccelerationUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.Acceleration"; var resourceManager = new ResourceManager(resourceName, typeof(Acceleration).Assembly); @@ -1063,7 +1032,7 @@ public Acceleration ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs index 109931b04f..a2ba297337 100644 --- a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -305,25 +306,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(AmountOfSubstanceUnit.Mole, AmountOfSubstanceUnit.PoundMole, quantity => quantity.ToUnit(AmountOfSubstanceUnit.PoundMole)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(AmountOfSubstanceUnit.Centimole, new CultureInfo("en-US"), false, true, new string[]{"cmol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AmountOfSubstanceUnit.CentipoundMole, new CultureInfo("en-US"), false, true, new string[]{"clbmol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AmountOfSubstanceUnit.Decimole, new CultureInfo("en-US"), false, true, new string[]{"dmol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AmountOfSubstanceUnit.DecipoundMole, new CultureInfo("en-US"), false, true, new string[]{"dlbmol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AmountOfSubstanceUnit.Kilomole, new CultureInfo("en-US"), false, true, new string[]{"kmol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AmountOfSubstanceUnit.KilopoundMole, new CultureInfo("en-US"), false, true, new string[]{"klbmol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AmountOfSubstanceUnit.Megamole, new CultureInfo("en-US"), false, true, new string[]{"Mmol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AmountOfSubstanceUnit.Micromole, new CultureInfo("en-US"), false, true, new string[]{"µmol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AmountOfSubstanceUnit.MicropoundMole, new CultureInfo("en-US"), false, true, new string[]{"µlbmol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AmountOfSubstanceUnit.Millimole, new CultureInfo("en-US"), false, true, new string[]{"mmol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AmountOfSubstanceUnit.MillipoundMole, new CultureInfo("en-US"), false, true, new string[]{"mlbmol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AmountOfSubstanceUnit.Mole, new CultureInfo("en-US"), false, true, new string[]{"mol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AmountOfSubstanceUnit.Nanomole, new CultureInfo("en-US"), false, true, new string[]{"nmol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AmountOfSubstanceUnit.NanopoundMole, new CultureInfo("en-US"), false, true, new string[]{"nlbmol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AmountOfSubstanceUnit.PoundMole, new CultureInfo("en-US"), false, true, new string[]{"lbmol"}); - } - /// /// Get unit abbreviation string. /// @@ -348,7 +330,7 @@ public static string GetAbbreviation(AmountOfSubstanceUnit unit, IFormatProvider /// /// /// - public static string[] GetAbbreviations(AmountOfSubstanceUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(AmountOfSubstanceUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.AmountOfSubstance"; var resourceManager = new ResourceManager(resourceName, typeof(AmountOfSubstance).Assembly); @@ -1070,7 +1052,7 @@ public AmountOfSubstance ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs b/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs index 4f70aeb828..11018b19ba 100644 --- a/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -217,14 +218,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(AmplitudeRatioUnit.DecibelVolt, AmplitudeRatioUnit.DecibelUnloaded, quantity => quantity.ToUnit(AmplitudeRatioUnit.DecibelUnloaded)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(AmplitudeRatioUnit.DecibelMicrovolt, new CultureInfo("en-US"), false, true, new string[]{"dBµV"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AmplitudeRatioUnit.DecibelMillivolt, new CultureInfo("en-US"), false, true, new string[]{"dBmV"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AmplitudeRatioUnit.DecibelUnloaded, new CultureInfo("en-US"), false, true, new string[]{"dBu"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AmplitudeRatioUnit.DecibelVolt, new CultureInfo("en-US"), false, true, new string[]{"dBV"}); - } - /// /// Get unit abbreviation string. /// @@ -249,7 +242,7 @@ public static string GetAbbreviation(AmplitudeRatioUnit unit, IFormatProvider? p /// /// /// - public static string[] GetAbbreviations(AmplitudeRatioUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(AmplitudeRatioUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.AmplitudeRatio"; var resourceManager = new ResourceManager(resourceName, typeof(AmplitudeRatio).Assembly); @@ -847,7 +840,7 @@ public AmplitudeRatio ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/Angle.g.cs b/UnitsNet/GeneratedCode/Quantities/Angle.g.cs index b2b00a28ca..9649853f94 100644 --- a/UnitsNet/GeneratedCode/Quantities/Angle.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Angle.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -313,38 +314,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(AngleUnit.Degree, AngleUnit.Tilt, quantity => quantity.ToUnit(AngleUnit.Tilt)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Arcminute, new CultureInfo("en-US"), false, true, new string[]{"'", "arcmin", "amin", "min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Arcsecond, new CultureInfo("en-US"), false, true, new string[]{"″", "arcsec", "asec", "sec"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Centiradian, new CultureInfo("en-US"), false, true, new string[]{"crad"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Centiradian, new CultureInfo("ru-RU"), false, true, new string[]{"срад"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Deciradian, new CultureInfo("en-US"), false, true, new string[]{"drad"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Deciradian, new CultureInfo("ru-RU"), false, true, new string[]{"драд"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Degree, new CultureInfo("en-US"), false, true, new string[]{"°", "deg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Degree, new CultureInfo("ru-RU"), false, true, new string[]{"°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Gradian, new CultureInfo("en-US"), false, true, new string[]{"g"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Gradian, new CultureInfo("ru-RU"), false, true, new string[]{"g"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Microdegree, new CultureInfo("en-US"), false, true, new string[]{"µ°", "µdeg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Microdegree, new CultureInfo("ru-RU"), false, true, new string[]{"мк°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Microradian, new CultureInfo("en-US"), false, true, new string[]{"µrad"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Microradian, new CultureInfo("ru-RU"), false, true, new string[]{"мкрад"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Millidegree, new CultureInfo("en-US"), false, true, new string[]{"m°", "mdeg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Millidegree, new CultureInfo("ru-RU"), false, true, new string[]{"м°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Milliradian, new CultureInfo("en-US"), false, true, new string[]{"mrad"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Milliradian, new CultureInfo("ru-RU"), false, true, new string[]{"мрад"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Nanodegree, new CultureInfo("en-US"), false, true, new string[]{"n°", "ndeg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Nanodegree, new CultureInfo("ru-RU"), false, true, new string[]{"н°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Nanoradian, new CultureInfo("en-US"), false, true, new string[]{"nrad"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Nanoradian, new CultureInfo("ru-RU"), false, true, new string[]{"нрад"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.NatoMil, new CultureInfo("en-US"), false, true, new string[]{"mil"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Radian, new CultureInfo("en-US"), false, true, new string[]{"rad"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Radian, new CultureInfo("ru-RU"), false, true, new string[]{"рад"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Revolution, new CultureInfo("en-US"), false, true, new string[]{"r"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Revolution, new CultureInfo("ru-RU"), false, true, new string[]{"r"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Tilt, new CultureInfo("en-US"), false, true, new string[]{"sin(θ)"}); - } - /// /// Get unit abbreviation string. /// @@ -369,7 +338,7 @@ public static string GetAbbreviation(AngleUnit unit, IFormatProvider? provider) /// /// /// - public static string[] GetAbbreviations(AngleUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(AngleUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.Angle"; var resourceManager = new ResourceManager(resourceName, typeof(Angle).Assembly); @@ -1103,7 +1072,7 @@ public Angle ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs index 9d2d843945..5eccb69ad8 100644 --- a/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -209,13 +210,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ApparentEnergyUnit.VoltampereHour, ApparentEnergyUnit.MegavoltampereHour, quantity => quantity.ToUnit(ApparentEnergyUnit.MegavoltampereHour)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ApparentEnergyUnit.KilovoltampereHour, new CultureInfo("en-US"), false, true, new string[]{"kVAh"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ApparentEnergyUnit.MegavoltampereHour, new CultureInfo("en-US"), false, true, new string[]{"MVAh"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ApparentEnergyUnit.VoltampereHour, new CultureInfo("en-US"), false, true, new string[]{"VAh"}); - } - /// /// Get unit abbreviation string. /// @@ -240,7 +234,7 @@ public static string GetAbbreviation(ApparentEnergyUnit unit, IFormatProvider? p /// /// /// - public static string[] GetAbbreviations(ApparentEnergyUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(ApparentEnergyUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.ApparentEnergy"; var resourceManager = new ResourceManager(resourceName, typeof(ApparentEnergy).Assembly); @@ -818,7 +812,7 @@ public ApparentEnergy ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs b/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs index 56a6ad0e98..9fdf8b48fd 100644 --- a/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -233,16 +234,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ApparentPowerUnit.Voltampere, ApparentPowerUnit.Millivoltampere, quantity => quantity.ToUnit(ApparentPowerUnit.Millivoltampere)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ApparentPowerUnit.Gigavoltampere, new CultureInfo("en-US"), false, true, new string[]{"GVA"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ApparentPowerUnit.Kilovoltampere, new CultureInfo("en-US"), false, true, new string[]{"kVA"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ApparentPowerUnit.Megavoltampere, new CultureInfo("en-US"), false, true, new string[]{"MVA"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ApparentPowerUnit.Microvoltampere, new CultureInfo("en-US"), false, true, new string[]{"µVA"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ApparentPowerUnit.Millivoltampere, new CultureInfo("en-US"), false, true, new string[]{"mVA"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ApparentPowerUnit.Voltampere, new CultureInfo("en-US"), false, true, new string[]{"VA"}); - } - /// /// Get unit abbreviation string. /// @@ -267,7 +258,7 @@ public static string GetAbbreviation(ApparentPowerUnit unit, IFormatProvider? pr /// /// /// - public static string[] GetAbbreviations(ApparentPowerUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(ApparentPowerUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.ApparentPower"; var resourceManager = new ResourceManager(resourceName, typeof(ApparentPower).Assembly); @@ -881,7 +872,7 @@ public ApparentPower ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/Area.g.cs b/UnitsNet/GeneratedCode/Quantities/Area.g.cs index b3c722d518..6ac3175ec9 100644 --- a/UnitsNet/GeneratedCode/Quantities/Area.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Area.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -297,51 +298,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(AreaUnit.SquareMeter, AreaUnit.UsSurveySquareFoot, quantity => quantity.ToUnit(AreaUnit.UsSurveySquareFoot)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.Acre, new CultureInfo("en-US"), false, true, new string[]{"ac"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.Acre, new CultureInfo("ru-RU"), false, true, new string[]{"акр"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.Acre, new CultureInfo("zh-CN"), false, true, new string[]{"英亩"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.Hectare, new CultureInfo("en-US"), false, true, new string[]{"ha"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.Hectare, new CultureInfo("ru-RU"), false, true, new string[]{"га"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.Hectare, new CultureInfo("zh-CN"), false, true, new string[]{"英亩"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareCentimeter, new CultureInfo("ru-RU"), false, true, new string[]{"см²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareCentimeter, new CultureInfo("zh-CN"), false, true, new string[]{"平方厘米"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareDecimeter, new CultureInfo("en-US"), false, true, new string[]{"dm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareDecimeter, new CultureInfo("ru-RU"), false, true, new string[]{"дм²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareDecimeter, new CultureInfo("zh-CN"), false, true, new string[]{"平方分米"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareFoot, new CultureInfo("en-US"), false, true, new string[]{"ft²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareFoot, new CultureInfo("ru-RU"), false, true, new string[]{"фут²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareFoot, new CultureInfo("zh-CN"), false, true, new string[]{"平方英尺"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareInch, new CultureInfo("en-US"), false, true, new string[]{"in²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareInch, new CultureInfo("ru-RU"), false, true, new string[]{"дюйм²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareInch, new CultureInfo("zh-CN"), false, true, new string[]{"平方英寸"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareKilometer, new CultureInfo("en-US"), false, true, new string[]{"km²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareKilometer, new CultureInfo("ru-RU"), false, true, new string[]{"км²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareKilometer, new CultureInfo("zh-CN"), false, true, new string[]{"平方公里"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareMeter, new CultureInfo("en-US"), false, true, new string[]{"m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareMeter, new CultureInfo("ru-RU"), false, true, new string[]{"м²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareMeter, new CultureInfo("zh-CN"), false, true, new string[]{"平方米"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareMicrometer, new CultureInfo("en-US"), false, true, new string[]{"µm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareMicrometer, new CultureInfo("ru-RU"), false, true, new string[]{"мкм²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareMicrometer, new CultureInfo("zh-CN"), false, true, new string[]{"平方微米"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareMile, new CultureInfo("en-US"), false, true, new string[]{"mi²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareMile, new CultureInfo("ru-RU"), false, true, new string[]{"миля²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareMile, new CultureInfo("zh-CN"), false, true, new string[]{"平方英里"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareMillimeter, new CultureInfo("en-US"), false, true, new string[]{"mm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareMillimeter, new CultureInfo("ru-RU"), false, true, new string[]{"мм²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareMillimeter, new CultureInfo("zh-CN"), false, true, new string[]{"平方毫米"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareNauticalMile, new CultureInfo("en-US"), false, true, new string[]{"nmi²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareNauticalMile, new CultureInfo("ru-RU"), false, true, new string[]{"морск.миля²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareNauticalMile, new CultureInfo("zh-CN"), false, true, new string[]{"平方海里"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareYard, new CultureInfo("en-US"), false, true, new string[]{"yd²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareYard, new CultureInfo("ru-RU"), false, true, new string[]{"ярд²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareYard, new CultureInfo("zh-CN"), false, true, new string[]{"平方码"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.UsSurveySquareFoot, new CultureInfo("en-US"), false, true, new string[]{"ft² (US)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.UsSurveySquareFoot, new CultureInfo("ru-RU"), false, true, new string[]{"фут² (US)"}); - } - /// /// Get unit abbreviation string. /// @@ -366,7 +322,7 @@ public static string GetAbbreviation(AreaUnit unit, IFormatProvider? provider) /// /// /// - public static string[] GetAbbreviations(AreaUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(AreaUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.Area"; var resourceManager = new ResourceManager(resourceName, typeof(Area).Assembly); @@ -1076,7 +1032,7 @@ public Area ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs index 5875b88d0d..df3628c53f 100644 --- a/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -209,13 +210,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(AreaDensityUnit.KilogramPerSquareMeter, AreaDensityUnit.MilligramPerSquareMeter, quantity => quantity.ToUnit(AreaDensityUnit.MilligramPerSquareMeter)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(AreaDensityUnit.GramPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"g/m²", "gsm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaDensityUnit.KilogramPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"kg/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaDensityUnit.MilligramPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"mg/m²"}); - } - /// /// Get unit abbreviation string. /// @@ -240,7 +234,7 @@ public static string GetAbbreviation(AreaDensityUnit unit, IFormatProvider? prov /// /// /// - public static string[] GetAbbreviations(AreaDensityUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(AreaDensityUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.AreaDensity"; var resourceManager = new ResourceManager(resourceName, typeof(AreaDensity).Assembly); @@ -818,7 +812,7 @@ public AreaDensity ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs index f7ff85c09e..51f84ecaf6 100644 --- a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -233,16 +234,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(AreaMomentOfInertiaUnit.MeterToTheFourth, AreaMomentOfInertiaUnit.MillimeterToTheFourth, quantity => quantity.ToUnit(AreaMomentOfInertiaUnit.MillimeterToTheFourth)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(AreaMomentOfInertiaUnit.CentimeterToTheFourth, new CultureInfo("en-US"), false, true, new string[]{"cm⁴", "cm^4"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaMomentOfInertiaUnit.DecimeterToTheFourth, new CultureInfo("en-US"), false, true, new string[]{"dm⁴", "dm^4"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaMomentOfInertiaUnit.FootToTheFourth, new CultureInfo("en-US"), false, true, new string[]{"ft⁴", "ft^4"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaMomentOfInertiaUnit.InchToTheFourth, new CultureInfo("en-US"), false, true, new string[]{"in⁴", "in^4"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaMomentOfInertiaUnit.MeterToTheFourth, new CultureInfo("en-US"), false, true, new string[]{"m⁴", "m^4"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaMomentOfInertiaUnit.MillimeterToTheFourth, new CultureInfo("en-US"), false, true, new string[]{"mm⁴", "mm^4"}); - } - /// /// Get unit abbreviation string. /// @@ -267,7 +258,7 @@ public static string GetAbbreviation(AreaMomentOfInertiaUnit unit, IFormatProvid /// /// /// - public static string[] GetAbbreviations(AreaMomentOfInertiaUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(AreaMomentOfInertiaUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.AreaMomentOfInertia"; var resourceManager = new ResourceManager(resourceName, typeof(AreaMomentOfInertia).Assembly); @@ -881,7 +872,7 @@ public AreaMomentOfInertia ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs b/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs index 13e1ef3b15..3f52647917 100644 --- a/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -397,36 +398,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(BitRateUnit.BitPerSecond, BitRateUnit.TerabytePerSecond, quantity => quantity.ToUnit(BitRateUnit.TerabytePerSecond)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.BitPerSecond, new CultureInfo("en-US"), false, true, new string[]{"bit/s", "bps"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.BytePerSecond, new CultureInfo("en-US"), false, true, new string[]{"B/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.ExabitPerSecond, new CultureInfo("en-US"), false, true, new string[]{"Ebit/s", "Ebps"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.ExabytePerSecond, new CultureInfo("en-US"), false, true, new string[]{"EB/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.ExbibitPerSecond, new CultureInfo("en-US"), false, true, new string[]{"Eibit/s", "Eibps"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.ExbibytePerSecond, new CultureInfo("en-US"), false, true, new string[]{"EiB/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.GibibitPerSecond, new CultureInfo("en-US"), false, true, new string[]{"Gibit/s", "Gibps"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.GibibytePerSecond, new CultureInfo("en-US"), false, true, new string[]{"GiB/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.GigabitPerSecond, new CultureInfo("en-US"), false, true, new string[]{"Gbit/s", "Gbps"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.GigabytePerSecond, new CultureInfo("en-US"), false, true, new string[]{"GB/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.KibibitPerSecond, new CultureInfo("en-US"), false, true, new string[]{"Kibit/s", "Kibps"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.KibibytePerSecond, new CultureInfo("en-US"), false, true, new string[]{"KiB/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.KilobitPerSecond, new CultureInfo("en-US"), false, true, new string[]{"kbit/s", "kbps"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.KilobytePerSecond, new CultureInfo("en-US"), false, true, new string[]{"kB/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.MebibitPerSecond, new CultureInfo("en-US"), false, true, new string[]{"Mibit/s", "Mibps"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.MebibytePerSecond, new CultureInfo("en-US"), false, true, new string[]{"MiB/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.MegabitPerSecond, new CultureInfo("en-US"), false, true, new string[]{"Mbit/s", "Mbps"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.MegabytePerSecond, new CultureInfo("en-US"), false, true, new string[]{"MB/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.PebibitPerSecond, new CultureInfo("en-US"), false, true, new string[]{"Pibit/s", "Pibps"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.PebibytePerSecond, new CultureInfo("en-US"), false, true, new string[]{"PiB/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.PetabitPerSecond, new CultureInfo("en-US"), false, true, new string[]{"Pbit/s", "Pbps"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.PetabytePerSecond, new CultureInfo("en-US"), false, true, new string[]{"PB/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.TebibitPerSecond, new CultureInfo("en-US"), false, true, new string[]{"Tibit/s", "Tibps"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.TebibytePerSecond, new CultureInfo("en-US"), false, true, new string[]{"TiB/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.TerabitPerSecond, new CultureInfo("en-US"), false, true, new string[]{"Tbit/s", "Tbps"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.TerabytePerSecond, new CultureInfo("en-US"), false, true, new string[]{"TB/s"}); - } - /// /// Get unit abbreviation string. /// @@ -451,7 +422,7 @@ public static string GetAbbreviation(BitRateUnit unit, IFormatProvider? provider /// /// /// - public static string[] GetAbbreviations(BitRateUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(BitRateUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.BitRate"; var resourceManager = new ResourceManager(resourceName, typeof(BitRate).Assembly); @@ -1316,7 +1287,7 @@ public BitRate ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs index a5a1cc14e2..9fbcd7001f 100644 --- a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -209,13 +210,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(BrakeSpecificFuelConsumptionUnit.KilogramPerJoule, BrakeSpecificFuelConsumptionUnit.PoundPerMechanicalHorsepowerHour, quantity => quantity.ToUnit(BrakeSpecificFuelConsumptionUnit.PoundPerMechanicalHorsepowerHour)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(BrakeSpecificFuelConsumptionUnit.GramPerKiloWattHour, new CultureInfo("en-US"), false, true, new string[]{"g/kWh"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BrakeSpecificFuelConsumptionUnit.KilogramPerJoule, new CultureInfo("en-US"), false, true, new string[]{"kg/J"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BrakeSpecificFuelConsumptionUnit.PoundPerMechanicalHorsepowerHour, new CultureInfo("en-US"), false, true, new string[]{"lb/hph"}); - } - /// /// Get unit abbreviation string. /// @@ -240,7 +234,7 @@ public static string GetAbbreviation(BrakeSpecificFuelConsumptionUnit unit, IFor /// /// /// - public static string[] GetAbbreviations(BrakeSpecificFuelConsumptionUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(BrakeSpecificFuelConsumptionUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.BrakeSpecificFuelConsumption"; var resourceManager = new ResourceManager(resourceName, typeof(BrakeSpecificFuelConsumption).Assembly); @@ -818,7 +812,7 @@ public BrakeSpecificFuelConsumption ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs b/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs index 897bac727e..8b1a7745e9 100644 --- a/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -244,17 +245,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(CapacitanceUnit.Farad, CapacitanceUnit.Picofarad, quantity => quantity.ToUnit(CapacitanceUnit.Picofarad)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(CapacitanceUnit.Farad, new CultureInfo("en-US"), false, true, new string[]{"F"}); - unitAbbreviationsCache.PerformAbbreviationMapping(CapacitanceUnit.Kilofarad, new CultureInfo("en-US"), false, true, new string[]{"kF"}); - unitAbbreviationsCache.PerformAbbreviationMapping(CapacitanceUnit.Megafarad, new CultureInfo("en-US"), false, true, new string[]{"MF"}); - unitAbbreviationsCache.PerformAbbreviationMapping(CapacitanceUnit.Microfarad, new CultureInfo("en-US"), false, true, new string[]{"µF"}); - unitAbbreviationsCache.PerformAbbreviationMapping(CapacitanceUnit.Millifarad, new CultureInfo("en-US"), false, true, new string[]{"mF"}); - unitAbbreviationsCache.PerformAbbreviationMapping(CapacitanceUnit.Nanofarad, new CultureInfo("en-US"), false, true, new string[]{"nF"}); - unitAbbreviationsCache.PerformAbbreviationMapping(CapacitanceUnit.Picofarad, new CultureInfo("en-US"), false, true, new string[]{"pF"}); - } - /// /// Get unit abbreviation string. /// @@ -279,7 +269,7 @@ public static string GetAbbreviation(CapacitanceUnit unit, IFormatProvider? prov /// /// /// - public static string[] GetAbbreviations(CapacitanceUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(CapacitanceUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.Capacitance"; var resourceManager = new ResourceManager(resourceName, typeof(Capacitance).Assembly); @@ -905,7 +895,7 @@ public Capacitance ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs b/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs index c66af1105c..f1c0fff34b 100644 --- a/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -209,13 +210,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(CoefficientOfThermalExpansionUnit.InverseKelvin, CoefficientOfThermalExpansionUnit.InverseDegreeFahrenheit, quantity => quantity.ToUnit(CoefficientOfThermalExpansionUnit.InverseDegreeFahrenheit)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(CoefficientOfThermalExpansionUnit.InverseDegreeCelsius, new CultureInfo("en-US"), false, true, new string[]{"°C⁻¹", "1/°C"}); - unitAbbreviationsCache.PerformAbbreviationMapping(CoefficientOfThermalExpansionUnit.InverseDegreeFahrenheit, new CultureInfo("en-US"), false, true, new string[]{"°F⁻¹", "1/°F"}); - unitAbbreviationsCache.PerformAbbreviationMapping(CoefficientOfThermalExpansionUnit.InverseKelvin, new CultureInfo("en-US"), false, true, new string[]{"K⁻¹", "1/K"}); - } - /// /// Get unit abbreviation string. /// @@ -240,7 +234,7 @@ public static string GetAbbreviation(CoefficientOfThermalExpansionUnit unit, IFo /// /// /// - public static string[] GetAbbreviations(CoefficientOfThermalExpansionUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(CoefficientOfThermalExpansionUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.CoefficientOfThermalExpansion"; var resourceManager = new ResourceManager(resourceName, typeof(CoefficientOfThermalExpansion).Assembly); @@ -818,7 +812,7 @@ public CoefficientOfThermalExpansion ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/Compressibility.g.cs b/UnitsNet/GeneratedCode/Quantities/Compressibility.g.cs index aba16d0e17..16eff87ae7 100644 --- a/UnitsNet/GeneratedCode/Quantities/Compressibility.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Compressibility.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -241,17 +242,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(CompressibilityUnit.InversePascal, CompressibilityUnit.InversePoundForcePerSquareInch, quantity => quantity.ToUnit(CompressibilityUnit.InversePoundForcePerSquareInch)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(CompressibilityUnit.InverseAtmosphere, new CultureInfo("en-US"), false, true, new string[]{"atm⁻¹", "1/atm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(CompressibilityUnit.InverseBar, new CultureInfo("en-US"), false, true, new string[]{"bar⁻¹", "1/bar"}); - unitAbbreviationsCache.PerformAbbreviationMapping(CompressibilityUnit.InverseKilopascal, new CultureInfo("en-US"), false, true, new string[]{"kPa⁻¹", "1/kPa"}); - unitAbbreviationsCache.PerformAbbreviationMapping(CompressibilityUnit.InverseMegapascal, new CultureInfo("en-US"), false, true, new string[]{"MPa⁻¹", "1/MPa"}); - unitAbbreviationsCache.PerformAbbreviationMapping(CompressibilityUnit.InverseMillibar, new CultureInfo("en-US"), false, true, new string[]{"mbar⁻¹", "1/mbar"}); - unitAbbreviationsCache.PerformAbbreviationMapping(CompressibilityUnit.InversePascal, new CultureInfo("en-US"), false, true, new string[]{"Pa⁻¹", "1/Pa"}); - unitAbbreviationsCache.PerformAbbreviationMapping(CompressibilityUnit.InversePoundForcePerSquareInch, new CultureInfo("en-US"), false, true, new string[]{"psi⁻¹", "1/psi"}); - } - /// /// Get unit abbreviation string. /// @@ -276,7 +266,7 @@ public static string GetAbbreviation(CompressibilityUnit unit, IFormatProvider? /// /// /// - public static string[] GetAbbreviations(CompressibilityUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(CompressibilityUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.Compressibility"; var resourceManager = new ResourceManager(resourceName, typeof(Compressibility).Assembly); @@ -902,7 +892,7 @@ public Compressibility ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/Density.g.cs b/UnitsNet/GeneratedCode/Quantities/Density.g.cs index 099ffa3bcf..9a9d0efa5f 100644 --- a/UnitsNet/GeneratedCode/Quantities/Density.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Density.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -596,65 +597,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(DensityUnit.KilogramPerCubicMeter, DensityUnit.TonnePerCubicMillimeter, quantity => quantity.ToUnit(DensityUnit.TonnePerCubicMillimeter)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.CentigramPerDeciliter, new CultureInfo("en-US"), false, true, new string[]{"cg/dl"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.CentigramPerLiter, new CultureInfo("en-US"), false, true, new string[]{"cg/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.CentigramPerMilliliter, new CultureInfo("en-US"), false, true, new string[]{"cg/ml"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.DecigramPerDeciliter, new CultureInfo("en-US"), false, true, new string[]{"dg/dl"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.DecigramPerLiter, new CultureInfo("en-US"), false, true, new string[]{"dg/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.DecigramPerMilliliter, new CultureInfo("en-US"), false, true, new string[]{"dg/ml"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.GramPerCubicCentimeter, new CultureInfo("en-US"), false, true, new string[]{"g/cm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.GramPerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"g/ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.GramPerCubicInch, new CultureInfo("en-US"), false, true, new string[]{"g/in³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.GramPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"g/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.GramPerCubicMeter, new CultureInfo("ru-RU"), false, true, new string[]{"г/м³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.GramPerCubicMillimeter, new CultureInfo("en-US"), false, true, new string[]{"g/mm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.GramPerDeciliter, new CultureInfo("en-US"), false, true, new string[]{"g/dl"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.GramPerLiter, new CultureInfo("en-US"), false, true, new string[]{"g/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.GramPerMilliliter, new CultureInfo("en-US"), false, true, new string[]{"g/ml"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.KilogramPerCubicCentimeter, new CultureInfo("en-US"), false, true, new string[]{"kg/cm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.KilogramPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"kg/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.KilogramPerCubicMeter, new CultureInfo("ru-RU"), false, true, new string[]{"кг/м³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.KilogramPerCubicMillimeter, new CultureInfo("en-US"), false, true, new string[]{"kg/mm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.KilogramPerLiter, new CultureInfo("en-US"), false, true, new string[]{"kg/l"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.KilopoundPerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"kip/ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.KilopoundPerCubicInch, new CultureInfo("en-US"), false, true, new string[]{"kip/in³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.MicrogramPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"µg/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.MicrogramPerCubicMeter, new CultureInfo("ru-RU"), false, true, new string[]{"мкг/м³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.MicrogramPerDeciliter, new CultureInfo("en-US"), false, true, new string[]{"µg/dl"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.MicrogramPerLiter, new CultureInfo("en-US"), false, true, new string[]{"µg/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.MicrogramPerMilliliter, new CultureInfo("en-US"), false, true, new string[]{"µg/ml"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.MilligramPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"mg/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.MilligramPerCubicMeter, new CultureInfo("ru-RU"), false, true, new string[]{"мг/м³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.MilligramPerDeciliter, new CultureInfo("en-US"), false, true, new string[]{"mg/dl"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.MilligramPerLiter, new CultureInfo("en-US"), false, true, new string[]{"mg/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.MilligramPerMilliliter, new CultureInfo("en-US"), false, true, new string[]{"mg/ml"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.NanogramPerDeciliter, new CultureInfo("en-US"), false, true, new string[]{"ng/dl"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.NanogramPerLiter, new CultureInfo("en-US"), false, true, new string[]{"ng/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.NanogramPerMilliliter, new CultureInfo("en-US"), false, true, new string[]{"ng/ml"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.PicogramPerDeciliter, new CultureInfo("en-US"), false, true, new string[]{"pg/dl"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.PicogramPerLiter, new CultureInfo("en-US"), false, true, new string[]{"pg/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.PicogramPerMilliliter, new CultureInfo("en-US"), false, true, new string[]{"pg/ml"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.PoundPerCubicCentimeter, new CultureInfo("en-US"), false, true, new string[]{"lb/cm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.PoundPerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"lb/ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.PoundPerCubicInch, new CultureInfo("en-US"), false, true, new string[]{"lb/in³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.PoundPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"lb/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.PoundPerCubicMillimeter, new CultureInfo("en-US"), false, true, new string[]{"lb/mm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.PoundPerImperialGallon, new CultureInfo("en-US"), false, true, new string[]{"ppg (imp.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.PoundPerUSGallon, new CultureInfo("en-US"), false, true, new string[]{"ppg (U.S.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.SlugPerCubicCentimeter, new CultureInfo("en-US"), false, true, new string[]{"slug/cm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.SlugPerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"slug/ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.SlugPerCubicInch, new CultureInfo("en-US"), false, true, new string[]{"slug/in³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.SlugPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"slug/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.SlugPerCubicMillimeter, new CultureInfo("en-US"), false, true, new string[]{"slug/mm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.TonnePerCubicCentimeter, new CultureInfo("en-US"), false, true, new string[]{"t/cm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.TonnePerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"t/ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.TonnePerCubicInch, new CultureInfo("en-US"), false, true, new string[]{"t/in³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.TonnePerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"t/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.TonnePerCubicMillimeter, new CultureInfo("en-US"), false, true, new string[]{"t/mm³"}); - } - /// /// Get unit abbreviation string. /// @@ -679,7 +621,7 @@ public static string GetAbbreviation(DensityUnit unit, IFormatProvider? provider /// /// /// - public static string[] GetAbbreviations(DensityUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(DensityUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.Density"; var resourceManager = new ResourceManager(resourceName, typeof(Density).Assembly); @@ -1833,7 +1775,7 @@ public Density ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/Duration.g.cs b/UnitsNet/GeneratedCode/Quantities/Duration.g.cs index 8715797bfc..176b12c087 100644 --- a/UnitsNet/GeneratedCode/Quantities/Duration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Duration.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -273,31 +274,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(DurationUnit.Second, DurationUnit.Year365, quantity => quantity.ToUnit(DurationUnit.Year365)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(DurationUnit.Day, new CultureInfo("en-US"), false, true, new string[]{"d", "day", "days"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DurationUnit.Day, new CultureInfo("ru-RU"), false, true, new string[]{"сут", "д"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DurationUnit.Hour, new CultureInfo("en-US"), false, true, new string[]{"h", "hr", "hrs", "hour", "hours"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DurationUnit.Hour, new CultureInfo("ru-RU"), false, true, new string[]{"ч", "час"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DurationUnit.JulianYear, new CultureInfo("en-US"), false, true, new string[]{"jyr", "jyear", "jyears"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DurationUnit.Microsecond, new CultureInfo("en-US"), false, true, new string[]{"µs", "µsec", "µsecs", "µsecond", "µseconds"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DurationUnit.Microsecond, new CultureInfo("ru-RU"), false, true, new string[]{"мксек", "мкс"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DurationUnit.Millisecond, new CultureInfo("en-US"), false, true, new string[]{"ms", "msec", "msecs", "msecond", "mseconds"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DurationUnit.Millisecond, new CultureInfo("ru-RU"), false, true, new string[]{"мсек", "мс"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DurationUnit.Minute, new CultureInfo("en-US"), false, true, new string[]{"m", "min", "minute", "minutes"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DurationUnit.Minute, new CultureInfo("ru-RU"), false, true, new string[]{"мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DurationUnit.Month30, new CultureInfo("en-US"), false, true, new string[]{"mo", "month", "months"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DurationUnit.Month30, new CultureInfo("ru-RU"), false, true, new string[]{"месяц"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DurationUnit.Nanosecond, new CultureInfo("en-US"), false, true, new string[]{"ns", "nsec", "nsecs", "nsecond", "nseconds"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DurationUnit.Nanosecond, new CultureInfo("ru-RU"), false, true, new string[]{"нсек", "нс"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DurationUnit.Second, new CultureInfo("en-US"), false, true, new string[]{"s", "sec", "secs", "second", "seconds"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DurationUnit.Second, new CultureInfo("ru-RU"), false, true, new string[]{"сек", "с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DurationUnit.Week, new CultureInfo("en-US"), false, true, new string[]{"wk", "week", "weeks"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DurationUnit.Week, new CultureInfo("ru-RU"), false, true, new string[]{"нед"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DurationUnit.Year365, new CultureInfo("en-US"), false, true, new string[]{"yr", "year", "years"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DurationUnit.Year365, new CultureInfo("ru-RU"), false, true, new string[]{"год"}); - } - /// /// Get unit abbreviation string. /// @@ -322,7 +298,7 @@ public static string GetAbbreviation(DurationUnit unit, IFormatProvider? provide /// /// /// - public static string[] GetAbbreviations(DurationUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(DurationUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.Duration"; var resourceManager = new ResourceManager(resourceName, typeof(Duration).Assembly); @@ -996,7 +972,7 @@ public Duration ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs index 5de70b2976..9cd08b9fa9 100644 --- a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -268,20 +269,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(DynamicViscosityUnit.NewtonSecondPerMeterSquared, DynamicViscosityUnit.Reyn, quantity => quantity.ToUnit(DynamicViscosityUnit.Reyn)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(DynamicViscosityUnit.Centipoise, new CultureInfo("en-US"), false, true, new string[]{"cP"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DynamicViscosityUnit.MicropascalSecond, new CultureInfo("en-US"), false, true, new string[]{"µPa·s", "µPaS"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DynamicViscosityUnit.MillipascalSecond, new CultureInfo("en-US"), false, true, new string[]{"mPa·s", "mPaS"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DynamicViscosityUnit.NewtonSecondPerMeterSquared, new CultureInfo("en-US"), false, true, new string[]{"Ns/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DynamicViscosityUnit.PascalSecond, new CultureInfo("en-US"), false, true, new string[]{"Pa·s", "PaS"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DynamicViscosityUnit.Poise, new CultureInfo("en-US"), false, true, new string[]{"P"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DynamicViscosityUnit.PoundForceSecondPerSquareFoot, new CultureInfo("en-US"), false, true, new string[]{"lbf·s/ft²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DynamicViscosityUnit.PoundForceSecondPerSquareInch, new CultureInfo("en-US"), false, true, new string[]{"lbf·s/in²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DynamicViscosityUnit.PoundPerFootSecond, new CultureInfo("en-US"), false, true, new string[]{"lb/ft·s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DynamicViscosityUnit.Reyn, new CultureInfo("en-US"), false, true, new string[]{"reyn"}); - } - /// /// Get unit abbreviation string. /// @@ -306,7 +293,7 @@ public static string GetAbbreviation(DynamicViscosityUnit unit, IFormatProvider? /// /// /// - public static string[] GetAbbreviations(DynamicViscosityUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(DynamicViscosityUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.DynamicViscosity"; var resourceManager = new ResourceManager(resourceName, typeof(DynamicViscosity).Assembly); @@ -968,7 +955,7 @@ public DynamicViscosity ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs index e7c1b52c48..e54cf9ce3e 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -217,14 +218,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ElectricAdmittanceUnit.Siemens, ElectricAdmittanceUnit.Nanosiemens, quantity => quantity.ToUnit(ElectricAdmittanceUnit.Nanosiemens)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricAdmittanceUnit.Microsiemens, new CultureInfo("en-US"), false, true, new string[]{"µS"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricAdmittanceUnit.Millisiemens, new CultureInfo("en-US"), false, true, new string[]{"mS"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricAdmittanceUnit.Nanosiemens, new CultureInfo("en-US"), false, true, new string[]{"nS"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricAdmittanceUnit.Siemens, new CultureInfo("en-US"), false, true, new string[]{"S"}); - } - /// /// Get unit abbreviation string. /// @@ -249,7 +242,7 @@ public static string GetAbbreviation(ElectricAdmittanceUnit unit, IFormatProvide /// /// /// - public static string[] GetAbbreviations(ElectricAdmittanceUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(ElectricAdmittanceUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricAdmittance"; var resourceManager = new ResourceManager(resourceName, typeof(ElectricAdmittance).Assembly); @@ -839,7 +832,7 @@ public ElectricAdmittance ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs index 1165a8376a..1b1ed27ff7 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -276,21 +277,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ElectricChargeUnit.Coulomb, ElectricChargeUnit.Picocoulomb, quantity => quantity.ToUnit(ElectricChargeUnit.Picocoulomb)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricChargeUnit.AmpereHour, new CultureInfo("en-US"), false, true, new string[]{"A-h", "Ah"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricChargeUnit.Coulomb, new CultureInfo("en-US"), false, true, new string[]{"C"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricChargeUnit.KiloampereHour, new CultureInfo("en-US"), false, true, new string[]{"kA-h", "kAh"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricChargeUnit.Kilocoulomb, new CultureInfo("en-US"), false, true, new string[]{"kC"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricChargeUnit.MegaampereHour, new CultureInfo("en-US"), false, true, new string[]{"MA-h", "MAh"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricChargeUnit.Megacoulomb, new CultureInfo("en-US"), false, true, new string[]{"MC"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricChargeUnit.Microcoulomb, new CultureInfo("en-US"), false, true, new string[]{"µC"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricChargeUnit.MilliampereHour, new CultureInfo("en-US"), false, true, new string[]{"mA-h", "mAh"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricChargeUnit.Millicoulomb, new CultureInfo("en-US"), false, true, new string[]{"mC"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricChargeUnit.Nanocoulomb, new CultureInfo("en-US"), false, true, new string[]{"nC"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricChargeUnit.Picocoulomb, new CultureInfo("en-US"), false, true, new string[]{"pC"}); - } - /// /// Get unit abbreviation string. /// @@ -315,7 +301,7 @@ public static string GetAbbreviation(ElectricChargeUnit unit, IFormatProvider? p /// /// /// - public static string[] GetAbbreviations(ElectricChargeUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(ElectricChargeUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricCharge"; var resourceManager = new ResourceManager(resourceName, typeof(ElectricCharge).Assembly); @@ -989,7 +975,7 @@ public ElectricCharge ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs index 6d688bf097..6d99614aa1 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -196,11 +197,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) // Register in unit converter: BaseUnit -> ElectricChargeDensityUnit } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricChargeDensityUnit.CoulombPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"C/m³"}); - } - /// /// Get unit abbreviation string. /// @@ -225,7 +221,7 @@ public static string GetAbbreviation(ElectricChargeDensityUnit unit, IFormatProv /// /// /// - public static string[] GetAbbreviations(ElectricChargeDensityUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(ElectricChargeDensityUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricChargeDensity"; var resourceManager = new ResourceManager(resourceName, typeof(ElectricChargeDensity).Assembly); @@ -779,7 +775,7 @@ public ElectricChargeDensity ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs index 21d01002d6..a5593566ab 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -228,15 +229,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ElectricConductanceUnit.Siemens, ElectricConductanceUnit.Nanosiemens, quantity => quantity.ToUnit(ElectricConductanceUnit.Nanosiemens)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricConductanceUnit.Kilosiemens, new CultureInfo("en-US"), false, true, new string[]{"kS"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricConductanceUnit.Microsiemens, new CultureInfo("en-US"), false, true, new string[]{"µS"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricConductanceUnit.Millisiemens, new CultureInfo("en-US"), false, true, new string[]{"mS"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricConductanceUnit.Nanosiemens, new CultureInfo("en-US"), false, true, new string[]{"nS"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricConductanceUnit.Siemens, new CultureInfo("en-US"), false, true, new string[]{"S"}); - } - /// /// Get unit abbreviation string. /// @@ -261,7 +253,7 @@ public static string GetAbbreviation(ElectricConductanceUnit unit, IFormatProvid /// /// /// - public static string[] GetAbbreviations(ElectricConductanceUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(ElectricConductanceUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricConductance"; var resourceManager = new ResourceManager(resourceName, typeof(ElectricConductance).Assembly); @@ -863,7 +855,7 @@ public ElectricConductance ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs index f3bae6bacb..ead168f3b8 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -236,16 +237,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ElectricConductivityUnit.SiemensPerMeter, ElectricConductivityUnit.SiemensPerInch, quantity => quantity.ToUnit(ElectricConductivityUnit.SiemensPerInch)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricConductivityUnit.MicrosiemensPerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"µS/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricConductivityUnit.MillisiemensPerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"mS/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricConductivityUnit.SiemensPerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"S/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricConductivityUnit.SiemensPerFoot, new CultureInfo("en-US"), false, true, new string[]{"S/ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricConductivityUnit.SiemensPerInch, new CultureInfo("en-US"), false, true, new string[]{"S/in"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricConductivityUnit.SiemensPerMeter, new CultureInfo("en-US"), false, true, new string[]{"S/m"}); - } - /// /// Get unit abbreviation string. /// @@ -270,7 +261,7 @@ public static string GetAbbreviation(ElectricConductivityUnit unit, IFormatProvi /// /// /// - public static string[] GetAbbreviations(ElectricConductivityUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(ElectricConductivityUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricConductivity"; var resourceManager = new ResourceManager(resourceName, typeof(ElectricConductivity).Assembly); @@ -884,7 +875,7 @@ public ElectricConductivity ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs index 065fa80067..f6e8359ed4 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -257,19 +258,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ElectricCurrentUnit.Ampere, ElectricCurrentUnit.Picoampere, quantity => quantity.ToUnit(ElectricCurrentUnit.Picoampere)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricCurrentUnit.Ampere, new CultureInfo("en-US"), false, true, new string[]{"A"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricCurrentUnit.Centiampere, new CultureInfo("en-US"), false, true, new string[]{"cA"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricCurrentUnit.Femtoampere, new CultureInfo("en-US"), false, true, new string[]{"fA"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricCurrentUnit.Kiloampere, new CultureInfo("en-US"), false, true, new string[]{"kA"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricCurrentUnit.Megaampere, new CultureInfo("en-US"), false, true, new string[]{"MA"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricCurrentUnit.Microampere, new CultureInfo("en-US"), false, true, new string[]{"µA"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricCurrentUnit.Milliampere, new CultureInfo("en-US"), false, true, new string[]{"mA"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricCurrentUnit.Nanoampere, new CultureInfo("en-US"), false, true, new string[]{"nA"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricCurrentUnit.Picoampere, new CultureInfo("en-US"), false, true, new string[]{"pA"}); - } - /// /// Get unit abbreviation string. /// @@ -294,7 +282,7 @@ public static string GetAbbreviation(ElectricCurrentUnit unit, IFormatProvider? /// /// /// - public static string[] GetAbbreviations(ElectricCurrentUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(ElectricCurrentUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricCurrent"; var resourceManager = new ResourceManager(resourceName, typeof(ElectricCurrent).Assembly); @@ -944,7 +932,7 @@ public ElectricCurrent ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs index cf2b52d64b..bc83f9ea93 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -212,13 +213,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ElectricCurrentDensityUnit.AmperePerSquareMeter, ElectricCurrentDensityUnit.AmperePerSquareInch, quantity => quantity.ToUnit(ElectricCurrentDensityUnit.AmperePerSquareInch)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricCurrentDensityUnit.AmperePerSquareFoot, new CultureInfo("en-US"), false, true, new string[]{"A/ft²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricCurrentDensityUnit.AmperePerSquareInch, new CultureInfo("en-US"), false, true, new string[]{"A/in²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricCurrentDensityUnit.AmperePerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"A/m²"}); - } - /// /// Get unit abbreviation string. /// @@ -243,7 +237,7 @@ public static string GetAbbreviation(ElectricCurrentDensityUnit unit, IFormatPro /// /// /// - public static string[] GetAbbreviations(ElectricCurrentDensityUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(ElectricCurrentDensityUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricCurrentDensity"; var resourceManager = new ResourceManager(resourceName, typeof(ElectricCurrentDensity).Assembly); @@ -821,7 +815,7 @@ public ElectricCurrentDensity ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs index 0b1bd85306..2c157f9cca 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -217,14 +218,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ElectricCurrentGradientUnit.AmperePerSecond, ElectricCurrentGradientUnit.AmperePerNanosecond, quantity => quantity.ToUnit(ElectricCurrentGradientUnit.AmperePerNanosecond)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricCurrentGradientUnit.AmperePerMicrosecond, new CultureInfo("en-US"), false, true, new string[]{"A/μs"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricCurrentGradientUnit.AmperePerMillisecond, new CultureInfo("en-US"), false, true, new string[]{"A/ms"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricCurrentGradientUnit.AmperePerNanosecond, new CultureInfo("en-US"), false, true, new string[]{"A/ns"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricCurrentGradientUnit.AmperePerSecond, new CultureInfo("en-US"), false, true, new string[]{"A/s"}); - } - /// /// Get unit abbreviation string. /// @@ -249,7 +242,7 @@ public static string GetAbbreviation(ElectricCurrentGradientUnit unit, IFormatPr /// /// /// - public static string[] GetAbbreviations(ElectricCurrentGradientUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(ElectricCurrentGradientUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricCurrentGradient"; var resourceManager = new ResourceManager(resourceName, typeof(ElectricCurrentGradient).Assembly); @@ -839,7 +832,7 @@ public ElectricCurrentGradient ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs index f8d9d916d5..ad4c4f5017 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -196,11 +197,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) // Register in unit converter: BaseUnit -> ElectricFieldUnit } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricFieldUnit.VoltPerMeter, new CultureInfo("en-US"), false, true, new string[]{"V/m"}); - } - /// /// Get unit abbreviation string. /// @@ -225,7 +221,7 @@ public static string GetAbbreviation(ElectricFieldUnit unit, IFormatProvider? pr /// /// /// - public static string[] GetAbbreviations(ElectricFieldUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(ElectricFieldUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricField"; var resourceManager = new ResourceManager(resourceName, typeof(ElectricField).Assembly); @@ -779,7 +775,7 @@ public ElectricField ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs index 499b4beec1..9fece9280d 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -228,15 +229,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ElectricInductanceUnit.Henry, ElectricInductanceUnit.Picohenry, quantity => quantity.ToUnit(ElectricInductanceUnit.Picohenry)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricInductanceUnit.Henry, new CultureInfo("en-US"), false, true, new string[]{"H"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricInductanceUnit.Microhenry, new CultureInfo("en-US"), false, true, new string[]{"µH"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricInductanceUnit.Millihenry, new CultureInfo("en-US"), false, true, new string[]{"mH"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricInductanceUnit.Nanohenry, new CultureInfo("en-US"), false, true, new string[]{"nH"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricInductanceUnit.Picohenry, new CultureInfo("en-US"), false, true, new string[]{"pH"}); - } - /// /// Get unit abbreviation string. /// @@ -261,7 +253,7 @@ public static string GetAbbreviation(ElectricInductanceUnit unit, IFormatProvide /// /// /// - public static string[] GetAbbreviations(ElectricInductanceUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(ElectricInductanceUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricInductance"; var resourceManager = new ResourceManager(resourceName, typeof(ElectricInductance).Assembly); @@ -863,7 +855,7 @@ public ElectricInductance ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs index 76dfaeabed..e368f68044 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -233,22 +234,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ElectricPotentialUnit.Volt, ElectricPotentialUnit.Nanovolt, quantity => quantity.ToUnit(ElectricPotentialUnit.Nanovolt)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialUnit.Kilovolt, new CultureInfo("en-US"), false, true, new string[]{"kV"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialUnit.Kilovolt, new CultureInfo("ru-RU"), false, true, new string[]{"кВ"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialUnit.Megavolt, new CultureInfo("en-US"), false, true, new string[]{"MV"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialUnit.Megavolt, new CultureInfo("ru-RU"), false, true, new string[]{"МВ"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialUnit.Microvolt, new CultureInfo("en-US"), false, true, new string[]{"µV"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialUnit.Microvolt, new CultureInfo("ru-RU"), false, true, new string[]{"мкВ"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialUnit.Millivolt, new CultureInfo("en-US"), false, true, new string[]{"mV"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialUnit.Millivolt, new CultureInfo("ru-RU"), false, true, new string[]{"мВ"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialUnit.Nanovolt, new CultureInfo("en-US"), false, true, new string[]{"nV"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialUnit.Nanovolt, new CultureInfo("ru-RU"), false, true, new string[]{"нВ"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialUnit.Volt, new CultureInfo("en-US"), false, true, new string[]{"V"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialUnit.Volt, new CultureInfo("ru-RU"), false, true, new string[]{"В"}); - } - /// /// Get unit abbreviation string. /// @@ -273,7 +258,7 @@ public static string GetAbbreviation(ElectricPotentialUnit unit, IFormatProvider /// /// /// - public static string[] GetAbbreviations(ElectricPotentialUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(ElectricPotentialUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricPotential"; var resourceManager = new ResourceManager(resourceName, typeof(ElectricPotential).Assembly); @@ -887,7 +872,7 @@ public ElectricPotential ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs index 2a05aae382..72cb0279e3 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -225,15 +226,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ElectricPotentialAcUnit.VoltAc, ElectricPotentialAcUnit.MillivoltAc, quantity => quantity.ToUnit(ElectricPotentialAcUnit.MillivoltAc)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialAcUnit.KilovoltAc, new CultureInfo("en-US"), false, true, new string[]{"kVac"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialAcUnit.MegavoltAc, new CultureInfo("en-US"), false, true, new string[]{"MVac"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialAcUnit.MicrovoltAc, new CultureInfo("en-US"), false, true, new string[]{"µVac"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialAcUnit.MillivoltAc, new CultureInfo("en-US"), false, true, new string[]{"mVac"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialAcUnit.VoltAc, new CultureInfo("en-US"), false, true, new string[]{"Vac"}); - } - /// /// Get unit abbreviation string. /// @@ -258,7 +250,7 @@ public static string GetAbbreviation(ElectricPotentialAcUnit unit, IFormatProvid /// /// /// - public static string[] GetAbbreviations(ElectricPotentialAcUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(ElectricPotentialAcUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricPotentialAc"; var resourceManager = new ResourceManager(resourceName, typeof(ElectricPotentialAc).Assembly); @@ -860,7 +852,7 @@ public ElectricPotentialAc ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs index ae7454db9e..51fc34099f 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -345,30 +346,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ElectricPotentialChangeRateUnit.VoltPerSecond, ElectricPotentialChangeRateUnit.VoltPerMinute, quantity => quantity.ToUnit(ElectricPotentialChangeRateUnit.VoltPerMinute)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialChangeRateUnit.KilovoltPerHour, new CultureInfo("en-US"), false, true, new string[]{"kV/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialChangeRateUnit.KilovoltPerMicrosecond, new CultureInfo("en-US"), false, true, new string[]{"kV/μs"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialChangeRateUnit.KilovoltPerMinute, new CultureInfo("en-US"), false, true, new string[]{"kV/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialChangeRateUnit.KilovoltPerSecond, new CultureInfo("en-US"), false, true, new string[]{"kV/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialChangeRateUnit.MegavoltPerHour, new CultureInfo("en-US"), false, true, new string[]{"MV/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialChangeRateUnit.MegavoltPerMicrosecond, new CultureInfo("en-US"), false, true, new string[]{"MV/μs"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialChangeRateUnit.MegavoltPerMinute, new CultureInfo("en-US"), false, true, new string[]{"MV/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialChangeRateUnit.MegavoltPerSecond, new CultureInfo("en-US"), false, true, new string[]{"MV/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialChangeRateUnit.MicrovoltPerHour, new CultureInfo("en-US"), false, true, new string[]{"µV/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialChangeRateUnit.MicrovoltPerMicrosecond, new CultureInfo("en-US"), false, true, new string[]{"µV/μs"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialChangeRateUnit.MicrovoltPerMinute, new CultureInfo("en-US"), false, true, new string[]{"µV/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialChangeRateUnit.MicrovoltPerSecond, new CultureInfo("en-US"), false, true, new string[]{"µV/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialChangeRateUnit.MillivoltPerHour, new CultureInfo("en-US"), false, true, new string[]{"mV/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialChangeRateUnit.MillivoltPerMicrosecond, new CultureInfo("en-US"), false, true, new string[]{"mV/μs"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialChangeRateUnit.MillivoltPerMinute, new CultureInfo("en-US"), false, true, new string[]{"mV/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialChangeRateUnit.MillivoltPerSecond, new CultureInfo("en-US"), false, true, new string[]{"mV/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialChangeRateUnit.VoltPerHour, new CultureInfo("en-US"), false, true, new string[]{"V/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialChangeRateUnit.VoltPerMicrosecond, new CultureInfo("en-US"), false, true, new string[]{"V/μs"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialChangeRateUnit.VoltPerMinute, new CultureInfo("en-US"), false, true, new string[]{"V/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialChangeRateUnit.VoltPerSecond, new CultureInfo("en-US"), false, true, new string[]{"V/s"}); - } - /// /// Get unit abbreviation string. /// @@ -393,7 +370,7 @@ public static string GetAbbreviation(ElectricPotentialChangeRateUnit unit, IForm /// /// /// - public static string[] GetAbbreviations(ElectricPotentialChangeRateUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(ElectricPotentialChangeRateUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricPotentialChangeRate"; var resourceManager = new ResourceManager(resourceName, typeof(ElectricPotentialChangeRate).Assembly); @@ -1175,7 +1152,7 @@ public ElectricPotentialChangeRate ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs index 6910295544..60a78ccb44 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -225,15 +226,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ElectricPotentialDcUnit.VoltDc, ElectricPotentialDcUnit.MillivoltDc, quantity => quantity.ToUnit(ElectricPotentialDcUnit.MillivoltDc)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialDcUnit.KilovoltDc, new CultureInfo("en-US"), false, true, new string[]{"kVdc"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialDcUnit.MegavoltDc, new CultureInfo("en-US"), false, true, new string[]{"MVdc"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialDcUnit.MicrovoltDc, new CultureInfo("en-US"), false, true, new string[]{"µVdc"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialDcUnit.MillivoltDc, new CultureInfo("en-US"), false, true, new string[]{"mVdc"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialDcUnit.VoltDc, new CultureInfo("en-US"), false, true, new string[]{"Vdc"}); - } - /// /// Get unit abbreviation string. /// @@ -258,7 +250,7 @@ public static string GetAbbreviation(ElectricPotentialDcUnit unit, IFormatProvid /// /// /// - public static string[] GetAbbreviations(ElectricPotentialDcUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(ElectricPotentialDcUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricPotentialDc"; var resourceManager = new ResourceManager(resourceName, typeof(ElectricPotentialDc).Assembly); @@ -860,7 +852,7 @@ public ElectricPotentialDc ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs index a6a63031d1..deed0350da 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -241,17 +242,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ElectricResistanceUnit.Ohm, ElectricResistanceUnit.Teraohm, quantity => quantity.ToUnit(ElectricResistanceUnit.Teraohm)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricResistanceUnit.Gigaohm, new CultureInfo("en-US"), false, true, new string[]{"GΩ"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricResistanceUnit.Kiloohm, new CultureInfo("en-US"), false, true, new string[]{"kΩ"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricResistanceUnit.Megaohm, new CultureInfo("en-US"), false, true, new string[]{"MΩ"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricResistanceUnit.Microohm, new CultureInfo("en-US"), false, true, new string[]{"µΩ"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricResistanceUnit.Milliohm, new CultureInfo("en-US"), false, true, new string[]{"mΩ"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricResistanceUnit.Ohm, new CultureInfo("en-US"), false, true, new string[]{"Ω"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricResistanceUnit.Teraohm, new CultureInfo("en-US"), false, true, new string[]{"TΩ"}); - } - /// /// Get unit abbreviation string. /// @@ -276,7 +266,7 @@ public static string GetAbbreviation(ElectricResistanceUnit unit, IFormatProvide /// /// /// - public static string[] GetAbbreviations(ElectricResistanceUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(ElectricResistanceUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricResistance"; var resourceManager = new ResourceManager(resourceName, typeof(ElectricResistance).Assembly); @@ -902,7 +892,7 @@ public ElectricResistance ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs index 89111f3ad4..8ec7e964a1 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -300,24 +301,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ElectricResistivityUnit.OhmMeter, ElectricResistivityUnit.PicoohmMeter, quantity => quantity.ToUnit(ElectricResistivityUnit.PicoohmMeter)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricResistivityUnit.KiloohmCentimeter, new CultureInfo("en-US"), false, true, new string[]{"kΩ·cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricResistivityUnit.KiloohmMeter, new CultureInfo("en-US"), false, true, new string[]{"kΩ·m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricResistivityUnit.MegaohmCentimeter, new CultureInfo("en-US"), false, true, new string[]{"MΩ·cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricResistivityUnit.MegaohmMeter, new CultureInfo("en-US"), false, true, new string[]{"MΩ·m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricResistivityUnit.MicroohmCentimeter, new CultureInfo("en-US"), false, true, new string[]{"µΩ·cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricResistivityUnit.MicroohmMeter, new CultureInfo("en-US"), false, true, new string[]{"µΩ·m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricResistivityUnit.MilliohmCentimeter, new CultureInfo("en-US"), false, true, new string[]{"mΩ·cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricResistivityUnit.MilliohmMeter, new CultureInfo("en-US"), false, true, new string[]{"mΩ·m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricResistivityUnit.NanoohmCentimeter, new CultureInfo("en-US"), false, true, new string[]{"nΩ·cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricResistivityUnit.NanoohmMeter, new CultureInfo("en-US"), false, true, new string[]{"nΩ·m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricResistivityUnit.OhmCentimeter, new CultureInfo("en-US"), false, true, new string[]{"Ω·cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricResistivityUnit.OhmMeter, new CultureInfo("en-US"), false, true, new string[]{"Ω·m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricResistivityUnit.PicoohmCentimeter, new CultureInfo("en-US"), false, true, new string[]{"pΩ·cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricResistivityUnit.PicoohmMeter, new CultureInfo("en-US"), false, true, new string[]{"pΩ·m"}); - } - /// /// Get unit abbreviation string. /// @@ -342,7 +325,7 @@ public static string GetAbbreviation(ElectricResistivityUnit unit, IFormatProvid /// /// /// - public static string[] GetAbbreviations(ElectricResistivityUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(ElectricResistivityUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricResistivity"; var resourceManager = new ResourceManager(resourceName, typeof(ElectricResistivity).Assembly); @@ -1052,7 +1035,7 @@ public ElectricResistivity ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs index 0c057c674e..440eb792a4 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -212,13 +213,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ElectricSurfaceChargeDensityUnit.CoulombPerSquareMeter, ElectricSurfaceChargeDensityUnit.CoulombPerSquareInch, quantity => quantity.ToUnit(ElectricSurfaceChargeDensityUnit.CoulombPerSquareInch)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricSurfaceChargeDensityUnit.CoulombPerSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"C/cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricSurfaceChargeDensityUnit.CoulombPerSquareInch, new CultureInfo("en-US"), false, true, new string[]{"C/in²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricSurfaceChargeDensityUnit.CoulombPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"C/m²"}); - } - /// /// Get unit abbreviation string. /// @@ -243,7 +237,7 @@ public static string GetAbbreviation(ElectricSurfaceChargeDensityUnit unit, IFor /// /// /// - public static string[] GetAbbreviations(ElectricSurfaceChargeDensityUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(ElectricSurfaceChargeDensityUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricSurfaceChargeDensity"; var resourceManager = new ResourceManager(resourceName, typeof(ElectricSurfaceChargeDensity).Assembly); @@ -821,7 +815,7 @@ public ElectricSurfaceChargeDensity ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/Energy.g.cs b/UnitsNet/GeneratedCode/Quantities/Energy.g.cs index 1f52eccf91..47ff4a40ad 100644 --- a/UnitsNet/GeneratedCode/Quantities/Energy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Energy.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -489,69 +490,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(EnergyUnit.Joule, EnergyUnit.WattHour, quantity => quantity.ToUnit(EnergyUnit.WattHour)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.BritishThermalUnit, new CultureInfo("en-US"), false, true, new string[]{"BTU"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.Calorie, new CultureInfo("en-US"), false, true, new string[]{"cal"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.DecathermEc, new CultureInfo("en-US"), false, true, new string[]{"Dth (E.C.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.DecathermEc, new CultureInfo("ru-RU"), false, true, new string[]{"Европейский декатерм"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.DecathermImperial, new CultureInfo("en-US"), false, true, new string[]{"Dth (imp.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.DecathermImperial, new CultureInfo("ru-RU"), false, true, new string[]{"Английский декатерм"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.DecathermUs, new CultureInfo("en-US"), false, true, new string[]{"Dth (U.S.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.DecathermUs, new CultureInfo("ru-RU"), false, true, new string[]{"Американский декатерм"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.ElectronVolt, new CultureInfo("en-US"), false, true, new string[]{"eV"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.ElectronVolt, new CultureInfo("ru-RU"), false, true, new string[]{"эВ"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.Erg, new CultureInfo("en-US"), false, true, new string[]{"erg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.FootPound, new CultureInfo("en-US"), false, true, new string[]{"ft·lb"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.GigabritishThermalUnit, new CultureInfo("en-US"), false, true, new string[]{"GBTU"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.GigaelectronVolt, new CultureInfo("en-US"), false, true, new string[]{"GeV"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.GigaelectronVolt, new CultureInfo("ru-RU"), false, true, new string[]{"ГэВ"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.Gigajoule, new CultureInfo("en-US"), false, true, new string[]{"GJ"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.GigawattDay, new CultureInfo("en-US"), false, true, new string[]{"GWd"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.GigawattDay, new CultureInfo("ru-RU"), false, true, new string[]{"ГВт/д"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.GigawattHour, new CultureInfo("en-US"), false, true, new string[]{"GWh"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.GigawattHour, new CultureInfo("ru-RU"), false, true, new string[]{"ГВт/ч"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.HorsepowerHour, new CultureInfo("en-US"), false, true, new string[]{"hp·h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.Joule, new CultureInfo("en-US"), false, true, new string[]{"J"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.KilobritishThermalUnit, new CultureInfo("en-US"), false, true, new string[]{"kBTU"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.Kilocalorie, new CultureInfo("en-US"), false, true, new string[]{"kcal"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.KiloelectronVolt, new CultureInfo("en-US"), false, true, new string[]{"keV"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.KiloelectronVolt, new CultureInfo("ru-RU"), false, true, new string[]{"кэВ"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.Kilojoule, new CultureInfo("en-US"), false, true, new string[]{"kJ"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.KilowattDay, new CultureInfo("en-US"), false, true, new string[]{"kWd"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.KilowattDay, new CultureInfo("ru-RU"), false, true, new string[]{"кВт/д"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.KilowattHour, new CultureInfo("en-US"), false, true, new string[]{"kWh"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.KilowattHour, new CultureInfo("ru-RU"), false, true, new string[]{"кВт/ч"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.MegabritishThermalUnit, new CultureInfo("en-US"), false, true, new string[]{"MBTU"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.Megacalorie, new CultureInfo("en-US"), false, true, new string[]{"Mcal"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.MegaelectronVolt, new CultureInfo("en-US"), false, true, new string[]{"MeV"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.MegaelectronVolt, new CultureInfo("ru-RU"), false, true, new string[]{"МэВ"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.Megajoule, new CultureInfo("en-US"), false, true, new string[]{"MJ"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.MegawattDay, new CultureInfo("en-US"), false, true, new string[]{"MWd"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.MegawattDay, new CultureInfo("ru-RU"), false, true, new string[]{"МВт/д"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.MegawattHour, new CultureInfo("en-US"), false, true, new string[]{"MWh"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.MegawattHour, new CultureInfo("ru-RU"), false, true, new string[]{"МВт/ч"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.Millijoule, new CultureInfo("en-US"), false, true, new string[]{"mJ"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.Petajoule, new CultureInfo("en-US"), false, true, new string[]{"PJ"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.TeraelectronVolt, new CultureInfo("en-US"), false, true, new string[]{"TeV"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.TeraelectronVolt, new CultureInfo("ru-RU"), false, true, new string[]{"ТэВ"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.Terajoule, new CultureInfo("en-US"), false, true, new string[]{"TJ"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.TerawattDay, new CultureInfo("en-US"), false, true, new string[]{"TWd"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.TerawattDay, new CultureInfo("ru-RU"), false, true, new string[]{"ТВт/д"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.TerawattHour, new CultureInfo("en-US"), false, true, new string[]{"TWh"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.TerawattHour, new CultureInfo("ru-RU"), false, true, new string[]{"ТВт/ч"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.ThermEc, new CultureInfo("en-US"), false, true, new string[]{"th (E.C.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.ThermEc, new CultureInfo("ru-RU"), false, true, new string[]{"Европейский терм"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.ThermImperial, new CultureInfo("en-US"), false, true, new string[]{"th (imp.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.ThermImperial, new CultureInfo("ru-RU"), false, true, new string[]{"Английский терм"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.ThermUs, new CultureInfo("en-US"), false, true, new string[]{"th (U.S.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.ThermUs, new CultureInfo("ru-RU"), false, true, new string[]{"Американский терм"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.WattDay, new CultureInfo("en-US"), false, true, new string[]{"Wd"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.WattDay, new CultureInfo("ru-RU"), false, true, new string[]{"Вт/д"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.WattHour, new CultureInfo("en-US"), false, true, new string[]{"Wh"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.WattHour, new CultureInfo("ru-RU"), false, true, new string[]{"Вт/ч"}); - } - /// /// Get unit abbreviation string. /// @@ -576,7 +514,7 @@ public static string GetAbbreviation(EnergyUnit unit, IFormatProvider? provider) /// /// /// - public static string[] GetAbbreviations(EnergyUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(EnergyUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.Energy"; var resourceManager = new ResourceManager(resourceName, typeof(Energy).Assembly); @@ -1574,7 +1512,7 @@ public Energy ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/EnergyDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/EnergyDensity.g.cs index 4adf9a6fae..7cb9d440c4 100644 --- a/UnitsNet/GeneratedCode/Quantities/EnergyDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/EnergyDensity.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -281,22 +282,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(EnergyDensityUnit.JoulePerCubicMeter, EnergyDensityUnit.WattHourPerCubicMeter, quantity => quantity.ToUnit(EnergyDensityUnit.WattHourPerCubicMeter)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyDensityUnit.GigajoulePerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"GJ/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyDensityUnit.GigawattHourPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"GWh/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyDensityUnit.JoulePerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"J/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyDensityUnit.KilojoulePerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"kJ/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyDensityUnit.KilowattHourPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"kWh/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyDensityUnit.MegajoulePerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"MJ/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyDensityUnit.MegawattHourPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"MWh/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyDensityUnit.PetajoulePerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"PJ/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyDensityUnit.PetawattHourPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"PWh/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyDensityUnit.TerajoulePerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"TJ/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyDensityUnit.TerawattHourPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"TWh/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyDensityUnit.WattHourPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"Wh/m³"}); - } - /// /// Get unit abbreviation string. /// @@ -321,7 +306,7 @@ public static string GetAbbreviation(EnergyDensityUnit unit, IFormatProvider? pr /// /// /// - public static string[] GetAbbreviations(EnergyDensityUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(EnergyDensityUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.EnergyDensity"; var resourceManager = new ResourceManager(resourceName, typeof(EnergyDensity).Assembly); @@ -1007,7 +992,7 @@ public EnergyDensity ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs b/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs index 64378a6d5f..445a7dc011 100644 --- a/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -241,17 +242,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(EntropyUnit.JoulePerKelvin, EntropyUnit.MegajoulePerKelvin, quantity => quantity.ToUnit(EntropyUnit.MegajoulePerKelvin)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(EntropyUnit.CaloriePerKelvin, new CultureInfo("en-US"), false, true, new string[]{"cal/K"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EntropyUnit.JoulePerDegreeCelsius, new CultureInfo("en-US"), false, true, new string[]{"J/C"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EntropyUnit.JoulePerKelvin, new CultureInfo("en-US"), false, true, new string[]{"J/K"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EntropyUnit.KilocaloriePerKelvin, new CultureInfo("en-US"), false, true, new string[]{"kcal/K"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EntropyUnit.KilojoulePerDegreeCelsius, new CultureInfo("en-US"), false, true, new string[]{"kJ/C"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EntropyUnit.KilojoulePerKelvin, new CultureInfo("en-US"), false, true, new string[]{"kJ/K"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EntropyUnit.MegajoulePerKelvin, new CultureInfo("en-US"), false, true, new string[]{"MJ/K"}); - } - /// /// Get unit abbreviation string. /// @@ -276,7 +266,7 @@ public static string GetAbbreviation(EntropyUnit unit, IFormatProvider? provider /// /// /// - public static string[] GetAbbreviations(EntropyUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(EntropyUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.Entropy"; var resourceManager = new ResourceManager(resourceName, typeof(Entropy).Assembly); @@ -902,7 +892,7 @@ public Entropy ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/Force.g.cs b/UnitsNet/GeneratedCode/Quantities/Force.g.cs index cd6833ee0f..2edad84dfd 100644 --- a/UnitsNet/GeneratedCode/Quantities/Force.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Force.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -305,38 +306,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ForceUnit.Newton, ForceUnit.TonneForce, quantity => quantity.ToUnit(ForceUnit.TonneForce)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.Decanewton, new CultureInfo("en-US"), false, true, new string[]{"daN"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.Decanewton, new CultureInfo("ru-RU"), false, true, new string[]{"даН"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.Dyn, new CultureInfo("en-US"), false, true, new string[]{"dyn"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.Dyn, new CultureInfo("ru-RU"), false, true, new string[]{"дин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.KilogramForce, new CultureInfo("en-US"), false, true, new string[]{"kgf"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.KilogramForce, new CultureInfo("ru-RU"), false, true, new string[]{"кгс"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.Kilonewton, new CultureInfo("en-US"), false, true, new string[]{"kN"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.Kilonewton, new CultureInfo("ru-RU"), false, true, new string[]{"кН"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.KiloPond, new CultureInfo("en-US"), false, true, new string[]{"kp"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.KiloPond, new CultureInfo("ru-RU"), false, true, new string[]{"кгс"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.KilopoundForce, new CultureInfo("en-US"), false, true, new string[]{"kipf", "kip", "k"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.KilopoundForce, new CultureInfo("ru-RU"), false, true, new string[]{"кипф", "койка", "К"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.Meganewton, new CultureInfo("en-US"), false, true, new string[]{"MN"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.Meganewton, new CultureInfo("ru-RU"), false, true, new string[]{"МН"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.Micronewton, new CultureInfo("en-US"), false, true, new string[]{"µN"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.Micronewton, new CultureInfo("ru-RU"), false, true, new string[]{"мкН"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.Millinewton, new CultureInfo("en-US"), false, true, new string[]{"mN"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.Millinewton, new CultureInfo("ru-RU"), false, true, new string[]{"мН"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.Newton, new CultureInfo("en-US"), false, true, new string[]{"N"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.Newton, new CultureInfo("ru-RU"), false, true, new string[]{"Н"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.OunceForce, new CultureInfo("en-US"), false, true, new string[]{"ozf"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.Poundal, new CultureInfo("en-US"), false, true, new string[]{"pdl"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.Poundal, new CultureInfo("ru-RU"), false, true, new string[]{"паундаль"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.PoundForce, new CultureInfo("en-US"), false, true, new string[]{"lbf"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.PoundForce, new CultureInfo("ru-RU"), false, true, new string[]{"фунт-сила"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.ShortTonForce, new CultureInfo("en-US"), false, true, new string[]{"tf (short)", "t (US)f", "short tons-force"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.TonneForce, new CultureInfo("en-US"), false, true, new string[]{"tf", "Ton"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.TonneForce, new CultureInfo("ru-RU"), false, true, new string[]{"тс"}); - } - /// /// Get unit abbreviation string. /// @@ -361,7 +330,7 @@ public static string GetAbbreviation(ForceUnit unit, IFormatProvider? provider) /// /// /// - public static string[] GetAbbreviations(ForceUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(ForceUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.Force"; var resourceManager = new ResourceManager(resourceName, typeof(Force).Assembly); @@ -1083,7 +1052,7 @@ public Force ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs index a3a576609a..b2da12039e 100644 --- a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -305,25 +306,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ForceChangeRateUnit.NewtonPerSecond, ForceChangeRateUnit.PoundForcePerSecond, quantity => quantity.ToUnit(ForceChangeRateUnit.PoundForcePerSecond)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ForceChangeRateUnit.CentinewtonPerSecond, new CultureInfo("en-US"), false, true, new string[]{"cN/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceChangeRateUnit.DecanewtonPerMinute, new CultureInfo("en-US"), false, true, new string[]{"daN/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceChangeRateUnit.DecanewtonPerSecond, new CultureInfo("en-US"), false, true, new string[]{"daN/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceChangeRateUnit.DecinewtonPerSecond, new CultureInfo("en-US"), false, true, new string[]{"dN/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceChangeRateUnit.KilonewtonPerMinute, new CultureInfo("en-US"), false, true, new string[]{"kN/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceChangeRateUnit.KilonewtonPerSecond, new CultureInfo("en-US"), false, true, new string[]{"kN/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceChangeRateUnit.KilopoundForcePerMinute, new CultureInfo("en-US"), false, true, new string[]{"kipf/min", "kip/min", "k/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceChangeRateUnit.KilopoundForcePerSecond, new CultureInfo("en-US"), false, true, new string[]{"kipf/s", "kip/s", "k/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceChangeRateUnit.MicronewtonPerSecond, new CultureInfo("en-US"), false, true, new string[]{"µN/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceChangeRateUnit.MillinewtonPerSecond, new CultureInfo("en-US"), false, true, new string[]{"mN/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceChangeRateUnit.NanonewtonPerSecond, new CultureInfo("en-US"), false, true, new string[]{"nN/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceChangeRateUnit.NewtonPerMinute, new CultureInfo("en-US"), false, true, new string[]{"N/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceChangeRateUnit.NewtonPerSecond, new CultureInfo("en-US"), false, true, new string[]{"N/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceChangeRateUnit.PoundForcePerMinute, new CultureInfo("en-US"), false, true, new string[]{"lbf/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceChangeRateUnit.PoundForcePerSecond, new CultureInfo("en-US"), false, true, new string[]{"lbf/s"}); - } - /// /// Get unit abbreviation string. /// @@ -348,7 +330,7 @@ public static string GetAbbreviation(ForceChangeRateUnit unit, IFormatProvider? /// /// /// - public static string[] GetAbbreviations(ForceChangeRateUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(ForceChangeRateUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.ForceChangeRate"; var resourceManager = new ResourceManager(resourceName, typeof(ForceChangeRate).Assembly); @@ -1070,7 +1052,7 @@ public ForceChangeRate ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs index 88f187e3c9..ca3fa3410c 100644 --- a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -489,54 +490,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ForcePerLengthUnit.NewtonPerMeter, ForcePerLengthUnit.TonneForcePerMillimeter, quantity => quantity.ToUnit(ForcePerLengthUnit.TonneForcePerMillimeter)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.CentinewtonPerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"cN/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.CentinewtonPerMeter, new CultureInfo("en-US"), false, true, new string[]{"cN/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.CentinewtonPerMillimeter, new CultureInfo("en-US"), false, true, new string[]{"cN/mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.DecanewtonPerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"daN/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.DecanewtonPerMeter, new CultureInfo("en-US"), false, true, new string[]{"daN/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.DecanewtonPerMillimeter, new CultureInfo("en-US"), false, true, new string[]{"daN/mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.DecinewtonPerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"dN/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.DecinewtonPerMeter, new CultureInfo("en-US"), false, true, new string[]{"dN/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.DecinewtonPerMillimeter, new CultureInfo("en-US"), false, true, new string[]{"dN/mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.KilogramForcePerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"kgf/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.KilogramForcePerCentimeter, new CultureInfo("ru-RU"), false, true, new string[]{"кгс/см"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.KilogramForcePerMeter, new CultureInfo("en-US"), false, true, new string[]{"kgf/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.KilogramForcePerMeter, new CultureInfo("ru-RU"), false, true, new string[]{"кгс/м"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.KilogramForcePerMillimeter, new CultureInfo("en-US"), false, true, new string[]{"kgf/mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.KilogramForcePerMillimeter, new CultureInfo("ru-RU"), false, true, new string[]{"кгс/мм"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.KilonewtonPerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"kN/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.KilonewtonPerMeter, new CultureInfo("en-US"), false, true, new string[]{"kN/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.KilonewtonPerMillimeter, new CultureInfo("en-US"), false, true, new string[]{"kN/mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.KilopoundForcePerFoot, new CultureInfo("en-US"), false, true, new string[]{"kipf/ft", "kip/ft", "k/ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.KilopoundForcePerInch, new CultureInfo("en-US"), false, true, new string[]{"kipf/in", "kip/in", "k/in"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.MeganewtonPerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"MN/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.MeganewtonPerMeter, new CultureInfo("en-US"), false, true, new string[]{"MN/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.MeganewtonPerMillimeter, new CultureInfo("en-US"), false, true, new string[]{"MN/mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.MicronewtonPerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"µN/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.MicronewtonPerMeter, new CultureInfo("en-US"), false, true, new string[]{"µN/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.MicronewtonPerMillimeter, new CultureInfo("en-US"), false, true, new string[]{"µN/mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.MillinewtonPerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"mN/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.MillinewtonPerMeter, new CultureInfo("en-US"), false, true, new string[]{"mN/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.MillinewtonPerMillimeter, new CultureInfo("en-US"), false, true, new string[]{"mN/mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.NanonewtonPerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"nN/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.NanonewtonPerMeter, new CultureInfo("en-US"), false, true, new string[]{"nN/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.NanonewtonPerMillimeter, new CultureInfo("en-US"), false, true, new string[]{"nN/mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.NewtonPerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"N/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.NewtonPerMeter, new CultureInfo("en-US"), false, true, new string[]{"N/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.NewtonPerMillimeter, new CultureInfo("en-US"), false, true, new string[]{"N/mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.PoundForcePerFoot, new CultureInfo("en-US"), false, true, new string[]{"lbf/ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.PoundForcePerInch, new CultureInfo("en-US"), false, true, new string[]{"lbf/in"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.PoundForcePerYard, new CultureInfo("en-US"), false, true, new string[]{"lbf/yd"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.TonneForcePerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"tf/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.TonneForcePerCentimeter, new CultureInfo("ru-RU"), false, true, new string[]{"тс/см"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.TonneForcePerMeter, new CultureInfo("en-US"), false, true, new string[]{"tf/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.TonneForcePerMeter, new CultureInfo("ru-RU"), false, true, new string[]{"тс/м"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.TonneForcePerMillimeter, new CultureInfo("en-US"), false, true, new string[]{"tf/mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.TonneForcePerMillimeter, new CultureInfo("ru-RU"), false, true, new string[]{"тс/мм"}); - } - /// /// Get unit abbreviation string. /// @@ -561,7 +514,7 @@ public static string GetAbbreviation(ForcePerLengthUnit unit, IFormatProvider? p /// /// /// - public static string[] GetAbbreviations(ForcePerLengthUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(ForcePerLengthUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.ForcePerLength"; var resourceManager = new ResourceManager(resourceName, typeof(ForcePerLength).Assembly); @@ -1559,7 +1512,7 @@ public ForcePerLength ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs b/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs index 2c8078aa37..3394dc61c6 100644 --- a/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -289,32 +290,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(FrequencyUnit.Hertz, FrequencyUnit.Terahertz, quantity => quantity.ToUnit(FrequencyUnit.Terahertz)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.BeatPerMinute, new CultureInfo("en-US"), false, true, new string[]{"bpm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.BUnit, new CultureInfo("en-US"), false, true, new string[]{"B Units"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.CyclePerHour, new CultureInfo("en-US"), false, true, new string[]{"cph"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.CyclePerMinute, new CultureInfo("en-US"), false, true, new string[]{"cpm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.Gigahertz, new CultureInfo("en-US"), false, true, new string[]{"GHz"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.Gigahertz, new CultureInfo("ru-RU"), false, true, new string[]{"ГГц"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.Hertz, new CultureInfo("en-US"), false, true, new string[]{"Hz"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.Hertz, new CultureInfo("ru-RU"), false, true, new string[]{"Гц"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.Kilohertz, new CultureInfo("en-US"), false, true, new string[]{"kHz"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.Kilohertz, new CultureInfo("ru-RU"), false, true, new string[]{"кГц"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.Megahertz, new CultureInfo("en-US"), false, true, new string[]{"MHz"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.Megahertz, new CultureInfo("ru-RU"), false, true, new string[]{"МГц"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.Microhertz, new CultureInfo("en-US"), false, true, new string[]{"µHz"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.Microhertz, new CultureInfo("ru-RU"), false, true, new string[]{"мкГц"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.Millihertz, new CultureInfo("en-US"), false, true, new string[]{"mHz"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.Millihertz, new CultureInfo("ru-RU"), false, true, new string[]{"мГц"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.PerSecond, new CultureInfo("en-US"), false, true, new string[]{"s⁻¹"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.PerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"с⁻¹"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.RadianPerSecond, new CultureInfo("en-US"), false, true, new string[]{"rad/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.RadianPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"рад/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.Terahertz, new CultureInfo("en-US"), false, true, new string[]{"THz"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.Terahertz, new CultureInfo("ru-RU"), false, true, new string[]{"ТГц"}); - } - /// /// Get unit abbreviation string. /// @@ -339,7 +314,7 @@ public static string GetAbbreviation(FrequencyUnit unit, IFormatProvider? provid /// /// /// - public static string[] GetAbbreviations(FrequencyUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(FrequencyUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.Frequency"; var resourceManager = new ResourceManager(resourceName, typeof(Frequency).Assembly); @@ -1037,7 +1012,7 @@ public Frequency ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs b/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs index e484a667a6..56c82089ab 100644 --- a/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -220,14 +221,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(FuelEfficiencyUnit.LiterPer100Kilometers, FuelEfficiencyUnit.MilePerUsGallon, quantity => quantity.ToUnit(FuelEfficiencyUnit.MilePerUsGallon)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(FuelEfficiencyUnit.KilometerPerLiter, new CultureInfo("en-US"), false, true, new string[]{"km/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FuelEfficiencyUnit.LiterPer100Kilometers, new CultureInfo("en-US"), false, true, new string[]{"L/100km"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FuelEfficiencyUnit.MilePerUkGallon, new CultureInfo("en-US"), false, true, new string[]{"mpg (imp.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FuelEfficiencyUnit.MilePerUsGallon, new CultureInfo("en-US"), false, true, new string[]{"mpg (U.S.)"}); - } - /// /// Get unit abbreviation string. /// @@ -252,7 +245,7 @@ public static string GetAbbreviation(FuelEfficiencyUnit unit, IFormatProvider? p /// /// /// - public static string[] GetAbbreviations(FuelEfficiencyUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(FuelEfficiencyUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.FuelEfficiency"; var resourceManager = new ResourceManager(resourceName, typeof(FuelEfficiency).Assembly); @@ -842,7 +835,7 @@ public FuelEfficiency ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs index f694459a20..a6a181374b 100644 --- a/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -329,28 +330,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(HeatFluxUnit.WattPerSquareMeter, HeatFluxUnit.WattPerSquareInch, quantity => quantity.ToUnit(HeatFluxUnit.WattPerSquareInch)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(HeatFluxUnit.BtuPerHourSquareFoot, new CultureInfo("en-US"), false, true, new string[]{"BTU/h·ft²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatFluxUnit.BtuPerMinuteSquareFoot, new CultureInfo("en-US"), false, true, new string[]{"BTU/min·ft²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatFluxUnit.BtuPerSecondSquareFoot, new CultureInfo("en-US"), false, true, new string[]{"BTU/s·ft²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatFluxUnit.BtuPerSecondSquareInch, new CultureInfo("en-US"), false, true, new string[]{"BTU/s·in²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatFluxUnit.CaloriePerSecondSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"cal/s·cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatFluxUnit.CentiwattPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"cW/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatFluxUnit.DeciwattPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"dW/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatFluxUnit.KilocaloriePerHourSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"kcal/h·m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatFluxUnit.KilocaloriePerSecondSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"kcal/s·cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatFluxUnit.KilowattPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"kW/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatFluxUnit.MicrowattPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"µW/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatFluxUnit.MilliwattPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"mW/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatFluxUnit.NanowattPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"nW/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatFluxUnit.PoundForcePerFootSecond, new CultureInfo("en-US"), false, true, new string[]{"lbf/(ft·s)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatFluxUnit.PoundPerSecondCubed, new CultureInfo("en-US"), false, true, new string[]{"lb/s³", "lbm/s³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatFluxUnit.WattPerSquareFoot, new CultureInfo("en-US"), false, true, new string[]{"W/ft²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatFluxUnit.WattPerSquareInch, new CultureInfo("en-US"), false, true, new string[]{"W/in²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatFluxUnit.WattPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"W/m²"}); - } - /// /// Get unit abbreviation string. /// @@ -375,7 +354,7 @@ public static string GetAbbreviation(HeatFluxUnit unit, IFormatProvider? provide /// /// /// - public static string[] GetAbbreviations(HeatFluxUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(HeatFluxUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.HeatFlux"; var resourceManager = new ResourceManager(resourceName, typeof(HeatFlux).Assembly); @@ -1133,7 +1112,7 @@ public HeatFlux ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs index 6552b45991..ab41b17439 100644 --- a/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -234,16 +235,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(HeatTransferCoefficientUnit.WattPerSquareMeterKelvin, HeatTransferCoefficientUnit.WattPerSquareMeterCelsius, quantity => quantity.ToUnit(HeatTransferCoefficientUnit.WattPerSquareMeterCelsius)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(HeatTransferCoefficientUnit.BtuPerHourSquareFootDegreeFahrenheit, new CultureInfo("en-US"), false, true, new string[]{"Btu/h·ft²·°F", "Btu/ft²·h·°F", "Btu/hr·ft²·°F", "Btu/ft²·hr·°F"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatTransferCoefficientUnit.BtuPerSquareFootDegreeFahrenheit, new CultureInfo("en-US"), false, true, new string[]{"Btu/ft²·°F"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatTransferCoefficientUnit.CaloriePerHourSquareMeterDegreeCelsius, new CultureInfo("en-US"), false, true, new string[]{"kcal/h·m²·°C", "kcal/m²·h·°C", "kcal/hr·m²·°C", "kcal/m²·hr·°C"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatTransferCoefficientUnit.KilocaloriePerHourSquareMeterDegreeCelsius, new CultureInfo("en-US"), false, true, new string[]{"kkcal/h·m²·°C", "kkcal/m²·h·°C", "kkcal/hr·m²·°C", "kkcal/m²·hr·°C"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatTransferCoefficientUnit.WattPerSquareMeterCelsius, new CultureInfo("en-US"), false, true, new string[]{"W/m²·°C"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatTransferCoefficientUnit.WattPerSquareMeterKelvin, new CultureInfo("en-US"), false, true, new string[]{"W/m²·K"}); - } - /// /// Get unit abbreviation string. /// @@ -268,7 +259,7 @@ public static string GetAbbreviation(HeatTransferCoefficientUnit unit, IFormatPr /// /// /// - public static string[] GetAbbreviations(HeatTransferCoefficientUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(HeatTransferCoefficientUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.HeatTransferCoefficient"; var resourceManager = new ResourceManager(resourceName, typeof(HeatTransferCoefficient).Assembly); @@ -883,7 +874,7 @@ public HeatTransferCoefficient ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs b/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs index 4c9edebc73..bfb00b1303 100644 --- a/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -220,14 +221,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(IlluminanceUnit.Lux, IlluminanceUnit.Millilux, quantity => quantity.ToUnit(IlluminanceUnit.Millilux)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(IlluminanceUnit.Kilolux, new CultureInfo("en-US"), false, true, new string[]{"klx"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IlluminanceUnit.Lux, new CultureInfo("en-US"), false, true, new string[]{"lx"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IlluminanceUnit.Megalux, new CultureInfo("en-US"), false, true, new string[]{"Mlx"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IlluminanceUnit.Millilux, new CultureInfo("en-US"), false, true, new string[]{"mlx"}); - } - /// /// Get unit abbreviation string. /// @@ -252,7 +245,7 @@ public static string GetAbbreviation(IlluminanceUnit unit, IFormatProvider? prov /// /// /// - public static string[] GetAbbreviations(IlluminanceUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(IlluminanceUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.Illuminance"; var resourceManager = new ResourceManager(resourceName, typeof(Illuminance).Assembly); @@ -842,7 +835,7 @@ public Illuminance ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/Impulse.g.cs b/UnitsNet/GeneratedCode/Quantities/Impulse.g.cs index 010787268c..351759fac1 100644 --- a/UnitsNet/GeneratedCode/Quantities/Impulse.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Impulse.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -289,23 +290,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ImpulseUnit.NewtonSecond, ImpulseUnit.SlugFootPerSecond, quantity => quantity.ToUnit(ImpulseUnit.SlugFootPerSecond)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ImpulseUnit.CentinewtonSecond, new CultureInfo("en-US"), false, true, new string[]{"cN·s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ImpulseUnit.DecanewtonSecond, new CultureInfo("en-US"), false, true, new string[]{"daN·s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ImpulseUnit.DecinewtonSecond, new CultureInfo("en-US"), false, true, new string[]{"dN·s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ImpulseUnit.KilogramMeterPerSecond, new CultureInfo("en-US"), false, true, new string[]{"kg·m/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ImpulseUnit.KilonewtonSecond, new CultureInfo("en-US"), false, true, new string[]{"kN·s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ImpulseUnit.MeganewtonSecond, new CultureInfo("en-US"), false, true, new string[]{"MN·s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ImpulseUnit.MicronewtonSecond, new CultureInfo("en-US"), false, true, new string[]{"µN·s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ImpulseUnit.MillinewtonSecond, new CultureInfo("en-US"), false, true, new string[]{"mN·s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ImpulseUnit.NanonewtonSecond, new CultureInfo("en-US"), false, true, new string[]{"nN·s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ImpulseUnit.NewtonSecond, new CultureInfo("en-US"), false, true, new string[]{"N·s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ImpulseUnit.PoundFootPerSecond, new CultureInfo("en-US"), false, true, new string[]{"lb·ft/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ImpulseUnit.PoundForceSecond, new CultureInfo("en-US"), false, true, new string[]{"lbf·s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ImpulseUnit.SlugFootPerSecond, new CultureInfo("en-US"), false, true, new string[]{"slug·ft/s"}); - } - /// /// Get unit abbreviation string. /// @@ -330,7 +314,7 @@ public static string GetAbbreviation(ImpulseUnit unit, IFormatProvider? provider /// /// /// - public static string[] GetAbbreviations(ImpulseUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(ImpulseUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.Impulse"; var resourceManager = new ResourceManager(resourceName, typeof(Impulse).Assembly); @@ -1028,7 +1012,7 @@ public Impulse ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/Information.g.cs b/UnitsNet/GeneratedCode/Quantities/Information.g.cs index b795e10bdd..0c6316da50 100644 --- a/UnitsNet/GeneratedCode/Quantities/Information.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Information.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -394,36 +395,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(InformationUnit.Bit, InformationUnit.Terabyte, quantity => quantity.ToUnit(InformationUnit.Terabyte)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Bit, new CultureInfo("en-US"), false, true, new string[]{"b"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Byte, new CultureInfo("en-US"), false, true, new string[]{"B"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Exabit, new CultureInfo("en-US"), false, true, new string[]{"Eb"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Exabyte, new CultureInfo("en-US"), false, true, new string[]{"EB"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Exbibit, new CultureInfo("en-US"), false, true, new string[]{"Eib"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Exbibyte, new CultureInfo("en-US"), false, true, new string[]{"EiB"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Gibibit, new CultureInfo("en-US"), false, true, new string[]{"Gib"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Gibibyte, new CultureInfo("en-US"), false, true, new string[]{"GiB"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Gigabit, new CultureInfo("en-US"), false, true, new string[]{"Gb"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Gigabyte, new CultureInfo("en-US"), false, true, new string[]{"GB"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Kibibit, new CultureInfo("en-US"), false, true, new string[]{"Kib"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Kibibyte, new CultureInfo("en-US"), false, true, new string[]{"KiB"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Kilobit, new CultureInfo("en-US"), false, true, new string[]{"kb"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Kilobyte, new CultureInfo("en-US"), false, true, new string[]{"kB"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Mebibit, new CultureInfo("en-US"), false, true, new string[]{"Mib"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Mebibyte, new CultureInfo("en-US"), false, true, new string[]{"MiB"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Megabit, new CultureInfo("en-US"), false, true, new string[]{"Mb"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Megabyte, new CultureInfo("en-US"), false, true, new string[]{"MB"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Pebibit, new CultureInfo("en-US"), false, true, new string[]{"Pib"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Pebibyte, new CultureInfo("en-US"), false, true, new string[]{"PiB"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Petabit, new CultureInfo("en-US"), false, true, new string[]{"Pb"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Petabyte, new CultureInfo("en-US"), false, true, new string[]{"PB"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Tebibit, new CultureInfo("en-US"), false, true, new string[]{"Tib"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Tebibyte, new CultureInfo("en-US"), false, true, new string[]{"TiB"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Terabit, new CultureInfo("en-US"), false, true, new string[]{"Tb"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Terabyte, new CultureInfo("en-US"), false, true, new string[]{"TB"}); - } - /// /// Get unit abbreviation string. /// @@ -448,7 +419,7 @@ public static string GetAbbreviation(InformationUnit unit, IFormatProvider? prov /// /// /// - public static string[] GetAbbreviations(InformationUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(InformationUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.Information"; var resourceManager = new ResourceManager(resourceName, typeof(Information).Assembly); @@ -1313,7 +1284,7 @@ public Information ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs b/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs index 4ca42ce04a..72e72fa5fd 100644 --- a/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -297,24 +298,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(IrradianceUnit.WattPerSquareMeter, IrradianceUnit.WattPerSquareCentimeter, quantity => quantity.ToUnit(IrradianceUnit.WattPerSquareCentimeter)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(IrradianceUnit.KilowattPerSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"kW/cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IrradianceUnit.KilowattPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"kW/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IrradianceUnit.MegawattPerSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"MW/cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IrradianceUnit.MegawattPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"MW/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IrradianceUnit.MicrowattPerSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"µW/cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IrradianceUnit.MicrowattPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"µW/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IrradianceUnit.MilliwattPerSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"mW/cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IrradianceUnit.MilliwattPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"mW/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IrradianceUnit.NanowattPerSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"nW/cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IrradianceUnit.NanowattPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"nW/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IrradianceUnit.PicowattPerSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"pW/cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IrradianceUnit.PicowattPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"pW/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IrradianceUnit.WattPerSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"W/cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IrradianceUnit.WattPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"W/m²"}); - } - /// /// Get unit abbreviation string. /// @@ -339,7 +322,7 @@ public static string GetAbbreviation(IrradianceUnit unit, IFormatProvider? provi /// /// /// - public static string[] GetAbbreviations(IrradianceUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(IrradianceUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.Irradiance"; var resourceManager = new ResourceManager(resourceName, typeof(Irradiance).Assembly); @@ -1049,7 +1032,7 @@ public Irradiance ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs b/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs index 40716f7a8a..2ec657f849 100644 --- a/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -244,17 +245,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(IrradiationUnit.JoulePerSquareMeter, IrradiationUnit.WattHourPerSquareMeter, quantity => quantity.ToUnit(IrradiationUnit.WattHourPerSquareMeter)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(IrradiationUnit.JoulePerSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"J/cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IrradiationUnit.JoulePerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"J/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IrradiationUnit.JoulePerSquareMillimeter, new CultureInfo("en-US"), false, true, new string[]{"J/mm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IrradiationUnit.KilojoulePerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"kJ/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IrradiationUnit.KilowattHourPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"kWh/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IrradiationUnit.MillijoulePerSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"mJ/cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IrradiationUnit.WattHourPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"Wh/m²"}); - } - /// /// Get unit abbreviation string. /// @@ -279,7 +269,7 @@ public static string GetAbbreviation(IrradiationUnit unit, IFormatProvider? prov /// /// /// - public static string[] GetAbbreviations(IrradiationUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(IrradiationUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.Irradiation"; var resourceManager = new ResourceManager(resourceName, typeof(Irradiation).Assembly); @@ -905,7 +895,7 @@ public Irradiation ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/Jerk.g.cs b/UnitsNet/GeneratedCode/Quantities/Jerk.g.cs index 970a1dbfec..b4aa1f751b 100644 --- a/UnitsNet/GeneratedCode/Quantities/Jerk.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Jerk.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -273,32 +274,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(JerkUnit.MeterPerSecondCubed, JerkUnit.StandardGravitiesPerSecond, quantity => quantity.ToUnit(JerkUnit.StandardGravitiesPerSecond)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.CentimeterPerSecondCubed, new CultureInfo("en-US"), false, true, new string[]{"cm/s³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.CentimeterPerSecondCubed, new CultureInfo("ru-RU"), false, true, new string[]{"см/с³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.DecimeterPerSecondCubed, new CultureInfo("en-US"), false, true, new string[]{"dm/s³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.DecimeterPerSecondCubed, new CultureInfo("ru-RU"), false, true, new string[]{"дм/с³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.FootPerSecondCubed, new CultureInfo("en-US"), false, true, new string[]{"ft/s³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.FootPerSecondCubed, new CultureInfo("ru-RU"), false, true, new string[]{"фут/с³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.InchPerSecondCubed, new CultureInfo("en-US"), false, true, new string[]{"in/s³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.InchPerSecondCubed, new CultureInfo("ru-RU"), false, true, new string[]{"дюйм/с³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.KilometerPerSecondCubed, new CultureInfo("en-US"), false, true, new string[]{"km/s³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.KilometerPerSecondCubed, new CultureInfo("ru-RU"), false, true, new string[]{"км/с³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.MeterPerSecondCubed, new CultureInfo("en-US"), false, true, new string[]{"m/s³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.MeterPerSecondCubed, new CultureInfo("ru-RU"), false, true, new string[]{"м/с³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.MicrometerPerSecondCubed, new CultureInfo("en-US"), false, true, new string[]{"µm/s³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.MicrometerPerSecondCubed, new CultureInfo("ru-RU"), false, true, new string[]{"мкм/с³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.MillimeterPerSecondCubed, new CultureInfo("en-US"), false, true, new string[]{"mm/s³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.MillimeterPerSecondCubed, new CultureInfo("ru-RU"), false, true, new string[]{"мм/с³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.MillistandardGravitiesPerSecond, new CultureInfo("en-US"), false, true, new string[]{"mg/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.MillistandardGravitiesPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"мg/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.NanometerPerSecondCubed, new CultureInfo("en-US"), false, true, new string[]{"nm/s³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.NanometerPerSecondCubed, new CultureInfo("ru-RU"), false, true, new string[]{"нм/с³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.StandardGravitiesPerSecond, new CultureInfo("en-US"), false, true, new string[]{"g/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.StandardGravitiesPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"g/s"}); - } - /// /// Get unit abbreviation string. /// @@ -323,7 +298,7 @@ public static string GetAbbreviation(JerkUnit unit, IFormatProvider? provider) /// /// /// - public static string[] GetAbbreviations(JerkUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(JerkUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.Jerk"; var resourceManager = new ResourceManager(resourceName, typeof(Jerk).Assembly); @@ -997,7 +972,7 @@ public Jerk ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs index 2a00854328..1bf1be54d8 100644 --- a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -260,27 +261,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(KinematicViscosityUnit.SquareMeterPerSecond, KinematicViscosityUnit.Stokes, quantity => quantity.ToUnit(KinematicViscosityUnit.Stokes)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(KinematicViscosityUnit.Centistokes, new CultureInfo("en-US"), false, true, new string[]{"cSt"}); - unitAbbreviationsCache.PerformAbbreviationMapping(KinematicViscosityUnit.Centistokes, new CultureInfo("ru-RU"), false, true, new string[]{"сСт"}); - unitAbbreviationsCache.PerformAbbreviationMapping(KinematicViscosityUnit.Decistokes, new CultureInfo("en-US"), false, true, new string[]{"dSt"}); - unitAbbreviationsCache.PerformAbbreviationMapping(KinematicViscosityUnit.Decistokes, new CultureInfo("ru-RU"), false, true, new string[]{"дСт"}); - unitAbbreviationsCache.PerformAbbreviationMapping(KinematicViscosityUnit.Kilostokes, new CultureInfo("en-US"), false, true, new string[]{"kSt"}); - unitAbbreviationsCache.PerformAbbreviationMapping(KinematicViscosityUnit.Kilostokes, new CultureInfo("ru-RU"), false, true, new string[]{"кСт"}); - unitAbbreviationsCache.PerformAbbreviationMapping(KinematicViscosityUnit.Microstokes, new CultureInfo("en-US"), false, true, new string[]{"µSt"}); - unitAbbreviationsCache.PerformAbbreviationMapping(KinematicViscosityUnit.Microstokes, new CultureInfo("ru-RU"), false, true, new string[]{"мкСт"}); - unitAbbreviationsCache.PerformAbbreviationMapping(KinematicViscosityUnit.Millistokes, new CultureInfo("en-US"), false, true, new string[]{"mSt"}); - unitAbbreviationsCache.PerformAbbreviationMapping(KinematicViscosityUnit.Millistokes, new CultureInfo("ru-RU"), false, true, new string[]{"мСт"}); - unitAbbreviationsCache.PerformAbbreviationMapping(KinematicViscosityUnit.Nanostokes, new CultureInfo("en-US"), false, true, new string[]{"nSt"}); - unitAbbreviationsCache.PerformAbbreviationMapping(KinematicViscosityUnit.Nanostokes, new CultureInfo("ru-RU"), false, true, new string[]{"нСт"}); - unitAbbreviationsCache.PerformAbbreviationMapping(KinematicViscosityUnit.SquareFootPerSecond, new CultureInfo("en-US"), false, true, new string[]{"ft²/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(KinematicViscosityUnit.SquareMeterPerSecond, new CultureInfo("en-US"), false, true, new string[]{"m²/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(KinematicViscosityUnit.SquareMeterPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"м²/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(KinematicViscosityUnit.Stokes, new CultureInfo("en-US"), false, true, new string[]{"St"}); - unitAbbreviationsCache.PerformAbbreviationMapping(KinematicViscosityUnit.Stokes, new CultureInfo("ru-RU"), false, true, new string[]{"Ст"}); - } - /// /// Get unit abbreviation string. /// @@ -305,7 +285,7 @@ public static string GetAbbreviation(KinematicViscosityUnit unit, IFormatProvide /// /// /// - public static string[] GetAbbreviations(KinematicViscosityUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(KinematicViscosityUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.KinematicViscosity"; var resourceManager = new ResourceManager(resourceName, typeof(KinematicViscosity).Assembly); @@ -955,7 +935,7 @@ public KinematicViscosity ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/Length.g.cs b/UnitsNet/GeneratedCode/Quantities/Length.g.cs index 15604591ef..4d1784429b 100644 --- a/UnitsNet/GeneratedCode/Quantities/Length.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Length.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -481,81 +482,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(LengthUnit.Meter, LengthUnit.Yard, quantity => quantity.ToUnit(LengthUnit.Yard)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Angstrom, new CultureInfo("en-US"), false, true, new string[]{"Å", "A"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.AstronomicalUnit, new CultureInfo("en-US"), false, true, new string[]{"au", "ua"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Centimeter, new CultureInfo("en-US"), false, true, new string[]{"cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Centimeter, new CultureInfo("ru-RU"), false, true, new string[]{"см"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Centimeter, new CultureInfo("zh-CN"), false, true, new string[]{"厘米"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Chain, new CultureInfo("en-US"), false, true, new string[]{"ch"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.DataMile, new CultureInfo("en-US"), false, true, new string[]{"DM"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Decameter, new CultureInfo("en-US"), false, true, new string[]{"dam"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Decameter, new CultureInfo("ru-RU"), false, true, new string[]{"дам"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Decameter, new CultureInfo("zh-CN"), false, true, new string[]{"十米"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Decimeter, new CultureInfo("en-US"), false, true, new string[]{"dm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Decimeter, new CultureInfo("ru-RU"), false, true, new string[]{"дм"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Decimeter, new CultureInfo("zh-CN"), false, true, new string[]{"分米"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.DtpPica, new CultureInfo("en-US"), false, true, new string[]{"pica"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.DtpPoint, new CultureInfo("en-US"), false, true, new string[]{"pt"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Fathom, new CultureInfo("en-US"), false, true, new string[]{"fathom"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Foot, new CultureInfo("en-US"), false, true, new string[]{"ft", "'", "′"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Foot, new CultureInfo("ru-RU"), false, true, new string[]{"фут"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Foot, new CultureInfo("zh-CN"), false, true, new string[]{"英尺"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Hand, new CultureInfo("en-US"), false, true, new string[]{"h", "hh"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Hectometer, new CultureInfo("en-US"), false, true, new string[]{"hm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Hectometer, new CultureInfo("ru-RU"), false, true, new string[]{"гм"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Hectometer, new CultureInfo("zh-CN"), false, true, new string[]{"百米"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Inch, new CultureInfo("en-US"), false, true, new string[]{"in", "\"", "″"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Inch, new CultureInfo("ru-RU"), false, true, new string[]{"дюйм"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Inch, new CultureInfo("zh-CN"), false, true, new string[]{"英寸"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.KilolightYear, new CultureInfo("en-US"), false, true, new string[]{"kly"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Kilometer, new CultureInfo("en-US"), false, true, new string[]{"km"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Kilometer, new CultureInfo("ru-RU"), false, true, new string[]{"км"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Kilometer, new CultureInfo("zh-CN"), false, true, new string[]{"千米"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Kiloparsec, new CultureInfo("en-US"), false, true, new string[]{"kpc"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.LightYear, new CultureInfo("en-US"), false, true, new string[]{"ly"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.MegalightYear, new CultureInfo("en-US"), false, true, new string[]{"Mly"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Megameter, new CultureInfo("en-US"), false, true, new string[]{"Mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Megameter, new CultureInfo("ru-RU"), false, true, new string[]{"Мм"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Megameter, new CultureInfo("zh-CN"), false, true, new string[]{"兆米"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Megaparsec, new CultureInfo("en-US"), false, true, new string[]{"Mpc"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Meter, new CultureInfo("en-US"), false, true, new string[]{"m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Meter, new CultureInfo("ru-RU"), false, true, new string[]{"м"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Meter, new CultureInfo("zh-CN"), false, true, new string[]{"米"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Microinch, new CultureInfo("en-US"), false, true, new string[]{"µin"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Microinch, new CultureInfo("ru-RU"), false, true, new string[]{"микродюйм"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Microinch, new CultureInfo("zh-CN"), false, true, new string[]{"微英寸"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Micrometer, new CultureInfo("en-US"), false, true, new string[]{"µm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Micrometer, new CultureInfo("ru-RU"), false, true, new string[]{"мкм"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Micrometer, new CultureInfo("zh-CN"), false, true, new string[]{"微米"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Mil, new CultureInfo("en-US"), false, true, new string[]{"mil"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Mil, new CultureInfo("ru-RU"), false, true, new string[]{"мил"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Mil, new CultureInfo("zh-CN"), false, true, new string[]{"密耳"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Mile, new CultureInfo("en-US"), false, true, new string[]{"mi"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Mile, new CultureInfo("ru-RU"), false, true, new string[]{"миля"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Mile, new CultureInfo("zh-CN"), false, true, new string[]{"英里"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Millimeter, new CultureInfo("en-US"), false, true, new string[]{"mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Millimeter, new CultureInfo("ru-RU"), false, true, new string[]{"мм"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Millimeter, new CultureInfo("zh-CN"), false, true, new string[]{"毫米"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Nanometer, new CultureInfo("en-US"), false, true, new string[]{"nm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Nanometer, new CultureInfo("ru-RU"), false, true, new string[]{"нм"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Nanometer, new CultureInfo("zh-CN"), false, true, new string[]{"纳米"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.NauticalMile, new CultureInfo("en-US"), false, true, new string[]{"NM"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.NauticalMile, new CultureInfo("ru-RU"), false, true, new string[]{"мил"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.NauticalMile, new CultureInfo("zh-CN"), false, true, new string[]{"纳米"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Parsec, new CultureInfo("en-US"), false, true, new string[]{"pc"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.PrinterPica, new CultureInfo("en-US"), false, true, new string[]{"pica"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.PrinterPoint, new CultureInfo("en-US"), false, true, new string[]{"pt"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Shackle, new CultureInfo("en-US"), false, true, new string[]{"shackle"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.SolarRadius, new CultureInfo("en-US"), false, true, new string[]{"R⊙"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Twip, new CultureInfo("en-US"), false, true, new string[]{"twip"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.UsSurveyFoot, new CultureInfo("en-US"), false, true, new string[]{"ftUS"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Yard, new CultureInfo("en-US"), false, true, new string[]{"yd"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Yard, new CultureInfo("ru-RU"), false, true, new string[]{"ярд"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Yard, new CultureInfo("zh-CN"), false, true, new string[]{"码"}); - } - /// /// Get unit abbreviation string. /// @@ -580,7 +506,7 @@ public static string GetAbbreviation(LengthUnit unit, IFormatProvider? provider) /// /// /// - public static string[] GetAbbreviations(LengthUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(LengthUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.Length"; var resourceManager = new ResourceManager(resourceName, typeof(Length).Assembly); @@ -1566,7 +1492,7 @@ public Length ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/Level.g.cs b/UnitsNet/GeneratedCode/Quantities/Level.g.cs index dcfacbb554..b01244aed5 100644 --- a/UnitsNet/GeneratedCode/Quantities/Level.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Level.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -201,12 +202,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(LevelUnit.Decibel, LevelUnit.Neper, quantity => quantity.ToUnit(LevelUnit.Neper)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(LevelUnit.Decibel, new CultureInfo("en-US"), false, true, new string[]{"dB"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LevelUnit.Neper, new CultureInfo("en-US"), false, true, new string[]{"Np"}); - } - /// /// Get unit abbreviation string. /// @@ -231,7 +226,7 @@ public static string GetAbbreviation(LevelUnit unit, IFormatProvider? provider) /// /// /// - public static string[] GetAbbreviations(LevelUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(LevelUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.Level"; var resourceManager = new ResourceManager(resourceName, typeof(Level).Assembly); @@ -805,7 +800,7 @@ public Level ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs index 3f690f6493..6c77191449 100644 --- a/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -300,24 +301,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(LinearDensityUnit.KilogramPerMeter, LinearDensityUnit.PoundPerInch, quantity => quantity.ToUnit(LinearDensityUnit.PoundPerInch)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(LinearDensityUnit.GramPerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"g/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearDensityUnit.GramPerMeter, new CultureInfo("en-US"), false, true, new string[]{"g/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearDensityUnit.GramPerMillimeter, new CultureInfo("en-US"), false, true, new string[]{"g/mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearDensityUnit.KilogramPerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"kg/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearDensityUnit.KilogramPerMeter, new CultureInfo("en-US"), false, true, new string[]{"kg/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearDensityUnit.KilogramPerMillimeter, new CultureInfo("en-US"), false, true, new string[]{"kg/mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearDensityUnit.MicrogramPerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"µg/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearDensityUnit.MicrogramPerMeter, new CultureInfo("en-US"), false, true, new string[]{"µg/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearDensityUnit.MicrogramPerMillimeter, new CultureInfo("en-US"), false, true, new string[]{"µg/mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearDensityUnit.MilligramPerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"mg/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearDensityUnit.MilligramPerMeter, new CultureInfo("en-US"), false, true, new string[]{"mg/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearDensityUnit.MilligramPerMillimeter, new CultureInfo("en-US"), false, true, new string[]{"mg/mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearDensityUnit.PoundPerFoot, new CultureInfo("en-US"), false, true, new string[]{"lb/ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearDensityUnit.PoundPerInch, new CultureInfo("en-US"), false, true, new string[]{"lb/in"}); - } - /// /// Get unit abbreviation string. /// @@ -342,7 +325,7 @@ public static string GetAbbreviation(LinearDensityUnit unit, IFormatProvider? pr /// /// /// - public static string[] GetAbbreviations(LinearDensityUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(LinearDensityUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.LinearDensity"; var resourceManager = new ResourceManager(resourceName, typeof(LinearDensity).Assembly); @@ -1052,7 +1035,7 @@ public LinearDensity ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs index 0fe818ae76..b38bad028d 100644 --- a/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -388,35 +389,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(LinearPowerDensityUnit.WattPerMeter, LinearPowerDensityUnit.WattPerMillimeter, quantity => quantity.ToUnit(LinearPowerDensityUnit.WattPerMillimeter)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.GigawattPerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"GW/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.GigawattPerFoot, new CultureInfo("en-US"), false, true, new string[]{"GW/ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.GigawattPerInch, new CultureInfo("en-US"), false, true, new string[]{"GW/in"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.GigawattPerMeter, new CultureInfo("en-US"), false, true, new string[]{"GW/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.GigawattPerMillimeter, new CultureInfo("en-US"), false, true, new string[]{"GW/mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.KilowattPerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"kW/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.KilowattPerFoot, new CultureInfo("en-US"), false, true, new string[]{"kW/ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.KilowattPerInch, new CultureInfo("en-US"), false, true, new string[]{"kW/in"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.KilowattPerMeter, new CultureInfo("en-US"), false, true, new string[]{"kW/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.KilowattPerMillimeter, new CultureInfo("en-US"), false, true, new string[]{"kW/mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.MegawattPerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"MW/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.MegawattPerFoot, new CultureInfo("en-US"), false, true, new string[]{"MW/ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.MegawattPerInch, new CultureInfo("en-US"), false, true, new string[]{"MW/in"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.MegawattPerMeter, new CultureInfo("en-US"), false, true, new string[]{"MW/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.MegawattPerMillimeter, new CultureInfo("en-US"), false, true, new string[]{"MW/mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.MilliwattPerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"mW/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.MilliwattPerFoot, new CultureInfo("en-US"), false, true, new string[]{"mW/ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.MilliwattPerInch, new CultureInfo("en-US"), false, true, new string[]{"mW/in"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.MilliwattPerMeter, new CultureInfo("en-US"), false, true, new string[]{"mW/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.MilliwattPerMillimeter, new CultureInfo("en-US"), false, true, new string[]{"mW/mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.WattPerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"W/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.WattPerFoot, new CultureInfo("en-US"), false, true, new string[]{"W/ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.WattPerInch, new CultureInfo("en-US"), false, true, new string[]{"W/in"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.WattPerMeter, new CultureInfo("en-US"), false, true, new string[]{"W/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.WattPerMillimeter, new CultureInfo("en-US"), false, true, new string[]{"W/mm"}); - } - /// /// Get unit abbreviation string. /// @@ -441,7 +413,7 @@ public static string GetAbbreviation(LinearPowerDensityUnit unit, IFormatProvide /// /// /// - public static string[] GetAbbreviations(LinearPowerDensityUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(LinearPowerDensityUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.LinearPowerDensity"; var resourceManager = new ResourceManager(resourceName, typeof(LinearPowerDensity).Assembly); @@ -1283,7 +1255,7 @@ public LinearPowerDensity ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/Luminance.g.cs b/UnitsNet/GeneratedCode/Quantities/Luminance.g.cs index e0ce11853e..5821a3c1d3 100644 --- a/UnitsNet/GeneratedCode/Quantities/Luminance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Luminance.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -268,20 +269,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(LuminanceUnit.CandelaPerSquareMeter, LuminanceUnit.Nit, quantity => quantity.ToUnit(LuminanceUnit.Nit)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(LuminanceUnit.CandelaPerSquareFoot, new CultureInfo("en-US"), false, true, new string[]{"Cd/ft²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminanceUnit.CandelaPerSquareInch, new CultureInfo("en-US"), false, true, new string[]{"Cd/in²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminanceUnit.CandelaPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"Cd/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminanceUnit.CenticandelaPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"cCd/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminanceUnit.DecicandelaPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"dCd/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminanceUnit.KilocandelaPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"kCd/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminanceUnit.MicrocandelaPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"µCd/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminanceUnit.MillicandelaPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"mCd/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminanceUnit.NanocandelaPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"nCd/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminanceUnit.Nit, new CultureInfo("en-US"), false, true, new string[]{"nt"}); - } - /// /// Get unit abbreviation string. /// @@ -306,7 +293,7 @@ public static string GetAbbreviation(LuminanceUnit unit, IFormatProvider? provid /// /// /// - public static string[] GetAbbreviations(LuminanceUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(LuminanceUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.Luminance"; var resourceManager = new ResourceManager(resourceName, typeof(Luminance).Assembly); @@ -968,7 +955,7 @@ public Luminance ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs b/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs index aea7842184..ac01204952 100644 --- a/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -300,24 +301,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(LuminosityUnit.Watt, LuminosityUnit.Terawatt, quantity => quantity.ToUnit(LuminosityUnit.Terawatt)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(LuminosityUnit.Decawatt, new CultureInfo("en-US"), false, true, new string[]{"daW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminosityUnit.Deciwatt, new CultureInfo("en-US"), false, true, new string[]{"dW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminosityUnit.Femtowatt, new CultureInfo("en-US"), false, true, new string[]{"fW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminosityUnit.Gigawatt, new CultureInfo("en-US"), false, true, new string[]{"GW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminosityUnit.Kilowatt, new CultureInfo("en-US"), false, true, new string[]{"kW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminosityUnit.Megawatt, new CultureInfo("en-US"), false, true, new string[]{"MW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminosityUnit.Microwatt, new CultureInfo("en-US"), false, true, new string[]{"µW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminosityUnit.Milliwatt, new CultureInfo("en-US"), false, true, new string[]{"mW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminosityUnit.Nanowatt, new CultureInfo("en-US"), false, true, new string[]{"nW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminosityUnit.Petawatt, new CultureInfo("en-US"), false, true, new string[]{"PW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminosityUnit.Picowatt, new CultureInfo("en-US"), false, true, new string[]{"pW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminosityUnit.SolarLuminosity, new CultureInfo("en-US"), false, true, new string[]{"L⊙"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminosityUnit.Terawatt, new CultureInfo("en-US"), false, true, new string[]{"TW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminosityUnit.Watt, new CultureInfo("en-US"), false, true, new string[]{"W"}); - } - /// /// Get unit abbreviation string. /// @@ -342,7 +325,7 @@ public static string GetAbbreviation(LuminosityUnit unit, IFormatProvider? provi /// /// /// - public static string[] GetAbbreviations(LuminosityUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(LuminosityUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.Luminosity"; var resourceManager = new ResourceManager(resourceName, typeof(Luminosity).Assembly); @@ -1052,7 +1035,7 @@ public Luminosity ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs index f78a02c083..774fb37b57 100644 --- a/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -196,11 +197,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) // Register in unit converter: BaseUnit -> LuminousFluxUnit } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(LuminousFluxUnit.Lumen, new CultureInfo("en-US"), false, true, new string[]{"lm"}); - } - /// /// Get unit abbreviation string. /// @@ -225,7 +221,7 @@ public static string GetAbbreviation(LuminousFluxUnit unit, IFormatProvider? pro /// /// /// - public static string[] GetAbbreviations(LuminousFluxUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(LuminousFluxUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.LuminousFlux"; var resourceManager = new ResourceManager(resourceName, typeof(LuminousFlux).Assembly); @@ -779,7 +775,7 @@ public LuminousFlux ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs b/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs index 4a5ca21446..beb22488e2 100644 --- a/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -196,11 +197,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) // Register in unit converter: BaseUnit -> LuminousIntensityUnit } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(LuminousIntensityUnit.Candela, new CultureInfo("en-US"), false, true, new string[]{"cd"}); - } - /// /// Get unit abbreviation string. /// @@ -225,7 +221,7 @@ public static string GetAbbreviation(LuminousIntensityUnit unit, IFormatProvider /// /// /// - public static string[] GetAbbreviations(LuminousIntensityUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(LuminousIntensityUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.LuminousIntensity"; var resourceManager = new ResourceManager(resourceName, typeof(LuminousIntensity).Assembly); @@ -779,7 +775,7 @@ public LuminousIntensity ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs b/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs index e84f4fcf79..b89e683d47 100644 --- a/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -236,16 +237,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(MagneticFieldUnit.Tesla, MagneticFieldUnit.Nanotesla, quantity => quantity.ToUnit(MagneticFieldUnit.Nanotesla)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(MagneticFieldUnit.Gauss, new CultureInfo("en-US"), false, true, new string[]{"G"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MagneticFieldUnit.Microtesla, new CultureInfo("en-US"), false, true, new string[]{"µT"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MagneticFieldUnit.Milligauss, new CultureInfo("en-US"), false, true, new string[]{"mG"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MagneticFieldUnit.Millitesla, new CultureInfo("en-US"), false, true, new string[]{"mT"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MagneticFieldUnit.Nanotesla, new CultureInfo("en-US"), false, true, new string[]{"nT"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MagneticFieldUnit.Tesla, new CultureInfo("en-US"), false, true, new string[]{"T"}); - } - /// /// Get unit abbreviation string. /// @@ -270,7 +261,7 @@ public static string GetAbbreviation(MagneticFieldUnit unit, IFormatProvider? pr /// /// /// - public static string[] GetAbbreviations(MagneticFieldUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(MagneticFieldUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.MagneticField"; var resourceManager = new ResourceManager(resourceName, typeof(MagneticField).Assembly); @@ -884,7 +875,7 @@ public MagneticField ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs index cbc95aeea7..33dacdf8ce 100644 --- a/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -196,11 +197,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) // Register in unit converter: BaseUnit -> MagneticFluxUnit } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(MagneticFluxUnit.Weber, new CultureInfo("en-US"), false, true, new string[]{"Wb"}); - } - /// /// Get unit abbreviation string. /// @@ -225,7 +221,7 @@ public static string GetAbbreviation(MagneticFluxUnit unit, IFormatProvider? pro /// /// /// - public static string[] GetAbbreviations(MagneticFluxUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(MagneticFluxUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.MagneticFlux"; var resourceManager = new ResourceManager(resourceName, typeof(MagneticFlux).Assembly); @@ -779,7 +775,7 @@ public MagneticFlux ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs b/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs index f5ff1e06d4..ef9597ce65 100644 --- a/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -196,11 +197,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) // Register in unit converter: BaseUnit -> MagnetizationUnit } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(MagnetizationUnit.AmperePerMeter, new CultureInfo("en-US"), false, true, new string[]{"A/m"}); - } - /// /// Get unit abbreviation string. /// @@ -225,7 +221,7 @@ public static string GetAbbreviation(MagnetizationUnit unit, IFormatProvider? pr /// /// /// - public static string[] GetAbbreviations(MagnetizationUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(MagnetizationUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.Magnetization"; var resourceManager = new ResourceManager(resourceName, typeof(Magnetization).Assembly); @@ -779,7 +775,7 @@ public Magnetization ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/Mass.g.cs b/UnitsNet/GeneratedCode/Quantities/Mass.g.cs index c79b6d2a79..3459f7aca6 100644 --- a/UnitsNet/GeneratedCode/Quantities/Mass.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Mass.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -385,70 +386,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(MassUnit.Kilogram, MassUnit.Tonne, quantity => quantity.ToUnit(MassUnit.Tonne)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Centigram, new CultureInfo("en-US"), false, true, new string[]{"cg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Centigram, new CultureInfo("ru-RU"), false, true, new string[]{"сг"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Centigram, new CultureInfo("zh-CN"), false, true, new string[]{"厘克"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Decagram, new CultureInfo("en-US"), false, true, new string[]{"dag"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Decagram, new CultureInfo("ru-RU"), false, true, new string[]{"даг"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Decagram, new CultureInfo("zh-CN"), false, true, new string[]{"十克"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Decigram, new CultureInfo("en-US"), false, true, new string[]{"dg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Decigram, new CultureInfo("ru-RU"), false, true, new string[]{"дг"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Decigram, new CultureInfo("zh-CN"), false, true, new string[]{"分克"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.EarthMass, new CultureInfo("en-US"), false, true, new string[]{"em"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Grain, new CultureInfo("en-US"), false, true, new string[]{"gr"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Gram, new CultureInfo("en-US"), false, true, new string[]{"g"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Gram, new CultureInfo("ru-RU"), false, true, new string[]{"г"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Gram, new CultureInfo("zh-CN"), false, true, new string[]{"克"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Hectogram, new CultureInfo("en-US"), false, true, new string[]{"hg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Hectogram, new CultureInfo("ru-RU"), false, true, new string[]{"гг"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Hectogram, new CultureInfo("zh-CN"), false, true, new string[]{"百克"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Kilogram, new CultureInfo("en-US"), false, true, new string[]{"kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Kilogram, new CultureInfo("ru-RU"), false, true, new string[]{"кг"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Kilogram, new CultureInfo("zh-CN"), false, true, new string[]{"千克"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Kilopound, new CultureInfo("en-US"), false, true, new string[]{"klb", "klbs", "klbm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Kilopound, new CultureInfo("ru-RU"), false, true, new string[]{"кфунт"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Kilopound, new CultureInfo("zh-CN"), false, true, new string[]{"千磅"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Kilotonne, new CultureInfo("en-US"), false, true, new string[]{"kt"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Kilotonne, new CultureInfo("ru-RU"), false, true, new string[]{"кт"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Kilotonne, new CultureInfo("zh-CN"), false, true, new string[]{"千吨"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.LongHundredweight, new CultureInfo("en-US"), false, true, new string[]{"cwt"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.LongTon, new CultureInfo("en-US"), false, true, new string[]{"long tn"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.LongTon, new CultureInfo("ru-RU"), false, true, new string[]{"тонна большая"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.LongTon, new CultureInfo("zh-CN"), false, true, new string[]{"长吨"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Megapound, new CultureInfo("en-US"), false, true, new string[]{"Mlb", "Mlbs", "Mlbm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Megapound, new CultureInfo("ru-RU"), false, true, new string[]{"Мфунт"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Megapound, new CultureInfo("zh-CN"), false, true, new string[]{"兆磅"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Megatonne, new CultureInfo("en-US"), false, true, new string[]{"Mt"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Megatonne, new CultureInfo("ru-RU"), false, true, new string[]{"Мт"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Megatonne, new CultureInfo("zh-CN"), false, true, new string[]{"兆吨"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Microgram, new CultureInfo("en-US"), false, true, new string[]{"µg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Microgram, new CultureInfo("ru-RU"), false, true, new string[]{"мкг"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Microgram, new CultureInfo("zh-CN"), false, true, new string[]{"微克"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Milligram, new CultureInfo("en-US"), false, true, new string[]{"mg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Milligram, new CultureInfo("ru-RU"), false, true, new string[]{"мг"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Milligram, new CultureInfo("zh-CN"), false, true, new string[]{"毫克"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Nanogram, new CultureInfo("en-US"), false, true, new string[]{"ng"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Nanogram, new CultureInfo("ru-RU"), false, true, new string[]{"нг"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Nanogram, new CultureInfo("zh-CN"), false, true, new string[]{"纳克"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Ounce, new CultureInfo("en-US"), false, true, new string[]{"oz"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Ounce, new CultureInfo("zh-CN"), false, true, new string[]{"盎司"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Pound, new CultureInfo("en-US"), false, true, new string[]{"lb", "lbs", "lbm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Pound, new CultureInfo("ru-RU"), false, true, new string[]{"фунт"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Pound, new CultureInfo("zh-CN"), false, true, new string[]{"磅"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.ShortHundredweight, new CultureInfo("en-US"), false, true, new string[]{"cwt"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.ShortTon, new CultureInfo("en-US"), false, true, new string[]{"t (short)", "short tn", "ST"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.ShortTon, new CultureInfo("ru-RU"), false, true, new string[]{"тонна малая"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.ShortTon, new CultureInfo("zh-CN"), false, true, new string[]{"短吨"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Slug, new CultureInfo("en-US"), false, true, new string[]{"slug"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.SolarMass, new CultureInfo("en-US"), false, true, new string[]{"M☉", "M⊙"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Stone, new CultureInfo("en-US"), false, true, new string[]{"st"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Tonne, new CultureInfo("en-US"), false, true, new string[]{"t"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Tonne, new CultureInfo("ru-RU"), false, true, new string[]{"т"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Tonne, new CultureInfo("zh-CN"), false, true, new string[]{"吨"}); - } - /// /// Get unit abbreviation string. /// @@ -473,7 +410,7 @@ public static string GetAbbreviation(MassUnit unit, IFormatProvider? provider) /// /// /// - public static string[] GetAbbreviations(MassUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(MassUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.Mass"; var resourceManager = new ResourceManager(resourceName, typeof(Mass).Assembly); @@ -1315,7 +1252,7 @@ public Mass ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs b/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs index ae991e7663..233cc9643a 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -580,63 +581,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(MassConcentrationUnit.KilogramPerCubicMeter, MassConcentrationUnit.TonnePerCubicMillimeter, quantity => quantity.ToUnit(MassConcentrationUnit.TonnePerCubicMillimeter)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.CentigramPerDeciliter, new CultureInfo("en-US"), false, true, new string[]{"cg/dL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.CentigramPerLiter, new CultureInfo("en-US"), false, true, new string[]{"cg/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.CentigramPerMicroliter, new CultureInfo("en-US"), false, true, new string[]{"cg/μL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.CentigramPerMilliliter, new CultureInfo("en-US"), false, true, new string[]{"cg/mL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.DecigramPerDeciliter, new CultureInfo("en-US"), false, true, new string[]{"dg/dL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.DecigramPerLiter, new CultureInfo("en-US"), false, true, new string[]{"dg/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.DecigramPerMicroliter, new CultureInfo("en-US"), false, true, new string[]{"dg/μL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.DecigramPerMilliliter, new CultureInfo("en-US"), false, true, new string[]{"dg/mL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.GramPerCubicCentimeter, new CultureInfo("en-US"), false, true, new string[]{"g/cm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.GramPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"g/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.GramPerCubicMeter, new CultureInfo("ru-RU"), false, true, new string[]{"г/м³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.GramPerCubicMillimeter, new CultureInfo("en-US"), false, true, new string[]{"g/mm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.GramPerDeciliter, new CultureInfo("en-US"), false, true, new string[]{"g/dL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.GramPerLiter, new CultureInfo("en-US"), false, true, new string[]{"g/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.GramPerMicroliter, new CultureInfo("en-US"), false, true, new string[]{"g/μL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.GramPerMilliliter, new CultureInfo("en-US"), false, true, new string[]{"g/mL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.KilogramPerCubicCentimeter, new CultureInfo("en-US"), false, true, new string[]{"kg/cm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.KilogramPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"kg/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.KilogramPerCubicMeter, new CultureInfo("ru-RU"), false, true, new string[]{"кг/м³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.KilogramPerCubicMillimeter, new CultureInfo("en-US"), false, true, new string[]{"kg/mm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.KilogramPerLiter, new CultureInfo("en-US"), false, true, new string[]{"kg/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.KilopoundPerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"kip/ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.KilopoundPerCubicInch, new CultureInfo("en-US"), false, true, new string[]{"kip/in³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.MicrogramPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"µg/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.MicrogramPerCubicMeter, new CultureInfo("ru-RU"), false, true, new string[]{"мкг/м³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.MicrogramPerDeciliter, new CultureInfo("en-US"), false, true, new string[]{"µg/dL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.MicrogramPerLiter, new CultureInfo("en-US"), false, true, new string[]{"µg/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.MicrogramPerMicroliter, new CultureInfo("en-US"), false, true, new string[]{"µg/μL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.MicrogramPerMilliliter, new CultureInfo("en-US"), false, true, new string[]{"µg/mL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.MilligramPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"mg/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.MilligramPerCubicMeter, new CultureInfo("ru-RU"), false, true, new string[]{"мг/м³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.MilligramPerDeciliter, new CultureInfo("en-US"), false, true, new string[]{"mg/dL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.MilligramPerLiter, new CultureInfo("en-US"), false, true, new string[]{"mg/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.MilligramPerMicroliter, new CultureInfo("en-US"), false, true, new string[]{"mg/μL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.MilligramPerMilliliter, new CultureInfo("en-US"), false, true, new string[]{"mg/mL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.NanogramPerDeciliter, new CultureInfo("en-US"), false, true, new string[]{"ng/dL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.NanogramPerLiter, new CultureInfo("en-US"), false, true, new string[]{"ng/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.NanogramPerMicroliter, new CultureInfo("en-US"), false, true, new string[]{"ng/μL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.NanogramPerMilliliter, new CultureInfo("en-US"), false, true, new string[]{"ng/mL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.OuncePerImperialGallon, new CultureInfo("en-US"), false, true, new string[]{"oz/gal (imp.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.OuncePerUSGallon, new CultureInfo("en-US"), false, true, new string[]{"oz/gal (U.S.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.PicogramPerDeciliter, new CultureInfo("en-US"), false, true, new string[]{"pg/dL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.PicogramPerLiter, new CultureInfo("en-US"), false, true, new string[]{"pg/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.PicogramPerMicroliter, new CultureInfo("en-US"), false, true, new string[]{"pg/μL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.PicogramPerMilliliter, new CultureInfo("en-US"), false, true, new string[]{"pg/mL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.PoundPerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"lb/ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.PoundPerCubicInch, new CultureInfo("en-US"), false, true, new string[]{"lb/in³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.PoundPerImperialGallon, new CultureInfo("en-US"), false, true, new string[]{"ppg (imp.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.PoundPerUSGallon, new CultureInfo("en-US"), false, true, new string[]{"ppg (U.S.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.SlugPerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"slug/ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.TonnePerCubicCentimeter, new CultureInfo("en-US"), false, true, new string[]{"t/cm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.TonnePerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"t/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.TonnePerCubicMillimeter, new CultureInfo("en-US"), false, true, new string[]{"t/mm³"}); - } - /// /// Get unit abbreviation string. /// @@ -661,7 +605,7 @@ public static string GetAbbreviation(MassConcentrationUnit unit, IFormatProvider /// /// /// - public static string[] GetAbbreviations(MassConcentrationUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(MassConcentrationUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.MassConcentration"; var resourceManager = new ResourceManager(resourceName, typeof(MassConcentration).Assembly); @@ -1791,7 +1735,7 @@ public MassConcentration ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs index e2a84ace2e..b7520602fb 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -449,45 +450,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(MassFlowUnit.GramPerSecond, MassFlowUnit.TonnePerHour, quantity => quantity.ToUnit(MassFlowUnit.TonnePerHour)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.CentigramPerDay, new CultureInfo("en-US"), false, true, new string[]{"cg/d"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.CentigramPerSecond, new CultureInfo("en-US"), false, true, new string[]{"cg/s", "cg/S"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.DecagramPerDay, new CultureInfo("en-US"), false, true, new string[]{"dag/d"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.DecagramPerSecond, new CultureInfo("en-US"), false, true, new string[]{"dag/s", "dag/S"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.DecigramPerDay, new CultureInfo("en-US"), false, true, new string[]{"dg/d"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.DecigramPerSecond, new CultureInfo("en-US"), false, true, new string[]{"dg/s", "dg/S"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.GramPerDay, new CultureInfo("en-US"), false, true, new string[]{"g/d"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.GramPerHour, new CultureInfo("en-US"), false, true, new string[]{"g/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.GramPerSecond, new CultureInfo("en-US"), false, true, new string[]{"g/s", "g/S"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.HectogramPerDay, new CultureInfo("en-US"), false, true, new string[]{"hg/d"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.HectogramPerSecond, new CultureInfo("en-US"), false, true, new string[]{"hg/s", "hg/S"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.KilogramPerDay, new CultureInfo("en-US"), false, true, new string[]{"kg/d"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.KilogramPerHour, new CultureInfo("en-US"), false, true, new string[]{"kg/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.KilogramPerHour, new CultureInfo("ru-RU"), false, true, new string[]{"кг/ч"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.KilogramPerMinute, new CultureInfo("en-US"), false, true, new string[]{"kg/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.KilogramPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"кг/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.KilogramPerSecond, new CultureInfo("en-US"), false, true, new string[]{"kg/s", "kg/S"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.MegagramPerDay, new CultureInfo("en-US"), false, true, new string[]{"Mg/d"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.MegapoundPerDay, new CultureInfo("en-US"), false, true, new string[]{"Mlb/d"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.MegapoundPerHour, new CultureInfo("en-US"), false, true, new string[]{"Mlb/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.MegapoundPerMinute, new CultureInfo("en-US"), false, true, new string[]{"Mlb/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.MegapoundPerSecond, new CultureInfo("en-US"), false, true, new string[]{"Mlb/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.MicrogramPerDay, new CultureInfo("en-US"), false, true, new string[]{"µg/d"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.MicrogramPerSecond, new CultureInfo("en-US"), false, true, new string[]{"µg/s", "µg/S"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.MilligramPerDay, new CultureInfo("en-US"), false, true, new string[]{"mg/d"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.MilligramPerSecond, new CultureInfo("en-US"), false, true, new string[]{"mg/s", "mg/S"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.NanogramPerDay, new CultureInfo("en-US"), false, true, new string[]{"ng/d"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.NanogramPerSecond, new CultureInfo("en-US"), false, true, new string[]{"ng/s", "ng/S"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.PoundPerDay, new CultureInfo("en-US"), false, true, new string[]{"lb/d"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.PoundPerHour, new CultureInfo("en-US"), false, true, new string[]{"lb/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.PoundPerMinute, new CultureInfo("en-US"), false, true, new string[]{"lb/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.PoundPerSecond, new CultureInfo("en-US"), false, true, new string[]{"lb/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.ShortTonPerHour, new CultureInfo("en-US"), false, true, new string[]{"short tn/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.TonnePerDay, new CultureInfo("en-US"), false, true, new string[]{"t/d"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.TonnePerHour, new CultureInfo("en-US"), false, true, new string[]{"t/h"}); - } - /// /// Get unit abbreviation string. /// @@ -512,7 +474,7 @@ public static string GetAbbreviation(MassFlowUnit unit, IFormatProvider? provide /// /// /// - public static string[] GetAbbreviations(MassFlowUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(MassFlowUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.MassFlow"; var resourceManager = new ResourceManager(resourceName, typeof(MassFlow).Assembly); @@ -1450,7 +1412,7 @@ public MassFlow ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs index 57bac3f865..59f4445a1e 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -281,22 +282,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(MassFluxUnit.KilogramPerSecondPerSquareMeter, MassFluxUnit.KilogramPerSecondPerSquareMillimeter, quantity => quantity.ToUnit(MassFluxUnit.KilogramPerSecondPerSquareMillimeter)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(MassFluxUnit.GramPerHourPerSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"g·h⁻¹·cm⁻²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFluxUnit.GramPerHourPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"g·h⁻¹·m⁻²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFluxUnit.GramPerHourPerSquareMillimeter, new CultureInfo("en-US"), false, true, new string[]{"g·h⁻¹·mm⁻²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFluxUnit.GramPerSecondPerSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"g·s⁻¹·cm⁻²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFluxUnit.GramPerSecondPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"g·s⁻¹·m⁻²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFluxUnit.GramPerSecondPerSquareMillimeter, new CultureInfo("en-US"), false, true, new string[]{"g·s⁻¹·mm⁻²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFluxUnit.KilogramPerHourPerSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"kg·h⁻¹·cm⁻²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFluxUnit.KilogramPerHourPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"kg·h⁻¹·m⁻²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFluxUnit.KilogramPerHourPerSquareMillimeter, new CultureInfo("en-US"), false, true, new string[]{"kg·h⁻¹·mm⁻²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFluxUnit.KilogramPerSecondPerSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"kg·s⁻¹·cm⁻²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFluxUnit.KilogramPerSecondPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"kg·s⁻¹·m⁻²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFluxUnit.KilogramPerSecondPerSquareMillimeter, new CultureInfo("en-US"), false, true, new string[]{"kg·s⁻¹·mm⁻²"}); - } - /// /// Get unit abbreviation string. /// @@ -321,7 +306,7 @@ public static string GetAbbreviation(MassFluxUnit unit, IFormatProvider? provide /// /// /// - public static string[] GetAbbreviations(MassFluxUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(MassFluxUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.MassFlux"; var resourceManager = new ResourceManager(resourceName, typeof(MassFlux).Assembly); @@ -1007,7 +992,7 @@ public MassFlux ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs index c24176a4db..4ac3577fc6 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -380,34 +381,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(MassFractionUnit.DecimalFraction, MassFractionUnit.Percent, quantity => quantity.ToUnit(MassFractionUnit.Percent)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.CentigramPerGram, new CultureInfo("en-US"), false, true, new string[]{"cg/g"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.CentigramPerKilogram, new CultureInfo("en-US"), false, true, new string[]{"cg/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.DecagramPerGram, new CultureInfo("en-US"), false, true, new string[]{"dag/g"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.DecagramPerKilogram, new CultureInfo("en-US"), false, true, new string[]{"dag/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.DecigramPerGram, new CultureInfo("en-US"), false, true, new string[]{"dg/g"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.DecigramPerKilogram, new CultureInfo("en-US"), false, true, new string[]{"dg/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.DecimalFraction, new CultureInfo("en-US"), false, true, new string[]{""}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.GramPerGram, new CultureInfo("en-US"), false, true, new string[]{"g/g"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.GramPerKilogram, new CultureInfo("en-US"), false, true, new string[]{"g/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.HectogramPerGram, new CultureInfo("en-US"), false, true, new string[]{"hg/g"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.HectogramPerKilogram, new CultureInfo("en-US"), false, true, new string[]{"hg/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.KilogramPerGram, new CultureInfo("en-US"), false, true, new string[]{"kg/g"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.KilogramPerKilogram, new CultureInfo("en-US"), false, true, new string[]{"kg/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.MicrogramPerGram, new CultureInfo("en-US"), false, true, new string[]{"µg/g"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.MicrogramPerKilogram, new CultureInfo("en-US"), false, true, new string[]{"µg/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.MilligramPerGram, new CultureInfo("en-US"), false, true, new string[]{"mg/g"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.MilligramPerKilogram, new CultureInfo("en-US"), false, true, new string[]{"mg/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.NanogramPerGram, new CultureInfo("en-US"), false, true, new string[]{"ng/g"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.NanogramPerKilogram, new CultureInfo("en-US"), false, true, new string[]{"ng/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.PartPerBillion, new CultureInfo("en-US"), false, true, new string[]{"ppb"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.PartPerMillion, new CultureInfo("en-US"), false, true, new string[]{"ppm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.PartPerThousand, new CultureInfo("en-US"), false, true, new string[]{"‰"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.PartPerTrillion, new CultureInfo("en-US"), false, true, new string[]{"ppt"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.Percent, new CultureInfo("en-US"), false, true, new string[]{"%", "% (w/w)"}); - } - /// /// Get unit abbreviation string. /// @@ -432,7 +405,7 @@ public static string GetAbbreviation(MassFractionUnit unit, IFormatProvider? pro /// /// /// - public static string[] GetAbbreviations(MassFractionUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(MassFractionUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.MassFraction"; var resourceManager = new ResourceManager(resourceName, typeof(MassFraction).Assembly); @@ -1262,7 +1235,7 @@ public MassFraction ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs b/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs index 478750b078..7941f62ede 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -409,38 +410,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(MassMomentOfInertiaUnit.KilogramSquareMeter, MassMomentOfInertiaUnit.TonneSquareMilimeter, quantity => quantity.ToUnit(MassMomentOfInertiaUnit.TonneSquareMilimeter)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.GramSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"g·cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.GramSquareDecimeter, new CultureInfo("en-US"), false, true, new string[]{"g·dm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.GramSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"g·m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.GramSquareMillimeter, new CultureInfo("en-US"), false, true, new string[]{"g·mm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.KilogramSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"kg·cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.KilogramSquareDecimeter, new CultureInfo("en-US"), false, true, new string[]{"kg·dm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.KilogramSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"kg·m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.KilogramSquareMillimeter, new CultureInfo("en-US"), false, true, new string[]{"kg·mm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.KilotonneSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"kt·cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.KilotonneSquareDecimeter, new CultureInfo("en-US"), false, true, new string[]{"kt·dm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.KilotonneSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"kt·m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.KilotonneSquareMilimeter, new CultureInfo("en-US"), false, true, new string[]{"kt·mm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.MegatonneSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"Mt·cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.MegatonneSquareDecimeter, new CultureInfo("en-US"), false, true, new string[]{"Mt·dm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.MegatonneSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"Mt·m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.MegatonneSquareMilimeter, new CultureInfo("en-US"), false, true, new string[]{"Mt·mm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.MilligramSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"mg·cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.MilligramSquareDecimeter, new CultureInfo("en-US"), false, true, new string[]{"mg·dm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.MilligramSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"mg·m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.MilligramSquareMillimeter, new CultureInfo("en-US"), false, true, new string[]{"mg·mm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.PoundSquareFoot, new CultureInfo("en-US"), false, true, new string[]{"lb·ft²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.PoundSquareInch, new CultureInfo("en-US"), false, true, new string[]{"lb·in²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.SlugSquareFoot, new CultureInfo("en-US"), false, true, new string[]{"slug·ft²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.SlugSquareInch, new CultureInfo("en-US"), false, true, new string[]{"slug·in²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.TonneSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"t·cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.TonneSquareDecimeter, new CultureInfo("en-US"), false, true, new string[]{"t·dm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.TonneSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"t·m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.TonneSquareMilimeter, new CultureInfo("en-US"), false, true, new string[]{"t·mm²"}); - } - /// /// Get unit abbreviation string. /// @@ -465,7 +434,7 @@ public static string GetAbbreviation(MassMomentOfInertiaUnit unit, IFormatProvid /// /// /// - public static string[] GetAbbreviations(MassMomentOfInertiaUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(MassMomentOfInertiaUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.MassMomentOfInertia"; var resourceManager = new ResourceManager(resourceName, typeof(MassMomentOfInertia).Assembly); @@ -1343,7 +1312,7 @@ public MassMomentOfInertia ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs index 06a59720b9..e048d801ba 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -209,13 +210,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(MolarEnergyUnit.JoulePerMole, MolarEnergyUnit.MegajoulePerMole, quantity => quantity.ToUnit(MolarEnergyUnit.MegajoulePerMole)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(MolarEnergyUnit.JoulePerMole, new CultureInfo("en-US"), false, true, new string[]{"J/mol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarEnergyUnit.KilojoulePerMole, new CultureInfo("en-US"), false, true, new string[]{"kJ/mol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarEnergyUnit.MegajoulePerMole, new CultureInfo("en-US"), false, true, new string[]{"MJ/mol"}); - } - /// /// Get unit abbreviation string. /// @@ -240,7 +234,7 @@ public static string GetAbbreviation(MolarEnergyUnit unit, IFormatProvider? prov /// /// /// - public static string[] GetAbbreviations(MolarEnergyUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(MolarEnergyUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.MolarEnergy"; var resourceManager = new ResourceManager(resourceName, typeof(MolarEnergy).Assembly); @@ -818,7 +812,7 @@ public MolarEnergy ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs index 4b73e467ba..cb46d32a0d 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -209,13 +210,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(MolarEntropyUnit.JoulePerMoleKelvin, MolarEntropyUnit.MegajoulePerMoleKelvin, quantity => quantity.ToUnit(MolarEntropyUnit.MegajoulePerMoleKelvin)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(MolarEntropyUnit.JoulePerMoleKelvin, new CultureInfo("en-US"), false, true, new string[]{"J/(mol*K)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarEntropyUnit.KilojoulePerMoleKelvin, new CultureInfo("en-US"), false, true, new string[]{"kJ/(mol*K)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarEntropyUnit.MegajoulePerMoleKelvin, new CultureInfo("en-US"), false, true, new string[]{"MJ/(mol*K)"}); - } - /// /// Get unit abbreviation string. /// @@ -240,7 +234,7 @@ public static string GetAbbreviation(MolarEntropyUnit unit, IFormatProvider? pro /// /// /// - public static string[] GetAbbreviations(MolarEntropyUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(MolarEntropyUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.MolarEntropy"; var resourceManager = new ResourceManager(resourceName, typeof(MolarEntropy).Assembly); @@ -818,7 +812,7 @@ public MolarEntropy ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs index de0ea20999..78ceb32008 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -257,19 +258,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(MolarFlowUnit.MolePerSecond, MolarFlowUnit.PoundMolePerSecond, quantity => quantity.ToUnit(MolarFlowUnit.PoundMolePerSecond)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(MolarFlowUnit.KilomolePerHour, new CultureInfo("en-US"), false, true, new string[]{"kkmol/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarFlowUnit.KilomolePerMinute, new CultureInfo("en-US"), false, true, new string[]{"kmol/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarFlowUnit.KilomolePerSecond, new CultureInfo("en-US"), false, true, new string[]{"kmol/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarFlowUnit.MolePerHour, new CultureInfo("en-US"), false, true, new string[]{"kmol/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarFlowUnit.MolePerMinute, new CultureInfo("en-US"), false, true, new string[]{"mol/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarFlowUnit.MolePerSecond, new CultureInfo("en-US"), false, true, new string[]{"mol/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarFlowUnit.PoundMolePerHour, new CultureInfo("en-US"), false, true, new string[]{"lbmol/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarFlowUnit.PoundMolePerMinute, new CultureInfo("en-US"), false, true, new string[]{"lbmol/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarFlowUnit.PoundMolePerSecond, new CultureInfo("en-US"), false, true, new string[]{"lbmol/s"}); - } - /// /// Get unit abbreviation string. /// @@ -294,7 +282,7 @@ public static string GetAbbreviation(MolarFlowUnit unit, IFormatProvider? provid /// /// /// - public static string[] GetAbbreviations(MolarFlowUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(MolarFlowUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.MolarFlow"; var resourceManager = new ResourceManager(resourceName, typeof(MolarFlow).Assembly); @@ -944,7 +932,7 @@ public MolarFlow ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs index 83d84196a5..156f6e35d3 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -289,35 +290,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(MolarMassUnit.KilogramPerMole, MolarMassUnit.PoundPerMole, quantity => quantity.ToUnit(MolarMassUnit.PoundPerMole)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.CentigramPerMole, new CultureInfo("en-US"), false, true, new string[]{"cg/mol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.CentigramPerMole, new CultureInfo("ru-RU"), false, true, new string[]{"сг/моль"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.DecagramPerMole, new CultureInfo("en-US"), false, true, new string[]{"dag/mol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.DecagramPerMole, new CultureInfo("ru-RU"), false, true, new string[]{"даг/моль"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.DecigramPerMole, new CultureInfo("en-US"), false, true, new string[]{"dg/mol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.DecigramPerMole, new CultureInfo("ru-RU"), false, true, new string[]{"дг/моль"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.GramPerMole, new CultureInfo("en-US"), false, true, new string[]{"g/mol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.GramPerMole, new CultureInfo("ru-RU"), false, true, new string[]{"г/моль"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.HectogramPerMole, new CultureInfo("en-US"), false, true, new string[]{"hg/mol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.HectogramPerMole, new CultureInfo("ru-RU"), false, true, new string[]{"гг/моль"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.KilogramPerKilomole, new CultureInfo("en-US"), false, true, new string[]{"kg/kmol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.KilogramPerMole, new CultureInfo("en-US"), false, true, new string[]{"kg/mol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.KilogramPerMole, new CultureInfo("ru-RU"), false, true, new string[]{"кг/моль"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.KilopoundPerMole, new CultureInfo("en-US"), false, true, new string[]{"klb/mol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.KilopoundPerMole, new CultureInfo("ru-RU"), false, true, new string[]{"кфунт/моль"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.MegapoundPerMole, new CultureInfo("en-US"), false, true, new string[]{"Mlb/mol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.MegapoundPerMole, new CultureInfo("ru-RU"), false, true, new string[]{"Мфунт/моль"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.MicrogramPerMole, new CultureInfo("en-US"), false, true, new string[]{"µg/mol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.MicrogramPerMole, new CultureInfo("ru-RU"), false, true, new string[]{"мкг/моль"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.MilligramPerMole, new CultureInfo("en-US"), false, true, new string[]{"mg/mol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.MilligramPerMole, new CultureInfo("ru-RU"), false, true, new string[]{"мг/моль"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.NanogramPerMole, new CultureInfo("en-US"), false, true, new string[]{"ng/mol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.NanogramPerMole, new CultureInfo("ru-RU"), false, true, new string[]{"нг/моль"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.PoundPerMole, new CultureInfo("en-US"), false, true, new string[]{"lb/mol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.PoundPerMole, new CultureInfo("ru-RU"), false, true, new string[]{"фунт/моль"}); - } - /// /// Get unit abbreviation string. /// @@ -342,7 +314,7 @@ public static string GetAbbreviation(MolarMassUnit unit, IFormatProvider? provid /// /// /// - public static string[] GetAbbreviations(MolarMassUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(MolarMassUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.MolarMass"; var resourceManager = new ResourceManager(resourceName, typeof(MolarMass).Assembly); @@ -1040,7 +1012,7 @@ public MolarMass ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs b/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs index 11f17335e2..fec9d4a63e 100644 --- a/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -276,21 +277,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(MolarityUnit.MolePerCubicMeter, MolarityUnit.PoundMolePerCubicFoot, quantity => quantity.ToUnit(MolarityUnit.PoundMolePerCubicFoot)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(MolarityUnit.CentimolePerLiter, new CultureInfo("en-US"), false, true, new string[]{"cmol/L", "cM"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarityUnit.DecimolePerLiter, new CultureInfo("en-US"), false, true, new string[]{"dmol/L", "dM"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarityUnit.FemtomolePerLiter, new CultureInfo("en-US"), false, true, new string[]{"fmol/L", "fM"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarityUnit.KilomolePerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"kmol/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarityUnit.MicromolePerLiter, new CultureInfo("en-US"), false, true, new string[]{"µmol/L", "µM"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarityUnit.MillimolePerLiter, new CultureInfo("en-US"), false, true, new string[]{"mmol/L", "mM"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarityUnit.MolePerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"mol/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarityUnit.MolePerLiter, new CultureInfo("en-US"), false, true, new string[]{"mol/L", "M"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarityUnit.NanomolePerLiter, new CultureInfo("en-US"), false, true, new string[]{"nmol/L", "nM"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarityUnit.PicomolePerLiter, new CultureInfo("en-US"), false, true, new string[]{"pmol/L", "pM"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarityUnit.PoundMolePerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"lbmol/ft³"}); - } - /// /// Get unit abbreviation string. /// @@ -315,7 +301,7 @@ public static string GetAbbreviation(MolarityUnit unit, IFormatProvider? provide /// /// /// - public static string[] GetAbbreviations(MolarityUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(MolarityUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.Molarity"; var resourceManager = new ResourceManager(resourceName, typeof(Molarity).Assembly); @@ -989,7 +975,7 @@ public Molarity ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs b/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs index 03a376dc02..b8096a4877 100644 --- a/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -196,11 +197,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) // Register in unit converter: BaseUnit -> PermeabilityUnit } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(PermeabilityUnit.HenryPerMeter, new CultureInfo("en-US"), false, true, new string[]{"H/m"}); - } - /// /// Get unit abbreviation string. /// @@ -225,7 +221,7 @@ public static string GetAbbreviation(PermeabilityUnit unit, IFormatProvider? pro /// /// /// - public static string[] GetAbbreviations(PermeabilityUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(PermeabilityUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.Permeability"; var resourceManager = new ResourceManager(resourceName, typeof(Permeability).Assembly); @@ -779,7 +775,7 @@ public Permeability ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs b/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs index 841b16d673..c272662dfe 100644 --- a/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -196,11 +197,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) // Register in unit converter: BaseUnit -> PermittivityUnit } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(PermittivityUnit.FaradPerMeter, new CultureInfo("en-US"), false, true, new string[]{"F/m"}); - } - /// /// Get unit abbreviation string. /// @@ -225,7 +221,7 @@ public static string GetAbbreviation(PermittivityUnit unit, IFormatProvider? pro /// /// /// - public static string[] GetAbbreviations(PermittivityUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(PermittivityUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.Permittivity"; var resourceManager = new ResourceManager(resourceName, typeof(Permittivity).Assembly); @@ -779,7 +775,7 @@ public Permittivity ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/PorousMediumPermeability.g.cs b/UnitsNet/GeneratedCode/Quantities/PorousMediumPermeability.g.cs index a697c2489a..b4b5faddd6 100644 --- a/UnitsNet/GeneratedCode/Quantities/PorousMediumPermeability.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PorousMediumPermeability.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -228,15 +229,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(PorousMediumPermeabilityUnit.SquareMeter, PorousMediumPermeabilityUnit.SquareCentimeter, quantity => quantity.ToUnit(PorousMediumPermeabilityUnit.SquareCentimeter)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(PorousMediumPermeabilityUnit.Darcy, new CultureInfo("en-US"), false, true, new string[]{"D"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PorousMediumPermeabilityUnit.Microdarcy, new CultureInfo("en-US"), false, true, new string[]{"µD"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PorousMediumPermeabilityUnit.Millidarcy, new CultureInfo("en-US"), false, true, new string[]{"mD"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PorousMediumPermeabilityUnit.SquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PorousMediumPermeabilityUnit.SquareMeter, new CultureInfo("en-US"), false, true, new string[]{"m²"}); - } - /// /// Get unit abbreviation string. /// @@ -261,7 +253,7 @@ public static string GetAbbreviation(PorousMediumPermeabilityUnit unit, IFormatP /// /// /// - public static string[] GetAbbreviations(PorousMediumPermeabilityUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(PorousMediumPermeabilityUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.PorousMediumPermeability"; var resourceManager = new ResourceManager(resourceName, typeof(PorousMediumPermeability).Assembly); @@ -863,7 +855,7 @@ public PorousMediumPermeability ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/Power.g.cs b/UnitsNet/GeneratedCode/Quantities/Power.g.cs index 2c8cc685c7..49ec721d0c 100644 --- a/UnitsNet/GeneratedCode/Quantities/Power.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Power.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -394,36 +395,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(PowerUnit.Watt, PowerUnit.Terawatt, quantity => quantity.ToUnit(PowerUnit.Terawatt)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.BoilerHorsepower, new CultureInfo("en-US"), false, true, new string[]{"hp(S)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.BritishThermalUnitPerHour, new CultureInfo("en-US"), false, true, new string[]{"Btu/h", "Btu/hr"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.Decawatt, new CultureInfo("en-US"), false, true, new string[]{"daW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.Deciwatt, new CultureInfo("en-US"), false, true, new string[]{"dW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.ElectricalHorsepower, new CultureInfo("en-US"), false, true, new string[]{"hp(E)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.Femtowatt, new CultureInfo("en-US"), false, true, new string[]{"fW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.GigajoulePerHour, new CultureInfo("en-US"), false, true, new string[]{"GJ/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.Gigawatt, new CultureInfo("en-US"), false, true, new string[]{"GW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.HydraulicHorsepower, new CultureInfo("en-US"), false, true, new string[]{"hp(H)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.JoulePerHour, new CultureInfo("en-US"), false, true, new string[]{"J/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.KilobritishThermalUnitPerHour, new CultureInfo("en-US"), false, true, new string[]{"kBtu/h", "kBtu/hr"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.KilojoulePerHour, new CultureInfo("en-US"), false, true, new string[]{"kJ/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.Kilowatt, new CultureInfo("en-US"), false, true, new string[]{"kW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.MechanicalHorsepower, new CultureInfo("en-US"), false, true, new string[]{"hp(I)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.MegabritishThermalUnitPerHour, new CultureInfo("en-US"), false, true, new string[]{"MBtu/h", "MBtu/hr"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.MegajoulePerHour, new CultureInfo("en-US"), false, true, new string[]{"MJ/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.Megawatt, new CultureInfo("en-US"), false, true, new string[]{"MW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.MetricHorsepower, new CultureInfo("en-US"), false, true, new string[]{"hp(M)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.Microwatt, new CultureInfo("en-US"), false, true, new string[]{"µW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.MillijoulePerHour, new CultureInfo("en-US"), false, true, new string[]{"mJ/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.Milliwatt, new CultureInfo("en-US"), false, true, new string[]{"mW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.Nanowatt, new CultureInfo("en-US"), false, true, new string[]{"nW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.Petawatt, new CultureInfo("en-US"), false, true, new string[]{"PW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.Picowatt, new CultureInfo("en-US"), false, true, new string[]{"pW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.Terawatt, new CultureInfo("en-US"), false, true, new string[]{"TW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.Watt, new CultureInfo("en-US"), false, true, new string[]{"W"}); - } - /// /// Get unit abbreviation string. /// @@ -448,7 +419,7 @@ public static string GetAbbreviation(PowerUnit unit, IFormatProvider? provider) /// /// /// - public static string[] GetAbbreviations(PowerUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(PowerUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.Power"; var resourceManager = new ResourceManager(resourceName, typeof(Power).Assembly); @@ -1313,7 +1284,7 @@ public Power ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs index 0389d497dc..519afe4597 100644 --- a/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -537,54 +538,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(PowerDensityUnit.WattPerCubicMeter, PowerDensityUnit.WattPerLiter, quantity => quantity.ToUnit(PowerDensityUnit.WattPerLiter)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.DecawattPerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"daW/ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.DecawattPerCubicInch, new CultureInfo("en-US"), false, true, new string[]{"daW/in³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.DecawattPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"daW/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.DecawattPerLiter, new CultureInfo("en-US"), false, true, new string[]{"daW/l"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.DeciwattPerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"dW/ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.DeciwattPerCubicInch, new CultureInfo("en-US"), false, true, new string[]{"dW/in³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.DeciwattPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"dW/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.DeciwattPerLiter, new CultureInfo("en-US"), false, true, new string[]{"dW/l"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.GigawattPerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"GW/ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.GigawattPerCubicInch, new CultureInfo("en-US"), false, true, new string[]{"GW/in³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.GigawattPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"GW/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.GigawattPerLiter, new CultureInfo("en-US"), false, true, new string[]{"GW/l"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.KilowattPerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"kW/ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.KilowattPerCubicInch, new CultureInfo("en-US"), false, true, new string[]{"kW/in³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.KilowattPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"kW/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.KilowattPerLiter, new CultureInfo("en-US"), false, true, new string[]{"kW/l"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.MegawattPerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"MW/ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.MegawattPerCubicInch, new CultureInfo("en-US"), false, true, new string[]{"MW/in³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.MegawattPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"MW/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.MegawattPerLiter, new CultureInfo("en-US"), false, true, new string[]{"MW/l"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.MicrowattPerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"µW/ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.MicrowattPerCubicInch, new CultureInfo("en-US"), false, true, new string[]{"µW/in³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.MicrowattPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"µW/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.MicrowattPerLiter, new CultureInfo("en-US"), false, true, new string[]{"µW/l"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.MilliwattPerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"mW/ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.MilliwattPerCubicInch, new CultureInfo("en-US"), false, true, new string[]{"mW/in³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.MilliwattPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"mW/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.MilliwattPerLiter, new CultureInfo("en-US"), false, true, new string[]{"mW/l"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.NanowattPerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"nW/ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.NanowattPerCubicInch, new CultureInfo("en-US"), false, true, new string[]{"nW/in³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.NanowattPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"nW/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.NanowattPerLiter, new CultureInfo("en-US"), false, true, new string[]{"nW/l"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.PicowattPerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"pW/ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.PicowattPerCubicInch, new CultureInfo("en-US"), false, true, new string[]{"pW/in³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.PicowattPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"pW/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.PicowattPerLiter, new CultureInfo("en-US"), false, true, new string[]{"pW/l"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.TerawattPerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"TW/ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.TerawattPerCubicInch, new CultureInfo("en-US"), false, true, new string[]{"TW/in³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.TerawattPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"TW/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.TerawattPerLiter, new CultureInfo("en-US"), false, true, new string[]{"TW/l"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.WattPerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"W/ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.WattPerCubicInch, new CultureInfo("en-US"), false, true, new string[]{"W/in³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.WattPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"W/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.WattPerLiter, new CultureInfo("en-US"), false, true, new string[]{"W/l"}); - } - /// /// Get unit abbreviation string. /// @@ -609,7 +562,7 @@ public static string GetAbbreviation(PowerDensityUnit unit, IFormatProvider? pro /// /// /// - public static string[] GetAbbreviations(PowerDensityUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(PowerDensityUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.PowerDensity"; var resourceManager = new ResourceManager(resourceName, typeof(PowerDensity).Assembly); @@ -1679,7 +1632,7 @@ public PowerDensity ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs b/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs index 937578e572..eb7b1e55d6 100644 --- a/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -201,12 +202,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(PowerRatioUnit.DecibelWatt, PowerRatioUnit.DecibelMilliwatt, quantity => quantity.ToUnit(PowerRatioUnit.DecibelMilliwatt)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(PowerRatioUnit.DecibelMilliwatt, new CultureInfo("en-US"), false, true, new string[]{"dBmW", "dBm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerRatioUnit.DecibelWatt, new CultureInfo("en-US"), false, true, new string[]{"dBW"}); - } - /// /// Get unit abbreviation string. /// @@ -231,7 +226,7 @@ public static string GetAbbreviation(PowerRatioUnit unit, IFormatProvider? provi /// /// /// - public static string[] GetAbbreviations(PowerRatioUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(PowerRatioUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.PowerRatio"; var resourceManager = new ResourceManager(resourceName, typeof(PowerRatio).Assembly); @@ -805,7 +800,7 @@ public PowerRatio ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs b/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs index 3af5500797..f72be5e5ea 100644 --- a/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -561,88 +562,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(PressureUnit.Pascal, PressureUnit.Torr, quantity => quantity.ToUnit(PressureUnit.Torr)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Atmosphere, new CultureInfo("en-US"), false, true, new string[]{"atm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Atmosphere, new CultureInfo("ru-RU"), false, true, new string[]{"атм"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Bar, new CultureInfo("en-US"), false, true, new string[]{"bar"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Bar, new CultureInfo("ru-RU"), false, true, new string[]{"бар"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Centibar, new CultureInfo("en-US"), false, true, new string[]{"cbar"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Centibar, new CultureInfo("ru-RU"), false, true, new string[]{"сбар"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Decapascal, new CultureInfo("en-US"), false, true, new string[]{"daPa"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Decapascal, new CultureInfo("ru-RU"), false, true, new string[]{"даПа"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Decibar, new CultureInfo("en-US"), false, true, new string[]{"dbar"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Decibar, new CultureInfo("ru-RU"), false, true, new string[]{"дбар"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.DynePerSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"dyn/cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.FootOfElevation, new CultureInfo("en-US"), false, true, new string[]{"ft of elevation"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.FootOfHead, new CultureInfo("en-US"), false, true, new string[]{"ft of head"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Gigapascal, new CultureInfo("en-US"), false, true, new string[]{"GPa"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Gigapascal, new CultureInfo("ru-RU"), false, true, new string[]{"ГПа"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Hectopascal, new CultureInfo("en-US"), false, true, new string[]{"hPa"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Hectopascal, new CultureInfo("ru-RU"), false, true, new string[]{"гПа"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.InchOfMercury, new CultureInfo("en-US"), false, true, new string[]{"inHg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.InchOfWaterColumn, new CultureInfo("en-US"), false, true, new string[]{"inH2O", "inch wc", "wc"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Kilobar, new CultureInfo("en-US"), false, true, new string[]{"kbar"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Kilobar, new CultureInfo("ru-RU"), false, true, new string[]{"кбар"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.KilogramForcePerSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"kgf/cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.KilogramForcePerSquareCentimeter, new CultureInfo("ru-RU"), false, true, new string[]{"кгс/см²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.KilogramForcePerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"kgf/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.KilogramForcePerSquareMeter, new CultureInfo("ru-RU"), false, true, new string[]{"кгс/м²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.KilogramForcePerSquareMillimeter, new CultureInfo("en-US"), false, true, new string[]{"kgf/mm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.KilogramForcePerSquareMillimeter, new CultureInfo("ru-RU"), false, true, new string[]{"кгс/мм²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.KilonewtonPerSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"kN/cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.KilonewtonPerSquareCentimeter, new CultureInfo("ru-RU"), false, true, new string[]{"кН/см²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.KilonewtonPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"kN/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.KilonewtonPerSquareMeter, new CultureInfo("ru-RU"), false, true, new string[]{"кН/м²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.KilonewtonPerSquareMillimeter, new CultureInfo("en-US"), false, true, new string[]{"kN/mm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.KilonewtonPerSquareMillimeter, new CultureInfo("ru-RU"), false, true, new string[]{"кН/мм²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Kilopascal, new CultureInfo("en-US"), false, true, new string[]{"kPa"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Kilopascal, new CultureInfo("ru-RU"), false, true, new string[]{"кПа"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.KilopoundForcePerSquareFoot, new CultureInfo("en-US"), false, true, new string[]{"kipf/ft²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.KilopoundForcePerSquareInch, new CultureInfo("en-US"), false, true, new string[]{"ksi", "kipf/in²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.KilopoundForcePerSquareInch, new CultureInfo("ru-RU"), false, true, new string[]{"ksi", "kipf/in²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.KilopoundForcePerSquareMil, new CultureInfo("en-US"), false, true, new string[]{"kipf/mil²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Megabar, new CultureInfo("en-US"), false, true, new string[]{"Mbar"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Megabar, new CultureInfo("ru-RU"), false, true, new string[]{"Мбар"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.MeganewtonPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"MN/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.MeganewtonPerSquareMeter, new CultureInfo("ru-RU"), false, true, new string[]{"МН/м²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Megapascal, new CultureInfo("en-US"), false, true, new string[]{"MPa"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Megapascal, new CultureInfo("ru-RU"), false, true, new string[]{"МПа"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.MeterOfElevation, new CultureInfo("en-US"), false, true, new string[]{"m of elevation"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.MeterOfHead, new CultureInfo("en-US"), false, true, new string[]{"m of head"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Microbar, new CultureInfo("en-US"), false, true, new string[]{"µbar"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Microbar, new CultureInfo("ru-RU"), false, true, new string[]{"мкбар"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Micropascal, new CultureInfo("en-US"), false, true, new string[]{"µPa"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Micropascal, new CultureInfo("ru-RU"), false, true, new string[]{"мкПа"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Millibar, new CultureInfo("en-US"), false, true, new string[]{"mbar"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Millibar, new CultureInfo("ru-RU"), false, true, new string[]{"мбар"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.MillimeterOfMercury, new CultureInfo("en-US"), false, true, new string[]{"mmHg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.MillimeterOfMercury, new CultureInfo("ru-RU"), false, true, new string[]{"мм рт.ст."}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.MillimeterOfWaterColumn, new CultureInfo("en-US"), false, true, new string[]{"mmH2O", "mm wc"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Millipascal, new CultureInfo("en-US"), false, true, new string[]{"mPa"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Millipascal, new CultureInfo("ru-RU"), false, true, new string[]{"мПа"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.NewtonPerSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"N/cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.NewtonPerSquareCentimeter, new CultureInfo("ru-RU"), false, true, new string[]{"Н/см²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.NewtonPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"N/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.NewtonPerSquareMeter, new CultureInfo("ru-RU"), false, true, new string[]{"Н/м²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.NewtonPerSquareMillimeter, new CultureInfo("en-US"), false, true, new string[]{"N/mm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.NewtonPerSquareMillimeter, new CultureInfo("ru-RU"), false, true, new string[]{"Н/мм²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Pascal, new CultureInfo("en-US"), false, true, new string[]{"Pa"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Pascal, new CultureInfo("ru-RU"), false, true, new string[]{"Па"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.PoundForcePerSquareFoot, new CultureInfo("en-US"), false, true, new string[]{"lb/ft²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.PoundForcePerSquareInch, new CultureInfo("en-US"), false, true, new string[]{"psi", "lb/in²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.PoundForcePerSquareInch, new CultureInfo("ru-RU"), false, true, new string[]{"psi", "lb/in²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.PoundForcePerSquareMil, new CultureInfo("en-US"), false, true, new string[]{"lb/mil²", "lbs/mil²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.PoundPerInchSecondSquared, new CultureInfo("en-US"), false, true, new string[]{"lbm/(in·s²)", "lb/(in·s²)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.TechnicalAtmosphere, new CultureInfo("en-US"), false, true, new string[]{"at"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.TechnicalAtmosphere, new CultureInfo("ru-RU"), false, true, new string[]{"ат"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.TonneForcePerSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"tf/cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.TonneForcePerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"tf/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.TonneForcePerSquareMillimeter, new CultureInfo("en-US"), false, true, new string[]{"tf/mm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Torr, new CultureInfo("en-US"), false, true, new string[]{"torr"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Torr, new CultureInfo("ru-RU"), false, true, new string[]{"торр"}); - } - /// /// Get unit abbreviation string. /// @@ -667,7 +586,7 @@ public static string GetAbbreviation(PressureUnit unit, IFormatProvider? provide /// /// /// - public static string[] GetAbbreviations(PressureUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(PressureUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.Pressure"; var resourceManager = new ResourceManager(resourceName, typeof(Pressure).Assembly); @@ -1773,7 +1692,7 @@ public Pressure ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs index 38e57ef562..2db50242ca 100644 --- a/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -297,38 +298,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(PressureChangeRateUnit.PascalPerSecond, PressureChangeRateUnit.PoundForcePerSquareInchPerSecond, quantity => quantity.ToUnit(PressureChangeRateUnit.PoundForcePerSquareInchPerSecond)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.AtmospherePerSecond, new CultureInfo("en-US"), false, true, new string[]{"atm/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.AtmospherePerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"атм/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.KilopascalPerMinute, new CultureInfo("en-US"), false, true, new string[]{"kPa/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.KilopascalPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"кПа/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.KilopascalPerSecond, new CultureInfo("en-US"), false, true, new string[]{"kPa/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.KilopascalPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"кПа/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.KilopoundForcePerSquareInchPerMinute, new CultureInfo("en-US"), false, true, new string[]{"ksi/min", "kipf/in²/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.KilopoundForcePerSquareInchPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"ksi/мин", "kipf/in²/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.KilopoundForcePerSquareInchPerSecond, new CultureInfo("en-US"), false, true, new string[]{"ksi/s", "kipf/in²/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.KilopoundForcePerSquareInchPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"ksi/с", "kipf/in²/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.MegapascalPerMinute, new CultureInfo("en-US"), false, true, new string[]{"MPa/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.MegapascalPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"МПа/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.MegapascalPerSecond, new CultureInfo("en-US"), false, true, new string[]{"MPa/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.MegapascalPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"МПа/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.MegapoundForcePerSquareInchPerMinute, new CultureInfo("en-US"), false, true, new string[]{"Mpsi/min", "Mlb/in²/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.MegapoundForcePerSquareInchPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"Мpsi/мин", "Мlb/in²/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.MegapoundForcePerSquareInchPerSecond, new CultureInfo("en-US"), false, true, new string[]{"Mpsi/s", "Mlb/in²/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.MegapoundForcePerSquareInchPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"Мpsi/с", "Мlb/in²/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.MillimeterOfMercuryPerSecond, new CultureInfo("en-US"), false, true, new string[]{"mmHg/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.MillimeterOfMercuryPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"mmHg/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.PascalPerMinute, new CultureInfo("en-US"), false, true, new string[]{"Pa/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.PascalPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"Па/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.PascalPerSecond, new CultureInfo("en-US"), false, true, new string[]{"Pa/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.PascalPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"Па/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.PoundForcePerSquareInchPerMinute, new CultureInfo("en-US"), false, true, new string[]{"psi/min", "lb/in²/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.PoundForcePerSquareInchPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"psi/мин", "lb/in²/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.PoundForcePerSquareInchPerSecond, new CultureInfo("en-US"), false, true, new string[]{"psi/s", "lb/in²/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.PoundForcePerSquareInchPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"psi/с", "lb/in²/с"}); - } - /// /// Get unit abbreviation string. /// @@ -353,7 +322,7 @@ public static string GetAbbreviation(PressureChangeRateUnit unit, IFormatProvide /// /// /// - public static string[] GetAbbreviations(PressureChangeRateUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(PressureChangeRateUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.PressureChangeRate"; var resourceManager = new ResourceManager(resourceName, typeof(PressureChangeRate).Assembly); @@ -1063,7 +1032,7 @@ public PressureChangeRate ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs b/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs index 330b3870d2..642cfeadb6 100644 --- a/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -233,16 +234,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(RatioUnit.DecimalFraction, RatioUnit.Percent, quantity => quantity.ToUnit(RatioUnit.Percent)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(RatioUnit.DecimalFraction, new CultureInfo("en-US"), false, true, new string[]{""}); - unitAbbreviationsCache.PerformAbbreviationMapping(RatioUnit.PartPerBillion, new CultureInfo("en-US"), false, true, new string[]{"ppb"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RatioUnit.PartPerMillion, new CultureInfo("en-US"), false, true, new string[]{"ppm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RatioUnit.PartPerThousand, new CultureInfo("en-US"), false, true, new string[]{"‰"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RatioUnit.PartPerTrillion, new CultureInfo("en-US"), false, true, new string[]{"ppt"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RatioUnit.Percent, new CultureInfo("en-US"), false, true, new string[]{"%"}); - } - /// /// Get unit abbreviation string. /// @@ -267,7 +258,7 @@ public static string GetAbbreviation(RatioUnit unit, IFormatProvider? provider) /// /// /// - public static string[] GetAbbreviations(RatioUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(RatioUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.Ratio"; var resourceManager = new ResourceManager(resourceName, typeof(Ratio).Assembly); @@ -881,7 +872,7 @@ public Ratio ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs index 28203847eb..649105e57b 100644 --- a/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -201,12 +202,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(RatioChangeRateUnit.DecimalFractionPerSecond, RatioChangeRateUnit.PercentPerSecond, quantity => quantity.ToUnit(RatioChangeRateUnit.PercentPerSecond)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(RatioChangeRateUnit.DecimalFractionPerSecond, new CultureInfo("en-US"), false, true, new string[]{"/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RatioChangeRateUnit.PercentPerSecond, new CultureInfo("en-US"), false, true, new string[]{"%/s"}); - } - /// /// Get unit abbreviation string. /// @@ -231,7 +226,7 @@ public static string GetAbbreviation(RatioChangeRateUnit unit, IFormatProvider? /// /// /// - public static string[] GetAbbreviations(RatioChangeRateUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(RatioChangeRateUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.RatioChangeRate"; var resourceManager = new ResourceManager(resourceName, typeof(RatioChangeRate).Assembly); @@ -797,7 +792,7 @@ public RatioChangeRate ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs index 333761a240..3af83df5e2 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -209,13 +210,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ReactiveEnergyUnit.VoltampereReactiveHour, ReactiveEnergyUnit.MegavoltampereReactiveHour, quantity => quantity.ToUnit(ReactiveEnergyUnit.MegavoltampereReactiveHour)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ReactiveEnergyUnit.KilovoltampereReactiveHour, new CultureInfo("en-US"), false, true, new string[]{"kvarh"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReactiveEnergyUnit.MegavoltampereReactiveHour, new CultureInfo("en-US"), false, true, new string[]{"Mvarh"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReactiveEnergyUnit.VoltampereReactiveHour, new CultureInfo("en-US"), false, true, new string[]{"varh"}); - } - /// /// Get unit abbreviation string. /// @@ -240,7 +234,7 @@ public static string GetAbbreviation(ReactiveEnergyUnit unit, IFormatProvider? p /// /// /// - public static string[] GetAbbreviations(ReactiveEnergyUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(ReactiveEnergyUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.ReactiveEnergy"; var resourceManager = new ResourceManager(resourceName, typeof(ReactiveEnergy).Assembly); @@ -818,7 +812,7 @@ public ReactiveEnergy ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs b/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs index e06001a524..d49f52bf89 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -217,14 +218,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ReactivePowerUnit.VoltampereReactive, ReactivePowerUnit.MegavoltampereReactive, quantity => quantity.ToUnit(ReactivePowerUnit.MegavoltampereReactive)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ReactivePowerUnit.GigavoltampereReactive, new CultureInfo("en-US"), false, true, new string[]{"Gvar"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReactivePowerUnit.KilovoltampereReactive, new CultureInfo("en-US"), false, true, new string[]{"kvar"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReactivePowerUnit.MegavoltampereReactive, new CultureInfo("en-US"), false, true, new string[]{"Mvar"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReactivePowerUnit.VoltampereReactive, new CultureInfo("en-US"), false, true, new string[]{"var"}); - } - /// /// Get unit abbreviation string. /// @@ -249,7 +242,7 @@ public static string GetAbbreviation(ReactivePowerUnit unit, IFormatProvider? pr /// /// /// - public static string[] GetAbbreviations(ReactivePowerUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(ReactivePowerUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.ReactivePower"; var resourceManager = new ResourceManager(resourceName, typeof(ReactivePower).Assembly); @@ -839,7 +832,7 @@ public ReactivePower ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs b/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs index 4af21dc136..a61fe117ab 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -276,21 +277,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ReciprocalAreaUnit.InverseSquareMeter, ReciprocalAreaUnit.InverseUsSurveySquareFoot, quantity => quantity.ToUnit(ReciprocalAreaUnit.InverseUsSurveySquareFoot)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ReciprocalAreaUnit.InverseSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"cm⁻²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReciprocalAreaUnit.InverseSquareDecimeter, new CultureInfo("en-US"), false, true, new string[]{"dm⁻²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReciprocalAreaUnit.InverseSquareFoot, new CultureInfo("en-US"), false, true, new string[]{"ft⁻²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReciprocalAreaUnit.InverseSquareInch, new CultureInfo("en-US"), false, true, new string[]{"in⁻²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReciprocalAreaUnit.InverseSquareKilometer, new CultureInfo("en-US"), false, true, new string[]{"km⁻²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReciprocalAreaUnit.InverseSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"m⁻²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReciprocalAreaUnit.InverseSquareMicrometer, new CultureInfo("en-US"), false, true, new string[]{"µm⁻²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReciprocalAreaUnit.InverseSquareMile, new CultureInfo("en-US"), false, true, new string[]{"mi⁻²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReciprocalAreaUnit.InverseSquareMillimeter, new CultureInfo("en-US"), false, true, new string[]{"mm⁻²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReciprocalAreaUnit.InverseSquareYard, new CultureInfo("en-US"), false, true, new string[]{"yd⁻²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReciprocalAreaUnit.InverseUsSurveySquareFoot, new CultureInfo("en-US"), false, true, new string[]{"ft⁻² (US)"}); - } - /// /// Get unit abbreviation string. /// @@ -315,7 +301,7 @@ public static string GetAbbreviation(ReciprocalAreaUnit unit, IFormatProvider? p /// /// /// - public static string[] GetAbbreviations(ReciprocalAreaUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(ReciprocalAreaUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.ReciprocalArea"; var resourceManager = new ResourceManager(resourceName, typeof(ReciprocalArea).Assembly); @@ -989,7 +975,7 @@ public ReciprocalArea ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs b/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs index 8e079d7d86..d114873e11 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -268,20 +269,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ReciprocalLengthUnit.InverseMeter, ReciprocalLengthUnit.InverseYard, quantity => quantity.ToUnit(ReciprocalLengthUnit.InverseYard)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ReciprocalLengthUnit.InverseCentimeter, new CultureInfo("en-US"), false, true, new string[]{"cm⁻¹", "1/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReciprocalLengthUnit.InverseFoot, new CultureInfo("en-US"), false, true, new string[]{"ft⁻¹", "1/ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReciprocalLengthUnit.InverseInch, new CultureInfo("en-US"), false, true, new string[]{"in⁻¹", "1/in"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReciprocalLengthUnit.InverseMeter, new CultureInfo("en-US"), false, true, new string[]{"m⁻¹", "1/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReciprocalLengthUnit.InverseMicroinch, new CultureInfo("en-US"), false, true, new string[]{"µin⁻¹", "1/µin"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReciprocalLengthUnit.InverseMil, new CultureInfo("en-US"), false, true, new string[]{"mil⁻¹", "1/mil"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReciprocalLengthUnit.InverseMile, new CultureInfo("en-US"), false, true, new string[]{"mi⁻¹", "1/mi"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReciprocalLengthUnit.InverseMillimeter, new CultureInfo("en-US"), false, true, new string[]{"mm⁻¹", "1/mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReciprocalLengthUnit.InverseUsSurveyFoot, new CultureInfo("en-US"), false, true, new string[]{"ftUS⁻¹", "1/ftUS"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReciprocalLengthUnit.InverseYard, new CultureInfo("en-US"), false, true, new string[]{"yd⁻¹", "1/yd"}); - } - /// /// Get unit abbreviation string. /// @@ -306,7 +293,7 @@ public static string GetAbbreviation(ReciprocalLengthUnit unit, IFormatProvider? /// /// /// - public static string[] GetAbbreviations(ReciprocalLengthUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(ReciprocalLengthUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.ReciprocalLength"; var resourceManager = new ResourceManager(resourceName, typeof(ReciprocalLength).Assembly); @@ -968,7 +955,7 @@ public ReciprocalLength ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs b/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs index acd3987740..9144681298 100644 --- a/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -193,11 +194,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) // Register in unit converter: BaseUnit -> RelativeHumidityUnit } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(RelativeHumidityUnit.Percent, new CultureInfo("en-US"), false, true, new string[]{"%RH"}); - } - /// /// Get unit abbreviation string. /// @@ -222,7 +218,7 @@ public static string GetAbbreviation(RelativeHumidityUnit unit, IFormatProvider? /// /// /// - public static string[] GetAbbreviations(RelativeHumidityUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(RelativeHumidityUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.RelativeHumidity"; var resourceManager = new ResourceManager(resourceName, typeof(RelativeHumidity).Assembly); @@ -776,7 +772,7 @@ public RelativeHumidity ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.g.cs index ce9b14b9b1..7c874ed814 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -217,14 +218,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(RotationalAccelerationUnit.RadianPerSecondSquared, RotationalAccelerationUnit.RevolutionPerSecondSquared, quantity => quantity.ToUnit(RotationalAccelerationUnit.RevolutionPerSecondSquared)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalAccelerationUnit.DegreePerSecondSquared, new CultureInfo("en-US"), false, true, new string[]{"°/s²", "deg/s²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalAccelerationUnit.RadianPerSecondSquared, new CultureInfo("en-US"), false, true, new string[]{"rad/s²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalAccelerationUnit.RevolutionPerMinutePerSecond, new CultureInfo("en-US"), false, true, new string[]{"rpm/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalAccelerationUnit.RevolutionPerSecondSquared, new CultureInfo("en-US"), false, true, new string[]{"r/s²"}); - } - /// /// Get unit abbreviation string. /// @@ -249,7 +242,7 @@ public static string GetAbbreviation(RotationalAccelerationUnit unit, IFormatPro /// /// /// - public static string[] GetAbbreviations(RotationalAccelerationUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(RotationalAccelerationUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.RotationalAcceleration"; var resourceManager = new ResourceManager(resourceName, typeof(RotationalAcceleration).Assembly); @@ -839,7 +832,7 @@ public RotationalAcceleration ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs index a965fd215f..b0f08607aa 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -289,35 +290,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(RotationalSpeedUnit.RadianPerSecond, RotationalSpeedUnit.RevolutionPerSecond, quantity => quantity.ToUnit(RotationalSpeedUnit.RevolutionPerSecond)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.CentiradianPerSecond, new CultureInfo("en-US"), false, true, new string[]{"crad/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.CentiradianPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"срад/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.DeciradianPerSecond, new CultureInfo("en-US"), false, true, new string[]{"drad/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.DeciradianPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"драд/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.DegreePerMinute, new CultureInfo("en-US"), false, true, new string[]{"°/min", "deg/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.DegreePerSecond, new CultureInfo("en-US"), false, true, new string[]{"°/s", "deg/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.DegreePerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"°/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.MicrodegreePerSecond, new CultureInfo("en-US"), false, true, new string[]{"µ°/s", "µdeg/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.MicrodegreePerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"мк°/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.MicroradianPerSecond, new CultureInfo("en-US"), false, true, new string[]{"µrad/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.MicroradianPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"мкрад/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.MillidegreePerSecond, new CultureInfo("en-US"), false, true, new string[]{"m°/s", "mdeg/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.MillidegreePerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"м°/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.MilliradianPerSecond, new CultureInfo("en-US"), false, true, new string[]{"mrad/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.MilliradianPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"мрад/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.NanodegreePerSecond, new CultureInfo("en-US"), false, true, new string[]{"n°/s", "ndeg/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.NanodegreePerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"н°/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.NanoradianPerSecond, new CultureInfo("en-US"), false, true, new string[]{"nrad/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.NanoradianPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"нрад/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.RadianPerSecond, new CultureInfo("en-US"), false, true, new string[]{"rad/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.RadianPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"рад/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.RevolutionPerMinute, new CultureInfo("en-US"), false, true, new string[]{"rpm", "r/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.RevolutionPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"об/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.RevolutionPerSecond, new CultureInfo("en-US"), false, true, new string[]{"r/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.RevolutionPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"об/с"}); - } - /// /// Get unit abbreviation string. /// @@ -342,7 +314,7 @@ public static string GetAbbreviation(RotationalSpeedUnit unit, IFormatProvider? /// /// /// - public static string[] GetAbbreviations(RotationalSpeedUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(RotationalSpeedUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.RotationalSpeed"; var resourceManager = new ResourceManager(resourceName, typeof(RotationalSpeed).Assembly); @@ -1040,7 +1012,7 @@ public RotationalSpeed ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs index c21f783765..cfda295625 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -449,43 +450,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(RotationalStiffnessUnit.NewtonMeterPerRadian, RotationalStiffnessUnit.PoundForceFootPerDegrees, quantity => quantity.ToUnit(RotationalStiffnessUnit.PoundForceFootPerDegrees)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.CentinewtonMeterPerDegree, new CultureInfo("en-US"), false, true, new string[]{"cN·m/deg", "cNm/deg", "cN·m/°", "cNm/°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.CentinewtonMillimeterPerDegree, new CultureInfo("en-US"), false, true, new string[]{"cN·mm/deg", "cNmm/deg", "cN·mm/°", "cNmm/°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.CentinewtonMillimeterPerRadian, new CultureInfo("en-US"), false, true, new string[]{"cN·mm/rad", "cNmm/rad"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.DecanewtonMeterPerDegree, new CultureInfo("en-US"), false, true, new string[]{"daN·m/deg", "daNm/deg", "daN·m/°", "daNm/°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.DecanewtonMillimeterPerDegree, new CultureInfo("en-US"), false, true, new string[]{"daN·mm/deg", "daNmm/deg", "daN·mm/°", "daNmm/°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.DecanewtonMillimeterPerRadian, new CultureInfo("en-US"), false, true, new string[]{"daN·mm/rad", "daNmm/rad"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.DecinewtonMeterPerDegree, new CultureInfo("en-US"), false, true, new string[]{"dN·m/deg", "dNm/deg", "dN·m/°", "dNm/°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.DecinewtonMillimeterPerDegree, new CultureInfo("en-US"), false, true, new string[]{"dN·mm/deg", "dNmm/deg", "dN·mm/°", "dNmm/°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.DecinewtonMillimeterPerRadian, new CultureInfo("en-US"), false, true, new string[]{"dN·mm/rad", "dNmm/rad"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.KilonewtonMeterPerDegree, new CultureInfo("en-US"), false, true, new string[]{"kN·m/deg", "kNm/deg", "kN·m/°", "kNm/°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.KilonewtonMeterPerRadian, new CultureInfo("en-US"), false, true, new string[]{"kN·m/rad", "kNm/rad"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.KilonewtonMillimeterPerDegree, new CultureInfo("en-US"), false, true, new string[]{"kN·mm/deg", "kNmm/deg", "kN·mm/°", "kNmm/°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.KilonewtonMillimeterPerRadian, new CultureInfo("en-US"), false, true, new string[]{"kN·mm/rad", "kNmm/rad"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.KilopoundForceFootPerDegrees, new CultureInfo("en-US"), false, true, new string[]{"kipf·ft/°", "kip·ft/°g", "k·ft/°", "kipf·ft/deg", "kip·ft/deg", "k·ft/deg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.MeganewtonMeterPerDegree, new CultureInfo("en-US"), false, true, new string[]{"MN·m/deg", "MNm/deg", "MN·m/°", "MNm/°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.MeganewtonMeterPerRadian, new CultureInfo("en-US"), false, true, new string[]{"MN·m/rad", "MNm/rad"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.MeganewtonMillimeterPerDegree, new CultureInfo("en-US"), false, true, new string[]{"MN·mm/deg", "MNmm/deg", "MN·mm/°", "MNmm/°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.MeganewtonMillimeterPerRadian, new CultureInfo("en-US"), false, true, new string[]{"MN·mm/rad", "MNmm/rad"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.MicronewtonMeterPerDegree, new CultureInfo("en-US"), false, true, new string[]{"µN·m/deg", "µNm/deg", "µN·m/°", "µNm/°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.MicronewtonMillimeterPerDegree, new CultureInfo("en-US"), false, true, new string[]{"µN·mm/deg", "µNmm/deg", "µN·mm/°", "µNmm/°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.MicronewtonMillimeterPerRadian, new CultureInfo("en-US"), false, true, new string[]{"µN·mm/rad", "µNmm/rad"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.MillinewtonMeterPerDegree, new CultureInfo("en-US"), false, true, new string[]{"mN·m/deg", "mNm/deg", "mN·m/°", "mNm/°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.MillinewtonMillimeterPerDegree, new CultureInfo("en-US"), false, true, new string[]{"mN·mm/deg", "mNmm/deg", "mN·mm/°", "mNmm/°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.MillinewtonMillimeterPerRadian, new CultureInfo("en-US"), false, true, new string[]{"mN·mm/rad", "mNmm/rad"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.NanonewtonMeterPerDegree, new CultureInfo("en-US"), false, true, new string[]{"nN·m/deg", "nNm/deg", "nN·m/°", "nNm/°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.NanonewtonMillimeterPerDegree, new CultureInfo("en-US"), false, true, new string[]{"nN·mm/deg", "nNmm/deg", "nN·mm/°", "nNmm/°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.NanonewtonMillimeterPerRadian, new CultureInfo("en-US"), false, true, new string[]{"nN·mm/rad", "nNmm/rad"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.NewtonMeterPerDegree, new CultureInfo("en-US"), false, true, new string[]{"N·m/deg", "Nm/deg", "N·m/°", "Nm/°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.NewtonMeterPerRadian, new CultureInfo("en-US"), false, true, new string[]{"N·m/rad", "Nm/rad"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.NewtonMillimeterPerDegree, new CultureInfo("en-US"), false, true, new string[]{"N·mm/deg", "Nmm/deg", "N·mm/°", "Nmm/°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.NewtonMillimeterPerRadian, new CultureInfo("en-US"), false, true, new string[]{"N·mm/rad", "Nmm/rad"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.PoundForceFeetPerRadian, new CultureInfo("en-US"), false, true, new string[]{"lbf·ft/rad"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.PoundForceFootPerDegrees, new CultureInfo("en-US"), false, true, new string[]{"lbf·ft/deg"}); - } - /// /// Get unit abbreviation string. /// @@ -510,7 +474,7 @@ public static string GetAbbreviation(RotationalStiffnessUnit unit, IFormatProvid /// /// /// - public static string[] GetAbbreviations(RotationalStiffnessUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(RotationalStiffnessUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.RotationalStiffness"; var resourceManager = new ResourceManager(resourceName, typeof(RotationalStiffness).Assembly); @@ -1448,7 +1412,7 @@ public RotationalStiffness ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs index 1403187cf9..a316015173 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -225,15 +226,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter, RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot, quantity => quantity.ToUnit(RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessPerLengthUnit.KilonewtonMeterPerRadianPerMeter, new CultureInfo("en-US"), false, true, new string[]{"kN·m/rad/m", "kNm/rad/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessPerLengthUnit.KilopoundForceFootPerDegreesPerFoot, new CultureInfo("en-US"), false, true, new string[]{"kipf·ft/°/ft", "kip·ft/°/ft", "k·ft/°/ft", "kipf·ft/deg/ft", "kip·ft/deg/ft", "k·ft/deg/ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessPerLengthUnit.MeganewtonMeterPerRadianPerMeter, new CultureInfo("en-US"), false, true, new string[]{"MN·m/rad/m", "MNm/rad/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter, new CultureInfo("en-US"), false, true, new string[]{"N·m/rad/m", "Nm/rad/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot, new CultureInfo("en-US"), false, true, new string[]{"lbf·ft/deg/ft"}); - } - /// /// Get unit abbreviation string. /// @@ -258,7 +250,7 @@ public static string GetAbbreviation(RotationalStiffnessPerLengthUnit unit, IFor /// /// /// - public static string[] GetAbbreviations(RotationalStiffnessPerLengthUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(RotationalStiffnessPerLengthUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.RotationalStiffnessPerLength"; var resourceManager = new ResourceManager(resourceName, typeof(RotationalStiffnessPerLength).Assembly); @@ -860,7 +852,7 @@ public RotationalStiffnessPerLength ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/Scalar.g.cs b/UnitsNet/GeneratedCode/Quantities/Scalar.g.cs index 9c5a29ca4c..01e452df5c 100644 --- a/UnitsNet/GeneratedCode/Quantities/Scalar.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Scalar.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -193,11 +194,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) // Register in unit converter: BaseUnit -> ScalarUnit } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ScalarUnit.Amount, new CultureInfo("en-US"), false, true, new string[]{""}); - } - /// /// Get unit abbreviation string. /// @@ -222,7 +218,7 @@ public static string GetAbbreviation(ScalarUnit unit, IFormatProvider? provider) /// /// /// - public static string[] GetAbbreviations(ScalarUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(ScalarUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.Scalar"; var resourceManager = new ResourceManager(resourceName, typeof(Scalar).Assembly); @@ -776,7 +772,7 @@ public Scalar ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs b/UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs index 57cc47c254..31e11de6d2 100644 --- a/UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -196,11 +197,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) // Register in unit converter: BaseUnit -> SolidAngleUnit } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(SolidAngleUnit.Steradian, new CultureInfo("en-US"), false, true, new string[]{"sr"}); - } - /// /// Get unit abbreviation string. /// @@ -225,7 +221,7 @@ public static string GetAbbreviation(SolidAngleUnit unit, IFormatProvider? provi /// /// /// - public static string[] GetAbbreviations(SolidAngleUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(SolidAngleUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.SolidAngle"; var resourceManager = new ResourceManager(resourceName, typeof(SolidAngle).Assembly); @@ -779,7 +775,7 @@ public SolidAngle ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs index 86b0d0d7cb..80290c7fb1 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -428,40 +429,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(SpecificEnergyUnit.JoulePerKilogram, SpecificEnergyUnit.WattHourPerPound, quantity => quantity.ToUnit(SpecificEnergyUnit.WattHourPerPound)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.BtuPerPound, new CultureInfo("en-US"), false, true, new string[]{"btu/lb"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.CaloriePerGram, new CultureInfo("en-US"), false, true, new string[]{"cal/g"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.GigawattDayPerKilogram, new CultureInfo("en-US"), false, true, new string[]{"GWd/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.GigawattDayPerShortTon, new CultureInfo("en-US"), false, true, new string[]{"GWd/ST"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.GigawattDayPerTonne, new CultureInfo("en-US"), false, true, new string[]{"GWd/t"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.GigawattHourPerKilogram, new CultureInfo("en-US"), false, true, new string[]{"GWh/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.GigawattHourPerPound, new CultureInfo("en-US"), false, true, new string[]{"GWh/lbs"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.JoulePerKilogram, new CultureInfo("en-US"), false, true, new string[]{"J/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.KilocaloriePerGram, new CultureInfo("en-US"), false, true, new string[]{"kcal/g"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.KilojoulePerKilogram, new CultureInfo("en-US"), false, true, new string[]{"kJ/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.KilowattDayPerKilogram, new CultureInfo("en-US"), false, true, new string[]{"kWd/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.KilowattDayPerShortTon, new CultureInfo("en-US"), false, true, new string[]{"kWd/ST"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.KilowattDayPerTonne, new CultureInfo("en-US"), false, true, new string[]{"kWd/t"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.KilowattHourPerKilogram, new CultureInfo("en-US"), false, true, new string[]{"kWh/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.KilowattHourPerPound, new CultureInfo("en-US"), false, true, new string[]{"kWh/lbs"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.MegajoulePerKilogram, new CultureInfo("en-US"), false, true, new string[]{"MJ/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.MegaJoulePerTonne, new CultureInfo("en-US"), false, true, new string[]{"MJ/t"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.MegawattDayPerKilogram, new CultureInfo("en-US"), false, true, new string[]{"MWd/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.MegawattDayPerShortTon, new CultureInfo("en-US"), false, true, new string[]{"MWd/ST"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.MegawattDayPerTonne, new CultureInfo("en-US"), false, true, new string[]{"MWd/t"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.MegawattHourPerKilogram, new CultureInfo("en-US"), false, true, new string[]{"MWh/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.MegawattHourPerPound, new CultureInfo("en-US"), false, true, new string[]{"MWh/lbs"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.TerawattDayPerKilogram, new CultureInfo("en-US"), false, true, new string[]{"TWd/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.TerawattDayPerShortTon, new CultureInfo("en-US"), false, true, new string[]{"TWd/ST"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.TerawattDayPerTonne, new CultureInfo("en-US"), false, true, new string[]{"TWd/t"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.WattDayPerKilogram, new CultureInfo("en-US"), false, true, new string[]{"Wd/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.WattDayPerShortTon, new CultureInfo("en-US"), false, true, new string[]{"Wd/ST"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.WattDayPerTonne, new CultureInfo("en-US"), false, true, new string[]{"Wd/t"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.WattHourPerKilogram, new CultureInfo("en-US"), false, true, new string[]{"Wh/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.WattHourPerPound, new CultureInfo("en-US"), false, true, new string[]{"Wh/lbs"}); - } - /// /// Get unit abbreviation string. /// @@ -486,7 +453,7 @@ public static string GetAbbreviation(SpecificEnergyUnit unit, IFormatProvider? p /// /// /// - public static string[] GetAbbreviations(SpecificEnergyUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(SpecificEnergyUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.SpecificEnergy"; var resourceManager = new ResourceManager(resourceName, typeof(SpecificEnergy).Assembly); @@ -1388,7 +1355,7 @@ public SpecificEnergy ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs index ab62ddb423..ff2e009c2f 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -257,19 +258,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(SpecificEntropyUnit.JoulePerKilogramKelvin, SpecificEntropyUnit.MegajoulePerKilogramKelvin, quantity => quantity.ToUnit(SpecificEntropyUnit.MegajoulePerKilogramKelvin)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEntropyUnit.BtuPerPoundFahrenheit, new CultureInfo("en-US"), false, true, new string[]{"BTU/lb·°F", "BTU/lbm·°F"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEntropyUnit.CaloriePerGramKelvin, new CultureInfo("en-US"), false, true, new string[]{"cal/g.K"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEntropyUnit.JoulePerKilogramDegreeCelsius, new CultureInfo("en-US"), false, true, new string[]{"J/kg.C"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEntropyUnit.JoulePerKilogramKelvin, new CultureInfo("en-US"), false, true, new string[]{"J/kg.K"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEntropyUnit.KilocaloriePerGramKelvin, new CultureInfo("en-US"), false, true, new string[]{"kcal/g.K"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEntropyUnit.KilojoulePerKilogramDegreeCelsius, new CultureInfo("en-US"), false, true, new string[]{"kJ/kg.C"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEntropyUnit.KilojoulePerKilogramKelvin, new CultureInfo("en-US"), false, true, new string[]{"kJ/kg.K"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEntropyUnit.MegajoulePerKilogramDegreeCelsius, new CultureInfo("en-US"), false, true, new string[]{"MJ/kg.C"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEntropyUnit.MegajoulePerKilogramKelvin, new CultureInfo("en-US"), false, true, new string[]{"MJ/kg.K"}); - } - /// /// Get unit abbreviation string. /// @@ -294,7 +282,7 @@ public static string GetAbbreviation(SpecificEntropyUnit unit, IFormatProvider? /// /// /// - public static string[] GetAbbreviations(SpecificEntropyUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(SpecificEntropyUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.SpecificEntropy"; var resourceManager = new ResourceManager(resourceName, typeof(SpecificEntropy).Assembly); @@ -944,7 +932,7 @@ public SpecificEntropy ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs index 4d003503f1..b20452042f 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -220,14 +221,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond, SpecificFuelConsumptionUnit.PoundMassPerPoundForceHour, quantity => quantity.ToUnit(SpecificFuelConsumptionUnit.PoundMassPerPoundForceHour)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond, new CultureInfo("en-US"), false, true, new string[]{"g/(kN�s)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificFuelConsumptionUnit.KilogramPerKilogramForceHour, new CultureInfo("en-US"), false, true, new string[]{"kg/(kgf�h)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificFuelConsumptionUnit.KilogramPerKiloNewtonSecond, new CultureInfo("en-US"), false, true, new string[]{"kg/(kN�s)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificFuelConsumptionUnit.PoundMassPerPoundForceHour, new CultureInfo("en-US"), false, true, new string[]{"lb/(lbf·h)"}); - } - /// /// Get unit abbreviation string. /// @@ -252,7 +245,7 @@ public static string GetAbbreviation(SpecificFuelConsumptionUnit unit, IFormatPr /// /// /// - public static string[] GetAbbreviations(SpecificFuelConsumptionUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(SpecificFuelConsumptionUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.SpecificFuelConsumption"; var resourceManager = new ResourceManager(resourceName, typeof(SpecificFuelConsumption).Assembly); @@ -842,7 +835,7 @@ public SpecificFuelConsumption ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs index a500640d8c..d3b7bc89c2 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -209,13 +210,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(SpecificVolumeUnit.CubicMeterPerKilogram, SpecificVolumeUnit.MillicubicMeterPerKilogram, quantity => quantity.ToUnit(SpecificVolumeUnit.MillicubicMeterPerKilogram)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificVolumeUnit.CubicFootPerPound, new CultureInfo("en-US"), false, true, new string[]{"ft³/lb"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificVolumeUnit.CubicMeterPerKilogram, new CultureInfo("en-US"), false, true, new string[]{"m³/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificVolumeUnit.MillicubicMeterPerKilogram, new CultureInfo("en-US"), false, true, new string[]{"mm³/kg"}); - } - /// /// Get unit abbreviation string. /// @@ -240,7 +234,7 @@ public static string GetAbbreviation(SpecificVolumeUnit unit, IFormatProvider? p /// /// /// - public static string[] GetAbbreviations(SpecificVolumeUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(SpecificVolumeUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.SpecificVolume"; var resourceManager = new ResourceManager(resourceName, typeof(SpecificVolume).Assembly); @@ -818,7 +812,7 @@ public SpecificVolume ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs index 1dd81de6ce..670c6f978e 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -324,27 +325,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(SpecificWeightUnit.NewtonPerCubicMeter, SpecificWeightUnit.TonneForcePerCubicMillimeter, quantity => quantity.ToUnit(SpecificWeightUnit.TonneForcePerCubicMillimeter)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificWeightUnit.KilogramForcePerCubicCentimeter, new CultureInfo("en-US"), false, true, new string[]{"kgf/cm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificWeightUnit.KilogramForcePerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"kgf/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificWeightUnit.KilogramForcePerCubicMillimeter, new CultureInfo("en-US"), false, true, new string[]{"kgf/mm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificWeightUnit.KilonewtonPerCubicCentimeter, new CultureInfo("en-US"), false, true, new string[]{"kN/cm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificWeightUnit.KilonewtonPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"kN/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificWeightUnit.KilonewtonPerCubicMillimeter, new CultureInfo("en-US"), false, true, new string[]{"kN/mm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificWeightUnit.KilopoundForcePerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"kipf/ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificWeightUnit.KilopoundForcePerCubicInch, new CultureInfo("en-US"), false, true, new string[]{"kipf/in³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificWeightUnit.MeganewtonPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"MN/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificWeightUnit.NewtonPerCubicCentimeter, new CultureInfo("en-US"), false, true, new string[]{"N/cm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificWeightUnit.NewtonPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"N/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificWeightUnit.NewtonPerCubicMillimeter, new CultureInfo("en-US"), false, true, new string[]{"N/mm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificWeightUnit.PoundForcePerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"lbf/ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificWeightUnit.PoundForcePerCubicInch, new CultureInfo("en-US"), false, true, new string[]{"lbf/in³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificWeightUnit.TonneForcePerCubicCentimeter, new CultureInfo("en-US"), false, true, new string[]{"tf/cm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificWeightUnit.TonneForcePerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"tf/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificWeightUnit.TonneForcePerCubicMillimeter, new CultureInfo("en-US"), false, true, new string[]{"tf/mm³"}); - } - /// /// Get unit abbreviation string. /// @@ -369,7 +349,7 @@ public static string GetAbbreviation(SpecificWeightUnit unit, IFormatProvider? p /// /// /// - public static string[] GetAbbreviations(SpecificWeightUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(SpecificWeightUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.SpecificWeight"; var resourceManager = new ResourceManager(resourceName, typeof(SpecificWeight).Assembly); @@ -1115,7 +1095,7 @@ public SpecificWeight ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/Speed.g.cs b/UnitsNet/GeneratedCode/Quantities/Speed.g.cs index 47204687e6..f17432422a 100644 --- a/UnitsNet/GeneratedCode/Quantities/Speed.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Speed.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -449,67 +450,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(SpeedUnit.MeterPerSecond, SpeedUnit.YardPerSecond, quantity => quantity.ToUnit(SpeedUnit.YardPerSecond)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.CentimeterPerHour, new CultureInfo("en-US"), false, true, new string[]{"cm/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.CentimeterPerHour, new CultureInfo("ru-RU"), false, true, new string[]{"см/ч"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.CentimeterPerMinute, new CultureInfo("en-US"), false, true, new string[]{"cm/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.CentimeterPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"см/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.CentimeterPerSecond, new CultureInfo("en-US"), false, true, new string[]{"cm/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.CentimeterPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"см/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.DecimeterPerMinute, new CultureInfo("en-US"), false, true, new string[]{"dm/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.DecimeterPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"дм/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.DecimeterPerSecond, new CultureInfo("en-US"), false, true, new string[]{"dm/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.DecimeterPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"дм/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.FootPerHour, new CultureInfo("en-US"), false, true, new string[]{"ft/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.FootPerHour, new CultureInfo("ru-RU"), false, true, new string[]{"фут/ч"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.FootPerMinute, new CultureInfo("en-US"), false, true, new string[]{"ft/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.FootPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"фут/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.FootPerSecond, new CultureInfo("en-US"), false, true, new string[]{"ft/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.FootPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"фут/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.InchPerHour, new CultureInfo("en-US"), false, true, new string[]{"in/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.InchPerMinute, new CultureInfo("en-US"), false, true, new string[]{"in/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.InchPerSecond, new CultureInfo("en-US"), false, true, new string[]{"in/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.KilometerPerHour, new CultureInfo("en-US"), false, true, new string[]{"km/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.KilometerPerHour, new CultureInfo("ru-RU"), false, true, new string[]{"км/ч"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.KilometerPerMinute, new CultureInfo("en-US"), false, true, new string[]{"km/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.KilometerPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"км/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.KilometerPerSecond, new CultureInfo("en-US"), false, true, new string[]{"km/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.KilometerPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"км/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.Knot, new CultureInfo("en-US"), false, true, new string[]{"kn", "kt", "knot", "knots"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.Knot, new CultureInfo("ru-RU"), false, true, new string[]{"уз."}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.Mach, new CultureInfo("en-US"), false, true, new string[]{"M", "Ma", "MN", "MACH"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.Mach, new CultureInfo("ru-RU"), false, true, new string[]{"мах"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.MeterPerHour, new CultureInfo("en-US"), false, true, new string[]{"m/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.MeterPerHour, new CultureInfo("ru-RU"), false, true, new string[]{"м/ч"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.MeterPerMinute, new CultureInfo("en-US"), false, true, new string[]{"m/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.MeterPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"м/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.MeterPerSecond, new CultureInfo("en-US"), false, true, new string[]{"m/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.MeterPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"м/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.MicrometerPerMinute, new CultureInfo("en-US"), false, true, new string[]{"µm/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.MicrometerPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"мкм/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.MicrometerPerSecond, new CultureInfo("en-US"), false, true, new string[]{"µm/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.MicrometerPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"мкм/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.MilePerHour, new CultureInfo("en-US"), false, true, new string[]{"mph"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.MilePerHour, new CultureInfo("ru-RU"), false, true, new string[]{"миль/ч"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.MillimeterPerHour, new CultureInfo("en-US"), false, true, new string[]{"mm/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.MillimeterPerHour, new CultureInfo("ru-RU"), false, true, new string[]{"мм/ч"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.MillimeterPerMinute, new CultureInfo("en-US"), false, true, new string[]{"mm/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.MillimeterPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"мм/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.MillimeterPerSecond, new CultureInfo("en-US"), false, true, new string[]{"mm/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.MillimeterPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"мм/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.NanometerPerMinute, new CultureInfo("en-US"), false, true, new string[]{"nm/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.NanometerPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"нм/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.NanometerPerSecond, new CultureInfo("en-US"), false, true, new string[]{"nm/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.NanometerPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"нм/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.UsSurveyFootPerHour, new CultureInfo("en-US"), false, true, new string[]{"ftUS/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.UsSurveyFootPerMinute, new CultureInfo("en-US"), false, true, new string[]{"ftUS/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.UsSurveyFootPerSecond, new CultureInfo("en-US"), false, true, new string[]{"ftUS/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.YardPerHour, new CultureInfo("en-US"), false, true, new string[]{"yd/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.YardPerMinute, new CultureInfo("en-US"), false, true, new string[]{"yd/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.YardPerSecond, new CultureInfo("en-US"), false, true, new string[]{"yd/s"}); - } - /// /// Get unit abbreviation string. /// @@ -534,7 +474,7 @@ public static string GetAbbreviation(SpeedUnit unit, IFormatProvider? provider) /// /// /// - public static string[] GetAbbreviations(SpeedUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(SpeedUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.Speed"; var resourceManager = new ResourceManager(resourceName, typeof(Speed).Assembly); @@ -1472,7 +1412,7 @@ public Speed ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/StandardVolumeFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/StandardVolumeFlow.g.cs index 8df9b05316..19c0d2ed7d 100644 --- a/UnitsNet/GeneratedCode/Quantities/StandardVolumeFlow.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/StandardVolumeFlow.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -257,19 +258,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(StandardVolumeFlowUnit.StandardCubicMeterPerSecond, StandardVolumeFlowUnit.StandardLiterPerMinute, quantity => quantity.ToUnit(StandardVolumeFlowUnit.StandardLiterPerMinute)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(StandardVolumeFlowUnit.StandardCubicCentimeterPerMinute, new CultureInfo("en-US"), false, true, new string[]{"sccm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(StandardVolumeFlowUnit.StandardCubicFootPerHour, new CultureInfo("en-US"), false, true, new string[]{"scfh"}); - unitAbbreviationsCache.PerformAbbreviationMapping(StandardVolumeFlowUnit.StandardCubicFootPerMinute, new CultureInfo("en-US"), false, true, new string[]{"scfm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(StandardVolumeFlowUnit.StandardCubicFootPerSecond, new CultureInfo("en-US"), false, true, new string[]{"Sft³/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(StandardVolumeFlowUnit.StandardCubicMeterPerDay, new CultureInfo("en-US"), false, true, new string[]{"Sm³/d"}); - unitAbbreviationsCache.PerformAbbreviationMapping(StandardVolumeFlowUnit.StandardCubicMeterPerHour, new CultureInfo("en-US"), false, true, new string[]{"Sm³/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(StandardVolumeFlowUnit.StandardCubicMeterPerMinute, new CultureInfo("en-US"), false, true, new string[]{"Sm³/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(StandardVolumeFlowUnit.StandardCubicMeterPerSecond, new CultureInfo("en-US"), false, true, new string[]{"Sm³/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(StandardVolumeFlowUnit.StandardLiterPerMinute, new CultureInfo("en-US"), false, true, new string[]{"slm"}); - } - /// /// Get unit abbreviation string. /// @@ -294,7 +282,7 @@ public static string GetAbbreviation(StandardVolumeFlowUnit unit, IFormatProvide /// /// /// - public static string[] GetAbbreviations(StandardVolumeFlowUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(StandardVolumeFlowUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.StandardVolumeFlow"; var resourceManager = new ResourceManager(resourceName, typeof(StandardVolumeFlow).Assembly); @@ -944,7 +932,7 @@ public StandardVolumeFlow ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/Temperature.g.cs b/UnitsNet/GeneratedCode/Quantities/Temperature.g.cs index 58894d264f..03832079f0 100644 --- a/UnitsNet/GeneratedCode/Quantities/Temperature.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Temperature.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -262,20 +263,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(TemperatureUnit.Kelvin, TemperatureUnit.SolarTemperature, quantity => quantity.ToUnit(TemperatureUnit.SolarTemperature)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureUnit.DegreeCelsius, new CultureInfo("en-US"), false, true, new string[]{"°C"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureUnit.DegreeDelisle, new CultureInfo("en-US"), false, true, new string[]{"°De"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureUnit.DegreeFahrenheit, new CultureInfo("en-US"), false, true, new string[]{"°F"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureUnit.DegreeNewton, new CultureInfo("en-US"), false, true, new string[]{"°N"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureUnit.DegreeRankine, new CultureInfo("en-US"), false, true, new string[]{"°R"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureUnit.DegreeReaumur, new CultureInfo("en-US"), false, true, new string[]{"°Ré"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureUnit.DegreeRoemer, new CultureInfo("en-US"), false, true, new string[]{"°Rø"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureUnit.Kelvin, new CultureInfo("en-US"), false, true, new string[]{"K"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureUnit.MillidegreeCelsius, new CultureInfo("en-US"), false, true, new string[]{"m°C"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureUnit.SolarTemperature, new CultureInfo("en-US"), false, true, new string[]{"T⊙"}); - } - /// /// Get unit abbreviation string. /// @@ -300,7 +287,7 @@ public static string GetAbbreviation(TemperatureUnit unit, IFormatProvider? prov /// /// /// - public static string[] GetAbbreviations(TemperatureUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(TemperatureUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.Temperature"; var resourceManager = new ResourceManager(resourceName, typeof(Temperature).Assembly); @@ -916,7 +903,7 @@ public Temperature ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs index 207aebaef5..5ed6831285 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -265,20 +266,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(TemperatureChangeRateUnit.DegreeCelsiusPerSecond, TemperatureChangeRateUnit.NanodegreeCelsiusPerSecond, quantity => quantity.ToUnit(TemperatureChangeRateUnit.NanodegreeCelsiusPerSecond)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureChangeRateUnit.CentidegreeCelsiusPerSecond, new CultureInfo("en-US"), false, true, new string[]{"c°C/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureChangeRateUnit.DecadegreeCelsiusPerSecond, new CultureInfo("en-US"), false, true, new string[]{"da°C/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureChangeRateUnit.DecidegreeCelsiusPerSecond, new CultureInfo("en-US"), false, true, new string[]{"d°C/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureChangeRateUnit.DegreeCelsiusPerMinute, new CultureInfo("en-US"), false, true, new string[]{"°C/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureChangeRateUnit.DegreeCelsiusPerSecond, new CultureInfo("en-US"), false, true, new string[]{"°C/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureChangeRateUnit.HectodegreeCelsiusPerSecond, new CultureInfo("en-US"), false, true, new string[]{"h°C/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureChangeRateUnit.KilodegreeCelsiusPerSecond, new CultureInfo("en-US"), false, true, new string[]{"k°C/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureChangeRateUnit.MicrodegreeCelsiusPerSecond, new CultureInfo("en-US"), false, true, new string[]{"µ°C/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureChangeRateUnit.MillidegreeCelsiusPerSecond, new CultureInfo("en-US"), false, true, new string[]{"m°C/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureChangeRateUnit.NanodegreeCelsiusPerSecond, new CultureInfo("en-US"), false, true, new string[]{"n°C/s"}); - } - /// /// Get unit abbreviation string. /// @@ -303,7 +290,7 @@ public static string GetAbbreviation(TemperatureChangeRateUnit unit, IFormatProv /// /// /// - public static string[] GetAbbreviations(TemperatureChangeRateUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(TemperatureChangeRateUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.TemperatureChangeRate"; var resourceManager = new ResourceManager(resourceName, typeof(TemperatureChangeRate).Assembly); @@ -965,7 +952,7 @@ public TemperatureChangeRate ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs index eb4d7412f1..b1b78d93e2 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -257,19 +258,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(TemperatureDeltaUnit.Kelvin, TemperatureDeltaUnit.MillidegreeCelsius, quantity => quantity.ToUnit(TemperatureDeltaUnit.MillidegreeCelsius)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureDeltaUnit.DegreeCelsius, new CultureInfo("en-US"), false, true, new string[]{"∆°C"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureDeltaUnit.DegreeDelisle, new CultureInfo("en-US"), false, true, new string[]{"∆°De"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureDeltaUnit.DegreeFahrenheit, new CultureInfo("en-US"), false, true, new string[]{"∆°F"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureDeltaUnit.DegreeNewton, new CultureInfo("en-US"), false, true, new string[]{"∆°N"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureDeltaUnit.DegreeRankine, new CultureInfo("en-US"), false, true, new string[]{"∆°R"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureDeltaUnit.DegreeReaumur, new CultureInfo("en-US"), false, true, new string[]{"∆°Ré"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureDeltaUnit.DegreeRoemer, new CultureInfo("en-US"), false, true, new string[]{"∆°Rø"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureDeltaUnit.Kelvin, new CultureInfo("en-US"), false, true, new string[]{"∆K"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureDeltaUnit.MillidegreeCelsius, new CultureInfo("en-US"), false, true, new string[]{"∆m°C"}); - } - /// /// Get unit abbreviation string. /// @@ -294,7 +282,7 @@ public static string GetAbbreviation(TemperatureDeltaUnit unit, IFormatProvider? /// /// /// - public static string[] GetAbbreviations(TemperatureDeltaUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(TemperatureDeltaUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.TemperatureDelta"; var resourceManager = new ResourceManager(resourceName, typeof(TemperatureDelta).Assembly); @@ -944,7 +932,7 @@ public TemperatureDelta ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureGradient.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureGradient.g.cs index 09d5f0a1fa..1768d39327 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureGradient.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureGradient.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -217,14 +218,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(TemperatureGradientUnit.KelvinPerMeter, TemperatureGradientUnit.DegreeFahrenheitPerFoot, quantity => quantity.ToUnit(TemperatureGradientUnit.DegreeFahrenheitPerFoot)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureGradientUnit.DegreeCelsiusPerKilometer, new CultureInfo("en-US"), false, true, new string[]{"∆°C/km"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureGradientUnit.DegreeCelsiusPerMeter, new CultureInfo("en-US"), false, true, new string[]{"∆°C/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureGradientUnit.DegreeFahrenheitPerFoot, new CultureInfo("en-US"), false, true, new string[]{"∆°F/ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureGradientUnit.KelvinPerMeter, new CultureInfo("en-US"), false, true, new string[]{"∆°K/m"}); - } - /// /// Get unit abbreviation string. /// @@ -249,7 +242,7 @@ public static string GetAbbreviation(TemperatureGradientUnit unit, IFormatProvid /// /// /// - public static string[] GetAbbreviations(TemperatureGradientUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(TemperatureGradientUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.TemperatureGradient"; var resourceManager = new ResourceManager(resourceName, typeof(TemperatureGradient).Assembly); @@ -839,7 +832,7 @@ public TemperatureGradient ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs b/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs index 4a3233f360..948603050e 100644 --- a/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -204,12 +205,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ThermalConductivityUnit.WattPerMeterKelvin, ThermalConductivityUnit.BtuPerHourFootFahrenheit, quantity => quantity.ToUnit(ThermalConductivityUnit.BtuPerHourFootFahrenheit)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ThermalConductivityUnit.BtuPerHourFootFahrenheit, new CultureInfo("en-US"), false, true, new string[]{"BTU/h·ft·°F"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ThermalConductivityUnit.WattPerMeterKelvin, new CultureInfo("en-US"), false, true, new string[]{"W/m·K"}); - } - /// /// Get unit abbreviation string. /// @@ -234,7 +229,7 @@ public static string GetAbbreviation(ThermalConductivityUnit unit, IFormatProvid /// /// /// - public static string[] GetAbbreviations(ThermalConductivityUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(ThermalConductivityUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.ThermalConductivity"; var resourceManager = new ResourceManager(resourceName, typeof(ThermalConductivity).Assembly); @@ -800,7 +795,7 @@ public ThermalConductivity ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs b/UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs index 8e0a662e79..d16b43a4c5 100644 --- a/UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -233,16 +234,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ThermalResistanceUnit.SquareMeterKelvinPerKilowatt, ThermalResistanceUnit.SquareMeterKelvinPerWatt, quantity => quantity.ToUnit(ThermalResistanceUnit.SquareMeterKelvinPerWatt)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ThermalResistanceUnit.HourSquareFeetDegreeFahrenheitPerBtu, new CultureInfo("en-US"), false, true, new string[]{"Hrft²°F/Btu"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ThermalResistanceUnit.SquareCentimeterHourDegreeCelsiusPerKilocalorie, new CultureInfo("en-US"), false, true, new string[]{"cm²Hr°C/kcal"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ThermalResistanceUnit.SquareCentimeterKelvinPerWatt, new CultureInfo("en-US"), false, true, new string[]{"cm²K/W"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ThermalResistanceUnit.SquareMeterDegreeCelsiusPerWatt, new CultureInfo("en-US"), false, true, new string[]{"m²°C/W"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ThermalResistanceUnit.SquareMeterKelvinPerKilowatt, new CultureInfo("en-US"), false, true, new string[]{"m²K/kW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ThermalResistanceUnit.SquareMeterKelvinPerWatt, new CultureInfo("en-US"), false, true, new string[]{"m²K/W"}); - } - /// /// Get unit abbreviation string. /// @@ -267,7 +258,7 @@ public static string GetAbbreviation(ThermalResistanceUnit unit, IFormatProvider /// /// /// - public static string[] GetAbbreviations(ThermalResistanceUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(ThermalResistanceUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.ThermalResistance"; var resourceManager = new ResourceManager(resourceName, typeof(ThermalResistance).Assembly); @@ -881,7 +872,7 @@ public ThermalResistance ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/Torque.g.cs b/UnitsNet/GeneratedCode/Quantities/Torque.g.cs index df49f22430..6c2f3a18b9 100644 --- a/UnitsNet/GeneratedCode/Quantities/Torque.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Torque.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -385,38 +386,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(TorqueUnit.NewtonMeter, TorqueUnit.TonneForceMillimeter, quantity => quantity.ToUnit(TorqueUnit.TonneForceMillimeter)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.GramForceCentimeter, new CultureInfo("en-US"), false, true, new string[]{"gf·cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.GramForceMeter, new CultureInfo("en-US"), false, true, new string[]{"gf·m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.GramForceMillimeter, new CultureInfo("en-US"), false, true, new string[]{"gf·mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.KilogramForceCentimeter, new CultureInfo("en-US"), false, true, new string[]{"kgf·cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.KilogramForceMeter, new CultureInfo("en-US"), false, true, new string[]{"kgf·m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.KilogramForceMillimeter, new CultureInfo("en-US"), false, true, new string[]{"kgf·mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.KilonewtonCentimeter, new CultureInfo("en-US"), false, true, new string[]{"kN·cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.KilonewtonMeter, new CultureInfo("en-US"), false, true, new string[]{"kN·m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.KilonewtonMeter, new CultureInfo("ru-RU"), false, true, new string[]{"кН·м"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.KilonewtonMillimeter, new CultureInfo("en-US"), false, true, new string[]{"kN·mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.KilopoundForceFoot, new CultureInfo("en-US"), false, true, new string[]{"kipf·ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.KilopoundForceInch, new CultureInfo("en-US"), false, true, new string[]{"kipf·in"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.MeganewtonCentimeter, new CultureInfo("en-US"), false, true, new string[]{"MN·cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.MeganewtonMeter, new CultureInfo("en-US"), false, true, new string[]{"MN·m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.MeganewtonMeter, new CultureInfo("ru-RU"), false, true, new string[]{"МН·м"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.MeganewtonMillimeter, new CultureInfo("en-US"), false, true, new string[]{"MN·mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.MegapoundForceFoot, new CultureInfo("en-US"), false, true, new string[]{"Mlbf·ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.MegapoundForceInch, new CultureInfo("en-US"), false, true, new string[]{"Mlbf·in"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.NewtonCentimeter, new CultureInfo("en-US"), false, true, new string[]{"N·cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.NewtonMeter, new CultureInfo("en-US"), false, true, new string[]{"N·m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.NewtonMeter, new CultureInfo("ru-RU"), false, true, new string[]{"Н·м"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.NewtonMillimeter, new CultureInfo("en-US"), false, true, new string[]{"N·mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.PoundalFoot, new CultureInfo("en-US"), false, true, new string[]{"pdl·ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.PoundForceFoot, new CultureInfo("en-US"), false, true, new string[]{"lbf·ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.PoundForceInch, new CultureInfo("en-US"), false, true, new string[]{"lbf·in"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.TonneForceCentimeter, new CultureInfo("en-US"), false, true, new string[]{"tf·cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.TonneForceMeter, new CultureInfo("en-US"), false, true, new string[]{"tf·m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.TonneForceMillimeter, new CultureInfo("en-US"), false, true, new string[]{"tf·mm"}); - } - /// /// Get unit abbreviation string. /// @@ -441,7 +410,7 @@ public static string GetAbbreviation(TorqueUnit unit, IFormatProvider? provider) /// /// /// - public static string[] GetAbbreviations(TorqueUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(TorqueUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.Torque"; var resourceManager = new ResourceManager(resourceName, typeof(Torque).Assembly); @@ -1283,7 +1252,7 @@ public Torque ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/TorquePerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/TorquePerLength.g.cs index 8687b48ca4..14a5c97463 100644 --- a/UnitsNet/GeneratedCode/Quantities/TorquePerLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TorquePerLength.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -353,34 +354,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(TorquePerLengthUnit.NewtonMeterPerMeter, TorquePerLengthUnit.TonneForceMillimeterPerMeter, quantity => quantity.ToUnit(TorquePerLengthUnit.TonneForceMillimeterPerMeter)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.KilogramForceCentimeterPerMeter, new CultureInfo("en-US"), false, true, new string[]{"kgf·cm/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.KilogramForceMeterPerMeter, new CultureInfo("en-US"), false, true, new string[]{"kgf·m/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.KilogramForceMillimeterPerMeter, new CultureInfo("en-US"), false, true, new string[]{"kgf·mm/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.KilonewtonCentimeterPerMeter, new CultureInfo("en-US"), false, true, new string[]{"kN·cm/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.KilonewtonMeterPerMeter, new CultureInfo("en-US"), false, true, new string[]{"kN·m/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.KilonewtonMeterPerMeter, new CultureInfo("ru-RU"), false, true, new string[]{"кН·м/м"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.KilonewtonMillimeterPerMeter, new CultureInfo("en-US"), false, true, new string[]{"kN·mm/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.KilopoundForceFootPerFoot, new CultureInfo("en-US"), false, true, new string[]{"kipf·ft/ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.KilopoundForceInchPerFoot, new CultureInfo("en-US"), false, true, new string[]{"kipf·in/ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.MeganewtonCentimeterPerMeter, new CultureInfo("en-US"), false, true, new string[]{"MN·cm/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.MeganewtonMeterPerMeter, new CultureInfo("en-US"), false, true, new string[]{"MN·m/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.MeganewtonMeterPerMeter, new CultureInfo("ru-RU"), false, true, new string[]{"МН·м/м"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.MeganewtonMillimeterPerMeter, new CultureInfo("en-US"), false, true, new string[]{"MN·mm/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.MegapoundForceFootPerFoot, new CultureInfo("en-US"), false, true, new string[]{"Mlbf·ft/ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.MegapoundForceInchPerFoot, new CultureInfo("en-US"), false, true, new string[]{"Mlbf·in/ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.NewtonCentimeterPerMeter, new CultureInfo("en-US"), false, true, new string[]{"N·cm/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.NewtonMeterPerMeter, new CultureInfo("en-US"), false, true, new string[]{"N·m/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.NewtonMeterPerMeter, new CultureInfo("ru-RU"), false, true, new string[]{"Н·м/м"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.NewtonMillimeterPerMeter, new CultureInfo("en-US"), false, true, new string[]{"N·mm/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.PoundForceFootPerFoot, new CultureInfo("en-US"), false, true, new string[]{"lbf·ft/ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.PoundForceInchPerFoot, new CultureInfo("en-US"), false, true, new string[]{"lbf·in/ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.TonneForceCentimeterPerMeter, new CultureInfo("en-US"), false, true, new string[]{"tf·cm/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.TonneForceMeterPerMeter, new CultureInfo("en-US"), false, true, new string[]{"tf·m/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.TonneForceMillimeterPerMeter, new CultureInfo("en-US"), false, true, new string[]{"tf·mm/m"}); - } - /// /// Get unit abbreviation string. /// @@ -405,7 +378,7 @@ public static string GetAbbreviation(TorquePerLengthUnit unit, IFormatProvider? /// /// /// - public static string[] GetAbbreviations(TorquePerLengthUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(TorquePerLengthUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.TorquePerLength"; var resourceManager = new ResourceManager(resourceName, typeof(TorquePerLength).Assembly); @@ -1199,7 +1172,7 @@ public TorquePerLength ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/Turbidity.g.cs b/UnitsNet/GeneratedCode/Quantities/Turbidity.g.cs index 72abd05b82..fde9235502 100644 --- a/UnitsNet/GeneratedCode/Quantities/Turbidity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Turbidity.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -196,11 +197,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) // Register in unit converter: BaseUnit -> TurbidityUnit } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(TurbidityUnit.NTU, new CultureInfo("en-US"), false, true, new string[]{"NTU"}); - } - /// /// Get unit abbreviation string. /// @@ -225,7 +221,7 @@ public static string GetAbbreviation(TurbidityUnit unit, IFormatProvider? provid /// /// /// - public static string[] GetAbbreviations(TurbidityUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(TurbidityUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.Turbidity"; var resourceManager = new ResourceManager(resourceName, typeof(Turbidity).Assembly); @@ -779,7 +775,7 @@ public Turbidity ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs b/UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs index 2c04d828d1..8d6d26c6b7 100644 --- a/UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -193,11 +194,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) // Register in unit converter: BaseUnit -> VitaminAUnit } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(VitaminAUnit.InternationalUnit, new CultureInfo("en-US"), false, true, new string[]{"IU"}); - } - /// /// Get unit abbreviation string. /// @@ -222,7 +218,7 @@ public static string GetAbbreviation(VitaminAUnit unit, IFormatProvider? provide /// /// /// - public static string[] GetAbbreviations(VitaminAUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(VitaminAUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.VitaminA"; var resourceManager = new ResourceManager(resourceName, typeof(VitaminA).Assembly); @@ -776,7 +772,7 @@ public VitaminA ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/Volume.g.cs b/UnitsNet/GeneratedCode/Quantities/Volume.g.cs index d0a5936816..b0c91b0338 100644 --- a/UnitsNet/GeneratedCode/Quantities/Volume.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Volume.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -609,111 +610,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(VolumeUnit.CubicMeter, VolumeUnit.UsTeaspoon, quantity => quantity.ToUnit(VolumeUnit.UsTeaspoon)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.AcreFoot, new CultureInfo("en-US"), false, true, new string[]{"ac-ft", "acre-foot", "acre-feet"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.AuTablespoon, new CultureInfo("en-US"), false, true, new string[]{""}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.AuTablespoon, new CultureInfo("ru-RU"), false, true, new string[]{""}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.AuTablespoon, new CultureInfo("nb-NO"), false, true, new string[]{""}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.BoardFoot, new CultureInfo("en-US"), false, true, new string[]{"bf", "board foot", "board feet"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.BoardFoot, new CultureInfo("fr-CA"), false, true, new string[]{"pmp", "pied-planche", "pied de planche"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.Centiliter, new CultureInfo("en-US"), false, true, new string[]{"cl"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.Centiliter, new CultureInfo("ru-RU"), false, true, new string[]{"сл"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicCentimeter, new CultureInfo("en-US"), false, true, new string[]{"cm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicCentimeter, new CultureInfo("ru-RU"), false, true, new string[]{"см³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicDecimeter, new CultureInfo("en-US"), false, true, new string[]{"dm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicDecimeter, new CultureInfo("ru-RU"), false, true, new string[]{"дм³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicFoot, new CultureInfo("en-US"), false, true, new string[]{"ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicFoot, new CultureInfo("ru-RU"), false, true, new string[]{"фут³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicHectometer, new CultureInfo("en-US"), false, true, new string[]{"hm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicHectometer, new CultureInfo("ru-RU"), false, true, new string[]{"гм³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicInch, new CultureInfo("en-US"), false, true, new string[]{"in³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicInch, new CultureInfo("ru-RU"), false, true, new string[]{"дюйм³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicKilometer, new CultureInfo("en-US"), false, true, new string[]{"km³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicKilometer, new CultureInfo("ru-RU"), false, true, new string[]{"км³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicMeter, new CultureInfo("en-US"), false, true, new string[]{"m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicMeter, new CultureInfo("ru-RU"), false, true, new string[]{"м³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicMicrometer, new CultureInfo("en-US"), false, true, new string[]{"µm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicMicrometer, new CultureInfo("ru-RU"), false, true, new string[]{"мкм³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicMile, new CultureInfo("en-US"), false, true, new string[]{"mi³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicMile, new CultureInfo("ru-RU"), false, true, new string[]{"миля³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicMillimeter, new CultureInfo("en-US"), false, true, new string[]{"mm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicMillimeter, new CultureInfo("ru-RU"), false, true, new string[]{"мм³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicYard, new CultureInfo("en-US"), false, true, new string[]{"yd³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicYard, new CultureInfo("ru-RU"), false, true, new string[]{"ярд³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.Decaliter, new CultureInfo("en-US"), false, true, new string[]{"dal"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.Decaliter, new CultureInfo("ru-RU"), false, true, new string[]{"дал"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.DecausGallon, new CultureInfo("en-US"), false, true, new string[]{"dagal (U.S.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.DecausGallon, new CultureInfo("ru-RU"), false, true, new string[]{"даАмериканский галлон"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.Deciliter, new CultureInfo("en-US"), false, true, new string[]{"dl"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.Deciliter, new CultureInfo("ru-RU"), false, true, new string[]{"дл"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.DeciusGallon, new CultureInfo("en-US"), false, true, new string[]{"dgal (U.S.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.DeciusGallon, new CultureInfo("ru-RU"), false, true, new string[]{"дАмериканский галлон"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.HectocubicFoot, new CultureInfo("en-US"), false, true, new string[]{"hft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.HectocubicFoot, new CultureInfo("ru-RU"), false, true, new string[]{"гфут³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.HectocubicMeter, new CultureInfo("en-US"), false, true, new string[]{"hm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.HectocubicMeter, new CultureInfo("ru-RU"), false, true, new string[]{"гм³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.Hectoliter, new CultureInfo("en-US"), false, true, new string[]{"hl"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.Hectoliter, new CultureInfo("ru-RU"), false, true, new string[]{"гл"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.HectousGallon, new CultureInfo("en-US"), false, true, new string[]{"hgal (U.S.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.HectousGallon, new CultureInfo("ru-RU"), false, true, new string[]{"гАмериканский галлон"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.ImperialBeerBarrel, new CultureInfo("en-US"), false, true, new string[]{"bl (imp.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.ImperialGallon, new CultureInfo("en-US"), false, true, new string[]{"gal (imp.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.ImperialGallon, new CultureInfo("ru-RU"), false, true, new string[]{"Английский галлон"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.ImperialOunce, new CultureInfo("en-US"), false, true, new string[]{"oz (imp.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.ImperialOunce, new CultureInfo("ru-RU"), false, true, new string[]{"Английская унция"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.ImperialPint, new CultureInfo("en-US"), false, true, new string[]{"pt (imp.)", "UK pt", "pt", "p"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.KilocubicFoot, new CultureInfo("en-US"), false, true, new string[]{"kft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.KilocubicFoot, new CultureInfo("ru-RU"), false, true, new string[]{"кфут³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.KilocubicMeter, new CultureInfo("en-US"), false, true, new string[]{"km³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.KilocubicMeter, new CultureInfo("ru-RU"), false, true, new string[]{"км³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.KiloimperialGallon, new CultureInfo("en-US"), false, true, new string[]{"kgal (imp.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.KiloimperialGallon, new CultureInfo("ru-RU"), false, true, new string[]{"кАнглийский галлон"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.Kiloliter, new CultureInfo("en-US"), false, true, new string[]{"kl"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.Kiloliter, new CultureInfo("ru-RU"), false, true, new string[]{"кл"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.KilousGallon, new CultureInfo("en-US"), false, true, new string[]{"kgal (U.S.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.KilousGallon, new CultureInfo("ru-RU"), false, true, new string[]{"кАмериканский галлон"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.Liter, new CultureInfo("en-US"), false, true, new string[]{"l"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.Liter, new CultureInfo("ru-RU"), false, true, new string[]{"л"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.MegacubicFoot, new CultureInfo("en-US"), false, true, new string[]{"Mft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.MegacubicFoot, new CultureInfo("ru-RU"), false, true, new string[]{"Мфут³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.MegaimperialGallon, new CultureInfo("en-US"), false, true, new string[]{"Mgal (imp.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.MegaimperialGallon, new CultureInfo("ru-RU"), false, true, new string[]{"МАнглийский галлон"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.Megaliter, new CultureInfo("en-US"), false, true, new string[]{"Ml"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.Megaliter, new CultureInfo("ru-RU"), false, true, new string[]{"Мл"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.MegausGallon, new CultureInfo("en-US"), false, true, new string[]{"Mgal (U.S.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.MegausGallon, new CultureInfo("ru-RU"), false, true, new string[]{"МАмериканский галлон"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.MetricCup, new CultureInfo("en-US"), false, true, new string[]{""}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.MetricTeaspoon, new CultureInfo("en-US"), false, true, new string[]{"tsp", "t", "ts", "tspn", "t.", "ts.", "tsp.", "tspn.", "teaspoon"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.MetricTeaspoon, new CultureInfo("ru-RU"), false, true, new string[]{""}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.MetricTeaspoon, new CultureInfo("nb-NO"), false, true, new string[]{""}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.Microliter, new CultureInfo("en-US"), false, true, new string[]{"µl"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.Microliter, new CultureInfo("ru-RU"), false, true, new string[]{"мкл"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.Milliliter, new CultureInfo("en-US"), false, true, new string[]{"ml"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.Milliliter, new CultureInfo("ru-RU"), false, true, new string[]{"мл"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.Nanoliter, new CultureInfo("en-US"), false, true, new string[]{"nl"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.Nanoliter, new CultureInfo("ru-RU"), false, true, new string[]{"нл"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.OilBarrel, new CultureInfo("en-US"), false, true, new string[]{"bbl"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.UkTablespoon, new CultureInfo("en-US"), false, true, new string[]{""}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.UkTablespoon, new CultureInfo("ru-RU"), false, true, new string[]{""}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.UkTablespoon, new CultureInfo("nb-NO"), false, true, new string[]{""}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.UsBeerBarrel, new CultureInfo("en-US"), false, true, new string[]{"bl (U.S.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.UsCustomaryCup, new CultureInfo("en-US"), false, true, new string[]{""}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.UsGallon, new CultureInfo("en-US"), false, true, new string[]{"gal (U.S.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.UsGallon, new CultureInfo("ru-RU"), false, true, new string[]{"Американский галлон"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.UsLegalCup, new CultureInfo("en-US"), false, true, new string[]{""}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.UsOunce, new CultureInfo("en-US"), false, true, new string[]{"oz (U.S.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.UsOunce, new CultureInfo("ru-RU"), false, true, new string[]{"Американская унция"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.UsPint, new CultureInfo("en-US"), false, true, new string[]{"pt (U.S.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.UsQuart, new CultureInfo("en-US"), false, true, new string[]{"qt (U.S.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.UsTablespoon, new CultureInfo("en-US"), false, true, new string[]{""}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.UsTablespoon, new CultureInfo("ru-RU"), false, true, new string[]{""}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.UsTablespoon, new CultureInfo("nb-NO"), false, true, new string[]{""}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.UsTeaspoon, new CultureInfo("en-US"), false, true, new string[]{""}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.UsTeaspoon, new CultureInfo("ru-RU"), false, true, new string[]{""}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.UsTeaspoon, new CultureInfo("nb-NO"), false, true, new string[]{""}); - } - /// /// Get unit abbreviation string. /// @@ -738,7 +634,7 @@ public static string GetAbbreviation(VolumeUnit unit, IFormatProvider? provider) /// /// /// - public static string[] GetAbbreviations(VolumeUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(VolumeUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.Volume"; var resourceManager = new ResourceManager(resourceName, typeof(Volume).Assembly); @@ -1916,7 +1812,7 @@ public Volume ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs index 180a090c18..bf9f756d2c 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -348,30 +349,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(VolumeConcentrationUnit.DecimalFraction, VolumeConcentrationUnit.PicolitersPerMililiter, quantity => quantity.ToUnit(VolumeConcentrationUnit.PicolitersPerMililiter)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeConcentrationUnit.CentilitersPerLiter, new CultureInfo("en-US"), false, true, new string[]{"cL/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeConcentrationUnit.CentilitersPerMililiter, new CultureInfo("en-US"), false, true, new string[]{"cL/mL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeConcentrationUnit.DecilitersPerLiter, new CultureInfo("en-US"), false, true, new string[]{"dL/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeConcentrationUnit.DecilitersPerMililiter, new CultureInfo("en-US"), false, true, new string[]{"dL/mL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeConcentrationUnit.DecimalFraction, new CultureInfo("en-US"), false, true, new string[]{""}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeConcentrationUnit.LitersPerLiter, new CultureInfo("en-US"), false, true, new string[]{"L/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeConcentrationUnit.LitersPerMililiter, new CultureInfo("en-US"), false, true, new string[]{"L/mL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeConcentrationUnit.MicrolitersPerLiter, new CultureInfo("en-US"), false, true, new string[]{"µL/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeConcentrationUnit.MicrolitersPerMililiter, new CultureInfo("en-US"), false, true, new string[]{"µL/mL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeConcentrationUnit.MillilitersPerLiter, new CultureInfo("en-US"), false, true, new string[]{"mL/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeConcentrationUnit.MillilitersPerMililiter, new CultureInfo("en-US"), false, true, new string[]{"mL/mL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeConcentrationUnit.NanolitersPerLiter, new CultureInfo("en-US"), false, true, new string[]{"nL/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeConcentrationUnit.NanolitersPerMililiter, new CultureInfo("en-US"), false, true, new string[]{"nL/mL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeConcentrationUnit.PartPerBillion, new CultureInfo("en-US"), false, true, new string[]{"ppb"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeConcentrationUnit.PartPerMillion, new CultureInfo("en-US"), false, true, new string[]{"ppm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeConcentrationUnit.PartPerThousand, new CultureInfo("en-US"), false, true, new string[]{"‰"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeConcentrationUnit.PartPerTrillion, new CultureInfo("en-US"), false, true, new string[]{"ppt"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeConcentrationUnit.Percent, new CultureInfo("en-US"), false, true, new string[]{"%", "% (v/v)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeConcentrationUnit.PicolitersPerLiter, new CultureInfo("en-US"), false, true, new string[]{"pL/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeConcentrationUnit.PicolitersPerMililiter, new CultureInfo("en-US"), false, true, new string[]{"pL/mL"}); - } - /// /// Get unit abbreviation string. /// @@ -396,7 +373,7 @@ public static string GetAbbreviation(VolumeConcentrationUnit unit, IFormatProvid /// /// /// - public static string[] GetAbbreviations(VolumeConcentrationUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(VolumeConcentrationUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.VolumeConcentration"; var resourceManager = new ResourceManager(resourceName, typeof(VolumeConcentration).Assembly); @@ -1178,7 +1155,7 @@ public VolumeConcentration ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs index 342b4e93dd..aeafca48fa 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -681,99 +682,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(VolumeFlowUnit.CubicMeterPerSecond, VolumeFlowUnit.UsGallonPerSecond, quantity => quantity.ToUnit(VolumeFlowUnit.UsGallonPerSecond)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.AcreFootPerDay, new CultureInfo("en-US"), false, true, new string[]{"af/d"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.AcreFootPerHour, new CultureInfo("en-US"), false, true, new string[]{"af/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.AcreFootPerMinute, new CultureInfo("en-US"), false, true, new string[]{"af/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.AcreFootPerSecond, new CultureInfo("en-US"), false, true, new string[]{"af/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CentiliterPerDay, new CultureInfo("en-US"), false, true, new string[]{"cl/day", "cL/d", "cLPD"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CentiliterPerHour, new CultureInfo("en-US"), false, true, new string[]{"cL/h", "cLPH"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CentiliterPerHour, new CultureInfo("ru-RU"), false, true, new string[]{"сл/ч"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CentiliterPerMinute, new CultureInfo("en-US"), false, true, new string[]{"cL/min", "cLPM"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CentiliterPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"сл/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CentiliterPerSecond, new CultureInfo("en-US"), false, true, new string[]{"cL/s", "cLPS"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CentiliterPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"сл/c"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CubicCentimeterPerMinute, new CultureInfo("en-US"), false, true, new string[]{"cm³/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CubicCentimeterPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"см³/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CubicDecimeterPerMinute, new CultureInfo("en-US"), false, true, new string[]{"dm³/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CubicDecimeterPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"дм³/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CubicFootPerHour, new CultureInfo("en-US"), false, true, new string[]{"ft³/h", "cf/hr"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CubicFootPerMinute, new CultureInfo("en-US"), false, true, new string[]{"ft³/min", "CFM"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CubicFootPerSecond, new CultureInfo("en-US"), false, true, new string[]{"ft³/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CubicMeterPerDay, new CultureInfo("en-US"), false, true, new string[]{"m³/d"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CubicMeterPerHour, new CultureInfo("en-US"), false, true, new string[]{"m³/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CubicMeterPerHour, new CultureInfo("ru-RU"), false, true, new string[]{"м³/ч"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CubicMeterPerMinute, new CultureInfo("en-US"), false, true, new string[]{"m³/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CubicMeterPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"м³/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CubicMeterPerSecond, new CultureInfo("en-US"), false, true, new string[]{"m³/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CubicMeterPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"м³/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CubicMillimeterPerSecond, new CultureInfo("en-US"), false, true, new string[]{"mm³/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CubicMillimeterPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"мм³/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CubicYardPerDay, new CultureInfo("en-US"), false, true, new string[]{"cy/day"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CubicYardPerHour, new CultureInfo("en-US"), false, true, new string[]{"yd³/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CubicYardPerMinute, new CultureInfo("en-US"), false, true, new string[]{"yd³/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CubicYardPerSecond, new CultureInfo("en-US"), false, true, new string[]{"yd³/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.DeciliterPerDay, new CultureInfo("en-US"), false, true, new string[]{"dl/day", "dL/d", "dLPD"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.DeciliterPerHour, new CultureInfo("en-US"), false, true, new string[]{"dL/h", "dLPH"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.DeciliterPerHour, new CultureInfo("ru-RU"), false, true, new string[]{"дл/ч"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.DeciliterPerMinute, new CultureInfo("en-US"), false, true, new string[]{"dL/min", "dLPM"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.DeciliterPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"дл/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.DeciliterPerSecond, new CultureInfo("en-US"), false, true, new string[]{"dL/s", "dLPS"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.DeciliterPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"дл/c"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.KiloliterPerDay, new CultureInfo("en-US"), false, true, new string[]{"kl/day", "kL/d", "kLPD"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.KiloliterPerHour, new CultureInfo("en-US"), false, true, new string[]{"kL/h", "kLPH"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.KiloliterPerHour, new CultureInfo("ru-RU"), false, true, new string[]{"кл/ч"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.KiloliterPerMinute, new CultureInfo("en-US"), false, true, new string[]{"kL/min", "kLPM"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.KiloliterPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"кл/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.KiloliterPerSecond, new CultureInfo("en-US"), false, true, new string[]{"kL/s", "kLPS"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.KiloliterPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"кл/c"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.KilousGallonPerMinute, new CultureInfo("en-US"), false, true, new string[]{"kgal (U.S.)/min", "KGPM"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.LiterPerDay, new CultureInfo("en-US"), false, true, new string[]{"l/day", "L/d", "LPD"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.LiterPerHour, new CultureInfo("en-US"), false, true, new string[]{"L/h", "LPH"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.LiterPerHour, new CultureInfo("ru-RU"), false, true, new string[]{"л/ч"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.LiterPerMinute, new CultureInfo("en-US"), false, true, new string[]{"L/min", "LPM"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.LiterPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"л/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.LiterPerSecond, new CultureInfo("en-US"), false, true, new string[]{"L/s", "LPS"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.LiterPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"л/c"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.MegaliterPerDay, new CultureInfo("en-US"), false, true, new string[]{"Ml/day", "ML/d", "MLPD"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.MegaukGallonPerSecond, new CultureInfo("en-US"), false, true, new string[]{"Mgal (imp.)/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.MicroliterPerDay, new CultureInfo("en-US"), false, true, new string[]{"µl/day", "µL/d", "µLPD"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.MicroliterPerHour, new CultureInfo("en-US"), false, true, new string[]{"µL/h", "µLPH"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.MicroliterPerHour, new CultureInfo("ru-RU"), false, true, new string[]{"мкл/ч"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.MicroliterPerMinute, new CultureInfo("en-US"), false, true, new string[]{"µL/min", "µLPM"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.MicroliterPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"мкл/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.MicroliterPerSecond, new CultureInfo("en-US"), false, true, new string[]{"µL/s", "µLPS"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.MicroliterPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"мкл/c"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.MilliliterPerDay, new CultureInfo("en-US"), false, true, new string[]{"ml/day", "mL/d", "mLPD"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.MilliliterPerHour, new CultureInfo("en-US"), false, true, new string[]{"mL/h", "mLPH"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.MilliliterPerHour, new CultureInfo("ru-RU"), false, true, new string[]{"мл/ч"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.MilliliterPerMinute, new CultureInfo("en-US"), false, true, new string[]{"mL/min", "mLPM"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.MilliliterPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"мл/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.MilliliterPerSecond, new CultureInfo("en-US"), false, true, new string[]{"mL/s", "mLPS"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.MilliliterPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"мл/c"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.MillionUsGallonPerDay, new CultureInfo("en-US"), false, true, new string[]{"MGD"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.NanoliterPerDay, new CultureInfo("en-US"), false, true, new string[]{"nl/day", "nL/d", "nLPD"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.NanoliterPerHour, new CultureInfo("en-US"), false, true, new string[]{"nL/h", "nLPH"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.NanoliterPerHour, new CultureInfo("ru-RU"), false, true, new string[]{"нл/ч"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.NanoliterPerMinute, new CultureInfo("en-US"), false, true, new string[]{"nL/min", "nLPM"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.NanoliterPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"нл/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.NanoliterPerSecond, new CultureInfo("en-US"), false, true, new string[]{"nL/s", "nLPS"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.NanoliterPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"нл/c"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.OilBarrelPerDay, new CultureInfo("en-US"), false, true, new string[]{"bbl/d", "BOPD"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.OilBarrelPerHour, new CultureInfo("en-US"), false, true, new string[]{"bbl/hr", "bph"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.OilBarrelPerMinute, new CultureInfo("en-US"), false, true, new string[]{"bbl/min", "bpm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.OilBarrelPerSecond, new CultureInfo("en-US"), false, true, new string[]{"bbl/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.UkGallonPerDay, new CultureInfo("en-US"), false, true, new string[]{"gal (U. K.)/d"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.UkGallonPerHour, new CultureInfo("en-US"), false, true, new string[]{"gal (imp.)/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.UkGallonPerMinute, new CultureInfo("en-US"), false, true, new string[]{"gal (imp.)/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.UkGallonPerSecond, new CultureInfo("en-US"), false, true, new string[]{"gal (imp.)/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.UsGallonPerDay, new CultureInfo("en-US"), false, true, new string[]{"gpd", "gal/d"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.UsGallonPerHour, new CultureInfo("en-US"), false, true, new string[]{"gal (U.S.)/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.UsGallonPerMinute, new CultureInfo("en-US"), false, true, new string[]{"gal (U.S.)/min", "GPM"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.UsGallonPerSecond, new CultureInfo("en-US"), false, true, new string[]{"gal (U.S.)/s"}); - } - /// /// Get unit abbreviation string. /// @@ -798,7 +706,7 @@ public static string GetAbbreviation(VolumeFlowUnit unit, IFormatProvider? provi /// /// /// - public static string[] GetAbbreviations(VolumeFlowUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(VolumeFlowUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.VolumeFlow"; var resourceManager = new ResourceManager(resourceName, typeof(VolumeFlow).Assembly); @@ -2084,7 +1992,7 @@ public VolumeFlow ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/VolumeFlowPerArea.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumeFlowPerArea.g.cs index ddb3d2e2b9..efd50b739f 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumeFlowPerArea.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumeFlowPerArea.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -201,12 +202,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(VolumeFlowPerAreaUnit.CubicMeterPerSecondPerSquareMeter, VolumeFlowPerAreaUnit.CubicFootPerMinutePerSquareFoot, quantity => quantity.ToUnit(VolumeFlowPerAreaUnit.CubicFootPerMinutePerSquareFoot)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowPerAreaUnit.CubicFootPerMinutePerSquareFoot, new CultureInfo("en-US"), false, true, new string[]{"CFM/ft²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowPerAreaUnit.CubicMeterPerSecondPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"m³/(s·m²)"}); - } - /// /// Get unit abbreviation string. /// @@ -231,7 +226,7 @@ public static string GetAbbreviation(VolumeFlowPerAreaUnit unit, IFormatProvider /// /// /// - public static string[] GetAbbreviations(VolumeFlowPerAreaUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(VolumeFlowPerAreaUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.VolumeFlowPerArea"; var resourceManager = new ResourceManager(resourceName, typeof(VolumeFlowPerArea).Assembly); @@ -797,7 +792,7 @@ public VolumeFlowPerArea ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs index ea175d4bd3..969a76a835 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -241,17 +242,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(VolumePerLengthUnit.CubicMeterPerMeter, VolumePerLengthUnit.OilBarrelPerFoot, quantity => quantity.ToUnit(VolumePerLengthUnit.OilBarrelPerFoot)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(VolumePerLengthUnit.CubicMeterPerMeter, new CultureInfo("en-US"), false, true, new string[]{"m³/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumePerLengthUnit.CubicYardPerFoot, new CultureInfo("en-US"), false, true, new string[]{"yd³/ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumePerLengthUnit.CubicYardPerUsSurveyFoot, new CultureInfo("en-US"), false, true, new string[]{"yd³/ftUS"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumePerLengthUnit.LiterPerKilometer, new CultureInfo("en-US"), false, true, new string[]{"l/km"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumePerLengthUnit.LiterPerMeter, new CultureInfo("en-US"), false, true, new string[]{"l/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumePerLengthUnit.LiterPerMillimeter, new CultureInfo("en-US"), false, true, new string[]{"l/mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumePerLengthUnit.OilBarrelPerFoot, new CultureInfo("en-US"), false, true, new string[]{"bbl/ft"}); - } - /// /// Get unit abbreviation string. /// @@ -276,7 +266,7 @@ public static string GetAbbreviation(VolumePerLengthUnit unit, IFormatProvider? /// /// /// - public static string[] GetAbbreviations(VolumePerLengthUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(VolumePerLengthUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.VolumePerLength"; var resourceManager = new ResourceManager(resourceName, typeof(VolumePerLength).Assembly); @@ -902,7 +892,7 @@ public VolumePerLength ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs index f6b3c4af39..e22384c43a 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -260,19 +261,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(VolumetricHeatCapacityUnit.JoulePerCubicMeterKelvin, VolumetricHeatCapacityUnit.MegajoulePerCubicMeterKelvin, quantity => quantity.ToUnit(VolumetricHeatCapacityUnit.MegajoulePerCubicMeterKelvin)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(VolumetricHeatCapacityUnit.BtuPerCubicFootDegreeFahrenheit, new CultureInfo("en-US"), false, true, new string[]{"BTU/ft³·°F"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumetricHeatCapacityUnit.CaloriePerCubicCentimeterDegreeCelsius, new CultureInfo("en-US"), false, true, new string[]{"cal/cm³·°C"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumetricHeatCapacityUnit.JoulePerCubicMeterDegreeCelsius, new CultureInfo("en-US"), false, true, new string[]{"J/m³·°C"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumetricHeatCapacityUnit.JoulePerCubicMeterKelvin, new CultureInfo("en-US"), false, true, new string[]{"J/m³·K"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumetricHeatCapacityUnit.KilocaloriePerCubicCentimeterDegreeCelsius, new CultureInfo("en-US"), false, true, new string[]{"kcal/cm³·°C"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumetricHeatCapacityUnit.KilojoulePerCubicMeterDegreeCelsius, new CultureInfo("en-US"), false, true, new string[]{"kJ/m³·°C"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumetricHeatCapacityUnit.KilojoulePerCubicMeterKelvin, new CultureInfo("en-US"), false, true, new string[]{"kJ/m³·K"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumetricHeatCapacityUnit.MegajoulePerCubicMeterDegreeCelsius, new CultureInfo("en-US"), false, true, new string[]{"MJ/m³·°C"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumetricHeatCapacityUnit.MegajoulePerCubicMeterKelvin, new CultureInfo("en-US"), false, true, new string[]{"MJ/m³·K"}); - } - /// /// Get unit abbreviation string. /// @@ -297,7 +285,7 @@ public static string GetAbbreviation(VolumetricHeatCapacityUnit unit, IFormatPro /// /// /// - public static string[] GetAbbreviations(VolumetricHeatCapacityUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(VolumetricHeatCapacityUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.VolumetricHeatCapacity"; var resourceManager = new ResourceManager(resourceName, typeof(VolumetricHeatCapacity).Assembly); @@ -947,7 +935,7 @@ public VolumetricHeatCapacity ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs b/UnitsNet/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs index 5933a02553..d74af46fe0 100644 --- a/UnitsNet/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs @@ -18,11 +18,12 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Runtime.Serialization; using System.Resources; +using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -233,16 +234,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(WarpingMomentOfInertiaUnit.MeterToTheSixth, WarpingMomentOfInertiaUnit.MillimeterToTheSixth, quantity => quantity.ToUnit(WarpingMomentOfInertiaUnit.MillimeterToTheSixth)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(WarpingMomentOfInertiaUnit.CentimeterToTheSixth, new CultureInfo("en-US"), false, true, new string[]{"cm⁶", "cm^6"}); - unitAbbreviationsCache.PerformAbbreviationMapping(WarpingMomentOfInertiaUnit.DecimeterToTheSixth, new CultureInfo("en-US"), false, true, new string[]{"dm⁶", "dm^6"}); - unitAbbreviationsCache.PerformAbbreviationMapping(WarpingMomentOfInertiaUnit.FootToTheSixth, new CultureInfo("en-US"), false, true, new string[]{"ft⁶", "ft^6"}); - unitAbbreviationsCache.PerformAbbreviationMapping(WarpingMomentOfInertiaUnit.InchToTheSixth, new CultureInfo("en-US"), false, true, new string[]{"in⁶", "in^6"}); - unitAbbreviationsCache.PerformAbbreviationMapping(WarpingMomentOfInertiaUnit.MeterToTheSixth, new CultureInfo("en-US"), false, true, new string[]{"m⁶", "m^6"}); - unitAbbreviationsCache.PerformAbbreviationMapping(WarpingMomentOfInertiaUnit.MillimeterToTheSixth, new CultureInfo("en-US"), false, true, new string[]{"mm⁶", "mm^6"}); - } - /// /// Get unit abbreviation string. /// @@ -267,7 +258,7 @@ public static string GetAbbreviation(WarpingMomentOfInertiaUnit unit, IFormatPro /// /// /// - public static string[] GetAbbreviations(WarpingMomentOfInertiaUnit unit, CultureInfo? culture = null) + public static IReadOnlyList GetAbbreviations(WarpingMomentOfInertiaUnit unit, CultureInfo? culture = null) { const string resourceName = $"UnitsNet.GeneratedCode.Resources.WarpingMomentOfInertia"; var resourceManager = new ResourceManager(resourceName, typeof(WarpingMomentOfInertia).Assembly); @@ -881,7 +872,7 @@ public WarpingMomentOfInertia ToUnit(UnitSystem unitSystem) #endregion /// - public string[] GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); #region ToString Methods diff --git a/UnitsNet/IQuantity.cs b/UnitsNet/IQuantity.cs index 933a2b83ed..9540a4a0d2 100644 --- a/UnitsNet/IQuantity.cs +++ b/UnitsNet/IQuantity.cs @@ -2,6 +2,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Generic; using System.Globalization; #if NET7_0_OR_GREATER using System.Numerics; @@ -122,7 +123,7 @@ public interface IQuantity : IQuantity /// /// /// - string[] GetAbbreviations(CultureInfo? culture = null); + IReadOnlyList GetAbbreviations(CultureInfo? culture = null); } /// diff --git a/UnitsNet/QuantityFormatter.cs b/UnitsNet/QuantityFormatter.cs index 7fe049ffc9..552d94ae67 100644 --- a/UnitsNet/QuantityFormatter.cs +++ b/UnitsNet/QuantityFormatter.cs @@ -149,7 +149,7 @@ private static string FormatUntrimmed(IQuantity quantity, case 'a': var abbreviations = quantity.GetAbbreviations((CultureInfo)formatProvider); - if (precisionSpecifier >= abbreviations.Length) + if (precisionSpecifier >= abbreviations.Count) throw new FormatException($"The {format} format string is invalid because the abbreviation index does not exist."); return abbreviations[precisionSpecifier]; From 954e3085ffcac214092b10589ee18543296eb341 Mon Sep 17 00:00:00 2001 From: Tristan Milnthorp Date: Wed, 1 Mar 2023 16:39:47 -0500 Subject: [PATCH 14/26] Switch UnitAbbreviationsCache implementation --- UnitsNet.Tests/CustomQuantities/HowMuch.cs | 4 + UnitsNet.Tests/DummyIQuantity.cs | 4 + UnitsNet/CustomCode/UnitAbbreviationsCache.cs | 118 ++++-------------- UnitsNet/CustomCode/UnitParser.cs | 42 +++---- .../CustomCode/UnitValueAbbreviationLookup.cs | 94 -------------- UnitsNet/IQuantity.cs | 12 +- 6 files changed, 55 insertions(+), 219 deletions(-) delete mode 100644 UnitsNet/CustomCode/UnitValueAbbreviationLookup.cs diff --git a/UnitsNet.Tests/CustomQuantities/HowMuch.cs b/UnitsNet.Tests/CustomQuantities/HowMuch.cs index bada53f7c8..de17dc855d 100644 --- a/UnitsNet.Tests/CustomQuantities/HowMuch.cs +++ b/UnitsNet.Tests/CustomQuantities/HowMuch.cs @@ -1,4 +1,6 @@ using System; +using System.Collections.Generic; +using System.Globalization; namespace UnitsNet.Tests.CustomQuantities { @@ -54,6 +56,8 @@ public IQuantity ToUnit(Enum unit) public string ToString(string? format, IFormatProvider? formatProvider) => $"HowMuch ({format}, {formatProvider})"; public string ToString(IFormatProvider? provider) => $"HowMuch ({provider})"; + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => Array.Empty(); + #endregion } } diff --git a/UnitsNet.Tests/DummyIQuantity.cs b/UnitsNet.Tests/DummyIQuantity.cs index bd9f57c2e7..ea586be0d6 100644 --- a/UnitsNet.Tests/DummyIQuantity.cs +++ b/UnitsNet.Tests/DummyIQuantity.cs @@ -1,5 +1,7 @@ #nullable enable using System; +using System.Collections.Generic; +using System.Globalization; namespace UnitsNet.Tests { @@ -26,5 +28,7 @@ internal class DummyIQuantity : IQuantity public IQuantity ToUnit(Enum unit ) => throw new NotImplementedException(); public IQuantity ToUnit(UnitSystem unitSystem ) => throw new NotImplementedException(); + + public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => throw new NotImplementedException(); } } diff --git a/UnitsNet/CustomCode/UnitAbbreviationsCache.cs b/UnitsNet/CustomCode/UnitAbbreviationsCache.cs index 1b72676542..a96e42044f 100644 --- a/UnitsNet/CustomCode/UnitAbbreviationsCache.cs +++ b/UnitsNet/CustomCode/UnitAbbreviationsCache.cs @@ -5,11 +5,8 @@ using System.Collections.Generic; using System.Globalization; using System.Linq; -using System.Reflection; using UnitsNet.Units; -using UnitTypeToLookup = System.Collections.Generic.Dictionary; - // ReSharper disable once CheckNamespace namespace UnitsNet { @@ -19,8 +16,6 @@ namespace UnitsNet /// public sealed class UnitAbbreviationsCache { - private readonly Dictionary _lookupsForCulture; - /// /// Fallback culture used by and /// if no abbreviations are found with a given culture. @@ -42,7 +37,6 @@ public sealed class UnitAbbreviationsCache /// public UnitAbbreviationsCache() { - _lookupsForCulture = new Dictionary(); } static UnitAbbreviationsCache() @@ -136,23 +130,7 @@ public void MapUnitToDefaultAbbreviation(Type unitType, int unitValue, IFormatPr internal void PerformAbbreviationMapping(Enum unitValue, IFormatProvider? formatProvider, bool setAsDefault, bool allowAbbreviationLookup, params string[] abbreviations) { - if (abbreviations == null) - throw new ArgumentNullException(nameof(abbreviations)); - - formatProvider ??= CultureInfo.CurrentCulture; - - if (!_lookupsForCulture.TryGetValue(formatProvider, out var quantitiesForProvider)) - quantitiesForProvider = _lookupsForCulture[formatProvider] = new UnitTypeToLookup(); - - var unitType = unitValue.GetType(); - if (!quantitiesForProvider.TryGetValue(unitType, out var unitToAbbreviations)) - unitToAbbreviations = quantitiesForProvider[unitType] = new UnitValueAbbreviationLookup(); - - var unitValueAsInt = Convert.ToInt32(unitValue); - foreach (var abbr in abbreviations) - { - unitToAbbreviations.Add(unitValueAsInt, abbr, setAsDefault, allowAbbreviationLookup); - } + throw new NotImplementedException(); } /// @@ -166,23 +144,7 @@ internal void PerformAbbreviationMapping(Enum unitValue, IFormatProvider? format public string GetDefaultAbbreviation(TUnitType unit, IFormatProvider? formatProvider = null) where TUnitType : Enum { var unitType = typeof(TUnitType); - - if (!TryGetUnitValueAbbreviationLookup(unitType, formatProvider, out var lookup)) - { - return !Equals(formatProvider, FallbackCulture) - ? GetDefaultAbbreviation(unit, FallbackCulture) - : throw new NotImplementedException($"No abbreviation is specified for {unitType.Name}.{unit}"); - } - - var abbreviations = lookup!.GetAbbreviationsForUnit(unit); - if (abbreviations.Count == 0) - { - return !Equals(formatProvider, FallbackCulture) - ? GetDefaultAbbreviation(unit, FallbackCulture) - : throw new NotImplementedException($"No abbreviation is specified for {unitType.Name}.{unit}"); - } - - return abbreviations.First(); + return GetDefaultAbbreviation(unitType, Convert.ToInt32(unit), formatProvider); } /// @@ -196,22 +158,8 @@ public string GetDefaultAbbreviation(TUnitType unit, IFormatProvider? /// The default unit abbreviation string. public string GetDefaultAbbreviation(Type unitType, int unitValue, IFormatProvider? formatProvider = null) { - if (!TryGetUnitValueAbbreviationLookup(unitType, formatProvider, out var lookup)) - { - return !Equals(formatProvider, FallbackCulture) - ? GetDefaultAbbreviation(unitType, unitValue, FallbackCulture) - : throw new NotImplementedException($"No abbreviation is specified for {unitType.Name} with numeric value {unitValue}."); - } - - var abbreviations = lookup!.GetAbbreviationsForUnit(unitValue); - if (abbreviations.Count == 0) - { - return !Equals(formatProvider, FallbackCulture) - ? GetDefaultAbbreviation(unitType, unitValue, FallbackCulture) - : throw new NotImplementedException($"No abbreviation is specified for {unitType.Name} with numeric value {unitValue}."); - } - - return abbreviations.First(); + var abbreviations = GetUnitAbbreviations(unitType, unitValue, formatProvider); + return abbreviations[0]; } /// @@ -235,24 +183,10 @@ public string[] GetUnitAbbreviations(TUnitType unit, IFormatProvider? /// Unit abbreviations associated with unit. public string[] GetUnitAbbreviations(Type unitType, int unitValue, IFormatProvider? formatProvider = null) { - formatProvider ??= CultureInfo.CurrentCulture; - - if (!TryGetUnitValueAbbreviationLookup(unitType, formatProvider, out var lookup)) - { - return !Equals(formatProvider, FallbackCulture) - ? GetUnitAbbreviations(unitType, unitValue, FallbackCulture) - : new string[] { }; - } - - var abbreviations = lookup!.GetAbbreviationsForUnit(unitValue); - if (abbreviations.Count == 0) - { - return !Equals(formatProvider, FallbackCulture) - ? GetUnitAbbreviations(unitType, unitValue, FallbackCulture) - : new string[] { }; - } - - return abbreviations.ToArray(); + var name = Enum.GetName(unitType, unitValue); + var enumInstance = (Enum)Enum.Parse(unitType, name!); + var quantity = Quantity.From(0.0, enumInstance); + return quantity.GetAbbreviations(formatProvider as CultureInfo).ToArray(); } /// @@ -263,37 +197,27 @@ public string[] GetUnitAbbreviations(Type unitType, int unitValue, IFormatProvid /// Unit abbreviations associated with unit. public IReadOnlyList GetAllUnitAbbreviationsForQuantity(Type unitEnumType, IFormatProvider? formatProvider = null) { - formatProvider ??= CultureInfo.CurrentCulture; - - if (!TryGetUnitValueAbbreviationLookup(unitEnumType, formatProvider, out var lookup)) - { - return !Equals(formatProvider, FallbackCulture) - ? GetAllUnitAbbreviationsForQuantity(unitEnumType, FallbackCulture) - : new string[] { }; - } - - return lookup!.GetAllUnitAbbreviationsForQuantity(); + var enumValues = Enum.GetValues(unitEnumType).Cast(); + var all = GetStringUnitPairs(enumValues, formatProvider); + return all.Select(pair => pair.Item1).ToList(); } - internal bool TryGetUnitValueAbbreviationLookup(Type unitType, IFormatProvider? formatProvider, out UnitValueAbbreviationLookup? unitToAbbreviations) + internal List<(string Abbreviation, Enum Unit)> GetStringUnitPairs(IEnumerable enumValues, IFormatProvider? formatProvider = null) { - unitToAbbreviations = null; - - formatProvider ??= CultureInfo.CurrentCulture; + var ret = new List<(string, Enum)>(); - if (!_lookupsForCulture.TryGetValue(formatProvider, out UnitTypeToLookup? quantitiesForProvider)) + foreach(var enumValue in enumValues) { - return !Equals(formatProvider, FallbackCulture) && - TryGetUnitValueAbbreviationLookup(unitType, FallbackCulture, out unitToAbbreviations); - } + var quantity = Quantity.From(0.0, enumValue); + var abbreviations = quantity.GetAbbreviations(formatProvider as CultureInfo); - if (!quantitiesForProvider.TryGetValue(unitType, out unitToAbbreviations)) - { - return !Equals(formatProvider, FallbackCulture) && - TryGetUnitValueAbbreviationLookup(unitType, FallbackCulture, out unitToAbbreviations); + foreach(var abbrev in abbreviations) + { + ret.Add((abbrev, enumValue)); + } } - return true; + return ret; } } } diff --git a/UnitsNet/CustomCode/UnitParser.cs b/UnitsNet/CustomCode/UnitParser.cs index 66cd8287d0..142ea9273e 100644 --- a/UnitsNet/CustomCode/UnitParser.cs +++ b/UnitsNet/CustomCode/UnitParser.cs @@ -70,35 +70,34 @@ public Enum Parse(string? unitAbbreviation, Type unitType, IFormatProvider? form if (unitAbbreviation == null) throw new ArgumentNullException(nameof(unitAbbreviation)); unitAbbreviation = unitAbbreviation.Trim(); - if (!_unitAbbreviationsCache.TryGetUnitValueAbbreviationLookup(unitType, formatProvider, out var abbreviations)) - throw new UnitNotFoundException($"No abbreviations defined for unit type [{unitType}] for culture [{formatProvider}]."); + var enumValues = Enum.GetValues(unitType).Cast(); + var stringUnitPairs = _unitAbbreviationsCache.GetStringUnitPairs(enumValues, formatProvider); + var matches = stringUnitPairs.Where(pair => pair.Item1.Equals(unitAbbreviation, StringComparison.OrdinalIgnoreCase)).ToArray(); - var unitIntValues = abbreviations!.GetUnitsForAbbreviation(unitAbbreviation, ignoreCase: true); - - if (unitIntValues.Count == 0) + if(matches.Length == 0) { unitAbbreviation = NormalizeUnitString(unitAbbreviation); - unitIntValues = abbreviations.GetUnitsForAbbreviation(unitAbbreviation, ignoreCase: true); + matches = stringUnitPairs.Where(pair => pair.Item1.Equals(unitAbbreviation, StringComparison.OrdinalIgnoreCase)).ToArray(); } // Narrow the search if too many hits, for example Megabar "Mbar" and Millibar "mbar" need to be distinguished - if (unitIntValues.Count > 1) - unitIntValues = abbreviations.GetUnitsForAbbreviation(unitAbbreviation, ignoreCase: false); + if(matches.Length > 1) + matches = stringUnitPairs.Where(pair => pair.Item1.Equals(unitAbbreviation)).ToArray(); - switch (unitIntValues.Count) + switch(matches.Length) { case 1: - return (Enum) Enum.ToObject(unitType, unitIntValues[0]); + return (Enum)Enum.ToObject(unitType, matches[0].Unit); case 0: // Retry with fallback culture, if different. - if (!Equals(formatProvider, UnitAbbreviationsCache.FallbackCulture)) + if(!Equals(formatProvider, UnitAbbreviationsCache.FallbackCulture)) { return Parse(unitAbbreviation, unitType, UnitAbbreviationsCache.FallbackCulture); } throw new UnitNotFoundException($"Unit not found with abbreviation [{unitAbbreviation}] for unit type [{unitType}]."); default: - string unitsCsv = string.Join(", ", unitIntValues.Select(x => Enum.GetName(unitType, x)).ToArray()); + string unitsCsv = string.Join(", ", matches.Select(x => Enum.GetName(unitType, x.Unit)).ToArray()); throw new AmbiguousUnitParseException( $"Cannot parse \"{unitAbbreviation}\" since it could be either of these: {unitsCsv}"); } @@ -197,25 +196,24 @@ public bool TryParse(string? unitAbbreviation, Type unitType, IFormatProvider? f unitAbbreviation = unitAbbreviation.Trim(); unit = default; - if (!_unitAbbreviationsCache.TryGetUnitValueAbbreviationLookup(unitType, formatProvider, out var abbreviations)) - return false; - - var unitIntValues = abbreviations!.GetUnitsForAbbreviation(unitAbbreviation, ignoreCase: true); + var enumValues = Enum.GetValues(unitType).Cast(); + var stringUnitPairs = _unitAbbreviationsCache.GetStringUnitPairs(enumValues, formatProvider); + var matches = stringUnitPairs.Where(pair => pair.Item1.Equals(unitAbbreviation, StringComparison.OrdinalIgnoreCase)).ToArray(); - if (unitIntValues.Count == 0) + if(matches.Length == 0) { unitAbbreviation = NormalizeUnitString(unitAbbreviation); - unitIntValues = abbreviations.GetUnitsForAbbreviation(unitAbbreviation, ignoreCase: true); + matches = stringUnitPairs.Where(pair => pair.Item1.Equals(unitAbbreviation, StringComparison.OrdinalIgnoreCase)).ToArray(); } // Narrow the search if too many hits, for example Megabar "Mbar" and Millibar "mbar" need to be distinguished - if (unitIntValues.Count > 1) - unitIntValues = abbreviations.GetUnitsForAbbreviation(unitAbbreviation, ignoreCase: false); + if(matches.Length > 1) + matches = stringUnitPairs.Where(pair => pair.Item1.Equals(unitAbbreviation)).ToArray(); - if (unitIntValues.Count != 1) + if(matches.Length != 1) return false; - unit = (Enum)Enum.ToObject(unitType, unitIntValues[0]); + unit = (Enum)Enum.ToObject(unitType, matches[ 0 ].Unit); return true; } } diff --git a/UnitsNet/CustomCode/UnitValueAbbreviationLookup.cs b/UnitsNet/CustomCode/UnitValueAbbreviationLookup.cs deleted file mode 100644 index d303658682..0000000000 --- a/UnitsNet/CustomCode/UnitValueAbbreviationLookup.cs +++ /dev/null @@ -1,94 +0,0 @@ -// Licensed under MIT No Attribution, see LICENSE file at the root. -// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. - -using System; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Linq; - -namespace UnitsNet -{ - internal class UnitToAbbreviationMap : ConcurrentDictionary> { } - internal class AbbreviationToUnitMap : ConcurrentDictionary> { } - - internal class UnitValueAbbreviationLookup - { - private readonly UnitToAbbreviationMap _unitToAbbreviationMap = new(); - private readonly AbbreviationToUnitMap _abbreviationToUnitMap = new(); - private readonly AbbreviationToUnitMap _lowerCaseAbbreviationToUnitMap = new(); - private Lazy _allUnitAbbreviationsLazy; - private readonly object _syncRoot = new(); - - public UnitValueAbbreviationLookup() - { - _allUnitAbbreviationsLazy = new Lazy(ComputeAllUnitAbbreviationsValue); - } - - internal IReadOnlyList GetAllUnitAbbreviationsForQuantity() - { - return _allUnitAbbreviationsLazy.Value; - } - - internal IReadOnlyList GetAbbreviationsForUnit(TUnitType unit) where TUnitType : Enum - { - return GetAbbreviationsForUnit(Convert.ToInt32(unit)); - } - - internal IReadOnlyList GetAbbreviationsForUnit(int unit) - { - if (!_unitToAbbreviationMap.TryGetValue(unit, out var abbreviations)) - return new List(0); - - return abbreviations.ToList(); - } - - internal IReadOnlyList GetUnitsForAbbreviation(string abbreviation, bool ignoreCase) - { - var lowerCaseAbbreviation = abbreviation.ToLower(); - var key = ignoreCase ? lowerCaseAbbreviation : abbreviation; - var map = ignoreCase ? _lowerCaseAbbreviationToUnitMap : _abbreviationToUnitMap; - - if (!map.TryGetValue(key, out IReadOnlyList? units)) - return new List(0); - - return units.ToList(); - } - - internal void Add(int unit, string abbreviation, bool setAsDefault = false, bool allowAbbreviationLookup = true) - { - // Restrict concurrency on writes. - // By using ConcurrencyDictionary and immutable IReadOnlyList instances, we don't need to lock on reads. - lock (_syncRoot) - { - var lowerCaseAbbreviation = abbreviation.ToLower(); - - if (allowAbbreviationLookup) - { - _abbreviationToUnitMap.AddOrUpdate(abbreviation, - addValueFactory: _ => new List { unit }, - updateValueFactory: (_, existing) => existing.Append(unit).Distinct().ToList()); - - _lowerCaseAbbreviationToUnitMap.AddOrUpdate(lowerCaseAbbreviation, - addValueFactory: _ => new List { unit }, - updateValueFactory: (_, existing) => existing.Append(unit).Distinct().ToList()); - } - - _unitToAbbreviationMap.AddOrUpdate(unit, - addValueFactory: _ => new List { abbreviation }, - updateValueFactory: (_, existing) => - { - return setAsDefault - ? existing.Where(x => x != abbreviation).Prepend(abbreviation).ToList() - : existing.Where(x => x != abbreviation).Append(abbreviation).ToList(); - }); - - _allUnitAbbreviationsLazy = new Lazy(ComputeAllUnitAbbreviationsValue); - } - } - - private string[] ComputeAllUnitAbbreviationsValue() - { - return _unitToAbbreviationMap.Values.SelectMany(abbreviations => abbreviations).Distinct().ToArray(); - } - } -} diff --git a/UnitsNet/IQuantity.cs b/UnitsNet/IQuantity.cs index 9540a4a0d2..f53358e3f0 100644 --- a/UnitsNet/IQuantity.cs +++ b/UnitsNet/IQuantity.cs @@ -77,6 +77,12 @@ public interface IQuantity : IFormattable /// String representation. /// Format to use for localization and number formatting. Defaults to if null. string ToString(IFormatProvider? provider); + + /// + /// + /// + /// + IReadOnlyList GetAbbreviations(CultureInfo? culture = null); } /// @@ -118,12 +124,6 @@ public interface IQuantity : IQuantity /// The to convert the quantity to. /// A new quantity with the determined unit. new IQuantity ToUnit(UnitSystem unitSystem); - - /// - /// - /// - /// - IReadOnlyList GetAbbreviations(CultureInfo? culture = null); } /// From b91a9ab39e00173a44f85b69bd9c4e48962a7562 Mon Sep 17 00:00:00 2001 From: Tristan Milnthorp Date: Wed, 1 Mar 2023 17:07:26 -0500 Subject: [PATCH 15/26] Handle no abbreviations --- UnitsNet/CustomCode/UnitAbbreviationsCache.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UnitsNet/CustomCode/UnitAbbreviationsCache.cs b/UnitsNet/CustomCode/UnitAbbreviationsCache.cs index a96e42044f..5e2c84b0f9 100644 --- a/UnitsNet/CustomCode/UnitAbbreviationsCache.cs +++ b/UnitsNet/CustomCode/UnitAbbreviationsCache.cs @@ -159,7 +159,7 @@ public string GetDefaultAbbreviation(TUnitType unit, IFormatProvider? public string GetDefaultAbbreviation(Type unitType, int unitValue, IFormatProvider? formatProvider = null) { var abbreviations = GetUnitAbbreviations(unitType, unitValue, formatProvider); - return abbreviations[0]; + return abbreviations.Length > 0 ? abbreviations[0] : string.Empty; } /// From 22889e01bdd519fe4d61cbe5c9cec2c13752d893 Mon Sep 17 00:00:00 2001 From: Tristan Milnthorp Date: Wed, 1 Mar 2023 17:11:25 -0500 Subject: [PATCH 16/26] Handle custom unit invalid --- UnitsNet/CustomCode/UnitAbbreviationsCache.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/UnitsNet/CustomCode/UnitAbbreviationsCache.cs b/UnitsNet/CustomCode/UnitAbbreviationsCache.cs index 5e2c84b0f9..6ef0823892 100644 --- a/UnitsNet/CustomCode/UnitAbbreviationsCache.cs +++ b/UnitsNet/CustomCode/UnitAbbreviationsCache.cs @@ -185,7 +185,10 @@ public string[] GetUnitAbbreviations(Type unitType, int unitValue, IFormatProvid { var name = Enum.GetName(unitType, unitValue); var enumInstance = (Enum)Enum.Parse(unitType, name!); - var quantity = Quantity.From(0.0, enumInstance); + + if(!Quantity.TryFrom(0.0, enumInstance, out var quantity)) + throw new NotImplementedException($"No abbreviation is specified for {unitType.Name} with numeric value {unitValue}."); + return quantity.GetAbbreviations(formatProvider as CultureInfo).ToArray(); } From a986b7b53c0b4648a28d74250fad2162a96c2834 Mon Sep 17 00:00:00 2001 From: Tristan Milnthorp Date: Thu, 2 Mar 2023 09:54:07 -0500 Subject: [PATCH 17/26] Expose Abbreviations and lazily load via resources --- .../UnitsNetGen/QuantityGenerator.cs | 29 ++++++++++++++----- .../Quantities/Acceleration.g.cs | 28 +++++++++++++----- .../Quantities/AmountOfSubstance.g.cs | 28 +++++++++++++----- .../Quantities/AmplitudeRatio.g.cs | 28 +++++++++++++----- UnitsNet/GeneratedCode/Quantities/Angle.g.cs | 28 +++++++++++++----- .../Quantities/ApparentEnergy.g.cs | 28 +++++++++++++----- .../Quantities/ApparentPower.g.cs | 28 +++++++++++++----- UnitsNet/GeneratedCode/Quantities/Area.g.cs | 28 +++++++++++++----- .../GeneratedCode/Quantities/AreaDensity.g.cs | 28 +++++++++++++----- .../Quantities/AreaMomentOfInertia.g.cs | 28 +++++++++++++----- .../GeneratedCode/Quantities/BitRate.g.cs | 28 +++++++++++++----- .../BrakeSpecificFuelConsumption.g.cs | 28 +++++++++++++----- .../GeneratedCode/Quantities/Capacitance.g.cs | 28 +++++++++++++----- .../CoefficientOfThermalExpansion.g.cs | 28 +++++++++++++----- .../Quantities/Compressibility.g.cs | 28 +++++++++++++----- .../GeneratedCode/Quantities/Density.g.cs | 28 +++++++++++++----- .../GeneratedCode/Quantities/Duration.g.cs | 28 +++++++++++++----- .../Quantities/DynamicViscosity.g.cs | 28 +++++++++++++----- .../Quantities/ElectricAdmittance.g.cs | 28 +++++++++++++----- .../Quantities/ElectricCharge.g.cs | 28 +++++++++++++----- .../Quantities/ElectricChargeDensity.g.cs | 28 +++++++++++++----- .../Quantities/ElectricConductance.g.cs | 28 +++++++++++++----- .../Quantities/ElectricConductivity.g.cs | 28 +++++++++++++----- .../Quantities/ElectricCurrent.g.cs | 28 +++++++++++++----- .../Quantities/ElectricCurrentDensity.g.cs | 28 +++++++++++++----- .../Quantities/ElectricCurrentGradient.g.cs | 28 +++++++++++++----- .../Quantities/ElectricField.g.cs | 28 +++++++++++++----- .../Quantities/ElectricInductance.g.cs | 28 +++++++++++++----- .../Quantities/ElectricPotential.g.cs | 28 +++++++++++++----- .../Quantities/ElectricPotentialAc.g.cs | 28 +++++++++++++----- .../ElectricPotentialChangeRate.g.cs | 28 +++++++++++++----- .../Quantities/ElectricPotentialDc.g.cs | 28 +++++++++++++----- .../Quantities/ElectricResistance.g.cs | 28 +++++++++++++----- .../Quantities/ElectricResistivity.g.cs | 28 +++++++++++++----- .../ElectricSurfaceChargeDensity.g.cs | 28 +++++++++++++----- UnitsNet/GeneratedCode/Quantities/Energy.g.cs | 28 +++++++++++++----- .../Quantities/EnergyDensity.g.cs | 28 +++++++++++++----- .../GeneratedCode/Quantities/Entropy.g.cs | 28 +++++++++++++----- UnitsNet/GeneratedCode/Quantities/Force.g.cs | 28 +++++++++++++----- .../Quantities/ForceChangeRate.g.cs | 28 +++++++++++++----- .../Quantities/ForcePerLength.g.cs | 28 +++++++++++++----- .../GeneratedCode/Quantities/Frequency.g.cs | 28 +++++++++++++----- .../Quantities/FuelEfficiency.g.cs | 28 +++++++++++++----- .../GeneratedCode/Quantities/HeatFlux.g.cs | 28 +++++++++++++----- .../Quantities/HeatTransferCoefficient.g.cs | 28 +++++++++++++----- .../GeneratedCode/Quantities/Illuminance.g.cs | 28 +++++++++++++----- .../GeneratedCode/Quantities/Impulse.g.cs | 28 +++++++++++++----- .../GeneratedCode/Quantities/Information.g.cs | 28 +++++++++++++----- .../GeneratedCode/Quantities/Irradiance.g.cs | 28 +++++++++++++----- .../GeneratedCode/Quantities/Irradiation.g.cs | 28 +++++++++++++----- UnitsNet/GeneratedCode/Quantities/Jerk.g.cs | 28 +++++++++++++----- .../Quantities/KinematicViscosity.g.cs | 28 +++++++++++++----- UnitsNet/GeneratedCode/Quantities/Length.g.cs | 28 +++++++++++++----- UnitsNet/GeneratedCode/Quantities/Level.g.cs | 28 +++++++++++++----- .../Quantities/LinearDensity.g.cs | 28 +++++++++++++----- .../Quantities/LinearPowerDensity.g.cs | 28 +++++++++++++----- .../GeneratedCode/Quantities/Luminance.g.cs | 28 +++++++++++++----- .../GeneratedCode/Quantities/Luminosity.g.cs | 28 +++++++++++++----- .../Quantities/LuminousFlux.g.cs | 28 +++++++++++++----- .../Quantities/LuminousIntensity.g.cs | 28 +++++++++++++----- .../Quantities/MagneticField.g.cs | 28 +++++++++++++----- .../Quantities/MagneticFlux.g.cs | 28 +++++++++++++----- .../Quantities/Magnetization.g.cs | 28 +++++++++++++----- UnitsNet/GeneratedCode/Quantities/Mass.g.cs | 28 +++++++++++++----- .../Quantities/MassConcentration.g.cs | 28 +++++++++++++----- .../GeneratedCode/Quantities/MassFlow.g.cs | 28 +++++++++++++----- .../GeneratedCode/Quantities/MassFlux.g.cs | 28 +++++++++++++----- .../Quantities/MassFraction.g.cs | 28 +++++++++++++----- .../Quantities/MassMomentOfInertia.g.cs | 28 +++++++++++++----- .../GeneratedCode/Quantities/MolarEnergy.g.cs | 28 +++++++++++++----- .../Quantities/MolarEntropy.g.cs | 28 +++++++++++++----- .../GeneratedCode/Quantities/MolarFlow.g.cs | 28 +++++++++++++----- .../GeneratedCode/Quantities/MolarMass.g.cs | 28 +++++++++++++----- .../GeneratedCode/Quantities/Molarity.g.cs | 28 +++++++++++++----- .../Quantities/Permeability.g.cs | 28 +++++++++++++----- .../Quantities/Permittivity.g.cs | 28 +++++++++++++----- .../Quantities/PorousMediumPermeability.g.cs | 28 +++++++++++++----- UnitsNet/GeneratedCode/Quantities/Power.g.cs | 28 +++++++++++++----- .../Quantities/PowerDensity.g.cs | 28 +++++++++++++----- .../GeneratedCode/Quantities/PowerRatio.g.cs | 28 +++++++++++++----- .../GeneratedCode/Quantities/Pressure.g.cs | 28 +++++++++++++----- .../Quantities/PressureChangeRate.g.cs | 28 +++++++++++++----- UnitsNet/GeneratedCode/Quantities/Ratio.g.cs | 28 +++++++++++++----- .../Quantities/RatioChangeRate.g.cs | 28 +++++++++++++----- .../Quantities/ReactiveEnergy.g.cs | 28 +++++++++++++----- .../Quantities/ReactivePower.g.cs | 28 +++++++++++++----- .../Quantities/ReciprocalArea.g.cs | 28 +++++++++++++----- .../Quantities/ReciprocalLength.g.cs | 28 +++++++++++++----- .../Quantities/RelativeHumidity.g.cs | 28 +++++++++++++----- .../Quantities/RotationalAcceleration.g.cs | 28 +++++++++++++----- .../Quantities/RotationalSpeed.g.cs | 28 +++++++++++++----- .../Quantities/RotationalStiffness.g.cs | 28 +++++++++++++----- .../RotationalStiffnessPerLength.g.cs | 28 +++++++++++++----- UnitsNet/GeneratedCode/Quantities/Scalar.g.cs | 28 +++++++++++++----- .../GeneratedCode/Quantities/SolidAngle.g.cs | 28 +++++++++++++----- .../Quantities/SpecificEnergy.g.cs | 28 +++++++++++++----- .../Quantities/SpecificEntropy.g.cs | 28 +++++++++++++----- .../Quantities/SpecificFuelConsumption.g.cs | 28 +++++++++++++----- .../Quantities/SpecificVolume.g.cs | 28 +++++++++++++----- .../Quantities/SpecificWeight.g.cs | 28 +++++++++++++----- UnitsNet/GeneratedCode/Quantities/Speed.g.cs | 28 +++++++++++++----- .../Quantities/StandardVolumeFlow.g.cs | 28 +++++++++++++----- .../GeneratedCode/Quantities/Temperature.g.cs | 28 +++++++++++++----- .../Quantities/TemperatureChangeRate.g.cs | 28 +++++++++++++----- .../Quantities/TemperatureDelta.g.cs | 28 +++++++++++++----- .../Quantities/TemperatureGradient.g.cs | 28 +++++++++++++----- .../Quantities/ThermalConductivity.g.cs | 28 +++++++++++++----- .../Quantities/ThermalResistance.g.cs | 28 +++++++++++++----- UnitsNet/GeneratedCode/Quantities/Torque.g.cs | 28 +++++++++++++----- .../Quantities/TorquePerLength.g.cs | 28 +++++++++++++----- .../GeneratedCode/Quantities/Turbidity.g.cs | 28 +++++++++++++----- .../GeneratedCode/Quantities/VitaminA.g.cs | 28 +++++++++++++----- UnitsNet/GeneratedCode/Quantities/Volume.g.cs | 28 +++++++++++++----- .../Quantities/VolumeConcentration.g.cs | 28 +++++++++++++----- .../GeneratedCode/Quantities/VolumeFlow.g.cs | 28 +++++++++++++----- .../Quantities/VolumeFlowPerArea.g.cs | 28 +++++++++++++----- .../Quantities/VolumePerLength.g.cs | 28 +++++++++++++----- .../Quantities/VolumetricHeatCapacity.g.cs | 28 +++++++++++++----- .../Quantities/WarpingMomentOfInertia.g.cs | 28 +++++++++++++----- 119 files changed, 2500 insertions(+), 833 deletions(-) diff --git a/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs b/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs index bd3d8b22f0..9b8560790d 100644 --- a/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs +++ b/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs @@ -164,6 +164,8 @@ private void GenerateStaticConstructor() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, {_unitEnumName} Unit), List>(); }} "); } @@ -258,6 +260,12 @@ private void GenerateStaticProperties() } Writer.WL($@" + + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, {_unitEnumName} Unit), List> Abbreviations {{ get; }} + #endregion "); } @@ -387,15 +395,22 @@ public static string GetAbbreviation({_unitEnumName} unit, IFormatProvider? prov /// public static IReadOnlyList GetAbbreviations({_unitEnumName} unit, CultureInfo? culture = null) {{ - const string resourceName = $""UnitsNet.GeneratedCode.Resources.{_quantity.Name}""; - var resourceManager = new ResourceManager(resourceName, typeof({_quantity.Name}).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + {{ + abbreviations = new List(); + const string resourceName = $""UnitsNet.GeneratedCode.Resources.{_quantity.Name}""; + var resourceManager = new ResourceManager(resourceName, typeof({_quantity.Name}).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + }} + + return abbreviations; }} #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs b/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs index 8b3f6639ba..9f16f3ef3e 100644 --- a/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs @@ -86,6 +86,8 @@ static Acceleration() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, AccelerationUnit Unit), List>(); } /// @@ -152,6 +154,11 @@ public Acceleration(double value, UnitSystem unitSystem) /// public static Acceleration AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, AccelerationUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -324,15 +331,22 @@ public static string GetAbbreviation(AccelerationUnit unit, IFormatProvider? pro /// public static IReadOnlyList GetAbbreviations(AccelerationUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Acceleration"; - var resourceManager = new ResourceManager(resourceName, typeof(Acceleration).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Acceleration"; + var resourceManager = new ResourceManager(resourceName, typeof(Acceleration).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs index a2ba297337..3d46668d05 100644 --- a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs @@ -87,6 +87,8 @@ static AmountOfSubstance() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, AmountOfSubstanceUnit Unit), List>(); } /// @@ -153,6 +155,11 @@ public AmountOfSubstance(double value, UnitSystem unitSystem) /// public static AmountOfSubstance AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, AmountOfSubstanceUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -332,15 +339,22 @@ public static string GetAbbreviation(AmountOfSubstanceUnit unit, IFormatProvider /// public static IReadOnlyList GetAbbreviations(AmountOfSubstanceUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.AmountOfSubstance"; - var resourceManager = new ResourceManager(resourceName, typeof(AmountOfSubstance).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.AmountOfSubstance"; + var resourceManager = new ResourceManager(resourceName, typeof(AmountOfSubstance).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs b/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs index 11018b19ba..1af79bc552 100644 --- a/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs @@ -76,6 +76,8 @@ static AmplitudeRatio() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, AmplitudeRatioUnit Unit), List>(); } /// @@ -142,6 +144,11 @@ public AmplitudeRatio(double value, UnitSystem unitSystem) /// public static AmplitudeRatio AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, AmplitudeRatioUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -244,15 +251,22 @@ public static string GetAbbreviation(AmplitudeRatioUnit unit, IFormatProvider? p /// public static IReadOnlyList GetAbbreviations(AmplitudeRatioUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.AmplitudeRatio"; - var resourceManager = new ResourceManager(resourceName, typeof(AmplitudeRatio).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.AmplitudeRatio"; + var resourceManager = new ResourceManager(resourceName, typeof(AmplitudeRatio).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/Angle.g.cs b/UnitsNet/GeneratedCode/Quantities/Angle.g.cs index 9649853f94..637ddadd75 100644 --- a/UnitsNet/GeneratedCode/Quantities/Angle.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Angle.g.cs @@ -88,6 +88,8 @@ static Angle() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, AngleUnit Unit), List>(); } /// @@ -154,6 +156,11 @@ public Angle(double value, UnitSystem unitSystem) /// public static Angle AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, AngleUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -340,15 +347,22 @@ public static string GetAbbreviation(AngleUnit unit, IFormatProvider? provider) /// public static IReadOnlyList GetAbbreviations(AngleUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Angle"; - var resourceManager = new ResourceManager(resourceName, typeof(Angle).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Angle"; + var resourceManager = new ResourceManager(resourceName, typeof(Angle).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs index 5eccb69ad8..9fad606d68 100644 --- a/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs @@ -75,6 +75,8 @@ static ApparentEnergy() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, ApparentEnergyUnit Unit), List>(); } /// @@ -141,6 +143,11 @@ public ApparentEnergy(double value, UnitSystem unitSystem) /// public static ApparentEnergy AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, ApparentEnergyUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -236,15 +243,22 @@ public static string GetAbbreviation(ApparentEnergyUnit unit, IFormatProvider? p /// public static IReadOnlyList GetAbbreviations(ApparentEnergyUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ApparentEnergy"; - var resourceManager = new ResourceManager(resourceName, typeof(ApparentEnergy).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ApparentEnergy"; + var resourceManager = new ResourceManager(resourceName, typeof(ApparentEnergy).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs b/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs index 9fdf8b48fd..6b4f6a6fd9 100644 --- a/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs @@ -78,6 +78,8 @@ static ApparentPower() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, ApparentPowerUnit Unit), List>(); } /// @@ -144,6 +146,11 @@ public ApparentPower(double value, UnitSystem unitSystem) /// public static ApparentPower AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, ApparentPowerUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -260,15 +267,22 @@ public static string GetAbbreviation(ApparentPowerUnit unit, IFormatProvider? pr /// public static IReadOnlyList GetAbbreviations(ApparentPowerUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ApparentPower"; - var resourceManager = new ResourceManager(resourceName, typeof(ApparentPower).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ApparentPower"; + var resourceManager = new ResourceManager(resourceName, typeof(ApparentPower).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/Area.g.cs b/UnitsNet/GeneratedCode/Quantities/Area.g.cs index 6ac3175ec9..ad1ee32178 100644 --- a/UnitsNet/GeneratedCode/Quantities/Area.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Area.g.cs @@ -86,6 +86,8 @@ static Area() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, AreaUnit Unit), List>(); } /// @@ -152,6 +154,11 @@ public Area(double value, UnitSystem unitSystem) /// public static Area AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, AreaUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -324,15 +331,22 @@ public static string GetAbbreviation(AreaUnit unit, IFormatProvider? provider) /// public static IReadOnlyList GetAbbreviations(AreaUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Area"; - var resourceManager = new ResourceManager(resourceName, typeof(Area).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Area"; + var resourceManager = new ResourceManager(resourceName, typeof(Area).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs index df3628c53f..2eb249e968 100644 --- a/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs @@ -75,6 +75,8 @@ static AreaDensity() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, AreaDensityUnit Unit), List>(); } /// @@ -141,6 +143,11 @@ public AreaDensity(double value, UnitSystem unitSystem) /// public static AreaDensity AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, AreaDensityUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -236,15 +243,22 @@ public static string GetAbbreviation(AreaDensityUnit unit, IFormatProvider? prov /// public static IReadOnlyList GetAbbreviations(AreaDensityUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.AreaDensity"; - var resourceManager = new ResourceManager(resourceName, typeof(AreaDensity).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.AreaDensity"; + var resourceManager = new ResourceManager(resourceName, typeof(AreaDensity).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs index 51f84ecaf6..67b20ded8b 100644 --- a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs @@ -78,6 +78,8 @@ static AreaMomentOfInertia() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, AreaMomentOfInertiaUnit Unit), List>(); } /// @@ -144,6 +146,11 @@ public AreaMomentOfInertia(double value, UnitSystem unitSystem) /// public static AreaMomentOfInertia AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, AreaMomentOfInertiaUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -260,15 +267,22 @@ public static string GetAbbreviation(AreaMomentOfInertiaUnit unit, IFormatProvid /// public static IReadOnlyList GetAbbreviations(AreaMomentOfInertiaUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.AreaMomentOfInertia"; - var resourceManager = new ResourceManager(resourceName, typeof(AreaMomentOfInertia).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.AreaMomentOfInertia"; + var resourceManager = new ResourceManager(resourceName, typeof(AreaMomentOfInertia).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs b/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs index 3f52647917..a55449682d 100644 --- a/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs @@ -102,6 +102,8 @@ static BitRate() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, BitRateUnit Unit), List>(); } /// @@ -168,6 +170,11 @@ public BitRate(decimal value, UnitSystem unitSystem) /// public static BitRate AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, BitRateUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -424,15 +431,22 @@ public static string GetAbbreviation(BitRateUnit unit, IFormatProvider? provider /// public static IReadOnlyList GetAbbreviations(BitRateUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.BitRate"; - var resourceManager = new ResourceManager(resourceName, typeof(BitRate).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.BitRate"; + var resourceManager = new ResourceManager(resourceName, typeof(BitRate).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs index 9fbcd7001f..414efb28a2 100644 --- a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs @@ -75,6 +75,8 @@ static BrakeSpecificFuelConsumption() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, BrakeSpecificFuelConsumptionUnit Unit), List>(); } /// @@ -141,6 +143,11 @@ public BrakeSpecificFuelConsumption(double value, UnitSystem unitSystem) /// public static BrakeSpecificFuelConsumption AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, BrakeSpecificFuelConsumptionUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -236,15 +243,22 @@ public static string GetAbbreviation(BrakeSpecificFuelConsumptionUnit unit, IFor /// public static IReadOnlyList GetAbbreviations(BrakeSpecificFuelConsumptionUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.BrakeSpecificFuelConsumption"; - var resourceManager = new ResourceManager(resourceName, typeof(BrakeSpecificFuelConsumption).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.BrakeSpecificFuelConsumption"; + var resourceManager = new ResourceManager(resourceName, typeof(BrakeSpecificFuelConsumption).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs b/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs index 8b1a7745e9..541c6cdb74 100644 --- a/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs @@ -82,6 +82,8 @@ static Capacitance() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, CapacitanceUnit Unit), List>(); } /// @@ -148,6 +150,11 @@ public Capacitance(double value, UnitSystem unitSystem) /// public static Capacitance AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, CapacitanceUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -271,15 +278,22 @@ public static string GetAbbreviation(CapacitanceUnit unit, IFormatProvider? prov /// public static IReadOnlyList GetAbbreviations(CapacitanceUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Capacitance"; - var resourceManager = new ResourceManager(resourceName, typeof(Capacitance).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Capacitance"; + var resourceManager = new ResourceManager(resourceName, typeof(Capacitance).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs b/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs index f1c0fff34b..08c8615819 100644 --- a/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs @@ -75,6 +75,8 @@ static CoefficientOfThermalExpansion() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, CoefficientOfThermalExpansionUnit Unit), List>(); } /// @@ -141,6 +143,11 @@ public CoefficientOfThermalExpansion(double value, UnitSystem unitSystem) /// public static CoefficientOfThermalExpansion AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, CoefficientOfThermalExpansionUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -236,15 +243,22 @@ public static string GetAbbreviation(CoefficientOfThermalExpansionUnit unit, IFo /// public static IReadOnlyList GetAbbreviations(CoefficientOfThermalExpansionUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.CoefficientOfThermalExpansion"; - var resourceManager = new ResourceManager(resourceName, typeof(CoefficientOfThermalExpansion).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.CoefficientOfThermalExpansion"; + var resourceManager = new ResourceManager(resourceName, typeof(CoefficientOfThermalExpansion).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/Compressibility.g.cs b/UnitsNet/GeneratedCode/Quantities/Compressibility.g.cs index 16eff87ae7..e234fc4d34 100644 --- a/UnitsNet/GeneratedCode/Quantities/Compressibility.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Compressibility.g.cs @@ -79,6 +79,8 @@ static Compressibility() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, CompressibilityUnit Unit), List>(); } /// @@ -145,6 +147,11 @@ public Compressibility(double value, UnitSystem unitSystem) /// public static Compressibility AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, CompressibilityUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -268,15 +275,22 @@ public static string GetAbbreviation(CompressibilityUnit unit, IFormatProvider? /// public static IReadOnlyList GetAbbreviations(CompressibilityUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Compressibility"; - var resourceManager = new ResourceManager(resourceName, typeof(Compressibility).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Compressibility"; + var resourceManager = new ResourceManager(resourceName, typeof(Compressibility).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/Density.g.cs b/UnitsNet/GeneratedCode/Quantities/Density.g.cs index 9a9d0efa5f..d0d281844b 100644 --- a/UnitsNet/GeneratedCode/Quantities/Density.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Density.g.cs @@ -126,6 +126,8 @@ static Density() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, DensityUnit Unit), List>(); } /// @@ -192,6 +194,11 @@ public Density(double value, UnitSystem unitSystem) /// public static Density AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, DensityUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -623,15 +630,22 @@ public static string GetAbbreviation(DensityUnit unit, IFormatProvider? provider /// public static IReadOnlyList GetAbbreviations(DensityUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Density"; - var resourceManager = new ResourceManager(resourceName, typeof(Density).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Density"; + var resourceManager = new ResourceManager(resourceName, typeof(Density).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/Duration.g.cs b/UnitsNet/GeneratedCode/Quantities/Duration.g.cs index 176b12c087..7f2d835deb 100644 --- a/UnitsNet/GeneratedCode/Quantities/Duration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Duration.g.cs @@ -83,6 +83,8 @@ static Duration() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, DurationUnit Unit), List>(); } /// @@ -149,6 +151,11 @@ public Duration(double value, UnitSystem unitSystem) /// public static Duration AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, DurationUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -300,15 +307,22 @@ public static string GetAbbreviation(DurationUnit unit, IFormatProvider? provide /// public static IReadOnlyList GetAbbreviations(DurationUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Duration"; - var resourceManager = new ResourceManager(resourceName, typeof(Duration).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Duration"; + var resourceManager = new ResourceManager(resourceName, typeof(Duration).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs index 9cd08b9fa9..12be6271cf 100644 --- a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs @@ -85,6 +85,8 @@ static DynamicViscosity() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, DynamicViscosityUnit Unit), List>(); } /// @@ -151,6 +153,11 @@ public DynamicViscosity(double value, UnitSystem unitSystem) /// public static DynamicViscosity AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, DynamicViscosityUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -295,15 +302,22 @@ public static string GetAbbreviation(DynamicViscosityUnit unit, IFormatProvider? /// public static IReadOnlyList GetAbbreviations(DynamicViscosityUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.DynamicViscosity"; - var resourceManager = new ResourceManager(resourceName, typeof(DynamicViscosity).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.DynamicViscosity"; + var resourceManager = new ResourceManager(resourceName, typeof(DynamicViscosity).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs index e54cf9ce3e..7548fc6dfe 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs @@ -76,6 +76,8 @@ static ElectricAdmittance() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, ElectricAdmittanceUnit Unit), List>(); } /// @@ -142,6 +144,11 @@ public ElectricAdmittance(double value, UnitSystem unitSystem) /// public static ElectricAdmittance AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, ElectricAdmittanceUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -244,15 +251,22 @@ public static string GetAbbreviation(ElectricAdmittanceUnit unit, IFormatProvide /// public static IReadOnlyList GetAbbreviations(ElectricAdmittanceUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricAdmittance"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricAdmittance).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricAdmittance"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricAdmittance).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs index 1b1ed27ff7..4ad21a0212 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs @@ -86,6 +86,8 @@ static ElectricCharge() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, ElectricChargeUnit Unit), List>(); } /// @@ -152,6 +154,11 @@ public ElectricCharge(double value, UnitSystem unitSystem) /// public static ElectricCharge AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, ElectricChargeUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -303,15 +310,22 @@ public static string GetAbbreviation(ElectricChargeUnit unit, IFormatProvider? p /// public static IReadOnlyList GetAbbreviations(ElectricChargeUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricCharge"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricCharge).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricCharge"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricCharge).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs index 6d99614aa1..7cc1faf0fc 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs @@ -76,6 +76,8 @@ static ElectricChargeDensity() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, ElectricChargeDensityUnit Unit), List>(); } /// @@ -142,6 +144,11 @@ public ElectricChargeDensity(double value, UnitSystem unitSystem) /// public static ElectricChargeDensity AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, ElectricChargeDensityUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -223,15 +230,22 @@ public static string GetAbbreviation(ElectricChargeDensityUnit unit, IFormatProv /// public static IReadOnlyList GetAbbreviations(ElectricChargeDensityUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricChargeDensity"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricChargeDensity).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricChargeDensity"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricChargeDensity).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs index a5593566ab..368da9430f 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs @@ -80,6 +80,8 @@ static ElectricConductance() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, ElectricConductanceUnit Unit), List>(); } /// @@ -146,6 +148,11 @@ public ElectricConductance(double value, UnitSystem unitSystem) /// public static ElectricConductance AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, ElectricConductanceUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -255,15 +262,22 @@ public static string GetAbbreviation(ElectricConductanceUnit unit, IFormatProvid /// public static IReadOnlyList GetAbbreviations(ElectricConductanceUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricConductance"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricConductance).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricConductance"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricConductance).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs index ead168f3b8..382c88f22b 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs @@ -81,6 +81,8 @@ static ElectricConductivity() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, ElectricConductivityUnit Unit), List>(); } /// @@ -147,6 +149,11 @@ public ElectricConductivity(double value, UnitSystem unitSystem) /// public static ElectricConductivity AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, ElectricConductivityUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -263,15 +270,22 @@ public static string GetAbbreviation(ElectricConductivityUnit unit, IFormatProvi /// public static IReadOnlyList GetAbbreviations(ElectricConductivityUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricConductivity"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricConductivity).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricConductivity"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricConductivity).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs index f6e8359ed4..bc4c7316e6 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs @@ -81,6 +81,8 @@ static ElectricCurrent() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, ElectricCurrentUnit Unit), List>(); } /// @@ -147,6 +149,11 @@ public ElectricCurrent(double value, UnitSystem unitSystem) /// public static ElectricCurrent AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, ElectricCurrentUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -284,15 +291,22 @@ public static string GetAbbreviation(ElectricCurrentUnit unit, IFormatProvider? /// public static IReadOnlyList GetAbbreviations(ElectricCurrentUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricCurrent"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricCurrent).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricCurrent"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricCurrent).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs index bc83f9ea93..fffddac29b 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs @@ -78,6 +78,8 @@ static ElectricCurrentDensity() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, ElectricCurrentDensityUnit Unit), List>(); } /// @@ -144,6 +146,11 @@ public ElectricCurrentDensity(double value, UnitSystem unitSystem) /// public static ElectricCurrentDensity AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, ElectricCurrentDensityUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -239,15 +246,22 @@ public static string GetAbbreviation(ElectricCurrentDensityUnit unit, IFormatPro /// public static IReadOnlyList GetAbbreviations(ElectricCurrentDensityUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricCurrentDensity"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricCurrentDensity).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricCurrentDensity"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricCurrentDensity).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs index 2c157f9cca..2960ffdb67 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs @@ -76,6 +76,8 @@ static ElectricCurrentGradient() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, ElectricCurrentGradientUnit Unit), List>(); } /// @@ -142,6 +144,11 @@ public ElectricCurrentGradient(double value, UnitSystem unitSystem) /// public static ElectricCurrentGradient AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, ElectricCurrentGradientUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -244,15 +251,22 @@ public static string GetAbbreviation(ElectricCurrentGradientUnit unit, IFormatPr /// public static IReadOnlyList GetAbbreviations(ElectricCurrentGradientUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricCurrentGradient"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricCurrentGradient).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricCurrentGradient"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricCurrentGradient).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs index ad4c4f5017..35f628b5c1 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs @@ -76,6 +76,8 @@ static ElectricField() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, ElectricFieldUnit Unit), List>(); } /// @@ -142,6 +144,11 @@ public ElectricField(double value, UnitSystem unitSystem) /// public static ElectricField AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, ElectricFieldUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -223,15 +230,22 @@ public static string GetAbbreviation(ElectricFieldUnit unit, IFormatProvider? pr /// public static IReadOnlyList GetAbbreviations(ElectricFieldUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricField"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricField).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricField"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricField).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs index 9fece9280d..31f1926402 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs @@ -80,6 +80,8 @@ static ElectricInductance() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, ElectricInductanceUnit Unit), List>(); } /// @@ -146,6 +148,11 @@ public ElectricInductance(double value, UnitSystem unitSystem) /// public static ElectricInductance AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, ElectricInductanceUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -255,15 +262,22 @@ public static string GetAbbreviation(ElectricInductanceUnit unit, IFormatProvide /// public static IReadOnlyList GetAbbreviations(ElectricInductanceUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricInductance"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricInductance).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricInductance"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricInductance).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs index e368f68044..ad50d52ad0 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs @@ -78,6 +78,8 @@ static ElectricPotential() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, ElectricPotentialUnit Unit), List>(); } /// @@ -144,6 +146,11 @@ public ElectricPotential(double value, UnitSystem unitSystem) /// public static ElectricPotential AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, ElectricPotentialUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -260,15 +267,22 @@ public static string GetAbbreviation(ElectricPotentialUnit unit, IFormatProvider /// public static IReadOnlyList GetAbbreviations(ElectricPotentialUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricPotential"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricPotential).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricPotential"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricPotential).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs index 72cb0279e3..9ee20856ba 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs @@ -77,6 +77,8 @@ static ElectricPotentialAc() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, ElectricPotentialAcUnit Unit), List>(); } /// @@ -143,6 +145,11 @@ public ElectricPotentialAc(double value, UnitSystem unitSystem) /// public static ElectricPotentialAc AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, ElectricPotentialAcUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -252,15 +259,22 @@ public static string GetAbbreviation(ElectricPotentialAcUnit unit, IFormatProvid /// public static IReadOnlyList GetAbbreviations(ElectricPotentialAcUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricPotentialAc"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricPotentialAc).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricPotentialAc"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricPotentialAc).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs index 51fc34099f..c3a2f1445d 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs @@ -92,6 +92,8 @@ static ElectricPotentialChangeRate() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, ElectricPotentialChangeRateUnit Unit), List>(); } /// @@ -158,6 +160,11 @@ public ElectricPotentialChangeRate(double value, UnitSystem unitSystem) /// public static ElectricPotentialChangeRate AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, ElectricPotentialChangeRateUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -372,15 +379,22 @@ public static string GetAbbreviation(ElectricPotentialChangeRateUnit unit, IForm /// public static IReadOnlyList GetAbbreviations(ElectricPotentialChangeRateUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricPotentialChangeRate"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricPotentialChangeRate).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricPotentialChangeRate"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricPotentialChangeRate).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs index 60a78ccb44..71854bddf2 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs @@ -77,6 +77,8 @@ static ElectricPotentialDc() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, ElectricPotentialDcUnit Unit), List>(); } /// @@ -143,6 +145,11 @@ public ElectricPotentialDc(double value, UnitSystem unitSystem) /// public static ElectricPotentialDc AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, ElectricPotentialDcUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -252,15 +259,22 @@ public static string GetAbbreviation(ElectricPotentialDcUnit unit, IFormatProvid /// public static IReadOnlyList GetAbbreviations(ElectricPotentialDcUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricPotentialDc"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricPotentialDc).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricPotentialDc"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricPotentialDc).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs index deed0350da..aec4ab4f6b 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs @@ -79,6 +79,8 @@ static ElectricResistance() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, ElectricResistanceUnit Unit), List>(); } /// @@ -145,6 +147,11 @@ public ElectricResistance(double value, UnitSystem unitSystem) /// public static ElectricResistance AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, ElectricResistanceUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -268,15 +275,22 @@ public static string GetAbbreviation(ElectricResistanceUnit unit, IFormatProvide /// public static IReadOnlyList GetAbbreviations(ElectricResistanceUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricResistance"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricResistance).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricResistance"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricResistance).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs index 8ec7e964a1..bdec3c59c7 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs @@ -89,6 +89,8 @@ static ElectricResistivity() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, ElectricResistivityUnit Unit), List>(); } /// @@ -155,6 +157,11 @@ public ElectricResistivity(double value, UnitSystem unitSystem) /// public static ElectricResistivity AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, ElectricResistivityUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -327,15 +334,22 @@ public static string GetAbbreviation(ElectricResistivityUnit unit, IFormatProvid /// public static IReadOnlyList GetAbbreviations(ElectricResistivityUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricResistivity"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricResistivity).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricResistivity"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricResistivity).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs index 440eb792a4..7ad681df97 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs @@ -78,6 +78,8 @@ static ElectricSurfaceChargeDensity() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, ElectricSurfaceChargeDensityUnit Unit), List>(); } /// @@ -144,6 +146,11 @@ public ElectricSurfaceChargeDensity(double value, UnitSystem unitSystem) /// public static ElectricSurfaceChargeDensity AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, ElectricSurfaceChargeDensityUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -239,15 +246,22 @@ public static string GetAbbreviation(ElectricSurfaceChargeDensityUnit unit, IFor /// public static IReadOnlyList GetAbbreviations(ElectricSurfaceChargeDensityUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricSurfaceChargeDensity"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricSurfaceChargeDensity).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricSurfaceChargeDensity"; + var resourceManager = new ResourceManager(resourceName, typeof(ElectricSurfaceChargeDensity).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/Energy.g.cs b/UnitsNet/GeneratedCode/Quantities/Energy.g.cs index 47ff4a40ad..bad74115e2 100644 --- a/UnitsNet/GeneratedCode/Quantities/Energy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Energy.g.cs @@ -110,6 +110,8 @@ static Energy() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, EnergyUnit Unit), List>(); } /// @@ -176,6 +178,11 @@ public Energy(double value, UnitSystem unitSystem) /// public static Energy AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, EnergyUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -516,15 +523,22 @@ public static string GetAbbreviation(EnergyUnit unit, IFormatProvider? provider) /// public static IReadOnlyList GetAbbreviations(EnergyUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Energy"; - var resourceManager = new ResourceManager(resourceName, typeof(Energy).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Energy"; + var resourceManager = new ResourceManager(resourceName, typeof(Energy).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/EnergyDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/EnergyDensity.g.cs index 7cb9d440c4..0e3fd74740 100644 --- a/UnitsNet/GeneratedCode/Quantities/EnergyDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/EnergyDensity.g.cs @@ -84,6 +84,8 @@ static EnergyDensity() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, EnergyDensityUnit Unit), List>(); } /// @@ -150,6 +152,11 @@ public EnergyDensity(double value, UnitSystem unitSystem) /// public static EnergyDensity AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, EnergyDensityUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -308,15 +315,22 @@ public static string GetAbbreviation(EnergyDensityUnit unit, IFormatProvider? pr /// public static IReadOnlyList GetAbbreviations(EnergyDensityUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.EnergyDensity"; - var resourceManager = new ResourceManager(resourceName, typeof(EnergyDensity).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.EnergyDensity"; + var resourceManager = new ResourceManager(resourceName, typeof(EnergyDensity).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs b/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs index 445a7dc011..62fb102bdf 100644 --- a/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs @@ -79,6 +79,8 @@ static Entropy() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, EntropyUnit Unit), List>(); } /// @@ -145,6 +147,11 @@ public Entropy(double value, UnitSystem unitSystem) /// public static Entropy AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, EntropyUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -268,15 +275,22 @@ public static string GetAbbreviation(EntropyUnit unit, IFormatProvider? provider /// public static IReadOnlyList GetAbbreviations(EntropyUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Entropy"; - var resourceManager = new ResourceManager(resourceName, typeof(Entropy).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Entropy"; + var resourceManager = new ResourceManager(resourceName, typeof(Entropy).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/Force.g.cs b/UnitsNet/GeneratedCode/Quantities/Force.g.cs index 2edad84dfd..f652648b04 100644 --- a/UnitsNet/GeneratedCode/Quantities/Force.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Force.g.cs @@ -87,6 +87,8 @@ static Force() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, ForceUnit Unit), List>(); } /// @@ -153,6 +155,11 @@ public Force(double value, UnitSystem unitSystem) /// public static Force AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, ForceUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -332,15 +339,22 @@ public static string GetAbbreviation(ForceUnit unit, IFormatProvider? provider) /// public static IReadOnlyList GetAbbreviations(ForceUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Force"; - var resourceManager = new ResourceManager(resourceName, typeof(Force).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Force"; + var resourceManager = new ResourceManager(resourceName, typeof(Force).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs index b2da12039e..d55511edc4 100644 --- a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs @@ -87,6 +87,8 @@ static ForceChangeRate() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, ForceChangeRateUnit Unit), List>(); } /// @@ -153,6 +155,11 @@ public ForceChangeRate(double value, UnitSystem unitSystem) /// public static ForceChangeRate AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, ForceChangeRateUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -332,15 +339,22 @@ public static string GetAbbreviation(ForceChangeRateUnit unit, IFormatProvider? /// public static IReadOnlyList GetAbbreviations(ForceChangeRateUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ForceChangeRate"; - var resourceManager = new ResourceManager(resourceName, typeof(ForceChangeRate).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ForceChangeRate"; + var resourceManager = new ResourceManager(resourceName, typeof(ForceChangeRate).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs index ca3fa3410c..59b75f11fd 100644 --- a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs @@ -110,6 +110,8 @@ static ForcePerLength() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, ForcePerLengthUnit Unit), List>(); } /// @@ -176,6 +178,11 @@ public ForcePerLength(double value, UnitSystem unitSystem) /// public static ForcePerLength AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, ForcePerLengthUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -516,15 +523,22 @@ public static string GetAbbreviation(ForcePerLengthUnit unit, IFormatProvider? p /// public static IReadOnlyList GetAbbreviations(ForcePerLengthUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ForcePerLength"; - var resourceManager = new ResourceManager(resourceName, typeof(ForcePerLength).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ForcePerLength"; + var resourceManager = new ResourceManager(resourceName, typeof(ForcePerLength).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs b/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs index 3394dc61c6..177abfd12d 100644 --- a/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs @@ -85,6 +85,8 @@ static Frequency() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, FrequencyUnit Unit), List>(); } /// @@ -151,6 +153,11 @@ public Frequency(double value, UnitSystem unitSystem) /// public static Frequency AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, FrequencyUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -316,15 +323,22 @@ public static string GetAbbreviation(FrequencyUnit unit, IFormatProvider? provid /// public static IReadOnlyList GetAbbreviations(FrequencyUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Frequency"; - var resourceManager = new ResourceManager(resourceName, typeof(Frequency).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Frequency"; + var resourceManager = new ResourceManager(resourceName, typeof(Frequency).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs b/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs index 56c82089ab..43f86fe4f0 100644 --- a/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs @@ -79,6 +79,8 @@ static FuelEfficiency() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, FuelEfficiencyUnit Unit), List>(); } /// @@ -145,6 +147,11 @@ public FuelEfficiency(double value, UnitSystem unitSystem) /// public static FuelEfficiency AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, FuelEfficiencyUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -247,15 +254,22 @@ public static string GetAbbreviation(FuelEfficiencyUnit unit, IFormatProvider? p /// public static IReadOnlyList GetAbbreviations(FuelEfficiencyUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.FuelEfficiency"; - var resourceManager = new ResourceManager(resourceName, typeof(FuelEfficiency).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.FuelEfficiency"; + var resourceManager = new ResourceManager(resourceName, typeof(FuelEfficiency).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs index a6a181374b..941da83cfd 100644 --- a/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs @@ -90,6 +90,8 @@ static HeatFlux() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, HeatFluxUnit Unit), List>(); } /// @@ -156,6 +158,11 @@ public HeatFlux(double value, UnitSystem unitSystem) /// public static HeatFlux AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, HeatFluxUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -356,15 +363,22 @@ public static string GetAbbreviation(HeatFluxUnit unit, IFormatProvider? provide /// public static IReadOnlyList GetAbbreviations(HeatFluxUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.HeatFlux"; - var resourceManager = new ResourceManager(resourceName, typeof(HeatFlux).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.HeatFlux"; + var resourceManager = new ResourceManager(resourceName, typeof(HeatFlux).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs index ab41b17439..095db3c934 100644 --- a/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs @@ -78,6 +78,8 @@ static HeatTransferCoefficient() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, HeatTransferCoefficientUnit Unit), List>(); } /// @@ -144,6 +146,11 @@ public HeatTransferCoefficient(double value, UnitSystem unitSystem) /// public static HeatTransferCoefficient AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, HeatTransferCoefficientUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -261,15 +268,22 @@ public static string GetAbbreviation(HeatTransferCoefficientUnit unit, IFormatPr /// public static IReadOnlyList GetAbbreviations(HeatTransferCoefficientUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.HeatTransferCoefficient"; - var resourceManager = new ResourceManager(resourceName, typeof(HeatTransferCoefficient).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.HeatTransferCoefficient"; + var resourceManager = new ResourceManager(resourceName, typeof(HeatTransferCoefficient).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs b/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs index bfb00b1303..7120f9f0eb 100644 --- a/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs @@ -79,6 +79,8 @@ static Illuminance() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, IlluminanceUnit Unit), List>(); } /// @@ -145,6 +147,11 @@ public Illuminance(double value, UnitSystem unitSystem) /// public static Illuminance AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, IlluminanceUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -247,15 +254,22 @@ public static string GetAbbreviation(IlluminanceUnit unit, IFormatProvider? prov /// public static IReadOnlyList GetAbbreviations(IlluminanceUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Illuminance"; - var resourceManager = new ResourceManager(resourceName, typeof(Illuminance).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Illuminance"; + var resourceManager = new ResourceManager(resourceName, typeof(Illuminance).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/Impulse.g.cs b/UnitsNet/GeneratedCode/Quantities/Impulse.g.cs index 351759fac1..19558da443 100644 --- a/UnitsNet/GeneratedCode/Quantities/Impulse.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Impulse.g.cs @@ -85,6 +85,8 @@ static Impulse() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, ImpulseUnit Unit), List>(); } /// @@ -151,6 +153,11 @@ public Impulse(double value, UnitSystem unitSystem) /// public static Impulse AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, ImpulseUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -316,15 +323,22 @@ public static string GetAbbreviation(ImpulseUnit unit, IFormatProvider? provider /// public static IReadOnlyList GetAbbreviations(ImpulseUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Impulse"; - var resourceManager = new ResourceManager(resourceName, typeof(Impulse).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Impulse"; + var resourceManager = new ResourceManager(resourceName, typeof(Impulse).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/Information.g.cs b/UnitsNet/GeneratedCode/Quantities/Information.g.cs index 0c6316da50..af6c9eeeaf 100644 --- a/UnitsNet/GeneratedCode/Quantities/Information.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Information.g.cs @@ -99,6 +99,8 @@ static Information() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, InformationUnit Unit), List>(); } /// @@ -165,6 +167,11 @@ public Information(decimal value, UnitSystem unitSystem) /// public static Information AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, InformationUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -421,15 +428,22 @@ public static string GetAbbreviation(InformationUnit unit, IFormatProvider? prov /// public static IReadOnlyList GetAbbreviations(InformationUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Information"; - var resourceManager = new ResourceManager(resourceName, typeof(Information).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Information"; + var resourceManager = new ResourceManager(resourceName, typeof(Information).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs b/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs index 72e72fa5fd..897fba1556 100644 --- a/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs @@ -86,6 +86,8 @@ static Irradiance() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, IrradianceUnit Unit), List>(); } /// @@ -152,6 +154,11 @@ public Irradiance(double value, UnitSystem unitSystem) /// public static Irradiance AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, IrradianceUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -324,15 +331,22 @@ public static string GetAbbreviation(IrradianceUnit unit, IFormatProvider? provi /// public static IReadOnlyList GetAbbreviations(IrradianceUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Irradiance"; - var resourceManager = new ResourceManager(resourceName, typeof(Irradiance).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Irradiance"; + var resourceManager = new ResourceManager(resourceName, typeof(Irradiance).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs b/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs index 2ec657f849..e05e666865 100644 --- a/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs @@ -82,6 +82,8 @@ static Irradiation() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, IrradiationUnit Unit), List>(); } /// @@ -148,6 +150,11 @@ public Irradiation(double value, UnitSystem unitSystem) /// public static Irradiation AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, IrradiationUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -271,15 +278,22 @@ public static string GetAbbreviation(IrradiationUnit unit, IFormatProvider? prov /// public static IReadOnlyList GetAbbreviations(IrradiationUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Irradiation"; - var resourceManager = new ResourceManager(resourceName, typeof(Irradiation).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Irradiation"; + var resourceManager = new ResourceManager(resourceName, typeof(Irradiation).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/Jerk.g.cs b/UnitsNet/GeneratedCode/Quantities/Jerk.g.cs index b4aa1f751b..3ae7657093 100644 --- a/UnitsNet/GeneratedCode/Quantities/Jerk.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Jerk.g.cs @@ -83,6 +83,8 @@ static Jerk() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, JerkUnit Unit), List>(); } /// @@ -149,6 +151,11 @@ public Jerk(double value, UnitSystem unitSystem) /// public static Jerk AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, JerkUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -300,15 +307,22 @@ public static string GetAbbreviation(JerkUnit unit, IFormatProvider? provider) /// public static IReadOnlyList GetAbbreviations(JerkUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Jerk"; - var resourceManager = new ResourceManager(resourceName, typeof(Jerk).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Jerk"; + var resourceManager = new ResourceManager(resourceName, typeof(Jerk).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs index 1bf1be54d8..4b4d14f73b 100644 --- a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs @@ -84,6 +84,8 @@ static KinematicViscosity() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, KinematicViscosityUnit Unit), List>(); } /// @@ -150,6 +152,11 @@ public KinematicViscosity(double value, UnitSystem unitSystem) /// public static KinematicViscosity AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, KinematicViscosityUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -287,15 +294,22 @@ public static string GetAbbreviation(KinematicViscosityUnit unit, IFormatProvide /// public static IReadOnlyList GetAbbreviations(KinematicViscosityUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.KinematicViscosity"; - var resourceManager = new ResourceManager(resourceName, typeof(KinematicViscosity).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.KinematicViscosity"; + var resourceManager = new ResourceManager(resourceName, typeof(KinematicViscosity).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/Length.g.cs b/UnitsNet/GeneratedCode/Quantities/Length.g.cs index 4d1784429b..d5f4f5a0f5 100644 --- a/UnitsNet/GeneratedCode/Quantities/Length.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Length.g.cs @@ -109,6 +109,8 @@ static Length() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, LengthUnit Unit), List>(); } /// @@ -175,6 +177,11 @@ public Length(double value, UnitSystem unitSystem) /// public static Length AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, LengthUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -508,15 +515,22 @@ public static string GetAbbreviation(LengthUnit unit, IFormatProvider? provider) /// public static IReadOnlyList GetAbbreviations(LengthUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Length"; - var resourceManager = new ResourceManager(resourceName, typeof(Length).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Length"; + var resourceManager = new ResourceManager(resourceName, typeof(Length).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/Level.g.cs b/UnitsNet/GeneratedCode/Quantities/Level.g.cs index b01244aed5..b019b3ddb9 100644 --- a/UnitsNet/GeneratedCode/Quantities/Level.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Level.g.cs @@ -74,6 +74,8 @@ static Level() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, LevelUnit Unit), List>(); } /// @@ -140,6 +142,11 @@ public Level(double value, UnitSystem unitSystem) /// public static Level AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, LevelUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -228,15 +235,22 @@ public static string GetAbbreviation(LevelUnit unit, IFormatProvider? provider) /// public static IReadOnlyList GetAbbreviations(LevelUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Level"; - var resourceManager = new ResourceManager(resourceName, typeof(Level).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Level"; + var resourceManager = new ResourceManager(resourceName, typeof(Level).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs index 6c77191449..d4bfb0cb7d 100644 --- a/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs @@ -89,6 +89,8 @@ static LinearDensity() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, LinearDensityUnit Unit), List>(); } /// @@ -155,6 +157,11 @@ public LinearDensity(double value, UnitSystem unitSystem) /// public static LinearDensity AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, LinearDensityUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -327,15 +334,22 @@ public static string GetAbbreviation(LinearDensityUnit unit, IFormatProvider? pr /// public static IReadOnlyList GetAbbreviations(LinearDensityUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.LinearDensity"; - var resourceManager = new ResourceManager(resourceName, typeof(LinearDensity).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.LinearDensity"; + var resourceManager = new ResourceManager(resourceName, typeof(LinearDensity).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs index b38bad028d..9e133fd7f0 100644 --- a/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs @@ -100,6 +100,8 @@ static LinearPowerDensity() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, LinearPowerDensityUnit Unit), List>(); } /// @@ -166,6 +168,11 @@ public LinearPowerDensity(double value, UnitSystem unitSystem) /// public static LinearPowerDensity AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, LinearPowerDensityUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -415,15 +422,22 @@ public static string GetAbbreviation(LinearPowerDensityUnit unit, IFormatProvide /// public static IReadOnlyList GetAbbreviations(LinearPowerDensityUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.LinearPowerDensity"; - var resourceManager = new ResourceManager(resourceName, typeof(LinearPowerDensity).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.LinearPowerDensity"; + var resourceManager = new ResourceManager(resourceName, typeof(LinearPowerDensity).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/Luminance.g.cs b/UnitsNet/GeneratedCode/Quantities/Luminance.g.cs index 5821a3c1d3..098a9b98a6 100644 --- a/UnitsNet/GeneratedCode/Quantities/Luminance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Luminance.g.cs @@ -85,6 +85,8 @@ static Luminance() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, LuminanceUnit Unit), List>(); } /// @@ -151,6 +153,11 @@ public Luminance(double value, UnitSystem unitSystem) /// public static Luminance AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, LuminanceUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -295,15 +302,22 @@ public static string GetAbbreviation(LuminanceUnit unit, IFormatProvider? provid /// public static IReadOnlyList GetAbbreviations(LuminanceUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Luminance"; - var resourceManager = new ResourceManager(resourceName, typeof(Luminance).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Luminance"; + var resourceManager = new ResourceManager(resourceName, typeof(Luminance).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs b/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs index ac01204952..1e185fa7ff 100644 --- a/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs @@ -89,6 +89,8 @@ static Luminosity() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, LuminosityUnit Unit), List>(); } /// @@ -155,6 +157,11 @@ public Luminosity(double value, UnitSystem unitSystem) /// public static Luminosity AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, LuminosityUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -327,15 +334,22 @@ public static string GetAbbreviation(LuminosityUnit unit, IFormatProvider? provi /// public static IReadOnlyList GetAbbreviations(LuminosityUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Luminosity"; - var resourceManager = new ResourceManager(resourceName, typeof(Luminosity).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Luminosity"; + var resourceManager = new ResourceManager(resourceName, typeof(Luminosity).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs index 774fb37b57..ee4c59c2e3 100644 --- a/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs @@ -76,6 +76,8 @@ static LuminousFlux() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, LuminousFluxUnit Unit), List>(); } /// @@ -142,6 +144,11 @@ public LuminousFlux(double value, UnitSystem unitSystem) /// public static LuminousFlux AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, LuminousFluxUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -223,15 +230,22 @@ public static string GetAbbreviation(LuminousFluxUnit unit, IFormatProvider? pro /// public static IReadOnlyList GetAbbreviations(LuminousFluxUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.LuminousFlux"; - var resourceManager = new ResourceManager(resourceName, typeof(LuminousFlux).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.LuminousFlux"; + var resourceManager = new ResourceManager(resourceName, typeof(LuminousFlux).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs b/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs index beb22488e2..9c014151e4 100644 --- a/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs @@ -76,6 +76,8 @@ static LuminousIntensity() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, LuminousIntensityUnit Unit), List>(); } /// @@ -142,6 +144,11 @@ public LuminousIntensity(double value, UnitSystem unitSystem) /// public static LuminousIntensity AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, LuminousIntensityUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -223,15 +230,22 @@ public static string GetAbbreviation(LuminousIntensityUnit unit, IFormatProvider /// public static IReadOnlyList GetAbbreviations(LuminousIntensityUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.LuminousIntensity"; - var resourceManager = new ResourceManager(resourceName, typeof(LuminousIntensity).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.LuminousIntensity"; + var resourceManager = new ResourceManager(resourceName, typeof(LuminousIntensity).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs b/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs index b89e683d47..d9786c619d 100644 --- a/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs @@ -81,6 +81,8 @@ static MagneticField() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, MagneticFieldUnit Unit), List>(); } /// @@ -147,6 +149,11 @@ public MagneticField(double value, UnitSystem unitSystem) /// public static MagneticField AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, MagneticFieldUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -263,15 +270,22 @@ public static string GetAbbreviation(MagneticFieldUnit unit, IFormatProvider? pr /// public static IReadOnlyList GetAbbreviations(MagneticFieldUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.MagneticField"; - var resourceManager = new ResourceManager(resourceName, typeof(MagneticField).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MagneticField"; + var resourceManager = new ResourceManager(resourceName, typeof(MagneticField).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs index 33dacdf8ce..cef6c4bf6e 100644 --- a/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs @@ -76,6 +76,8 @@ static MagneticFlux() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, MagneticFluxUnit Unit), List>(); } /// @@ -142,6 +144,11 @@ public MagneticFlux(double value, UnitSystem unitSystem) /// public static MagneticFlux AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, MagneticFluxUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -223,15 +230,22 @@ public static string GetAbbreviation(MagneticFluxUnit unit, IFormatProvider? pro /// public static IReadOnlyList GetAbbreviations(MagneticFluxUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.MagneticFlux"; - var resourceManager = new ResourceManager(resourceName, typeof(MagneticFlux).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MagneticFlux"; + var resourceManager = new ResourceManager(resourceName, typeof(MagneticFlux).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs b/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs index ef9597ce65..b33de1c0d1 100644 --- a/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs @@ -76,6 +76,8 @@ static Magnetization() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, MagnetizationUnit Unit), List>(); } /// @@ -142,6 +144,11 @@ public Magnetization(double value, UnitSystem unitSystem) /// public static Magnetization AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, MagnetizationUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -223,15 +230,22 @@ public static string GetAbbreviation(MagnetizationUnit unit, IFormatProvider? pr /// public static IReadOnlyList GetAbbreviations(MagnetizationUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Magnetization"; - var resourceManager = new ResourceManager(resourceName, typeof(Magnetization).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Magnetization"; + var resourceManager = new ResourceManager(resourceName, typeof(Magnetization).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/Mass.g.cs b/UnitsNet/GeneratedCode/Quantities/Mass.g.cs index 3459f7aca6..8e823613f4 100644 --- a/UnitsNet/GeneratedCode/Quantities/Mass.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Mass.g.cs @@ -97,6 +97,8 @@ static Mass() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, MassUnit Unit), List>(); } /// @@ -163,6 +165,11 @@ public Mass(double value, UnitSystem unitSystem) /// public static Mass AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, MassUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -412,15 +419,22 @@ public static string GetAbbreviation(MassUnit unit, IFormatProvider? provider) /// public static IReadOnlyList GetAbbreviations(MassUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Mass"; - var resourceManager = new ResourceManager(resourceName, typeof(Mass).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Mass"; + var resourceManager = new ResourceManager(resourceName, typeof(Mass).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs b/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs index 233cc9643a..1967aa4c24 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs @@ -124,6 +124,8 @@ static MassConcentration() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, MassConcentrationUnit Unit), List>(); } /// @@ -190,6 +192,11 @@ public MassConcentration(double value, UnitSystem unitSystem) /// public static MassConcentration AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, MassConcentrationUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -607,15 +614,22 @@ public static string GetAbbreviation(MassConcentrationUnit unit, IFormatProvider /// public static IReadOnlyList GetAbbreviations(MassConcentrationUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.MassConcentration"; - var resourceManager = new ResourceManager(resourceName, typeof(MassConcentration).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MassConcentration"; + var resourceManager = new ResourceManager(resourceName, typeof(MassConcentration).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs index b7520602fb..e197a0de07 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs @@ -105,6 +105,8 @@ static MassFlow() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, MassFlowUnit Unit), List>(); } /// @@ -171,6 +173,11 @@ public MassFlow(double value, UnitSystem unitSystem) /// public static MassFlow AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, MassFlowUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -476,15 +483,22 @@ public static string GetAbbreviation(MassFlowUnit unit, IFormatProvider? provide /// public static IReadOnlyList GetAbbreviations(MassFlowUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.MassFlow"; - var resourceManager = new ResourceManager(resourceName, typeof(MassFlow).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MassFlow"; + var resourceManager = new ResourceManager(resourceName, typeof(MassFlow).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs index 59f4445a1e..0dfd419dc1 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs @@ -84,6 +84,8 @@ static MassFlux() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, MassFluxUnit Unit), List>(); } /// @@ -150,6 +152,11 @@ public MassFlux(double value, UnitSystem unitSystem) /// public static MassFlux AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, MassFluxUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -308,15 +315,22 @@ public static string GetAbbreviation(MassFluxUnit unit, IFormatProvider? provide /// public static IReadOnlyList GetAbbreviations(MassFluxUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.MassFlux"; - var resourceManager = new ResourceManager(resourceName, typeof(MassFlux).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MassFlux"; + var resourceManager = new ResourceManager(resourceName, typeof(MassFlux).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs index 4ac3577fc6..df55701c8a 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs @@ -99,6 +99,8 @@ static MassFraction() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, MassFractionUnit Unit), List>(); } /// @@ -165,6 +167,11 @@ public MassFraction(double value, UnitSystem unitSystem) /// public static MassFraction AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, MassFractionUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -407,15 +414,22 @@ public static string GetAbbreviation(MassFractionUnit unit, IFormatProvider? pro /// public static IReadOnlyList GetAbbreviations(MassFractionUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.MassFraction"; - var resourceManager = new ResourceManager(resourceName, typeof(MassFraction).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MassFraction"; + var resourceManager = new ResourceManager(resourceName, typeof(MassFraction).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs b/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs index 7941f62ede..1fbf1396e0 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs @@ -100,6 +100,8 @@ static MassMomentOfInertia() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, MassMomentOfInertiaUnit Unit), List>(); } /// @@ -166,6 +168,11 @@ public MassMomentOfInertia(double value, UnitSystem unitSystem) /// public static MassMomentOfInertia AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, MassMomentOfInertiaUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -436,15 +443,22 @@ public static string GetAbbreviation(MassMomentOfInertiaUnit unit, IFormatProvid /// public static IReadOnlyList GetAbbreviations(MassMomentOfInertiaUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.MassMomentOfInertia"; - var resourceManager = new ResourceManager(resourceName, typeof(MassMomentOfInertia).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MassMomentOfInertia"; + var resourceManager = new ResourceManager(resourceName, typeof(MassMomentOfInertia).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs index e048d801ba..8e0ea0776e 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs @@ -75,6 +75,8 @@ static MolarEnergy() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, MolarEnergyUnit Unit), List>(); } /// @@ -141,6 +143,11 @@ public MolarEnergy(double value, UnitSystem unitSystem) /// public static MolarEnergy AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, MolarEnergyUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -236,15 +243,22 @@ public static string GetAbbreviation(MolarEnergyUnit unit, IFormatProvider? prov /// public static IReadOnlyList GetAbbreviations(MolarEnergyUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.MolarEnergy"; - var resourceManager = new ResourceManager(resourceName, typeof(MolarEnergy).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MolarEnergy"; + var resourceManager = new ResourceManager(resourceName, typeof(MolarEnergy).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs index cb46d32a0d..b4add55e63 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs @@ -75,6 +75,8 @@ static MolarEntropy() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, MolarEntropyUnit Unit), List>(); } /// @@ -141,6 +143,11 @@ public MolarEntropy(double value, UnitSystem unitSystem) /// public static MolarEntropy AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, MolarEntropyUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -236,15 +243,22 @@ public static string GetAbbreviation(MolarEntropyUnit unit, IFormatProvider? pro /// public static IReadOnlyList GetAbbreviations(MolarEntropyUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.MolarEntropy"; - var resourceManager = new ResourceManager(resourceName, typeof(MolarEntropy).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MolarEntropy"; + var resourceManager = new ResourceManager(resourceName, typeof(MolarEntropy).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs index 78ceb32008..9dec6f7a2d 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs @@ -81,6 +81,8 @@ static MolarFlow() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, MolarFlowUnit Unit), List>(); } /// @@ -147,6 +149,11 @@ public MolarFlow(double value, UnitSystem unitSystem) /// public static MolarFlow AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, MolarFlowUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -284,15 +291,22 @@ public static string GetAbbreviation(MolarFlowUnit unit, IFormatProvider? provid /// public static IReadOnlyList GetAbbreviations(MolarFlowUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.MolarFlow"; - var resourceManager = new ResourceManager(resourceName, typeof(MolarFlow).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MolarFlow"; + var resourceManager = new ResourceManager(resourceName, typeof(MolarFlow).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs index 156f6e35d3..2104819adc 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs @@ -85,6 +85,8 @@ static MolarMass() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, MolarMassUnit Unit), List>(); } /// @@ -151,6 +153,11 @@ public MolarMass(double value, UnitSystem unitSystem) /// public static MolarMass AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, MolarMassUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -316,15 +323,22 @@ public static string GetAbbreviation(MolarMassUnit unit, IFormatProvider? provid /// public static IReadOnlyList GetAbbreviations(MolarMassUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.MolarMass"; - var resourceManager = new ResourceManager(resourceName, typeof(MolarMass).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MolarMass"; + var resourceManager = new ResourceManager(resourceName, typeof(MolarMass).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs b/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs index fec9d4a63e..ecfcf7e5a4 100644 --- a/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs @@ -86,6 +86,8 @@ static Molarity() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, MolarityUnit Unit), List>(); } /// @@ -152,6 +154,11 @@ public Molarity(double value, UnitSystem unitSystem) /// public static Molarity AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, MolarityUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -303,15 +310,22 @@ public static string GetAbbreviation(MolarityUnit unit, IFormatProvider? provide /// public static IReadOnlyList GetAbbreviations(MolarityUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Molarity"; - var resourceManager = new ResourceManager(resourceName, typeof(Molarity).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Molarity"; + var resourceManager = new ResourceManager(resourceName, typeof(Molarity).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs b/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs index b8096a4877..3f7c9e55c7 100644 --- a/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs @@ -76,6 +76,8 @@ static Permeability() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, PermeabilityUnit Unit), List>(); } /// @@ -142,6 +144,11 @@ public Permeability(double value, UnitSystem unitSystem) /// public static Permeability AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, PermeabilityUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -223,15 +230,22 @@ public static string GetAbbreviation(PermeabilityUnit unit, IFormatProvider? pro /// public static IReadOnlyList GetAbbreviations(PermeabilityUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Permeability"; - var resourceManager = new ResourceManager(resourceName, typeof(Permeability).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Permeability"; + var resourceManager = new ResourceManager(resourceName, typeof(Permeability).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs b/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs index c272662dfe..ee8c8aa795 100644 --- a/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs @@ -76,6 +76,8 @@ static Permittivity() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, PermittivityUnit Unit), List>(); } /// @@ -142,6 +144,11 @@ public Permittivity(double value, UnitSystem unitSystem) /// public static Permittivity AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, PermittivityUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -223,15 +230,22 @@ public static string GetAbbreviation(PermittivityUnit unit, IFormatProvider? pro /// public static IReadOnlyList GetAbbreviations(PermittivityUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Permittivity"; - var resourceManager = new ResourceManager(resourceName, typeof(Permittivity).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Permittivity"; + var resourceManager = new ResourceManager(resourceName, typeof(Permittivity).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/PorousMediumPermeability.g.cs b/UnitsNet/GeneratedCode/Quantities/PorousMediumPermeability.g.cs index b4b5faddd6..c4f8fd8642 100644 --- a/UnitsNet/GeneratedCode/Quantities/PorousMediumPermeability.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PorousMediumPermeability.g.cs @@ -80,6 +80,8 @@ static PorousMediumPermeability() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, PorousMediumPermeabilityUnit Unit), List>(); } /// @@ -146,6 +148,11 @@ public PorousMediumPermeability(double value, UnitSystem unitSystem) /// public static PorousMediumPermeability AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, PorousMediumPermeabilityUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -255,15 +262,22 @@ public static string GetAbbreviation(PorousMediumPermeabilityUnit unit, IFormatP /// public static IReadOnlyList GetAbbreviations(PorousMediumPermeabilityUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.PorousMediumPermeability"; - var resourceManager = new ResourceManager(resourceName, typeof(PorousMediumPermeability).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.PorousMediumPermeability"; + var resourceManager = new ResourceManager(resourceName, typeof(PorousMediumPermeability).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/Power.g.cs b/UnitsNet/GeneratedCode/Quantities/Power.g.cs index 49ec721d0c..fcf7d4a4fd 100644 --- a/UnitsNet/GeneratedCode/Quantities/Power.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Power.g.cs @@ -99,6 +99,8 @@ static Power() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, PowerUnit Unit), List>(); } /// @@ -165,6 +167,11 @@ public Power(decimal value, UnitSystem unitSystem) /// public static Power AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, PowerUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -421,15 +428,22 @@ public static string GetAbbreviation(PowerUnit unit, IFormatProvider? provider) /// public static IReadOnlyList GetAbbreviations(PowerUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Power"; - var resourceManager = new ResourceManager(resourceName, typeof(Power).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Power"; + var resourceManager = new ResourceManager(resourceName, typeof(Power).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs index 519afe4597..d1b81276d6 100644 --- a/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs @@ -116,6 +116,8 @@ static PowerDensity() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, PowerDensityUnit Unit), List>(); } /// @@ -182,6 +184,11 @@ public PowerDensity(double value, UnitSystem unitSystem) /// public static PowerDensity AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, PowerDensityUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -564,15 +571,22 @@ public static string GetAbbreviation(PowerDensityUnit unit, IFormatProvider? pro /// public static IReadOnlyList GetAbbreviations(PowerDensityUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.PowerDensity"; - var resourceManager = new ResourceManager(resourceName, typeof(PowerDensity).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.PowerDensity"; + var resourceManager = new ResourceManager(resourceName, typeof(PowerDensity).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs b/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs index eb7b1e55d6..5fb28206cc 100644 --- a/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs @@ -74,6 +74,8 @@ static PowerRatio() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, PowerRatioUnit Unit), List>(); } /// @@ -140,6 +142,11 @@ public PowerRatio(double value, UnitSystem unitSystem) /// public static PowerRatio AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, PowerRatioUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -228,15 +235,22 @@ public static string GetAbbreviation(PowerRatioUnit unit, IFormatProvider? provi /// public static IReadOnlyList GetAbbreviations(PowerRatioUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.PowerRatio"; - var resourceManager = new ResourceManager(resourceName, typeof(PowerRatio).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.PowerRatio"; + var resourceManager = new ResourceManager(resourceName, typeof(PowerRatio).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs b/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs index f72be5e5ea..3a11160f30 100644 --- a/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs @@ -119,6 +119,8 @@ static Pressure() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, PressureUnit Unit), List>(); } /// @@ -185,6 +187,11 @@ public Pressure(double value, UnitSystem unitSystem) /// public static Pressure AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, PressureUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -588,15 +595,22 @@ public static string GetAbbreviation(PressureUnit unit, IFormatProvider? provide /// public static IReadOnlyList GetAbbreviations(PressureUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Pressure"; - var resourceManager = new ResourceManager(resourceName, typeof(Pressure).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Pressure"; + var resourceManager = new ResourceManager(resourceName, typeof(Pressure).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs index 2db50242ca..5c7baf0540 100644 --- a/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs @@ -86,6 +86,8 @@ static PressureChangeRate() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, PressureChangeRateUnit Unit), List>(); } /// @@ -152,6 +154,11 @@ public PressureChangeRate(double value, UnitSystem unitSystem) /// public static PressureChangeRate AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, PressureChangeRateUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -324,15 +331,22 @@ public static string GetAbbreviation(PressureChangeRateUnit unit, IFormatProvide /// public static IReadOnlyList GetAbbreviations(PressureChangeRateUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.PressureChangeRate"; - var resourceManager = new ResourceManager(resourceName, typeof(PressureChangeRate).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.PressureChangeRate"; + var resourceManager = new ResourceManager(resourceName, typeof(PressureChangeRate).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs b/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs index 642cfeadb6..f4e70811d9 100644 --- a/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs @@ -78,6 +78,8 @@ static Ratio() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, RatioUnit Unit), List>(); } /// @@ -144,6 +146,11 @@ public Ratio(double value, UnitSystem unitSystem) /// public static Ratio AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, RatioUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -260,15 +267,22 @@ public static string GetAbbreviation(RatioUnit unit, IFormatProvider? provider) /// public static IReadOnlyList GetAbbreviations(RatioUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Ratio"; - var resourceManager = new ResourceManager(resourceName, typeof(Ratio).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Ratio"; + var resourceManager = new ResourceManager(resourceName, typeof(Ratio).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs index 649105e57b..1c87704215 100644 --- a/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs @@ -74,6 +74,8 @@ static RatioChangeRate() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, RatioChangeRateUnit Unit), List>(); } /// @@ -140,6 +142,11 @@ public RatioChangeRate(double value, UnitSystem unitSystem) /// public static RatioChangeRate AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, RatioChangeRateUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -228,15 +235,22 @@ public static string GetAbbreviation(RatioChangeRateUnit unit, IFormatProvider? /// public static IReadOnlyList GetAbbreviations(RatioChangeRateUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.RatioChangeRate"; - var resourceManager = new ResourceManager(resourceName, typeof(RatioChangeRate).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.RatioChangeRate"; + var resourceManager = new ResourceManager(resourceName, typeof(RatioChangeRate).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs index 3af83df5e2..150fca0a34 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs @@ -75,6 +75,8 @@ static ReactiveEnergy() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, ReactiveEnergyUnit Unit), List>(); } /// @@ -141,6 +143,11 @@ public ReactiveEnergy(double value, UnitSystem unitSystem) /// public static ReactiveEnergy AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, ReactiveEnergyUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -236,15 +243,22 @@ public static string GetAbbreviation(ReactiveEnergyUnit unit, IFormatProvider? p /// public static IReadOnlyList GetAbbreviations(ReactiveEnergyUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ReactiveEnergy"; - var resourceManager = new ResourceManager(resourceName, typeof(ReactiveEnergy).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ReactiveEnergy"; + var resourceManager = new ResourceManager(resourceName, typeof(ReactiveEnergy).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs b/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs index d49f52bf89..1e555ecfa7 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs @@ -76,6 +76,8 @@ static ReactivePower() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, ReactivePowerUnit Unit), List>(); } /// @@ -142,6 +144,11 @@ public ReactivePower(double value, UnitSystem unitSystem) /// public static ReactivePower AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, ReactivePowerUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -244,15 +251,22 @@ public static string GetAbbreviation(ReactivePowerUnit unit, IFormatProvider? pr /// public static IReadOnlyList GetAbbreviations(ReactivePowerUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ReactivePower"; - var resourceManager = new ResourceManager(resourceName, typeof(ReactivePower).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ReactivePower"; + var resourceManager = new ResourceManager(resourceName, typeof(ReactivePower).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs b/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs index a61fe117ab..be99f8ad72 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs @@ -86,6 +86,8 @@ static ReciprocalArea() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, ReciprocalAreaUnit Unit), List>(); } /// @@ -152,6 +154,11 @@ public ReciprocalArea(double value, UnitSystem unitSystem) /// public static ReciprocalArea AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, ReciprocalAreaUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -303,15 +310,22 @@ public static string GetAbbreviation(ReciprocalAreaUnit unit, IFormatProvider? p /// public static IReadOnlyList GetAbbreviations(ReciprocalAreaUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ReciprocalArea"; - var resourceManager = new ResourceManager(resourceName, typeof(ReciprocalArea).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ReciprocalArea"; + var resourceManager = new ResourceManager(resourceName, typeof(ReciprocalArea).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs b/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs index d114873e11..43ce40ce4b 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs @@ -85,6 +85,8 @@ static ReciprocalLength() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, ReciprocalLengthUnit Unit), List>(); } /// @@ -151,6 +153,11 @@ public ReciprocalLength(double value, UnitSystem unitSystem) /// public static ReciprocalLength AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, ReciprocalLengthUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -295,15 +302,22 @@ public static string GetAbbreviation(ReciprocalLengthUnit unit, IFormatProvider? /// public static IReadOnlyList GetAbbreviations(ReciprocalLengthUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ReciprocalLength"; - var resourceManager = new ResourceManager(resourceName, typeof(ReciprocalLength).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ReciprocalLength"; + var resourceManager = new ResourceManager(resourceName, typeof(ReciprocalLength).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs b/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs index 9144681298..e856150f01 100644 --- a/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs @@ -73,6 +73,8 @@ static RelativeHumidity() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, RelativeHumidityUnit Unit), List>(); } /// @@ -139,6 +141,11 @@ public RelativeHumidity(double value, UnitSystem unitSystem) /// public static RelativeHumidity AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, RelativeHumidityUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -220,15 +227,22 @@ public static string GetAbbreviation(RelativeHumidityUnit unit, IFormatProvider? /// public static IReadOnlyList GetAbbreviations(RelativeHumidityUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.RelativeHumidity"; - var resourceManager = new ResourceManager(resourceName, typeof(RelativeHumidity).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.RelativeHumidity"; + var resourceManager = new ResourceManager(resourceName, typeof(RelativeHumidity).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.g.cs index 7c874ed814..3c7b333a6b 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.g.cs @@ -76,6 +76,8 @@ static RotationalAcceleration() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, RotationalAccelerationUnit Unit), List>(); } /// @@ -142,6 +144,11 @@ public RotationalAcceleration(double value, UnitSystem unitSystem) /// public static RotationalAcceleration AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, RotationalAccelerationUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -244,15 +251,22 @@ public static string GetAbbreviation(RotationalAccelerationUnit unit, IFormatPro /// public static IReadOnlyList GetAbbreviations(RotationalAccelerationUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.RotationalAcceleration"; - var resourceManager = new ResourceManager(resourceName, typeof(RotationalAcceleration).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.RotationalAcceleration"; + var resourceManager = new ResourceManager(resourceName, typeof(RotationalAcceleration).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs index b0f08607aa..02cf172dbb 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs @@ -85,6 +85,8 @@ static RotationalSpeed() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, RotationalSpeedUnit Unit), List>(); } /// @@ -151,6 +153,11 @@ public RotationalSpeed(double value, UnitSystem unitSystem) /// public static RotationalSpeed AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, RotationalSpeedUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -316,15 +323,22 @@ public static string GetAbbreviation(RotationalSpeedUnit unit, IFormatProvider? /// public static IReadOnlyList GetAbbreviations(RotationalSpeedUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.RotationalSpeed"; - var resourceManager = new ResourceManager(resourceName, typeof(RotationalSpeed).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.RotationalSpeed"; + var resourceManager = new ResourceManager(resourceName, typeof(RotationalSpeed).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs index cfda295625..8cb61d70ef 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs @@ -105,6 +105,8 @@ static RotationalStiffness() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, RotationalStiffnessUnit Unit), List>(); } /// @@ -171,6 +173,11 @@ public RotationalStiffness(double value, UnitSystem unitSystem) /// public static RotationalStiffness AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, RotationalStiffnessUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -476,15 +483,22 @@ public static string GetAbbreviation(RotationalStiffnessUnit unit, IFormatProvid /// public static IReadOnlyList GetAbbreviations(RotationalStiffnessUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.RotationalStiffness"; - var resourceManager = new ResourceManager(resourceName, typeof(RotationalStiffness).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.RotationalStiffness"; + var resourceManager = new ResourceManager(resourceName, typeof(RotationalStiffness).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs index a316015173..58db6fffe8 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs @@ -77,6 +77,8 @@ static RotationalStiffnessPerLength() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, RotationalStiffnessPerLengthUnit Unit), List>(); } /// @@ -143,6 +145,11 @@ public RotationalStiffnessPerLength(double value, UnitSystem unitSystem) /// public static RotationalStiffnessPerLength AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, RotationalStiffnessPerLengthUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -252,15 +259,22 @@ public static string GetAbbreviation(RotationalStiffnessPerLengthUnit unit, IFor /// public static IReadOnlyList GetAbbreviations(RotationalStiffnessPerLengthUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.RotationalStiffnessPerLength"; - var resourceManager = new ResourceManager(resourceName, typeof(RotationalStiffnessPerLength).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.RotationalStiffnessPerLength"; + var resourceManager = new ResourceManager(resourceName, typeof(RotationalStiffnessPerLength).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/Scalar.g.cs b/UnitsNet/GeneratedCode/Quantities/Scalar.g.cs index 01e452df5c..7f8609fd29 100644 --- a/UnitsNet/GeneratedCode/Quantities/Scalar.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Scalar.g.cs @@ -73,6 +73,8 @@ static Scalar() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, ScalarUnit Unit), List>(); } /// @@ -139,6 +141,11 @@ public Scalar(double value, UnitSystem unitSystem) /// public static Scalar AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, ScalarUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -220,15 +227,22 @@ public static string GetAbbreviation(ScalarUnit unit, IFormatProvider? provider) /// public static IReadOnlyList GetAbbreviations(ScalarUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Scalar"; - var resourceManager = new ResourceManager(resourceName, typeof(Scalar).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Scalar"; + var resourceManager = new ResourceManager(resourceName, typeof(Scalar).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs b/UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs index 31e11de6d2..b71d15d9c6 100644 --- a/UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs @@ -76,6 +76,8 @@ static SolidAngle() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, SolidAngleUnit Unit), List>(); } /// @@ -142,6 +144,11 @@ public SolidAngle(double value, UnitSystem unitSystem) /// public static SolidAngle AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, SolidAngleUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -223,15 +230,22 @@ public static string GetAbbreviation(SolidAngleUnit unit, IFormatProvider? provi /// public static IReadOnlyList GetAbbreviations(SolidAngleUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.SolidAngle"; - var resourceManager = new ResourceManager(resourceName, typeof(SolidAngle).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.SolidAngle"; + var resourceManager = new ResourceManager(resourceName, typeof(SolidAngle).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs index 80290c7fb1..aaa01213c2 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs @@ -105,6 +105,8 @@ static SpecificEnergy() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, SpecificEnergyUnit Unit), List>(); } /// @@ -171,6 +173,11 @@ public SpecificEnergy(double value, UnitSystem unitSystem) /// public static SpecificEnergy AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, SpecificEnergyUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -455,15 +462,22 @@ public static string GetAbbreviation(SpecificEnergyUnit unit, IFormatProvider? p /// public static IReadOnlyList GetAbbreviations(SpecificEnergyUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.SpecificEnergy"; - var resourceManager = new ResourceManager(resourceName, typeof(SpecificEnergy).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.SpecificEnergy"; + var resourceManager = new ResourceManager(resourceName, typeof(SpecificEnergy).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs index ff2e009c2f..41c8f40887 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs @@ -81,6 +81,8 @@ static SpecificEntropy() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, SpecificEntropyUnit Unit), List>(); } /// @@ -147,6 +149,11 @@ public SpecificEntropy(double value, UnitSystem unitSystem) /// public static SpecificEntropy AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, SpecificEntropyUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -284,15 +291,22 @@ public static string GetAbbreviation(SpecificEntropyUnit unit, IFormatProvider? /// public static IReadOnlyList GetAbbreviations(SpecificEntropyUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.SpecificEntropy"; - var resourceManager = new ResourceManager(resourceName, typeof(SpecificEntropy).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.SpecificEntropy"; + var resourceManager = new ResourceManager(resourceName, typeof(SpecificEntropy).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs index b20452042f..a2a918dad1 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs @@ -79,6 +79,8 @@ static SpecificFuelConsumption() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, SpecificFuelConsumptionUnit Unit), List>(); } /// @@ -145,6 +147,11 @@ public SpecificFuelConsumption(double value, UnitSystem unitSystem) /// public static SpecificFuelConsumption AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, SpecificFuelConsumptionUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -247,15 +254,22 @@ public static string GetAbbreviation(SpecificFuelConsumptionUnit unit, IFormatPr /// public static IReadOnlyList GetAbbreviations(SpecificFuelConsumptionUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.SpecificFuelConsumption"; - var resourceManager = new ResourceManager(resourceName, typeof(SpecificFuelConsumption).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.SpecificFuelConsumption"; + var resourceManager = new ResourceManager(resourceName, typeof(SpecificFuelConsumption).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs index d3b7bc89c2..eacf9aa7c2 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs @@ -75,6 +75,8 @@ static SpecificVolume() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, SpecificVolumeUnit Unit), List>(); } /// @@ -141,6 +143,11 @@ public SpecificVolume(double value, UnitSystem unitSystem) /// public static SpecificVolume AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, SpecificVolumeUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -236,15 +243,22 @@ public static string GetAbbreviation(SpecificVolumeUnit unit, IFormatProvider? p /// public static IReadOnlyList GetAbbreviations(SpecificVolumeUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.SpecificVolume"; - var resourceManager = new ResourceManager(resourceName, typeof(SpecificVolume).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.SpecificVolume"; + var resourceManager = new ResourceManager(resourceName, typeof(SpecificVolume).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs index 670c6f978e..1290ea7c7e 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs @@ -92,6 +92,8 @@ static SpecificWeight() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, SpecificWeightUnit Unit), List>(); } /// @@ -158,6 +160,11 @@ public SpecificWeight(double value, UnitSystem unitSystem) /// public static SpecificWeight AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, SpecificWeightUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -351,15 +358,22 @@ public static string GetAbbreviation(SpecificWeightUnit unit, IFormatProvider? p /// public static IReadOnlyList GetAbbreviations(SpecificWeightUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.SpecificWeight"; - var resourceManager = new ResourceManager(resourceName, typeof(SpecificWeight).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.SpecificWeight"; + var resourceManager = new ResourceManager(resourceName, typeof(SpecificWeight).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/Speed.g.cs b/UnitsNet/GeneratedCode/Quantities/Speed.g.cs index f17432422a..6a913ea042 100644 --- a/UnitsNet/GeneratedCode/Quantities/Speed.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Speed.g.cs @@ -105,6 +105,8 @@ static Speed() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, SpeedUnit Unit), List>(); } /// @@ -171,6 +173,11 @@ public Speed(double value, UnitSystem unitSystem) /// public static Speed AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, SpeedUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -476,15 +483,22 @@ public static string GetAbbreviation(SpeedUnit unit, IFormatProvider? provider) /// public static IReadOnlyList GetAbbreviations(SpeedUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Speed"; - var resourceManager = new ResourceManager(resourceName, typeof(Speed).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Speed"; + var resourceManager = new ResourceManager(resourceName, typeof(Speed).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/StandardVolumeFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/StandardVolumeFlow.g.cs index 19c0d2ed7d..1ab3087988 100644 --- a/UnitsNet/GeneratedCode/Quantities/StandardVolumeFlow.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/StandardVolumeFlow.g.cs @@ -81,6 +81,8 @@ static StandardVolumeFlow() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, StandardVolumeFlowUnit Unit), List>(); } /// @@ -147,6 +149,11 @@ public StandardVolumeFlow(double value, UnitSystem unitSystem) /// public static StandardVolumeFlow AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, StandardVolumeFlowUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -284,15 +291,22 @@ public static string GetAbbreviation(StandardVolumeFlowUnit unit, IFormatProvide /// public static IReadOnlyList GetAbbreviations(StandardVolumeFlowUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.StandardVolumeFlow"; - var resourceManager = new ResourceManager(resourceName, typeof(StandardVolumeFlow).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.StandardVolumeFlow"; + var resourceManager = new ResourceManager(resourceName, typeof(StandardVolumeFlow).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/Temperature.g.cs b/UnitsNet/GeneratedCode/Quantities/Temperature.g.cs index 03832079f0..9853f8cf15 100644 --- a/UnitsNet/GeneratedCode/Quantities/Temperature.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Temperature.g.cs @@ -82,6 +82,8 @@ static Temperature() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, TemperatureUnit Unit), List>(); } /// @@ -145,6 +147,11 @@ public Temperature(double value, UnitSystem unitSystem) /// public static Temperature Zero { get; } + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, TemperatureUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -289,15 +296,22 @@ public static string GetAbbreviation(TemperatureUnit unit, IFormatProvider? prov /// public static IReadOnlyList GetAbbreviations(TemperatureUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Temperature"; - var resourceManager = new ResourceManager(resourceName, typeof(Temperature).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Temperature"; + var resourceManager = new ResourceManager(resourceName, typeof(Temperature).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs index 5ed6831285..9efee8c313 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs @@ -82,6 +82,8 @@ static TemperatureChangeRate() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, TemperatureChangeRateUnit Unit), List>(); } /// @@ -148,6 +150,11 @@ public TemperatureChangeRate(double value, UnitSystem unitSystem) /// public static TemperatureChangeRate AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, TemperatureChangeRateUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -292,15 +299,22 @@ public static string GetAbbreviation(TemperatureChangeRateUnit unit, IFormatProv /// public static IReadOnlyList GetAbbreviations(TemperatureChangeRateUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.TemperatureChangeRate"; - var resourceManager = new ResourceManager(resourceName, typeof(TemperatureChangeRate).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.TemperatureChangeRate"; + var resourceManager = new ResourceManager(resourceName, typeof(TemperatureChangeRate).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs index b1b78d93e2..cf75cd93ca 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs @@ -81,6 +81,8 @@ static TemperatureDelta() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, TemperatureDeltaUnit Unit), List>(); } /// @@ -147,6 +149,11 @@ public TemperatureDelta(double value, UnitSystem unitSystem) /// public static TemperatureDelta AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, TemperatureDeltaUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -284,15 +291,22 @@ public static string GetAbbreviation(TemperatureDeltaUnit unit, IFormatProvider? /// public static IReadOnlyList GetAbbreviations(TemperatureDeltaUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.TemperatureDelta"; - var resourceManager = new ResourceManager(resourceName, typeof(TemperatureDelta).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.TemperatureDelta"; + var resourceManager = new ResourceManager(resourceName, typeof(TemperatureDelta).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureGradient.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureGradient.g.cs index 1768d39327..534dcaa34c 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureGradient.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureGradient.g.cs @@ -76,6 +76,8 @@ static TemperatureGradient() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, TemperatureGradientUnit Unit), List>(); } /// @@ -142,6 +144,11 @@ public TemperatureGradient(double value, UnitSystem unitSystem) /// public static TemperatureGradient AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, TemperatureGradientUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -244,15 +251,22 @@ public static string GetAbbreviation(TemperatureGradientUnit unit, IFormatProvid /// public static IReadOnlyList GetAbbreviations(TemperatureGradientUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.TemperatureGradient"; - var resourceManager = new ResourceManager(resourceName, typeof(TemperatureGradient).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.TemperatureGradient"; + var resourceManager = new ResourceManager(resourceName, typeof(TemperatureGradient).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs b/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs index 948603050e..b40b135661 100644 --- a/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs @@ -77,6 +77,8 @@ static ThermalConductivity() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, ThermalConductivityUnit Unit), List>(); } /// @@ -143,6 +145,11 @@ public ThermalConductivity(double value, UnitSystem unitSystem) /// public static ThermalConductivity AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, ThermalConductivityUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -231,15 +238,22 @@ public static string GetAbbreviation(ThermalConductivityUnit unit, IFormatProvid /// public static IReadOnlyList GetAbbreviations(ThermalConductivityUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ThermalConductivity"; - var resourceManager = new ResourceManager(resourceName, typeof(ThermalConductivity).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ThermalConductivity"; + var resourceManager = new ResourceManager(resourceName, typeof(ThermalConductivity).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs b/UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs index d16b43a4c5..f1adabb9e1 100644 --- a/UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs @@ -78,6 +78,8 @@ static ThermalResistance() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, ThermalResistanceUnit Unit), List>(); } /// @@ -144,6 +146,11 @@ public ThermalResistance(double value, UnitSystem unitSystem) /// public static ThermalResistance AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, ThermalResistanceUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -260,15 +267,22 @@ public static string GetAbbreviation(ThermalResistanceUnit unit, IFormatProvider /// public static IReadOnlyList GetAbbreviations(ThermalResistanceUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ThermalResistance"; - var resourceManager = new ResourceManager(resourceName, typeof(ThermalResistance).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ThermalResistance"; + var resourceManager = new ResourceManager(resourceName, typeof(ThermalResistance).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/Torque.g.cs b/UnitsNet/GeneratedCode/Quantities/Torque.g.cs index 6c2f3a18b9..a80f15c07e 100644 --- a/UnitsNet/GeneratedCode/Quantities/Torque.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Torque.g.cs @@ -97,6 +97,8 @@ static Torque() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, TorqueUnit Unit), List>(); } /// @@ -163,6 +165,11 @@ public Torque(double value, UnitSystem unitSystem) /// public static Torque AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, TorqueUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -412,15 +419,22 @@ public static string GetAbbreviation(TorqueUnit unit, IFormatProvider? provider) /// public static IReadOnlyList GetAbbreviations(TorqueUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Torque"; - var resourceManager = new ResourceManager(resourceName, typeof(Torque).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Torque"; + var resourceManager = new ResourceManager(resourceName, typeof(Torque).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/TorquePerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/TorquePerLength.g.cs index 14a5c97463..31aafb9183 100644 --- a/UnitsNet/GeneratedCode/Quantities/TorquePerLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TorquePerLength.g.cs @@ -93,6 +93,8 @@ static TorquePerLength() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, TorquePerLengthUnit Unit), List>(); } /// @@ -159,6 +161,11 @@ public TorquePerLength(double value, UnitSystem unitSystem) /// public static TorquePerLength AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, TorquePerLengthUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -380,15 +387,22 @@ public static string GetAbbreviation(TorquePerLengthUnit unit, IFormatProvider? /// public static IReadOnlyList GetAbbreviations(TorquePerLengthUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.TorquePerLength"; - var resourceManager = new ResourceManager(resourceName, typeof(TorquePerLength).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.TorquePerLength"; + var resourceManager = new ResourceManager(resourceName, typeof(TorquePerLength).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/Turbidity.g.cs b/UnitsNet/GeneratedCode/Quantities/Turbidity.g.cs index fde9235502..9a2ad091a0 100644 --- a/UnitsNet/GeneratedCode/Quantities/Turbidity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Turbidity.g.cs @@ -76,6 +76,8 @@ static Turbidity() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, TurbidityUnit Unit), List>(); } /// @@ -142,6 +144,11 @@ public Turbidity(double value, UnitSystem unitSystem) /// public static Turbidity AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, TurbidityUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -223,15 +230,22 @@ public static string GetAbbreviation(TurbidityUnit unit, IFormatProvider? provid /// public static IReadOnlyList GetAbbreviations(TurbidityUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Turbidity"; - var resourceManager = new ResourceManager(resourceName, typeof(Turbidity).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Turbidity"; + var resourceManager = new ResourceManager(resourceName, typeof(Turbidity).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs b/UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs index 8d6d26c6b7..f4036d5334 100644 --- a/UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs @@ -73,6 +73,8 @@ static VitaminA() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, VitaminAUnit Unit), List>(); } /// @@ -139,6 +141,11 @@ public VitaminA(double value, UnitSystem unitSystem) /// public static VitaminA AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, VitaminAUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -220,15 +227,22 @@ public static string GetAbbreviation(VitaminAUnit unit, IFormatProvider? provide /// public static IReadOnlyList GetAbbreviations(VitaminAUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.VitaminA"; - var resourceManager = new ResourceManager(resourceName, typeof(VitaminA).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.VitaminA"; + var resourceManager = new ResourceManager(resourceName, typeof(VitaminA).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/Volume.g.cs b/UnitsNet/GeneratedCode/Quantities/Volume.g.cs index b0c91b0338..2697b17858 100644 --- a/UnitsNet/GeneratedCode/Quantities/Volume.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Volume.g.cs @@ -125,6 +125,8 @@ static Volume() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, VolumeUnit Unit), List>(); } /// @@ -191,6 +193,11 @@ public Volume(double value, UnitSystem unitSystem) /// public static Volume AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, VolumeUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -636,15 +643,22 @@ public static string GetAbbreviation(VolumeUnit unit, IFormatProvider? provider) /// public static IReadOnlyList GetAbbreviations(VolumeUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Volume"; - var resourceManager = new ResourceManager(resourceName, typeof(Volume).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Volume"; + var resourceManager = new ResourceManager(resourceName, typeof(Volume).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs index bf9f756d2c..af6251592b 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs @@ -95,6 +95,8 @@ static VolumeConcentration() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, VolumeConcentrationUnit Unit), List>(); } /// @@ -161,6 +163,11 @@ public VolumeConcentration(double value, UnitSystem unitSystem) /// public static VolumeConcentration AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, VolumeConcentrationUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -375,15 +382,22 @@ public static string GetAbbreviation(VolumeConcentrationUnit unit, IFormatProvid /// public static IReadOnlyList GetAbbreviations(VolumeConcentrationUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.VolumeConcentration"; - var resourceManager = new ResourceManager(resourceName, typeof(VolumeConcentration).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.VolumeConcentration"; + var resourceManager = new ResourceManager(resourceName, typeof(VolumeConcentration).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs index aeafca48fa..ca63471d23 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs @@ -134,6 +134,8 @@ static VolumeFlow() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, VolumeFlowUnit Unit), List>(); } /// @@ -200,6 +202,11 @@ public VolumeFlow(double value, UnitSystem unitSystem) /// public static VolumeFlow AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, VolumeFlowUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -708,15 +715,22 @@ public static string GetAbbreviation(VolumeFlowUnit unit, IFormatProvider? provi /// public static IReadOnlyList GetAbbreviations(VolumeFlowUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.VolumeFlow"; - var resourceManager = new ResourceManager(resourceName, typeof(VolumeFlow).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.VolumeFlow"; + var resourceManager = new ResourceManager(resourceName, typeof(VolumeFlow).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/VolumeFlowPerArea.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumeFlowPerArea.g.cs index efd50b739f..7dbcb19311 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumeFlowPerArea.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumeFlowPerArea.g.cs @@ -74,6 +74,8 @@ static VolumeFlowPerArea() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, VolumeFlowPerAreaUnit Unit), List>(); } /// @@ -140,6 +142,11 @@ public VolumeFlowPerArea(double value, UnitSystem unitSystem) /// public static VolumeFlowPerArea AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, VolumeFlowPerAreaUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -228,15 +235,22 @@ public static string GetAbbreviation(VolumeFlowPerAreaUnit unit, IFormatProvider /// public static IReadOnlyList GetAbbreviations(VolumeFlowPerAreaUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.VolumeFlowPerArea"; - var resourceManager = new ResourceManager(resourceName, typeof(VolumeFlowPerArea).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.VolumeFlowPerArea"; + var resourceManager = new ResourceManager(resourceName, typeof(VolumeFlowPerArea).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs index 969a76a835..6decfcea7c 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs @@ -79,6 +79,8 @@ static VolumePerLength() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, VolumePerLengthUnit Unit), List>(); } /// @@ -145,6 +147,11 @@ public VolumePerLength(double value, UnitSystem unitSystem) /// public static VolumePerLength AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, VolumePerLengthUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -268,15 +275,22 @@ public static string GetAbbreviation(VolumePerLengthUnit unit, IFormatProvider? /// public static IReadOnlyList GetAbbreviations(VolumePerLengthUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.VolumePerLength"; - var resourceManager = new ResourceManager(resourceName, typeof(VolumePerLength).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.VolumePerLength"; + var resourceManager = new ResourceManager(resourceName, typeof(VolumePerLength).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs index e22384c43a..a93d07a2b5 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs @@ -84,6 +84,8 @@ static VolumetricHeatCapacity() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, VolumetricHeatCapacityUnit Unit), List>(); } /// @@ -150,6 +152,11 @@ public VolumetricHeatCapacity(double value, UnitSystem unitSystem) /// public static VolumetricHeatCapacity AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, VolumetricHeatCapacityUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -287,15 +294,22 @@ public static string GetAbbreviation(VolumetricHeatCapacityUnit unit, IFormatPro /// public static IReadOnlyList GetAbbreviations(VolumetricHeatCapacityUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.VolumetricHeatCapacity"; - var resourceManager = new ResourceManager(resourceName, typeof(VolumetricHeatCapacity).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.VolumetricHeatCapacity"; + var resourceManager = new ResourceManager(resourceName, typeof(VolumetricHeatCapacity).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs b/UnitsNet/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs index d74af46fe0..e4aedd98fd 100644 --- a/UnitsNet/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs @@ -78,6 +78,8 @@ static WarpingMomentOfInertia() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); + + Abbreviations = new Dictionary<(CultureInfo Culture, WarpingMomentOfInertiaUnit Unit), List>(); } /// @@ -144,6 +146,11 @@ public WarpingMomentOfInertia(double value, UnitSystem unitSystem) /// public static WarpingMomentOfInertia AdditiveIdentity => Zero; + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + public static Dictionary<(CultureInfo Culture, WarpingMomentOfInertiaUnit Unit), List> Abbreviations { get; } + #endregion #region Properties @@ -260,15 +267,22 @@ public static string GetAbbreviation(WarpingMomentOfInertiaUnit unit, IFormatPro /// public static IReadOnlyList GetAbbreviations(WarpingMomentOfInertiaUnit unit, CultureInfo? culture = null) { - const string resourceName = $"UnitsNet.GeneratedCode.Resources.WarpingMomentOfInertia"; - var resourceManager = new ResourceManager(resourceName, typeof(WarpingMomentOfInertia).Assembly); + culture ??= CultureInfo.CurrentCulture; - var abbreviation = resourceManager.GetString(unit.ToString(), culture ?? CultureInfo.CurrentCulture); + if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) + { + abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.WarpingMomentOfInertia"; + var resourceManager = new ResourceManager(resourceName, typeof(WarpingMomentOfInertia).Assembly); - if(abbreviation is not null) - return abbreviation.Split(','); - else - return Array.Empty(); + var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); + if(abbreviationsString is not null) + abbreviations.AddRange(abbreviationsString.Split(',')); + + Abbreviations.Add((culture, unit), abbreviations); + } + + return abbreviations; } #endregion From ca51f4c1c58b1fb79366289119056b1412709919 Mon Sep 17 00:00:00 2001 From: Tristan Milnthorp Date: Thu, 2 Mar 2023 15:29:00 -0500 Subject: [PATCH 18/26] Cleanup --- .../UnitsNetGen/StaticQuantityGenerator.cs | 16 +- UnitsNet/GeneratedCode/Quantity.g.cs | 484 +++++------------- 2 files changed, 129 insertions(+), 371 deletions(-) diff --git a/CodeGen/Generators/UnitsNetGen/StaticQuantityGenerator.cs b/CodeGen/Generators/UnitsNetGen/StaticQuantityGenerator.cs index 4893cc3a6b..2fbfc6b4f9 100644 --- a/CodeGen/Generators/UnitsNetGen/StaticQuantityGenerator.cs +++ b/CodeGen/Generators/UnitsNetGen/StaticQuantityGenerator.cs @@ -73,7 +73,7 @@ public static IQuantity FromQuantityInfo(QuantityInfo quantityInfo, QuantityValu /// True if successful with assigned the value, otherwise false. public static bool TryFrom(QuantityValue value, Enum unit, [NotNullWhen(true)] out IQuantity? quantity) { - switch (unit) + quantity = unit switch {"); foreach (var quantity in _quantities) { @@ -81,18 +81,14 @@ public static bool TryFrom(QuantityValue value, Enum unit, [NotNullWhen(true)] o var unitTypeName = $"{quantityName}Unit"; var unitValue = unitTypeName.ToCamelCase(); Writer.WL($@" - case {unitTypeName} {unitValue}: - quantity = {quantityName}.From(value, {unitValue}); - return true;"); + {unitTypeName} {unitValue} => {quantityName}.From(value, {unitValue}),"); } Writer.WL(@" - default: - { - quantity = default(IQuantity); - return false; - } - } + _ => null + }; + + return quantity is not null; } /// diff --git a/UnitsNet/GeneratedCode/Quantity.g.cs b/UnitsNet/GeneratedCode/Quantity.g.cs index cf12ec4a83..b84e8cf1e3 100644 --- a/UnitsNet/GeneratedCode/Quantity.g.cs +++ b/UnitsNet/GeneratedCode/Quantity.g.cs @@ -298,368 +298,130 @@ public static IQuantity FromQuantityInfo(QuantityInfo quantityInfo, QuantityValu /// True if successful with assigned the value, otherwise false. public static bool TryFrom(QuantityValue value, Enum unit, [NotNullWhen(true)] out IQuantity? quantity) { - switch (unit) + quantity = unit switch { - 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 CompressibilityUnit compressibilityUnit: - quantity = Compressibility.From(value, compressibilityUnit); - 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 ElectricPotentialChangeRateUnit electricPotentialChangeRateUnit: - quantity = ElectricPotentialChangeRate.From(value, electricPotentialChangeRateUnit); - 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 ElectricSurfaceChargeDensityUnit electricSurfaceChargeDensityUnit: - quantity = ElectricSurfaceChargeDensity.From(value, electricSurfaceChargeDensityUnit); - return true; - case EnergyUnit energyUnit: - quantity = Energy.From(value, energyUnit); - return true; - case EnergyDensityUnit energyDensityUnit: - quantity = EnergyDensity.From(value, energyDensityUnit); - 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 FuelEfficiencyUnit fuelEfficiencyUnit: - quantity = FuelEfficiency.From(value, fuelEfficiencyUnit); - 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 ImpulseUnit impulseUnit: - quantity = Impulse.From(value, impulseUnit); - 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 JerkUnit jerkUnit: - quantity = Jerk.From(value, jerkUnit); - return true; - case KinematicViscosityUnit kinematicViscosityUnit: - quantity = KinematicViscosity.From(value, kinematicViscosityUnit); - 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 LinearPowerDensityUnit linearPowerDensityUnit: - quantity = LinearPowerDensity.From(value, linearPowerDensityUnit); - return true; - case LuminanceUnit luminanceUnit: - quantity = Luminance.From(value, luminanceUnit); - return true; - case LuminosityUnit luminosityUnit: - quantity = Luminosity.From(value, luminosityUnit); - 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 MassConcentrationUnit massConcentrationUnit: - quantity = MassConcentration.From(value, massConcentrationUnit); - return true; - case MassFlowUnit massFlowUnit: - quantity = MassFlow.From(value, massFlowUnit); - return true; - case MassFluxUnit massFluxUnit: - quantity = MassFlux.From(value, massFluxUnit); - return true; - case MassFractionUnit massFractionUnit: - quantity = MassFraction.From(value, massFractionUnit); - 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 MolarFlowUnit molarFlowUnit: - quantity = MolarFlow.From(value, molarFlowUnit); - 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 PorousMediumPermeabilityUnit porousMediumPermeabilityUnit: - quantity = PorousMediumPermeability.From(value, porousMediumPermeabilityUnit); - 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 RatioChangeRateUnit ratioChangeRateUnit: - quantity = RatioChangeRate.From(value, ratioChangeRateUnit); - return true; - case ReactiveEnergyUnit reactiveEnergyUnit: - quantity = ReactiveEnergy.From(value, reactiveEnergyUnit); - return true; - case ReactivePowerUnit reactivePowerUnit: - quantity = ReactivePower.From(value, reactivePowerUnit); - return true; - case ReciprocalAreaUnit reciprocalAreaUnit: - quantity = ReciprocalArea.From(value, reciprocalAreaUnit); - return true; - case ReciprocalLengthUnit reciprocalLengthUnit: - quantity = ReciprocalLength.From(value, reciprocalLengthUnit); - return true; - case RelativeHumidityUnit relativeHumidityUnit: - quantity = RelativeHumidity.From(value, relativeHumidityUnit); - 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 ScalarUnit scalarUnit: - quantity = Scalar.From(value, scalarUnit); - 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 SpecificFuelConsumptionUnit specificFuelConsumptionUnit: - quantity = SpecificFuelConsumption.From(value, specificFuelConsumptionUnit); - 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 StandardVolumeFlowUnit standardVolumeFlowUnit: - quantity = StandardVolumeFlow.From(value, standardVolumeFlowUnit); - 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 TemperatureGradientUnit temperatureGradientUnit: - quantity = TemperatureGradient.From(value, temperatureGradientUnit); - 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 TorquePerLengthUnit torquePerLengthUnit: - quantity = TorquePerLength.From(value, torquePerLengthUnit); - return true; - case TurbidityUnit turbidityUnit: - quantity = Turbidity.From(value, turbidityUnit); - return true; - case VitaminAUnit vitaminAUnit: - quantity = VitaminA.From(value, vitaminAUnit); - return true; - case VolumeUnit volumeUnit: - quantity = Volume.From(value, volumeUnit); - return true; - case VolumeConcentrationUnit volumeConcentrationUnit: - quantity = VolumeConcentration.From(value, volumeConcentrationUnit); - return true; - case VolumeFlowUnit volumeFlowUnit: - quantity = VolumeFlow.From(value, volumeFlowUnit); - return true; - case VolumeFlowPerAreaUnit volumeFlowPerAreaUnit: - quantity = VolumeFlowPerArea.From(value, volumeFlowPerAreaUnit); - return true; - case VolumePerLengthUnit volumePerLengthUnit: - quantity = VolumePerLength.From(value, volumePerLengthUnit); - return true; - case VolumetricHeatCapacityUnit volumetricHeatCapacityUnit: - quantity = VolumetricHeatCapacity.From(value, volumetricHeatCapacityUnit); - return true; - case WarpingMomentOfInertiaUnit warpingMomentOfInertiaUnit: - quantity = WarpingMomentOfInertia.From(value, warpingMomentOfInertiaUnit); - return true; - default: - { - quantity = default(IQuantity); - return false; - } - } + AccelerationUnit accelerationUnit => Acceleration.From(value, accelerationUnit), + AmountOfSubstanceUnit amountOfSubstanceUnit => AmountOfSubstance.From(value, amountOfSubstanceUnit), + AmplitudeRatioUnit amplitudeRatioUnit => AmplitudeRatio.From(value, amplitudeRatioUnit), + AngleUnit angleUnit => Angle.From(value, angleUnit), + ApparentEnergyUnit apparentEnergyUnit => ApparentEnergy.From(value, apparentEnergyUnit), + ApparentPowerUnit apparentPowerUnit => ApparentPower.From(value, apparentPowerUnit), + AreaUnit areaUnit => Area.From(value, areaUnit), + AreaDensityUnit areaDensityUnit => AreaDensity.From(value, areaDensityUnit), + AreaMomentOfInertiaUnit areaMomentOfInertiaUnit => AreaMomentOfInertia.From(value, areaMomentOfInertiaUnit), + BitRateUnit bitRateUnit => BitRate.From(value, bitRateUnit), + BrakeSpecificFuelConsumptionUnit brakeSpecificFuelConsumptionUnit => BrakeSpecificFuelConsumption.From(value, brakeSpecificFuelConsumptionUnit), + CapacitanceUnit capacitanceUnit => Capacitance.From(value, capacitanceUnit), + CoefficientOfThermalExpansionUnit coefficientOfThermalExpansionUnit => CoefficientOfThermalExpansion.From(value, coefficientOfThermalExpansionUnit), + CompressibilityUnit compressibilityUnit => Compressibility.From(value, compressibilityUnit), + DensityUnit densityUnit => Density.From(value, densityUnit), + DurationUnit durationUnit => Duration.From(value, durationUnit), + DynamicViscosityUnit dynamicViscosityUnit => DynamicViscosity.From(value, dynamicViscosityUnit), + ElectricAdmittanceUnit electricAdmittanceUnit => ElectricAdmittance.From(value, electricAdmittanceUnit), + ElectricChargeUnit electricChargeUnit => ElectricCharge.From(value, electricChargeUnit), + ElectricChargeDensityUnit electricChargeDensityUnit => ElectricChargeDensity.From(value, electricChargeDensityUnit), + ElectricConductanceUnit electricConductanceUnit => ElectricConductance.From(value, electricConductanceUnit), + ElectricConductivityUnit electricConductivityUnit => ElectricConductivity.From(value, electricConductivityUnit), + ElectricCurrentUnit electricCurrentUnit => ElectricCurrent.From(value, electricCurrentUnit), + ElectricCurrentDensityUnit electricCurrentDensityUnit => ElectricCurrentDensity.From(value, electricCurrentDensityUnit), + ElectricCurrentGradientUnit electricCurrentGradientUnit => ElectricCurrentGradient.From(value, electricCurrentGradientUnit), + ElectricFieldUnit electricFieldUnit => ElectricField.From(value, electricFieldUnit), + ElectricInductanceUnit electricInductanceUnit => ElectricInductance.From(value, electricInductanceUnit), + ElectricPotentialUnit electricPotentialUnit => ElectricPotential.From(value, electricPotentialUnit), + ElectricPotentialAcUnit electricPotentialAcUnit => ElectricPotentialAc.From(value, electricPotentialAcUnit), + ElectricPotentialChangeRateUnit electricPotentialChangeRateUnit => ElectricPotentialChangeRate.From(value, electricPotentialChangeRateUnit), + ElectricPotentialDcUnit electricPotentialDcUnit => ElectricPotentialDc.From(value, electricPotentialDcUnit), + ElectricResistanceUnit electricResistanceUnit => ElectricResistance.From(value, electricResistanceUnit), + ElectricResistivityUnit electricResistivityUnit => ElectricResistivity.From(value, electricResistivityUnit), + ElectricSurfaceChargeDensityUnit electricSurfaceChargeDensityUnit => ElectricSurfaceChargeDensity.From(value, electricSurfaceChargeDensityUnit), + EnergyUnit energyUnit => Energy.From(value, energyUnit), + EnergyDensityUnit energyDensityUnit => EnergyDensity.From(value, energyDensityUnit), + EntropyUnit entropyUnit => Entropy.From(value, entropyUnit), + ForceUnit forceUnit => Force.From(value, forceUnit), + ForceChangeRateUnit forceChangeRateUnit => ForceChangeRate.From(value, forceChangeRateUnit), + ForcePerLengthUnit forcePerLengthUnit => ForcePerLength.From(value, forcePerLengthUnit), + FrequencyUnit frequencyUnit => Frequency.From(value, frequencyUnit), + FuelEfficiencyUnit fuelEfficiencyUnit => FuelEfficiency.From(value, fuelEfficiencyUnit), + HeatFluxUnit heatFluxUnit => HeatFlux.From(value, heatFluxUnit), + HeatTransferCoefficientUnit heatTransferCoefficientUnit => HeatTransferCoefficient.From(value, heatTransferCoefficientUnit), + IlluminanceUnit illuminanceUnit => Illuminance.From(value, illuminanceUnit), + ImpulseUnit impulseUnit => Impulse.From(value, impulseUnit), + InformationUnit informationUnit => Information.From(value, informationUnit), + IrradianceUnit irradianceUnit => Irradiance.From(value, irradianceUnit), + IrradiationUnit irradiationUnit => Irradiation.From(value, irradiationUnit), + JerkUnit jerkUnit => Jerk.From(value, jerkUnit), + KinematicViscosityUnit kinematicViscosityUnit => KinematicViscosity.From(value, kinematicViscosityUnit), + LengthUnit lengthUnit => Length.From(value, lengthUnit), + LevelUnit levelUnit => Level.From(value, levelUnit), + LinearDensityUnit linearDensityUnit => LinearDensity.From(value, linearDensityUnit), + LinearPowerDensityUnit linearPowerDensityUnit => LinearPowerDensity.From(value, linearPowerDensityUnit), + LuminanceUnit luminanceUnit => Luminance.From(value, luminanceUnit), + LuminosityUnit luminosityUnit => Luminosity.From(value, luminosityUnit), + LuminousFluxUnit luminousFluxUnit => LuminousFlux.From(value, luminousFluxUnit), + LuminousIntensityUnit luminousIntensityUnit => LuminousIntensity.From(value, luminousIntensityUnit), + MagneticFieldUnit magneticFieldUnit => MagneticField.From(value, magneticFieldUnit), + MagneticFluxUnit magneticFluxUnit => MagneticFlux.From(value, magneticFluxUnit), + MagnetizationUnit magnetizationUnit => Magnetization.From(value, magnetizationUnit), + MassUnit massUnit => Mass.From(value, massUnit), + MassConcentrationUnit massConcentrationUnit => MassConcentration.From(value, massConcentrationUnit), + MassFlowUnit massFlowUnit => MassFlow.From(value, massFlowUnit), + MassFluxUnit massFluxUnit => MassFlux.From(value, massFluxUnit), + MassFractionUnit massFractionUnit => MassFraction.From(value, massFractionUnit), + MassMomentOfInertiaUnit massMomentOfInertiaUnit => MassMomentOfInertia.From(value, massMomentOfInertiaUnit), + MolarEnergyUnit molarEnergyUnit => MolarEnergy.From(value, molarEnergyUnit), + MolarEntropyUnit molarEntropyUnit => MolarEntropy.From(value, molarEntropyUnit), + MolarFlowUnit molarFlowUnit => MolarFlow.From(value, molarFlowUnit), + MolarityUnit molarityUnit => Molarity.From(value, molarityUnit), + MolarMassUnit molarMassUnit => MolarMass.From(value, molarMassUnit), + PermeabilityUnit permeabilityUnit => Permeability.From(value, permeabilityUnit), + PermittivityUnit permittivityUnit => Permittivity.From(value, permittivityUnit), + PorousMediumPermeabilityUnit porousMediumPermeabilityUnit => PorousMediumPermeability.From(value, porousMediumPermeabilityUnit), + PowerUnit powerUnit => Power.From(value, powerUnit), + PowerDensityUnit powerDensityUnit => PowerDensity.From(value, powerDensityUnit), + PowerRatioUnit powerRatioUnit => PowerRatio.From(value, powerRatioUnit), + PressureUnit pressureUnit => Pressure.From(value, pressureUnit), + PressureChangeRateUnit pressureChangeRateUnit => PressureChangeRate.From(value, pressureChangeRateUnit), + RatioUnit ratioUnit => Ratio.From(value, ratioUnit), + RatioChangeRateUnit ratioChangeRateUnit => RatioChangeRate.From(value, ratioChangeRateUnit), + ReactiveEnergyUnit reactiveEnergyUnit => ReactiveEnergy.From(value, reactiveEnergyUnit), + ReactivePowerUnit reactivePowerUnit => ReactivePower.From(value, reactivePowerUnit), + ReciprocalAreaUnit reciprocalAreaUnit => ReciprocalArea.From(value, reciprocalAreaUnit), + ReciprocalLengthUnit reciprocalLengthUnit => ReciprocalLength.From(value, reciprocalLengthUnit), + RelativeHumidityUnit relativeHumidityUnit => RelativeHumidity.From(value, relativeHumidityUnit), + RotationalAccelerationUnit rotationalAccelerationUnit => RotationalAcceleration.From(value, rotationalAccelerationUnit), + RotationalSpeedUnit rotationalSpeedUnit => RotationalSpeed.From(value, rotationalSpeedUnit), + RotationalStiffnessUnit rotationalStiffnessUnit => RotationalStiffness.From(value, rotationalStiffnessUnit), + RotationalStiffnessPerLengthUnit rotationalStiffnessPerLengthUnit => RotationalStiffnessPerLength.From(value, rotationalStiffnessPerLengthUnit), + ScalarUnit scalarUnit => Scalar.From(value, scalarUnit), + SolidAngleUnit solidAngleUnit => SolidAngle.From(value, solidAngleUnit), + SpecificEnergyUnit specificEnergyUnit => SpecificEnergy.From(value, specificEnergyUnit), + SpecificEntropyUnit specificEntropyUnit => SpecificEntropy.From(value, specificEntropyUnit), + SpecificFuelConsumptionUnit specificFuelConsumptionUnit => SpecificFuelConsumption.From(value, specificFuelConsumptionUnit), + SpecificVolumeUnit specificVolumeUnit => SpecificVolume.From(value, specificVolumeUnit), + SpecificWeightUnit specificWeightUnit => SpecificWeight.From(value, specificWeightUnit), + SpeedUnit speedUnit => Speed.From(value, speedUnit), + StandardVolumeFlowUnit standardVolumeFlowUnit => StandardVolumeFlow.From(value, standardVolumeFlowUnit), + TemperatureUnit temperatureUnit => Temperature.From(value, temperatureUnit), + TemperatureChangeRateUnit temperatureChangeRateUnit => TemperatureChangeRate.From(value, temperatureChangeRateUnit), + TemperatureDeltaUnit temperatureDeltaUnit => TemperatureDelta.From(value, temperatureDeltaUnit), + TemperatureGradientUnit temperatureGradientUnit => TemperatureGradient.From(value, temperatureGradientUnit), + ThermalConductivityUnit thermalConductivityUnit => ThermalConductivity.From(value, thermalConductivityUnit), + ThermalResistanceUnit thermalResistanceUnit => ThermalResistance.From(value, thermalResistanceUnit), + TorqueUnit torqueUnit => Torque.From(value, torqueUnit), + TorquePerLengthUnit torquePerLengthUnit => TorquePerLength.From(value, torquePerLengthUnit), + TurbidityUnit turbidityUnit => Turbidity.From(value, turbidityUnit), + VitaminAUnit vitaminAUnit => VitaminA.From(value, vitaminAUnit), + VolumeUnit volumeUnit => Volume.From(value, volumeUnit), + VolumeConcentrationUnit volumeConcentrationUnit => VolumeConcentration.From(value, volumeConcentrationUnit), + VolumeFlowUnit volumeFlowUnit => VolumeFlow.From(value, volumeFlowUnit), + VolumeFlowPerAreaUnit volumeFlowPerAreaUnit => VolumeFlowPerArea.From(value, volumeFlowPerAreaUnit), + VolumePerLengthUnit volumePerLengthUnit => VolumePerLength.From(value, volumePerLengthUnit), + VolumetricHeatCapacityUnit volumetricHeatCapacityUnit => VolumetricHeatCapacity.From(value, volumetricHeatCapacityUnit), + WarpingMomentOfInertiaUnit warpingMomentOfInertiaUnit => WarpingMomentOfInertia.From(value, warpingMomentOfInertiaUnit), + _ => null + }; + + return quantity is not null; } /// From 3f9c4e2640d0e75cb8c77443fa742b22491ba6eb Mon Sep 17 00:00:00 2001 From: Tristan Milnthorp Date: Thu, 2 Mar 2023 15:33:06 -0500 Subject: [PATCH 19/26] Use ConcurrentDictionary --- CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/Angle.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/Area.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/BitRate.g.cs | 6 ++++-- .../Quantities/BrakeSpecificFuelConsumption.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs | 6 ++++-- .../Quantities/CoefficientOfThermalExpansion.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/Compressibility.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/Density.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/Duration.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs | 6 ++++-- .../GeneratedCode/Quantities/ElectricChargeDensity.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs | 6 ++++-- .../GeneratedCode/Quantities/ElectricCurrentDensity.g.cs | 6 ++++-- .../GeneratedCode/Quantities/ElectricCurrentGradient.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs | 6 ++++-- .../Quantities/ElectricPotentialChangeRate.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs | 6 ++++-- .../Quantities/ElectricSurfaceChargeDensity.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/Energy.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/EnergyDensity.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/Entropy.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/Force.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/Frequency.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs | 6 ++++-- .../GeneratedCode/Quantities/HeatTransferCoefficient.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/Impulse.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/Information.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/Jerk.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/Length.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/Level.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/Luminance.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/Mass.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/Molarity.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/Permeability.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs | 6 ++++-- .../GeneratedCode/Quantities/PorousMediumPermeability.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/Power.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/Pressure.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/Ratio.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs | 6 ++++-- .../GeneratedCode/Quantities/RotationalAcceleration.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs | 6 ++++-- .../Quantities/RotationalStiffnessPerLength.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/Scalar.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs | 6 ++++-- .../GeneratedCode/Quantities/SpecificFuelConsumption.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/Speed.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/StandardVolumeFlow.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/Temperature.g.cs | 6 ++++-- .../GeneratedCode/Quantities/TemperatureChangeRate.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/TemperatureGradient.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/Torque.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/TorquePerLength.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/Turbidity.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/Volume.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/VolumeFlowPerArea.g.cs | 6 ++++-- UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs | 6 ++++-- .../GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs | 6 ++++-- .../GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs | 6 ++++-- 119 files changed, 476 insertions(+), 238 deletions(-) diff --git a/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs b/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs index 9b8560790d..6fb6703f45 100644 --- a/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs +++ b/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs @@ -37,6 +37,7 @@ public string Generate() Writer.WL(GeneratedFileHeader); Writer.WL(@" using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -165,7 +166,7 @@ private void GenerateStaticConstructor() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, {_unitEnumName} Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, {_unitEnumName} Unit), List>(); }} "); } @@ -264,7 +265,7 @@ private void GenerateStaticProperties() /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, {_unitEnumName} Unit), List> Abbreviations {{ get; }} + public static IDictionary<(CultureInfo Culture, {_unitEnumName} Unit), List> Abbreviations {{ get; }} #endregion "); @@ -400,6 +401,7 @@ public static IReadOnlyList GetAbbreviations({_unitEnumName} unit, Cultu if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) {{ abbreviations = new List(); + const string resourceName = $""UnitsNet.GeneratedCode.Resources.{_quantity.Name}""; var resourceManager = new ResourceManager(resourceName, typeof({_quantity.Name}).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs b/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs index 9f16f3ef3e..0d74dc416c 100644 --- a/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -87,7 +88,7 @@ static Acceleration() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, AccelerationUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, AccelerationUnit Unit), List>(); } /// @@ -157,7 +158,7 @@ public Acceleration(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, AccelerationUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, AccelerationUnit Unit), List> Abbreviations { get; } #endregion @@ -336,6 +337,7 @@ public static IReadOnlyList GetAbbreviations(AccelerationUnit unit, Cult if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Acceleration"; var resourceManager = new ResourceManager(resourceName, typeof(Acceleration).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs index 3d46668d05..453ff533f3 100644 --- a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -88,7 +89,7 @@ static AmountOfSubstance() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, AmountOfSubstanceUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, AmountOfSubstanceUnit Unit), List>(); } /// @@ -158,7 +159,7 @@ public AmountOfSubstance(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, AmountOfSubstanceUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, AmountOfSubstanceUnit Unit), List> Abbreviations { get; } #endregion @@ -344,6 +345,7 @@ public static IReadOnlyList GetAbbreviations(AmountOfSubstanceUnit unit, if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.AmountOfSubstance"; var resourceManager = new ResourceManager(resourceName, typeof(AmountOfSubstance).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs b/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs index 1af79bc552..64f5cf09e5 100644 --- a/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -77,7 +78,7 @@ static AmplitudeRatio() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, AmplitudeRatioUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, AmplitudeRatioUnit Unit), List>(); } /// @@ -147,7 +148,7 @@ public AmplitudeRatio(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, AmplitudeRatioUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, AmplitudeRatioUnit Unit), List> Abbreviations { get; } #endregion @@ -256,6 +257,7 @@ public static IReadOnlyList GetAbbreviations(AmplitudeRatioUnit unit, Cu if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.AmplitudeRatio"; var resourceManager = new ResourceManager(resourceName, typeof(AmplitudeRatio).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/Angle.g.cs b/UnitsNet/GeneratedCode/Quantities/Angle.g.cs index 637ddadd75..9ec2b23f67 100644 --- a/UnitsNet/GeneratedCode/Quantities/Angle.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Angle.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -89,7 +90,7 @@ static Angle() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, AngleUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, AngleUnit Unit), List>(); } /// @@ -159,7 +160,7 @@ public Angle(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, AngleUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, AngleUnit Unit), List> Abbreviations { get; } #endregion @@ -352,6 +353,7 @@ public static IReadOnlyList GetAbbreviations(AngleUnit unit, CultureInfo if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Angle"; var resourceManager = new ResourceManager(resourceName, typeof(Angle).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs index 9fad606d68..ade0c08e51 100644 --- a/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -76,7 +77,7 @@ static ApparentEnergy() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, ApparentEnergyUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ApparentEnergyUnit Unit), List>(); } /// @@ -146,7 +147,7 @@ public ApparentEnergy(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, ApparentEnergyUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, ApparentEnergyUnit Unit), List> Abbreviations { get; } #endregion @@ -248,6 +249,7 @@ public static IReadOnlyList GetAbbreviations(ApparentEnergyUnit unit, Cu if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ApparentEnergy"; var resourceManager = new ResourceManager(resourceName, typeof(ApparentEnergy).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs b/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs index 6b4f6a6fd9..6113229d4c 100644 --- a/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -79,7 +80,7 @@ static ApparentPower() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, ApparentPowerUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ApparentPowerUnit Unit), List>(); } /// @@ -149,7 +150,7 @@ public ApparentPower(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, ApparentPowerUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, ApparentPowerUnit Unit), List> Abbreviations { get; } #endregion @@ -272,6 +273,7 @@ public static IReadOnlyList GetAbbreviations(ApparentPowerUnit unit, Cul if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ApparentPower"; var resourceManager = new ResourceManager(resourceName, typeof(ApparentPower).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/Area.g.cs b/UnitsNet/GeneratedCode/Quantities/Area.g.cs index ad1ee32178..dc32d225aa 100644 --- a/UnitsNet/GeneratedCode/Quantities/Area.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Area.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -87,7 +88,7 @@ static Area() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, AreaUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, AreaUnit Unit), List>(); } /// @@ -157,7 +158,7 @@ public Area(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, AreaUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, AreaUnit Unit), List> Abbreviations { get; } #endregion @@ -336,6 +337,7 @@ public static IReadOnlyList GetAbbreviations(AreaUnit unit, CultureInfo? if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Area"; var resourceManager = new ResourceManager(resourceName, typeof(Area).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs index 2eb249e968..88c48bbd79 100644 --- a/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -76,7 +77,7 @@ static AreaDensity() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, AreaDensityUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, AreaDensityUnit Unit), List>(); } /// @@ -146,7 +147,7 @@ public AreaDensity(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, AreaDensityUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, AreaDensityUnit Unit), List> Abbreviations { get; } #endregion @@ -248,6 +249,7 @@ public static IReadOnlyList GetAbbreviations(AreaDensityUnit unit, Cultu if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.AreaDensity"; var resourceManager = new ResourceManager(resourceName, typeof(AreaDensity).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs index 67b20ded8b..64b0eec6ff 100644 --- a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -79,7 +80,7 @@ static AreaMomentOfInertia() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, AreaMomentOfInertiaUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, AreaMomentOfInertiaUnit Unit), List>(); } /// @@ -149,7 +150,7 @@ public AreaMomentOfInertia(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, AreaMomentOfInertiaUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, AreaMomentOfInertiaUnit Unit), List> Abbreviations { get; } #endregion @@ -272,6 +273,7 @@ public static IReadOnlyList GetAbbreviations(AreaMomentOfInertiaUnit uni if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.AreaMomentOfInertia"; var resourceManager = new ResourceManager(resourceName, typeof(AreaMomentOfInertia).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs b/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs index a55449682d..00d65e39ab 100644 --- a/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -103,7 +104,7 @@ static BitRate() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, BitRateUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, BitRateUnit Unit), List>(); } /// @@ -173,7 +174,7 @@ public BitRate(decimal value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, BitRateUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, BitRateUnit Unit), List> Abbreviations { get; } #endregion @@ -436,6 +437,7 @@ public static IReadOnlyList GetAbbreviations(BitRateUnit unit, CultureIn if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.BitRate"; var resourceManager = new ResourceManager(resourceName, typeof(BitRate).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs index 414efb28a2..fe5f4da73c 100644 --- a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -76,7 +77,7 @@ static BrakeSpecificFuelConsumption() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, BrakeSpecificFuelConsumptionUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, BrakeSpecificFuelConsumptionUnit Unit), List>(); } /// @@ -146,7 +147,7 @@ public BrakeSpecificFuelConsumption(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, BrakeSpecificFuelConsumptionUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, BrakeSpecificFuelConsumptionUnit Unit), List> Abbreviations { get; } #endregion @@ -248,6 +249,7 @@ public static IReadOnlyList GetAbbreviations(BrakeSpecificFuelConsumptio if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.BrakeSpecificFuelConsumption"; var resourceManager = new ResourceManager(resourceName, typeof(BrakeSpecificFuelConsumption).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs b/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs index 541c6cdb74..1b3ca4b5b0 100644 --- a/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -83,7 +84,7 @@ static Capacitance() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, CapacitanceUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, CapacitanceUnit Unit), List>(); } /// @@ -153,7 +154,7 @@ public Capacitance(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, CapacitanceUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, CapacitanceUnit Unit), List> Abbreviations { get; } #endregion @@ -283,6 +284,7 @@ public static IReadOnlyList GetAbbreviations(CapacitanceUnit unit, Cultu if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Capacitance"; var resourceManager = new ResourceManager(resourceName, typeof(Capacitance).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs b/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs index 08c8615819..c26de6d225 100644 --- a/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -76,7 +77,7 @@ static CoefficientOfThermalExpansion() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, CoefficientOfThermalExpansionUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, CoefficientOfThermalExpansionUnit Unit), List>(); } /// @@ -146,7 +147,7 @@ public CoefficientOfThermalExpansion(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, CoefficientOfThermalExpansionUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, CoefficientOfThermalExpansionUnit Unit), List> Abbreviations { get; } #endregion @@ -248,6 +249,7 @@ public static IReadOnlyList GetAbbreviations(CoefficientOfThermalExpansi if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.CoefficientOfThermalExpansion"; var resourceManager = new ResourceManager(resourceName, typeof(CoefficientOfThermalExpansion).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/Compressibility.g.cs b/UnitsNet/GeneratedCode/Quantities/Compressibility.g.cs index e234fc4d34..860c4b6a53 100644 --- a/UnitsNet/GeneratedCode/Quantities/Compressibility.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Compressibility.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -80,7 +81,7 @@ static Compressibility() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, CompressibilityUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, CompressibilityUnit Unit), List>(); } /// @@ -150,7 +151,7 @@ public Compressibility(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, CompressibilityUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, CompressibilityUnit Unit), List> Abbreviations { get; } #endregion @@ -280,6 +281,7 @@ public static IReadOnlyList GetAbbreviations(CompressibilityUnit unit, C if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Compressibility"; var resourceManager = new ResourceManager(resourceName, typeof(Compressibility).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/Density.g.cs b/UnitsNet/GeneratedCode/Quantities/Density.g.cs index d0d281844b..c70c4664c7 100644 --- a/UnitsNet/GeneratedCode/Quantities/Density.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Density.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -127,7 +128,7 @@ static Density() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, DensityUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, DensityUnit Unit), List>(); } /// @@ -197,7 +198,7 @@ public Density(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, DensityUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, DensityUnit Unit), List> Abbreviations { get; } #endregion @@ -635,6 +636,7 @@ public static IReadOnlyList GetAbbreviations(DensityUnit unit, CultureIn if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Density"; var resourceManager = new ResourceManager(resourceName, typeof(Density).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/Duration.g.cs b/UnitsNet/GeneratedCode/Quantities/Duration.g.cs index 7f2d835deb..3d2f987dc7 100644 --- a/UnitsNet/GeneratedCode/Quantities/Duration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Duration.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -84,7 +85,7 @@ static Duration() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, DurationUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, DurationUnit Unit), List>(); } /// @@ -154,7 +155,7 @@ public Duration(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, DurationUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, DurationUnit Unit), List> Abbreviations { get; } #endregion @@ -312,6 +313,7 @@ public static IReadOnlyList GetAbbreviations(DurationUnit unit, CultureI if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Duration"; var resourceManager = new ResourceManager(resourceName, typeof(Duration).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs index 12be6271cf..8fbfef1102 100644 --- a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -86,7 +87,7 @@ static DynamicViscosity() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, DynamicViscosityUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, DynamicViscosityUnit Unit), List>(); } /// @@ -156,7 +157,7 @@ public DynamicViscosity(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, DynamicViscosityUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, DynamicViscosityUnit Unit), List> Abbreviations { get; } #endregion @@ -307,6 +308,7 @@ public static IReadOnlyList GetAbbreviations(DynamicViscosityUnit unit, if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.DynamicViscosity"; var resourceManager = new ResourceManager(resourceName, typeof(DynamicViscosity).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs index 7548fc6dfe..65d66e7da1 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -77,7 +78,7 @@ static ElectricAdmittance() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, ElectricAdmittanceUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ElectricAdmittanceUnit Unit), List>(); } /// @@ -147,7 +148,7 @@ public ElectricAdmittance(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, ElectricAdmittanceUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, ElectricAdmittanceUnit Unit), List> Abbreviations { get; } #endregion @@ -256,6 +257,7 @@ public static IReadOnlyList GetAbbreviations(ElectricAdmittanceUnit unit if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricAdmittance"; var resourceManager = new ResourceManager(resourceName, typeof(ElectricAdmittance).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs index 4ad21a0212..517840b6a3 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -87,7 +88,7 @@ static ElectricCharge() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, ElectricChargeUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ElectricChargeUnit Unit), List>(); } /// @@ -157,7 +158,7 @@ public ElectricCharge(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, ElectricChargeUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, ElectricChargeUnit Unit), List> Abbreviations { get; } #endregion @@ -315,6 +316,7 @@ public static IReadOnlyList GetAbbreviations(ElectricChargeUnit unit, Cu if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricCharge"; var resourceManager = new ResourceManager(resourceName, typeof(ElectricCharge).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs index 7cc1faf0fc..f72d4a42a0 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -77,7 +78,7 @@ static ElectricChargeDensity() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, ElectricChargeDensityUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ElectricChargeDensityUnit Unit), List>(); } /// @@ -147,7 +148,7 @@ public ElectricChargeDensity(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, ElectricChargeDensityUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, ElectricChargeDensityUnit Unit), List> Abbreviations { get; } #endregion @@ -235,6 +236,7 @@ public static IReadOnlyList GetAbbreviations(ElectricChargeDensityUnit u if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricChargeDensity"; var resourceManager = new ResourceManager(resourceName, typeof(ElectricChargeDensity).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs index 368da9430f..e7862f8016 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -81,7 +82,7 @@ static ElectricConductance() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, ElectricConductanceUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ElectricConductanceUnit Unit), List>(); } /// @@ -151,7 +152,7 @@ public ElectricConductance(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, ElectricConductanceUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, ElectricConductanceUnit Unit), List> Abbreviations { get; } #endregion @@ -267,6 +268,7 @@ public static IReadOnlyList GetAbbreviations(ElectricConductanceUnit uni if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricConductance"; var resourceManager = new ResourceManager(resourceName, typeof(ElectricConductance).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs index 382c88f22b..9475fcb47d 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -82,7 +83,7 @@ static ElectricConductivity() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, ElectricConductivityUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ElectricConductivityUnit Unit), List>(); } /// @@ -152,7 +153,7 @@ public ElectricConductivity(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, ElectricConductivityUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, ElectricConductivityUnit Unit), List> Abbreviations { get; } #endregion @@ -275,6 +276,7 @@ public static IReadOnlyList GetAbbreviations(ElectricConductivityUnit un if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricConductivity"; var resourceManager = new ResourceManager(resourceName, typeof(ElectricConductivity).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs index bc4c7316e6..42dd497ede 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -82,7 +83,7 @@ static ElectricCurrent() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, ElectricCurrentUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ElectricCurrentUnit Unit), List>(); } /// @@ -152,7 +153,7 @@ public ElectricCurrent(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, ElectricCurrentUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, ElectricCurrentUnit Unit), List> Abbreviations { get; } #endregion @@ -296,6 +297,7 @@ public static IReadOnlyList GetAbbreviations(ElectricCurrentUnit unit, C if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricCurrent"; var resourceManager = new ResourceManager(resourceName, typeof(ElectricCurrent).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs index fffddac29b..612f30f903 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -79,7 +80,7 @@ static ElectricCurrentDensity() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, ElectricCurrentDensityUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ElectricCurrentDensityUnit Unit), List>(); } /// @@ -149,7 +150,7 @@ public ElectricCurrentDensity(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, ElectricCurrentDensityUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, ElectricCurrentDensityUnit Unit), List> Abbreviations { get; } #endregion @@ -251,6 +252,7 @@ public static IReadOnlyList GetAbbreviations(ElectricCurrentDensityUnit if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricCurrentDensity"; var resourceManager = new ResourceManager(resourceName, typeof(ElectricCurrentDensity).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs index 2960ffdb67..f0bb530a24 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -77,7 +78,7 @@ static ElectricCurrentGradient() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, ElectricCurrentGradientUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ElectricCurrentGradientUnit Unit), List>(); } /// @@ -147,7 +148,7 @@ public ElectricCurrentGradient(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, ElectricCurrentGradientUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, ElectricCurrentGradientUnit Unit), List> Abbreviations { get; } #endregion @@ -256,6 +257,7 @@ public static IReadOnlyList GetAbbreviations(ElectricCurrentGradientUnit if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricCurrentGradient"; var resourceManager = new ResourceManager(resourceName, typeof(ElectricCurrentGradient).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs index 35f628b5c1..c4f69f521d 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -77,7 +78,7 @@ static ElectricField() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, ElectricFieldUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ElectricFieldUnit Unit), List>(); } /// @@ -147,7 +148,7 @@ public ElectricField(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, ElectricFieldUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, ElectricFieldUnit Unit), List> Abbreviations { get; } #endregion @@ -235,6 +236,7 @@ public static IReadOnlyList GetAbbreviations(ElectricFieldUnit unit, Cul if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricField"; var resourceManager = new ResourceManager(resourceName, typeof(ElectricField).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs index 31f1926402..eac6cbea87 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -81,7 +82,7 @@ static ElectricInductance() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, ElectricInductanceUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ElectricInductanceUnit Unit), List>(); } /// @@ -151,7 +152,7 @@ public ElectricInductance(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, ElectricInductanceUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, ElectricInductanceUnit Unit), List> Abbreviations { get; } #endregion @@ -267,6 +268,7 @@ public static IReadOnlyList GetAbbreviations(ElectricInductanceUnit unit if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricInductance"; var resourceManager = new ResourceManager(resourceName, typeof(ElectricInductance).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs index ad50d52ad0..2e75b68134 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -79,7 +80,7 @@ static ElectricPotential() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, ElectricPotentialUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ElectricPotentialUnit Unit), List>(); } /// @@ -149,7 +150,7 @@ public ElectricPotential(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, ElectricPotentialUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, ElectricPotentialUnit Unit), List> Abbreviations { get; } #endregion @@ -272,6 +273,7 @@ public static IReadOnlyList GetAbbreviations(ElectricPotentialUnit unit, if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricPotential"; var resourceManager = new ResourceManager(resourceName, typeof(ElectricPotential).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs index 9ee20856ba..be587d6b69 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -78,7 +79,7 @@ static ElectricPotentialAc() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, ElectricPotentialAcUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ElectricPotentialAcUnit Unit), List>(); } /// @@ -148,7 +149,7 @@ public ElectricPotentialAc(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, ElectricPotentialAcUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, ElectricPotentialAcUnit Unit), List> Abbreviations { get; } #endregion @@ -264,6 +265,7 @@ public static IReadOnlyList GetAbbreviations(ElectricPotentialAcUnit uni if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricPotentialAc"; var resourceManager = new ResourceManager(resourceName, typeof(ElectricPotentialAc).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs index c3a2f1445d..6631b921e1 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -93,7 +94,7 @@ static ElectricPotentialChangeRate() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, ElectricPotentialChangeRateUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ElectricPotentialChangeRateUnit Unit), List>(); } /// @@ -163,7 +164,7 @@ public ElectricPotentialChangeRate(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, ElectricPotentialChangeRateUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, ElectricPotentialChangeRateUnit Unit), List> Abbreviations { get; } #endregion @@ -384,6 +385,7 @@ public static IReadOnlyList GetAbbreviations(ElectricPotentialChangeRate if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricPotentialChangeRate"; var resourceManager = new ResourceManager(resourceName, typeof(ElectricPotentialChangeRate).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs index 71854bddf2..54c75bd6bb 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -78,7 +79,7 @@ static ElectricPotentialDc() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, ElectricPotentialDcUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ElectricPotentialDcUnit Unit), List>(); } /// @@ -148,7 +149,7 @@ public ElectricPotentialDc(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, ElectricPotentialDcUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, ElectricPotentialDcUnit Unit), List> Abbreviations { get; } #endregion @@ -264,6 +265,7 @@ public static IReadOnlyList GetAbbreviations(ElectricPotentialDcUnit uni if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricPotentialDc"; var resourceManager = new ResourceManager(resourceName, typeof(ElectricPotentialDc).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs index aec4ab4f6b..3e57140c23 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -80,7 +81,7 @@ static ElectricResistance() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, ElectricResistanceUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ElectricResistanceUnit Unit), List>(); } /// @@ -150,7 +151,7 @@ public ElectricResistance(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, ElectricResistanceUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, ElectricResistanceUnit Unit), List> Abbreviations { get; } #endregion @@ -280,6 +281,7 @@ public static IReadOnlyList GetAbbreviations(ElectricResistanceUnit unit if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricResistance"; var resourceManager = new ResourceManager(resourceName, typeof(ElectricResistance).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs index bdec3c59c7..0659ea406d 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -90,7 +91,7 @@ static ElectricResistivity() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, ElectricResistivityUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ElectricResistivityUnit Unit), List>(); } /// @@ -160,7 +161,7 @@ public ElectricResistivity(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, ElectricResistivityUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, ElectricResistivityUnit Unit), List> Abbreviations { get; } #endregion @@ -339,6 +340,7 @@ public static IReadOnlyList GetAbbreviations(ElectricResistivityUnit uni if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricResistivity"; var resourceManager = new ResourceManager(resourceName, typeof(ElectricResistivity).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs index 7ad681df97..336f841d8a 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -79,7 +80,7 @@ static ElectricSurfaceChargeDensity() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, ElectricSurfaceChargeDensityUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ElectricSurfaceChargeDensityUnit Unit), List>(); } /// @@ -149,7 +150,7 @@ public ElectricSurfaceChargeDensity(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, ElectricSurfaceChargeDensityUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, ElectricSurfaceChargeDensityUnit Unit), List> Abbreviations { get; } #endregion @@ -251,6 +252,7 @@ public static IReadOnlyList GetAbbreviations(ElectricSurfaceChargeDensit if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricSurfaceChargeDensity"; var resourceManager = new ResourceManager(resourceName, typeof(ElectricSurfaceChargeDensity).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/Energy.g.cs b/UnitsNet/GeneratedCode/Quantities/Energy.g.cs index bad74115e2..d40c278cec 100644 --- a/UnitsNet/GeneratedCode/Quantities/Energy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Energy.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -111,7 +112,7 @@ static Energy() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, EnergyUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, EnergyUnit Unit), List>(); } /// @@ -181,7 +182,7 @@ public Energy(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, EnergyUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, EnergyUnit Unit), List> Abbreviations { get; } #endregion @@ -528,6 +529,7 @@ public static IReadOnlyList GetAbbreviations(EnergyUnit unit, CultureInf if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Energy"; var resourceManager = new ResourceManager(resourceName, typeof(Energy).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/EnergyDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/EnergyDensity.g.cs index 0e3fd74740..8a60c2dabd 100644 --- a/UnitsNet/GeneratedCode/Quantities/EnergyDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/EnergyDensity.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -85,7 +86,7 @@ static EnergyDensity() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, EnergyDensityUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, EnergyDensityUnit Unit), List>(); } /// @@ -155,7 +156,7 @@ public EnergyDensity(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, EnergyDensityUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, EnergyDensityUnit Unit), List> Abbreviations { get; } #endregion @@ -320,6 +321,7 @@ public static IReadOnlyList GetAbbreviations(EnergyDensityUnit unit, Cul if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.EnergyDensity"; var resourceManager = new ResourceManager(resourceName, typeof(EnergyDensity).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs b/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs index 62fb102bdf..25d9da44bf 100644 --- a/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -80,7 +81,7 @@ static Entropy() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, EntropyUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, EntropyUnit Unit), List>(); } /// @@ -150,7 +151,7 @@ public Entropy(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, EntropyUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, EntropyUnit Unit), List> Abbreviations { get; } #endregion @@ -280,6 +281,7 @@ public static IReadOnlyList GetAbbreviations(EntropyUnit unit, CultureIn if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Entropy"; var resourceManager = new ResourceManager(resourceName, typeof(Entropy).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/Force.g.cs b/UnitsNet/GeneratedCode/Quantities/Force.g.cs index f652648b04..90c2b8bd0f 100644 --- a/UnitsNet/GeneratedCode/Quantities/Force.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Force.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -88,7 +89,7 @@ static Force() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, ForceUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ForceUnit Unit), List>(); } /// @@ -158,7 +159,7 @@ public Force(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, ForceUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, ForceUnit Unit), List> Abbreviations { get; } #endregion @@ -344,6 +345,7 @@ public static IReadOnlyList GetAbbreviations(ForceUnit unit, CultureInfo if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Force"; var resourceManager = new ResourceManager(resourceName, typeof(Force).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs index d55511edc4..8cd1657a99 100644 --- a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -88,7 +89,7 @@ static ForceChangeRate() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, ForceChangeRateUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ForceChangeRateUnit Unit), List>(); } /// @@ -158,7 +159,7 @@ public ForceChangeRate(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, ForceChangeRateUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, ForceChangeRateUnit Unit), List> Abbreviations { get; } #endregion @@ -344,6 +345,7 @@ public static IReadOnlyList GetAbbreviations(ForceChangeRateUnit unit, C if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ForceChangeRate"; var resourceManager = new ResourceManager(resourceName, typeof(ForceChangeRate).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs index 59b75f11fd..ac420b6c45 100644 --- a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -111,7 +112,7 @@ static ForcePerLength() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, ForcePerLengthUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ForcePerLengthUnit Unit), List>(); } /// @@ -181,7 +182,7 @@ public ForcePerLength(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, ForcePerLengthUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, ForcePerLengthUnit Unit), List> Abbreviations { get; } #endregion @@ -528,6 +529,7 @@ public static IReadOnlyList GetAbbreviations(ForcePerLengthUnit unit, Cu if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ForcePerLength"; var resourceManager = new ResourceManager(resourceName, typeof(ForcePerLength).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs b/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs index 177abfd12d..4ecdaaa965 100644 --- a/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -86,7 +87,7 @@ static Frequency() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, FrequencyUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, FrequencyUnit Unit), List>(); } /// @@ -156,7 +157,7 @@ public Frequency(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, FrequencyUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, FrequencyUnit Unit), List> Abbreviations { get; } #endregion @@ -328,6 +329,7 @@ public static IReadOnlyList GetAbbreviations(FrequencyUnit unit, Culture if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Frequency"; var resourceManager = new ResourceManager(resourceName, typeof(Frequency).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs b/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs index 43f86fe4f0..d1222c71c5 100644 --- a/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -80,7 +81,7 @@ static FuelEfficiency() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, FuelEfficiencyUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, FuelEfficiencyUnit Unit), List>(); } /// @@ -150,7 +151,7 @@ public FuelEfficiency(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, FuelEfficiencyUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, FuelEfficiencyUnit Unit), List> Abbreviations { get; } #endregion @@ -259,6 +260,7 @@ public static IReadOnlyList GetAbbreviations(FuelEfficiencyUnit unit, Cu if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.FuelEfficiency"; var resourceManager = new ResourceManager(resourceName, typeof(FuelEfficiency).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs index 941da83cfd..1b8bf72856 100644 --- a/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -91,7 +92,7 @@ static HeatFlux() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, HeatFluxUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, HeatFluxUnit Unit), List>(); } /// @@ -161,7 +162,7 @@ public HeatFlux(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, HeatFluxUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, HeatFluxUnit Unit), List> Abbreviations { get; } #endregion @@ -368,6 +369,7 @@ public static IReadOnlyList GetAbbreviations(HeatFluxUnit unit, CultureI if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.HeatFlux"; var resourceManager = new ResourceManager(resourceName, typeof(HeatFlux).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs index 095db3c934..dba53a01e9 100644 --- a/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -79,7 +80,7 @@ static HeatTransferCoefficient() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, HeatTransferCoefficientUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, HeatTransferCoefficientUnit Unit), List>(); } /// @@ -149,7 +150,7 @@ public HeatTransferCoefficient(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, HeatTransferCoefficientUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, HeatTransferCoefficientUnit Unit), List> Abbreviations { get; } #endregion @@ -273,6 +274,7 @@ public static IReadOnlyList GetAbbreviations(HeatTransferCoefficientUnit if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.HeatTransferCoefficient"; var resourceManager = new ResourceManager(resourceName, typeof(HeatTransferCoefficient).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs b/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs index 7120f9f0eb..5fdee294ee 100644 --- a/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -80,7 +81,7 @@ static Illuminance() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, IlluminanceUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, IlluminanceUnit Unit), List>(); } /// @@ -150,7 +151,7 @@ public Illuminance(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, IlluminanceUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, IlluminanceUnit Unit), List> Abbreviations { get; } #endregion @@ -259,6 +260,7 @@ public static IReadOnlyList GetAbbreviations(IlluminanceUnit unit, Cultu if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Illuminance"; var resourceManager = new ResourceManager(resourceName, typeof(Illuminance).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/Impulse.g.cs b/UnitsNet/GeneratedCode/Quantities/Impulse.g.cs index 19558da443..69ddc9a68f 100644 --- a/UnitsNet/GeneratedCode/Quantities/Impulse.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Impulse.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -86,7 +87,7 @@ static Impulse() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, ImpulseUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ImpulseUnit Unit), List>(); } /// @@ -156,7 +157,7 @@ public Impulse(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, ImpulseUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, ImpulseUnit Unit), List> Abbreviations { get; } #endregion @@ -328,6 +329,7 @@ public static IReadOnlyList GetAbbreviations(ImpulseUnit unit, CultureIn if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Impulse"; var resourceManager = new ResourceManager(resourceName, typeof(Impulse).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/Information.g.cs b/UnitsNet/GeneratedCode/Quantities/Information.g.cs index af6c9eeeaf..c133337ba3 100644 --- a/UnitsNet/GeneratedCode/Quantities/Information.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Information.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -100,7 +101,7 @@ static Information() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, InformationUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, InformationUnit Unit), List>(); } /// @@ -170,7 +171,7 @@ public Information(decimal value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, InformationUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, InformationUnit Unit), List> Abbreviations { get; } #endregion @@ -433,6 +434,7 @@ public static IReadOnlyList GetAbbreviations(InformationUnit unit, Cultu if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Information"; var resourceManager = new ResourceManager(resourceName, typeof(Information).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs b/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs index 897fba1556..42d3281294 100644 --- a/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -87,7 +88,7 @@ static Irradiance() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, IrradianceUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, IrradianceUnit Unit), List>(); } /// @@ -157,7 +158,7 @@ public Irradiance(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, IrradianceUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, IrradianceUnit Unit), List> Abbreviations { get; } #endregion @@ -336,6 +337,7 @@ public static IReadOnlyList GetAbbreviations(IrradianceUnit unit, Cultur if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Irradiance"; var resourceManager = new ResourceManager(resourceName, typeof(Irradiance).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs b/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs index e05e666865..56125a0817 100644 --- a/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -83,7 +84,7 @@ static Irradiation() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, IrradiationUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, IrradiationUnit Unit), List>(); } /// @@ -153,7 +154,7 @@ public Irradiation(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, IrradiationUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, IrradiationUnit Unit), List> Abbreviations { get; } #endregion @@ -283,6 +284,7 @@ public static IReadOnlyList GetAbbreviations(IrradiationUnit unit, Cultu if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Irradiation"; var resourceManager = new ResourceManager(resourceName, typeof(Irradiation).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/Jerk.g.cs b/UnitsNet/GeneratedCode/Quantities/Jerk.g.cs index 3ae7657093..1b0eb588bd 100644 --- a/UnitsNet/GeneratedCode/Quantities/Jerk.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Jerk.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -84,7 +85,7 @@ static Jerk() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, JerkUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, JerkUnit Unit), List>(); } /// @@ -154,7 +155,7 @@ public Jerk(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, JerkUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, JerkUnit Unit), List> Abbreviations { get; } #endregion @@ -312,6 +313,7 @@ public static IReadOnlyList GetAbbreviations(JerkUnit unit, CultureInfo? if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Jerk"; var resourceManager = new ResourceManager(resourceName, typeof(Jerk).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs index 4b4d14f73b..7dabb99c9a 100644 --- a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -85,7 +86,7 @@ static KinematicViscosity() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, KinematicViscosityUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, KinematicViscosityUnit Unit), List>(); } /// @@ -155,7 +156,7 @@ public KinematicViscosity(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, KinematicViscosityUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, KinematicViscosityUnit Unit), List> Abbreviations { get; } #endregion @@ -299,6 +300,7 @@ public static IReadOnlyList GetAbbreviations(KinematicViscosityUnit unit if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.KinematicViscosity"; var resourceManager = new ResourceManager(resourceName, typeof(KinematicViscosity).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/Length.g.cs b/UnitsNet/GeneratedCode/Quantities/Length.g.cs index d5f4f5a0f5..36aaddc640 100644 --- a/UnitsNet/GeneratedCode/Quantities/Length.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Length.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -110,7 +111,7 @@ static Length() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, LengthUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, LengthUnit Unit), List>(); } /// @@ -180,7 +181,7 @@ public Length(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, LengthUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, LengthUnit Unit), List> Abbreviations { get; } #endregion @@ -520,6 +521,7 @@ public static IReadOnlyList GetAbbreviations(LengthUnit unit, CultureInf if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Length"; var resourceManager = new ResourceManager(resourceName, typeof(Length).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/Level.g.cs b/UnitsNet/GeneratedCode/Quantities/Level.g.cs index b019b3ddb9..19dce517a1 100644 --- a/UnitsNet/GeneratedCode/Quantities/Level.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Level.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -75,7 +76,7 @@ static Level() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, LevelUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, LevelUnit Unit), List>(); } /// @@ -145,7 +146,7 @@ public Level(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, LevelUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, LevelUnit Unit), List> Abbreviations { get; } #endregion @@ -240,6 +241,7 @@ public static IReadOnlyList GetAbbreviations(LevelUnit unit, CultureInfo if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Level"; var resourceManager = new ResourceManager(resourceName, typeof(Level).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs index d4bfb0cb7d..7b2f47a151 100644 --- a/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -90,7 +91,7 @@ static LinearDensity() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, LinearDensityUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, LinearDensityUnit Unit), List>(); } /// @@ -160,7 +161,7 @@ public LinearDensity(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, LinearDensityUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, LinearDensityUnit Unit), List> Abbreviations { get; } #endregion @@ -339,6 +340,7 @@ public static IReadOnlyList GetAbbreviations(LinearDensityUnit unit, Cul if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.LinearDensity"; var resourceManager = new ResourceManager(resourceName, typeof(LinearDensity).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs index 9e133fd7f0..5cb5e5af22 100644 --- a/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -101,7 +102,7 @@ static LinearPowerDensity() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, LinearPowerDensityUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, LinearPowerDensityUnit Unit), List>(); } /// @@ -171,7 +172,7 @@ public LinearPowerDensity(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, LinearPowerDensityUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, LinearPowerDensityUnit Unit), List> Abbreviations { get; } #endregion @@ -427,6 +428,7 @@ public static IReadOnlyList GetAbbreviations(LinearPowerDensityUnit unit if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.LinearPowerDensity"; var resourceManager = new ResourceManager(resourceName, typeof(LinearPowerDensity).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/Luminance.g.cs b/UnitsNet/GeneratedCode/Quantities/Luminance.g.cs index 098a9b98a6..af16456fca 100644 --- a/UnitsNet/GeneratedCode/Quantities/Luminance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Luminance.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -86,7 +87,7 @@ static Luminance() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, LuminanceUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, LuminanceUnit Unit), List>(); } /// @@ -156,7 +157,7 @@ public Luminance(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, LuminanceUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, LuminanceUnit Unit), List> Abbreviations { get; } #endregion @@ -307,6 +308,7 @@ public static IReadOnlyList GetAbbreviations(LuminanceUnit unit, Culture if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Luminance"; var resourceManager = new ResourceManager(resourceName, typeof(Luminance).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs b/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs index 1e185fa7ff..056cd39b79 100644 --- a/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -90,7 +91,7 @@ static Luminosity() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, LuminosityUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, LuminosityUnit Unit), List>(); } /// @@ -160,7 +161,7 @@ public Luminosity(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, LuminosityUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, LuminosityUnit Unit), List> Abbreviations { get; } #endregion @@ -339,6 +340,7 @@ public static IReadOnlyList GetAbbreviations(LuminosityUnit unit, Cultur if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Luminosity"; var resourceManager = new ResourceManager(resourceName, typeof(Luminosity).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs index ee4c59c2e3..efa3678cd8 100644 --- a/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -77,7 +78,7 @@ static LuminousFlux() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, LuminousFluxUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, LuminousFluxUnit Unit), List>(); } /// @@ -147,7 +148,7 @@ public LuminousFlux(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, LuminousFluxUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, LuminousFluxUnit Unit), List> Abbreviations { get; } #endregion @@ -235,6 +236,7 @@ public static IReadOnlyList GetAbbreviations(LuminousFluxUnit unit, Cult if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.LuminousFlux"; var resourceManager = new ResourceManager(resourceName, typeof(LuminousFlux).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs b/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs index 9c014151e4..f54acf15ca 100644 --- a/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -77,7 +78,7 @@ static LuminousIntensity() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, LuminousIntensityUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, LuminousIntensityUnit Unit), List>(); } /// @@ -147,7 +148,7 @@ public LuminousIntensity(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, LuminousIntensityUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, LuminousIntensityUnit Unit), List> Abbreviations { get; } #endregion @@ -235,6 +236,7 @@ public static IReadOnlyList GetAbbreviations(LuminousIntensityUnit unit, if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.LuminousIntensity"; var resourceManager = new ResourceManager(resourceName, typeof(LuminousIntensity).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs b/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs index d9786c619d..f90f57ed92 100644 --- a/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -82,7 +83,7 @@ static MagneticField() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, MagneticFieldUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, MagneticFieldUnit Unit), List>(); } /// @@ -152,7 +153,7 @@ public MagneticField(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, MagneticFieldUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, MagneticFieldUnit Unit), List> Abbreviations { get; } #endregion @@ -275,6 +276,7 @@ public static IReadOnlyList GetAbbreviations(MagneticFieldUnit unit, Cul if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MagneticField"; var resourceManager = new ResourceManager(resourceName, typeof(MagneticField).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs index cef6c4bf6e..9ba94ea256 100644 --- a/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -77,7 +78,7 @@ static MagneticFlux() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, MagneticFluxUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, MagneticFluxUnit Unit), List>(); } /// @@ -147,7 +148,7 @@ public MagneticFlux(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, MagneticFluxUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, MagneticFluxUnit Unit), List> Abbreviations { get; } #endregion @@ -235,6 +236,7 @@ public static IReadOnlyList GetAbbreviations(MagneticFluxUnit unit, Cult if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MagneticFlux"; var resourceManager = new ResourceManager(resourceName, typeof(MagneticFlux).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs b/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs index b33de1c0d1..15d246b76d 100644 --- a/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -77,7 +78,7 @@ static Magnetization() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, MagnetizationUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, MagnetizationUnit Unit), List>(); } /// @@ -147,7 +148,7 @@ public Magnetization(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, MagnetizationUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, MagnetizationUnit Unit), List> Abbreviations { get; } #endregion @@ -235,6 +236,7 @@ public static IReadOnlyList GetAbbreviations(MagnetizationUnit unit, Cul if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Magnetization"; var resourceManager = new ResourceManager(resourceName, typeof(Magnetization).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/Mass.g.cs b/UnitsNet/GeneratedCode/Quantities/Mass.g.cs index 8e823613f4..ba23649e91 100644 --- a/UnitsNet/GeneratedCode/Quantities/Mass.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Mass.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -98,7 +99,7 @@ static Mass() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, MassUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, MassUnit Unit), List>(); } /// @@ -168,7 +169,7 @@ public Mass(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, MassUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, MassUnit Unit), List> Abbreviations { get; } #endregion @@ -424,6 +425,7 @@ public static IReadOnlyList GetAbbreviations(MassUnit unit, CultureInfo? if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Mass"; var resourceManager = new ResourceManager(resourceName, typeof(Mass).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs b/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs index 1967aa4c24..966c071b08 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -125,7 +126,7 @@ static MassConcentration() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, MassConcentrationUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, MassConcentrationUnit Unit), List>(); } /// @@ -195,7 +196,7 @@ public MassConcentration(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, MassConcentrationUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, MassConcentrationUnit Unit), List> Abbreviations { get; } #endregion @@ -619,6 +620,7 @@ public static IReadOnlyList GetAbbreviations(MassConcentrationUnit unit, if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MassConcentration"; var resourceManager = new ResourceManager(resourceName, typeof(MassConcentration).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs index e197a0de07..8f5a2e9951 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -106,7 +107,7 @@ static MassFlow() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, MassFlowUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, MassFlowUnit Unit), List>(); } /// @@ -176,7 +177,7 @@ public MassFlow(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, MassFlowUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, MassFlowUnit Unit), List> Abbreviations { get; } #endregion @@ -488,6 +489,7 @@ public static IReadOnlyList GetAbbreviations(MassFlowUnit unit, CultureI if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MassFlow"; var resourceManager = new ResourceManager(resourceName, typeof(MassFlow).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs index 0dfd419dc1..547a9a6ff3 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -85,7 +86,7 @@ static MassFlux() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, MassFluxUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, MassFluxUnit Unit), List>(); } /// @@ -155,7 +156,7 @@ public MassFlux(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, MassFluxUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, MassFluxUnit Unit), List> Abbreviations { get; } #endregion @@ -320,6 +321,7 @@ public static IReadOnlyList GetAbbreviations(MassFluxUnit unit, CultureI if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MassFlux"; var resourceManager = new ResourceManager(resourceName, typeof(MassFlux).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs index df55701c8a..47b413b0fc 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -100,7 +101,7 @@ static MassFraction() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, MassFractionUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, MassFractionUnit Unit), List>(); } /// @@ -170,7 +171,7 @@ public MassFraction(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, MassFractionUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, MassFractionUnit Unit), List> Abbreviations { get; } #endregion @@ -419,6 +420,7 @@ public static IReadOnlyList GetAbbreviations(MassFractionUnit unit, Cult if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MassFraction"; var resourceManager = new ResourceManager(resourceName, typeof(MassFraction).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs b/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs index 1fbf1396e0..c222d89183 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -101,7 +102,7 @@ static MassMomentOfInertia() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, MassMomentOfInertiaUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, MassMomentOfInertiaUnit Unit), List>(); } /// @@ -171,7 +172,7 @@ public MassMomentOfInertia(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, MassMomentOfInertiaUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, MassMomentOfInertiaUnit Unit), List> Abbreviations { get; } #endregion @@ -448,6 +449,7 @@ public static IReadOnlyList GetAbbreviations(MassMomentOfInertiaUnit uni if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MassMomentOfInertia"; var resourceManager = new ResourceManager(resourceName, typeof(MassMomentOfInertia).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs index 8e0ea0776e..2c72e7d011 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -76,7 +77,7 @@ static MolarEnergy() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, MolarEnergyUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, MolarEnergyUnit Unit), List>(); } /// @@ -146,7 +147,7 @@ public MolarEnergy(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, MolarEnergyUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, MolarEnergyUnit Unit), List> Abbreviations { get; } #endregion @@ -248,6 +249,7 @@ public static IReadOnlyList GetAbbreviations(MolarEnergyUnit unit, Cultu if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MolarEnergy"; var resourceManager = new ResourceManager(resourceName, typeof(MolarEnergy).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs index b4add55e63..cf901a5900 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -76,7 +77,7 @@ static MolarEntropy() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, MolarEntropyUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, MolarEntropyUnit Unit), List>(); } /// @@ -146,7 +147,7 @@ public MolarEntropy(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, MolarEntropyUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, MolarEntropyUnit Unit), List> Abbreviations { get; } #endregion @@ -248,6 +249,7 @@ public static IReadOnlyList GetAbbreviations(MolarEntropyUnit unit, Cult if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MolarEntropy"; var resourceManager = new ResourceManager(resourceName, typeof(MolarEntropy).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs index 9dec6f7a2d..51bce24232 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -82,7 +83,7 @@ static MolarFlow() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, MolarFlowUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, MolarFlowUnit Unit), List>(); } /// @@ -152,7 +153,7 @@ public MolarFlow(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, MolarFlowUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, MolarFlowUnit Unit), List> Abbreviations { get; } #endregion @@ -296,6 +297,7 @@ public static IReadOnlyList GetAbbreviations(MolarFlowUnit unit, Culture if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MolarFlow"; var resourceManager = new ResourceManager(resourceName, typeof(MolarFlow).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs index 2104819adc..5cc4263678 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -86,7 +87,7 @@ static MolarMass() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, MolarMassUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, MolarMassUnit Unit), List>(); } /// @@ -156,7 +157,7 @@ public MolarMass(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, MolarMassUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, MolarMassUnit Unit), List> Abbreviations { get; } #endregion @@ -328,6 +329,7 @@ public static IReadOnlyList GetAbbreviations(MolarMassUnit unit, Culture if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.MolarMass"; var resourceManager = new ResourceManager(resourceName, typeof(MolarMass).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs b/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs index ecfcf7e5a4..b019f5f6e1 100644 --- a/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -87,7 +88,7 @@ static Molarity() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, MolarityUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, MolarityUnit Unit), List>(); } /// @@ -157,7 +158,7 @@ public Molarity(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, MolarityUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, MolarityUnit Unit), List> Abbreviations { get; } #endregion @@ -315,6 +316,7 @@ public static IReadOnlyList GetAbbreviations(MolarityUnit unit, CultureI if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Molarity"; var resourceManager = new ResourceManager(resourceName, typeof(Molarity).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs b/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs index 3f7c9e55c7..43bf254d41 100644 --- a/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -77,7 +78,7 @@ static Permeability() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, PermeabilityUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, PermeabilityUnit Unit), List>(); } /// @@ -147,7 +148,7 @@ public Permeability(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, PermeabilityUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, PermeabilityUnit Unit), List> Abbreviations { get; } #endregion @@ -235,6 +236,7 @@ public static IReadOnlyList GetAbbreviations(PermeabilityUnit unit, Cult if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Permeability"; var resourceManager = new ResourceManager(resourceName, typeof(Permeability).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs b/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs index ee8c8aa795..c630d8c547 100644 --- a/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -77,7 +78,7 @@ static Permittivity() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, PermittivityUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, PermittivityUnit Unit), List>(); } /// @@ -147,7 +148,7 @@ public Permittivity(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, PermittivityUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, PermittivityUnit Unit), List> Abbreviations { get; } #endregion @@ -235,6 +236,7 @@ public static IReadOnlyList GetAbbreviations(PermittivityUnit unit, Cult if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Permittivity"; var resourceManager = new ResourceManager(resourceName, typeof(Permittivity).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/PorousMediumPermeability.g.cs b/UnitsNet/GeneratedCode/Quantities/PorousMediumPermeability.g.cs index c4f8fd8642..7162d80fec 100644 --- a/UnitsNet/GeneratedCode/Quantities/PorousMediumPermeability.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PorousMediumPermeability.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -81,7 +82,7 @@ static PorousMediumPermeability() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, PorousMediumPermeabilityUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, PorousMediumPermeabilityUnit Unit), List>(); } /// @@ -151,7 +152,7 @@ public PorousMediumPermeability(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, PorousMediumPermeabilityUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, PorousMediumPermeabilityUnit Unit), List> Abbreviations { get; } #endregion @@ -267,6 +268,7 @@ public static IReadOnlyList GetAbbreviations(PorousMediumPermeabilityUni if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.PorousMediumPermeability"; var resourceManager = new ResourceManager(resourceName, typeof(PorousMediumPermeability).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/Power.g.cs b/UnitsNet/GeneratedCode/Quantities/Power.g.cs index fcf7d4a4fd..919aa33a07 100644 --- a/UnitsNet/GeneratedCode/Quantities/Power.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Power.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -100,7 +101,7 @@ static Power() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, PowerUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, PowerUnit Unit), List>(); } /// @@ -170,7 +171,7 @@ public Power(decimal value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, PowerUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, PowerUnit Unit), List> Abbreviations { get; } #endregion @@ -433,6 +434,7 @@ public static IReadOnlyList GetAbbreviations(PowerUnit unit, CultureInfo if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Power"; var resourceManager = new ResourceManager(resourceName, typeof(Power).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs index d1b81276d6..48b8a2d7fa 100644 --- a/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -117,7 +118,7 @@ static PowerDensity() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, PowerDensityUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, PowerDensityUnit Unit), List>(); } /// @@ -187,7 +188,7 @@ public PowerDensity(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, PowerDensityUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, PowerDensityUnit Unit), List> Abbreviations { get; } #endregion @@ -576,6 +577,7 @@ public static IReadOnlyList GetAbbreviations(PowerDensityUnit unit, Cult if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.PowerDensity"; var resourceManager = new ResourceManager(resourceName, typeof(PowerDensity).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs b/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs index 5fb28206cc..e85f475fed 100644 --- a/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -75,7 +76,7 @@ static PowerRatio() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, PowerRatioUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, PowerRatioUnit Unit), List>(); } /// @@ -145,7 +146,7 @@ public PowerRatio(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, PowerRatioUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, PowerRatioUnit Unit), List> Abbreviations { get; } #endregion @@ -240,6 +241,7 @@ public static IReadOnlyList GetAbbreviations(PowerRatioUnit unit, Cultur if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.PowerRatio"; var resourceManager = new ResourceManager(resourceName, typeof(PowerRatio).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs b/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs index 3a11160f30..dad9a893fd 100644 --- a/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -120,7 +121,7 @@ static Pressure() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, PressureUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, PressureUnit Unit), List>(); } /// @@ -190,7 +191,7 @@ public Pressure(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, PressureUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, PressureUnit Unit), List> Abbreviations { get; } #endregion @@ -600,6 +601,7 @@ public static IReadOnlyList GetAbbreviations(PressureUnit unit, CultureI if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Pressure"; var resourceManager = new ResourceManager(resourceName, typeof(Pressure).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs index 5c7baf0540..8e0d082ee4 100644 --- a/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -87,7 +88,7 @@ static PressureChangeRate() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, PressureChangeRateUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, PressureChangeRateUnit Unit), List>(); } /// @@ -157,7 +158,7 @@ public PressureChangeRate(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, PressureChangeRateUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, PressureChangeRateUnit Unit), List> Abbreviations { get; } #endregion @@ -336,6 +337,7 @@ public static IReadOnlyList GetAbbreviations(PressureChangeRateUnit unit if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.PressureChangeRate"; var resourceManager = new ResourceManager(resourceName, typeof(PressureChangeRate).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs b/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs index f4e70811d9..6b9dde43e0 100644 --- a/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -79,7 +80,7 @@ static Ratio() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, RatioUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, RatioUnit Unit), List>(); } /// @@ -149,7 +150,7 @@ public Ratio(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, RatioUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, RatioUnit Unit), List> Abbreviations { get; } #endregion @@ -272,6 +273,7 @@ public static IReadOnlyList GetAbbreviations(RatioUnit unit, CultureInfo if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Ratio"; var resourceManager = new ResourceManager(resourceName, typeof(Ratio).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs index 1c87704215..297929e220 100644 --- a/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -75,7 +76,7 @@ static RatioChangeRate() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, RatioChangeRateUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, RatioChangeRateUnit Unit), List>(); } /// @@ -145,7 +146,7 @@ public RatioChangeRate(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, RatioChangeRateUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, RatioChangeRateUnit Unit), List> Abbreviations { get; } #endregion @@ -240,6 +241,7 @@ public static IReadOnlyList GetAbbreviations(RatioChangeRateUnit unit, C if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.RatioChangeRate"; var resourceManager = new ResourceManager(resourceName, typeof(RatioChangeRate).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs index 150fca0a34..e1e594883a 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -76,7 +77,7 @@ static ReactiveEnergy() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, ReactiveEnergyUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ReactiveEnergyUnit Unit), List>(); } /// @@ -146,7 +147,7 @@ public ReactiveEnergy(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, ReactiveEnergyUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, ReactiveEnergyUnit Unit), List> Abbreviations { get; } #endregion @@ -248,6 +249,7 @@ public static IReadOnlyList GetAbbreviations(ReactiveEnergyUnit unit, Cu if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ReactiveEnergy"; var resourceManager = new ResourceManager(resourceName, typeof(ReactiveEnergy).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs b/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs index 1e555ecfa7..3f003f5e8d 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -77,7 +78,7 @@ static ReactivePower() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, ReactivePowerUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ReactivePowerUnit Unit), List>(); } /// @@ -147,7 +148,7 @@ public ReactivePower(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, ReactivePowerUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, ReactivePowerUnit Unit), List> Abbreviations { get; } #endregion @@ -256,6 +257,7 @@ public static IReadOnlyList GetAbbreviations(ReactivePowerUnit unit, Cul if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ReactivePower"; var resourceManager = new ResourceManager(resourceName, typeof(ReactivePower).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs b/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs index be99f8ad72..7735eb92cb 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -87,7 +88,7 @@ static ReciprocalArea() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, ReciprocalAreaUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ReciprocalAreaUnit Unit), List>(); } /// @@ -157,7 +158,7 @@ public ReciprocalArea(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, ReciprocalAreaUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, ReciprocalAreaUnit Unit), List> Abbreviations { get; } #endregion @@ -315,6 +316,7 @@ public static IReadOnlyList GetAbbreviations(ReciprocalAreaUnit unit, Cu if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ReciprocalArea"; var resourceManager = new ResourceManager(resourceName, typeof(ReciprocalArea).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs b/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs index 43ce40ce4b..1c529fec92 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -86,7 +87,7 @@ static ReciprocalLength() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, ReciprocalLengthUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ReciprocalLengthUnit Unit), List>(); } /// @@ -156,7 +157,7 @@ public ReciprocalLength(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, ReciprocalLengthUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, ReciprocalLengthUnit Unit), List> Abbreviations { get; } #endregion @@ -307,6 +308,7 @@ public static IReadOnlyList GetAbbreviations(ReciprocalLengthUnit unit, if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ReciprocalLength"; var resourceManager = new ResourceManager(resourceName, typeof(ReciprocalLength).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs b/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs index e856150f01..7dba4dad0e 100644 --- a/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -74,7 +75,7 @@ static RelativeHumidity() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, RelativeHumidityUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, RelativeHumidityUnit Unit), List>(); } /// @@ -144,7 +145,7 @@ public RelativeHumidity(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, RelativeHumidityUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, RelativeHumidityUnit Unit), List> Abbreviations { get; } #endregion @@ -232,6 +233,7 @@ public static IReadOnlyList GetAbbreviations(RelativeHumidityUnit unit, if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.RelativeHumidity"; var resourceManager = new ResourceManager(resourceName, typeof(RelativeHumidity).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.g.cs index 3c7b333a6b..6a304422c4 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -77,7 +78,7 @@ static RotationalAcceleration() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, RotationalAccelerationUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, RotationalAccelerationUnit Unit), List>(); } /// @@ -147,7 +148,7 @@ public RotationalAcceleration(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, RotationalAccelerationUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, RotationalAccelerationUnit Unit), List> Abbreviations { get; } #endregion @@ -256,6 +257,7 @@ public static IReadOnlyList GetAbbreviations(RotationalAccelerationUnit if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.RotationalAcceleration"; var resourceManager = new ResourceManager(resourceName, typeof(RotationalAcceleration).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs index 02cf172dbb..59f6d2d428 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -86,7 +87,7 @@ static RotationalSpeed() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, RotationalSpeedUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, RotationalSpeedUnit Unit), List>(); } /// @@ -156,7 +157,7 @@ public RotationalSpeed(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, RotationalSpeedUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, RotationalSpeedUnit Unit), List> Abbreviations { get; } #endregion @@ -328,6 +329,7 @@ public static IReadOnlyList GetAbbreviations(RotationalSpeedUnit unit, C if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.RotationalSpeed"; var resourceManager = new ResourceManager(resourceName, typeof(RotationalSpeed).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs index 8cb61d70ef..a0835d97ce 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -106,7 +107,7 @@ static RotationalStiffness() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, RotationalStiffnessUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, RotationalStiffnessUnit Unit), List>(); } /// @@ -176,7 +177,7 @@ public RotationalStiffness(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, RotationalStiffnessUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, RotationalStiffnessUnit Unit), List> Abbreviations { get; } #endregion @@ -488,6 +489,7 @@ public static IReadOnlyList GetAbbreviations(RotationalStiffnessUnit uni if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.RotationalStiffness"; var resourceManager = new ResourceManager(resourceName, typeof(RotationalStiffness).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs index 58db6fffe8..38e46bca7a 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -78,7 +79,7 @@ static RotationalStiffnessPerLength() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, RotationalStiffnessPerLengthUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, RotationalStiffnessPerLengthUnit Unit), List>(); } /// @@ -148,7 +149,7 @@ public RotationalStiffnessPerLength(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, RotationalStiffnessPerLengthUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, RotationalStiffnessPerLengthUnit Unit), List> Abbreviations { get; } #endregion @@ -264,6 +265,7 @@ public static IReadOnlyList GetAbbreviations(RotationalStiffnessPerLengt if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.RotationalStiffnessPerLength"; var resourceManager = new ResourceManager(resourceName, typeof(RotationalStiffnessPerLength).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/Scalar.g.cs b/UnitsNet/GeneratedCode/Quantities/Scalar.g.cs index 7f8609fd29..f536dc06b1 100644 --- a/UnitsNet/GeneratedCode/Quantities/Scalar.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Scalar.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -74,7 +75,7 @@ static Scalar() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, ScalarUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ScalarUnit Unit), List>(); } /// @@ -144,7 +145,7 @@ public Scalar(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, ScalarUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, ScalarUnit Unit), List> Abbreviations { get; } #endregion @@ -232,6 +233,7 @@ public static IReadOnlyList GetAbbreviations(ScalarUnit unit, CultureInf if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Scalar"; var resourceManager = new ResourceManager(resourceName, typeof(Scalar).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs b/UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs index b71d15d9c6..e2437f7afb 100644 --- a/UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -77,7 +78,7 @@ static SolidAngle() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, SolidAngleUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, SolidAngleUnit Unit), List>(); } /// @@ -147,7 +148,7 @@ public SolidAngle(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, SolidAngleUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, SolidAngleUnit Unit), List> Abbreviations { get; } #endregion @@ -235,6 +236,7 @@ public static IReadOnlyList GetAbbreviations(SolidAngleUnit unit, Cultur if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.SolidAngle"; var resourceManager = new ResourceManager(resourceName, typeof(SolidAngle).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs index aaa01213c2..0a382c7aae 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -106,7 +107,7 @@ static SpecificEnergy() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, SpecificEnergyUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, SpecificEnergyUnit Unit), List>(); } /// @@ -176,7 +177,7 @@ public SpecificEnergy(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, SpecificEnergyUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, SpecificEnergyUnit Unit), List> Abbreviations { get; } #endregion @@ -467,6 +468,7 @@ public static IReadOnlyList GetAbbreviations(SpecificEnergyUnit unit, Cu if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.SpecificEnergy"; var resourceManager = new ResourceManager(resourceName, typeof(SpecificEnergy).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs index 41c8f40887..a00b790f7a 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -82,7 +83,7 @@ static SpecificEntropy() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, SpecificEntropyUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, SpecificEntropyUnit Unit), List>(); } /// @@ -152,7 +153,7 @@ public SpecificEntropy(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, SpecificEntropyUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, SpecificEntropyUnit Unit), List> Abbreviations { get; } #endregion @@ -296,6 +297,7 @@ public static IReadOnlyList GetAbbreviations(SpecificEntropyUnit unit, C if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.SpecificEntropy"; var resourceManager = new ResourceManager(resourceName, typeof(SpecificEntropy).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs index a2a918dad1..ccc613c0a7 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -80,7 +81,7 @@ static SpecificFuelConsumption() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, SpecificFuelConsumptionUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, SpecificFuelConsumptionUnit Unit), List>(); } /// @@ -150,7 +151,7 @@ public SpecificFuelConsumption(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, SpecificFuelConsumptionUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, SpecificFuelConsumptionUnit Unit), List> Abbreviations { get; } #endregion @@ -259,6 +260,7 @@ public static IReadOnlyList GetAbbreviations(SpecificFuelConsumptionUnit if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.SpecificFuelConsumption"; var resourceManager = new ResourceManager(resourceName, typeof(SpecificFuelConsumption).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs index eacf9aa7c2..0e554767db 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -76,7 +77,7 @@ static SpecificVolume() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, SpecificVolumeUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, SpecificVolumeUnit Unit), List>(); } /// @@ -146,7 +147,7 @@ public SpecificVolume(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, SpecificVolumeUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, SpecificVolumeUnit Unit), List> Abbreviations { get; } #endregion @@ -248,6 +249,7 @@ public static IReadOnlyList GetAbbreviations(SpecificVolumeUnit unit, Cu if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.SpecificVolume"; var resourceManager = new ResourceManager(resourceName, typeof(SpecificVolume).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs index 1290ea7c7e..be2e782af8 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -93,7 +94,7 @@ static SpecificWeight() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, SpecificWeightUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, SpecificWeightUnit Unit), List>(); } /// @@ -163,7 +164,7 @@ public SpecificWeight(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, SpecificWeightUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, SpecificWeightUnit Unit), List> Abbreviations { get; } #endregion @@ -363,6 +364,7 @@ public static IReadOnlyList GetAbbreviations(SpecificWeightUnit unit, Cu if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.SpecificWeight"; var resourceManager = new ResourceManager(resourceName, typeof(SpecificWeight).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/Speed.g.cs b/UnitsNet/GeneratedCode/Quantities/Speed.g.cs index 6a913ea042..e68ed8e59e 100644 --- a/UnitsNet/GeneratedCode/Quantities/Speed.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Speed.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -106,7 +107,7 @@ static Speed() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, SpeedUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, SpeedUnit Unit), List>(); } /// @@ -176,7 +177,7 @@ public Speed(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, SpeedUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, SpeedUnit Unit), List> Abbreviations { get; } #endregion @@ -488,6 +489,7 @@ public static IReadOnlyList GetAbbreviations(SpeedUnit unit, CultureInfo if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Speed"; var resourceManager = new ResourceManager(resourceName, typeof(Speed).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/StandardVolumeFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/StandardVolumeFlow.g.cs index 1ab3087988..1ab8476344 100644 --- a/UnitsNet/GeneratedCode/Quantities/StandardVolumeFlow.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/StandardVolumeFlow.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -82,7 +83,7 @@ static StandardVolumeFlow() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, StandardVolumeFlowUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, StandardVolumeFlowUnit Unit), List>(); } /// @@ -152,7 +153,7 @@ public StandardVolumeFlow(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, StandardVolumeFlowUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, StandardVolumeFlowUnit Unit), List> Abbreviations { get; } #endregion @@ -296,6 +297,7 @@ public static IReadOnlyList GetAbbreviations(StandardVolumeFlowUnit unit if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.StandardVolumeFlow"; var resourceManager = new ResourceManager(resourceName, typeof(StandardVolumeFlow).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/Temperature.g.cs b/UnitsNet/GeneratedCode/Quantities/Temperature.g.cs index 9853f8cf15..c329208cf7 100644 --- a/UnitsNet/GeneratedCode/Quantities/Temperature.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Temperature.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -83,7 +84,7 @@ static Temperature() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, TemperatureUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, TemperatureUnit Unit), List>(); } /// @@ -150,7 +151,7 @@ public Temperature(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, TemperatureUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, TemperatureUnit Unit), List> Abbreviations { get; } #endregion @@ -301,6 +302,7 @@ public static IReadOnlyList GetAbbreviations(TemperatureUnit unit, Cultu if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Temperature"; var resourceManager = new ResourceManager(resourceName, typeof(Temperature).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs index 9efee8c313..458a2ebdb4 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -83,7 +84,7 @@ static TemperatureChangeRate() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, TemperatureChangeRateUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, TemperatureChangeRateUnit Unit), List>(); } /// @@ -153,7 +154,7 @@ public TemperatureChangeRate(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, TemperatureChangeRateUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, TemperatureChangeRateUnit Unit), List> Abbreviations { get; } #endregion @@ -304,6 +305,7 @@ public static IReadOnlyList GetAbbreviations(TemperatureChangeRateUnit u if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.TemperatureChangeRate"; var resourceManager = new ResourceManager(resourceName, typeof(TemperatureChangeRate).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs index cf75cd93ca..a9192a6146 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -82,7 +83,7 @@ static TemperatureDelta() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, TemperatureDeltaUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, TemperatureDeltaUnit Unit), List>(); } /// @@ -152,7 +153,7 @@ public TemperatureDelta(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, TemperatureDeltaUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, TemperatureDeltaUnit Unit), List> Abbreviations { get; } #endregion @@ -296,6 +297,7 @@ public static IReadOnlyList GetAbbreviations(TemperatureDeltaUnit unit, if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.TemperatureDelta"; var resourceManager = new ResourceManager(resourceName, typeof(TemperatureDelta).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureGradient.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureGradient.g.cs index 534dcaa34c..ae6d2ec72c 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureGradient.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureGradient.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -77,7 +78,7 @@ static TemperatureGradient() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, TemperatureGradientUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, TemperatureGradientUnit Unit), List>(); } /// @@ -147,7 +148,7 @@ public TemperatureGradient(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, TemperatureGradientUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, TemperatureGradientUnit Unit), List> Abbreviations { get; } #endregion @@ -256,6 +257,7 @@ public static IReadOnlyList GetAbbreviations(TemperatureGradientUnit uni if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.TemperatureGradient"; var resourceManager = new ResourceManager(resourceName, typeof(TemperatureGradient).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs b/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs index b40b135661..9b8376e041 100644 --- a/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -78,7 +79,7 @@ static ThermalConductivity() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, ThermalConductivityUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ThermalConductivityUnit Unit), List>(); } /// @@ -148,7 +149,7 @@ public ThermalConductivity(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, ThermalConductivityUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, ThermalConductivityUnit Unit), List> Abbreviations { get; } #endregion @@ -243,6 +244,7 @@ public static IReadOnlyList GetAbbreviations(ThermalConductivityUnit uni if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ThermalConductivity"; var resourceManager = new ResourceManager(resourceName, typeof(ThermalConductivity).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs b/UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs index f1adabb9e1..5751a4921c 100644 --- a/UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -79,7 +80,7 @@ static ThermalResistance() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, ThermalResistanceUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ThermalResistanceUnit Unit), List>(); } /// @@ -149,7 +150,7 @@ public ThermalResistance(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, ThermalResistanceUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, ThermalResistanceUnit Unit), List> Abbreviations { get; } #endregion @@ -272,6 +273,7 @@ public static IReadOnlyList GetAbbreviations(ThermalResistanceUnit unit, if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.ThermalResistance"; var resourceManager = new ResourceManager(resourceName, typeof(ThermalResistance).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/Torque.g.cs b/UnitsNet/GeneratedCode/Quantities/Torque.g.cs index a80f15c07e..f9e30fca9d 100644 --- a/UnitsNet/GeneratedCode/Quantities/Torque.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Torque.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -98,7 +99,7 @@ static Torque() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, TorqueUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, TorqueUnit Unit), List>(); } /// @@ -168,7 +169,7 @@ public Torque(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, TorqueUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, TorqueUnit Unit), List> Abbreviations { get; } #endregion @@ -424,6 +425,7 @@ public static IReadOnlyList GetAbbreviations(TorqueUnit unit, CultureInf if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Torque"; var resourceManager = new ResourceManager(resourceName, typeof(Torque).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/TorquePerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/TorquePerLength.g.cs index 31aafb9183..c8fdeaa51c 100644 --- a/UnitsNet/GeneratedCode/Quantities/TorquePerLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TorquePerLength.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -94,7 +95,7 @@ static TorquePerLength() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, TorquePerLengthUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, TorquePerLengthUnit Unit), List>(); } /// @@ -164,7 +165,7 @@ public TorquePerLength(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, TorquePerLengthUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, TorquePerLengthUnit Unit), List> Abbreviations { get; } #endregion @@ -392,6 +393,7 @@ public static IReadOnlyList GetAbbreviations(TorquePerLengthUnit unit, C if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.TorquePerLength"; var resourceManager = new ResourceManager(resourceName, typeof(TorquePerLength).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/Turbidity.g.cs b/UnitsNet/GeneratedCode/Quantities/Turbidity.g.cs index 9a2ad091a0..0e0a11d4b1 100644 --- a/UnitsNet/GeneratedCode/Quantities/Turbidity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Turbidity.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -77,7 +78,7 @@ static Turbidity() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, TurbidityUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, TurbidityUnit Unit), List>(); } /// @@ -147,7 +148,7 @@ public Turbidity(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, TurbidityUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, TurbidityUnit Unit), List> Abbreviations { get; } #endregion @@ -235,6 +236,7 @@ public static IReadOnlyList GetAbbreviations(TurbidityUnit unit, Culture if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Turbidity"; var resourceManager = new ResourceManager(resourceName, typeof(Turbidity).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs b/UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs index f4036d5334..ddd49a160b 100644 --- a/UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -74,7 +75,7 @@ static VitaminA() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, VitaminAUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, VitaminAUnit Unit), List>(); } /// @@ -144,7 +145,7 @@ public VitaminA(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, VitaminAUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, VitaminAUnit Unit), List> Abbreviations { get; } #endregion @@ -232,6 +233,7 @@ public static IReadOnlyList GetAbbreviations(VitaminAUnit unit, CultureI if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.VitaminA"; var resourceManager = new ResourceManager(resourceName, typeof(VitaminA).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/Volume.g.cs b/UnitsNet/GeneratedCode/Quantities/Volume.g.cs index 2697b17858..686463a11c 100644 --- a/UnitsNet/GeneratedCode/Quantities/Volume.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Volume.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -126,7 +127,7 @@ static Volume() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, VolumeUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, VolumeUnit Unit), List>(); } /// @@ -196,7 +197,7 @@ public Volume(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, VolumeUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, VolumeUnit Unit), List> Abbreviations { get; } #endregion @@ -648,6 +649,7 @@ public static IReadOnlyList GetAbbreviations(VolumeUnit unit, CultureInf if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.Volume"; var resourceManager = new ResourceManager(resourceName, typeof(Volume).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs index af6251592b..b2d4cb7682 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -96,7 +97,7 @@ static VolumeConcentration() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, VolumeConcentrationUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, VolumeConcentrationUnit Unit), List>(); } /// @@ -166,7 +167,7 @@ public VolumeConcentration(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, VolumeConcentrationUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, VolumeConcentrationUnit Unit), List> Abbreviations { get; } #endregion @@ -387,6 +388,7 @@ public static IReadOnlyList GetAbbreviations(VolumeConcentrationUnit uni if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.VolumeConcentration"; var resourceManager = new ResourceManager(resourceName, typeof(VolumeConcentration).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs index ca63471d23..4344f5cc44 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -135,7 +136,7 @@ static VolumeFlow() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, VolumeFlowUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, VolumeFlowUnit Unit), List>(); } /// @@ -205,7 +206,7 @@ public VolumeFlow(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, VolumeFlowUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, VolumeFlowUnit Unit), List> Abbreviations { get; } #endregion @@ -720,6 +721,7 @@ public static IReadOnlyList GetAbbreviations(VolumeFlowUnit unit, Cultur if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.VolumeFlow"; var resourceManager = new ResourceManager(resourceName, typeof(VolumeFlow).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/VolumeFlowPerArea.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumeFlowPerArea.g.cs index 7dbcb19311..3d28e294f6 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumeFlowPerArea.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumeFlowPerArea.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -75,7 +76,7 @@ static VolumeFlowPerArea() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, VolumeFlowPerAreaUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, VolumeFlowPerAreaUnit Unit), List>(); } /// @@ -145,7 +146,7 @@ public VolumeFlowPerArea(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, VolumeFlowPerAreaUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, VolumeFlowPerAreaUnit Unit), List> Abbreviations { get; } #endregion @@ -240,6 +241,7 @@ public static IReadOnlyList GetAbbreviations(VolumeFlowPerAreaUnit unit, if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.VolumeFlowPerArea"; var resourceManager = new ResourceManager(resourceName, typeof(VolumeFlowPerArea).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs index 6decfcea7c..d5cb866295 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -80,7 +81,7 @@ static VolumePerLength() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, VolumePerLengthUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, VolumePerLengthUnit Unit), List>(); } /// @@ -150,7 +151,7 @@ public VolumePerLength(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, VolumePerLengthUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, VolumePerLengthUnit Unit), List> Abbreviations { get; } #endregion @@ -280,6 +281,7 @@ public static IReadOnlyList GetAbbreviations(VolumePerLengthUnit unit, C if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.VolumePerLength"; var resourceManager = new ResourceManager(resourceName, typeof(VolumePerLength).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs index a93d07a2b5..fdf090d01e 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -85,7 +86,7 @@ static VolumetricHeatCapacity() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, VolumetricHeatCapacityUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, VolumetricHeatCapacityUnit Unit), List>(); } /// @@ -155,7 +156,7 @@ public VolumetricHeatCapacity(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, VolumetricHeatCapacityUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, VolumetricHeatCapacityUnit Unit), List> Abbreviations { get; } #endregion @@ -299,6 +300,7 @@ public static IReadOnlyList GetAbbreviations(VolumetricHeatCapacityUnit if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.VolumetricHeatCapacity"; var resourceManager = new ResourceManager(resourceName, typeof(VolumetricHeatCapacity).Assembly); diff --git a/UnitsNet/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs b/UnitsNet/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs index e4aedd98fd..bfff64556c 100644 --- a/UnitsNet/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs @@ -18,6 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -79,7 +80,7 @@ static WarpingMomentOfInertia() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - Abbreviations = new Dictionary<(CultureInfo Culture, WarpingMomentOfInertiaUnit Unit), List>(); + Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, WarpingMomentOfInertiaUnit Unit), List>(); } /// @@ -149,7 +150,7 @@ public WarpingMomentOfInertia(double value, UnitSystem unitSystem) /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - public static Dictionary<(CultureInfo Culture, WarpingMomentOfInertiaUnit Unit), List> Abbreviations { get; } + public static IDictionary<(CultureInfo Culture, WarpingMomentOfInertiaUnit Unit), List> Abbreviations { get; } #endregion @@ -272,6 +273,7 @@ public static IReadOnlyList GetAbbreviations(WarpingMomentOfInertiaUnit if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) { abbreviations = new List(); + const string resourceName = $"UnitsNet.GeneratedCode.Resources.WarpingMomentOfInertia"; var resourceManager = new ResourceManager(resourceName, typeof(WarpingMomentOfInertia).Assembly); From b1bd359d38dcb835f99a841c92a503dee8ae24ff Mon Sep 17 00:00:00 2001 From: Tristan Milnthorp Date: Mon, 13 Mar 2023 13:09:15 -0400 Subject: [PATCH 20/26] Remove empty catch/throw --- .../Generators/UnitsNetGen/UnitTestBaseClassGenerator.cs | 8 -------- .../GeneratedCode/TestsBase/AccelerationTestsBase.g.cs | 8 -------- .../TestsBase/AmountOfSubstanceTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/AmplitudeRatioTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/AngleTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/ApparentEnergyTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/ApparentPowerTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/AreaDensityTestsBase.g.cs | 8 -------- .../TestsBase/AreaMomentOfInertiaTestsBase.g.cs | 8 -------- UnitsNet.Tests/GeneratedCode/TestsBase/AreaTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/BitRateTestsBase.g.cs | 8 -------- .../TestsBase/BrakeSpecificFuelConsumptionTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/CapacitanceTestsBase.g.cs | 8 -------- .../TestsBase/CoefficientOfThermalExpansionTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/CompressibilityTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/DensityTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/DurationTestsBase.g.cs | 8 -------- .../TestsBase/DynamicViscosityTestsBase.g.cs | 8 -------- .../TestsBase/ElectricAdmittanceTestsBase.g.cs | 8 -------- .../TestsBase/ElectricChargeDensityTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/ElectricChargeTestsBase.g.cs | 8 -------- .../TestsBase/ElectricConductanceTestsBase.g.cs | 8 -------- .../TestsBase/ElectricConductivityTestsBase.g.cs | 8 -------- .../TestsBase/ElectricCurrentDensityTestsBase.g.cs | 8 -------- .../TestsBase/ElectricCurrentGradientTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/ElectricCurrentTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/ElectricFieldTestsBase.g.cs | 8 -------- .../TestsBase/ElectricInductanceTestsBase.g.cs | 8 -------- .../TestsBase/ElectricPotentialAcTestsBase.g.cs | 8 -------- .../TestsBase/ElectricPotentialChangeRateTestsBase.g.cs | 8 -------- .../TestsBase/ElectricPotentialDcTestsBase.g.cs | 8 -------- .../TestsBase/ElectricPotentialTestsBase.g.cs | 8 -------- .../TestsBase/ElectricResistanceTestsBase.g.cs | 8 -------- .../TestsBase/ElectricResistivityTestsBase.g.cs | 8 -------- .../TestsBase/ElectricSurfaceChargeDensityTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/EnergyDensityTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/EnergyTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/EntropyTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/ForceChangeRateTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/ForcePerLengthTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/ForceTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/FrequencyTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/FuelEfficiencyTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/HeatFluxTestsBase.g.cs | 8 -------- .../TestsBase/HeatTransferCoefficientTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/IlluminanceTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/ImpulseTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/InformationTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/IrradianceTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/IrradiationTestsBase.g.cs | 8 -------- UnitsNet.Tests/GeneratedCode/TestsBase/JerkTestsBase.g.cs | 8 -------- .../TestsBase/KinematicViscosityTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/LeakRateTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/LengthTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/LevelTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/LinearDensityTestsBase.g.cs | 8 -------- .../TestsBase/LinearPowerDensityTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/LuminanceTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/LuminosityTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/LuminousFluxTestsBase.g.cs | 8 -------- .../TestsBase/LuminousIntensityTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/MagneticFieldTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/MagneticFluxTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/MagnetizationTestsBase.g.cs | 8 -------- .../TestsBase/MassConcentrationTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/MassFlowTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/MassFluxTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/MassFractionTestsBase.g.cs | 8 -------- .../TestsBase/MassMomentOfInertiaTestsBase.g.cs | 8 -------- UnitsNet.Tests/GeneratedCode/TestsBase/MassTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/MolarEnergyTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/MolarEntropyTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/MolarFlowTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/MolarMassTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/MolarityTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/PermeabilityTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/PermittivityTestsBase.g.cs | 8 -------- .../TestsBase/PorousMediumPermeabilityTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/PowerDensityTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/PowerRatioTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/PowerTestsBase.g.cs | 8 -------- .../TestsBase/PressureChangeRateTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/PressureTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/RatioChangeRateTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/RatioTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/ReactiveEnergyTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/ReactivePowerTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/ReciprocalAreaTestsBase.g.cs | 8 -------- .../TestsBase/ReciprocalLengthTestsBase.g.cs | 8 -------- .../TestsBase/RelativeHumidityTestsBase.g.cs | 8 -------- .../TestsBase/RotationalAccelerationTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/RotationalSpeedTestsBase.g.cs | 8 -------- .../TestsBase/RotationalStiffnessPerLengthTestsBase.g.cs | 8 -------- .../TestsBase/RotationalStiffnessTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/ScalarTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/SolidAngleTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/SpecificEnergyTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/SpecificEntropyTestsBase.g.cs | 8 -------- .../TestsBase/SpecificFuelConsumptionTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/SpecificVolumeTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/SpecificWeightTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/SpeedTestsBase.g.cs | 8 -------- .../TestsBase/StandardVolumeFlowTestsBase.g.cs | 8 -------- .../TestsBase/TemperatureChangeRateTestsBase.g.cs | 8 -------- .../TestsBase/TemperatureDeltaTestsBase.g.cs | 8 -------- .../TestsBase/TemperatureGradientTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/TemperatureTestsBase.g.cs | 8 -------- .../TestsBase/ThermalConductivityTestsBase.g.cs | 8 -------- .../TestsBase/ThermalResistanceTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/TorquePerLengthTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/TorqueTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/TurbidityTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/VitaminATestsBase.g.cs | 8 -------- .../TestsBase/VolumeConcentrationTestsBase.g.cs | 8 -------- .../TestsBase/VolumeFlowPerAreaTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/VolumeFlowTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/VolumePerLengthTestsBase.g.cs | 8 -------- .../GeneratedCode/TestsBase/VolumeTestsBase.g.cs | 8 -------- .../TestsBase/VolumetricHeatCapacityTestsBase.g.cs | 8 -------- .../TestsBase/WarpingMomentOfInertiaTestsBase.g.cs | 8 -------- 120 files changed, 960 deletions(-) diff --git a/CodeGen/Generators/UnitsNetGen/UnitTestBaseClassGenerator.cs b/CodeGen/Generators/UnitsNetGen/UnitTestBaseClassGenerator.cs index cd94305d52..02313ea6dd 100644 --- a/CodeGen/Generators/UnitsNetGen/UnitTestBaseClassGenerator.cs +++ b/CodeGen/Generators/UnitsNetGen/UnitTestBaseClassGenerator.cs @@ -605,10 +605,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } Writer.WL($@" }} - catch - {{ - throw; - }} finally {{ Thread.CurrentThread.CurrentCulture = prevCulture; @@ -641,10 +637,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal(""0.123{_baseUnitEnglishAbbreviation}"", new {_quantity.Name}(0.123456{_numberSuffix}, {_baseUnitFullName}).ToString(""s3"")); Assert.Equal(""0.1235{_baseUnitEnglishAbbreviation}"", new {_quantity.Name}(0.123456{_numberSuffix}, {_baseUnitFullName}).ToString(""s4"")); }} - catch - {{ - throw; - }} finally {{ CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AccelerationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AccelerationTestsBase.g.cs index 06e338fe2f..8016edae40 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/AccelerationTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AccelerationTestsBase.g.cs @@ -1211,10 +1211,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 nm/s²", new Acceleration(1, AccelerationUnit.NanometerPerSecondSquared).ToString()); Assert.Equal("1 g", new Acceleration(1, AccelerationUnit.StandardGravity).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1255,10 +1251,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 m/s²", new Acceleration(0.123456, AccelerationUnit.MeterPerSecondSquared).ToString("s3")); Assert.Equal("0.1235 m/s²", new Acceleration(0.123456, AccelerationUnit.MeterPerSecondSquared).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AmountOfSubstanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AmountOfSubstanceTestsBase.g.cs index 903da7e95a..6184b15194 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/AmountOfSubstanceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AmountOfSubstanceTestsBase.g.cs @@ -889,10 +889,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 nlbmol", new AmountOfSubstance(1, AmountOfSubstanceUnit.NanopoundMole).ToString()); Assert.Equal("1 lbmol", new AmountOfSubstance(1, AmountOfSubstanceUnit.PoundMole).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -934,10 +930,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 mol", new AmountOfSubstance(0.123456, AmountOfSubstanceUnit.Mole).ToString("s3")); Assert.Equal("0.1235 mol", new AmountOfSubstance(0.123456, AmountOfSubstanceUnit.Mole).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AmplitudeRatioTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AmplitudeRatioTestsBase.g.cs index 1db75a1205..8c8d952df2 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/AmplitudeRatioTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AmplitudeRatioTestsBase.g.cs @@ -519,10 +519,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 dBu", new AmplitudeRatio(1, AmplitudeRatioUnit.DecibelUnloaded).ToString()); Assert.Equal("1 dBV", new AmplitudeRatio(1, AmplitudeRatioUnit.DecibelVolt).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -553,10 +549,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 dBV", new AmplitudeRatio(0.123456, AmplitudeRatioUnit.DecibelVolt).ToString("s3")); Assert.Equal("0.1235 dBV", new AmplitudeRatio(0.123456, AmplitudeRatioUnit.DecibelVolt).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AngleTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AngleTestsBase.g.cs index 98bbe590d8..41ad0ce776 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/AngleTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AngleTestsBase.g.cs @@ -1475,10 +1475,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 r", new Angle(1, AngleUnit.Revolution).ToString()); Assert.Equal("1 sin(θ)", new Angle(1, AngleUnit.Tilt).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1521,10 +1517,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 °", new Angle(0.123456, AngleUnit.Degree).ToString("s3")); Assert.Equal("0.1235 °", new Angle(0.123456, AngleUnit.Degree).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentEnergyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentEnergyTestsBase.g.cs index ef4492016f..517fd696e6 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentEnergyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentEnergyTestsBase.g.cs @@ -479,10 +479,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 MVAh", new ApparentEnergy(1, ApparentEnergyUnit.MegavoltampereHour).ToString()); Assert.Equal("1 VAh", new ApparentEnergy(1, ApparentEnergyUnit.VoltampereHour).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -512,10 +508,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 VAh", new ApparentEnergy(0.123456, ApparentEnergyUnit.VoltampereHour).ToString("s3")); Assert.Equal("0.1235 VAh", new ApparentEnergy(0.123456, ApparentEnergyUnit.VoltampereHour).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentPowerTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentPowerTestsBase.g.cs index a055ceadf8..c837d97039 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentPowerTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentPowerTestsBase.g.cs @@ -565,10 +565,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 mVA", new ApparentPower(1, ApparentPowerUnit.Millivoltampere).ToString()); Assert.Equal("1 VA", new ApparentPower(1, ApparentPowerUnit.Voltampere).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -601,10 +597,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 VA", new ApparentPower(0.123456, ApparentPowerUnit.Voltampere).ToString("s3")); Assert.Equal("0.1235 VA", new ApparentPower(0.123456, ApparentPowerUnit.Voltampere).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaDensityTestsBase.g.cs index a37649ad61..7a52efb886 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaDensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaDensityTestsBase.g.cs @@ -503,10 +503,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 kg/m²", new AreaDensity(1, AreaDensityUnit.KilogramPerSquareMeter).ToString()); Assert.Equal("1 mg/m²", new AreaDensity(1, AreaDensityUnit.MilligramPerSquareMeter).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -536,10 +532,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 kg/m²", new AreaDensity(0.123456, AreaDensityUnit.KilogramPerSquareMeter).ToString("s3")); Assert.Equal("0.1235 kg/m²", new AreaDensity(0.123456, AreaDensityUnit.KilogramPerSquareMeter).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaMomentOfInertiaTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaMomentOfInertiaTestsBase.g.cs index fdeb65e081..baad089fb2 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaMomentOfInertiaTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaMomentOfInertiaTestsBase.g.cs @@ -731,10 +731,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 m⁴", new AreaMomentOfInertia(1, AreaMomentOfInertiaUnit.MeterToTheFourth).ToString()); Assert.Equal("1 mm⁴", new AreaMomentOfInertia(1, AreaMomentOfInertiaUnit.MillimeterToTheFourth).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -767,10 +763,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 m⁴", new AreaMomentOfInertia(0.123456, AreaMomentOfInertiaUnit.MeterToTheFourth).ToString("s3")); Assert.Equal("0.1235 m⁴", new AreaMomentOfInertia(0.123456, AreaMomentOfInertiaUnit.MeterToTheFourth).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaTestsBase.g.cs index 450b4bb214..a03b6f082f 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaTestsBase.g.cs @@ -1501,10 +1501,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 yd²", new Area(1, AreaUnit.SquareYard).ToString()); Assert.Equal("1 ft² (US)", new Area(1, AreaUnit.UsSurveySquareFoot).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1545,10 +1541,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 m²", new Area(0.123456, AreaUnit.SquareMeter).ToString("s3")); Assert.Equal("0.1235 m²", new Area(0.123456, AreaUnit.SquareMeter).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/BitRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/BitRateTestsBase.g.cs index 62999bc500..be62ba4cc7 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/BitRateTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/BitRateTestsBase.g.cs @@ -1594,10 +1594,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 Tbit/s", new BitRate(1, BitRateUnit.TerabitPerSecond).ToString()); Assert.Equal("1 TB/s", new BitRate(1, BitRateUnit.TerabytePerSecond).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1650,10 +1646,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 bit/s", new BitRate(0.123456m, BitRateUnit.BitPerSecond).ToString("s3")); Assert.Equal("0.1235 bit/s", new BitRate(0.123456m, BitRateUnit.BitPerSecond).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/BrakeSpecificFuelConsumptionTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/BrakeSpecificFuelConsumptionTestsBase.g.cs index db4bf57522..48160ebe70 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/BrakeSpecificFuelConsumptionTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/BrakeSpecificFuelConsumptionTestsBase.g.cs @@ -479,10 +479,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 kg/J", new BrakeSpecificFuelConsumption(1, BrakeSpecificFuelConsumptionUnit.KilogramPerJoule).ToString()); Assert.Equal("1 lb/hph", new BrakeSpecificFuelConsumption(1, BrakeSpecificFuelConsumptionUnit.PoundPerMechanicalHorsepowerHour).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -512,10 +508,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 kg/J", new BrakeSpecificFuelConsumption(0.123456, BrakeSpecificFuelConsumptionUnit.KilogramPerJoule).ToString("s3")); Assert.Equal("0.1235 kg/J", new BrakeSpecificFuelConsumption(0.123456, BrakeSpecificFuelConsumptionUnit.KilogramPerJoule).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/CapacitanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/CapacitanceTestsBase.g.cs index 4609daecb9..f4c69001a6 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/CapacitanceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/CapacitanceTestsBase.g.cs @@ -601,10 +601,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 nF", new Capacitance(1, CapacitanceUnit.Nanofarad).ToString()); Assert.Equal("1 pF", new Capacitance(1, CapacitanceUnit.Picofarad).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -638,10 +634,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 F", new Capacitance(0.123456, CapacitanceUnit.Farad).ToString("s3")); Assert.Equal("0.1235 F", new Capacitance(0.123456, CapacitanceUnit.Farad).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/CoefficientOfThermalExpansionTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/CoefficientOfThermalExpansionTestsBase.g.cs index d453233a64..348482a755 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/CoefficientOfThermalExpansionTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/CoefficientOfThermalExpansionTestsBase.g.cs @@ -551,10 +551,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 °F⁻¹", new CoefficientOfThermalExpansion(1, CoefficientOfThermalExpansionUnit.InverseDegreeFahrenheit).ToString()); Assert.Equal("1 K⁻¹", new CoefficientOfThermalExpansion(1, CoefficientOfThermalExpansionUnit.InverseKelvin).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -584,10 +580,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 K⁻¹", new CoefficientOfThermalExpansion(0.123456, CoefficientOfThermalExpansionUnit.InverseKelvin).ToString("s3")); Assert.Equal("0.1235 K⁻¹", new CoefficientOfThermalExpansion(0.123456, CoefficientOfThermalExpansionUnit.InverseKelvin).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/CompressibilityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/CompressibilityTestsBase.g.cs index b1adca703a..cd16c66174 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/CompressibilityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/CompressibilityTestsBase.g.cs @@ -791,10 +791,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 Pa⁻¹", new Compressibility(1, CompressibilityUnit.InversePascal).ToString()); Assert.Equal("1 psi⁻¹", new Compressibility(1, CompressibilityUnit.InversePoundForcePerSquareInch).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -828,10 +824,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 Pa⁻¹", new Compressibility(0.123456, CompressibilityUnit.InversePascal).ToString("s3")); Assert.Equal("0.1235 Pa⁻¹", new Compressibility(0.123456, CompressibilityUnit.InversePascal).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/DensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/DensityTestsBase.g.cs index f20f599581..3027b5c612 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/DensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/DensityTestsBase.g.cs @@ -2303,10 +2303,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 t/m³", new Density(1, DensityUnit.TonnePerCubicMeter).ToString()); Assert.Equal("1 t/mm³", new Density(1, DensityUnit.TonnePerCubicMillimeter).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -2384,10 +2380,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 kg/m³", new Density(0.123456, DensityUnit.KilogramPerCubicMeter).ToString("s3")); Assert.Equal("0.1235 kg/m³", new Density(0.123456, DensityUnit.KilogramPerCubicMeter).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/DurationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/DurationTestsBase.g.cs index 28844eb8e3..f894a93107 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/DurationTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/DurationTestsBase.g.cs @@ -1943,10 +1943,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 wk", new Duration(1, DurationUnit.Week).ToString()); Assert.Equal("1 yr", new Duration(1, DurationUnit.Year365).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1984,10 +1980,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 s", new Duration(0.123456, DurationUnit.Second).ToString("s3")); Assert.Equal("0.1235 s", new Duration(0.123456, DurationUnit.Second).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/DynamicViscosityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/DynamicViscosityTestsBase.g.cs index 9e3a1eca30..dd8bc8d531 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/DynamicViscosityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/DynamicViscosityTestsBase.g.cs @@ -803,10 +803,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 lb/ft·s", new DynamicViscosity(1, DynamicViscosityUnit.PoundPerFootSecond).ToString()); Assert.Equal("1 reyn", new DynamicViscosity(1, DynamicViscosityUnit.Reyn).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -843,10 +839,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 Ns/m²", new DynamicViscosity(0.123456, DynamicViscosityUnit.NewtonSecondPerMeterSquared).ToString("s3")); Assert.Equal("0.1235 Ns/m²", new DynamicViscosity(0.123456, DynamicViscosityUnit.NewtonSecondPerMeterSquared).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricAdmittanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricAdmittanceTestsBase.g.cs index 36c2d49749..b38c2598ff 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricAdmittanceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricAdmittanceTestsBase.g.cs @@ -515,10 +515,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 nS", new ElectricAdmittance(1, ElectricAdmittanceUnit.Nanosiemens).ToString()); Assert.Equal("1 S", new ElectricAdmittance(1, ElectricAdmittanceUnit.Siemens).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -549,10 +545,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 S", new ElectricAdmittance(0.123456, ElectricAdmittanceUnit.Siemens).ToString("s3")); Assert.Equal("0.1235 S", new ElectricAdmittance(0.123456, ElectricAdmittanceUnit.Siemens).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeDensityTestsBase.g.cs index 0f289dcf58..0633765b22 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeDensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeDensityTestsBase.g.cs @@ -406,10 +406,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() try { Assert.Equal("1 C/m³", new ElectricChargeDensity(1, ElectricChargeDensityUnit.CoulombPerCubicMeter).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -437,10 +433,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 C/m³", new ElectricChargeDensity(0.123456, ElectricChargeDensityUnit.CoulombPerCubicMeter).ToString("s3")); Assert.Equal("0.1235 C/m³", new ElectricChargeDensity(0.123456, ElectricChargeDensityUnit.CoulombPerCubicMeter).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeTestsBase.g.cs index 26265d4a84..0307409152 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeTestsBase.g.cs @@ -797,10 +797,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 nC", new ElectricCharge(1, ElectricChargeUnit.Nanocoulomb).ToString()); Assert.Equal("1 pC", new ElectricCharge(1, ElectricChargeUnit.Picocoulomb).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -838,10 +834,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 C", new ElectricCharge(0.123456, ElectricChargeUnit.Coulomb).ToString("s3")); Assert.Equal("0.1235 C", new ElectricCharge(0.123456, ElectricChargeUnit.Coulomb).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductanceTestsBase.g.cs index eb1cd5a463..5c9c9a2388 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductanceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductanceTestsBase.g.cs @@ -551,10 +551,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 nS", new ElectricConductance(1, ElectricConductanceUnit.Nanosiemens).ToString()); Assert.Equal("1 S", new ElectricConductance(1, ElectricConductanceUnit.Siemens).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -586,10 +582,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 S", new ElectricConductance(0.123456, ElectricConductanceUnit.Siemens).ToString("s3")); Assert.Equal("0.1235 S", new ElectricConductance(0.123456, ElectricConductanceUnit.Siemens).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductivityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductivityTestsBase.g.cs index d75bf66f2b..5495b54c60 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductivityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductivityTestsBase.g.cs @@ -587,10 +587,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 S/in", new ElectricConductivity(1, ElectricConductivityUnit.SiemensPerInch).ToString()); Assert.Equal("1 S/m", new ElectricConductivity(1, ElectricConductivityUnit.SiemensPerMeter).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -623,10 +619,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 S/m", new ElectricConductivity(0.123456, ElectricConductivityUnit.SiemensPerMeter).ToString("s3")); Assert.Equal("0.1235 S/m", new ElectricConductivity(0.123456, ElectricConductivityUnit.SiemensPerMeter).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentDensityTestsBase.g.cs index 77b93692c9..1e8f4d08e3 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentDensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentDensityTestsBase.g.cs @@ -479,10 +479,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 A/in²", new ElectricCurrentDensity(1, ElectricCurrentDensityUnit.AmperePerSquareInch).ToString()); Assert.Equal("1 A/m²", new ElectricCurrentDensity(1, ElectricCurrentDensityUnit.AmperePerSquareMeter).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -512,10 +508,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 A/m²", new ElectricCurrentDensity(0.123456, ElectricCurrentDensityUnit.AmperePerSquareMeter).ToString("s3")); Assert.Equal("0.1235 A/m²", new ElectricCurrentDensity(0.123456, ElectricCurrentDensityUnit.AmperePerSquareMeter).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentGradientTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentGradientTestsBase.g.cs index ad49b9e938..309d178337 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentGradientTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentGradientTestsBase.g.cs @@ -515,10 +515,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 A/ns", new ElectricCurrentGradient(1, ElectricCurrentGradientUnit.AmperePerNanosecond).ToString()); Assert.Equal("1 A/s", new ElectricCurrentGradient(1, ElectricCurrentGradientUnit.AmperePerSecond).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -549,10 +545,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 A/s", new ElectricCurrentGradient(0.123456, ElectricCurrentGradientUnit.AmperePerSecond).ToString("s3")); Assert.Equal("0.1235 A/s", new ElectricCurrentGradient(0.123456, ElectricCurrentGradientUnit.AmperePerSecond).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentTestsBase.g.cs index 3355a1ee4b..a562934178 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentTestsBase.g.cs @@ -673,10 +673,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 nA", new ElectricCurrent(1, ElectricCurrentUnit.Nanoampere).ToString()); Assert.Equal("1 pA", new ElectricCurrent(1, ElectricCurrentUnit.Picoampere).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -712,10 +708,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 A", new ElectricCurrent(0.123456, ElectricCurrentUnit.Ampere).ToString("s3")); Assert.Equal("0.1235 A", new ElectricCurrent(0.123456, ElectricCurrentUnit.Ampere).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricFieldTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricFieldTestsBase.g.cs index b5e61cd2b5..e45dad4e08 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricFieldTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricFieldTestsBase.g.cs @@ -406,10 +406,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() try { Assert.Equal("1 V/m", new ElectricField(1, ElectricFieldUnit.VoltPerMeter).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -437,10 +433,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 V/m", new ElectricField(0.123456, ElectricFieldUnit.VoltPerMeter).ToString("s3")); Assert.Equal("0.1235 V/m", new ElectricField(0.123456, ElectricFieldUnit.VoltPerMeter).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricInductanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricInductanceTestsBase.g.cs index 52b319fb8a..b96c40371f 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricInductanceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricInductanceTestsBase.g.cs @@ -551,10 +551,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 nH", new ElectricInductance(1, ElectricInductanceUnit.Nanohenry).ToString()); Assert.Equal("1 pH", new ElectricInductance(1, ElectricInductanceUnit.Picohenry).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -586,10 +582,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 H", new ElectricInductance(0.123456, ElectricInductanceUnit.Henry).ToString("s3")); Assert.Equal("0.1235 H", new ElectricInductance(0.123456, ElectricInductanceUnit.Henry).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialAcTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialAcTestsBase.g.cs index 5a888566c3..d1219793c5 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialAcTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialAcTestsBase.g.cs @@ -529,10 +529,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 mVac", new ElectricPotentialAc(1, ElectricPotentialAcUnit.MillivoltAc).ToString()); Assert.Equal("1 Vac", new ElectricPotentialAc(1, ElectricPotentialAcUnit.VoltAc).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -564,10 +560,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 Vac", new ElectricPotentialAc(0.123456, ElectricPotentialAcUnit.VoltAc).ToString("s3")); Assert.Equal("0.1235 Vac", new ElectricPotentialAc(0.123456, ElectricPotentialAcUnit.VoltAc).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialChangeRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialChangeRateTestsBase.g.cs index cc67f52ca6..e30643eb12 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialChangeRateTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialChangeRateTestsBase.g.cs @@ -1003,10 +1003,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 V/min", new ElectricPotentialChangeRate(1, ElectricPotentialChangeRateUnit.VoltPerMinute).ToString()); Assert.Equal("1 V/s", new ElectricPotentialChangeRate(1, ElectricPotentialChangeRateUnit.VoltPerSecond).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1053,10 +1049,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 V/s", new ElectricPotentialChangeRate(0.123456, ElectricPotentialChangeRateUnit.VoltPerSecond).ToString("s3")); Assert.Equal("0.1235 V/s", new ElectricPotentialChangeRate(0.123456, ElectricPotentialChangeRateUnit.VoltPerSecond).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialDcTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialDcTestsBase.g.cs index 4bf24d4934..15669faa28 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialDcTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialDcTestsBase.g.cs @@ -529,10 +529,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 mVdc", new ElectricPotentialDc(1, ElectricPotentialDcUnit.MillivoltDc).ToString()); Assert.Equal("1 Vdc", new ElectricPotentialDc(1, ElectricPotentialDcUnit.VoltDc).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -564,10 +560,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 Vdc", new ElectricPotentialDc(0.123456, ElectricPotentialDcUnit.VoltDc).ToString("s3")); Assert.Equal("0.1235 Vdc", new ElectricPotentialDc(0.123456, ElectricPotentialDcUnit.VoltDc).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialTestsBase.g.cs index 18568ec238..b375ce83d4 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialTestsBase.g.cs @@ -687,10 +687,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 nV", new ElectricPotential(1, ElectricPotentialUnit.Nanovolt).ToString()); Assert.Equal("1 V", new ElectricPotential(1, ElectricPotentialUnit.Volt).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -723,10 +719,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 V", new ElectricPotential(0.123456, ElectricPotentialUnit.Volt).ToString("s3")); Assert.Equal("0.1235 V", new ElectricPotential(0.123456, ElectricPotentialUnit.Volt).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistanceTestsBase.g.cs index 071746b845..c69fe1611c 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistanceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistanceTestsBase.g.cs @@ -601,10 +601,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 Ω", new ElectricResistance(1, ElectricResistanceUnit.Ohm).ToString()); Assert.Equal("1 TΩ", new ElectricResistance(1, ElectricResistanceUnit.Teraohm).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -638,10 +634,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 Ω", new ElectricResistance(0.123456, ElectricResistanceUnit.Ohm).ToString("s3")); Assert.Equal("0.1235 Ω", new ElectricResistance(0.123456, ElectricResistanceUnit.Ohm).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistivityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistivityTestsBase.g.cs index 7028eca732..2ce41ad10e 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistivityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistivityTestsBase.g.cs @@ -831,10 +831,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 pΩ·cm", new ElectricResistivity(1, ElectricResistivityUnit.PicoohmCentimeter).ToString()); Assert.Equal("1 pΩ·m", new ElectricResistivity(1, ElectricResistivityUnit.PicoohmMeter).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -875,10 +871,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 Ω·m", new ElectricResistivity(0.123456, ElectricResistivityUnit.OhmMeter).ToString("s3")); Assert.Equal("0.1235 Ω·m", new ElectricResistivity(0.123456, ElectricResistivityUnit.OhmMeter).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricSurfaceChargeDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricSurfaceChargeDensityTestsBase.g.cs index 935b5f101e..04af0291fe 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricSurfaceChargeDensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricSurfaceChargeDensityTestsBase.g.cs @@ -479,10 +479,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 C/in²", new ElectricSurfaceChargeDensity(1, ElectricSurfaceChargeDensityUnit.CoulombPerSquareInch).ToString()); Assert.Equal("1 C/m²", new ElectricSurfaceChargeDensity(1, ElectricSurfaceChargeDensityUnit.CoulombPerSquareMeter).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -512,10 +508,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 C/m²", new ElectricSurfaceChargeDensity(0.123456, ElectricSurfaceChargeDensityUnit.CoulombPerSquareMeter).ToString("s3")); Assert.Equal("0.1235 C/m²", new ElectricSurfaceChargeDensity(0.123456, ElectricSurfaceChargeDensityUnit.CoulombPerSquareMeter).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/EnergyDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/EnergyDensityTestsBase.g.cs index c98dd84181..57502ee676 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/EnergyDensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/EnergyDensityTestsBase.g.cs @@ -803,10 +803,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 TWh/m³", new EnergyDensity(1, EnergyDensityUnit.TerawattHourPerCubicMeter).ToString()); Assert.Equal("1 Wh/m³", new EnergyDensity(1, EnergyDensityUnit.WattHourPerCubicMeter).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -845,10 +841,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 J/m³", new EnergyDensity(0.123456, EnergyDensityUnit.JoulePerCubicMeter).ToString("s3")); Assert.Equal("0.1235 J/m³", new EnergyDensity(0.123456, EnergyDensityUnit.JoulePerCubicMeter).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/EnergyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/EnergyTestsBase.g.cs index 70419db7dd..3b76340904 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/EnergyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/EnergyTestsBase.g.cs @@ -2221,10 +2221,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 Wd", new Energy(1, EnergyUnit.WattDay).ToString()); Assert.Equal("1 Wh", new Energy(1, EnergyUnit.WattHour).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -2289,10 +2285,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 J", new Energy(0.123456, EnergyUnit.Joule).ToString("s3")); Assert.Equal("0.1235 J", new Energy(0.123456, EnergyUnit.Joule).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/EntropyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/EntropyTestsBase.g.cs index 8e2e2943e6..65737394af 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/EntropyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/EntropyTestsBase.g.cs @@ -623,10 +623,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 kJ/K", new Entropy(1, EntropyUnit.KilojoulePerKelvin).ToString()); Assert.Equal("1 MJ/K", new Entropy(1, EntropyUnit.MegajoulePerKelvin).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -660,10 +656,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 J/K", new Entropy(0.123456, EntropyUnit.JoulePerKelvin).ToString("s3")); Assert.Equal("0.1235 J/K", new Entropy(0.123456, EntropyUnit.JoulePerKelvin).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ForceChangeRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ForceChangeRateTestsBase.g.cs index 90f344a5ee..82f5a8ee3c 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ForceChangeRateTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ForceChangeRateTestsBase.g.cs @@ -1007,10 +1007,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 lbf/min", new ForceChangeRate(1, ForceChangeRateUnit.PoundForcePerMinute).ToString()); Assert.Equal("1 lbf/s", new ForceChangeRate(1, ForceChangeRateUnit.PoundForcePerSecond).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1052,10 +1048,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 N/s", new ForceChangeRate(0.123456, ForceChangeRateUnit.NewtonPerSecond).ToString("s3")); Assert.Equal("0.1235 N/s", new ForceChangeRate(0.123456, ForceChangeRateUnit.NewtonPerSecond).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ForcePerLengthTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ForcePerLengthTestsBase.g.cs index fb96965ca0..5a75e375d3 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ForcePerLengthTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ForcePerLengthTestsBase.g.cs @@ -1913,10 +1913,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 tf/m", new ForcePerLength(1, ForcePerLengthUnit.TonneForcePerMeter).ToString()); Assert.Equal("1 tf/mm", new ForcePerLength(1, ForcePerLengthUnit.TonneForcePerMillimeter).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1981,10 +1977,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 N/m", new ForcePerLength(0.123456, ForcePerLengthUnit.NewtonPerMeter).ToString("s3")); Assert.Equal("0.1235 N/m", new ForcePerLength(0.123456, ForcePerLengthUnit.NewtonPerMeter).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ForceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ForceTestsBase.g.cs index 6b28df5e96..feac3204ae 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ForceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ForceTestsBase.g.cs @@ -1325,10 +1325,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 tf (short)", new Force(1, ForceUnit.ShortTonForce).ToString()); Assert.Equal("1 tf", new Force(1, ForceUnit.TonneForce).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1370,10 +1366,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 N", new Force(0.123456, ForceUnit.Newton).ToString("s3")); Assert.Equal("0.1235 N", new Force(0.123456, ForceUnit.Newton).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/FrequencyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/FrequencyTestsBase.g.cs index c972998bfb..a68228ce0d 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/FrequencyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/FrequencyTestsBase.g.cs @@ -1011,10 +1011,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 rad/s", new Frequency(1, FrequencyUnit.RadianPerSecond).ToString()); Assert.Equal("1 THz", new Frequency(1, FrequencyUnit.Terahertz).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1054,10 +1050,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 Hz", new Frequency(0.123456, FrequencyUnit.Hertz).ToString("s3")); Assert.Equal("0.1235 Hz", new Frequency(0.123456, FrequencyUnit.Hertz).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/FuelEfficiencyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/FuelEfficiencyTestsBase.g.cs index fba0edb255..a558e69faf 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/FuelEfficiencyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/FuelEfficiencyTestsBase.g.cs @@ -515,10 +515,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 mpg (imp.)", new FuelEfficiency(1, FuelEfficiencyUnit.MilePerUkGallon).ToString()); Assert.Equal("1 mpg (U.S.)", new FuelEfficiency(1, FuelEfficiencyUnit.MilePerUsGallon).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -549,10 +545,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 L/100km", new FuelEfficiency(0.123456, FuelEfficiencyUnit.LiterPer100Kilometers).ToString("s3")); Assert.Equal("0.1235 L/100km", new FuelEfficiency(0.123456, FuelEfficiencyUnit.LiterPer100Kilometers).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/HeatFluxTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/HeatFluxTestsBase.g.cs index 4c3b592d72..0f653e5ceb 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/HeatFluxTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/HeatFluxTestsBase.g.cs @@ -1043,10 +1043,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 W/in²", new HeatFlux(1, HeatFluxUnit.WattPerSquareInch).ToString()); Assert.Equal("1 W/m²", new HeatFlux(1, HeatFluxUnit.WattPerSquareMeter).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1091,10 +1087,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 W/m²", new HeatFlux(0.123456, HeatFluxUnit.WattPerSquareMeter).ToString("s3")); Assert.Equal("0.1235 W/m²", new HeatFlux(0.123456, HeatFluxUnit.WattPerSquareMeter).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/HeatTransferCoefficientTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/HeatTransferCoefficientTestsBase.g.cs index e6b9a01ccc..6ff8538e11 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/HeatTransferCoefficientTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/HeatTransferCoefficientTestsBase.g.cs @@ -779,10 +779,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 W/m²·°C", new HeatTransferCoefficient(1, HeatTransferCoefficientUnit.WattPerSquareMeterCelsius).ToString()); Assert.Equal("1 W/m²·K", new HeatTransferCoefficient(1, HeatTransferCoefficientUnit.WattPerSquareMeterKelvin).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -815,10 +811,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 W/m²·K", new HeatTransferCoefficient(0.123456, HeatTransferCoefficientUnit.WattPerSquareMeterKelvin).ToString("s3")); Assert.Equal("0.1235 W/m²·K", new HeatTransferCoefficient(0.123456, HeatTransferCoefficientUnit.WattPerSquareMeterKelvin).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/IlluminanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/IlluminanceTestsBase.g.cs index f54476fa15..5bb67f139b 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/IlluminanceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/IlluminanceTestsBase.g.cs @@ -493,10 +493,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 Mlx", new Illuminance(1, IlluminanceUnit.Megalux).ToString()); Assert.Equal("1 mlx", new Illuminance(1, IlluminanceUnit.Millilux).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -527,10 +523,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 lx", new Illuminance(0.123456, IlluminanceUnit.Lux).ToString("s3")); Assert.Equal("0.1235 lx", new Illuminance(0.123456, IlluminanceUnit.Lux).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ImpulseTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ImpulseTestsBase.g.cs index 5bbb1d597b..5f556412e4 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ImpulseTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ImpulseTestsBase.g.cs @@ -817,10 +817,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 lbf·s", new Impulse(1, ImpulseUnit.PoundForceSecond).ToString()); Assert.Equal("1 slug·ft/s", new Impulse(1, ImpulseUnit.SlugFootPerSecond).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -860,10 +856,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 N·s", new Impulse(0.123456, ImpulseUnit.NewtonSecond).ToString("s3")); Assert.Equal("0.1235 N·s", new Impulse(0.123456, ImpulseUnit.NewtonSecond).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/InformationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/InformationTestsBase.g.cs index 8a3ca8dc49..f061b4eca8 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/InformationTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/InformationTestsBase.g.cs @@ -996,10 +996,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 Tb", new Information(1, InformationUnit.Terabit).ToString()); Assert.Equal("1 TB", new Information(1, InformationUnit.Terabyte).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1052,10 +1048,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 b", new Information(0.123456m, InformationUnit.Bit).ToString("s3")); Assert.Equal("0.1235 b", new Information(0.123456m, InformationUnit.Bit).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/IrradianceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/IrradianceTestsBase.g.cs index 10bb13762d..fea1eaca85 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/IrradianceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/IrradianceTestsBase.g.cs @@ -831,10 +831,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 W/cm²", new Irradiance(1, IrradianceUnit.WattPerSquareCentimeter).ToString()); Assert.Equal("1 W/m²", new Irradiance(1, IrradianceUnit.WattPerSquareMeter).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -875,10 +871,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 W/m²", new Irradiance(0.123456, IrradianceUnit.WattPerSquareMeter).ToString("s3")); Assert.Equal("0.1235 W/m²", new Irradiance(0.123456, IrradianceUnit.WattPerSquareMeter).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/IrradiationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/IrradiationTestsBase.g.cs index 2c3d54ea2d..908b49b1f8 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/IrradiationTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/IrradiationTestsBase.g.cs @@ -623,10 +623,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 mJ/cm²", new Irradiation(1, IrradiationUnit.MillijoulePerSquareCentimeter).ToString()); Assert.Equal("1 Wh/m²", new Irradiation(1, IrradiationUnit.WattHourPerSquareMeter).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -660,10 +656,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 J/m²", new Irradiation(0.123456, IrradiationUnit.JoulePerSquareMeter).ToString("s3")); Assert.Equal("0.1235 J/m²", new Irradiation(0.123456, IrradiationUnit.JoulePerSquareMeter).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/JerkTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/JerkTestsBase.g.cs index 1f91cf9437..21e44641e9 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/JerkTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/JerkTestsBase.g.cs @@ -1031,10 +1031,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 nm/s³", new Jerk(1, JerkUnit.NanometerPerSecondCubed).ToString()); Assert.Equal("1 g/s", new Jerk(1, JerkUnit.StandardGravitiesPerSecond).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1072,10 +1068,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 m/s³", new Jerk(0.123456, JerkUnit.MeterPerSecondCubed).ToString("s3")); Assert.Equal("0.1235 m/s³", new Jerk(0.123456, JerkUnit.MeterPerSecondCubed).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/KinematicViscosityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/KinematicViscosityTestsBase.g.cs index abf8761e5b..129806d5c9 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/KinematicViscosityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/KinematicViscosityTestsBase.g.cs @@ -887,10 +887,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 m²/s", new KinematicViscosity(1, KinematicViscosityUnit.SquareMeterPerSecond).ToString()); Assert.Equal("1 St", new KinematicViscosity(1, KinematicViscosityUnit.Stokes).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -926,10 +922,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 m²/s", new KinematicViscosity(0.123456, KinematicViscosityUnit.SquareMeterPerSecond).ToString("s3")); Assert.Equal("0.1235 m²/s", new KinematicViscosity(0.123456, KinematicViscosityUnit.SquareMeterPerSecond).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LeakRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LeakRateTestsBase.g.cs index 77d4370821..16e0a8cfed 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/LeakRateTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LeakRateTestsBase.g.cs @@ -479,10 +479,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 Pa·m³/s", new LeakRate(1, LeakRateUnit.PascalCubicMeterPerSecond).ToString()); Assert.Equal("1 Torr·l/s", new LeakRate(1, LeakRateUnit.TorrLiterPerSecond).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -512,10 +508,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 Pa·m³/s", new LeakRate(0.123456, LeakRateUnit.PascalCubicMeterPerSecond).ToString("s3")); Assert.Equal("0.1235 Pa·m³/s", new LeakRate(0.123456, LeakRateUnit.PascalCubicMeterPerSecond).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LengthTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LengthTestsBase.g.cs index 2423e4d499..590d3b7932 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/LengthTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LengthTestsBase.g.cs @@ -2511,10 +2511,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 ftUS", new Length(1, LengthUnit.UsSurveyFoot).ToString()); Assert.Equal("1 yd", new Length(1, LengthUnit.Yard).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -2578,10 +2574,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 m", new Length(0.123456, LengthUnit.Meter).ToString("s3")); Assert.Equal("0.1235 m", new Length(0.123456, LengthUnit.Meter).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LevelTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LevelTestsBase.g.cs index 1dde03659f..0118d7d382 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/LevelTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LevelTestsBase.g.cs @@ -447,10 +447,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 dB", new Level(1, LevelUnit.Decibel).ToString()); Assert.Equal("1 Np", new Level(1, LevelUnit.Neper).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -479,10 +475,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 dB", new Level(0.123456, LevelUnit.Decibel).ToString("s3")); Assert.Equal("0.1235 dB", new Level(0.123456, LevelUnit.Decibel).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LinearDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LinearDensityTestsBase.g.cs index 157da2a340..7611aa928b 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/LinearDensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LinearDensityTestsBase.g.cs @@ -875,10 +875,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 lb/ft", new LinearDensity(1, LinearDensityUnit.PoundPerFoot).ToString()); Assert.Equal("1 lb/in", new LinearDensity(1, LinearDensityUnit.PoundPerInch).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -919,10 +915,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 kg/m", new LinearDensity(0.123456, LinearDensityUnit.KilogramPerMeter).ToString("s3")); Assert.Equal("0.1235 kg/m", new LinearDensity(0.123456, LinearDensityUnit.KilogramPerMeter).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LinearPowerDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LinearPowerDensityTestsBase.g.cs index 2c6308b8f7..e052b5c169 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/LinearPowerDensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LinearPowerDensityTestsBase.g.cs @@ -1161,10 +1161,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 W/m", new LinearPowerDensity(1, LinearPowerDensityUnit.WattPerMeter).ToString()); Assert.Equal("1 W/mm", new LinearPowerDensity(1, LinearPowerDensityUnit.WattPerMillimeter).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1216,10 +1212,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 W/m", new LinearPowerDensity(0.123456, LinearPowerDensityUnit.WattPerMeter).ToString("s3")); Assert.Equal("0.1235 W/m", new LinearPowerDensity(0.123456, LinearPowerDensityUnit.WattPerMeter).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminanceTestsBase.g.cs index 49b9130775..56d125c861 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminanceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminanceTestsBase.g.cs @@ -731,10 +731,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 nCd/m²", new Luminance(1, LuminanceUnit.NanocandelaPerSquareMeter).ToString()); Assert.Equal("1 nt", new Luminance(1, LuminanceUnit.Nit).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -771,10 +767,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 Cd/m²", new Luminance(0.123456, LuminanceUnit.CandelaPerSquareMeter).ToString("s3")); Assert.Equal("0.1235 Cd/m²", new Luminance(0.123456, LuminanceUnit.CandelaPerSquareMeter).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminosityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminosityTestsBase.g.cs index 61fb177731..f89aaf41e9 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminosityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminosityTestsBase.g.cs @@ -831,10 +831,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 TW", new Luminosity(1, LuminosityUnit.Terawatt).ToString()); Assert.Equal("1 W", new Luminosity(1, LuminosityUnit.Watt).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -875,10 +871,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 W", new Luminosity(0.123456, LuminosityUnit.Watt).ToString("s3")); Assert.Equal("0.1235 W", new Luminosity(0.123456, LuminosityUnit.Watt).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousFluxTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousFluxTestsBase.g.cs index 2df73b3fbd..94f4eda89e 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousFluxTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousFluxTestsBase.g.cs @@ -406,10 +406,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() try { Assert.Equal("1 lm", new LuminousFlux(1, LuminousFluxUnit.Lumen).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -437,10 +433,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 lm", new LuminousFlux(0.123456, LuminousFluxUnit.Lumen).ToString("s3")); Assert.Equal("0.1235 lm", new LuminousFlux(0.123456, LuminousFluxUnit.Lumen).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousIntensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousIntensityTestsBase.g.cs index 2b1824a494..401981527c 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousIntensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousIntensityTestsBase.g.cs @@ -406,10 +406,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() try { Assert.Equal("1 cd", new LuminousIntensity(1, LuminousIntensityUnit.Candela).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -437,10 +433,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 cd", new LuminousIntensity(0.123456, LuminousIntensityUnit.Candela).ToString("s3")); Assert.Equal("0.1235 cd", new LuminousIntensity(0.123456, LuminousIntensityUnit.Candela).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFieldTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFieldTestsBase.g.cs index 6cec0d14e1..6838b70523 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFieldTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFieldTestsBase.g.cs @@ -587,10 +587,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 nT", new MagneticField(1, MagneticFieldUnit.Nanotesla).ToString()); Assert.Equal("1 T", new MagneticField(1, MagneticFieldUnit.Tesla).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -623,10 +619,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 T", new MagneticField(0.123456, MagneticFieldUnit.Tesla).ToString("s3")); Assert.Equal("0.1235 T", new MagneticField(0.123456, MagneticFieldUnit.Tesla).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFluxTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFluxTestsBase.g.cs index 182468d7bd..9e109a9d60 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFluxTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFluxTestsBase.g.cs @@ -406,10 +406,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() try { Assert.Equal("1 Wb", new MagneticFlux(1, MagneticFluxUnit.Weber).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -437,10 +433,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 Wb", new MagneticFlux(0.123456, MagneticFluxUnit.Weber).ToString("s3")); Assert.Equal("0.1235 Wb", new MagneticFlux(0.123456, MagneticFluxUnit.Weber).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MagnetizationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MagnetizationTestsBase.g.cs index 4f70f05c5a..43935193f2 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MagnetizationTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MagnetizationTestsBase.g.cs @@ -406,10 +406,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() try { Assert.Equal("1 A/m", new Magnetization(1, MagnetizationUnit.AmperePerMeter).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -437,10 +433,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 A/m", new Magnetization(0.123456, MagnetizationUnit.AmperePerMeter).ToString("s3")); Assert.Equal("0.1235 A/m", new Magnetization(0.123456, MagnetizationUnit.AmperePerMeter).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MassConcentrationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MassConcentrationTestsBase.g.cs index 5733c889e7..ad27b46c09 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MassConcentrationTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MassConcentrationTestsBase.g.cs @@ -2231,10 +2231,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 t/m³", new MassConcentration(1, MassConcentrationUnit.TonnePerCubicMeter).ToString()); Assert.Equal("1 t/mm³", new MassConcentration(1, MassConcentrationUnit.TonnePerCubicMillimeter).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -2310,10 +2306,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 kg/m³", new MassConcentration(0.123456, MassConcentrationUnit.KilogramPerCubicMeter).ToString("s3")); Assert.Equal("0.1235 kg/m³", new MassConcentration(0.123456, MassConcentrationUnit.KilogramPerCubicMeter).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MassFlowTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MassFlowTestsBase.g.cs index cde0a436b3..6351cb648d 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MassFlowTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MassFlowTestsBase.g.cs @@ -1801,10 +1801,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 t/d", new MassFlow(1, MassFlowUnit.TonnePerDay).ToString()); Assert.Equal("1 t/h", new MassFlow(1, MassFlowUnit.TonnePerHour).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1864,10 +1860,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 g/s", new MassFlow(0.123456, MassFlowUnit.GramPerSecond).ToString("s3")); Assert.Equal("0.1235 g/s", new MassFlow(0.123456, MassFlowUnit.GramPerSecond).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MassFluxTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MassFluxTestsBase.g.cs index 81300f4fa1..eab6d4618d 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MassFluxTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MassFluxTestsBase.g.cs @@ -803,10 +803,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 kg·s⁻¹·m⁻²", new MassFlux(1, MassFluxUnit.KilogramPerSecondPerSquareMeter).ToString()); Assert.Equal("1 kg·s⁻¹·mm⁻²", new MassFlux(1, MassFluxUnit.KilogramPerSecondPerSquareMillimeter).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -845,10 +841,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 kg·s⁻¹·m⁻²", new MassFlux(0.123456, MassFluxUnit.KilogramPerSecondPerSquareMeter).ToString("s3")); Assert.Equal("0.1235 kg·s⁻¹·m⁻²", new MassFlux(0.123456, MassFluxUnit.KilogramPerSecondPerSquareMeter).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MassFractionTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MassFractionTestsBase.g.cs index 230dfcee7c..814eead319 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MassFractionTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MassFractionTestsBase.g.cs @@ -1259,10 +1259,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 ppt", new MassFraction(1, MassFractionUnit.PartPerTrillion).ToString()); Assert.Equal("1 %", new MassFraction(1, MassFractionUnit.Percent).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1313,10 +1309,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123", new MassFraction(0.123456, MassFractionUnit.DecimalFraction).ToString("s3")); Assert.Equal("0.1235", new MassFraction(0.123456, MassFractionUnit.DecimalFraction).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MassMomentOfInertiaTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MassMomentOfInertiaTestsBase.g.cs index 9310deb77d..6ed4f77b07 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MassMomentOfInertiaTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MassMomentOfInertiaTestsBase.g.cs @@ -1379,10 +1379,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 t·m²", new MassMomentOfInertia(1, MassMomentOfInertiaUnit.TonneSquareMeter).ToString()); Assert.Equal("1 t·mm²", new MassMomentOfInertia(1, MassMomentOfInertiaUnit.TonneSquareMilimeter).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1437,10 +1433,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 kg·m²", new MassMomentOfInertia(0.123456, MassMomentOfInertiaUnit.KilogramSquareMeter).ToString("s3")); Assert.Equal("0.1235 kg·m²", new MassMomentOfInertia(0.123456, MassMomentOfInertiaUnit.KilogramSquareMeter).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MassTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MassTestsBase.g.cs index 49bf3d53ab..d38d5a703b 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MassTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MassTestsBase.g.cs @@ -2283,10 +2283,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 st", new Mass(1, MassUnit.Stone).ToString()); Assert.Equal("1 t", new Mass(1, MassUnit.Tonne).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -2338,10 +2334,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 kg", new Mass(0.123456, MassUnit.Kilogram).ToString("s3")); Assert.Equal("0.1235 kg", new Mass(0.123456, MassUnit.Kilogram).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEnergyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEnergyTestsBase.g.cs index 5d836728bf..8cabd707e9 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEnergyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEnergyTestsBase.g.cs @@ -479,10 +479,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 kJ/mol", new MolarEnergy(1, MolarEnergyUnit.KilojoulePerMole).ToString()); Assert.Equal("1 MJ/mol", new MolarEnergy(1, MolarEnergyUnit.MegajoulePerMole).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -512,10 +508,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 J/mol", new MolarEnergy(0.123456, MolarEnergyUnit.JoulePerMole).ToString("s3")); Assert.Equal("0.1235 J/mol", new MolarEnergy(0.123456, MolarEnergyUnit.JoulePerMole).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEntropyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEntropyTestsBase.g.cs index dfb060d7d6..c915d64342 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEntropyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEntropyTestsBase.g.cs @@ -479,10 +479,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 kJ/(mol*K)", new MolarEntropy(1, MolarEntropyUnit.KilojoulePerMoleKelvin).ToString()); Assert.Equal("1 MJ/(mol*K)", new MolarEntropy(1, MolarEntropyUnit.MegajoulePerMoleKelvin).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -512,10 +508,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 J/(mol*K)", new MolarEntropy(0.123456, MolarEntropyUnit.JoulePerMoleKelvin).ToString("s3")); Assert.Equal("0.1235 J/(mol*K)", new MolarEntropy(0.123456, MolarEntropyUnit.JoulePerMoleKelvin).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarFlowTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarFlowTestsBase.g.cs index bf78531e2a..89f673b4d3 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarFlowTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarFlowTestsBase.g.cs @@ -695,10 +695,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 lbmol/min", new MolarFlow(1, MolarFlowUnit.PoundMolePerMinute).ToString()); Assert.Equal("1 lbmol/s", new MolarFlow(1, MolarFlowUnit.PoundMolePerSecond).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -734,10 +730,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 mol/s", new MolarFlow(0.123456, MolarFlowUnit.MolePerSecond).ToString("s3")); Assert.Equal("0.1235 mol/s", new MolarFlow(0.123456, MolarFlowUnit.MolePerSecond).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarMassTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarMassTestsBase.g.cs index 7270492508..28e3c0f6c3 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarMassTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarMassTestsBase.g.cs @@ -1127,10 +1127,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 ng/mol", new MolarMass(1, MolarMassUnit.NanogramPerMole).ToString()); Assert.Equal("1 lb/mol", new MolarMass(1, MolarMassUnit.PoundPerMole).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1170,10 +1166,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 kg/mol", new MolarMass(0.123456, MolarMassUnit.KilogramPerMole).ToString("s3")); Assert.Equal("0.1235 kg/mol", new MolarMass(0.123456, MolarMassUnit.KilogramPerMole).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarityTestsBase.g.cs index 593459fb02..64f4b2db4b 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarityTestsBase.g.cs @@ -959,10 +959,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 pmol/L", new Molarity(1, MolarityUnit.PicomolePerLiter).ToString()); Assert.Equal("1 lbmol/ft³", new Molarity(1, MolarityUnit.PoundMolePerCubicFoot).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1000,10 +996,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 mol/m³", new Molarity(0.123456, MolarityUnit.MolePerCubicMeter).ToString("s3")); Assert.Equal("0.1235 mol/m³", new Molarity(0.123456, MolarityUnit.MolePerCubicMeter).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PermeabilityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PermeabilityTestsBase.g.cs index 44ee930559..5959b2d99d 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/PermeabilityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PermeabilityTestsBase.g.cs @@ -406,10 +406,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() try { Assert.Equal("1 H/m", new Permeability(1, PermeabilityUnit.HenryPerMeter).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -437,10 +433,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 H/m", new Permeability(0.123456, PermeabilityUnit.HenryPerMeter).ToString("s3")); Assert.Equal("0.1235 H/m", new Permeability(0.123456, PermeabilityUnit.HenryPerMeter).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PermittivityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PermittivityTestsBase.g.cs index b81353eccd..6ba7c5194d 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/PermittivityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PermittivityTestsBase.g.cs @@ -406,10 +406,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() try { Assert.Equal("1 F/m", new Permittivity(1, PermittivityUnit.FaradPerMeter).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -437,10 +433,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 F/m", new Permittivity(0.123456, PermittivityUnit.FaradPerMeter).ToString("s3")); Assert.Equal("0.1235 F/m", new Permittivity(0.123456, PermittivityUnit.FaradPerMeter).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PorousMediumPermeabilityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PorousMediumPermeabilityTestsBase.g.cs index 44e96100fa..d7321f40b1 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/PorousMediumPermeabilityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PorousMediumPermeabilityTestsBase.g.cs @@ -551,10 +551,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 cm²", new PorousMediumPermeability(1, PorousMediumPermeabilityUnit.SquareCentimeter).ToString()); Assert.Equal("1 m²", new PorousMediumPermeability(1, PorousMediumPermeabilityUnit.SquareMeter).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -586,10 +582,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 m²", new PorousMediumPermeability(0.123456, PorousMediumPermeabilityUnit.SquareMeter).ToString("s3")); Assert.Equal("0.1235 m²", new PorousMediumPermeability(0.123456, PorousMediumPermeabilityUnit.SquareMeter).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PowerDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PowerDensityTestsBase.g.cs index ae28742c57..3d3e6d9312 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/PowerDensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PowerDensityTestsBase.g.cs @@ -1867,10 +1867,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 W/m³", new PowerDensity(1, PowerDensityUnit.WattPerCubicMeter).ToString()); Assert.Equal("1 W/l", new PowerDensity(1, PowerDensityUnit.WattPerLiter).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1941,10 +1937,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 W/m³", new PowerDensity(0.123456, PowerDensityUnit.WattPerCubicMeter).ToString("s3")); Assert.Equal("0.1235 W/m³", new PowerDensity(0.123456, PowerDensityUnit.WattPerCubicMeter).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PowerRatioTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PowerRatioTestsBase.g.cs index f5f9f4f1cd..1b05a986a4 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/PowerRatioTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PowerRatioTestsBase.g.cs @@ -471,10 +471,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 dBmW", new PowerRatio(1, PowerRatioUnit.DecibelMilliwatt).ToString()); Assert.Equal("1 dBW", new PowerRatio(1, PowerRatioUnit.DecibelWatt).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -503,10 +499,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 dBW", new PowerRatio(0.123456, PowerRatioUnit.DecibelWatt).ToString("s3")); Assert.Equal("0.1235 dBW", new PowerRatio(0.123456, PowerRatioUnit.DecibelWatt).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PowerTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PowerTestsBase.g.cs index 38f66b731d..fc2e98998d 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/PowerTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PowerTestsBase.g.cs @@ -1288,10 +1288,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 TW", new Power(1, PowerUnit.Terawatt).ToString()); Assert.Equal("1 W", new Power(1, PowerUnit.Watt).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1344,10 +1340,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 W", new Power(0.123456m, PowerUnit.Watt).ToString("s3")); Assert.Equal("0.1235 W", new Power(0.123456m, PowerUnit.Watt).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PressureChangeRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PressureChangeRateTestsBase.g.cs index 2a28f6aab5..b7e373e91e 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/PressureChangeRateTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PressureChangeRateTestsBase.g.cs @@ -1499,10 +1499,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 psi/min", new PressureChangeRate(1, PressureChangeRateUnit.PoundForcePerSquareInchPerMinute).ToString()); Assert.Equal("1 psi/s", new PressureChangeRate(1, PressureChangeRateUnit.PoundForcePerSquareInchPerSecond).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1543,10 +1539,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 Pa/s", new PressureChangeRate(0.123456, PressureChangeRateUnit.PascalPerSecond).ToString("s3")); Assert.Equal("0.1235 Pa/s", new PressureChangeRate(0.123456, PressureChangeRateUnit.PascalPerSecond).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PressureTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PressureTestsBase.g.cs index 338c7748fa..88592eb00a 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/PressureTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PressureTestsBase.g.cs @@ -3177,10 +3177,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 tf/mm²", new Pressure(1, PressureUnit.TonneForcePerSquareMillimeter).ToString()); Assert.Equal("1 torr", new Pressure(1, PressureUnit.Torr).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -3256,10 +3252,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 Pa", new Pressure(0.123456, PressureUnit.Pascal).ToString("s3")); Assert.Equal("0.1235 Pa", new Pressure(0.123456, PressureUnit.Pascal).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RatioChangeRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RatioChangeRateTestsBase.g.cs index c8ad3b4033..eb98e2014b 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/RatioChangeRateTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RatioChangeRateTestsBase.g.cs @@ -443,10 +443,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 /s", new RatioChangeRate(1, RatioChangeRateUnit.DecimalFractionPerSecond).ToString()); Assert.Equal("1 %/s", new RatioChangeRate(1, RatioChangeRateUnit.PercentPerSecond).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -475,10 +471,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 /s", new RatioChangeRate(0.123456, RatioChangeRateUnit.DecimalFractionPerSecond).ToString("s3")); Assert.Equal("0.1235 /s", new RatioChangeRate(0.123456, RatioChangeRateUnit.DecimalFractionPerSecond).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RatioTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RatioTestsBase.g.cs index ae9870e3bf..dff098a836 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/RatioTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RatioTestsBase.g.cs @@ -587,10 +587,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 ppt", new Ratio(1, RatioUnit.PartPerTrillion).ToString()); Assert.Equal("1 %", new Ratio(1, RatioUnit.Percent).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -623,10 +619,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123", new Ratio(0.123456, RatioUnit.DecimalFraction).ToString("s3")); Assert.Equal("0.1235", new Ratio(0.123456, RatioUnit.DecimalFraction).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ReactiveEnergyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ReactiveEnergyTestsBase.g.cs index caa2541817..ac965968bb 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ReactiveEnergyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ReactiveEnergyTestsBase.g.cs @@ -479,10 +479,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 Mvarh", new ReactiveEnergy(1, ReactiveEnergyUnit.MegavoltampereReactiveHour).ToString()); Assert.Equal("1 varh", new ReactiveEnergy(1, ReactiveEnergyUnit.VoltampereReactiveHour).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -512,10 +508,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 varh", new ReactiveEnergy(0.123456, ReactiveEnergyUnit.VoltampereReactiveHour).ToString("s3")); Assert.Equal("0.1235 varh", new ReactiveEnergy(0.123456, ReactiveEnergyUnit.VoltampereReactiveHour).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ReactivePowerTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ReactivePowerTestsBase.g.cs index ee083298e2..718b047479 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ReactivePowerTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ReactivePowerTestsBase.g.cs @@ -515,10 +515,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 Mvar", new ReactivePower(1, ReactivePowerUnit.MegavoltampereReactive).ToString()); Assert.Equal("1 var", new ReactivePower(1, ReactivePowerUnit.VoltampereReactive).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -549,10 +545,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 var", new ReactivePower(0.123456, ReactivePowerUnit.VoltampereReactive).ToString("s3")); Assert.Equal("0.1235 var", new ReactivePower(0.123456, ReactivePowerUnit.VoltampereReactive).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ReciprocalAreaTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ReciprocalAreaTestsBase.g.cs index 0959ede6f7..e9dd3b8dc1 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ReciprocalAreaTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ReciprocalAreaTestsBase.g.cs @@ -767,10 +767,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 yd⁻²", new ReciprocalArea(1, ReciprocalAreaUnit.InverseSquareYard).ToString()); Assert.Equal("1 ft⁻² (US)", new ReciprocalArea(1, ReciprocalAreaUnit.InverseUsSurveySquareFoot).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -808,10 +804,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 m⁻²", new ReciprocalArea(0.123456, ReciprocalAreaUnit.InverseSquareMeter).ToString("s3")); Assert.Equal("0.1235 m⁻²", new ReciprocalArea(0.123456, ReciprocalAreaUnit.InverseSquareMeter).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ReciprocalLengthTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ReciprocalLengthTestsBase.g.cs index 3cfe5e86b2..e856fc3bb5 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ReciprocalLengthTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ReciprocalLengthTestsBase.g.cs @@ -971,10 +971,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 ftUS⁻¹", new ReciprocalLength(1, ReciprocalLengthUnit.InverseUsSurveyFoot).ToString()); Assert.Equal("1 yd⁻¹", new ReciprocalLength(1, ReciprocalLengthUnit.InverseYard).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1011,10 +1007,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 m⁻¹", new ReciprocalLength(0.123456, ReciprocalLengthUnit.InverseMeter).ToString("s3")); Assert.Equal("0.1235 m⁻¹", new ReciprocalLength(0.123456, ReciprocalLengthUnit.InverseMeter).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RelativeHumidityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RelativeHumidityTestsBase.g.cs index 3358678c8a..36c3ebfc5a 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/RelativeHumidityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RelativeHumidityTestsBase.g.cs @@ -406,10 +406,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() try { Assert.Equal("1 %RH", new RelativeHumidity(1, RelativeHumidityUnit.Percent).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -437,10 +433,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 %RH", new RelativeHumidity(0.123456, RelativeHumidityUnit.Percent).ToString("s3")); Assert.Equal("0.1235 %RH", new RelativeHumidity(0.123456, RelativeHumidityUnit.Percent).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalAccelerationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalAccelerationTestsBase.g.cs index 32d081e2f5..96aef71bb8 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalAccelerationTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalAccelerationTestsBase.g.cs @@ -539,10 +539,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 rpm/s", new RotationalAcceleration(1, RotationalAccelerationUnit.RevolutionPerMinutePerSecond).ToString()); Assert.Equal("1 r/s²", new RotationalAcceleration(1, RotationalAccelerationUnit.RevolutionPerSecondSquared).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -573,10 +569,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 rad/s²", new RotationalAcceleration(0.123456, RotationalAccelerationUnit.RadianPerSecondSquared).ToString("s3")); Assert.Equal("0.1235 rad/s²", new RotationalAcceleration(0.123456, RotationalAccelerationUnit.RadianPerSecondSquared).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalSpeedTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalSpeedTestsBase.g.cs index 14a3c9739f..a8ec0147c7 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalSpeedTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalSpeedTestsBase.g.cs @@ -1271,10 +1271,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 rpm", new RotationalSpeed(1, RotationalSpeedUnit.RevolutionPerMinute).ToString()); Assert.Equal("1 r/s", new RotationalSpeed(1, RotationalSpeedUnit.RevolutionPerSecond).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1314,10 +1310,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 rad/s", new RotationalSpeed(0.123456, RotationalSpeedUnit.RadianPerSecond).ToString("s3")); Assert.Equal("0.1235 rad/s", new RotationalSpeed(0.123456, RotationalSpeedUnit.RadianPerSecond).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessPerLengthTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessPerLengthTestsBase.g.cs index f4c8bc442d..49ed69b1cc 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessPerLengthTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessPerLengthTestsBase.g.cs @@ -743,10 +743,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 N·m/rad/m", new RotationalStiffnessPerLength(1, RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter).ToString()); Assert.Equal("1 lbf·ft/deg/ft", new RotationalStiffnessPerLength(1, RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -778,10 +774,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 N·m/rad/m", new RotationalStiffnessPerLength(0.123456, RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter).ToString("s3")); Assert.Equal("0.1235 N·m/rad/m", new RotationalStiffnessPerLength(0.123456, RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessTestsBase.g.cs index d2877836d3..9570dbe397 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessTestsBase.g.cs @@ -3043,10 +3043,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 lbf·ft/rad", new RotationalStiffness(1, RotationalStiffnessUnit.PoundForceFeetPerRadian).ToString()); Assert.Equal("1 lbf·ft/deg", new RotationalStiffness(1, RotationalStiffnessUnit.PoundForceFootPerDegrees).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -3106,10 +3102,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 N·m/rad", new RotationalStiffness(0.123456, RotationalStiffnessUnit.NewtonMeterPerRadian).ToString("s3")); Assert.Equal("0.1235 N·m/rad", new RotationalStiffness(0.123456, RotationalStiffnessUnit.NewtonMeterPerRadian).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ScalarTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ScalarTestsBase.g.cs index 9db3f42a94..742d059f30 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ScalarTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ScalarTestsBase.g.cs @@ -406,10 +406,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() try { Assert.Equal("1", new Scalar(1, ScalarUnit.Amount).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -437,10 +433,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123", new Scalar(0.123456, ScalarUnit.Amount).ToString("s3")); Assert.Equal("0.1235", new Scalar(0.123456, ScalarUnit.Amount).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SolidAngleTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SolidAngleTestsBase.g.cs index c3222ebf15..aa6510723b 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/SolidAngleTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SolidAngleTestsBase.g.cs @@ -406,10 +406,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() try { Assert.Equal("1 sr", new SolidAngle(1, SolidAngleUnit.Steradian).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -437,10 +433,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 sr", new SolidAngle(0.123456, SolidAngleUnit.Steradian).ToString("s3")); Assert.Equal("0.1235 sr", new SolidAngle(0.123456, SolidAngleUnit.Steradian).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEnergyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEnergyTestsBase.g.cs index bbd4fd3841..e2c1dafb97 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEnergyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEnergyTestsBase.g.cs @@ -1451,10 +1451,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 Wh/kg", new SpecificEnergy(1, SpecificEnergyUnit.WattHourPerKilogram).ToString()); Assert.Equal("1 Wh/lbs", new SpecificEnergy(1, SpecificEnergyUnit.WattHourPerPound).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1511,10 +1507,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 J/kg", new SpecificEnergy(0.123456, SpecificEnergyUnit.JoulePerKilogram).ToString("s3")); Assert.Equal("0.1235 J/kg", new SpecificEnergy(0.123456, SpecificEnergyUnit.JoulePerKilogram).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEntropyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEntropyTestsBase.g.cs index bb1f8eaaf9..2aa80ab7b4 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEntropyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEntropyTestsBase.g.cs @@ -719,10 +719,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 MJ/kg.C", new SpecificEntropy(1, SpecificEntropyUnit.MegajoulePerKilogramDegreeCelsius).ToString()); Assert.Equal("1 MJ/kg.K", new SpecificEntropy(1, SpecificEntropyUnit.MegajoulePerKilogramKelvin).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -758,10 +754,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 J/kg.K", new SpecificEntropy(0.123456, SpecificEntropyUnit.JoulePerKilogramKelvin).ToString("s3")); Assert.Equal("0.1235 J/kg.K", new SpecificEntropy(0.123456, SpecificEntropyUnit.JoulePerKilogramKelvin).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificFuelConsumptionTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificFuelConsumptionTestsBase.g.cs index 0ab76151de..468bd12dbd 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificFuelConsumptionTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificFuelConsumptionTestsBase.g.cs @@ -515,10 +515,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 kg/(kN�s)", new SpecificFuelConsumption(1, SpecificFuelConsumptionUnit.KilogramPerKiloNewtonSecond).ToString()); Assert.Equal("1 lb/(lbf·h)", new SpecificFuelConsumption(1, SpecificFuelConsumptionUnit.PoundMassPerPoundForceHour).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -549,10 +545,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 g/(kN�s)", new SpecificFuelConsumption(0.123456, SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond).ToString("s3")); Assert.Equal("0.1235 g/(kN�s)", new SpecificFuelConsumption(0.123456, SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificVolumeTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificVolumeTestsBase.g.cs index 513d61b42b..52668dba57 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificVolumeTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificVolumeTestsBase.g.cs @@ -479,10 +479,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 m³/kg", new SpecificVolume(1, SpecificVolumeUnit.CubicMeterPerKilogram).ToString()); Assert.Equal("1 mm³/kg", new SpecificVolume(1, SpecificVolumeUnit.MillicubicMeterPerKilogram).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -512,10 +508,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 m³/kg", new SpecificVolume(0.123456, SpecificVolumeUnit.CubicMeterPerKilogram).ToString("s3")); Assert.Equal("0.1235 m³/kg", new SpecificVolume(0.123456, SpecificVolumeUnit.CubicMeterPerKilogram).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificWeightTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificWeightTestsBase.g.cs index 2d607932e9..49815d777c 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificWeightTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificWeightTestsBase.g.cs @@ -983,10 +983,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 tf/m³", new SpecificWeight(1, SpecificWeightUnit.TonneForcePerCubicMeter).ToString()); Assert.Equal("1 tf/mm³", new SpecificWeight(1, SpecificWeightUnit.TonneForcePerCubicMillimeter).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1030,10 +1026,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 N/m³", new SpecificWeight(0.123456, SpecificWeightUnit.NewtonPerCubicMeter).ToString("s3")); Assert.Equal("0.1235 N/m³", new SpecificWeight(0.123456, SpecificWeightUnit.NewtonPerCubicMeter).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SpeedTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SpeedTestsBase.g.cs index b96275a5af..ceafc36b5c 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/SpeedTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SpeedTestsBase.g.cs @@ -2279,10 +2279,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 yd/min", new Speed(1, SpeedUnit.YardPerMinute).ToString()); Assert.Equal("1 yd/s", new Speed(1, SpeedUnit.YardPerSecond).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -2342,10 +2338,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 m/s", new Speed(0.123456, SpeedUnit.MeterPerSecond).ToString("s3")); Assert.Equal("0.1235 m/s", new Speed(0.123456, SpeedUnit.MeterPerSecond).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/StandardVolumeFlowTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/StandardVolumeFlowTestsBase.g.cs index 7056df8579..d4567dd0c2 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/StandardVolumeFlowTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/StandardVolumeFlowTestsBase.g.cs @@ -695,10 +695,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 Sm³/s", new StandardVolumeFlow(1, StandardVolumeFlowUnit.StandardCubicMeterPerSecond).ToString()); Assert.Equal("1 slm", new StandardVolumeFlow(1, StandardVolumeFlowUnit.StandardLiterPerMinute).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -734,10 +730,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 Sm³/s", new StandardVolumeFlow(0.123456, StandardVolumeFlowUnit.StandardCubicMeterPerSecond).ToString("s3")); Assert.Equal("0.1235 Sm³/s", new StandardVolumeFlow(0.123456, StandardVolumeFlowUnit.StandardCubicMeterPerSecond).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureChangeRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureChangeRateTestsBase.g.cs index 75eae181ef..6ddf89e0b8 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureChangeRateTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureChangeRateTestsBase.g.cs @@ -731,10 +731,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 m°C/s", new TemperatureChangeRate(1, TemperatureChangeRateUnit.MillidegreeCelsiusPerSecond).ToString()); Assert.Equal("1 n°C/s", new TemperatureChangeRate(1, TemperatureChangeRateUnit.NanodegreeCelsiusPerSecond).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -771,10 +767,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 °C/s", new TemperatureChangeRate(0.123456, TemperatureChangeRateUnit.DegreeCelsiusPerSecond).ToString("s3")); Assert.Equal("0.1235 °C/s", new TemperatureChangeRate(0.123456, TemperatureChangeRateUnit.DegreeCelsiusPerSecond).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureDeltaTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureDeltaTestsBase.g.cs index 8e15388a75..bcad90eb83 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureDeltaTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureDeltaTestsBase.g.cs @@ -695,10 +695,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 ∆K", new TemperatureDelta(1, TemperatureDeltaUnit.Kelvin).ToString()); Assert.Equal("1 ∆m°C", new TemperatureDelta(1, TemperatureDeltaUnit.MillidegreeCelsius).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -734,10 +730,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 ∆K", new TemperatureDelta(0.123456, TemperatureDeltaUnit.Kelvin).ToString("s3")); Assert.Equal("0.1235 ∆K", new TemperatureDelta(0.123456, TemperatureDeltaUnit.Kelvin).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureGradientTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureGradientTestsBase.g.cs index c0258592c9..316f9dff2a 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureGradientTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureGradientTestsBase.g.cs @@ -515,10 +515,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 ∆°F/ft", new TemperatureGradient(1, TemperatureGradientUnit.DegreeFahrenheitPerFoot).ToString()); Assert.Equal("1 ∆°K/m", new TemperatureGradient(1, TemperatureGradientUnit.KelvinPerMeter).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -549,10 +545,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 ∆°K/m", new TemperatureGradient(0.123456, TemperatureGradientUnit.KelvinPerMeter).ToString("s3")); Assert.Equal("0.1235 ∆°K/m", new TemperatureGradient(0.123456, TemperatureGradientUnit.KelvinPerMeter).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureTestsBase.g.cs index 85f1c10639..7bdd29dc4c 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureTestsBase.g.cs @@ -719,10 +719,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 m°C", new Temperature(1, TemperatureUnit.MillidegreeCelsius).ToString()); Assert.Equal("1 T⊙", new Temperature(1, TemperatureUnit.SolarTemperature).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -759,10 +755,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 K", new Temperature(0.123456, TemperatureUnit.Kelvin).ToString("s3")); Assert.Equal("0.1235 K", new Temperature(0.123456, TemperatureUnit.Kelvin).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalConductivityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalConductivityTestsBase.g.cs index 3ea9f45156..9227245c2b 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalConductivityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalConductivityTestsBase.g.cs @@ -443,10 +443,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 BTU/h·ft·°F", new ThermalConductivity(1, ThermalConductivityUnit.BtuPerHourFootFahrenheit).ToString()); Assert.Equal("1 W/m·K", new ThermalConductivity(1, ThermalConductivityUnit.WattPerMeterKelvin).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -475,10 +471,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 W/m·K", new ThermalConductivity(0.123456, ThermalConductivityUnit.WattPerMeterKelvin).ToString("s3")); Assert.Equal("0.1235 W/m·K", new ThermalConductivity(0.123456, ThermalConductivityUnit.WattPerMeterKelvin).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalResistanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalResistanceTestsBase.g.cs index 35af22a950..ddfa254927 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalResistanceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalResistanceTestsBase.g.cs @@ -587,10 +587,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 m²K/kW", new ThermalResistance(1, ThermalResistanceUnit.SquareMeterKelvinPerKilowatt).ToString()); Assert.Equal("1 m²K/W", new ThermalResistance(1, ThermalResistanceUnit.SquareMeterKelvinPerWatt).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -623,10 +619,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 m²K/kW", new ThermalResistance(0.123456, ThermalResistanceUnit.SquareMeterKelvinPerKilowatt).ToString("s3")); Assert.Equal("0.1235 m²K/kW", new ThermalResistance(0.123456, ThermalResistanceUnit.SquareMeterKelvinPerKilowatt).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/TorquePerLengthTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/TorquePerLengthTestsBase.g.cs index 7b0fb37ec7..9a2f2bf6d8 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/TorquePerLengthTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/TorquePerLengthTestsBase.g.cs @@ -1199,10 +1199,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 tf·m/m", new TorquePerLength(1, TorquePerLengthUnit.TonneForceMeterPerMeter).ToString()); Assert.Equal("1 tf·mm/m", new TorquePerLength(1, TorquePerLengthUnit.TonneForceMillimeterPerMeter).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1250,10 +1246,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 N·m/m", new TorquePerLength(0.123456, TorquePerLengthUnit.NewtonMeterPerMeter).ToString("s3")); Assert.Equal("0.1235 N·m/m", new TorquePerLength(0.123456, TorquePerLengthUnit.NewtonMeterPerMeter).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/TorqueTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/TorqueTestsBase.g.cs index 2bf9500977..7875a5097f 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/TorqueTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/TorqueTestsBase.g.cs @@ -1343,10 +1343,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 tf·m", new Torque(1, TorqueUnit.TonneForceMeter).ToString()); Assert.Equal("1 tf·mm", new Torque(1, TorqueUnit.TonneForceMillimeter).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1398,10 +1394,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 N·m", new Torque(0.123456, TorqueUnit.NewtonMeter).ToString("s3")); Assert.Equal("0.1235 N·m", new Torque(0.123456, TorqueUnit.NewtonMeter).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/TurbidityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/TurbidityTestsBase.g.cs index 2ab00b8307..394321a806 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/TurbidityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/TurbidityTestsBase.g.cs @@ -406,10 +406,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() try { Assert.Equal("1 NTU", new Turbidity(1, TurbidityUnit.NTU).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -437,10 +433,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 NTU", new Turbidity(0.123456, TurbidityUnit.NTU).ToString("s3")); Assert.Equal("0.1235 NTU", new Turbidity(0.123456, TurbidityUnit.NTU).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VitaminATestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VitaminATestsBase.g.cs index 2662a9baac..eade4a13f4 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/VitaminATestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VitaminATestsBase.g.cs @@ -406,10 +406,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() try { Assert.Equal("1 IU", new VitaminA(1, VitaminAUnit.InternationalUnit).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -437,10 +433,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 IU", new VitaminA(0.123456, VitaminAUnit.InternationalUnit).ToString("s3")); Assert.Equal("0.1235 IU", new VitaminA(0.123456, VitaminAUnit.InternationalUnit).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeConcentrationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeConcentrationTestsBase.g.cs index 04dbf772f1..e3f0c10976 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeConcentrationTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeConcentrationTestsBase.g.cs @@ -1115,10 +1115,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 pL/L", new VolumeConcentration(1, VolumeConcentrationUnit.PicolitersPerLiter).ToString()); Assert.Equal("1 pL/mL", new VolumeConcentration(1, VolumeConcentrationUnit.PicolitersPerMililiter).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -1165,10 +1161,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123", new VolumeConcentration(0.123456, VolumeConcentrationUnit.DecimalFraction).ToString("s3")); Assert.Equal("0.1235", new VolumeConcentration(0.123456, VolumeConcentrationUnit.DecimalFraction).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowPerAreaTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowPerAreaTestsBase.g.cs index 7256e2845c..9fe1fa7c96 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowPerAreaTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowPerAreaTestsBase.g.cs @@ -443,10 +443,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 CFM/ft²", new VolumeFlowPerArea(1, VolumeFlowPerAreaUnit.CubicFootPerMinutePerSquareFoot).ToString()); Assert.Equal("1 m³/(s·m²)", new VolumeFlowPerArea(1, VolumeFlowPerAreaUnit.CubicMeterPerSecondPerSquareMeter).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -475,10 +471,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 m³/(s·m²)", new VolumeFlowPerArea(0.123456, VolumeFlowPerAreaUnit.CubicMeterPerSecondPerSquareMeter).ToString("s3")); Assert.Equal("0.1235 m³/(s·m²)", new VolumeFlowPerArea(0.123456, VolumeFlowPerAreaUnit.CubicMeterPerSecondPerSquareMeter).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowTestsBase.g.cs index 9a20c846a1..5cef17f3d9 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowTestsBase.g.cs @@ -4319,10 +4319,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 gal (U.S.)/min", new VolumeFlow(1, VolumeFlowUnit.UsGallonPerMinute).ToString()); Assert.Equal("1 gal (U.S.)/s", new VolumeFlow(1, VolumeFlowUnit.UsGallonPerSecond).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -4414,10 +4410,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 m³/s", new VolumeFlow(0.123456, VolumeFlowUnit.CubicMeterPerSecond).ToString("s3")); Assert.Equal("0.1235 m³/s", new VolumeFlow(0.123456, VolumeFlowUnit.CubicMeterPerSecond).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumePerLengthTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumePerLengthTestsBase.g.cs index 76a32737c4..0754d4eb89 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumePerLengthTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumePerLengthTestsBase.g.cs @@ -623,10 +623,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 l/mm", new VolumePerLength(1, VolumePerLengthUnit.LiterPerMillimeter).ToString()); Assert.Equal("1 bbl/ft", new VolumePerLength(1, VolumePerLengthUnit.OilBarrelPerFoot).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -660,10 +656,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 m³/m", new VolumePerLength(0.123456, VolumePerLengthUnit.CubicMeterPerMeter).ToString("s3")); Assert.Equal("0.1235 m³/m", new VolumePerLength(0.123456, VolumePerLengthUnit.CubicMeterPerMeter).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeTestsBase.g.cs index 59f687ed09..af0271bb30 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeTestsBase.g.cs @@ -3299,10 +3299,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1", new Volume(1, VolumeUnit.UsTablespoon).ToString()); Assert.Equal("1", new Volume(1, VolumeUnit.UsTeaspoon).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -3382,10 +3378,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 m³", new Volume(0.123456, VolumeUnit.CubicMeter).ToString("s3")); Assert.Equal("0.1235 m³", new Volume(0.123456, VolumeUnit.CubicMeter).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumetricHeatCapacityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumetricHeatCapacityTestsBase.g.cs index fdc1d6200c..41555fb522 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumetricHeatCapacityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumetricHeatCapacityTestsBase.g.cs @@ -695,10 +695,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 MJ/m³·°C", new VolumetricHeatCapacity(1, VolumetricHeatCapacityUnit.MegajoulePerCubicMeterDegreeCelsius).ToString()); Assert.Equal("1 MJ/m³·K", new VolumetricHeatCapacity(1, VolumetricHeatCapacityUnit.MegajoulePerCubicMeterKelvin).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -734,10 +730,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 J/m³·K", new VolumetricHeatCapacity(0.123456, VolumetricHeatCapacityUnit.JoulePerCubicMeterKelvin).ToString("s3")); Assert.Equal("0.1235 J/m³·K", new VolumetricHeatCapacity(0.123456, VolumetricHeatCapacityUnit.JoulePerCubicMeterKelvin).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/WarpingMomentOfInertiaTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/WarpingMomentOfInertiaTestsBase.g.cs index 004cfeaaea..29709c0913 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/WarpingMomentOfInertiaTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/WarpingMomentOfInertiaTestsBase.g.cs @@ -731,10 +731,6 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() Assert.Equal("1 m⁶", new WarpingMomentOfInertia(1, WarpingMomentOfInertiaUnit.MeterToTheSixth).ToString()); Assert.Equal("1 mm⁶", new WarpingMomentOfInertia(1, WarpingMomentOfInertiaUnit.MillimeterToTheSixth).ToString()); } - catch - { - throw; - } finally { Thread.CurrentThread.CurrentCulture = prevCulture; @@ -767,10 +763,6 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul Assert.Equal("0.123 m⁶", new WarpingMomentOfInertia(0.123456, WarpingMomentOfInertiaUnit.MeterToTheSixth).ToString("s3")); Assert.Equal("0.1235 m⁶", new WarpingMomentOfInertia(0.123456, WarpingMomentOfInertiaUnit.MeterToTheSixth).ToString("s4")); } - catch - { - throw; - } finally { CultureInfo.CurrentCulture = oldCulture; From 146c45c680cf021491d63c376aa502871523f2b4 Mon Sep 17 00:00:00 2001 From: Tristan Milnthorp Date: Mon, 13 Mar 2023 16:31:08 -0400 Subject: [PATCH 21/26] Move abbreviationss to QuantityInfo --- .../UnitsNetGen/QuantityGenerator.cs | 53 +----- CodeGen/Generators/UnitsNetGenerator.cs | 2 +- UnitsNet/CustomCode/UnitAbbreviationsCache.cs | 6 +- .../Quantities/Acceleration.g.cs | 75 ++------ .../Quantities/AmountOfSubstance.g.cs | 77 ++------ .../Quantities/AmplitudeRatio.g.cs | 55 +----- UnitsNet/GeneratedCode/Quantities/Angle.g.cs | 79 +++----- .../Quantities/ApparentEnergy.g.cs | 53 +----- .../Quantities/ApparentPower.g.cs | 59 ++---- UnitsNet/GeneratedCode/Quantities/Area.g.cs | 75 ++------ .../GeneratedCode/Quantities/AreaDensity.g.cs | 53 +----- .../Quantities/AreaMomentOfInertia.g.cs | 59 ++---- .../GeneratedCode/Quantities/BitRate.g.cs | 99 +++------- .../BrakeSpecificFuelConsumption.g.cs | 53 +----- .../GeneratedCode/Quantities/Capacitance.g.cs | 61 ++---- .../CoefficientOfThermalExpansion.g.cs | 53 +----- .../Quantities/Compressibility.g.cs | 61 ++---- .../GeneratedCode/Quantities/Density.g.cs | 149 ++++++--------- .../GeneratedCode/Quantities/Duration.g.cs | 69 ++----- .../Quantities/DynamicViscosity.g.cs | 67 ++----- .../Quantities/ElectricAdmittance.g.cs | 55 +----- .../Quantities/ElectricCharge.g.cs | 69 ++----- .../Quantities/ElectricChargeDensity.g.cs | 49 +---- .../Quantities/ElectricConductance.g.cs | 57 +----- .../Quantities/ElectricConductivity.g.cs | 59 ++---- .../Quantities/ElectricCurrent.g.cs | 65 ++----- .../Quantities/ElectricCurrentDensity.g.cs | 53 +----- .../Quantities/ElectricCurrentGradient.g.cs | 55 +----- .../Quantities/ElectricField.g.cs | 49 +---- .../Quantities/ElectricInductance.g.cs | 57 +----- .../Quantities/ElectricPotential.g.cs | 59 ++---- .../Quantities/ElectricPotentialAc.g.cs | 57 +----- .../ElectricPotentialChangeRate.g.cs | 87 +++------ .../Quantities/ElectricPotentialDc.g.cs | 57 +----- .../Quantities/ElectricResistance.g.cs | 61 ++---- .../Quantities/ElectricResistivity.g.cs | 75 ++------ .../ElectricSurfaceChargeDensity.g.cs | 53 +----- UnitsNet/GeneratedCode/Quantities/Energy.g.cs | 123 +++++------- .../Quantities/EnergyDensity.g.cs | 71 ++----- .../GeneratedCode/Quantities/Entropy.g.cs | 61 ++---- UnitsNet/GeneratedCode/Quantities/Force.g.cs | 77 ++------ .../Quantities/ForceChangeRate.g.cs | 77 ++------ .../Quantities/ForcePerLength.g.cs | 123 +++++------- .../GeneratedCode/Quantities/Frequency.g.cs | 73 ++------ .../Quantities/FuelEfficiency.g.cs | 55 +----- .../GeneratedCode/Quantities/HeatFlux.g.cs | 83 +++----- .../Quantities/HeatTransferCoefficient.g.cs | 59 ++---- .../GeneratedCode/Quantities/Illuminance.g.cs | 55 +----- .../GeneratedCode/Quantities/Impulse.g.cs | 73 ++------ .../GeneratedCode/Quantities/Information.g.cs | 99 +++------- .../GeneratedCode/Quantities/Irradiance.g.cs | 75 ++------ .../GeneratedCode/Quantities/Irradiation.g.cs | 61 ++---- UnitsNet/GeneratedCode/Quantities/Jerk.g.cs | 69 ++----- .../Quantities/KinematicViscosity.g.cs | 65 ++----- .../GeneratedCode/Quantities/LeakRate.g.cs | 53 +----- UnitsNet/GeneratedCode/Quantities/Length.g.cs | 121 +++++------- UnitsNet/GeneratedCode/Quantities/Level.g.cs | 51 +---- .../Quantities/LinearDensity.g.cs | 75 ++------ .../Quantities/LinearPowerDensity.g.cs | 97 +++------- .../GeneratedCode/Quantities/Luminance.g.cs | 67 ++----- .../GeneratedCode/Quantities/Luminosity.g.cs | 75 ++------ .../Quantities/LuminousFlux.g.cs | 49 +---- .../Quantities/LuminousIntensity.g.cs | 49 +---- .../Quantities/MagneticField.g.cs | 59 ++---- .../Quantities/MagneticFlux.g.cs | 49 +---- .../Quantities/Magnetization.g.cs | 49 +---- UnitsNet/GeneratedCode/Quantities/Mass.g.cs | 97 +++------- .../Quantities/MassConcentration.g.cs | 145 ++++++-------- .../GeneratedCode/Quantities/MassFlow.g.cs | 113 ++++------- .../GeneratedCode/Quantities/MassFlux.g.cs | 71 ++----- .../Quantities/MassFraction.g.cs | 95 +++------- .../Quantities/MassMomentOfInertia.g.cs | 103 ++++------ .../GeneratedCode/Quantities/MolarEnergy.g.cs | 53 +----- .../Quantities/MolarEntropy.g.cs | 53 +----- .../GeneratedCode/Quantities/MolarFlow.g.cs | 65 ++----- .../GeneratedCode/Quantities/MolarMass.g.cs | 73 ++------ .../GeneratedCode/Quantities/Molarity.g.cs | 69 ++----- .../Quantities/Permeability.g.cs | 49 +---- .../Quantities/Permittivity.g.cs | 49 +---- .../Quantities/PorousMediumPermeability.g.cs | 57 +----- UnitsNet/GeneratedCode/Quantities/Power.g.cs | 99 +++------- .../Quantities/PowerDensity.g.cs | 135 +++++-------- .../GeneratedCode/Quantities/PowerRatio.g.cs | 51 +---- .../GeneratedCode/Quantities/Pressure.g.cs | 145 ++++++-------- .../Quantities/PressureChangeRate.g.cs | 75 ++------ UnitsNet/GeneratedCode/Quantities/Ratio.g.cs | 59 ++---- .../Quantities/RatioChangeRate.g.cs | 51 +---- .../Quantities/ReactiveEnergy.g.cs | 53 +----- .../Quantities/ReactivePower.g.cs | 55 +----- .../Quantities/ReciprocalArea.g.cs | 69 ++----- .../Quantities/ReciprocalLength.g.cs | 67 ++----- .../Quantities/RelativeHumidity.g.cs | 49 +---- .../Quantities/RotationalAcceleration.g.cs | 55 +----- .../Quantities/RotationalSpeed.g.cs | 73 ++------ .../Quantities/RotationalStiffness.g.cs | 113 ++++------- .../RotationalStiffnessPerLength.g.cs | 57 +----- UnitsNet/GeneratedCode/Quantities/Scalar.g.cs | 49 +---- .../GeneratedCode/Quantities/SolidAngle.g.cs | 49 +---- .../Quantities/SpecificEnergy.g.cs | 107 ++++------- .../Quantities/SpecificEntropy.g.cs | 65 ++----- .../Quantities/SpecificFuelConsumption.g.cs | 55 +----- .../Quantities/SpecificVolume.g.cs | 53 +----- .../Quantities/SpecificWeight.g.cs | 81 +++----- UnitsNet/GeneratedCode/Quantities/Speed.g.cs | 113 ++++------- .../Quantities/StandardVolumeFlow.g.cs | 65 ++----- .../GeneratedCode/Quantities/Temperature.g.cs | 67 ++----- .../Quantities/TemperatureChangeRate.g.cs | 67 ++----- .../Quantities/TemperatureDelta.g.cs | 65 ++----- .../Quantities/TemperatureGradient.g.cs | 55 +----- .../Quantities/ThermalConductivity.g.cs | 51 +---- .../Quantities/ThermalResistance.g.cs | 59 ++---- UnitsNet/GeneratedCode/Quantities/Torque.g.cs | 97 +++------- .../Quantities/TorquePerLength.g.cs | 89 +++------ .../GeneratedCode/Quantities/Turbidity.g.cs | 49 +---- .../GeneratedCode/Quantities/VitaminA.g.cs | 49 +---- UnitsNet/GeneratedCode/Quantities/Volume.g.cs | 153 ++++++--------- .../Quantities/VolumeConcentration.g.cs | 87 +++------ .../GeneratedCode/Quantities/VolumeFlow.g.cs | 177 +++++++----------- .../Quantities/VolumeFlowPerArea.g.cs | 51 +---- .../Quantities/VolumePerLength.g.cs | 61 ++---- .../Quantities/VolumetricHeatCapacity.g.cs | 65 ++----- .../Quantities/WarpingMomentOfInertia.g.cs | 59 ++---- .../Resources/Acceleration.restext | 24 +-- .../Resources/Acceleration.ru-RU.restext | 24 +-- .../Resources/AmountOfSubstance.restext | 30 +-- .../Resources/AmplitudeRatio.restext | 8 +- .../GeneratedCode/Resources/Angle.restext | 30 +-- .../Resources/Angle.ru-RU.restext | 24 +-- .../Resources/ApparentEnergy.restext | 6 +- .../Resources/ApparentPower.restext | 12 +- UnitsNet/GeneratedCode/Resources/Area.restext | 28 +-- .../Resources/Area.ru-RU.restext | 28 +-- .../Resources/Area.zh-CN.restext | 26 +-- .../Resources/AreaDensity.restext | 6 +- .../Resources/AreaMomentOfInertia.restext | 12 +- .../GeneratedCode/Resources/BitRate.restext | 52 ++--- .../BrakeSpecificFuelConsumption.restext | 6 +- .../Resources/Capacitance.restext | 14 +- .../Resources/Compressibility.restext | 14 +- .../GeneratedCode/Resources/Density.restext | 102 +++++----- .../Resources/Density.ru-RU.restext | 8 +- .../GeneratedCode/Resources/Duration.restext | 22 +-- .../Resources/Duration.ru-RU.restext | 20 +- .../Resources/DynamicViscosity.restext | 16 +- .../Resources/ElectricCharge.restext | 22 +-- .../Resources/ElectricChargeDensity.restext | 2 +- .../Resources/ElectricCurrent.restext | 18 +- .../Resources/ElectricCurrentDensity.restext | 6 +- .../Resources/ElectricCurrentGradient.restext | 8 +- .../Resources/ElectricField.restext | 2 +- .../Resources/ElectricInductance.restext | 10 +- .../Resources/ElectricPotential.restext | 12 +- .../Resources/ElectricPotential.ru-RU.restext | 12 +- .../Resources/ElectricPotentialAc.restext | 10 +- .../ElectricPotentialChangeRate.restext | 40 ++-- .../Resources/ElectricPotentialDc.restext | 10 +- .../Resources/ElectricResistance.restext | 14 +- .../Resources/ElectricResistivity.restext | 28 +-- .../ElectricSurfaceChargeDensity.restext | 6 +- .../GeneratedCode/Resources/Energy.restext | 76 ++++---- .../Resources/Energy.ru-RU.restext | 42 ++--- .../Resources/EnergyDensity.restext | 24 +-- .../GeneratedCode/Resources/Entropy.restext | 14 +- .../GeneratedCode/Resources/Force.restext | 28 +-- .../Resources/Force.ru-RU.restext | 26 +-- .../Resources/ForceChangeRate.restext | 30 +-- .../Resources/ForcePerLength.restext | 76 ++++---- .../Resources/ForcePerLength.ru-RU.restext | 12 +- .../GeneratedCode/Resources/Frequency.restext | 10 +- .../Resources/Frequency.ru-RU.restext | 2 +- .../Resources/FuelEfficiency.restext | 8 +- .../GeneratedCode/Resources/HeatFlux.restext | 36 ++-- .../Resources/HeatTransferCoefficient.restext | 12 +- .../GeneratedCode/Resources/Impulse.restext | 26 +-- .../Resources/Information.restext | 52 ++--- .../Resources/Irradiance.restext | 28 +-- .../Resources/Irradiation.restext | 14 +- UnitsNet/GeneratedCode/Resources/Jerk.restext | 18 +- .../Resources/Jerk.ru-RU.restext | 18 +- .../Resources/KinematicViscosity.restext | 4 +- .../KinematicViscosity.ru-RU.restext | 2 +- .../GeneratedCode/Resources/LeakRate.restext | 6 +- .../GeneratedCode/Resources/Length.restext | 74 ++++---- .../Resources/Length.ru-RU.restext | 34 ++-- .../Resources/Length.zh-CN.restext | 34 ++-- .../GeneratedCode/Resources/Level.restext | 4 +- .../Resources/LinearDensity.restext | 28 +-- .../Resources/LinearPowerDensity.restext | 50 ++--- .../GeneratedCode/Resources/Luminance.restext | 20 +- .../Resources/Luminosity.restext | 28 +-- .../Resources/LuminousFlux.restext | 2 +- .../Resources/MagneticField.restext | 12 +- .../Resources/MagneticFlux.restext | 2 +- .../Resources/Magnetization.restext | 2 +- UnitsNet/GeneratedCode/Resources/Mass.restext | 44 ++--- .../Resources/Mass.ru-RU.restext | 34 ++-- .../Resources/Mass.zh-CN.restext | 36 ++-- .../Resources/MassConcentration.restext | 98 +++++----- .../Resources/MassConcentration.ru-RU.restext | 8 +- .../GeneratedCode/Resources/MassFlow.restext | 66 +++---- .../Resources/MassFlow.ru-RU.restext | 4 +- .../GeneratedCode/Resources/MassFlux.restext | 24 +-- .../Resources/MassFraction.restext | 46 ++--- .../Resources/MassMomentOfInertia.restext | 56 +++--- .../Resources/MolarEnergy.restext | 6 +- .../Resources/MolarEntropy.restext | 6 +- .../GeneratedCode/Resources/MolarFlow.restext | 18 +- .../GeneratedCode/Resources/MolarMass.restext | 26 +-- .../Resources/MolarMass.ru-RU.restext | 24 +-- .../GeneratedCode/Resources/Molarity.restext | 22 +-- .../Resources/Permeability.restext | 2 +- .../Resources/Permittivity.restext | 2 +- .../PorousMediumPermeability.restext | 10 +- .../GeneratedCode/Resources/Power.restext | 42 ++--- .../Resources/PowerDensity.restext | 88 ++++----- .../Resources/PowerRatio.restext | 4 +- .../GeneratedCode/Resources/Pressure.restext | 98 +++++----- .../Resources/Pressure.ru-RU.restext | 62 +++--- .../Resources/PressureChangeRate.restext | 28 +-- .../PressureChangeRate.ru-RU.restext | 28 +-- .../GeneratedCode/Resources/Ratio.restext | 10 +- .../Resources/RatioChangeRate.restext | 4 +- .../Resources/ReactiveEnergy.restext | 6 +- .../Resources/ReactivePower.restext | 8 +- .../Resources/ReciprocalArea.restext | 22 +-- .../Resources/ReciprocalLength.restext | 20 +- .../Resources/RotationalAcceleration.restext | 8 +- .../Resources/RotationalSpeed.restext | 26 +-- .../Resources/RotationalSpeed.ru-RU.restext | 24 +-- .../Resources/RotationalStiffness.restext | 64 +++---- .../RotationalStiffnessPerLength.restext | 10 +- .../Resources/SolidAngle.restext | 2 +- .../Resources/SpecificEnergy.restext | 58 +++--- .../Resources/SpecificEntropy.restext | 18 +- .../Resources/SpecificFuelConsumption.restext | 8 +- .../Resources/SpecificVolume.restext | 6 +- .../Resources/SpecificWeight.restext | 34 ++-- .../GeneratedCode/Resources/Speed.restext | 64 +++---- .../Resources/Speed.ru-RU.restext | 46 ++--- .../Resources/StandardVolumeFlow.restext | 18 +- .../Resources/Temperature.restext | 20 +- .../Resources/TemperatureChangeRate.restext | 20 +- .../Resources/TemperatureDelta.restext | 18 +- .../Resources/TemperatureGradient.restext | 8 +- .../Resources/ThermalConductivity.restext | 4 +- .../Resources/ThermalResistance.restext | 12 +- .../GeneratedCode/Resources/Torque.restext | 50 ++--- .../Resources/Torque.ru-RU.restext | 6 +- .../Resources/TorquePerLength.restext | 42 ++--- .../Resources/TorquePerLength.ru-RU.restext | 6 +- .../GeneratedCode/Resources/VitaminA.restext | 2 +- .../Resources/Volume.fr-CA.restext | 2 +- .../GeneratedCode/Resources/Volume.restext | 92 ++++----- .../Resources/Volume.ru-RU.restext | 74 ++++---- .../Resources/VolumeConcentration.restext | 10 +- .../Resources/VolumeFlow.restext | 130 ++++++------- .../Resources/VolumeFlow.ru-RU.restext | 60 +++--- .../Resources/VolumeFlowPerArea.restext | 4 +- .../Resources/VolumePerLength.restext | 14 +- .../Resources/VolumetricHeatCapacity.restext | 18 +- .../Resources/WarpingMomentOfInertia.restext | 12 +- UnitsNet/IQuantity.cs | 7 - UnitsNet/QuantityFormatter.cs | 6 +- UnitsNet/UnitInfo.cs | 69 ++++++- 264 files changed, 3906 insertions(+), 8288 deletions(-) diff --git a/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs b/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs index e7bc551da8..cc46efe293 100644 --- a/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs +++ b/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs @@ -37,12 +37,9 @@ public string Generate() Writer.WL(GeneratedFileHeader); Writer.WL(@" using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -138,7 +135,7 @@ private void GenerateStaticConstructor() if (baseUnits == null) { Writer.WL($@" - new UnitInfo<{_unitEnumName}>({_unitEnumName}.{unit.SingularName}, ""{unit.PluralName}"", BaseUnits.Undefined),"); + new UnitInfo<{_unitEnumName}>({_unitEnumName}.{unit.SingularName}, ""{unit.PluralName}"", BaseUnits.Undefined, ""{_quantity.Name}""),"); } else { @@ -155,7 +152,7 @@ private void GenerateStaticConstructor() }.Where(str => str != null)); Writer.WL($@" - new UnitInfo<{_unitEnumName}>({_unitEnumName}.{unit.SingularName}, ""{unit.PluralName}"", new BaseUnits({baseUnitsCtorArgs})),"); + new UnitInfo<{_unitEnumName}>({_unitEnumName}.{unit.SingularName}, ""{unit.PluralName}"", new BaseUnits({baseUnitsCtorArgs}), ""{_quantity.Name}""),"); } } @@ -165,8 +162,6 @@ private void GenerateStaticConstructor() DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, {_unitEnumName} Unit), List>(); }} "); } @@ -261,12 +256,6 @@ private void GenerateStaticProperties() } Writer.WL($@" - - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, {_unitEnumName} Unit), List> Abbreviations {{ get; }} - #endregion "); } @@ -375,7 +364,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation({_unitEnumName} unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation({_unitEnumName} unit) + {{ + return GetAbbreviation(unit, null); + }} /// /// Get unit abbreviation string. @@ -385,34 +377,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation({_unitEnumName} unit, IFormatProvider? provider) {{ - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - }} - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations({_unitEnumName} unit, CultureInfo? culture = null) - {{ - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - {{ - abbreviations = new List(); - - const string resourceName = $""UnitsNet.GeneratedCode.Resources.{_quantity.Name}""; - var resourceManager = new ResourceManager(resourceName, typeof({_quantity.Name}).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - }} - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); }} #endregion @@ -1116,10 +1081,6 @@ IQuantity IQuantity.ToUnit(Enum unit) private void GenerateToString() { Writer.WL($@" - - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/CodeGen/Generators/UnitsNetGenerator.cs b/CodeGen/Generators/UnitsNetGenerator.cs index cf04e725b3..ca23308212 100644 --- a/CodeGen/Generators/UnitsNetGenerator.cs +++ b/CodeGen/Generators/UnitsNetGenerator.cs @@ -163,7 +163,7 @@ private static void GenerateResourceFiles(Quantity[] quantities, string resource { if(localization.Abbreviations.Any()) { - writer.Write($"{unit.SingularName}="); + writer.Write($"{unit.PluralName}="); for(int i = 0; i < localization.Abbreviations.Length; i++) { diff --git a/UnitsNet/CustomCode/UnitAbbreviationsCache.cs b/UnitsNet/CustomCode/UnitAbbreviationsCache.cs index 6ef0823892..fc0ccfc04b 100644 --- a/UnitsNet/CustomCode/UnitAbbreviationsCache.cs +++ b/UnitsNet/CustomCode/UnitAbbreviationsCache.cs @@ -189,7 +189,8 @@ public string[] GetUnitAbbreviations(Type unitType, int unitValue, IFormatProvid if(!Quantity.TryFrom(0.0, enumInstance, out var quantity)) throw new NotImplementedException($"No abbreviation is specified for {unitType.Name} with numeric value {unitValue}."); - return quantity.GetAbbreviations(formatProvider as CultureInfo).ToArray(); + var unitInfo = quantity.QuantityInfo.UnitInfos[unitValue]; + return unitInfo.GetAbbreviations((CultureInfo)formatProvider!).ToArray(); } /// @@ -211,8 +212,7 @@ public IReadOnlyList GetAllUnitAbbreviationsForQuantity(Type unitEnumTyp foreach(var enumValue in enumValues) { - var quantity = Quantity.From(0.0, enumValue); - var abbreviations = quantity.GetAbbreviations(formatProvider as CultureInfo); + var abbreviations = GetUnitAbbreviations(enumValue.GetType(), Convert.ToInt32(enumValue), formatProvider); foreach(var abbrev in abbreviations) { diff --git a/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs b/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs index d8bd73d9a7..0611fdc214 100644 --- a/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,27 +65,25 @@ static Acceleration() Info = new QuantityInfo("Acceleration", new UnitInfo[] { - new UnitInfo(AccelerationUnit.CentimeterPerSecondSquared, "CentimetersPerSecondSquared", BaseUnits.Undefined), - new UnitInfo(AccelerationUnit.DecimeterPerSecondSquared, "DecimetersPerSecondSquared", BaseUnits.Undefined), - new UnitInfo(AccelerationUnit.FootPerSecondSquared, "FeetPerSecondSquared", new BaseUnits(length: LengthUnit.Foot, time: DurationUnit.Second)), - new UnitInfo(AccelerationUnit.InchPerSecondSquared, "InchesPerSecondSquared", new BaseUnits(length: LengthUnit.Inch, time: DurationUnit.Second)), - new UnitInfo(AccelerationUnit.KilometerPerSecondSquared, "KilometersPerSecondSquared", BaseUnits.Undefined), - new UnitInfo(AccelerationUnit.KnotPerHour, "KnotsPerHour", new BaseUnits(length: LengthUnit.NauticalMile, time: DurationUnit.Hour)), - new UnitInfo(AccelerationUnit.KnotPerMinute, "KnotsPerMinute", new BaseUnits(length: LengthUnit.NauticalMile, time: DurationUnit.Minute)), - new UnitInfo(AccelerationUnit.KnotPerSecond, "KnotsPerSecond", new BaseUnits(length: LengthUnit.NauticalMile, time: DurationUnit.Second)), - new UnitInfo(AccelerationUnit.MeterPerSecondSquared, "MetersPerSecondSquared", new BaseUnits(length: LengthUnit.Meter, time: DurationUnit.Second)), - new UnitInfo(AccelerationUnit.MicrometerPerSecondSquared, "MicrometersPerSecondSquared", BaseUnits.Undefined), - new UnitInfo(AccelerationUnit.MillimeterPerSecondSquared, "MillimetersPerSecondSquared", BaseUnits.Undefined), - new UnitInfo(AccelerationUnit.MillistandardGravity, "MillistandardGravity", BaseUnits.Undefined), - new UnitInfo(AccelerationUnit.NanometerPerSecondSquared, "NanometersPerSecondSquared", BaseUnits.Undefined), - new UnitInfo(AccelerationUnit.StandardGravity, "StandardGravity", new BaseUnits(length: LengthUnit.Meter, time: DurationUnit.Second)), + new UnitInfo(AccelerationUnit.CentimeterPerSecondSquared, "CentimetersPerSecondSquared", BaseUnits.Undefined, "Acceleration"), + new UnitInfo(AccelerationUnit.DecimeterPerSecondSquared, "DecimetersPerSecondSquared", BaseUnits.Undefined, "Acceleration"), + new UnitInfo(AccelerationUnit.FootPerSecondSquared, "FeetPerSecondSquared", new BaseUnits(length: LengthUnit.Foot, time: DurationUnit.Second), "Acceleration"), + new UnitInfo(AccelerationUnit.InchPerSecondSquared, "InchesPerSecondSquared", new BaseUnits(length: LengthUnit.Inch, time: DurationUnit.Second), "Acceleration"), + new UnitInfo(AccelerationUnit.KilometerPerSecondSquared, "KilometersPerSecondSquared", BaseUnits.Undefined, "Acceleration"), + new UnitInfo(AccelerationUnit.KnotPerHour, "KnotsPerHour", new BaseUnits(length: LengthUnit.NauticalMile, time: DurationUnit.Hour), "Acceleration"), + new UnitInfo(AccelerationUnit.KnotPerMinute, "KnotsPerMinute", new BaseUnits(length: LengthUnit.NauticalMile, time: DurationUnit.Minute), "Acceleration"), + new UnitInfo(AccelerationUnit.KnotPerSecond, "KnotsPerSecond", new BaseUnits(length: LengthUnit.NauticalMile, time: DurationUnit.Second), "Acceleration"), + new UnitInfo(AccelerationUnit.MeterPerSecondSquared, "MetersPerSecondSquared", new BaseUnits(length: LengthUnit.Meter, time: DurationUnit.Second), "Acceleration"), + new UnitInfo(AccelerationUnit.MicrometerPerSecondSquared, "MicrometersPerSecondSquared", BaseUnits.Undefined, "Acceleration"), + new UnitInfo(AccelerationUnit.MillimeterPerSecondSquared, "MillimetersPerSecondSquared", BaseUnits.Undefined, "Acceleration"), + new UnitInfo(AccelerationUnit.MillistandardGravity, "MillistandardGravity", BaseUnits.Undefined, "Acceleration"), + new UnitInfo(AccelerationUnit.NanometerPerSecondSquared, "NanometersPerSecondSquared", BaseUnits.Undefined, "Acceleration"), + new UnitInfo(AccelerationUnit.StandardGravity, "StandardGravity", new BaseUnits(length: LengthUnit.Meter, time: DurationUnit.Second), "Acceleration"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, AccelerationUnit Unit), List>(); } /// @@ -155,11 +150,6 @@ public Acceleration(double value, UnitSystem unitSystem) /// public static Acceleration AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, AccelerationUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -311,7 +301,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(AccelerationUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(AccelerationUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -321,34 +314,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(AccelerationUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(AccelerationUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Acceleration"; - var resourceManager = new ResourceManager(resourceName, typeof(Acceleration).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -1047,9 +1013,6 @@ public Acceleration ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs index 0bf36ae7d2..ca18b3e196 100644 --- a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,28 +65,26 @@ static AmountOfSubstance() Info = new QuantityInfo("AmountOfSubstance", new UnitInfo[] { - new UnitInfo(AmountOfSubstanceUnit.Centimole, "Centimoles", BaseUnits.Undefined), - new UnitInfo(AmountOfSubstanceUnit.CentipoundMole, "CentipoundMoles", BaseUnits.Undefined), - new UnitInfo(AmountOfSubstanceUnit.Decimole, "Decimoles", BaseUnits.Undefined), - new UnitInfo(AmountOfSubstanceUnit.DecipoundMole, "DecipoundMoles", BaseUnits.Undefined), - new UnitInfo(AmountOfSubstanceUnit.Kilomole, "Kilomoles", BaseUnits.Undefined), - new UnitInfo(AmountOfSubstanceUnit.KilopoundMole, "KilopoundMoles", BaseUnits.Undefined), - new UnitInfo(AmountOfSubstanceUnit.Megamole, "Megamoles", BaseUnits.Undefined), - new UnitInfo(AmountOfSubstanceUnit.Micromole, "Micromoles", BaseUnits.Undefined), - new UnitInfo(AmountOfSubstanceUnit.MicropoundMole, "MicropoundMoles", BaseUnits.Undefined), - new UnitInfo(AmountOfSubstanceUnit.Millimole, "Millimoles", BaseUnits.Undefined), - new UnitInfo(AmountOfSubstanceUnit.MillipoundMole, "MillipoundMoles", BaseUnits.Undefined), - new UnitInfo(AmountOfSubstanceUnit.Mole, "Moles", new BaseUnits(amount: AmountOfSubstanceUnit.Mole)), - new UnitInfo(AmountOfSubstanceUnit.Nanomole, "Nanomoles", BaseUnits.Undefined), - new UnitInfo(AmountOfSubstanceUnit.NanopoundMole, "NanopoundMoles", BaseUnits.Undefined), - new UnitInfo(AmountOfSubstanceUnit.PoundMole, "PoundMoles", new BaseUnits(amount: AmountOfSubstanceUnit.PoundMole)), + new UnitInfo(AmountOfSubstanceUnit.Centimole, "Centimoles", BaseUnits.Undefined, "AmountOfSubstance"), + new UnitInfo(AmountOfSubstanceUnit.CentipoundMole, "CentipoundMoles", BaseUnits.Undefined, "AmountOfSubstance"), + new UnitInfo(AmountOfSubstanceUnit.Decimole, "Decimoles", BaseUnits.Undefined, "AmountOfSubstance"), + new UnitInfo(AmountOfSubstanceUnit.DecipoundMole, "DecipoundMoles", BaseUnits.Undefined, "AmountOfSubstance"), + new UnitInfo(AmountOfSubstanceUnit.Kilomole, "Kilomoles", BaseUnits.Undefined, "AmountOfSubstance"), + new UnitInfo(AmountOfSubstanceUnit.KilopoundMole, "KilopoundMoles", BaseUnits.Undefined, "AmountOfSubstance"), + new UnitInfo(AmountOfSubstanceUnit.Megamole, "Megamoles", BaseUnits.Undefined, "AmountOfSubstance"), + new UnitInfo(AmountOfSubstanceUnit.Micromole, "Micromoles", BaseUnits.Undefined, "AmountOfSubstance"), + new UnitInfo(AmountOfSubstanceUnit.MicropoundMole, "MicropoundMoles", BaseUnits.Undefined, "AmountOfSubstance"), + new UnitInfo(AmountOfSubstanceUnit.Millimole, "Millimoles", BaseUnits.Undefined, "AmountOfSubstance"), + new UnitInfo(AmountOfSubstanceUnit.MillipoundMole, "MillipoundMoles", BaseUnits.Undefined, "AmountOfSubstance"), + new UnitInfo(AmountOfSubstanceUnit.Mole, "Moles", new BaseUnits(amount: AmountOfSubstanceUnit.Mole), "AmountOfSubstance"), + new UnitInfo(AmountOfSubstanceUnit.Nanomole, "Nanomoles", BaseUnits.Undefined, "AmountOfSubstance"), + new UnitInfo(AmountOfSubstanceUnit.NanopoundMole, "NanopoundMoles", BaseUnits.Undefined, "AmountOfSubstance"), + new UnitInfo(AmountOfSubstanceUnit.PoundMole, "PoundMoles", new BaseUnits(amount: AmountOfSubstanceUnit.PoundMole), "AmountOfSubstance"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, AmountOfSubstanceUnit Unit), List>(); } /// @@ -156,11 +151,6 @@ public AmountOfSubstance(double value, UnitSystem unitSystem) /// public static AmountOfSubstance AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, AmountOfSubstanceUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -319,7 +309,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(AmountOfSubstanceUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(AmountOfSubstanceUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -329,34 +322,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(AmountOfSubstanceUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(AmountOfSubstanceUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.AmountOfSubstance"; - var resourceManager = new ResourceManager(resourceName, typeof(AmountOfSubstance).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -1067,9 +1033,6 @@ public AmountOfSubstance ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs b/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs index a0b9b7f54e..6e11355ee6 100644 --- a/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,17 +65,15 @@ static AmplitudeRatio() Info = new QuantityInfo("AmplitudeRatio", new UnitInfo[] { - new UnitInfo(AmplitudeRatioUnit.DecibelMicrovolt, "DecibelMicrovolts", BaseUnits.Undefined), - new UnitInfo(AmplitudeRatioUnit.DecibelMillivolt, "DecibelMillivolts", BaseUnits.Undefined), - new UnitInfo(AmplitudeRatioUnit.DecibelUnloaded, "DecibelsUnloaded", BaseUnits.Undefined), - new UnitInfo(AmplitudeRatioUnit.DecibelVolt, "DecibelVolts", BaseUnits.Undefined), + new UnitInfo(AmplitudeRatioUnit.DecibelMicrovolt, "DecibelMicrovolts", BaseUnits.Undefined, "AmplitudeRatio"), + new UnitInfo(AmplitudeRatioUnit.DecibelMillivolt, "DecibelMillivolts", BaseUnits.Undefined, "AmplitudeRatio"), + new UnitInfo(AmplitudeRatioUnit.DecibelUnloaded, "DecibelsUnloaded", BaseUnits.Undefined, "AmplitudeRatio"), + new UnitInfo(AmplitudeRatioUnit.DecibelVolt, "DecibelVolts", BaseUnits.Undefined, "AmplitudeRatio"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, AmplitudeRatioUnit Unit), List>(); } /// @@ -145,11 +140,6 @@ public AmplitudeRatio(double value, UnitSystem unitSystem) /// public static AmplitudeRatio AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, AmplitudeRatioUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -231,7 +221,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(AmplitudeRatioUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(AmplitudeRatioUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -241,34 +234,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(AmplitudeRatioUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(AmplitudeRatioUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.AmplitudeRatio"; - var resourceManager = new ResourceManager(resourceName, typeof(AmplitudeRatio).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -855,9 +821,6 @@ public AmplitudeRatio ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Angle.g.cs b/UnitsNet/GeneratedCode/Quantities/Angle.g.cs index 9ec2b23f67..4f31052f31 100644 --- a/UnitsNet/GeneratedCode/Quantities/Angle.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Angle.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,29 +65,27 @@ static Angle() Info = new QuantityInfo("Angle", new UnitInfo[] { - new UnitInfo(AngleUnit.Arcminute, "Arcminutes", BaseUnits.Undefined), - new UnitInfo(AngleUnit.Arcsecond, "Arcseconds", BaseUnits.Undefined), - new UnitInfo(AngleUnit.Centiradian, "Centiradians", BaseUnits.Undefined), - new UnitInfo(AngleUnit.Deciradian, "Deciradians", BaseUnits.Undefined), - new UnitInfo(AngleUnit.Degree, "Degrees", BaseUnits.Undefined), - new UnitInfo(AngleUnit.Gradian, "Gradians", BaseUnits.Undefined), - new UnitInfo(AngleUnit.Microdegree, "Microdegrees", BaseUnits.Undefined), - new UnitInfo(AngleUnit.Microradian, "Microradians", BaseUnits.Undefined), - new UnitInfo(AngleUnit.Millidegree, "Millidegrees", BaseUnits.Undefined), - new UnitInfo(AngleUnit.Milliradian, "Milliradians", BaseUnits.Undefined), - new UnitInfo(AngleUnit.Nanodegree, "Nanodegrees", BaseUnits.Undefined), - new UnitInfo(AngleUnit.Nanoradian, "Nanoradians", BaseUnits.Undefined), - new UnitInfo(AngleUnit.NatoMil, "NatoMils", BaseUnits.Undefined), - new UnitInfo(AngleUnit.Radian, "Radians", BaseUnits.Undefined), - new UnitInfo(AngleUnit.Revolution, "Revolutions", BaseUnits.Undefined), - new UnitInfo(AngleUnit.Tilt, "Tilt", BaseUnits.Undefined), + new UnitInfo(AngleUnit.Arcminute, "Arcminutes", BaseUnits.Undefined, "Angle"), + new UnitInfo(AngleUnit.Arcsecond, "Arcseconds", BaseUnits.Undefined, "Angle"), + new UnitInfo(AngleUnit.Centiradian, "Centiradians", BaseUnits.Undefined, "Angle"), + new UnitInfo(AngleUnit.Deciradian, "Deciradians", BaseUnits.Undefined, "Angle"), + new UnitInfo(AngleUnit.Degree, "Degrees", BaseUnits.Undefined, "Angle"), + new UnitInfo(AngleUnit.Gradian, "Gradians", BaseUnits.Undefined, "Angle"), + new UnitInfo(AngleUnit.Microdegree, "Microdegrees", BaseUnits.Undefined, "Angle"), + new UnitInfo(AngleUnit.Microradian, "Microradians", BaseUnits.Undefined, "Angle"), + new UnitInfo(AngleUnit.Millidegree, "Millidegrees", BaseUnits.Undefined, "Angle"), + new UnitInfo(AngleUnit.Milliradian, "Milliradians", BaseUnits.Undefined, "Angle"), + new UnitInfo(AngleUnit.Nanodegree, "Nanodegrees", BaseUnits.Undefined, "Angle"), + new UnitInfo(AngleUnit.Nanoradian, "Nanoradians", BaseUnits.Undefined, "Angle"), + new UnitInfo(AngleUnit.NatoMil, "NatoMils", BaseUnits.Undefined, "Angle"), + new UnitInfo(AngleUnit.Radian, "Radians", BaseUnits.Undefined, "Angle"), + new UnitInfo(AngleUnit.Revolution, "Revolutions", BaseUnits.Undefined, "Angle"), + new UnitInfo(AngleUnit.Tilt, "Tilt", BaseUnits.Undefined, "Angle"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, AngleUnit Unit), List>(); } /// @@ -157,11 +152,6 @@ public Angle(double value, UnitSystem unitSystem) /// public static Angle AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, AngleUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -327,7 +317,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(AngleUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(AngleUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -337,34 +330,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(AngleUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(AngleUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Angle"; - var resourceManager = new ResourceManager(resourceName, typeof(Angle).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -1087,9 +1053,6 @@ public Angle ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs index 02083b7b96..eb05648f32 100644 --- a/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,16 +65,14 @@ static ApparentEnergy() Info = new QuantityInfo("ApparentEnergy", new UnitInfo[] { - new UnitInfo(ApparentEnergyUnit.KilovoltampereHour, "KilovoltampereHours", BaseUnits.Undefined), - new UnitInfo(ApparentEnergyUnit.MegavoltampereHour, "MegavoltampereHours", BaseUnits.Undefined), - new UnitInfo(ApparentEnergyUnit.VoltampereHour, "VoltampereHours", BaseUnits.Undefined), + new UnitInfo(ApparentEnergyUnit.KilovoltampereHour, "KilovoltampereHours", BaseUnits.Undefined, "ApparentEnergy"), + new UnitInfo(ApparentEnergyUnit.MegavoltampereHour, "MegavoltampereHours", BaseUnits.Undefined, "ApparentEnergy"), + new UnitInfo(ApparentEnergyUnit.VoltampereHour, "VoltampereHours", BaseUnits.Undefined, "ApparentEnergy"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ApparentEnergyUnit Unit), List>(); } /// @@ -144,11 +139,6 @@ public ApparentEnergy(double value, UnitSystem unitSystem) /// public static ApparentEnergy AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, ApparentEnergyUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -223,7 +213,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ApparentEnergyUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(ApparentEnergyUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -233,34 +226,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ApparentEnergyUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(ApparentEnergyUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ApparentEnergy"; - var resourceManager = new ResourceManager(resourceName, typeof(ApparentEnergy).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -827,9 +793,6 @@ public ApparentEnergy ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs b/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs index 9b1db295ea..2c1dc72416 100644 --- a/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,19 +65,17 @@ static ApparentPower() Info = new QuantityInfo("ApparentPower", new UnitInfo[] { - new UnitInfo(ApparentPowerUnit.Gigavoltampere, "Gigavoltamperes", BaseUnits.Undefined), - new UnitInfo(ApparentPowerUnit.Kilovoltampere, "Kilovoltamperes", BaseUnits.Undefined), - new UnitInfo(ApparentPowerUnit.Megavoltampere, "Megavoltamperes", BaseUnits.Undefined), - new UnitInfo(ApparentPowerUnit.Microvoltampere, "Microvoltamperes", BaseUnits.Undefined), - new UnitInfo(ApparentPowerUnit.Millivoltampere, "Millivoltamperes", BaseUnits.Undefined), - new UnitInfo(ApparentPowerUnit.Voltampere, "Voltamperes", BaseUnits.Undefined), + new UnitInfo(ApparentPowerUnit.Gigavoltampere, "Gigavoltamperes", BaseUnits.Undefined, "ApparentPower"), + new UnitInfo(ApparentPowerUnit.Kilovoltampere, "Kilovoltamperes", BaseUnits.Undefined, "ApparentPower"), + new UnitInfo(ApparentPowerUnit.Megavoltampere, "Megavoltamperes", BaseUnits.Undefined, "ApparentPower"), + new UnitInfo(ApparentPowerUnit.Microvoltampere, "Microvoltamperes", BaseUnits.Undefined, "ApparentPower"), + new UnitInfo(ApparentPowerUnit.Millivoltampere, "Millivoltamperes", BaseUnits.Undefined, "ApparentPower"), + new UnitInfo(ApparentPowerUnit.Voltampere, "Voltamperes", BaseUnits.Undefined, "ApparentPower"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ApparentPowerUnit Unit), List>(); } /// @@ -147,11 +142,6 @@ public ApparentPower(double value, UnitSystem unitSystem) /// public static ApparentPower AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, ApparentPowerUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -247,7 +237,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ApparentPowerUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(ApparentPowerUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -257,34 +250,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ApparentPowerUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(ApparentPowerUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ApparentPower"; - var resourceManager = new ResourceManager(resourceName, typeof(ApparentPower).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -887,9 +853,6 @@ public ApparentPower ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Area.g.cs b/UnitsNet/GeneratedCode/Quantities/Area.g.cs index 182a8a6c3c..d2e88bf986 100644 --- a/UnitsNet/GeneratedCode/Quantities/Area.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Area.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,27 +65,25 @@ static Area() Info = new QuantityInfo("Area", new UnitInfo[] { - new UnitInfo(AreaUnit.Acre, "Acres", BaseUnits.Undefined), - new UnitInfo(AreaUnit.Hectare, "Hectares", BaseUnits.Undefined), - new UnitInfo(AreaUnit.SquareCentimeter, "SquareCentimeters", new BaseUnits(length: LengthUnit.Centimeter)), - new UnitInfo(AreaUnit.SquareDecimeter, "SquareDecimeters", new BaseUnits(length: LengthUnit.Decimeter)), - new UnitInfo(AreaUnit.SquareFoot, "SquareFeet", new BaseUnits(length: LengthUnit.Foot)), - new UnitInfo(AreaUnit.SquareInch, "SquareInches", new BaseUnits(length: LengthUnit.Inch)), - new UnitInfo(AreaUnit.SquareKilometer, "SquareKilometers", new BaseUnits(length: LengthUnit.Kilometer)), - new UnitInfo(AreaUnit.SquareMeter, "SquareMeters", new BaseUnits(length: LengthUnit.Meter)), - new UnitInfo(AreaUnit.SquareMicrometer, "SquareMicrometers", new BaseUnits(length: LengthUnit.Micrometer)), - new UnitInfo(AreaUnit.SquareMile, "SquareMiles", new BaseUnits(length: LengthUnit.Mile)), - new UnitInfo(AreaUnit.SquareMillimeter, "SquareMillimeters", new BaseUnits(length: LengthUnit.Millimeter)), - new UnitInfo(AreaUnit.SquareNauticalMile, "SquareNauticalMiles", BaseUnits.Undefined), - new UnitInfo(AreaUnit.SquareYard, "SquareYards", new BaseUnits(length: LengthUnit.Yard)), - new UnitInfo(AreaUnit.UsSurveySquareFoot, "UsSurveySquareFeet", new BaseUnits(length: LengthUnit.UsSurveyFoot)), + new UnitInfo(AreaUnit.Acre, "Acres", BaseUnits.Undefined, "Area"), + new UnitInfo(AreaUnit.Hectare, "Hectares", BaseUnits.Undefined, "Area"), + new UnitInfo(AreaUnit.SquareCentimeter, "SquareCentimeters", new BaseUnits(length: LengthUnit.Centimeter), "Area"), + new UnitInfo(AreaUnit.SquareDecimeter, "SquareDecimeters", new BaseUnits(length: LengthUnit.Decimeter), "Area"), + new UnitInfo(AreaUnit.SquareFoot, "SquareFeet", new BaseUnits(length: LengthUnit.Foot), "Area"), + new UnitInfo(AreaUnit.SquareInch, "SquareInches", new BaseUnits(length: LengthUnit.Inch), "Area"), + new UnitInfo(AreaUnit.SquareKilometer, "SquareKilometers", new BaseUnits(length: LengthUnit.Kilometer), "Area"), + new UnitInfo(AreaUnit.SquareMeter, "SquareMeters", new BaseUnits(length: LengthUnit.Meter), "Area"), + new UnitInfo(AreaUnit.SquareMicrometer, "SquareMicrometers", new BaseUnits(length: LengthUnit.Micrometer), "Area"), + new UnitInfo(AreaUnit.SquareMile, "SquareMiles", new BaseUnits(length: LengthUnit.Mile), "Area"), + new UnitInfo(AreaUnit.SquareMillimeter, "SquareMillimeters", new BaseUnits(length: LengthUnit.Millimeter), "Area"), + new UnitInfo(AreaUnit.SquareNauticalMile, "SquareNauticalMiles", BaseUnits.Undefined, "Area"), + new UnitInfo(AreaUnit.SquareYard, "SquareYards", new BaseUnits(length: LengthUnit.Yard), "Area"), + new UnitInfo(AreaUnit.UsSurveySquareFoot, "UsSurveySquareFeet", new BaseUnits(length: LengthUnit.UsSurveyFoot), "Area"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, AreaUnit Unit), List>(); } /// @@ -155,11 +150,6 @@ public Area(double value, UnitSystem unitSystem) /// public static Area AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, AreaUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -311,7 +301,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(AreaUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(AreaUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -321,34 +314,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(AreaUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(AreaUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Area"; - var resourceManager = new ResourceManager(resourceName, typeof(Area).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -1047,9 +1013,6 @@ public Area ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs index 4ea157f3c7..16e66a7f80 100644 --- a/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,16 +65,14 @@ static AreaDensity() Info = new QuantityInfo("AreaDensity", new UnitInfo[] { - new UnitInfo(AreaDensityUnit.GramPerSquareMeter, "GramsPerSquareMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Gram)), - new UnitInfo(AreaDensityUnit.KilogramPerSquareMeter, "KilogramsPerSquareMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram)), - new UnitInfo(AreaDensityUnit.MilligramPerSquareMeter, "MilligramsPerSquareMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Milligram)), + new UnitInfo(AreaDensityUnit.GramPerSquareMeter, "GramsPerSquareMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Gram), "AreaDensity"), + new UnitInfo(AreaDensityUnit.KilogramPerSquareMeter, "KilogramsPerSquareMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram), "AreaDensity"), + new UnitInfo(AreaDensityUnit.MilligramPerSquareMeter, "MilligramsPerSquareMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Milligram), "AreaDensity"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, AreaDensityUnit Unit), List>(); } /// @@ -144,11 +139,6 @@ public AreaDensity(double value, UnitSystem unitSystem) /// public static AreaDensity AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, AreaDensityUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -223,7 +213,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(AreaDensityUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(AreaDensityUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -233,34 +226,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(AreaDensityUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(AreaDensityUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.AreaDensity"; - var resourceManager = new ResourceManager(resourceName, typeof(AreaDensity).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -827,9 +793,6 @@ public AreaDensity ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs index d03a5a5aab..66e72343d8 100644 --- a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,19 +65,17 @@ static AreaMomentOfInertia() Info = new QuantityInfo("AreaMomentOfInertia", new UnitInfo[] { - new UnitInfo(AreaMomentOfInertiaUnit.CentimeterToTheFourth, "CentimetersToTheFourth", new BaseUnits(length: LengthUnit.Centimeter)), - new UnitInfo(AreaMomentOfInertiaUnit.DecimeterToTheFourth, "DecimetersToTheFourth", new BaseUnits(length: LengthUnit.Decimeter)), - new UnitInfo(AreaMomentOfInertiaUnit.FootToTheFourth, "FeetToTheFourth", new BaseUnits(length: LengthUnit.Foot)), - new UnitInfo(AreaMomentOfInertiaUnit.InchToTheFourth, "InchesToTheFourth", new BaseUnits(length: LengthUnit.Inch)), - new UnitInfo(AreaMomentOfInertiaUnit.MeterToTheFourth, "MetersToTheFourth", new BaseUnits(length: LengthUnit.Meter)), - new UnitInfo(AreaMomentOfInertiaUnit.MillimeterToTheFourth, "MillimetersToTheFourth", new BaseUnits(length: LengthUnit.Millimeter)), + new UnitInfo(AreaMomentOfInertiaUnit.CentimeterToTheFourth, "CentimetersToTheFourth", new BaseUnits(length: LengthUnit.Centimeter), "AreaMomentOfInertia"), + new UnitInfo(AreaMomentOfInertiaUnit.DecimeterToTheFourth, "DecimetersToTheFourth", new BaseUnits(length: LengthUnit.Decimeter), "AreaMomentOfInertia"), + new UnitInfo(AreaMomentOfInertiaUnit.FootToTheFourth, "FeetToTheFourth", new BaseUnits(length: LengthUnit.Foot), "AreaMomentOfInertia"), + new UnitInfo(AreaMomentOfInertiaUnit.InchToTheFourth, "InchesToTheFourth", new BaseUnits(length: LengthUnit.Inch), "AreaMomentOfInertia"), + new UnitInfo(AreaMomentOfInertiaUnit.MeterToTheFourth, "MetersToTheFourth", new BaseUnits(length: LengthUnit.Meter), "AreaMomentOfInertia"), + new UnitInfo(AreaMomentOfInertiaUnit.MillimeterToTheFourth, "MillimetersToTheFourth", new BaseUnits(length: LengthUnit.Millimeter), "AreaMomentOfInertia"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, AreaMomentOfInertiaUnit Unit), List>(); } /// @@ -147,11 +142,6 @@ public AreaMomentOfInertia(double value, UnitSystem unitSystem) /// public static AreaMomentOfInertia AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, AreaMomentOfInertiaUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -247,7 +237,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(AreaMomentOfInertiaUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(AreaMomentOfInertiaUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -257,34 +250,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(AreaMomentOfInertiaUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(AreaMomentOfInertiaUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.AreaMomentOfInertia"; - var resourceManager = new ResourceManager(resourceName, typeof(AreaMomentOfInertia).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -887,9 +853,6 @@ public AreaMomentOfInertia ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs b/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs index d3e93f2dce..e113c3c437 100644 --- a/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -72,39 +69,37 @@ static BitRate() Info = new QuantityInfo("BitRate", new UnitInfo[] { - new UnitInfo(BitRateUnit.BitPerSecond, "BitsPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.BytePerSecond, "BytesPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.ExabitPerSecond, "ExabitsPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.ExabytePerSecond, "ExabytesPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.ExbibitPerSecond, "ExbibitsPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.ExbibytePerSecond, "ExbibytesPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.GibibitPerSecond, "GibibitsPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.GibibytePerSecond, "GibibytesPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.GigabitPerSecond, "GigabitsPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.GigabytePerSecond, "GigabytesPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.KibibitPerSecond, "KibibitsPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.KibibytePerSecond, "KibibytesPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.KilobitPerSecond, "KilobitsPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.KilobytePerSecond, "KilobytesPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.MebibitPerSecond, "MebibitsPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.MebibytePerSecond, "MebibytesPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.MegabitPerSecond, "MegabitsPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.MegabytePerSecond, "MegabytesPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.PebibitPerSecond, "PebibitsPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.PebibytePerSecond, "PebibytesPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.PetabitPerSecond, "PetabitsPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.PetabytePerSecond, "PetabytesPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.TebibitPerSecond, "TebibitsPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.TebibytePerSecond, "TebibytesPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.TerabitPerSecond, "TerabitsPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.TerabytePerSecond, "TerabytesPerSecond", BaseUnits.Undefined), + new UnitInfo(BitRateUnit.BitPerSecond, "BitsPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.BytePerSecond, "BytesPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.ExabitPerSecond, "ExabitsPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.ExabytePerSecond, "ExabytesPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.ExbibitPerSecond, "ExbibitsPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.ExbibytePerSecond, "ExbibytesPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.GibibitPerSecond, "GibibitsPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.GibibytePerSecond, "GibibytesPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.GigabitPerSecond, "GigabitsPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.GigabytePerSecond, "GigabytesPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.KibibitPerSecond, "KibibitsPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.KibibytePerSecond, "KibibytesPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.KilobitPerSecond, "KilobitsPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.KilobytePerSecond, "KilobytesPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.MebibitPerSecond, "MebibitsPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.MebibytePerSecond, "MebibytesPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.MegabitPerSecond, "MegabitsPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.MegabytePerSecond, "MegabytesPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.PebibitPerSecond, "PebibitsPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.PebibytePerSecond, "PebibytesPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.PetabitPerSecond, "PetabitsPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.PetabytePerSecond, "PetabytesPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.TebibitPerSecond, "TebibitsPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.TebibytePerSecond, "TebibytesPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.TerabitPerSecond, "TerabitsPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.TerabytePerSecond, "TerabytesPerSecond", BaseUnits.Undefined, "BitRate"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, BitRateUnit Unit), List>(); } /// @@ -171,11 +166,6 @@ public BitRate(decimal value, UnitSystem unitSystem) /// public static BitRate AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, BitRateUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -411,7 +401,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(BitRateUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(BitRateUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -421,34 +414,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(BitRateUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(BitRateUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.BitRate"; - var resourceManager = new ResourceManager(resourceName, typeof(BitRate).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -1302,9 +1268,6 @@ public BitRate ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs index ed000570a9..2885d57cbb 100644 --- a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,16 +65,14 @@ static BrakeSpecificFuelConsumption() Info = new QuantityInfo("BrakeSpecificFuelConsumption", new UnitInfo[] { - new UnitInfo(BrakeSpecificFuelConsumptionUnit.GramPerKiloWattHour, "GramsPerKiloWattHour", BaseUnits.Undefined), - new UnitInfo(BrakeSpecificFuelConsumptionUnit.KilogramPerJoule, "KilogramsPerJoule", BaseUnits.Undefined), - new UnitInfo(BrakeSpecificFuelConsumptionUnit.PoundPerMechanicalHorsepowerHour, "PoundsPerMechanicalHorsepowerHour", BaseUnits.Undefined), + new UnitInfo(BrakeSpecificFuelConsumptionUnit.GramPerKiloWattHour, "GramsPerKiloWattHour", BaseUnits.Undefined, "BrakeSpecificFuelConsumption"), + new UnitInfo(BrakeSpecificFuelConsumptionUnit.KilogramPerJoule, "KilogramsPerJoule", BaseUnits.Undefined, "BrakeSpecificFuelConsumption"), + new UnitInfo(BrakeSpecificFuelConsumptionUnit.PoundPerMechanicalHorsepowerHour, "PoundsPerMechanicalHorsepowerHour", BaseUnits.Undefined, "BrakeSpecificFuelConsumption"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, BrakeSpecificFuelConsumptionUnit Unit), List>(); } /// @@ -144,11 +139,6 @@ public BrakeSpecificFuelConsumption(double value, UnitSystem unitSystem) /// public static BrakeSpecificFuelConsumption AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, BrakeSpecificFuelConsumptionUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -223,7 +213,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(BrakeSpecificFuelConsumptionUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(BrakeSpecificFuelConsumptionUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -233,34 +226,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(BrakeSpecificFuelConsumptionUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(BrakeSpecificFuelConsumptionUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.BrakeSpecificFuelConsumption"; - var resourceManager = new ResourceManager(resourceName, typeof(BrakeSpecificFuelConsumption).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -827,9 +793,6 @@ public BrakeSpecificFuelConsumption ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs b/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs index d4d8dfdfb3..eb4278af6d 100644 --- a/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -71,20 +68,18 @@ static Capacitance() Info = new QuantityInfo("Capacitance", new UnitInfo[] { - new UnitInfo(CapacitanceUnit.Farad, "Farads", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second, current: ElectricCurrentUnit.Ampere)), - new UnitInfo(CapacitanceUnit.Kilofarad, "Kilofarads", BaseUnits.Undefined), - new UnitInfo(CapacitanceUnit.Megafarad, "Megafarads", BaseUnits.Undefined), - new UnitInfo(CapacitanceUnit.Microfarad, "Microfarads", BaseUnits.Undefined), - new UnitInfo(CapacitanceUnit.Millifarad, "Millifarads", BaseUnits.Undefined), - new UnitInfo(CapacitanceUnit.Nanofarad, "Nanofarads", BaseUnits.Undefined), - new UnitInfo(CapacitanceUnit.Picofarad, "Picofarads", BaseUnits.Undefined), + new UnitInfo(CapacitanceUnit.Farad, "Farads", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second, current: ElectricCurrentUnit.Ampere), "Capacitance"), + new UnitInfo(CapacitanceUnit.Kilofarad, "Kilofarads", BaseUnits.Undefined, "Capacitance"), + new UnitInfo(CapacitanceUnit.Megafarad, "Megafarads", BaseUnits.Undefined, "Capacitance"), + new UnitInfo(CapacitanceUnit.Microfarad, "Microfarads", BaseUnits.Undefined, "Capacitance"), + new UnitInfo(CapacitanceUnit.Millifarad, "Millifarads", BaseUnits.Undefined, "Capacitance"), + new UnitInfo(CapacitanceUnit.Nanofarad, "Nanofarads", BaseUnits.Undefined, "Capacitance"), + new UnitInfo(CapacitanceUnit.Picofarad, "Picofarads", BaseUnits.Undefined, "Capacitance"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, CapacitanceUnit Unit), List>(); } /// @@ -151,11 +146,6 @@ public Capacitance(double value, UnitSystem unitSystem) /// public static Capacitance AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, CapacitanceUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -258,7 +248,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(CapacitanceUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(CapacitanceUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -268,34 +261,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(CapacitanceUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(CapacitanceUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Capacitance"; - var resourceManager = new ResourceManager(resourceName, typeof(Capacitance).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -910,9 +876,6 @@ public Capacitance ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs b/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs index 7210f082c8..1c0f3a1d27 100644 --- a/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,16 +65,14 @@ static CoefficientOfThermalExpansion() Info = new QuantityInfo("CoefficientOfThermalExpansion", new UnitInfo[] { - new UnitInfo(CoefficientOfThermalExpansionUnit.InverseDegreeCelsius, "InverseDegreeCelsius", new BaseUnits(temperature: TemperatureUnit.DegreeCelsius)), - new UnitInfo(CoefficientOfThermalExpansionUnit.InverseDegreeFahrenheit, "InverseDegreeFahrenheit", new BaseUnits(temperature: TemperatureUnit.DegreeFahrenheit)), - new UnitInfo(CoefficientOfThermalExpansionUnit.InverseKelvin, "InverseKelvin", new BaseUnits(temperature: TemperatureUnit.Kelvin)), + new UnitInfo(CoefficientOfThermalExpansionUnit.InverseDegreeCelsius, "InverseDegreeCelsius", new BaseUnits(temperature: TemperatureUnit.DegreeCelsius), "CoefficientOfThermalExpansion"), + new UnitInfo(CoefficientOfThermalExpansionUnit.InverseDegreeFahrenheit, "InverseDegreeFahrenheit", new BaseUnits(temperature: TemperatureUnit.DegreeFahrenheit), "CoefficientOfThermalExpansion"), + new UnitInfo(CoefficientOfThermalExpansionUnit.InverseKelvin, "InverseKelvin", new BaseUnits(temperature: TemperatureUnit.Kelvin), "CoefficientOfThermalExpansion"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, CoefficientOfThermalExpansionUnit Unit), List>(); } /// @@ -144,11 +139,6 @@ public CoefficientOfThermalExpansion(double value, UnitSystem unitSystem) /// public static CoefficientOfThermalExpansion AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, CoefficientOfThermalExpansionUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -223,7 +213,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(CoefficientOfThermalExpansionUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(CoefficientOfThermalExpansionUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -233,34 +226,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(CoefficientOfThermalExpansionUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(CoefficientOfThermalExpansionUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.CoefficientOfThermalExpansion"; - var resourceManager = new ResourceManager(resourceName, typeof(CoefficientOfThermalExpansion).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -827,9 +793,6 @@ public CoefficientOfThermalExpansion ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Compressibility.g.cs b/UnitsNet/GeneratedCode/Quantities/Compressibility.g.cs index 1a4d6a7367..7e4dcba1da 100644 --- a/UnitsNet/GeneratedCode/Quantities/Compressibility.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Compressibility.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,20 +65,18 @@ static Compressibility() Info = new QuantityInfo("Compressibility", new UnitInfo[] { - new UnitInfo(CompressibilityUnit.InverseAtmosphere, "InverseAtmospheres", BaseUnits.Undefined), - new UnitInfo(CompressibilityUnit.InverseBar, "InverseBars", BaseUnits.Undefined), - new UnitInfo(CompressibilityUnit.InverseKilopascal, "InverseKilopascals", BaseUnits.Undefined), - new UnitInfo(CompressibilityUnit.InverseMegapascal, "InverseMegapascals", BaseUnits.Undefined), - new UnitInfo(CompressibilityUnit.InverseMillibar, "InverseMillibars", BaseUnits.Undefined), - new UnitInfo(CompressibilityUnit.InversePascal, "InversePascals", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second)), - new UnitInfo(CompressibilityUnit.InversePoundForcePerSquareInch, "InversePoundsForcePerSquareInch", BaseUnits.Undefined), + new UnitInfo(CompressibilityUnit.InverseAtmosphere, "InverseAtmospheres", BaseUnits.Undefined, "Compressibility"), + new UnitInfo(CompressibilityUnit.InverseBar, "InverseBars", BaseUnits.Undefined, "Compressibility"), + new UnitInfo(CompressibilityUnit.InverseKilopascal, "InverseKilopascals", BaseUnits.Undefined, "Compressibility"), + new UnitInfo(CompressibilityUnit.InverseMegapascal, "InverseMegapascals", BaseUnits.Undefined, "Compressibility"), + new UnitInfo(CompressibilityUnit.InverseMillibar, "InverseMillibars", BaseUnits.Undefined, "Compressibility"), + new UnitInfo(CompressibilityUnit.InversePascal, "InversePascals", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second), "Compressibility"), + new UnitInfo(CompressibilityUnit.InversePoundForcePerSquareInch, "InversePoundsForcePerSquareInch", BaseUnits.Undefined, "Compressibility"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, CompressibilityUnit Unit), List>(); } /// @@ -148,11 +143,6 @@ public Compressibility(double value, UnitSystem unitSystem) /// public static Compressibility AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, CompressibilityUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -255,7 +245,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(CompressibilityUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(CompressibilityUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -265,34 +258,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(CompressibilityUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(CompressibilityUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Compressibility"; - var resourceManager = new ResourceManager(resourceName, typeof(Compressibility).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -907,9 +873,6 @@ public Compressibility ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Density.g.cs b/UnitsNet/GeneratedCode/Quantities/Density.g.cs index 53e20ad924..a830dfa949 100644 --- a/UnitsNet/GeneratedCode/Quantities/Density.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Density.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -71,64 +68,62 @@ static Density() Info = new QuantityInfo("Density", new UnitInfo[] { - new UnitInfo(DensityUnit.CentigramPerDeciliter, "CentigramsPerDeciLiter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.CentigramPerLiter, "CentigramsPerLiter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.CentigramPerMilliliter, "CentigramsPerMilliliter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.DecigramPerDeciliter, "DecigramsPerDeciLiter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.DecigramPerLiter, "DecigramsPerLiter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.DecigramPerMilliliter, "DecigramsPerMilliliter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.GramPerCubicCentimeter, "GramsPerCubicCentimeter", new BaseUnits(length: LengthUnit.Centimeter, mass: MassUnit.Gram)), - new UnitInfo(DensityUnit.GramPerCubicFoot, "GramsPerCubicFoot", new BaseUnits(length: LengthUnit.Foot, mass: MassUnit.Gram)), - new UnitInfo(DensityUnit.GramPerCubicInch, "GramsPerCubicInch", new BaseUnits(length: LengthUnit.Inch, mass: MassUnit.Gram)), - new UnitInfo(DensityUnit.GramPerCubicMeter, "GramsPerCubicMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Gram)), - new UnitInfo(DensityUnit.GramPerCubicMillimeter, "GramsPerCubicMillimeter", new BaseUnits(length: LengthUnit.Millimeter, mass: MassUnit.Gram)), - new UnitInfo(DensityUnit.GramPerDeciliter, "GramsPerDeciLiter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.GramPerLiter, "GramsPerLiter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.GramPerMilliliter, "GramsPerMilliliter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.KilogramPerCubicCentimeter, "KilogramsPerCubicCentimeter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.KilogramPerCubicMeter, "KilogramsPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.KilogramPerCubicMillimeter, "KilogramsPerCubicMillimeter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.KilogramPerLiter, "KilogramsPerLiter", new BaseUnits(length: LengthUnit.Decimeter, mass: MassUnit.Kilogram)), - new UnitInfo(DensityUnit.KilopoundPerCubicFoot, "KilopoundsPerCubicFoot", BaseUnits.Undefined), - new UnitInfo(DensityUnit.KilopoundPerCubicInch, "KilopoundsPerCubicInch", BaseUnits.Undefined), - new UnitInfo(DensityUnit.MicrogramPerCubicMeter, "MicrogramsPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.MicrogramPerDeciliter, "MicrogramsPerDeciLiter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.MicrogramPerLiter, "MicrogramsPerLiter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.MicrogramPerMilliliter, "MicrogramsPerMilliliter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.MilligramPerCubicMeter, "MilligramsPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.MilligramPerDeciliter, "MilligramsPerDeciLiter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.MilligramPerLiter, "MilligramsPerLiter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.MilligramPerMilliliter, "MilligramsPerMilliliter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.NanogramPerDeciliter, "NanogramsPerDeciLiter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.NanogramPerLiter, "NanogramsPerLiter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.NanogramPerMilliliter, "NanogramsPerMilliliter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.PicogramPerDeciliter, "PicogramsPerDeciLiter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.PicogramPerLiter, "PicogramsPerLiter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.PicogramPerMilliliter, "PicogramsPerMilliliter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.PoundPerCubicCentimeter, "PoundsPerCubicCentimeter", new BaseUnits(length: LengthUnit.Centimeter, mass: MassUnit.Pound)), - new UnitInfo(DensityUnit.PoundPerCubicFoot, "PoundsPerCubicFoot", new BaseUnits(length: LengthUnit.Foot, mass: MassUnit.Pound)), - new UnitInfo(DensityUnit.PoundPerCubicInch, "PoundsPerCubicInch", new BaseUnits(length: LengthUnit.Inch, mass: MassUnit.Pound)), - new UnitInfo(DensityUnit.PoundPerCubicMeter, "PoundsPerCubicMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Pound)), - new UnitInfo(DensityUnit.PoundPerCubicMillimeter, "PoundsPerCubicMillimeter", new BaseUnits(length: LengthUnit.Millimeter, mass: MassUnit.Pound)), - new UnitInfo(DensityUnit.PoundPerImperialGallon, "PoundsPerImperialGallon", BaseUnits.Undefined), - new UnitInfo(DensityUnit.PoundPerUSGallon, "PoundsPerUSGallon", BaseUnits.Undefined), - new UnitInfo(DensityUnit.SlugPerCubicCentimeter, "SlugsPerCubicCentimeter", new BaseUnits(length: LengthUnit.Centimeter, mass: MassUnit.Slug)), - new UnitInfo(DensityUnit.SlugPerCubicFoot, "SlugsPerCubicFoot", new BaseUnits(length: LengthUnit.Foot, mass: MassUnit.Slug)), - new UnitInfo(DensityUnit.SlugPerCubicInch, "SlugsPerCubicInch", new BaseUnits(length: LengthUnit.Inch, mass: MassUnit.Slug)), - new UnitInfo(DensityUnit.SlugPerCubicMeter, "SlugsPerCubicMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Slug)), - new UnitInfo(DensityUnit.SlugPerCubicMillimeter, "SlugsPerCubicMillimeter", new BaseUnits(length: LengthUnit.Millimeter, mass: MassUnit.Slug)), - new UnitInfo(DensityUnit.TonnePerCubicCentimeter, "TonnesPerCubicCentimeter", new BaseUnits(length: LengthUnit.Centimeter, mass: MassUnit.Tonne)), - new UnitInfo(DensityUnit.TonnePerCubicFoot, "TonnesPerCubicFoot", new BaseUnits(length: LengthUnit.Foot, mass: MassUnit.Tonne)), - new UnitInfo(DensityUnit.TonnePerCubicInch, "TonnesPerCubicInch", new BaseUnits(length: LengthUnit.Inch, mass: MassUnit.Tonne)), - new UnitInfo(DensityUnit.TonnePerCubicMeter, "TonnesPerCubicMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Tonne)), - new UnitInfo(DensityUnit.TonnePerCubicMillimeter, "TonnesPerCubicMillimeter", new BaseUnits(length: LengthUnit.Millimeter, mass: MassUnit.Tonne)), + new UnitInfo(DensityUnit.CentigramPerDeciliter, "CentigramsPerDeciLiter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.CentigramPerLiter, "CentigramsPerLiter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.CentigramPerMilliliter, "CentigramsPerMilliliter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.DecigramPerDeciliter, "DecigramsPerDeciLiter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.DecigramPerLiter, "DecigramsPerLiter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.DecigramPerMilliliter, "DecigramsPerMilliliter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.GramPerCubicCentimeter, "GramsPerCubicCentimeter", new BaseUnits(length: LengthUnit.Centimeter, mass: MassUnit.Gram), "Density"), + new UnitInfo(DensityUnit.GramPerCubicFoot, "GramsPerCubicFoot", new BaseUnits(length: LengthUnit.Foot, mass: MassUnit.Gram), "Density"), + new UnitInfo(DensityUnit.GramPerCubicInch, "GramsPerCubicInch", new BaseUnits(length: LengthUnit.Inch, mass: MassUnit.Gram), "Density"), + new UnitInfo(DensityUnit.GramPerCubicMeter, "GramsPerCubicMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Gram), "Density"), + new UnitInfo(DensityUnit.GramPerCubicMillimeter, "GramsPerCubicMillimeter", new BaseUnits(length: LengthUnit.Millimeter, mass: MassUnit.Gram), "Density"), + new UnitInfo(DensityUnit.GramPerDeciliter, "GramsPerDeciLiter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.GramPerLiter, "GramsPerLiter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.GramPerMilliliter, "GramsPerMilliliter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.KilogramPerCubicCentimeter, "KilogramsPerCubicCentimeter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.KilogramPerCubicMeter, "KilogramsPerCubicMeter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.KilogramPerCubicMillimeter, "KilogramsPerCubicMillimeter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.KilogramPerLiter, "KilogramsPerLiter", new BaseUnits(length: LengthUnit.Decimeter, mass: MassUnit.Kilogram), "Density"), + new UnitInfo(DensityUnit.KilopoundPerCubicFoot, "KilopoundsPerCubicFoot", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.KilopoundPerCubicInch, "KilopoundsPerCubicInch", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.MicrogramPerCubicMeter, "MicrogramsPerCubicMeter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.MicrogramPerDeciliter, "MicrogramsPerDeciLiter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.MicrogramPerLiter, "MicrogramsPerLiter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.MicrogramPerMilliliter, "MicrogramsPerMilliliter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.MilligramPerCubicMeter, "MilligramsPerCubicMeter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.MilligramPerDeciliter, "MilligramsPerDeciLiter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.MilligramPerLiter, "MilligramsPerLiter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.MilligramPerMilliliter, "MilligramsPerMilliliter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.NanogramPerDeciliter, "NanogramsPerDeciLiter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.NanogramPerLiter, "NanogramsPerLiter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.NanogramPerMilliliter, "NanogramsPerMilliliter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.PicogramPerDeciliter, "PicogramsPerDeciLiter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.PicogramPerLiter, "PicogramsPerLiter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.PicogramPerMilliliter, "PicogramsPerMilliliter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.PoundPerCubicCentimeter, "PoundsPerCubicCentimeter", new BaseUnits(length: LengthUnit.Centimeter, mass: MassUnit.Pound), "Density"), + new UnitInfo(DensityUnit.PoundPerCubicFoot, "PoundsPerCubicFoot", new BaseUnits(length: LengthUnit.Foot, mass: MassUnit.Pound), "Density"), + new UnitInfo(DensityUnit.PoundPerCubicInch, "PoundsPerCubicInch", new BaseUnits(length: LengthUnit.Inch, mass: MassUnit.Pound), "Density"), + new UnitInfo(DensityUnit.PoundPerCubicMeter, "PoundsPerCubicMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Pound), "Density"), + new UnitInfo(DensityUnit.PoundPerCubicMillimeter, "PoundsPerCubicMillimeter", new BaseUnits(length: LengthUnit.Millimeter, mass: MassUnit.Pound), "Density"), + new UnitInfo(DensityUnit.PoundPerImperialGallon, "PoundsPerImperialGallon", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.PoundPerUSGallon, "PoundsPerUSGallon", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.SlugPerCubicCentimeter, "SlugsPerCubicCentimeter", new BaseUnits(length: LengthUnit.Centimeter, mass: MassUnit.Slug), "Density"), + new UnitInfo(DensityUnit.SlugPerCubicFoot, "SlugsPerCubicFoot", new BaseUnits(length: LengthUnit.Foot, mass: MassUnit.Slug), "Density"), + new UnitInfo(DensityUnit.SlugPerCubicInch, "SlugsPerCubicInch", new BaseUnits(length: LengthUnit.Inch, mass: MassUnit.Slug), "Density"), + new UnitInfo(DensityUnit.SlugPerCubicMeter, "SlugsPerCubicMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Slug), "Density"), + new UnitInfo(DensityUnit.SlugPerCubicMillimeter, "SlugsPerCubicMillimeter", new BaseUnits(length: LengthUnit.Millimeter, mass: MassUnit.Slug), "Density"), + new UnitInfo(DensityUnit.TonnePerCubicCentimeter, "TonnesPerCubicCentimeter", new BaseUnits(length: LengthUnit.Centimeter, mass: MassUnit.Tonne), "Density"), + new UnitInfo(DensityUnit.TonnePerCubicFoot, "TonnesPerCubicFoot", new BaseUnits(length: LengthUnit.Foot, mass: MassUnit.Tonne), "Density"), + new UnitInfo(DensityUnit.TonnePerCubicInch, "TonnesPerCubicInch", new BaseUnits(length: LengthUnit.Inch, mass: MassUnit.Tonne), "Density"), + new UnitInfo(DensityUnit.TonnePerCubicMeter, "TonnesPerCubicMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Tonne), "Density"), + new UnitInfo(DensityUnit.TonnePerCubicMillimeter, "TonnesPerCubicMillimeter", new BaseUnits(length: LengthUnit.Millimeter, mass: MassUnit.Tonne), "Density"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, DensityUnit Unit), List>(); } /// @@ -195,11 +190,6 @@ public Density(double value, UnitSystem unitSystem) /// public static Density AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, DensityUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -610,7 +600,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(DensityUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(DensityUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -620,34 +613,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(DensityUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(DensityUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Density"; - var resourceManager = new ResourceManager(resourceName, typeof(Density).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -1790,9 +1756,6 @@ public Density ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Duration.g.cs b/UnitsNet/GeneratedCode/Quantities/Duration.g.cs index 2aa107d703..7c78a2067b 100644 --- a/UnitsNet/GeneratedCode/Quantities/Duration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Duration.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,24 +65,22 @@ static Duration() Info = new QuantityInfo("Duration", new UnitInfo[] { - new UnitInfo(DurationUnit.Day, "Days", new BaseUnits(time: DurationUnit.Day)), - new UnitInfo(DurationUnit.Hour, "Hours", new BaseUnits(time: DurationUnit.Hour)), - new UnitInfo(DurationUnit.JulianYear, "JulianYears", new BaseUnits(time: DurationUnit.JulianYear)), - new UnitInfo(DurationUnit.Microsecond, "Microseconds", BaseUnits.Undefined), - new UnitInfo(DurationUnit.Millisecond, "Milliseconds", BaseUnits.Undefined), - new UnitInfo(DurationUnit.Minute, "Minutes", new BaseUnits(time: DurationUnit.Minute)), - new UnitInfo(DurationUnit.Month30, "Months30", new BaseUnits(time: DurationUnit.Month30)), - new UnitInfo(DurationUnit.Nanosecond, "Nanoseconds", BaseUnits.Undefined), - new UnitInfo(DurationUnit.Second, "Seconds", new BaseUnits(time: DurationUnit.Second)), - new UnitInfo(DurationUnit.Week, "Weeks", new BaseUnits(time: DurationUnit.Week)), - new UnitInfo(DurationUnit.Year365, "Years365", new BaseUnits(time: DurationUnit.Year365)), + new UnitInfo(DurationUnit.Day, "Days", new BaseUnits(time: DurationUnit.Day), "Duration"), + new UnitInfo(DurationUnit.Hour, "Hours", new BaseUnits(time: DurationUnit.Hour), "Duration"), + new UnitInfo(DurationUnit.JulianYear, "JulianYears", new BaseUnits(time: DurationUnit.JulianYear), "Duration"), + new UnitInfo(DurationUnit.Microsecond, "Microseconds", BaseUnits.Undefined, "Duration"), + new UnitInfo(DurationUnit.Millisecond, "Milliseconds", BaseUnits.Undefined, "Duration"), + new UnitInfo(DurationUnit.Minute, "Minutes", new BaseUnits(time: DurationUnit.Minute), "Duration"), + new UnitInfo(DurationUnit.Month30, "Months30", new BaseUnits(time: DurationUnit.Month30), "Duration"), + new UnitInfo(DurationUnit.Nanosecond, "Nanoseconds", BaseUnits.Undefined, "Duration"), + new UnitInfo(DurationUnit.Second, "Seconds", new BaseUnits(time: DurationUnit.Second), "Duration"), + new UnitInfo(DurationUnit.Week, "Weeks", new BaseUnits(time: DurationUnit.Week), "Duration"), + new UnitInfo(DurationUnit.Year365, "Years365", new BaseUnits(time: DurationUnit.Year365), "Duration"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, DurationUnit Unit), List>(); } /// @@ -152,11 +147,6 @@ public Duration(double value, UnitSystem unitSystem) /// public static Duration AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, DurationUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -287,7 +277,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(DurationUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(DurationUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -297,34 +290,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(DurationUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(DurationUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Duration"; - var resourceManager = new ResourceManager(resourceName, typeof(Duration).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -987,9 +953,6 @@ public Duration ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs index 7ab29631e3..2fe2afaf82 100644 --- a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -71,23 +68,21 @@ static DynamicViscosity() Info = new QuantityInfo("DynamicViscosity", new UnitInfo[] { - new UnitInfo(DynamicViscosityUnit.Centipoise, "Centipoise", BaseUnits.Undefined), - new UnitInfo(DynamicViscosityUnit.MicropascalSecond, "MicropascalSeconds", BaseUnits.Undefined), - new UnitInfo(DynamicViscosityUnit.MillipascalSecond, "MillipascalSeconds", BaseUnits.Undefined), - new UnitInfo(DynamicViscosityUnit.NewtonSecondPerMeterSquared, "NewtonSecondsPerMeterSquared", BaseUnits.Undefined), - new UnitInfo(DynamicViscosityUnit.PascalSecond, "PascalSeconds", BaseUnits.Undefined), - new UnitInfo(DynamicViscosityUnit.Poise, "Poise", BaseUnits.Undefined), - new UnitInfo(DynamicViscosityUnit.PoundForceSecondPerSquareFoot, "PoundsForceSecondPerSquareFoot", BaseUnits.Undefined), - new UnitInfo(DynamicViscosityUnit.PoundForceSecondPerSquareInch, "PoundsForceSecondPerSquareInch", BaseUnits.Undefined), - new UnitInfo(DynamicViscosityUnit.PoundPerFootSecond, "PoundsPerFootSecond", BaseUnits.Undefined), - new UnitInfo(DynamicViscosityUnit.Reyn, "Reyns", BaseUnits.Undefined), + new UnitInfo(DynamicViscosityUnit.Centipoise, "Centipoise", BaseUnits.Undefined, "DynamicViscosity"), + new UnitInfo(DynamicViscosityUnit.MicropascalSecond, "MicropascalSeconds", BaseUnits.Undefined, "DynamicViscosity"), + new UnitInfo(DynamicViscosityUnit.MillipascalSecond, "MillipascalSeconds", BaseUnits.Undefined, "DynamicViscosity"), + new UnitInfo(DynamicViscosityUnit.NewtonSecondPerMeterSquared, "NewtonSecondsPerMeterSquared", BaseUnits.Undefined, "DynamicViscosity"), + new UnitInfo(DynamicViscosityUnit.PascalSecond, "PascalSeconds", BaseUnits.Undefined, "DynamicViscosity"), + new UnitInfo(DynamicViscosityUnit.Poise, "Poise", BaseUnits.Undefined, "DynamicViscosity"), + new UnitInfo(DynamicViscosityUnit.PoundForceSecondPerSquareFoot, "PoundsForceSecondPerSquareFoot", BaseUnits.Undefined, "DynamicViscosity"), + new UnitInfo(DynamicViscosityUnit.PoundForceSecondPerSquareInch, "PoundsForceSecondPerSquareInch", BaseUnits.Undefined, "DynamicViscosity"), + new UnitInfo(DynamicViscosityUnit.PoundPerFootSecond, "PoundsPerFootSecond", BaseUnits.Undefined, "DynamicViscosity"), + new UnitInfo(DynamicViscosityUnit.Reyn, "Reyns", BaseUnits.Undefined, "DynamicViscosity"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, DynamicViscosityUnit Unit), List>(); } /// @@ -154,11 +149,6 @@ public DynamicViscosity(double value, UnitSystem unitSystem) /// public static DynamicViscosity AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, DynamicViscosityUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -282,7 +272,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(DynamicViscosityUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(DynamicViscosityUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -292,34 +285,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(DynamicViscosityUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(DynamicViscosityUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.DynamicViscosity"; - var resourceManager = new ResourceManager(resourceName, typeof(DynamicViscosity).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -970,9 +936,6 @@ public DynamicViscosity ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs index 259c5634c6..94911da14a 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,17 +65,15 @@ static ElectricAdmittance() Info = new QuantityInfo("ElectricAdmittance", new UnitInfo[] { - new UnitInfo(ElectricAdmittanceUnit.Microsiemens, "Microsiemens", BaseUnits.Undefined), - new UnitInfo(ElectricAdmittanceUnit.Millisiemens, "Millisiemens", BaseUnits.Undefined), - new UnitInfo(ElectricAdmittanceUnit.Nanosiemens, "Nanosiemens", BaseUnits.Undefined), - new UnitInfo(ElectricAdmittanceUnit.Siemens, "Siemens", BaseUnits.Undefined), + new UnitInfo(ElectricAdmittanceUnit.Microsiemens, "Microsiemens", BaseUnits.Undefined, "ElectricAdmittance"), + new UnitInfo(ElectricAdmittanceUnit.Millisiemens, "Millisiemens", BaseUnits.Undefined, "ElectricAdmittance"), + new UnitInfo(ElectricAdmittanceUnit.Nanosiemens, "Nanosiemens", BaseUnits.Undefined, "ElectricAdmittance"), + new UnitInfo(ElectricAdmittanceUnit.Siemens, "Siemens", BaseUnits.Undefined, "ElectricAdmittance"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ElectricAdmittanceUnit Unit), List>(); } /// @@ -145,11 +140,6 @@ public ElectricAdmittance(double value, UnitSystem unitSystem) /// public static ElectricAdmittance AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, ElectricAdmittanceUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -231,7 +221,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ElectricAdmittanceUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(ElectricAdmittanceUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -241,34 +234,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricAdmittanceUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(ElectricAdmittanceUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricAdmittance"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricAdmittance).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -847,9 +813,6 @@ public ElectricAdmittance ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs index cd3ded38f5..400e59fa16 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -71,24 +68,22 @@ static ElectricCharge() Info = new QuantityInfo("ElectricCharge", new UnitInfo[] { - new UnitInfo(ElectricChargeUnit.AmpereHour, "AmpereHours", BaseUnits.Undefined), - new UnitInfo(ElectricChargeUnit.Coulomb, "Coulombs", BaseUnits.Undefined), - new UnitInfo(ElectricChargeUnit.KiloampereHour, "KiloampereHours", BaseUnits.Undefined), - new UnitInfo(ElectricChargeUnit.Kilocoulomb, "Kilocoulombs", BaseUnits.Undefined), - new UnitInfo(ElectricChargeUnit.MegaampereHour, "MegaampereHours", BaseUnits.Undefined), - new UnitInfo(ElectricChargeUnit.Megacoulomb, "Megacoulombs", BaseUnits.Undefined), - new UnitInfo(ElectricChargeUnit.Microcoulomb, "Microcoulombs", BaseUnits.Undefined), - new UnitInfo(ElectricChargeUnit.MilliampereHour, "MilliampereHours", BaseUnits.Undefined), - new UnitInfo(ElectricChargeUnit.Millicoulomb, "Millicoulombs", BaseUnits.Undefined), - new UnitInfo(ElectricChargeUnit.Nanocoulomb, "Nanocoulombs", BaseUnits.Undefined), - new UnitInfo(ElectricChargeUnit.Picocoulomb, "Picocoulombs", BaseUnits.Undefined), + new UnitInfo(ElectricChargeUnit.AmpereHour, "AmpereHours", BaseUnits.Undefined, "ElectricCharge"), + new UnitInfo(ElectricChargeUnit.Coulomb, "Coulombs", BaseUnits.Undefined, "ElectricCharge"), + new UnitInfo(ElectricChargeUnit.KiloampereHour, "KiloampereHours", BaseUnits.Undefined, "ElectricCharge"), + new UnitInfo(ElectricChargeUnit.Kilocoulomb, "Kilocoulombs", BaseUnits.Undefined, "ElectricCharge"), + new UnitInfo(ElectricChargeUnit.MegaampereHour, "MegaampereHours", BaseUnits.Undefined, "ElectricCharge"), + new UnitInfo(ElectricChargeUnit.Megacoulomb, "Megacoulombs", BaseUnits.Undefined, "ElectricCharge"), + new UnitInfo(ElectricChargeUnit.Microcoulomb, "Microcoulombs", BaseUnits.Undefined, "ElectricCharge"), + new UnitInfo(ElectricChargeUnit.MilliampereHour, "MilliampereHours", BaseUnits.Undefined, "ElectricCharge"), + new UnitInfo(ElectricChargeUnit.Millicoulomb, "Millicoulombs", BaseUnits.Undefined, "ElectricCharge"), + new UnitInfo(ElectricChargeUnit.Nanocoulomb, "Nanocoulombs", BaseUnits.Undefined, "ElectricCharge"), + new UnitInfo(ElectricChargeUnit.Picocoulomb, "Picocoulombs", BaseUnits.Undefined, "ElectricCharge"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ElectricChargeUnit Unit), List>(); } /// @@ -155,11 +150,6 @@ public ElectricCharge(double value, UnitSystem unitSystem) /// public static ElectricCharge AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, ElectricChargeUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -290,7 +280,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ElectricChargeUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(ElectricChargeUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -300,34 +293,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricChargeUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(ElectricChargeUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricCharge"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricCharge).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -990,9 +956,6 @@ public ElectricCharge ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs index 85f182a5f2..467d8b2133 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -71,14 +68,12 @@ static ElectricChargeDensity() Info = new QuantityInfo("ElectricChargeDensity", new UnitInfo[] { - new UnitInfo(ElectricChargeDensityUnit.CoulombPerCubicMeter, "CoulombsPerCubicMeter", new BaseUnits(length: LengthUnit.Meter, time: DurationUnit.Second, current: ElectricCurrentUnit.Ampere)), + new UnitInfo(ElectricChargeDensityUnit.CoulombPerCubicMeter, "CoulombsPerCubicMeter", new BaseUnits(length: LengthUnit.Meter, time: DurationUnit.Second, current: ElectricCurrentUnit.Ampere), "ElectricChargeDensity"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ElectricChargeDensityUnit Unit), List>(); } /// @@ -145,11 +140,6 @@ public ElectricChargeDensity(double value, UnitSystem unitSystem) /// public static ElectricChargeDensity AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, ElectricChargeDensityUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -210,7 +200,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ElectricChargeDensityUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(ElectricChargeDensityUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -220,34 +213,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricChargeDensityUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(ElectricChargeDensityUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricChargeDensity"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricChargeDensity).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -790,9 +756,6 @@ public ElectricChargeDensity ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs index d8de87cd91..cfff009563 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -71,18 +68,16 @@ static ElectricConductance() Info = new QuantityInfo("ElectricConductance", new UnitInfo[] { - new UnitInfo(ElectricConductanceUnit.Kilosiemens, "Kilosiemens", BaseUnits.Undefined), - new UnitInfo(ElectricConductanceUnit.Microsiemens, "Microsiemens", BaseUnits.Undefined), - new UnitInfo(ElectricConductanceUnit.Millisiemens, "Millisiemens", BaseUnits.Undefined), - new UnitInfo(ElectricConductanceUnit.Nanosiemens, "Nanosiemens", BaseUnits.Undefined), - new UnitInfo(ElectricConductanceUnit.Siemens, "Siemens", BaseUnits.Undefined), + new UnitInfo(ElectricConductanceUnit.Kilosiemens, "Kilosiemens", BaseUnits.Undefined, "ElectricConductance"), + new UnitInfo(ElectricConductanceUnit.Microsiemens, "Microsiemens", BaseUnits.Undefined, "ElectricConductance"), + new UnitInfo(ElectricConductanceUnit.Millisiemens, "Millisiemens", BaseUnits.Undefined, "ElectricConductance"), + new UnitInfo(ElectricConductanceUnit.Nanosiemens, "Nanosiemens", BaseUnits.Undefined, "ElectricConductance"), + new UnitInfo(ElectricConductanceUnit.Siemens, "Siemens", BaseUnits.Undefined, "ElectricConductance"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ElectricConductanceUnit Unit), List>(); } /// @@ -149,11 +144,6 @@ public ElectricConductance(double value, UnitSystem unitSystem) /// public static ElectricConductance AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, ElectricConductanceUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -242,7 +232,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ElectricConductanceUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(ElectricConductanceUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -252,34 +245,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricConductanceUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(ElectricConductanceUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricConductance"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricConductance).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -870,9 +836,6 @@ public ElectricConductance ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs index fc7c970cab..df5bb727b5 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -71,19 +68,17 @@ static ElectricConductivity() Info = new QuantityInfo("ElectricConductivity", new UnitInfo[] { - new UnitInfo(ElectricConductivityUnit.MicrosiemensPerCentimeter, "MicrosiemensPerCentimeter", BaseUnits.Undefined), - new UnitInfo(ElectricConductivityUnit.MillisiemensPerCentimeter, "MillisiemensPerCentimeter", BaseUnits.Undefined), - new UnitInfo(ElectricConductivityUnit.SiemensPerCentimeter, "SiemensPerCentimeter", BaseUnits.Undefined), - new UnitInfo(ElectricConductivityUnit.SiemensPerFoot, "SiemensPerFoot", BaseUnits.Undefined), - new UnitInfo(ElectricConductivityUnit.SiemensPerInch, "SiemensPerInch", BaseUnits.Undefined), - new UnitInfo(ElectricConductivityUnit.SiemensPerMeter, "SiemensPerMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second, current: ElectricCurrentUnit.Ampere)), + new UnitInfo(ElectricConductivityUnit.MicrosiemensPerCentimeter, "MicrosiemensPerCentimeter", BaseUnits.Undefined, "ElectricConductivity"), + new UnitInfo(ElectricConductivityUnit.MillisiemensPerCentimeter, "MillisiemensPerCentimeter", BaseUnits.Undefined, "ElectricConductivity"), + new UnitInfo(ElectricConductivityUnit.SiemensPerCentimeter, "SiemensPerCentimeter", BaseUnits.Undefined, "ElectricConductivity"), + new UnitInfo(ElectricConductivityUnit.SiemensPerFoot, "SiemensPerFoot", BaseUnits.Undefined, "ElectricConductivity"), + new UnitInfo(ElectricConductivityUnit.SiemensPerInch, "SiemensPerInch", BaseUnits.Undefined, "ElectricConductivity"), + new UnitInfo(ElectricConductivityUnit.SiemensPerMeter, "SiemensPerMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second, current: ElectricCurrentUnit.Ampere), "ElectricConductivity"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ElectricConductivityUnit Unit), List>(); } /// @@ -150,11 +145,6 @@ public ElectricConductivity(double value, UnitSystem unitSystem) /// public static ElectricConductivity AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, ElectricConductivityUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -250,7 +240,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ElectricConductivityUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(ElectricConductivityUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -260,34 +253,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricConductivityUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(ElectricConductivityUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricConductivity"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricConductivity).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -890,9 +856,6 @@ public ElectricConductivity ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs index 2dfd0975a3..95e18d8178 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,22 +65,20 @@ static ElectricCurrent() Info = new QuantityInfo("ElectricCurrent", new UnitInfo[] { - new UnitInfo(ElectricCurrentUnit.Ampere, "Amperes", new BaseUnits(current: ElectricCurrentUnit.Ampere)), - new UnitInfo(ElectricCurrentUnit.Centiampere, "Centiamperes", BaseUnits.Undefined), - new UnitInfo(ElectricCurrentUnit.Femtoampere, "Femtoamperes", BaseUnits.Undefined), - new UnitInfo(ElectricCurrentUnit.Kiloampere, "Kiloamperes", BaseUnits.Undefined), - new UnitInfo(ElectricCurrentUnit.Megaampere, "Megaamperes", BaseUnits.Undefined), - new UnitInfo(ElectricCurrentUnit.Microampere, "Microamperes", BaseUnits.Undefined), - new UnitInfo(ElectricCurrentUnit.Milliampere, "Milliamperes", BaseUnits.Undefined), - new UnitInfo(ElectricCurrentUnit.Nanoampere, "Nanoamperes", BaseUnits.Undefined), - new UnitInfo(ElectricCurrentUnit.Picoampere, "Picoamperes", BaseUnits.Undefined), + new UnitInfo(ElectricCurrentUnit.Ampere, "Amperes", new BaseUnits(current: ElectricCurrentUnit.Ampere), "ElectricCurrent"), + new UnitInfo(ElectricCurrentUnit.Centiampere, "Centiamperes", BaseUnits.Undefined, "ElectricCurrent"), + new UnitInfo(ElectricCurrentUnit.Femtoampere, "Femtoamperes", BaseUnits.Undefined, "ElectricCurrent"), + new UnitInfo(ElectricCurrentUnit.Kiloampere, "Kiloamperes", BaseUnits.Undefined, "ElectricCurrent"), + new UnitInfo(ElectricCurrentUnit.Megaampere, "Megaamperes", BaseUnits.Undefined, "ElectricCurrent"), + new UnitInfo(ElectricCurrentUnit.Microampere, "Microamperes", BaseUnits.Undefined, "ElectricCurrent"), + new UnitInfo(ElectricCurrentUnit.Milliampere, "Milliamperes", BaseUnits.Undefined, "ElectricCurrent"), + new UnitInfo(ElectricCurrentUnit.Nanoampere, "Nanoamperes", BaseUnits.Undefined, "ElectricCurrent"), + new UnitInfo(ElectricCurrentUnit.Picoampere, "Picoamperes", BaseUnits.Undefined, "ElectricCurrent"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ElectricCurrentUnit Unit), List>(); } /// @@ -150,11 +145,6 @@ public ElectricCurrent(double value, UnitSystem unitSystem) /// public static ElectricCurrent AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, ElectricCurrentUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -271,7 +261,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ElectricCurrentUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(ElectricCurrentUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -281,34 +274,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricCurrentUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(ElectricCurrentUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricCurrent"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricCurrent).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -947,9 +913,6 @@ public ElectricCurrent ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs index 9837401ebc..1f6bceeae6 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -71,16 +68,14 @@ static ElectricCurrentDensity() Info = new QuantityInfo("ElectricCurrentDensity", new UnitInfo[] { - new UnitInfo(ElectricCurrentDensityUnit.AmperePerSquareFoot, "AmperesPerSquareFoot", new BaseUnits(length: LengthUnit.Foot, current: ElectricCurrentUnit.Ampere)), - new UnitInfo(ElectricCurrentDensityUnit.AmperePerSquareInch, "AmperesPerSquareInch", new BaseUnits(length: LengthUnit.Inch, current: ElectricCurrentUnit.Ampere)), - new UnitInfo(ElectricCurrentDensityUnit.AmperePerSquareMeter, "AmperesPerSquareMeter", new BaseUnits(length: LengthUnit.Meter, current: ElectricCurrentUnit.Ampere)), + new UnitInfo(ElectricCurrentDensityUnit.AmperePerSquareFoot, "AmperesPerSquareFoot", new BaseUnits(length: LengthUnit.Foot, current: ElectricCurrentUnit.Ampere), "ElectricCurrentDensity"), + new UnitInfo(ElectricCurrentDensityUnit.AmperePerSquareInch, "AmperesPerSquareInch", new BaseUnits(length: LengthUnit.Inch, current: ElectricCurrentUnit.Ampere), "ElectricCurrentDensity"), + new UnitInfo(ElectricCurrentDensityUnit.AmperePerSquareMeter, "AmperesPerSquareMeter", new BaseUnits(length: LengthUnit.Meter, current: ElectricCurrentUnit.Ampere), "ElectricCurrentDensity"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ElectricCurrentDensityUnit Unit), List>(); } /// @@ -147,11 +142,6 @@ public ElectricCurrentDensity(double value, UnitSystem unitSystem) /// public static ElectricCurrentDensity AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, ElectricCurrentDensityUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -226,7 +216,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ElectricCurrentDensityUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(ElectricCurrentDensityUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -236,34 +229,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricCurrentDensityUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(ElectricCurrentDensityUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricCurrentDensity"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricCurrentDensity).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -830,9 +796,6 @@ public ElectricCurrentDensity ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs index f966ce326d..13e23389ba 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,17 +65,15 @@ static ElectricCurrentGradient() Info = new QuantityInfo("ElectricCurrentGradient", new UnitInfo[] { - new UnitInfo(ElectricCurrentGradientUnit.AmperePerMicrosecond, "AmperesPerMicrosecond", new BaseUnits(time: DurationUnit.Microsecond, current: ElectricCurrentUnit.Ampere)), - new UnitInfo(ElectricCurrentGradientUnit.AmperePerMillisecond, "AmperesPerMillisecond", new BaseUnits(time: DurationUnit.Millisecond, current: ElectricCurrentUnit.Ampere)), - new UnitInfo(ElectricCurrentGradientUnit.AmperePerNanosecond, "AmperesPerNanosecond", new BaseUnits(time: DurationUnit.Nanosecond, current: ElectricCurrentUnit.Ampere)), - new UnitInfo(ElectricCurrentGradientUnit.AmperePerSecond, "AmperesPerSecond", BaseUnits.Undefined), + new UnitInfo(ElectricCurrentGradientUnit.AmperePerMicrosecond, "AmperesPerMicrosecond", new BaseUnits(time: DurationUnit.Microsecond, current: ElectricCurrentUnit.Ampere), "ElectricCurrentGradient"), + new UnitInfo(ElectricCurrentGradientUnit.AmperePerMillisecond, "AmperesPerMillisecond", new BaseUnits(time: DurationUnit.Millisecond, current: ElectricCurrentUnit.Ampere), "ElectricCurrentGradient"), + new UnitInfo(ElectricCurrentGradientUnit.AmperePerNanosecond, "AmperesPerNanosecond", new BaseUnits(time: DurationUnit.Nanosecond, current: ElectricCurrentUnit.Ampere), "ElectricCurrentGradient"), + new UnitInfo(ElectricCurrentGradientUnit.AmperePerSecond, "AmperesPerSecond", BaseUnits.Undefined, "ElectricCurrentGradient"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ElectricCurrentGradientUnit Unit), List>(); } /// @@ -145,11 +140,6 @@ public ElectricCurrentGradient(double value, UnitSystem unitSystem) /// public static ElectricCurrentGradient AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, ElectricCurrentGradientUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -231,7 +221,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ElectricCurrentGradientUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(ElectricCurrentGradientUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -241,34 +234,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricCurrentGradientUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(ElectricCurrentGradientUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricCurrentGradient"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricCurrentGradient).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -847,9 +813,6 @@ public ElectricCurrentGradient ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs index 61e051e33c..5f75c95e4e 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -71,14 +68,12 @@ static ElectricField() Info = new QuantityInfo("ElectricField", new UnitInfo[] { - new UnitInfo(ElectricFieldUnit.VoltPerMeter, "VoltsPerMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second, current: ElectricCurrentUnit.Ampere)), + new UnitInfo(ElectricFieldUnit.VoltPerMeter, "VoltsPerMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second, current: ElectricCurrentUnit.Ampere), "ElectricField"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ElectricFieldUnit Unit), List>(); } /// @@ -145,11 +140,6 @@ public ElectricField(double value, UnitSystem unitSystem) /// public static ElectricField AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, ElectricFieldUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -210,7 +200,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ElectricFieldUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(ElectricFieldUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -220,34 +213,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricFieldUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(ElectricFieldUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricField"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricField).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -790,9 +756,6 @@ public ElectricField ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs index 289d63cfff..642e37eea4 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -71,18 +68,16 @@ static ElectricInductance() Info = new QuantityInfo("ElectricInductance", new UnitInfo[] { - new UnitInfo(ElectricInductanceUnit.Henry, "Henries", BaseUnits.Undefined), - new UnitInfo(ElectricInductanceUnit.Microhenry, "Microhenries", BaseUnits.Undefined), - new UnitInfo(ElectricInductanceUnit.Millihenry, "Millihenries", BaseUnits.Undefined), - new UnitInfo(ElectricInductanceUnit.Nanohenry, "Nanohenries", BaseUnits.Undefined), - new UnitInfo(ElectricInductanceUnit.Picohenry, "Picohenries", BaseUnits.Undefined), + new UnitInfo(ElectricInductanceUnit.Henry, "Henries", BaseUnits.Undefined, "ElectricInductance"), + new UnitInfo(ElectricInductanceUnit.Microhenry, "Microhenries", BaseUnits.Undefined, "ElectricInductance"), + new UnitInfo(ElectricInductanceUnit.Millihenry, "Millihenries", BaseUnits.Undefined, "ElectricInductance"), + new UnitInfo(ElectricInductanceUnit.Nanohenry, "Nanohenries", BaseUnits.Undefined, "ElectricInductance"), + new UnitInfo(ElectricInductanceUnit.Picohenry, "Picohenries", BaseUnits.Undefined, "ElectricInductance"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ElectricInductanceUnit Unit), List>(); } /// @@ -149,11 +144,6 @@ public ElectricInductance(double value, UnitSystem unitSystem) /// public static ElectricInductance AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, ElectricInductanceUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -242,7 +232,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ElectricInductanceUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(ElectricInductanceUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -252,34 +245,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricInductanceUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(ElectricInductanceUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricInductance"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricInductance).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -870,9 +836,6 @@ public ElectricInductance ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs index 36af1eb44f..becc36f65d 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,19 +65,17 @@ static ElectricPotential() Info = new QuantityInfo("ElectricPotential", new UnitInfo[] { - new UnitInfo(ElectricPotentialUnit.Kilovolt, "Kilovolts", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialUnit.Megavolt, "Megavolts", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialUnit.Microvolt, "Microvolts", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialUnit.Millivolt, "Millivolts", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialUnit.Nanovolt, "Nanovolts", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialUnit.Volt, "Volts", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second, current: ElectricCurrentUnit.Ampere)), + new UnitInfo(ElectricPotentialUnit.Kilovolt, "Kilovolts", BaseUnits.Undefined, "ElectricPotential"), + new UnitInfo(ElectricPotentialUnit.Megavolt, "Megavolts", BaseUnits.Undefined, "ElectricPotential"), + new UnitInfo(ElectricPotentialUnit.Microvolt, "Microvolts", BaseUnits.Undefined, "ElectricPotential"), + new UnitInfo(ElectricPotentialUnit.Millivolt, "Millivolts", BaseUnits.Undefined, "ElectricPotential"), + new UnitInfo(ElectricPotentialUnit.Nanovolt, "Nanovolts", BaseUnits.Undefined, "ElectricPotential"), + new UnitInfo(ElectricPotentialUnit.Volt, "Volts", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second, current: ElectricCurrentUnit.Ampere), "ElectricPotential"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ElectricPotentialUnit Unit), List>(); } /// @@ -147,11 +142,6 @@ public ElectricPotential(double value, UnitSystem unitSystem) /// public static ElectricPotential AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, ElectricPotentialUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -247,7 +237,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ElectricPotentialUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(ElectricPotentialUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -257,34 +250,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricPotentialUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(ElectricPotentialUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricPotential"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricPotential).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -887,9 +853,6 @@ public ElectricPotential ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs index da1c56dd58..0f29dd4f22 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,18 +65,16 @@ static ElectricPotentialAc() Info = new QuantityInfo("ElectricPotentialAc", new UnitInfo[] { - new UnitInfo(ElectricPotentialAcUnit.KilovoltAc, "KilovoltsAc", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialAcUnit.MegavoltAc, "MegavoltsAc", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialAcUnit.MicrovoltAc, "MicrovoltsAc", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialAcUnit.MillivoltAc, "MillivoltsAc", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialAcUnit.VoltAc, "VoltsAc", BaseUnits.Undefined), + new UnitInfo(ElectricPotentialAcUnit.KilovoltAc, "KilovoltsAc", BaseUnits.Undefined, "ElectricPotentialAc"), + new UnitInfo(ElectricPotentialAcUnit.MegavoltAc, "MegavoltsAc", BaseUnits.Undefined, "ElectricPotentialAc"), + new UnitInfo(ElectricPotentialAcUnit.MicrovoltAc, "MicrovoltsAc", BaseUnits.Undefined, "ElectricPotentialAc"), + new UnitInfo(ElectricPotentialAcUnit.MillivoltAc, "MillivoltsAc", BaseUnits.Undefined, "ElectricPotentialAc"), + new UnitInfo(ElectricPotentialAcUnit.VoltAc, "VoltsAc", BaseUnits.Undefined, "ElectricPotentialAc"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ElectricPotentialAcUnit Unit), List>(); } /// @@ -146,11 +141,6 @@ public ElectricPotentialAc(double value, UnitSystem unitSystem) /// public static ElectricPotentialAc AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, ElectricPotentialAcUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -239,7 +229,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ElectricPotentialAcUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(ElectricPotentialAcUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -249,34 +242,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricPotentialAcUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(ElectricPotentialAcUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricPotentialAc"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricPotentialAc).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -867,9 +833,6 @@ public ElectricPotentialAc ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs index a66a3f3d4c..dc00598d1d 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,33 +65,31 @@ static ElectricPotentialChangeRate() Info = new QuantityInfo("ElectricPotentialChangeRate", new UnitInfo[] { - new UnitInfo(ElectricPotentialChangeRateUnit.KilovoltPerHour, "KilovoltsPerHours", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialChangeRateUnit.KilovoltPerMicrosecond, "KilovoltsPerMicroseconds", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialChangeRateUnit.KilovoltPerMinute, "KilovoltsPerMinutes", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialChangeRateUnit.KilovoltPerSecond, "KilovoltsPerSeconds", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialChangeRateUnit.MegavoltPerHour, "MegavoltsPerHours", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialChangeRateUnit.MegavoltPerMicrosecond, "MegavoltsPerMicroseconds", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialChangeRateUnit.MegavoltPerMinute, "MegavoltsPerMinutes", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialChangeRateUnit.MegavoltPerSecond, "MegavoltsPerSeconds", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialChangeRateUnit.MicrovoltPerHour, "MicrovoltsPerHours", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialChangeRateUnit.MicrovoltPerMicrosecond, "MicrovoltsPerMicroseconds", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialChangeRateUnit.MicrovoltPerMinute, "MicrovoltsPerMinutes", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialChangeRateUnit.MicrovoltPerSecond, "MicrovoltsPerSeconds", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialChangeRateUnit.MillivoltPerHour, "MillivoltsPerHours", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialChangeRateUnit.MillivoltPerMicrosecond, "MillivoltsPerMicroseconds", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialChangeRateUnit.MillivoltPerMinute, "MillivoltsPerMinutes", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialChangeRateUnit.MillivoltPerSecond, "MillivoltsPerSeconds", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialChangeRateUnit.VoltPerHour, "VoltsPerHours", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Hour, current: ElectricCurrentUnit.Ampere)), - new UnitInfo(ElectricPotentialChangeRateUnit.VoltPerMicrosecond, "VoltsPerMicroseconds", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Microsecond, current: ElectricCurrentUnit.Ampere)), - new UnitInfo(ElectricPotentialChangeRateUnit.VoltPerMinute, "VoltsPerMinutes", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Minute, current: ElectricCurrentUnit.Ampere)), - new UnitInfo(ElectricPotentialChangeRateUnit.VoltPerSecond, "VoltsPerSeconds", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second, current: ElectricCurrentUnit.Ampere)), + new UnitInfo(ElectricPotentialChangeRateUnit.KilovoltPerHour, "KilovoltsPerHours", BaseUnits.Undefined, "ElectricPotentialChangeRate"), + new UnitInfo(ElectricPotentialChangeRateUnit.KilovoltPerMicrosecond, "KilovoltsPerMicroseconds", BaseUnits.Undefined, "ElectricPotentialChangeRate"), + new UnitInfo(ElectricPotentialChangeRateUnit.KilovoltPerMinute, "KilovoltsPerMinutes", BaseUnits.Undefined, "ElectricPotentialChangeRate"), + new UnitInfo(ElectricPotentialChangeRateUnit.KilovoltPerSecond, "KilovoltsPerSeconds", BaseUnits.Undefined, "ElectricPotentialChangeRate"), + new UnitInfo(ElectricPotentialChangeRateUnit.MegavoltPerHour, "MegavoltsPerHours", BaseUnits.Undefined, "ElectricPotentialChangeRate"), + new UnitInfo(ElectricPotentialChangeRateUnit.MegavoltPerMicrosecond, "MegavoltsPerMicroseconds", BaseUnits.Undefined, "ElectricPotentialChangeRate"), + new UnitInfo(ElectricPotentialChangeRateUnit.MegavoltPerMinute, "MegavoltsPerMinutes", BaseUnits.Undefined, "ElectricPotentialChangeRate"), + new UnitInfo(ElectricPotentialChangeRateUnit.MegavoltPerSecond, "MegavoltsPerSeconds", BaseUnits.Undefined, "ElectricPotentialChangeRate"), + new UnitInfo(ElectricPotentialChangeRateUnit.MicrovoltPerHour, "MicrovoltsPerHours", BaseUnits.Undefined, "ElectricPotentialChangeRate"), + new UnitInfo(ElectricPotentialChangeRateUnit.MicrovoltPerMicrosecond, "MicrovoltsPerMicroseconds", BaseUnits.Undefined, "ElectricPotentialChangeRate"), + new UnitInfo(ElectricPotentialChangeRateUnit.MicrovoltPerMinute, "MicrovoltsPerMinutes", BaseUnits.Undefined, "ElectricPotentialChangeRate"), + new UnitInfo(ElectricPotentialChangeRateUnit.MicrovoltPerSecond, "MicrovoltsPerSeconds", BaseUnits.Undefined, "ElectricPotentialChangeRate"), + new UnitInfo(ElectricPotentialChangeRateUnit.MillivoltPerHour, "MillivoltsPerHours", BaseUnits.Undefined, "ElectricPotentialChangeRate"), + new UnitInfo(ElectricPotentialChangeRateUnit.MillivoltPerMicrosecond, "MillivoltsPerMicroseconds", BaseUnits.Undefined, "ElectricPotentialChangeRate"), + new UnitInfo(ElectricPotentialChangeRateUnit.MillivoltPerMinute, "MillivoltsPerMinutes", BaseUnits.Undefined, "ElectricPotentialChangeRate"), + new UnitInfo(ElectricPotentialChangeRateUnit.MillivoltPerSecond, "MillivoltsPerSeconds", BaseUnits.Undefined, "ElectricPotentialChangeRate"), + new UnitInfo(ElectricPotentialChangeRateUnit.VoltPerHour, "VoltsPerHours", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Hour, current: ElectricCurrentUnit.Ampere), "ElectricPotentialChangeRate"), + new UnitInfo(ElectricPotentialChangeRateUnit.VoltPerMicrosecond, "VoltsPerMicroseconds", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Microsecond, current: ElectricCurrentUnit.Ampere), "ElectricPotentialChangeRate"), + new UnitInfo(ElectricPotentialChangeRateUnit.VoltPerMinute, "VoltsPerMinutes", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Minute, current: ElectricCurrentUnit.Ampere), "ElectricPotentialChangeRate"), + new UnitInfo(ElectricPotentialChangeRateUnit.VoltPerSecond, "VoltsPerSeconds", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second, current: ElectricCurrentUnit.Ampere), "ElectricPotentialChangeRate"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ElectricPotentialChangeRateUnit Unit), List>(); } /// @@ -161,11 +156,6 @@ public ElectricPotentialChangeRate(double value, UnitSystem unitSystem) /// public static ElectricPotentialChangeRate AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, ElectricPotentialChangeRateUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -359,7 +349,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ElectricPotentialChangeRateUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(ElectricPotentialChangeRateUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -369,34 +362,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricPotentialChangeRateUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(ElectricPotentialChangeRateUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricPotentialChangeRate"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricPotentialChangeRate).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -1167,9 +1133,6 @@ public ElectricPotentialChangeRate ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs index b77d9b2d28..6a9076978a 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,18 +65,16 @@ static ElectricPotentialDc() Info = new QuantityInfo("ElectricPotentialDc", new UnitInfo[] { - new UnitInfo(ElectricPotentialDcUnit.KilovoltDc, "KilovoltsDc", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialDcUnit.MegavoltDc, "MegavoltsDc", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialDcUnit.MicrovoltDc, "MicrovoltsDc", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialDcUnit.MillivoltDc, "MillivoltsDc", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialDcUnit.VoltDc, "VoltsDc", BaseUnits.Undefined), + new UnitInfo(ElectricPotentialDcUnit.KilovoltDc, "KilovoltsDc", BaseUnits.Undefined, "ElectricPotentialDc"), + new UnitInfo(ElectricPotentialDcUnit.MegavoltDc, "MegavoltsDc", BaseUnits.Undefined, "ElectricPotentialDc"), + new UnitInfo(ElectricPotentialDcUnit.MicrovoltDc, "MicrovoltsDc", BaseUnits.Undefined, "ElectricPotentialDc"), + new UnitInfo(ElectricPotentialDcUnit.MillivoltDc, "MillivoltsDc", BaseUnits.Undefined, "ElectricPotentialDc"), + new UnitInfo(ElectricPotentialDcUnit.VoltDc, "VoltsDc", BaseUnits.Undefined, "ElectricPotentialDc"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ElectricPotentialDcUnit Unit), List>(); } /// @@ -146,11 +141,6 @@ public ElectricPotentialDc(double value, UnitSystem unitSystem) /// public static ElectricPotentialDc AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, ElectricPotentialDcUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -239,7 +229,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ElectricPotentialDcUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(ElectricPotentialDcUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -249,34 +242,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricPotentialDcUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(ElectricPotentialDcUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricPotentialDc"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricPotentialDc).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -867,9 +833,6 @@ public ElectricPotentialDc ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs index 7ed1f5cad7..30ac396e54 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,20 +65,18 @@ static ElectricResistance() Info = new QuantityInfo("ElectricResistance", new UnitInfo[] { - new UnitInfo(ElectricResistanceUnit.Gigaohm, "Gigaohms", BaseUnits.Undefined), - new UnitInfo(ElectricResistanceUnit.Kiloohm, "Kiloohms", BaseUnits.Undefined), - new UnitInfo(ElectricResistanceUnit.Megaohm, "Megaohms", BaseUnits.Undefined), - new UnitInfo(ElectricResistanceUnit.Microohm, "Microohms", BaseUnits.Undefined), - new UnitInfo(ElectricResistanceUnit.Milliohm, "Milliohms", BaseUnits.Undefined), - new UnitInfo(ElectricResistanceUnit.Ohm, "Ohms", BaseUnits.Undefined), - new UnitInfo(ElectricResistanceUnit.Teraohm, "Teraohms", BaseUnits.Undefined), + new UnitInfo(ElectricResistanceUnit.Gigaohm, "Gigaohms", BaseUnits.Undefined, "ElectricResistance"), + new UnitInfo(ElectricResistanceUnit.Kiloohm, "Kiloohms", BaseUnits.Undefined, "ElectricResistance"), + new UnitInfo(ElectricResistanceUnit.Megaohm, "Megaohms", BaseUnits.Undefined, "ElectricResistance"), + new UnitInfo(ElectricResistanceUnit.Microohm, "Microohms", BaseUnits.Undefined, "ElectricResistance"), + new UnitInfo(ElectricResistanceUnit.Milliohm, "Milliohms", BaseUnits.Undefined, "ElectricResistance"), + new UnitInfo(ElectricResistanceUnit.Ohm, "Ohms", BaseUnits.Undefined, "ElectricResistance"), + new UnitInfo(ElectricResistanceUnit.Teraohm, "Teraohms", BaseUnits.Undefined, "ElectricResistance"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ElectricResistanceUnit Unit), List>(); } /// @@ -148,11 +143,6 @@ public ElectricResistance(double value, UnitSystem unitSystem) /// public static ElectricResistance AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, ElectricResistanceUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -255,7 +245,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ElectricResistanceUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(ElectricResistanceUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -265,34 +258,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricResistanceUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(ElectricResistanceUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricResistance"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricResistance).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -907,9 +873,6 @@ public ElectricResistance ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs index fe6308080d..3eefd99ccf 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -71,27 +68,25 @@ static ElectricResistivity() Info = new QuantityInfo("ElectricResistivity", new UnitInfo[] { - new UnitInfo(ElectricResistivityUnit.KiloohmCentimeter, "KiloohmsCentimeter", BaseUnits.Undefined), - new UnitInfo(ElectricResistivityUnit.KiloohmMeter, "KiloohmMeters", BaseUnits.Undefined), - new UnitInfo(ElectricResistivityUnit.MegaohmCentimeter, "MegaohmsCentimeter", BaseUnits.Undefined), - new UnitInfo(ElectricResistivityUnit.MegaohmMeter, "MegaohmMeters", BaseUnits.Undefined), - new UnitInfo(ElectricResistivityUnit.MicroohmCentimeter, "MicroohmsCentimeter", BaseUnits.Undefined), - new UnitInfo(ElectricResistivityUnit.MicroohmMeter, "MicroohmMeters", BaseUnits.Undefined), - new UnitInfo(ElectricResistivityUnit.MilliohmCentimeter, "MilliohmsCentimeter", BaseUnits.Undefined), - new UnitInfo(ElectricResistivityUnit.MilliohmMeter, "MilliohmMeters", BaseUnits.Undefined), - new UnitInfo(ElectricResistivityUnit.NanoohmCentimeter, "NanoohmsCentimeter", BaseUnits.Undefined), - new UnitInfo(ElectricResistivityUnit.NanoohmMeter, "NanoohmMeters", BaseUnits.Undefined), - new UnitInfo(ElectricResistivityUnit.OhmCentimeter, "OhmsCentimeter", BaseUnits.Undefined), - new UnitInfo(ElectricResistivityUnit.OhmMeter, "OhmMeters", BaseUnits.Undefined), - new UnitInfo(ElectricResistivityUnit.PicoohmCentimeter, "PicoohmsCentimeter", BaseUnits.Undefined), - new UnitInfo(ElectricResistivityUnit.PicoohmMeter, "PicoohmMeters", BaseUnits.Undefined), + new UnitInfo(ElectricResistivityUnit.KiloohmCentimeter, "KiloohmsCentimeter", BaseUnits.Undefined, "ElectricResistivity"), + new UnitInfo(ElectricResistivityUnit.KiloohmMeter, "KiloohmMeters", BaseUnits.Undefined, "ElectricResistivity"), + new UnitInfo(ElectricResistivityUnit.MegaohmCentimeter, "MegaohmsCentimeter", BaseUnits.Undefined, "ElectricResistivity"), + new UnitInfo(ElectricResistivityUnit.MegaohmMeter, "MegaohmMeters", BaseUnits.Undefined, "ElectricResistivity"), + new UnitInfo(ElectricResistivityUnit.MicroohmCentimeter, "MicroohmsCentimeter", BaseUnits.Undefined, "ElectricResistivity"), + new UnitInfo(ElectricResistivityUnit.MicroohmMeter, "MicroohmMeters", BaseUnits.Undefined, "ElectricResistivity"), + new UnitInfo(ElectricResistivityUnit.MilliohmCentimeter, "MilliohmsCentimeter", BaseUnits.Undefined, "ElectricResistivity"), + new UnitInfo(ElectricResistivityUnit.MilliohmMeter, "MilliohmMeters", BaseUnits.Undefined, "ElectricResistivity"), + new UnitInfo(ElectricResistivityUnit.NanoohmCentimeter, "NanoohmsCentimeter", BaseUnits.Undefined, "ElectricResistivity"), + new UnitInfo(ElectricResistivityUnit.NanoohmMeter, "NanoohmMeters", BaseUnits.Undefined, "ElectricResistivity"), + new UnitInfo(ElectricResistivityUnit.OhmCentimeter, "OhmsCentimeter", BaseUnits.Undefined, "ElectricResistivity"), + new UnitInfo(ElectricResistivityUnit.OhmMeter, "OhmMeters", BaseUnits.Undefined, "ElectricResistivity"), + new UnitInfo(ElectricResistivityUnit.PicoohmCentimeter, "PicoohmsCentimeter", BaseUnits.Undefined, "ElectricResistivity"), + new UnitInfo(ElectricResistivityUnit.PicoohmMeter, "PicoohmMeters", BaseUnits.Undefined, "ElectricResistivity"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ElectricResistivityUnit Unit), List>(); } /// @@ -158,11 +153,6 @@ public ElectricResistivity(double value, UnitSystem unitSystem) /// public static ElectricResistivity AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, ElectricResistivityUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -314,7 +304,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ElectricResistivityUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(ElectricResistivityUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -324,34 +317,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricResistivityUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(ElectricResistivityUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricResistivity"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricResistivity).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -1050,9 +1016,6 @@ public ElectricResistivity ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs index ef57ad24ee..dd76a648dc 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -71,16 +68,14 @@ static ElectricSurfaceChargeDensity() Info = new QuantityInfo("ElectricSurfaceChargeDensity", new UnitInfo[] { - new UnitInfo(ElectricSurfaceChargeDensityUnit.CoulombPerSquareCentimeter, "CoulombsPerSquareCentimeter", new BaseUnits(length: LengthUnit.Centimeter, time: DurationUnit.Second, current: ElectricCurrentUnit.Ampere)), - new UnitInfo(ElectricSurfaceChargeDensityUnit.CoulombPerSquareInch, "CoulombsPerSquareInch", new BaseUnits(length: LengthUnit.Inch, time: DurationUnit.Second, current: ElectricCurrentUnit.Ampere)), - new UnitInfo(ElectricSurfaceChargeDensityUnit.CoulombPerSquareMeter, "CoulombsPerSquareMeter", new BaseUnits(length: LengthUnit.Meter, time: DurationUnit.Second, current: ElectricCurrentUnit.Ampere)), + new UnitInfo(ElectricSurfaceChargeDensityUnit.CoulombPerSquareCentimeter, "CoulombsPerSquareCentimeter", new BaseUnits(length: LengthUnit.Centimeter, time: DurationUnit.Second, current: ElectricCurrentUnit.Ampere), "ElectricSurfaceChargeDensity"), + new UnitInfo(ElectricSurfaceChargeDensityUnit.CoulombPerSquareInch, "CoulombsPerSquareInch", new BaseUnits(length: LengthUnit.Inch, time: DurationUnit.Second, current: ElectricCurrentUnit.Ampere), "ElectricSurfaceChargeDensity"), + new UnitInfo(ElectricSurfaceChargeDensityUnit.CoulombPerSquareMeter, "CoulombsPerSquareMeter", new BaseUnits(length: LengthUnit.Meter, time: DurationUnit.Second, current: ElectricCurrentUnit.Ampere), "ElectricSurfaceChargeDensity"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ElectricSurfaceChargeDensityUnit Unit), List>(); } /// @@ -147,11 +142,6 @@ public ElectricSurfaceChargeDensity(double value, UnitSystem unitSystem) /// public static ElectricSurfaceChargeDensity AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, ElectricSurfaceChargeDensityUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -226,7 +216,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ElectricSurfaceChargeDensityUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(ElectricSurfaceChargeDensityUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -236,34 +229,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricSurfaceChargeDensityUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(ElectricSurfaceChargeDensityUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ElectricSurfaceChargeDensity"; - var resourceManager = new ResourceManager(resourceName, typeof(ElectricSurfaceChargeDensity).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -830,9 +796,6 @@ public ElectricSurfaceChargeDensity ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Energy.g.cs b/UnitsNet/GeneratedCode/Quantities/Energy.g.cs index 93ff4d94fc..497ff36dc5 100644 --- a/UnitsNet/GeneratedCode/Quantities/Energy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Energy.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,51 +65,49 @@ static Energy() Info = new QuantityInfo("Energy", new UnitInfo[] { - new UnitInfo(EnergyUnit.BritishThermalUnit, "BritishThermalUnits", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.Calorie, "Calories", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.DecathermEc, "DecathermsEc", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.DecathermImperial, "DecathermsImperial", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.DecathermUs, "DecathermsUs", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.ElectronVolt, "ElectronVolts", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.Erg, "Ergs", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.FootPound, "FootPounds", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.GigabritishThermalUnit, "GigabritishThermalUnits", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.GigaelectronVolt, "GigaelectronVolts", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.Gigajoule, "Gigajoules", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.GigawattDay, "GigawattDays", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.GigawattHour, "GigawattHours", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.HorsepowerHour, "HorsepowerHours", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.Joule, "Joules", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second)), - new UnitInfo(EnergyUnit.KilobritishThermalUnit, "KilobritishThermalUnits", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.Kilocalorie, "Kilocalories", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.KiloelectronVolt, "KiloelectronVolts", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.Kilojoule, "Kilojoules", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.KilowattDay, "KilowattDays", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.KilowattHour, "KilowattHours", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.MegabritishThermalUnit, "MegabritishThermalUnits", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.Megacalorie, "Megacalories", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.MegaelectronVolt, "MegaelectronVolts", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.Megajoule, "Megajoules", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.MegawattDay, "MegawattDays", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.MegawattHour, "MegawattHours", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.Millijoule, "Millijoules", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.Petajoule, "Petajoules", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.TeraelectronVolt, "TeraelectronVolts", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.Terajoule, "Terajoules", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.TerawattDay, "TerawattDays", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.TerawattHour, "TerawattHours", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.ThermEc, "ThermsEc", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.ThermImperial, "ThermsImperial", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.ThermUs, "ThermsUs", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.WattDay, "WattDays", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.WattHour, "WattHours", BaseUnits.Undefined), + new UnitInfo(EnergyUnit.BritishThermalUnit, "BritishThermalUnits", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.Calorie, "Calories", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.DecathermEc, "DecathermsEc", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.DecathermImperial, "DecathermsImperial", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.DecathermUs, "DecathermsUs", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.ElectronVolt, "ElectronVolts", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.Erg, "Ergs", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.FootPound, "FootPounds", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.GigabritishThermalUnit, "GigabritishThermalUnits", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.GigaelectronVolt, "GigaelectronVolts", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.Gigajoule, "Gigajoules", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.GigawattDay, "GigawattDays", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.GigawattHour, "GigawattHours", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.HorsepowerHour, "HorsepowerHours", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.Joule, "Joules", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second), "Energy"), + new UnitInfo(EnergyUnit.KilobritishThermalUnit, "KilobritishThermalUnits", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.Kilocalorie, "Kilocalories", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.KiloelectronVolt, "KiloelectronVolts", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.Kilojoule, "Kilojoules", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.KilowattDay, "KilowattDays", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.KilowattHour, "KilowattHours", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.MegabritishThermalUnit, "MegabritishThermalUnits", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.Megacalorie, "Megacalories", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.MegaelectronVolt, "MegaelectronVolts", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.Megajoule, "Megajoules", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.MegawattDay, "MegawattDays", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.MegawattHour, "MegawattHours", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.Millijoule, "Millijoules", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.Petajoule, "Petajoules", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.TeraelectronVolt, "TeraelectronVolts", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.Terajoule, "Terajoules", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.TerawattDay, "TerawattDays", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.TerawattHour, "TerawattHours", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.ThermEc, "ThermsEc", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.ThermImperial, "ThermsImperial", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.ThermUs, "ThermsUs", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.WattDay, "WattDays", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.WattHour, "WattHours", BaseUnits.Undefined, "Energy"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, EnergyUnit Unit), List>(); } /// @@ -179,11 +174,6 @@ public Energy(double value, UnitSystem unitSystem) /// public static Energy AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, EnergyUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -503,7 +493,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(EnergyUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(EnergyUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -513,34 +506,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(EnergyUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(EnergyUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Energy"; - var resourceManager = new ResourceManager(resourceName, typeof(Energy).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -1527,9 +1493,6 @@ public Energy ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/EnergyDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/EnergyDensity.g.cs index e6cf7a8d79..1a7b34816c 100644 --- a/UnitsNet/GeneratedCode/Quantities/EnergyDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/EnergyDensity.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,25 +65,23 @@ static EnergyDensity() Info = new QuantityInfo("EnergyDensity", new UnitInfo[] { - new UnitInfo(EnergyDensityUnit.GigajoulePerCubicMeter, "GigajoulesPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(EnergyDensityUnit.GigawattHourPerCubicMeter, "GigawattHoursPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(EnergyDensityUnit.JoulePerCubicMeter, "JoulesPerCubicMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second)), - new UnitInfo(EnergyDensityUnit.KilojoulePerCubicMeter, "KilojoulesPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(EnergyDensityUnit.KilowattHourPerCubicMeter, "KilowattHoursPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(EnergyDensityUnit.MegajoulePerCubicMeter, "MegajoulesPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(EnergyDensityUnit.MegawattHourPerCubicMeter, "MegawattHoursPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(EnergyDensityUnit.PetajoulePerCubicMeter, "PetajoulesPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(EnergyDensityUnit.PetawattHourPerCubicMeter, "PetawattHoursPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(EnergyDensityUnit.TerajoulePerCubicMeter, "TerajoulesPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(EnergyDensityUnit.TerawattHourPerCubicMeter, "TerawattHoursPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(EnergyDensityUnit.WattHourPerCubicMeter, "WattHoursPerCubicMeter", BaseUnits.Undefined), + new UnitInfo(EnergyDensityUnit.GigajoulePerCubicMeter, "GigajoulesPerCubicMeter", BaseUnits.Undefined, "EnergyDensity"), + new UnitInfo(EnergyDensityUnit.GigawattHourPerCubicMeter, "GigawattHoursPerCubicMeter", BaseUnits.Undefined, "EnergyDensity"), + new UnitInfo(EnergyDensityUnit.JoulePerCubicMeter, "JoulesPerCubicMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second), "EnergyDensity"), + new UnitInfo(EnergyDensityUnit.KilojoulePerCubicMeter, "KilojoulesPerCubicMeter", BaseUnits.Undefined, "EnergyDensity"), + new UnitInfo(EnergyDensityUnit.KilowattHourPerCubicMeter, "KilowattHoursPerCubicMeter", BaseUnits.Undefined, "EnergyDensity"), + new UnitInfo(EnergyDensityUnit.MegajoulePerCubicMeter, "MegajoulesPerCubicMeter", BaseUnits.Undefined, "EnergyDensity"), + new UnitInfo(EnergyDensityUnit.MegawattHourPerCubicMeter, "MegawattHoursPerCubicMeter", BaseUnits.Undefined, "EnergyDensity"), + new UnitInfo(EnergyDensityUnit.PetajoulePerCubicMeter, "PetajoulesPerCubicMeter", BaseUnits.Undefined, "EnergyDensity"), + new UnitInfo(EnergyDensityUnit.PetawattHourPerCubicMeter, "PetawattHoursPerCubicMeter", BaseUnits.Undefined, "EnergyDensity"), + new UnitInfo(EnergyDensityUnit.TerajoulePerCubicMeter, "TerajoulesPerCubicMeter", BaseUnits.Undefined, "EnergyDensity"), + new UnitInfo(EnergyDensityUnit.TerawattHourPerCubicMeter, "TerawattHoursPerCubicMeter", BaseUnits.Undefined, "EnergyDensity"), + new UnitInfo(EnergyDensityUnit.WattHourPerCubicMeter, "WattHoursPerCubicMeter", BaseUnits.Undefined, "EnergyDensity"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, EnergyDensityUnit Unit), List>(); } /// @@ -153,11 +148,6 @@ public EnergyDensity(double value, UnitSystem unitSystem) /// public static EnergyDensity AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, EnergyDensityUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -295,7 +285,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(EnergyDensityUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(EnergyDensityUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -305,34 +298,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(EnergyDensityUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(EnergyDensityUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.EnergyDensity"; - var resourceManager = new ResourceManager(resourceName, typeof(EnergyDensity).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -1007,9 +973,6 @@ public EnergyDensity ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs b/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs index a9c5e2605b..3dd22e1d58 100644 --- a/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,20 +65,18 @@ static Entropy() Info = new QuantityInfo("Entropy", new UnitInfo[] { - new UnitInfo(EntropyUnit.CaloriePerKelvin, "CaloriesPerKelvin", BaseUnits.Undefined), - new UnitInfo(EntropyUnit.JoulePerDegreeCelsius, "JoulesPerDegreeCelsius", BaseUnits.Undefined), - new UnitInfo(EntropyUnit.JoulePerKelvin, "JoulesPerKelvin", BaseUnits.Undefined), - new UnitInfo(EntropyUnit.KilocaloriePerKelvin, "KilocaloriesPerKelvin", BaseUnits.Undefined), - new UnitInfo(EntropyUnit.KilojoulePerDegreeCelsius, "KilojoulesPerDegreeCelsius", BaseUnits.Undefined), - new UnitInfo(EntropyUnit.KilojoulePerKelvin, "KilojoulesPerKelvin", BaseUnits.Undefined), - new UnitInfo(EntropyUnit.MegajoulePerKelvin, "MegajoulesPerKelvin", BaseUnits.Undefined), + new UnitInfo(EntropyUnit.CaloriePerKelvin, "CaloriesPerKelvin", BaseUnits.Undefined, "Entropy"), + new UnitInfo(EntropyUnit.JoulePerDegreeCelsius, "JoulesPerDegreeCelsius", BaseUnits.Undefined, "Entropy"), + new UnitInfo(EntropyUnit.JoulePerKelvin, "JoulesPerKelvin", BaseUnits.Undefined, "Entropy"), + new UnitInfo(EntropyUnit.KilocaloriePerKelvin, "KilocaloriesPerKelvin", BaseUnits.Undefined, "Entropy"), + new UnitInfo(EntropyUnit.KilojoulePerDegreeCelsius, "KilojoulesPerDegreeCelsius", BaseUnits.Undefined, "Entropy"), + new UnitInfo(EntropyUnit.KilojoulePerKelvin, "KilojoulesPerKelvin", BaseUnits.Undefined, "Entropy"), + new UnitInfo(EntropyUnit.MegajoulePerKelvin, "MegajoulesPerKelvin", BaseUnits.Undefined, "Entropy"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, EntropyUnit Unit), List>(); } /// @@ -148,11 +143,6 @@ public Entropy(double value, UnitSystem unitSystem) /// public static Entropy AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, EntropyUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -255,7 +245,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(EntropyUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(EntropyUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -265,34 +258,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(EntropyUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(EntropyUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Entropy"; - var resourceManager = new ResourceManager(resourceName, typeof(Entropy).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -907,9 +873,6 @@ public Entropy ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Force.g.cs b/UnitsNet/GeneratedCode/Quantities/Force.g.cs index d59fdf658c..fa53474042 100644 --- a/UnitsNet/GeneratedCode/Quantities/Force.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Force.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,28 +65,26 @@ static Force() Info = new QuantityInfo("Force", new UnitInfo[] { - new UnitInfo(ForceUnit.Decanewton, "Decanewtons", BaseUnits.Undefined), - new UnitInfo(ForceUnit.Dyn, "Dyne", new BaseUnits(length: LengthUnit.Centimeter, mass: MassUnit.Gram, time: DurationUnit.Second)), - new UnitInfo(ForceUnit.KilogramForce, "KilogramsForce", BaseUnits.Undefined), - new UnitInfo(ForceUnit.Kilonewton, "Kilonewtons", BaseUnits.Undefined), - new UnitInfo(ForceUnit.KiloPond, "KiloPonds", BaseUnits.Undefined), - new UnitInfo(ForceUnit.KilopoundForce, "KilopoundsForce", BaseUnits.Undefined), - new UnitInfo(ForceUnit.Meganewton, "Meganewtons", BaseUnits.Undefined), - new UnitInfo(ForceUnit.Micronewton, "Micronewtons", BaseUnits.Undefined), - new UnitInfo(ForceUnit.Millinewton, "Millinewtons", BaseUnits.Undefined), - new UnitInfo(ForceUnit.Newton, "Newtons", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second)), - new UnitInfo(ForceUnit.OunceForce, "OunceForce", BaseUnits.Undefined), - new UnitInfo(ForceUnit.Poundal, "Poundals", new BaseUnits(length: LengthUnit.Foot, mass: MassUnit.Pound, time: DurationUnit.Second)), - new UnitInfo(ForceUnit.PoundForce, "PoundsForce", BaseUnits.Undefined), - new UnitInfo(ForceUnit.ShortTonForce, "ShortTonsForce", BaseUnits.Undefined), - new UnitInfo(ForceUnit.TonneForce, "TonnesForce", BaseUnits.Undefined), + new UnitInfo(ForceUnit.Decanewton, "Decanewtons", BaseUnits.Undefined, "Force"), + new UnitInfo(ForceUnit.Dyn, "Dyne", new BaseUnits(length: LengthUnit.Centimeter, mass: MassUnit.Gram, time: DurationUnit.Second), "Force"), + new UnitInfo(ForceUnit.KilogramForce, "KilogramsForce", BaseUnits.Undefined, "Force"), + new UnitInfo(ForceUnit.Kilonewton, "Kilonewtons", BaseUnits.Undefined, "Force"), + new UnitInfo(ForceUnit.KiloPond, "KiloPonds", BaseUnits.Undefined, "Force"), + new UnitInfo(ForceUnit.KilopoundForce, "KilopoundsForce", BaseUnits.Undefined, "Force"), + new UnitInfo(ForceUnit.Meganewton, "Meganewtons", BaseUnits.Undefined, "Force"), + new UnitInfo(ForceUnit.Micronewton, "Micronewtons", BaseUnits.Undefined, "Force"), + new UnitInfo(ForceUnit.Millinewton, "Millinewtons", BaseUnits.Undefined, "Force"), + new UnitInfo(ForceUnit.Newton, "Newtons", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second), "Force"), + new UnitInfo(ForceUnit.OunceForce, "OunceForce", BaseUnits.Undefined, "Force"), + new UnitInfo(ForceUnit.Poundal, "Poundals", new BaseUnits(length: LengthUnit.Foot, mass: MassUnit.Pound, time: DurationUnit.Second), "Force"), + new UnitInfo(ForceUnit.PoundForce, "PoundsForce", BaseUnits.Undefined, "Force"), + new UnitInfo(ForceUnit.ShortTonForce, "ShortTonsForce", BaseUnits.Undefined, "Force"), + new UnitInfo(ForceUnit.TonneForce, "TonnesForce", BaseUnits.Undefined, "Force"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ForceUnit Unit), List>(); } /// @@ -156,11 +151,6 @@ public Force(double value, UnitSystem unitSystem) /// public static Force AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, ForceUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -319,7 +309,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ForceUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(ForceUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -329,34 +322,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ForceUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(ForceUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Force"; - var resourceManager = new ResourceManager(resourceName, typeof(Force).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -1067,9 +1033,6 @@ public Force ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs index 687417a45f..8782e722f1 100644 --- a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,28 +65,26 @@ static ForceChangeRate() Info = new QuantityInfo("ForceChangeRate", new UnitInfo[] { - new UnitInfo(ForceChangeRateUnit.CentinewtonPerSecond, "CentinewtonsPerSecond", BaseUnits.Undefined), - new UnitInfo(ForceChangeRateUnit.DecanewtonPerMinute, "DecanewtonsPerMinute", BaseUnits.Undefined), - new UnitInfo(ForceChangeRateUnit.DecanewtonPerSecond, "DecanewtonsPerSecond", BaseUnits.Undefined), - new UnitInfo(ForceChangeRateUnit.DecinewtonPerSecond, "DecinewtonsPerSecond", BaseUnits.Undefined), - new UnitInfo(ForceChangeRateUnit.KilonewtonPerMinute, "KilonewtonsPerMinute", BaseUnits.Undefined), - new UnitInfo(ForceChangeRateUnit.KilonewtonPerSecond, "KilonewtonsPerSecond", BaseUnits.Undefined), - new UnitInfo(ForceChangeRateUnit.KilopoundForcePerMinute, "KilopoundsForcePerMinute", BaseUnits.Undefined), - new UnitInfo(ForceChangeRateUnit.KilopoundForcePerSecond, "KilopoundsForcePerSecond", BaseUnits.Undefined), - new UnitInfo(ForceChangeRateUnit.MicronewtonPerSecond, "MicronewtonsPerSecond", BaseUnits.Undefined), - new UnitInfo(ForceChangeRateUnit.MillinewtonPerSecond, "MillinewtonsPerSecond", BaseUnits.Undefined), - new UnitInfo(ForceChangeRateUnit.NanonewtonPerSecond, "NanonewtonsPerSecond", BaseUnits.Undefined), - new UnitInfo(ForceChangeRateUnit.NewtonPerMinute, "NewtonsPerMinute", BaseUnits.Undefined), - new UnitInfo(ForceChangeRateUnit.NewtonPerSecond, "NewtonsPerSecond", BaseUnits.Undefined), - new UnitInfo(ForceChangeRateUnit.PoundForcePerMinute, "PoundsForcePerMinute", BaseUnits.Undefined), - new UnitInfo(ForceChangeRateUnit.PoundForcePerSecond, "PoundsForcePerSecond", BaseUnits.Undefined), + new UnitInfo(ForceChangeRateUnit.CentinewtonPerSecond, "CentinewtonsPerSecond", BaseUnits.Undefined, "ForceChangeRate"), + new UnitInfo(ForceChangeRateUnit.DecanewtonPerMinute, "DecanewtonsPerMinute", BaseUnits.Undefined, "ForceChangeRate"), + new UnitInfo(ForceChangeRateUnit.DecanewtonPerSecond, "DecanewtonsPerSecond", BaseUnits.Undefined, "ForceChangeRate"), + new UnitInfo(ForceChangeRateUnit.DecinewtonPerSecond, "DecinewtonsPerSecond", BaseUnits.Undefined, "ForceChangeRate"), + new UnitInfo(ForceChangeRateUnit.KilonewtonPerMinute, "KilonewtonsPerMinute", BaseUnits.Undefined, "ForceChangeRate"), + new UnitInfo(ForceChangeRateUnit.KilonewtonPerSecond, "KilonewtonsPerSecond", BaseUnits.Undefined, "ForceChangeRate"), + new UnitInfo(ForceChangeRateUnit.KilopoundForcePerMinute, "KilopoundsForcePerMinute", BaseUnits.Undefined, "ForceChangeRate"), + new UnitInfo(ForceChangeRateUnit.KilopoundForcePerSecond, "KilopoundsForcePerSecond", BaseUnits.Undefined, "ForceChangeRate"), + new UnitInfo(ForceChangeRateUnit.MicronewtonPerSecond, "MicronewtonsPerSecond", BaseUnits.Undefined, "ForceChangeRate"), + new UnitInfo(ForceChangeRateUnit.MillinewtonPerSecond, "MillinewtonsPerSecond", BaseUnits.Undefined, "ForceChangeRate"), + new UnitInfo(ForceChangeRateUnit.NanonewtonPerSecond, "NanonewtonsPerSecond", BaseUnits.Undefined, "ForceChangeRate"), + new UnitInfo(ForceChangeRateUnit.NewtonPerMinute, "NewtonsPerMinute", BaseUnits.Undefined, "ForceChangeRate"), + new UnitInfo(ForceChangeRateUnit.NewtonPerSecond, "NewtonsPerSecond", BaseUnits.Undefined, "ForceChangeRate"), + new UnitInfo(ForceChangeRateUnit.PoundForcePerMinute, "PoundsForcePerMinute", BaseUnits.Undefined, "ForceChangeRate"), + new UnitInfo(ForceChangeRateUnit.PoundForcePerSecond, "PoundsForcePerSecond", BaseUnits.Undefined, "ForceChangeRate"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ForceChangeRateUnit Unit), List>(); } /// @@ -156,11 +151,6 @@ public ForceChangeRate(double value, UnitSystem unitSystem) /// public static ForceChangeRate AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, ForceChangeRateUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -319,7 +309,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ForceChangeRateUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(ForceChangeRateUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -329,34 +322,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ForceChangeRateUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(ForceChangeRateUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ForceChangeRate"; - var resourceManager = new ResourceManager(resourceName, typeof(ForceChangeRate).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -1067,9 +1033,6 @@ public ForceChangeRate ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs index 3d59481af0..dfa5259b57 100644 --- a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,51 +65,49 @@ static ForcePerLength() Info = new QuantityInfo("ForcePerLength", new UnitInfo[] { - new UnitInfo(ForcePerLengthUnit.CentinewtonPerCentimeter, "CentinewtonsPerCentimeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.CentinewtonPerMeter, "CentinewtonsPerMeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.CentinewtonPerMillimeter, "CentinewtonsPerMillimeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.DecanewtonPerCentimeter, "DecanewtonsPerCentimeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.DecanewtonPerMeter, "DecanewtonsPerMeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.DecanewtonPerMillimeter, "DecanewtonsPerMillimeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.DecinewtonPerCentimeter, "DecinewtonsPerCentimeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.DecinewtonPerMeter, "DecinewtonsPerMeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.DecinewtonPerMillimeter, "DecinewtonsPerMillimeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.KilogramForcePerCentimeter, "KilogramsForcePerCentimeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.KilogramForcePerMeter, "KilogramsForcePerMeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.KilogramForcePerMillimeter, "KilogramsForcePerMillimeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.KilonewtonPerCentimeter, "KilonewtonsPerCentimeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.KilonewtonPerMeter, "KilonewtonsPerMeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.KilonewtonPerMillimeter, "KilonewtonsPerMillimeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.KilopoundForcePerFoot, "KilopoundsForcePerFoot", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.KilopoundForcePerInch, "KilopoundsForcePerInch", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.MeganewtonPerCentimeter, "MeganewtonsPerCentimeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.MeganewtonPerMeter, "MeganewtonsPerMeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.MeganewtonPerMillimeter, "MeganewtonsPerMillimeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.MicronewtonPerCentimeter, "MicronewtonsPerCentimeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.MicronewtonPerMeter, "MicronewtonsPerMeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.MicronewtonPerMillimeter, "MicronewtonsPerMillimeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.MillinewtonPerCentimeter, "MillinewtonsPerCentimeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.MillinewtonPerMeter, "MillinewtonsPerMeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.MillinewtonPerMillimeter, "MillinewtonsPerMillimeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.NanonewtonPerCentimeter, "NanonewtonsPerCentimeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.NanonewtonPerMeter, "NanonewtonsPerMeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.NanonewtonPerMillimeter, "NanonewtonsPerMillimeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.NewtonPerCentimeter, "NewtonsPerCentimeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.NewtonPerMeter, "NewtonsPerMeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.NewtonPerMillimeter, "NewtonsPerMillimeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.PoundForcePerFoot, "PoundsForcePerFoot", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.PoundForcePerInch, "PoundsForcePerInch", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.PoundForcePerYard, "PoundsForcePerYard", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.TonneForcePerCentimeter, "TonnesForcePerCentimeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.TonneForcePerMeter, "TonnesForcePerMeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.TonneForcePerMillimeter, "TonnesForcePerMillimeter", BaseUnits.Undefined), + new UnitInfo(ForcePerLengthUnit.CentinewtonPerCentimeter, "CentinewtonsPerCentimeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.CentinewtonPerMeter, "CentinewtonsPerMeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.CentinewtonPerMillimeter, "CentinewtonsPerMillimeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.DecanewtonPerCentimeter, "DecanewtonsPerCentimeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.DecanewtonPerMeter, "DecanewtonsPerMeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.DecanewtonPerMillimeter, "DecanewtonsPerMillimeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.DecinewtonPerCentimeter, "DecinewtonsPerCentimeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.DecinewtonPerMeter, "DecinewtonsPerMeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.DecinewtonPerMillimeter, "DecinewtonsPerMillimeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.KilogramForcePerCentimeter, "KilogramsForcePerCentimeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.KilogramForcePerMeter, "KilogramsForcePerMeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.KilogramForcePerMillimeter, "KilogramsForcePerMillimeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.KilonewtonPerCentimeter, "KilonewtonsPerCentimeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.KilonewtonPerMeter, "KilonewtonsPerMeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.KilonewtonPerMillimeter, "KilonewtonsPerMillimeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.KilopoundForcePerFoot, "KilopoundsForcePerFoot", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.KilopoundForcePerInch, "KilopoundsForcePerInch", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.MeganewtonPerCentimeter, "MeganewtonsPerCentimeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.MeganewtonPerMeter, "MeganewtonsPerMeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.MeganewtonPerMillimeter, "MeganewtonsPerMillimeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.MicronewtonPerCentimeter, "MicronewtonsPerCentimeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.MicronewtonPerMeter, "MicronewtonsPerMeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.MicronewtonPerMillimeter, "MicronewtonsPerMillimeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.MillinewtonPerCentimeter, "MillinewtonsPerCentimeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.MillinewtonPerMeter, "MillinewtonsPerMeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.MillinewtonPerMillimeter, "MillinewtonsPerMillimeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.NanonewtonPerCentimeter, "NanonewtonsPerCentimeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.NanonewtonPerMeter, "NanonewtonsPerMeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.NanonewtonPerMillimeter, "NanonewtonsPerMillimeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.NewtonPerCentimeter, "NewtonsPerCentimeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.NewtonPerMeter, "NewtonsPerMeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.NewtonPerMillimeter, "NewtonsPerMillimeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.PoundForcePerFoot, "PoundsForcePerFoot", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.PoundForcePerInch, "PoundsForcePerInch", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.PoundForcePerYard, "PoundsForcePerYard", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.TonneForcePerCentimeter, "TonnesForcePerCentimeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.TonneForcePerMeter, "TonnesForcePerMeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.TonneForcePerMillimeter, "TonnesForcePerMillimeter", BaseUnits.Undefined, "ForcePerLength"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ForcePerLengthUnit Unit), List>(); } /// @@ -179,11 +174,6 @@ public ForcePerLength(double value, UnitSystem unitSystem) /// public static ForcePerLength AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, ForcePerLengthUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -503,7 +493,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ForcePerLengthUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(ForcePerLengthUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -513,34 +506,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ForcePerLengthUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(ForcePerLengthUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ForcePerLength"; - var resourceManager = new ResourceManager(resourceName, typeof(ForcePerLength).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -1527,9 +1493,6 @@ public ForcePerLength ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs b/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs index 3785a6af99..3b32b66bd7 100644 --- a/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,26 +65,24 @@ static Frequency() Info = new QuantityInfo("Frequency", new UnitInfo[] { - new UnitInfo(FrequencyUnit.BeatPerMinute, "BeatsPerMinute", BaseUnits.Undefined), - new UnitInfo(FrequencyUnit.BUnit, "BUnits", BaseUnits.Undefined), - new UnitInfo(FrequencyUnit.CyclePerHour, "CyclesPerHour", BaseUnits.Undefined), - new UnitInfo(FrequencyUnit.CyclePerMinute, "CyclesPerMinute", BaseUnits.Undefined), - new UnitInfo(FrequencyUnit.Gigahertz, "Gigahertz", BaseUnits.Undefined), - new UnitInfo(FrequencyUnit.Hertz, "Hertz", BaseUnits.Undefined), - new UnitInfo(FrequencyUnit.Kilohertz, "Kilohertz", BaseUnits.Undefined), - new UnitInfo(FrequencyUnit.Megahertz, "Megahertz", BaseUnits.Undefined), - new UnitInfo(FrequencyUnit.Microhertz, "Microhertz", BaseUnits.Undefined), - new UnitInfo(FrequencyUnit.Millihertz, "Millihertz", BaseUnits.Undefined), - new UnitInfo(FrequencyUnit.PerSecond, "PerSecond", BaseUnits.Undefined), - new UnitInfo(FrequencyUnit.RadianPerSecond, "RadiansPerSecond", BaseUnits.Undefined), - new UnitInfo(FrequencyUnit.Terahertz, "Terahertz", BaseUnits.Undefined), + new UnitInfo(FrequencyUnit.BeatPerMinute, "BeatsPerMinute", BaseUnits.Undefined, "Frequency"), + new UnitInfo(FrequencyUnit.BUnit, "BUnits", BaseUnits.Undefined, "Frequency"), + new UnitInfo(FrequencyUnit.CyclePerHour, "CyclesPerHour", BaseUnits.Undefined, "Frequency"), + new UnitInfo(FrequencyUnit.CyclePerMinute, "CyclesPerMinute", BaseUnits.Undefined, "Frequency"), + new UnitInfo(FrequencyUnit.Gigahertz, "Gigahertz", BaseUnits.Undefined, "Frequency"), + new UnitInfo(FrequencyUnit.Hertz, "Hertz", BaseUnits.Undefined, "Frequency"), + new UnitInfo(FrequencyUnit.Kilohertz, "Kilohertz", BaseUnits.Undefined, "Frequency"), + new UnitInfo(FrequencyUnit.Megahertz, "Megahertz", BaseUnits.Undefined, "Frequency"), + new UnitInfo(FrequencyUnit.Microhertz, "Microhertz", BaseUnits.Undefined, "Frequency"), + new UnitInfo(FrequencyUnit.Millihertz, "Millihertz", BaseUnits.Undefined, "Frequency"), + new UnitInfo(FrequencyUnit.PerSecond, "PerSecond", BaseUnits.Undefined, "Frequency"), + new UnitInfo(FrequencyUnit.RadianPerSecond, "RadiansPerSecond", BaseUnits.Undefined, "Frequency"), + new UnitInfo(FrequencyUnit.Terahertz, "Terahertz", BaseUnits.Undefined, "Frequency"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, FrequencyUnit Unit), List>(); } /// @@ -154,11 +149,6 @@ public Frequency(double value, UnitSystem unitSystem) /// public static Frequency AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, FrequencyUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -303,7 +293,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(FrequencyUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(FrequencyUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -313,34 +306,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(FrequencyUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(FrequencyUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Frequency"; - var resourceManager = new ResourceManager(resourceName, typeof(Frequency).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -1027,9 +993,6 @@ public Frequency ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs b/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs index 9731547872..4f0546f76f 100644 --- a/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -71,17 +68,15 @@ static FuelEfficiency() Info = new QuantityInfo("FuelEfficiency", new UnitInfo[] { - new UnitInfo(FuelEfficiencyUnit.KilometerPerLiter, "KilometersPerLiters", BaseUnits.Undefined), - new UnitInfo(FuelEfficiencyUnit.LiterPer100Kilometers, "LitersPer100Kilometers", BaseUnits.Undefined), - new UnitInfo(FuelEfficiencyUnit.MilePerUkGallon, "MilesPerUkGallon", BaseUnits.Undefined), - new UnitInfo(FuelEfficiencyUnit.MilePerUsGallon, "MilesPerUsGallon", BaseUnits.Undefined), + new UnitInfo(FuelEfficiencyUnit.KilometerPerLiter, "KilometersPerLiters", BaseUnits.Undefined, "FuelEfficiency"), + new UnitInfo(FuelEfficiencyUnit.LiterPer100Kilometers, "LitersPer100Kilometers", BaseUnits.Undefined, "FuelEfficiency"), + new UnitInfo(FuelEfficiencyUnit.MilePerUkGallon, "MilesPerUkGallon", BaseUnits.Undefined, "FuelEfficiency"), + new UnitInfo(FuelEfficiencyUnit.MilePerUsGallon, "MilesPerUsGallon", BaseUnits.Undefined, "FuelEfficiency"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, FuelEfficiencyUnit Unit), List>(); } /// @@ -148,11 +143,6 @@ public FuelEfficiency(double value, UnitSystem unitSystem) /// public static FuelEfficiency AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, FuelEfficiencyUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -234,7 +224,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(FuelEfficiencyUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(FuelEfficiencyUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -244,34 +237,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(FuelEfficiencyUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(FuelEfficiencyUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.FuelEfficiency"; - var resourceManager = new ResourceManager(resourceName, typeof(FuelEfficiency).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -850,9 +816,6 @@ public FuelEfficiency ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs index ac1a588a00..3d3afb4447 100644 --- a/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,31 +65,29 @@ static HeatFlux() Info = new QuantityInfo("HeatFlux", new UnitInfo[] { - new UnitInfo(HeatFluxUnit.BtuPerHourSquareFoot, "BtusPerHourSquareFoot", BaseUnits.Undefined), - new UnitInfo(HeatFluxUnit.BtuPerMinuteSquareFoot, "BtusPerMinuteSquareFoot", BaseUnits.Undefined), - new UnitInfo(HeatFluxUnit.BtuPerSecondSquareFoot, "BtusPerSecondSquareFoot", BaseUnits.Undefined), - new UnitInfo(HeatFluxUnit.BtuPerSecondSquareInch, "BtusPerSecondSquareInch", BaseUnits.Undefined), - new UnitInfo(HeatFluxUnit.CaloriePerSecondSquareCentimeter, "CaloriesPerSecondSquareCentimeter", BaseUnits.Undefined), - new UnitInfo(HeatFluxUnit.CentiwattPerSquareMeter, "CentiwattsPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(HeatFluxUnit.DeciwattPerSquareMeter, "DeciwattsPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(HeatFluxUnit.KilocaloriePerHourSquareMeter, "KilocaloriesPerHourSquareMeter", BaseUnits.Undefined), - new UnitInfo(HeatFluxUnit.KilocaloriePerSecondSquareCentimeter, "KilocaloriesPerSecondSquareCentimeter", BaseUnits.Undefined), - new UnitInfo(HeatFluxUnit.KilowattPerSquareMeter, "KilowattsPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(HeatFluxUnit.MicrowattPerSquareMeter, "MicrowattsPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(HeatFluxUnit.MilliwattPerSquareMeter, "MilliwattsPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(HeatFluxUnit.NanowattPerSquareMeter, "NanowattsPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(HeatFluxUnit.PoundForcePerFootSecond, "PoundsForcePerFootSecond", BaseUnits.Undefined), - new UnitInfo(HeatFluxUnit.PoundPerSecondCubed, "PoundsPerSecondCubed", BaseUnits.Undefined), - new UnitInfo(HeatFluxUnit.WattPerSquareFoot, "WattsPerSquareFoot", BaseUnits.Undefined), - new UnitInfo(HeatFluxUnit.WattPerSquareInch, "WattsPerSquareInch", BaseUnits.Undefined), - new UnitInfo(HeatFluxUnit.WattPerSquareMeter, "WattsPerSquareMeter", new BaseUnits(mass: MassUnit.Kilogram, time: DurationUnit.Second)), + new UnitInfo(HeatFluxUnit.BtuPerHourSquareFoot, "BtusPerHourSquareFoot", BaseUnits.Undefined, "HeatFlux"), + new UnitInfo(HeatFluxUnit.BtuPerMinuteSquareFoot, "BtusPerMinuteSquareFoot", BaseUnits.Undefined, "HeatFlux"), + new UnitInfo(HeatFluxUnit.BtuPerSecondSquareFoot, "BtusPerSecondSquareFoot", BaseUnits.Undefined, "HeatFlux"), + new UnitInfo(HeatFluxUnit.BtuPerSecondSquareInch, "BtusPerSecondSquareInch", BaseUnits.Undefined, "HeatFlux"), + new UnitInfo(HeatFluxUnit.CaloriePerSecondSquareCentimeter, "CaloriesPerSecondSquareCentimeter", BaseUnits.Undefined, "HeatFlux"), + new UnitInfo(HeatFluxUnit.CentiwattPerSquareMeter, "CentiwattsPerSquareMeter", BaseUnits.Undefined, "HeatFlux"), + new UnitInfo(HeatFluxUnit.DeciwattPerSquareMeter, "DeciwattsPerSquareMeter", BaseUnits.Undefined, "HeatFlux"), + new UnitInfo(HeatFluxUnit.KilocaloriePerHourSquareMeter, "KilocaloriesPerHourSquareMeter", BaseUnits.Undefined, "HeatFlux"), + new UnitInfo(HeatFluxUnit.KilocaloriePerSecondSquareCentimeter, "KilocaloriesPerSecondSquareCentimeter", BaseUnits.Undefined, "HeatFlux"), + new UnitInfo(HeatFluxUnit.KilowattPerSquareMeter, "KilowattsPerSquareMeter", BaseUnits.Undefined, "HeatFlux"), + new UnitInfo(HeatFluxUnit.MicrowattPerSquareMeter, "MicrowattsPerSquareMeter", BaseUnits.Undefined, "HeatFlux"), + new UnitInfo(HeatFluxUnit.MilliwattPerSquareMeter, "MilliwattsPerSquareMeter", BaseUnits.Undefined, "HeatFlux"), + new UnitInfo(HeatFluxUnit.NanowattPerSquareMeter, "NanowattsPerSquareMeter", BaseUnits.Undefined, "HeatFlux"), + new UnitInfo(HeatFluxUnit.PoundForcePerFootSecond, "PoundsForcePerFootSecond", BaseUnits.Undefined, "HeatFlux"), + new UnitInfo(HeatFluxUnit.PoundPerSecondCubed, "PoundsPerSecondCubed", BaseUnits.Undefined, "HeatFlux"), + new UnitInfo(HeatFluxUnit.WattPerSquareFoot, "WattsPerSquareFoot", BaseUnits.Undefined, "HeatFlux"), + new UnitInfo(HeatFluxUnit.WattPerSquareInch, "WattsPerSquareInch", BaseUnits.Undefined, "HeatFlux"), + new UnitInfo(HeatFluxUnit.WattPerSquareMeter, "WattsPerSquareMeter", new BaseUnits(mass: MassUnit.Kilogram, time: DurationUnit.Second), "HeatFlux"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, HeatFluxUnit Unit), List>(); } /// @@ -159,11 +154,6 @@ public HeatFlux(double value, UnitSystem unitSystem) /// public static HeatFlux AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, HeatFluxUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -343,7 +333,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(HeatFluxUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(HeatFluxUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -353,34 +346,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(HeatFluxUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(HeatFluxUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.HeatFlux"; - var resourceManager = new ResourceManager(resourceName, typeof(HeatFlux).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -1127,9 +1093,6 @@ public HeatFlux ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs index 7d86a900b2..6bdcc2b5c6 100644 --- a/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,19 +65,17 @@ static HeatTransferCoefficient() Info = new QuantityInfo("HeatTransferCoefficient", new UnitInfo[] { - new UnitInfo(HeatTransferCoefficientUnit.BtuPerHourSquareFootDegreeFahrenheit, "BtusPerHourSquareFootDegreeFahrenheit", BaseUnits.Undefined), - new UnitInfo(HeatTransferCoefficientUnit.BtuPerSquareFootDegreeFahrenheit, "BtusPerSquareFootDegreeFahrenheit", BaseUnits.Undefined), - new UnitInfo(HeatTransferCoefficientUnit.CaloriePerHourSquareMeterDegreeCelsius, "CaloriesPerHourSquareMeterDegreeCelsius", BaseUnits.Undefined), - new UnitInfo(HeatTransferCoefficientUnit.KilocaloriePerHourSquareMeterDegreeCelsius, "KilocaloriesPerHourSquareMeterDegreeCelsius", BaseUnits.Undefined), - new UnitInfo(HeatTransferCoefficientUnit.WattPerSquareMeterCelsius, "WattsPerSquareMeterCelsius", BaseUnits.Undefined), - new UnitInfo(HeatTransferCoefficientUnit.WattPerSquareMeterKelvin, "WattsPerSquareMeterKelvin", BaseUnits.Undefined), + new UnitInfo(HeatTransferCoefficientUnit.BtuPerHourSquareFootDegreeFahrenheit, "BtusPerHourSquareFootDegreeFahrenheit", BaseUnits.Undefined, "HeatTransferCoefficient"), + new UnitInfo(HeatTransferCoefficientUnit.BtuPerSquareFootDegreeFahrenheit, "BtusPerSquareFootDegreeFahrenheit", BaseUnits.Undefined, "HeatTransferCoefficient"), + new UnitInfo(HeatTransferCoefficientUnit.CaloriePerHourSquareMeterDegreeCelsius, "CaloriesPerHourSquareMeterDegreeCelsius", BaseUnits.Undefined, "HeatTransferCoefficient"), + new UnitInfo(HeatTransferCoefficientUnit.KilocaloriePerHourSquareMeterDegreeCelsius, "KilocaloriesPerHourSquareMeterDegreeCelsius", BaseUnits.Undefined, "HeatTransferCoefficient"), + new UnitInfo(HeatTransferCoefficientUnit.WattPerSquareMeterCelsius, "WattsPerSquareMeterCelsius", BaseUnits.Undefined, "HeatTransferCoefficient"), + new UnitInfo(HeatTransferCoefficientUnit.WattPerSquareMeterKelvin, "WattsPerSquareMeterKelvin", BaseUnits.Undefined, "HeatTransferCoefficient"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, HeatTransferCoefficientUnit Unit), List>(); } /// @@ -147,11 +142,6 @@ public HeatTransferCoefficient(double value, UnitSystem unitSystem) /// public static HeatTransferCoefficient AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, HeatTransferCoefficientUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -248,7 +238,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(HeatTransferCoefficientUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(HeatTransferCoefficientUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -258,34 +251,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(HeatTransferCoefficientUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(HeatTransferCoefficientUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.HeatTransferCoefficient"; - var resourceManager = new ResourceManager(resourceName, typeof(HeatTransferCoefficient).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -889,9 +855,6 @@ public HeatTransferCoefficient ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs b/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs index d57f2da161..d6945a409e 100644 --- a/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -71,17 +68,15 @@ static Illuminance() Info = new QuantityInfo("Illuminance", new UnitInfo[] { - new UnitInfo(IlluminanceUnit.Kilolux, "Kilolux", BaseUnits.Undefined), - new UnitInfo(IlluminanceUnit.Lux, "Lux", BaseUnits.Undefined), - new UnitInfo(IlluminanceUnit.Megalux, "Megalux", BaseUnits.Undefined), - new UnitInfo(IlluminanceUnit.Millilux, "Millilux", BaseUnits.Undefined), + new UnitInfo(IlluminanceUnit.Kilolux, "Kilolux", BaseUnits.Undefined, "Illuminance"), + new UnitInfo(IlluminanceUnit.Lux, "Lux", BaseUnits.Undefined, "Illuminance"), + new UnitInfo(IlluminanceUnit.Megalux, "Megalux", BaseUnits.Undefined, "Illuminance"), + new UnitInfo(IlluminanceUnit.Millilux, "Millilux", BaseUnits.Undefined, "Illuminance"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, IlluminanceUnit Unit), List>(); } /// @@ -148,11 +143,6 @@ public Illuminance(double value, UnitSystem unitSystem) /// public static Illuminance AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, IlluminanceUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -234,7 +224,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(IlluminanceUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(IlluminanceUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -244,34 +237,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(IlluminanceUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(IlluminanceUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Illuminance"; - var resourceManager = new ResourceManager(resourceName, typeof(Illuminance).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -850,9 +816,6 @@ public Illuminance ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Impulse.g.cs b/UnitsNet/GeneratedCode/Quantities/Impulse.g.cs index 6730c1424b..702d2718de 100644 --- a/UnitsNet/GeneratedCode/Quantities/Impulse.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Impulse.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,26 +65,24 @@ static Impulse() Info = new QuantityInfo("Impulse", new UnitInfo[] { - new UnitInfo(ImpulseUnit.CentinewtonSecond, "CentinewtonSeconds", BaseUnits.Undefined), - new UnitInfo(ImpulseUnit.DecanewtonSecond, "DecanewtonSeconds", BaseUnits.Undefined), - new UnitInfo(ImpulseUnit.DecinewtonSecond, "DecinewtonSeconds", BaseUnits.Undefined), - new UnitInfo(ImpulseUnit.KilogramMeterPerSecond, "KilogramMetersPerSecond", BaseUnits.Undefined), - new UnitInfo(ImpulseUnit.KilonewtonSecond, "KilonewtonSeconds", BaseUnits.Undefined), - new UnitInfo(ImpulseUnit.MeganewtonSecond, "MeganewtonSeconds", BaseUnits.Undefined), - new UnitInfo(ImpulseUnit.MicronewtonSecond, "MicronewtonSeconds", BaseUnits.Undefined), - new UnitInfo(ImpulseUnit.MillinewtonSecond, "MillinewtonSeconds", BaseUnits.Undefined), - new UnitInfo(ImpulseUnit.NanonewtonSecond, "NanonewtonSeconds", BaseUnits.Undefined), - new UnitInfo(ImpulseUnit.NewtonSecond, "NewtonSeconds", BaseUnits.Undefined), - new UnitInfo(ImpulseUnit.PoundFootPerSecond, "PoundFeetPerSecond", BaseUnits.Undefined), - new UnitInfo(ImpulseUnit.PoundForceSecond, "PoundForceSeconds", BaseUnits.Undefined), - new UnitInfo(ImpulseUnit.SlugFootPerSecond, "SlugFeetPerSecond", BaseUnits.Undefined), + new UnitInfo(ImpulseUnit.CentinewtonSecond, "CentinewtonSeconds", BaseUnits.Undefined, "Impulse"), + new UnitInfo(ImpulseUnit.DecanewtonSecond, "DecanewtonSeconds", BaseUnits.Undefined, "Impulse"), + new UnitInfo(ImpulseUnit.DecinewtonSecond, "DecinewtonSeconds", BaseUnits.Undefined, "Impulse"), + new UnitInfo(ImpulseUnit.KilogramMeterPerSecond, "KilogramMetersPerSecond", BaseUnits.Undefined, "Impulse"), + new UnitInfo(ImpulseUnit.KilonewtonSecond, "KilonewtonSeconds", BaseUnits.Undefined, "Impulse"), + new UnitInfo(ImpulseUnit.MeganewtonSecond, "MeganewtonSeconds", BaseUnits.Undefined, "Impulse"), + new UnitInfo(ImpulseUnit.MicronewtonSecond, "MicronewtonSeconds", BaseUnits.Undefined, "Impulse"), + new UnitInfo(ImpulseUnit.MillinewtonSecond, "MillinewtonSeconds", BaseUnits.Undefined, "Impulse"), + new UnitInfo(ImpulseUnit.NanonewtonSecond, "NanonewtonSeconds", BaseUnits.Undefined, "Impulse"), + new UnitInfo(ImpulseUnit.NewtonSecond, "NewtonSeconds", BaseUnits.Undefined, "Impulse"), + new UnitInfo(ImpulseUnit.PoundFootPerSecond, "PoundFeetPerSecond", BaseUnits.Undefined, "Impulse"), + new UnitInfo(ImpulseUnit.PoundForceSecond, "PoundForceSeconds", BaseUnits.Undefined, "Impulse"), + new UnitInfo(ImpulseUnit.SlugFootPerSecond, "SlugFeetPerSecond", BaseUnits.Undefined, "Impulse"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ImpulseUnit Unit), List>(); } /// @@ -154,11 +149,6 @@ public Impulse(double value, UnitSystem unitSystem) /// public static Impulse AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, ImpulseUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -303,7 +293,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ImpulseUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(ImpulseUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -313,34 +306,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ImpulseUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(ImpulseUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Impulse"; - var resourceManager = new ResourceManager(resourceName, typeof(Impulse).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -1027,9 +993,6 @@ public Impulse ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Information.g.cs b/UnitsNet/GeneratedCode/Quantities/Information.g.cs index 1446eea011..945ce3cd51 100644 --- a/UnitsNet/GeneratedCode/Quantities/Information.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Information.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -69,39 +66,37 @@ static Information() Info = new QuantityInfo("Information", new UnitInfo[] { - new UnitInfo(InformationUnit.Bit, "Bits", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Byte, "Bytes", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Exabit, "Exabits", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Exabyte, "Exabytes", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Exbibit, "Exbibits", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Exbibyte, "Exbibytes", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Gibibit, "Gibibits", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Gibibyte, "Gibibytes", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Gigabit, "Gigabits", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Gigabyte, "Gigabytes", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Kibibit, "Kibibits", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Kibibyte, "Kibibytes", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Kilobit, "Kilobits", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Kilobyte, "Kilobytes", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Mebibit, "Mebibits", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Mebibyte, "Mebibytes", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Megabit, "Megabits", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Megabyte, "Megabytes", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Pebibit, "Pebibits", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Pebibyte, "Pebibytes", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Petabit, "Petabits", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Petabyte, "Petabytes", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Tebibit, "Tebibits", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Tebibyte, "Tebibytes", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Terabit, "Terabits", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Terabyte, "Terabytes", BaseUnits.Undefined), + new UnitInfo(InformationUnit.Bit, "Bits", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Byte, "Bytes", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Exabit, "Exabits", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Exabyte, "Exabytes", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Exbibit, "Exbibits", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Exbibyte, "Exbibytes", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Gibibit, "Gibibits", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Gibibyte, "Gibibytes", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Gigabit, "Gigabits", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Gigabyte, "Gigabytes", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Kibibit, "Kibibits", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Kibibyte, "Kibibytes", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Kilobit, "Kilobits", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Kilobyte, "Kilobytes", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Mebibit, "Mebibits", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Mebibyte, "Mebibytes", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Megabit, "Megabits", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Megabyte, "Megabytes", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Pebibit, "Pebibits", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Pebibyte, "Pebibytes", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Petabit, "Petabits", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Petabyte, "Petabytes", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Tebibit, "Tebibits", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Tebibyte, "Tebibytes", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Terabit, "Terabits", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Terabyte, "Terabytes", BaseUnits.Undefined, "Information"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, InformationUnit Unit), List>(); } /// @@ -168,11 +163,6 @@ public Information(decimal value, UnitSystem unitSystem) /// public static Information AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, InformationUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -408,7 +398,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(InformationUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(InformationUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -418,34 +411,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(InformationUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(InformationUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Information"; - var resourceManager = new ResourceManager(resourceName, typeof(Information).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -1299,9 +1265,6 @@ public Information ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs b/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs index 63e5372db9..67a14d2cfb 100644 --- a/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,27 +65,25 @@ static Irradiance() Info = new QuantityInfo("Irradiance", new UnitInfo[] { - new UnitInfo(IrradianceUnit.KilowattPerSquareCentimeter, "KilowattsPerSquareCentimeter", BaseUnits.Undefined), - new UnitInfo(IrradianceUnit.KilowattPerSquareMeter, "KilowattsPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(IrradianceUnit.MegawattPerSquareCentimeter, "MegawattsPerSquareCentimeter", BaseUnits.Undefined), - new UnitInfo(IrradianceUnit.MegawattPerSquareMeter, "MegawattsPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(IrradianceUnit.MicrowattPerSquareCentimeter, "MicrowattsPerSquareCentimeter", BaseUnits.Undefined), - new UnitInfo(IrradianceUnit.MicrowattPerSquareMeter, "MicrowattsPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(IrradianceUnit.MilliwattPerSquareCentimeter, "MilliwattsPerSquareCentimeter", BaseUnits.Undefined), - new UnitInfo(IrradianceUnit.MilliwattPerSquareMeter, "MilliwattsPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(IrradianceUnit.NanowattPerSquareCentimeter, "NanowattsPerSquareCentimeter", BaseUnits.Undefined), - new UnitInfo(IrradianceUnit.NanowattPerSquareMeter, "NanowattsPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(IrradianceUnit.PicowattPerSquareCentimeter, "PicowattsPerSquareCentimeter", BaseUnits.Undefined), - new UnitInfo(IrradianceUnit.PicowattPerSquareMeter, "PicowattsPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(IrradianceUnit.WattPerSquareCentimeter, "WattsPerSquareCentimeter", BaseUnits.Undefined), - new UnitInfo(IrradianceUnit.WattPerSquareMeter, "WattsPerSquareMeter", BaseUnits.Undefined), + new UnitInfo(IrradianceUnit.KilowattPerSquareCentimeter, "KilowattsPerSquareCentimeter", BaseUnits.Undefined, "Irradiance"), + new UnitInfo(IrradianceUnit.KilowattPerSquareMeter, "KilowattsPerSquareMeter", BaseUnits.Undefined, "Irradiance"), + new UnitInfo(IrradianceUnit.MegawattPerSquareCentimeter, "MegawattsPerSquareCentimeter", BaseUnits.Undefined, "Irradiance"), + new UnitInfo(IrradianceUnit.MegawattPerSquareMeter, "MegawattsPerSquareMeter", BaseUnits.Undefined, "Irradiance"), + new UnitInfo(IrradianceUnit.MicrowattPerSquareCentimeter, "MicrowattsPerSquareCentimeter", BaseUnits.Undefined, "Irradiance"), + new UnitInfo(IrradianceUnit.MicrowattPerSquareMeter, "MicrowattsPerSquareMeter", BaseUnits.Undefined, "Irradiance"), + new UnitInfo(IrradianceUnit.MilliwattPerSquareCentimeter, "MilliwattsPerSquareCentimeter", BaseUnits.Undefined, "Irradiance"), + new UnitInfo(IrradianceUnit.MilliwattPerSquareMeter, "MilliwattsPerSquareMeter", BaseUnits.Undefined, "Irradiance"), + new UnitInfo(IrradianceUnit.NanowattPerSquareCentimeter, "NanowattsPerSquareCentimeter", BaseUnits.Undefined, "Irradiance"), + new UnitInfo(IrradianceUnit.NanowattPerSquareMeter, "NanowattsPerSquareMeter", BaseUnits.Undefined, "Irradiance"), + new UnitInfo(IrradianceUnit.PicowattPerSquareCentimeter, "PicowattsPerSquareCentimeter", BaseUnits.Undefined, "Irradiance"), + new UnitInfo(IrradianceUnit.PicowattPerSquareMeter, "PicowattsPerSquareMeter", BaseUnits.Undefined, "Irradiance"), + new UnitInfo(IrradianceUnit.WattPerSquareCentimeter, "WattsPerSquareCentimeter", BaseUnits.Undefined, "Irradiance"), + new UnitInfo(IrradianceUnit.WattPerSquareMeter, "WattsPerSquareMeter", BaseUnits.Undefined, "Irradiance"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, IrradianceUnit Unit), List>(); } /// @@ -155,11 +150,6 @@ public Irradiance(double value, UnitSystem unitSystem) /// public static Irradiance AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, IrradianceUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -311,7 +301,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(IrradianceUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(IrradianceUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -321,34 +314,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(IrradianceUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(IrradianceUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Irradiance"; - var resourceManager = new ResourceManager(resourceName, typeof(Irradiance).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -1047,9 +1013,6 @@ public Irradiance ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs b/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs index 050bffa586..415eaf95d7 100644 --- a/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -71,20 +68,18 @@ static Irradiation() Info = new QuantityInfo("Irradiation", new UnitInfo[] { - new UnitInfo(IrradiationUnit.JoulePerSquareCentimeter, "JoulesPerSquareCentimeter", BaseUnits.Undefined), - new UnitInfo(IrradiationUnit.JoulePerSquareMeter, "JoulesPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(IrradiationUnit.JoulePerSquareMillimeter, "JoulesPerSquareMillimeter", BaseUnits.Undefined), - new UnitInfo(IrradiationUnit.KilojoulePerSquareMeter, "KilojoulesPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(IrradiationUnit.KilowattHourPerSquareMeter, "KilowattHoursPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(IrradiationUnit.MillijoulePerSquareCentimeter, "MillijoulesPerSquareCentimeter", BaseUnits.Undefined), - new UnitInfo(IrradiationUnit.WattHourPerSquareMeter, "WattHoursPerSquareMeter", BaseUnits.Undefined), + new UnitInfo(IrradiationUnit.JoulePerSquareCentimeter, "JoulesPerSquareCentimeter", BaseUnits.Undefined, "Irradiation"), + new UnitInfo(IrradiationUnit.JoulePerSquareMeter, "JoulesPerSquareMeter", BaseUnits.Undefined, "Irradiation"), + new UnitInfo(IrradiationUnit.JoulePerSquareMillimeter, "JoulesPerSquareMillimeter", BaseUnits.Undefined, "Irradiation"), + new UnitInfo(IrradiationUnit.KilojoulePerSquareMeter, "KilojoulesPerSquareMeter", BaseUnits.Undefined, "Irradiation"), + new UnitInfo(IrradiationUnit.KilowattHourPerSquareMeter, "KilowattHoursPerSquareMeter", BaseUnits.Undefined, "Irradiation"), + new UnitInfo(IrradiationUnit.MillijoulePerSquareCentimeter, "MillijoulesPerSquareCentimeter", BaseUnits.Undefined, "Irradiation"), + new UnitInfo(IrradiationUnit.WattHourPerSquareMeter, "WattHoursPerSquareMeter", BaseUnits.Undefined, "Irradiation"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, IrradiationUnit Unit), List>(); } /// @@ -151,11 +146,6 @@ public Irradiation(double value, UnitSystem unitSystem) /// public static Irradiation AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, IrradiationUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -258,7 +248,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(IrradiationUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(IrradiationUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -268,34 +261,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(IrradiationUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(IrradiationUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Irradiation"; - var resourceManager = new ResourceManager(resourceName, typeof(Irradiation).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -910,9 +876,6 @@ public Irradiation ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Jerk.g.cs b/UnitsNet/GeneratedCode/Quantities/Jerk.g.cs index 5f56cc1b54..fcdfff4d41 100644 --- a/UnitsNet/GeneratedCode/Quantities/Jerk.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Jerk.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,24 +65,22 @@ static Jerk() Info = new QuantityInfo("Jerk", new UnitInfo[] { - new UnitInfo(JerkUnit.CentimeterPerSecondCubed, "CentimetersPerSecondCubed", BaseUnits.Undefined), - new UnitInfo(JerkUnit.DecimeterPerSecondCubed, "DecimetersPerSecondCubed", BaseUnits.Undefined), - new UnitInfo(JerkUnit.FootPerSecondCubed, "FeetPerSecondCubed", new BaseUnits(length: LengthUnit.Foot, time: DurationUnit.Second)), - new UnitInfo(JerkUnit.InchPerSecondCubed, "InchesPerSecondCubed", new BaseUnits(length: LengthUnit.Inch, time: DurationUnit.Second)), - new UnitInfo(JerkUnit.KilometerPerSecondCubed, "KilometersPerSecondCubed", BaseUnits.Undefined), - new UnitInfo(JerkUnit.MeterPerSecondCubed, "MetersPerSecondCubed", new BaseUnits(length: LengthUnit.Meter, time: DurationUnit.Second)), - new UnitInfo(JerkUnit.MicrometerPerSecondCubed, "MicrometersPerSecondCubed", BaseUnits.Undefined), - new UnitInfo(JerkUnit.MillimeterPerSecondCubed, "MillimetersPerSecondCubed", BaseUnits.Undefined), - new UnitInfo(JerkUnit.MillistandardGravitiesPerSecond, "MillistandardGravitiesPerSecond", BaseUnits.Undefined), - new UnitInfo(JerkUnit.NanometerPerSecondCubed, "NanometersPerSecondCubed", BaseUnits.Undefined), - new UnitInfo(JerkUnit.StandardGravitiesPerSecond, "StandardGravitiesPerSecond", new BaseUnits(length: LengthUnit.Meter, time: DurationUnit.Second)), + new UnitInfo(JerkUnit.CentimeterPerSecondCubed, "CentimetersPerSecondCubed", BaseUnits.Undefined, "Jerk"), + new UnitInfo(JerkUnit.DecimeterPerSecondCubed, "DecimetersPerSecondCubed", BaseUnits.Undefined, "Jerk"), + new UnitInfo(JerkUnit.FootPerSecondCubed, "FeetPerSecondCubed", new BaseUnits(length: LengthUnit.Foot, time: DurationUnit.Second), "Jerk"), + new UnitInfo(JerkUnit.InchPerSecondCubed, "InchesPerSecondCubed", new BaseUnits(length: LengthUnit.Inch, time: DurationUnit.Second), "Jerk"), + new UnitInfo(JerkUnit.KilometerPerSecondCubed, "KilometersPerSecondCubed", BaseUnits.Undefined, "Jerk"), + new UnitInfo(JerkUnit.MeterPerSecondCubed, "MetersPerSecondCubed", new BaseUnits(length: LengthUnit.Meter, time: DurationUnit.Second), "Jerk"), + new UnitInfo(JerkUnit.MicrometerPerSecondCubed, "MicrometersPerSecondCubed", BaseUnits.Undefined, "Jerk"), + new UnitInfo(JerkUnit.MillimeterPerSecondCubed, "MillimetersPerSecondCubed", BaseUnits.Undefined, "Jerk"), + new UnitInfo(JerkUnit.MillistandardGravitiesPerSecond, "MillistandardGravitiesPerSecond", BaseUnits.Undefined, "Jerk"), + new UnitInfo(JerkUnit.NanometerPerSecondCubed, "NanometersPerSecondCubed", BaseUnits.Undefined, "Jerk"), + new UnitInfo(JerkUnit.StandardGravitiesPerSecond, "StandardGravitiesPerSecond", new BaseUnits(length: LengthUnit.Meter, time: DurationUnit.Second), "Jerk"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, JerkUnit Unit), List>(); } /// @@ -152,11 +147,6 @@ public Jerk(double value, UnitSystem unitSystem) /// public static Jerk AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, JerkUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -287,7 +277,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(JerkUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(JerkUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -297,34 +290,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(JerkUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(JerkUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Jerk"; - var resourceManager = new ResourceManager(resourceName, typeof(Jerk).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -987,9 +953,6 @@ public Jerk ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs index d6278c55a5..541fc848e2 100644 --- a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -71,22 +68,20 @@ static KinematicViscosity() Info = new QuantityInfo("KinematicViscosity", new UnitInfo[] { - new UnitInfo(KinematicViscosityUnit.Centistokes, "Centistokes", BaseUnits.Undefined), - new UnitInfo(KinematicViscosityUnit.Decistokes, "Decistokes", BaseUnits.Undefined), - new UnitInfo(KinematicViscosityUnit.Kilostokes, "Kilostokes", BaseUnits.Undefined), - new UnitInfo(KinematicViscosityUnit.Microstokes, "Microstokes", BaseUnits.Undefined), - new UnitInfo(KinematicViscosityUnit.Millistokes, "Millistokes", BaseUnits.Undefined), - new UnitInfo(KinematicViscosityUnit.Nanostokes, "Nanostokes", BaseUnits.Undefined), - new UnitInfo(KinematicViscosityUnit.SquareFootPerSecond, "SquareFeetPerSecond", BaseUnits.Undefined), - new UnitInfo(KinematicViscosityUnit.SquareMeterPerSecond, "SquareMetersPerSecond", BaseUnits.Undefined), - new UnitInfo(KinematicViscosityUnit.Stokes, "Stokes", BaseUnits.Undefined), + new UnitInfo(KinematicViscosityUnit.Centistokes, "Centistokes", BaseUnits.Undefined, "KinematicViscosity"), + new UnitInfo(KinematicViscosityUnit.Decistokes, "Decistokes", BaseUnits.Undefined, "KinematicViscosity"), + new UnitInfo(KinematicViscosityUnit.Kilostokes, "Kilostokes", BaseUnits.Undefined, "KinematicViscosity"), + new UnitInfo(KinematicViscosityUnit.Microstokes, "Microstokes", BaseUnits.Undefined, "KinematicViscosity"), + new UnitInfo(KinematicViscosityUnit.Millistokes, "Millistokes", BaseUnits.Undefined, "KinematicViscosity"), + new UnitInfo(KinematicViscosityUnit.Nanostokes, "Nanostokes", BaseUnits.Undefined, "KinematicViscosity"), + new UnitInfo(KinematicViscosityUnit.SquareFootPerSecond, "SquareFeetPerSecond", BaseUnits.Undefined, "KinematicViscosity"), + new UnitInfo(KinematicViscosityUnit.SquareMeterPerSecond, "SquareMetersPerSecond", BaseUnits.Undefined, "KinematicViscosity"), + new UnitInfo(KinematicViscosityUnit.Stokes, "Stokes", BaseUnits.Undefined, "KinematicViscosity"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, KinematicViscosityUnit Unit), List>(); } /// @@ -153,11 +148,6 @@ public KinematicViscosity(double value, UnitSystem unitSystem) /// public static KinematicViscosity AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, KinematicViscosityUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -274,7 +264,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(KinematicViscosityUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(KinematicViscosityUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -284,34 +277,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(KinematicViscosityUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(KinematicViscosityUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.KinematicViscosity"; - var resourceManager = new ResourceManager(resourceName, typeof(KinematicViscosity).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -950,9 +916,6 @@ public KinematicViscosity ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/LeakRate.g.cs b/UnitsNet/GeneratedCode/Quantities/LeakRate.g.cs index 182a778254..4d7272597e 100644 --- a/UnitsNet/GeneratedCode/Quantities/LeakRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LeakRate.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -71,16 +68,14 @@ static LeakRate() Info = new QuantityInfo("LeakRate", new UnitInfo[] { - new UnitInfo(LeakRateUnit.MillibarLiterPerSecond, "MillibarLitersPerSecond", BaseUnits.Undefined), - new UnitInfo(LeakRateUnit.PascalCubicMeterPerSecond, "PascalCubicMetersPerSecond", BaseUnits.Undefined), - new UnitInfo(LeakRateUnit.TorrLiterPerSecond, "TorrLitersPerSecond", BaseUnits.Undefined), + new UnitInfo(LeakRateUnit.MillibarLiterPerSecond, "MillibarLitersPerSecond", BaseUnits.Undefined, "LeakRate"), + new UnitInfo(LeakRateUnit.PascalCubicMeterPerSecond, "PascalCubicMetersPerSecond", BaseUnits.Undefined, "LeakRate"), + new UnitInfo(LeakRateUnit.TorrLiterPerSecond, "TorrLitersPerSecond", BaseUnits.Undefined, "LeakRate"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, LeakRateUnit Unit), List>(); } /// @@ -147,11 +142,6 @@ public LeakRate(double value, UnitSystem unitSystem) /// public static LeakRate AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, LeakRateUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -226,7 +216,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(LeakRateUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(LeakRateUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -236,34 +229,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(LeakRateUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(LeakRateUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.LeakRate"; - var resourceManager = new ResourceManager(resourceName, typeof(LeakRate).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -830,9 +796,6 @@ public LeakRate ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Length.g.cs b/UnitsNet/GeneratedCode/Quantities/Length.g.cs index 6b5429c507..900df075be 100644 --- a/UnitsNet/GeneratedCode/Quantities/Length.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Length.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,50 +65,48 @@ static Length() Info = new QuantityInfo("Length", new UnitInfo[] { - new UnitInfo(LengthUnit.Angstrom, "Angstroms", BaseUnits.Undefined), - new UnitInfo(LengthUnit.AstronomicalUnit, "AstronomicalUnits", BaseUnits.Undefined), - new UnitInfo(LengthUnit.Centimeter, "Centimeters", BaseUnits.Undefined), - new UnitInfo(LengthUnit.Chain, "Chains", new BaseUnits(length: LengthUnit.Chain)), - new UnitInfo(LengthUnit.DataMile, "DataMiles", BaseUnits.Undefined), - new UnitInfo(LengthUnit.Decameter, "Decameters", BaseUnits.Undefined), - new UnitInfo(LengthUnit.Decimeter, "Decimeters", BaseUnits.Undefined), - new UnitInfo(LengthUnit.DtpPica, "DtpPicas", new BaseUnits(length: LengthUnit.DtpPica)), - new UnitInfo(LengthUnit.DtpPoint, "DtpPoints", new BaseUnits(length: LengthUnit.DtpPoint)), - new UnitInfo(LengthUnit.Fathom, "Fathoms", new BaseUnits(length: LengthUnit.Fathom)), - new UnitInfo(LengthUnit.Foot, "Feet", new BaseUnits(length: LengthUnit.Foot)), - new UnitInfo(LengthUnit.Hand, "Hands", new BaseUnits(length: LengthUnit.Hand)), - new UnitInfo(LengthUnit.Hectometer, "Hectometers", BaseUnits.Undefined), - new UnitInfo(LengthUnit.Inch, "Inches", new BaseUnits(length: LengthUnit.Inch)), - new UnitInfo(LengthUnit.KilolightYear, "KilolightYears", BaseUnits.Undefined), - new UnitInfo(LengthUnit.Kilometer, "Kilometers", BaseUnits.Undefined), - new UnitInfo(LengthUnit.Kiloparsec, "Kiloparsecs", BaseUnits.Undefined), - new UnitInfo(LengthUnit.LightYear, "LightYears", BaseUnits.Undefined), - new UnitInfo(LengthUnit.MegalightYear, "MegalightYears", BaseUnits.Undefined), - new UnitInfo(LengthUnit.Megameter, "Megameters", BaseUnits.Undefined), - new UnitInfo(LengthUnit.Megaparsec, "Megaparsecs", BaseUnits.Undefined), - new UnitInfo(LengthUnit.Meter, "Meters", new BaseUnits(length: LengthUnit.Meter)), - new UnitInfo(LengthUnit.Microinch, "Microinches", new BaseUnits(length: LengthUnit.Microinch)), - new UnitInfo(LengthUnit.Micrometer, "Micrometers", BaseUnits.Undefined), - new UnitInfo(LengthUnit.Mil, "Mils", new BaseUnits(length: LengthUnit.Mil)), - new UnitInfo(LengthUnit.Mile, "Miles", new BaseUnits(length: LengthUnit.Mile)), - new UnitInfo(LengthUnit.Millimeter, "Millimeters", BaseUnits.Undefined), - new UnitInfo(LengthUnit.Nanometer, "Nanometers", BaseUnits.Undefined), - new UnitInfo(LengthUnit.NauticalMile, "NauticalMiles", new BaseUnits(length: LengthUnit.NauticalMile)), - new UnitInfo(LengthUnit.Parsec, "Parsecs", BaseUnits.Undefined), - new UnitInfo(LengthUnit.PrinterPica, "PrinterPicas", new BaseUnits(length: LengthUnit.PrinterPica)), - new UnitInfo(LengthUnit.PrinterPoint, "PrinterPoints", new BaseUnits(length: LengthUnit.PrinterPoint)), - new UnitInfo(LengthUnit.Shackle, "Shackles", new BaseUnits(length: LengthUnit.Shackle)), - new UnitInfo(LengthUnit.SolarRadius, "SolarRadiuses", BaseUnits.Undefined), - new UnitInfo(LengthUnit.Twip, "Twips", new BaseUnits(length: LengthUnit.Twip)), - new UnitInfo(LengthUnit.UsSurveyFoot, "UsSurveyFeet", new BaseUnits(length: LengthUnit.UsSurveyFoot)), - new UnitInfo(LengthUnit.Yard, "Yards", new BaseUnits(length: LengthUnit.Yard)), + new UnitInfo(LengthUnit.Angstrom, "Angstroms", BaseUnits.Undefined, "Length"), + new UnitInfo(LengthUnit.AstronomicalUnit, "AstronomicalUnits", BaseUnits.Undefined, "Length"), + new UnitInfo(LengthUnit.Centimeter, "Centimeters", BaseUnits.Undefined, "Length"), + new UnitInfo(LengthUnit.Chain, "Chains", new BaseUnits(length: LengthUnit.Chain), "Length"), + new UnitInfo(LengthUnit.DataMile, "DataMiles", BaseUnits.Undefined, "Length"), + new UnitInfo(LengthUnit.Decameter, "Decameters", BaseUnits.Undefined, "Length"), + new UnitInfo(LengthUnit.Decimeter, "Decimeters", BaseUnits.Undefined, "Length"), + new UnitInfo(LengthUnit.DtpPica, "DtpPicas", new BaseUnits(length: LengthUnit.DtpPica), "Length"), + new UnitInfo(LengthUnit.DtpPoint, "DtpPoints", new BaseUnits(length: LengthUnit.DtpPoint), "Length"), + new UnitInfo(LengthUnit.Fathom, "Fathoms", new BaseUnits(length: LengthUnit.Fathom), "Length"), + new UnitInfo(LengthUnit.Foot, "Feet", new BaseUnits(length: LengthUnit.Foot), "Length"), + new UnitInfo(LengthUnit.Hand, "Hands", new BaseUnits(length: LengthUnit.Hand), "Length"), + new UnitInfo(LengthUnit.Hectometer, "Hectometers", BaseUnits.Undefined, "Length"), + new UnitInfo(LengthUnit.Inch, "Inches", new BaseUnits(length: LengthUnit.Inch), "Length"), + new UnitInfo(LengthUnit.KilolightYear, "KilolightYears", BaseUnits.Undefined, "Length"), + new UnitInfo(LengthUnit.Kilometer, "Kilometers", BaseUnits.Undefined, "Length"), + new UnitInfo(LengthUnit.Kiloparsec, "Kiloparsecs", BaseUnits.Undefined, "Length"), + new UnitInfo(LengthUnit.LightYear, "LightYears", BaseUnits.Undefined, "Length"), + new UnitInfo(LengthUnit.MegalightYear, "MegalightYears", BaseUnits.Undefined, "Length"), + new UnitInfo(LengthUnit.Megameter, "Megameters", BaseUnits.Undefined, "Length"), + new UnitInfo(LengthUnit.Megaparsec, "Megaparsecs", BaseUnits.Undefined, "Length"), + new UnitInfo(LengthUnit.Meter, "Meters", new BaseUnits(length: LengthUnit.Meter), "Length"), + new UnitInfo(LengthUnit.Microinch, "Microinches", new BaseUnits(length: LengthUnit.Microinch), "Length"), + new UnitInfo(LengthUnit.Micrometer, "Micrometers", BaseUnits.Undefined, "Length"), + new UnitInfo(LengthUnit.Mil, "Mils", new BaseUnits(length: LengthUnit.Mil), "Length"), + new UnitInfo(LengthUnit.Mile, "Miles", new BaseUnits(length: LengthUnit.Mile), "Length"), + new UnitInfo(LengthUnit.Millimeter, "Millimeters", BaseUnits.Undefined, "Length"), + new UnitInfo(LengthUnit.Nanometer, "Nanometers", BaseUnits.Undefined, "Length"), + new UnitInfo(LengthUnit.NauticalMile, "NauticalMiles", new BaseUnits(length: LengthUnit.NauticalMile), "Length"), + new UnitInfo(LengthUnit.Parsec, "Parsecs", BaseUnits.Undefined, "Length"), + new UnitInfo(LengthUnit.PrinterPica, "PrinterPicas", new BaseUnits(length: LengthUnit.PrinterPica), "Length"), + new UnitInfo(LengthUnit.PrinterPoint, "PrinterPoints", new BaseUnits(length: LengthUnit.PrinterPoint), "Length"), + new UnitInfo(LengthUnit.Shackle, "Shackles", new BaseUnits(length: LengthUnit.Shackle), "Length"), + new UnitInfo(LengthUnit.SolarRadius, "SolarRadiuses", BaseUnits.Undefined, "Length"), + new UnitInfo(LengthUnit.Twip, "Twips", new BaseUnits(length: LengthUnit.Twip), "Length"), + new UnitInfo(LengthUnit.UsSurveyFoot, "UsSurveyFeet", new BaseUnits(length: LengthUnit.UsSurveyFoot), "Length"), + new UnitInfo(LengthUnit.Yard, "Yards", new BaseUnits(length: LengthUnit.Yard), "Length"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, LengthUnit Unit), List>(); } /// @@ -178,11 +173,6 @@ public Length(double value, UnitSystem unitSystem) /// public static Length AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, LengthUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -495,7 +485,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(LengthUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(LengthUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -505,34 +498,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(LengthUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(LengthUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Length"; - var resourceManager = new ResourceManager(resourceName, typeof(Length).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -1507,9 +1473,6 @@ public Length ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Level.g.cs b/UnitsNet/GeneratedCode/Quantities/Level.g.cs index d2542c0514..60e24bf227 100644 --- a/UnitsNet/GeneratedCode/Quantities/Level.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Level.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,15 +65,13 @@ static Level() Info = new QuantityInfo("Level", new UnitInfo[] { - new UnitInfo(LevelUnit.Decibel, "Decibels", BaseUnits.Undefined), - new UnitInfo(LevelUnit.Neper, "Nepers", BaseUnits.Undefined), + new UnitInfo(LevelUnit.Decibel, "Decibels", BaseUnits.Undefined, "Level"), + new UnitInfo(LevelUnit.Neper, "Nepers", BaseUnits.Undefined, "Level"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, LevelUnit Unit), List>(); } /// @@ -143,11 +138,6 @@ public Level(double value, UnitSystem unitSystem) /// public static Level AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, LevelUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -215,7 +205,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(LevelUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(LevelUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -225,34 +218,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(LevelUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(LevelUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Level"; - var resourceManager = new ResourceManager(resourceName, typeof(Level).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -815,9 +781,6 @@ public Level ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs index f80faedbdf..6a945b8db7 100644 --- a/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -71,27 +68,25 @@ static LinearDensity() Info = new QuantityInfo("LinearDensity", new UnitInfo[] { - new UnitInfo(LinearDensityUnit.GramPerCentimeter, "GramsPerCentimeter", BaseUnits.Undefined), - new UnitInfo(LinearDensityUnit.GramPerMeter, "GramsPerMeter", BaseUnits.Undefined), - new UnitInfo(LinearDensityUnit.GramPerMillimeter, "GramsPerMillimeter", BaseUnits.Undefined), - new UnitInfo(LinearDensityUnit.KilogramPerCentimeter, "KilogramsPerCentimeter", BaseUnits.Undefined), - new UnitInfo(LinearDensityUnit.KilogramPerMeter, "KilogramsPerMeter", BaseUnits.Undefined), - new UnitInfo(LinearDensityUnit.KilogramPerMillimeter, "KilogramsPerMillimeter", BaseUnits.Undefined), - new UnitInfo(LinearDensityUnit.MicrogramPerCentimeter, "MicrogramsPerCentimeter", BaseUnits.Undefined), - new UnitInfo(LinearDensityUnit.MicrogramPerMeter, "MicrogramsPerMeter", BaseUnits.Undefined), - new UnitInfo(LinearDensityUnit.MicrogramPerMillimeter, "MicrogramsPerMillimeter", BaseUnits.Undefined), - new UnitInfo(LinearDensityUnit.MilligramPerCentimeter, "MilligramsPerCentimeter", BaseUnits.Undefined), - new UnitInfo(LinearDensityUnit.MilligramPerMeter, "MilligramsPerMeter", BaseUnits.Undefined), - new UnitInfo(LinearDensityUnit.MilligramPerMillimeter, "MilligramsPerMillimeter", BaseUnits.Undefined), - new UnitInfo(LinearDensityUnit.PoundPerFoot, "PoundsPerFoot", BaseUnits.Undefined), - new UnitInfo(LinearDensityUnit.PoundPerInch, "PoundsPerInch", BaseUnits.Undefined), + new UnitInfo(LinearDensityUnit.GramPerCentimeter, "GramsPerCentimeter", BaseUnits.Undefined, "LinearDensity"), + new UnitInfo(LinearDensityUnit.GramPerMeter, "GramsPerMeter", BaseUnits.Undefined, "LinearDensity"), + new UnitInfo(LinearDensityUnit.GramPerMillimeter, "GramsPerMillimeter", BaseUnits.Undefined, "LinearDensity"), + new UnitInfo(LinearDensityUnit.KilogramPerCentimeter, "KilogramsPerCentimeter", BaseUnits.Undefined, "LinearDensity"), + new UnitInfo(LinearDensityUnit.KilogramPerMeter, "KilogramsPerMeter", BaseUnits.Undefined, "LinearDensity"), + new UnitInfo(LinearDensityUnit.KilogramPerMillimeter, "KilogramsPerMillimeter", BaseUnits.Undefined, "LinearDensity"), + new UnitInfo(LinearDensityUnit.MicrogramPerCentimeter, "MicrogramsPerCentimeter", BaseUnits.Undefined, "LinearDensity"), + new UnitInfo(LinearDensityUnit.MicrogramPerMeter, "MicrogramsPerMeter", BaseUnits.Undefined, "LinearDensity"), + new UnitInfo(LinearDensityUnit.MicrogramPerMillimeter, "MicrogramsPerMillimeter", BaseUnits.Undefined, "LinearDensity"), + new UnitInfo(LinearDensityUnit.MilligramPerCentimeter, "MilligramsPerCentimeter", BaseUnits.Undefined, "LinearDensity"), + new UnitInfo(LinearDensityUnit.MilligramPerMeter, "MilligramsPerMeter", BaseUnits.Undefined, "LinearDensity"), + new UnitInfo(LinearDensityUnit.MilligramPerMillimeter, "MilligramsPerMillimeter", BaseUnits.Undefined, "LinearDensity"), + new UnitInfo(LinearDensityUnit.PoundPerFoot, "PoundsPerFoot", BaseUnits.Undefined, "LinearDensity"), + new UnitInfo(LinearDensityUnit.PoundPerInch, "PoundsPerInch", BaseUnits.Undefined, "LinearDensity"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, LinearDensityUnit Unit), List>(); } /// @@ -158,11 +153,6 @@ public LinearDensity(double value, UnitSystem unitSystem) /// public static LinearDensity AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, LinearDensityUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -314,7 +304,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(LinearDensityUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(LinearDensityUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -324,34 +317,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(LinearDensityUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(LinearDensityUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.LinearDensity"; - var resourceManager = new ResourceManager(resourceName, typeof(LinearDensity).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -1050,9 +1016,6 @@ public LinearDensity ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs index 2663c26901..47bc78cb55 100644 --- a/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -71,38 +68,36 @@ static LinearPowerDensity() Info = new QuantityInfo("LinearPowerDensity", new UnitInfo[] { - new UnitInfo(LinearPowerDensityUnit.GigawattPerCentimeter, "GigawattsPerCentimeter", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.GigawattPerFoot, "GigawattsPerFoot", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.GigawattPerInch, "GigawattsPerInch", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.GigawattPerMeter, "GigawattsPerMeter", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.GigawattPerMillimeter, "GigawattsPerMillimeter", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.KilowattPerCentimeter, "KilowattsPerCentimeter", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.KilowattPerFoot, "KilowattsPerFoot", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.KilowattPerInch, "KilowattsPerInch", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.KilowattPerMeter, "KilowattsPerMeter", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.KilowattPerMillimeter, "KilowattsPerMillimeter", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.MegawattPerCentimeter, "MegawattsPerCentimeter", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.MegawattPerFoot, "MegawattsPerFoot", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.MegawattPerInch, "MegawattsPerInch", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.MegawattPerMeter, "MegawattsPerMeter", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.MegawattPerMillimeter, "MegawattsPerMillimeter", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.MilliwattPerCentimeter, "MilliwattsPerCentimeter", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.MilliwattPerFoot, "MilliwattsPerFoot", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.MilliwattPerInch, "MilliwattsPerInch", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.MilliwattPerMeter, "MilliwattsPerMeter", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.MilliwattPerMillimeter, "MilliwattsPerMillimeter", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.WattPerCentimeter, "WattsPerCentimeter", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.WattPerFoot, "WattsPerFoot", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.WattPerInch, "WattsPerInch", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.WattPerMeter, "WattsPerMeter", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.WattPerMillimeter, "WattsPerMillimeter", BaseUnits.Undefined), + new UnitInfo(LinearPowerDensityUnit.GigawattPerCentimeter, "GigawattsPerCentimeter", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.GigawattPerFoot, "GigawattsPerFoot", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.GigawattPerInch, "GigawattsPerInch", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.GigawattPerMeter, "GigawattsPerMeter", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.GigawattPerMillimeter, "GigawattsPerMillimeter", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.KilowattPerCentimeter, "KilowattsPerCentimeter", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.KilowattPerFoot, "KilowattsPerFoot", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.KilowattPerInch, "KilowattsPerInch", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.KilowattPerMeter, "KilowattsPerMeter", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.KilowattPerMillimeter, "KilowattsPerMillimeter", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.MegawattPerCentimeter, "MegawattsPerCentimeter", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.MegawattPerFoot, "MegawattsPerFoot", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.MegawattPerInch, "MegawattsPerInch", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.MegawattPerMeter, "MegawattsPerMeter", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.MegawattPerMillimeter, "MegawattsPerMillimeter", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.MilliwattPerCentimeter, "MilliwattsPerCentimeter", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.MilliwattPerFoot, "MilliwattsPerFoot", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.MilliwattPerInch, "MilliwattsPerInch", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.MilliwattPerMeter, "MilliwattsPerMeter", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.MilliwattPerMillimeter, "MilliwattsPerMillimeter", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.WattPerCentimeter, "WattsPerCentimeter", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.WattPerFoot, "WattsPerFoot", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.WattPerInch, "WattsPerInch", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.WattPerMeter, "WattsPerMeter", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.WattPerMillimeter, "WattsPerMillimeter", BaseUnits.Undefined, "LinearPowerDensity"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, LinearPowerDensityUnit Unit), List>(); } /// @@ -169,11 +164,6 @@ public LinearPowerDensity(double value, UnitSystem unitSystem) /// public static LinearPowerDensity AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, LinearPowerDensityUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -402,7 +392,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(LinearPowerDensityUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(LinearPowerDensityUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -412,34 +405,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(LinearPowerDensityUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(LinearPowerDensityUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.LinearPowerDensity"; - var resourceManager = new ResourceManager(resourceName, typeof(LinearPowerDensity).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -1270,9 +1236,6 @@ public LinearPowerDensity ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Luminance.g.cs b/UnitsNet/GeneratedCode/Quantities/Luminance.g.cs index 7f5db9f4a3..5a9ac3d4a1 100644 --- a/UnitsNet/GeneratedCode/Quantities/Luminance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Luminance.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -71,23 +68,21 @@ static Luminance() Info = new QuantityInfo("Luminance", new UnitInfo[] { - new UnitInfo(LuminanceUnit.CandelaPerSquareFoot, "CandelasPerSquareFoot", BaseUnits.Undefined), - new UnitInfo(LuminanceUnit.CandelaPerSquareInch, "CandelasPerSquareInch", BaseUnits.Undefined), - new UnitInfo(LuminanceUnit.CandelaPerSquareMeter, "CandelasPerSquareMeter", new BaseUnits(length: LengthUnit.Meter, luminousIntensity: LuminousIntensityUnit.Candela)), - new UnitInfo(LuminanceUnit.CenticandelaPerSquareMeter, "CenticandelasPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(LuminanceUnit.DecicandelaPerSquareMeter, "DecicandelasPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(LuminanceUnit.KilocandelaPerSquareMeter, "KilocandelasPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(LuminanceUnit.MicrocandelaPerSquareMeter, "MicrocandelasPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(LuminanceUnit.MillicandelaPerSquareMeter, "MillicandelasPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(LuminanceUnit.NanocandelaPerSquareMeter, "NanocandelasPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(LuminanceUnit.Nit, "Nits", BaseUnits.Undefined), + new UnitInfo(LuminanceUnit.CandelaPerSquareFoot, "CandelasPerSquareFoot", BaseUnits.Undefined, "Luminance"), + new UnitInfo(LuminanceUnit.CandelaPerSquareInch, "CandelasPerSquareInch", BaseUnits.Undefined, "Luminance"), + new UnitInfo(LuminanceUnit.CandelaPerSquareMeter, "CandelasPerSquareMeter", new BaseUnits(length: LengthUnit.Meter, luminousIntensity: LuminousIntensityUnit.Candela), "Luminance"), + new UnitInfo(LuminanceUnit.CenticandelaPerSquareMeter, "CenticandelasPerSquareMeter", BaseUnits.Undefined, "Luminance"), + new UnitInfo(LuminanceUnit.DecicandelaPerSquareMeter, "DecicandelasPerSquareMeter", BaseUnits.Undefined, "Luminance"), + new UnitInfo(LuminanceUnit.KilocandelaPerSquareMeter, "KilocandelasPerSquareMeter", BaseUnits.Undefined, "Luminance"), + new UnitInfo(LuminanceUnit.MicrocandelaPerSquareMeter, "MicrocandelasPerSquareMeter", BaseUnits.Undefined, "Luminance"), + new UnitInfo(LuminanceUnit.MillicandelaPerSquareMeter, "MillicandelasPerSquareMeter", BaseUnits.Undefined, "Luminance"), + new UnitInfo(LuminanceUnit.NanocandelaPerSquareMeter, "NanocandelasPerSquareMeter", BaseUnits.Undefined, "Luminance"), + new UnitInfo(LuminanceUnit.Nit, "Nits", BaseUnits.Undefined, "Luminance"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, LuminanceUnit Unit), List>(); } /// @@ -154,11 +149,6 @@ public Luminance(double value, UnitSystem unitSystem) /// public static Luminance AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, LuminanceUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -282,7 +272,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(LuminanceUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(LuminanceUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -292,34 +285,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(LuminanceUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(LuminanceUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Luminance"; - var resourceManager = new ResourceManager(resourceName, typeof(Luminance).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -970,9 +936,6 @@ public Luminance ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs b/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs index 12aeef510e..435dd64737 100644 --- a/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -71,27 +68,25 @@ static Luminosity() Info = new QuantityInfo("Luminosity", new UnitInfo[] { - new UnitInfo(LuminosityUnit.Decawatt, "Decawatts", BaseUnits.Undefined), - new UnitInfo(LuminosityUnit.Deciwatt, "Deciwatts", BaseUnits.Undefined), - new UnitInfo(LuminosityUnit.Femtowatt, "Femtowatts", BaseUnits.Undefined), - new UnitInfo(LuminosityUnit.Gigawatt, "Gigawatts", BaseUnits.Undefined), - new UnitInfo(LuminosityUnit.Kilowatt, "Kilowatts", BaseUnits.Undefined), - new UnitInfo(LuminosityUnit.Megawatt, "Megawatts", BaseUnits.Undefined), - new UnitInfo(LuminosityUnit.Microwatt, "Microwatts", BaseUnits.Undefined), - new UnitInfo(LuminosityUnit.Milliwatt, "Milliwatts", BaseUnits.Undefined), - new UnitInfo(LuminosityUnit.Nanowatt, "Nanowatts", BaseUnits.Undefined), - new UnitInfo(LuminosityUnit.Petawatt, "Petawatts", BaseUnits.Undefined), - new UnitInfo(LuminosityUnit.Picowatt, "Picowatts", BaseUnits.Undefined), - new UnitInfo(LuminosityUnit.SolarLuminosity, "SolarLuminosities", BaseUnits.Undefined), - new UnitInfo(LuminosityUnit.Terawatt, "Terawatts", BaseUnits.Undefined), - new UnitInfo(LuminosityUnit.Watt, "Watts", BaseUnits.Undefined), + new UnitInfo(LuminosityUnit.Decawatt, "Decawatts", BaseUnits.Undefined, "Luminosity"), + new UnitInfo(LuminosityUnit.Deciwatt, "Deciwatts", BaseUnits.Undefined, "Luminosity"), + new UnitInfo(LuminosityUnit.Femtowatt, "Femtowatts", BaseUnits.Undefined, "Luminosity"), + new UnitInfo(LuminosityUnit.Gigawatt, "Gigawatts", BaseUnits.Undefined, "Luminosity"), + new UnitInfo(LuminosityUnit.Kilowatt, "Kilowatts", BaseUnits.Undefined, "Luminosity"), + new UnitInfo(LuminosityUnit.Megawatt, "Megawatts", BaseUnits.Undefined, "Luminosity"), + new UnitInfo(LuminosityUnit.Microwatt, "Microwatts", BaseUnits.Undefined, "Luminosity"), + new UnitInfo(LuminosityUnit.Milliwatt, "Milliwatts", BaseUnits.Undefined, "Luminosity"), + new UnitInfo(LuminosityUnit.Nanowatt, "Nanowatts", BaseUnits.Undefined, "Luminosity"), + new UnitInfo(LuminosityUnit.Petawatt, "Petawatts", BaseUnits.Undefined, "Luminosity"), + new UnitInfo(LuminosityUnit.Picowatt, "Picowatts", BaseUnits.Undefined, "Luminosity"), + new UnitInfo(LuminosityUnit.SolarLuminosity, "SolarLuminosities", BaseUnits.Undefined, "Luminosity"), + new UnitInfo(LuminosityUnit.Terawatt, "Terawatts", BaseUnits.Undefined, "Luminosity"), + new UnitInfo(LuminosityUnit.Watt, "Watts", BaseUnits.Undefined, "Luminosity"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, LuminosityUnit Unit), List>(); } /// @@ -158,11 +153,6 @@ public Luminosity(double value, UnitSystem unitSystem) /// public static Luminosity AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, LuminosityUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -314,7 +304,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(LuminosityUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(LuminosityUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -324,34 +317,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(LuminosityUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(LuminosityUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Luminosity"; - var resourceManager = new ResourceManager(resourceName, typeof(Luminosity).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -1050,9 +1016,6 @@ public Luminosity ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs index 8b3537850d..4905ace42d 100644 --- a/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -71,14 +68,12 @@ static LuminousFlux() Info = new QuantityInfo("LuminousFlux", new UnitInfo[] { - new UnitInfo(LuminousFluxUnit.Lumen, "Lumens", BaseUnits.Undefined), + new UnitInfo(LuminousFluxUnit.Lumen, "Lumens", BaseUnits.Undefined, "LuminousFlux"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, LuminousFluxUnit Unit), List>(); } /// @@ -145,11 +140,6 @@ public LuminousFlux(double value, UnitSystem unitSystem) /// public static LuminousFlux AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, LuminousFluxUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -210,7 +200,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(LuminousFluxUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(LuminousFluxUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -220,34 +213,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(LuminousFluxUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(LuminousFluxUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.LuminousFlux"; - var resourceManager = new ResourceManager(resourceName, typeof(LuminousFlux).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -790,9 +756,6 @@ public LuminousFlux ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs b/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs index af5ee32d91..c45971aa5e 100644 --- a/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -71,14 +68,12 @@ static LuminousIntensity() Info = new QuantityInfo("LuminousIntensity", new UnitInfo[] { - new UnitInfo(LuminousIntensityUnit.Candela, "Candela", new BaseUnits(luminousIntensity: LuminousIntensityUnit.Candela)), + new UnitInfo(LuminousIntensityUnit.Candela, "Candela", new BaseUnits(luminousIntensity: LuminousIntensityUnit.Candela), "LuminousIntensity"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, LuminousIntensityUnit Unit), List>(); } /// @@ -145,11 +140,6 @@ public LuminousIntensity(double value, UnitSystem unitSystem) /// public static LuminousIntensity AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, LuminousIntensityUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -210,7 +200,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(LuminousIntensityUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(LuminousIntensityUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -220,34 +213,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(LuminousIntensityUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(LuminousIntensityUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.LuminousIntensity"; - var resourceManager = new ResourceManager(resourceName, typeof(LuminousIntensity).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -790,9 +756,6 @@ public LuminousIntensity ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs b/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs index 0ab2a4ebc7..81d0e9e9fa 100644 --- a/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -71,19 +68,17 @@ static MagneticField() Info = new QuantityInfo("MagneticField", new UnitInfo[] { - new UnitInfo(MagneticFieldUnit.Gauss, "Gausses", BaseUnits.Undefined), - new UnitInfo(MagneticFieldUnit.Microtesla, "Microteslas", BaseUnits.Undefined), - new UnitInfo(MagneticFieldUnit.Milligauss, "Milligausses", BaseUnits.Undefined), - new UnitInfo(MagneticFieldUnit.Millitesla, "Milliteslas", BaseUnits.Undefined), - new UnitInfo(MagneticFieldUnit.Nanotesla, "Nanoteslas", BaseUnits.Undefined), - new UnitInfo(MagneticFieldUnit.Tesla, "Teslas", BaseUnits.Undefined), + new UnitInfo(MagneticFieldUnit.Gauss, "Gausses", BaseUnits.Undefined, "MagneticField"), + new UnitInfo(MagneticFieldUnit.Microtesla, "Microteslas", BaseUnits.Undefined, "MagneticField"), + new UnitInfo(MagneticFieldUnit.Milligauss, "Milligausses", BaseUnits.Undefined, "MagneticField"), + new UnitInfo(MagneticFieldUnit.Millitesla, "Milliteslas", BaseUnits.Undefined, "MagneticField"), + new UnitInfo(MagneticFieldUnit.Nanotesla, "Nanoteslas", BaseUnits.Undefined, "MagneticField"), + new UnitInfo(MagneticFieldUnit.Tesla, "Teslas", BaseUnits.Undefined, "MagneticField"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, MagneticFieldUnit Unit), List>(); } /// @@ -150,11 +145,6 @@ public MagneticField(double value, UnitSystem unitSystem) /// public static MagneticField AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, MagneticFieldUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -250,7 +240,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(MagneticFieldUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(MagneticFieldUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -260,34 +253,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(MagneticFieldUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(MagneticFieldUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.MagneticField"; - var resourceManager = new ResourceManager(resourceName, typeof(MagneticField).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -890,9 +856,6 @@ public MagneticField ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs index 8519aa3150..deac68d7e0 100644 --- a/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -71,14 +68,12 @@ static MagneticFlux() Info = new QuantityInfo("MagneticFlux", new UnitInfo[] { - new UnitInfo(MagneticFluxUnit.Weber, "Webers", BaseUnits.Undefined), + new UnitInfo(MagneticFluxUnit.Weber, "Webers", BaseUnits.Undefined, "MagneticFlux"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, MagneticFluxUnit Unit), List>(); } /// @@ -145,11 +140,6 @@ public MagneticFlux(double value, UnitSystem unitSystem) /// public static MagneticFlux AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, MagneticFluxUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -210,7 +200,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(MagneticFluxUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(MagneticFluxUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -220,34 +213,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(MagneticFluxUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(MagneticFluxUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.MagneticFlux"; - var resourceManager = new ResourceManager(resourceName, typeof(MagneticFlux).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -790,9 +756,6 @@ public MagneticFlux ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs b/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs index 9fd7d2ff6d..67c8408999 100644 --- a/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -71,14 +68,12 @@ static Magnetization() Info = new QuantityInfo("Magnetization", new UnitInfo[] { - new UnitInfo(MagnetizationUnit.AmperePerMeter, "AmperesPerMeter", new BaseUnits(length: LengthUnit.Meter, current: ElectricCurrentUnit.Ampere)), + new UnitInfo(MagnetizationUnit.AmperePerMeter, "AmperesPerMeter", new BaseUnits(length: LengthUnit.Meter, current: ElectricCurrentUnit.Ampere), "Magnetization"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, MagnetizationUnit Unit), List>(); } /// @@ -145,11 +140,6 @@ public Magnetization(double value, UnitSystem unitSystem) /// public static Magnetization AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, MagnetizationUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -210,7 +200,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(MagnetizationUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(MagnetizationUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -220,34 +213,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(MagnetizationUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(MagnetizationUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Magnetization"; - var resourceManager = new ResourceManager(resourceName, typeof(Magnetization).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -790,9 +756,6 @@ public Magnetization ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Mass.g.cs b/UnitsNet/GeneratedCode/Quantities/Mass.g.cs index cdcf0dcc1c..159c84b68b 100644 --- a/UnitsNet/GeneratedCode/Quantities/Mass.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Mass.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,38 +65,36 @@ static Mass() Info = new QuantityInfo("Mass", new UnitInfo[] { - new UnitInfo(MassUnit.Centigram, "Centigrams", BaseUnits.Undefined), - new UnitInfo(MassUnit.Decagram, "Decagrams", BaseUnits.Undefined), - new UnitInfo(MassUnit.Decigram, "Decigrams", BaseUnits.Undefined), - new UnitInfo(MassUnit.EarthMass, "EarthMasses", new BaseUnits(mass: MassUnit.EarthMass)), - new UnitInfo(MassUnit.Grain, "Grains", new BaseUnits(mass: MassUnit.Grain)), - new UnitInfo(MassUnit.Gram, "Grams", new BaseUnits(mass: MassUnit.Gram)), - new UnitInfo(MassUnit.Hectogram, "Hectograms", BaseUnits.Undefined), - new UnitInfo(MassUnit.Kilogram, "Kilograms", BaseUnits.Undefined), - new UnitInfo(MassUnit.Kilopound, "Kilopounds", BaseUnits.Undefined), - new UnitInfo(MassUnit.Kilotonne, "Kilotonnes", BaseUnits.Undefined), - new UnitInfo(MassUnit.LongHundredweight, "LongHundredweight", new BaseUnits(mass: MassUnit.LongHundredweight)), - new UnitInfo(MassUnit.LongTon, "LongTons", new BaseUnits(mass: MassUnit.LongTon)), - new UnitInfo(MassUnit.Megapound, "Megapounds", BaseUnits.Undefined), - new UnitInfo(MassUnit.Megatonne, "Megatonnes", BaseUnits.Undefined), - new UnitInfo(MassUnit.Microgram, "Micrograms", BaseUnits.Undefined), - new UnitInfo(MassUnit.Milligram, "Milligrams", BaseUnits.Undefined), - new UnitInfo(MassUnit.Nanogram, "Nanograms", BaseUnits.Undefined), - new UnitInfo(MassUnit.Ounce, "Ounces", new BaseUnits(mass: MassUnit.Ounce)), - new UnitInfo(MassUnit.Pound, "Pounds", new BaseUnits(mass: MassUnit.Pound)), - new UnitInfo(MassUnit.ShortHundredweight, "ShortHundredweight", new BaseUnits(mass: MassUnit.ShortHundredweight)), - new UnitInfo(MassUnit.ShortTon, "ShortTons", new BaseUnits(mass: MassUnit.ShortTon)), - new UnitInfo(MassUnit.Slug, "Slugs", new BaseUnits(mass: MassUnit.Slug)), - new UnitInfo(MassUnit.SolarMass, "SolarMasses", new BaseUnits(mass: MassUnit.SolarMass)), - new UnitInfo(MassUnit.Stone, "Stone", new BaseUnits(mass: MassUnit.Stone)), - new UnitInfo(MassUnit.Tonne, "Tonnes", new BaseUnits(mass: MassUnit.Tonne)), + new UnitInfo(MassUnit.Centigram, "Centigrams", BaseUnits.Undefined, "Mass"), + new UnitInfo(MassUnit.Decagram, "Decagrams", BaseUnits.Undefined, "Mass"), + new UnitInfo(MassUnit.Decigram, "Decigrams", BaseUnits.Undefined, "Mass"), + new UnitInfo(MassUnit.EarthMass, "EarthMasses", new BaseUnits(mass: MassUnit.EarthMass), "Mass"), + new UnitInfo(MassUnit.Grain, "Grains", new BaseUnits(mass: MassUnit.Grain), "Mass"), + new UnitInfo(MassUnit.Gram, "Grams", new BaseUnits(mass: MassUnit.Gram), "Mass"), + new UnitInfo(MassUnit.Hectogram, "Hectograms", BaseUnits.Undefined, "Mass"), + new UnitInfo(MassUnit.Kilogram, "Kilograms", BaseUnits.Undefined, "Mass"), + new UnitInfo(MassUnit.Kilopound, "Kilopounds", BaseUnits.Undefined, "Mass"), + new UnitInfo(MassUnit.Kilotonne, "Kilotonnes", BaseUnits.Undefined, "Mass"), + new UnitInfo(MassUnit.LongHundredweight, "LongHundredweight", new BaseUnits(mass: MassUnit.LongHundredweight), "Mass"), + new UnitInfo(MassUnit.LongTon, "LongTons", new BaseUnits(mass: MassUnit.LongTon), "Mass"), + new UnitInfo(MassUnit.Megapound, "Megapounds", BaseUnits.Undefined, "Mass"), + new UnitInfo(MassUnit.Megatonne, "Megatonnes", BaseUnits.Undefined, "Mass"), + new UnitInfo(MassUnit.Microgram, "Micrograms", BaseUnits.Undefined, "Mass"), + new UnitInfo(MassUnit.Milligram, "Milligrams", BaseUnits.Undefined, "Mass"), + new UnitInfo(MassUnit.Nanogram, "Nanograms", BaseUnits.Undefined, "Mass"), + new UnitInfo(MassUnit.Ounce, "Ounces", new BaseUnits(mass: MassUnit.Ounce), "Mass"), + new UnitInfo(MassUnit.Pound, "Pounds", new BaseUnits(mass: MassUnit.Pound), "Mass"), + new UnitInfo(MassUnit.ShortHundredweight, "ShortHundredweight", new BaseUnits(mass: MassUnit.ShortHundredweight), "Mass"), + new UnitInfo(MassUnit.ShortTon, "ShortTons", new BaseUnits(mass: MassUnit.ShortTon), "Mass"), + new UnitInfo(MassUnit.Slug, "Slugs", new BaseUnits(mass: MassUnit.Slug), "Mass"), + new UnitInfo(MassUnit.SolarMass, "SolarMasses", new BaseUnits(mass: MassUnit.SolarMass), "Mass"), + new UnitInfo(MassUnit.Stone, "Stone", new BaseUnits(mass: MassUnit.Stone), "Mass"), + new UnitInfo(MassUnit.Tonne, "Tonnes", new BaseUnits(mass: MassUnit.Tonne), "Mass"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, MassUnit Unit), List>(); } /// @@ -166,11 +161,6 @@ public Mass(double value, UnitSystem unitSystem) /// public static Mass AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, MassUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -399,7 +389,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(MassUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(MassUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -409,34 +402,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(MassUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(MassUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Mass"; - var resourceManager = new ResourceManager(resourceName, typeof(Mass).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -1267,9 +1233,6 @@ public Mass ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs b/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs index d72776c358..6abd33782c 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -71,62 +68,60 @@ static MassConcentration() Info = new QuantityInfo("MassConcentration", new UnitInfo[] { - new UnitInfo(MassConcentrationUnit.CentigramPerDeciliter, "CentigramsPerDeciliter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.CentigramPerLiter, "CentigramsPerLiter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.CentigramPerMicroliter, "CentigramsPerMicroliter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.CentigramPerMilliliter, "CentigramsPerMilliliter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.DecigramPerDeciliter, "DecigramsPerDeciliter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.DecigramPerLiter, "DecigramsPerLiter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.DecigramPerMicroliter, "DecigramsPerMicroliter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.DecigramPerMilliliter, "DecigramsPerMilliliter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.GramPerCubicCentimeter, "GramsPerCubicCentimeter", new BaseUnits(length: LengthUnit.Centimeter, mass: MassUnit.Gram)), - new UnitInfo(MassConcentrationUnit.GramPerCubicMeter, "GramsPerCubicMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Gram)), - new UnitInfo(MassConcentrationUnit.GramPerCubicMillimeter, "GramsPerCubicMillimeter", new BaseUnits(length: LengthUnit.Millimeter, mass: MassUnit.Gram)), - new UnitInfo(MassConcentrationUnit.GramPerDeciliter, "GramsPerDeciliter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.GramPerLiter, "GramsPerLiter", new BaseUnits(length: LengthUnit.Decimeter, mass: MassUnit.Gram)), - new UnitInfo(MassConcentrationUnit.GramPerMicroliter, "GramsPerMicroliter", new BaseUnits(length: LengthUnit.Centimeter, mass: MassUnit.Gram)), - new UnitInfo(MassConcentrationUnit.GramPerMilliliter, "GramsPerMilliliter", new BaseUnits(length: LengthUnit.Centimeter, mass: MassUnit.Gram)), - new UnitInfo(MassConcentrationUnit.KilogramPerCubicCentimeter, "KilogramsPerCubicCentimeter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.KilogramPerCubicMeter, "KilogramsPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.KilogramPerCubicMillimeter, "KilogramsPerCubicMillimeter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.KilogramPerLiter, "KilogramsPerLiter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.KilopoundPerCubicFoot, "KilopoundsPerCubicFoot", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.KilopoundPerCubicInch, "KilopoundsPerCubicInch", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.MicrogramPerCubicMeter, "MicrogramsPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.MicrogramPerDeciliter, "MicrogramsPerDeciliter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.MicrogramPerLiter, "MicrogramsPerLiter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.MicrogramPerMicroliter, "MicrogramsPerMicroliter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.MicrogramPerMilliliter, "MicrogramsPerMilliliter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.MilligramPerCubicMeter, "MilligramsPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.MilligramPerDeciliter, "MilligramsPerDeciliter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.MilligramPerLiter, "MilligramsPerLiter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.MilligramPerMicroliter, "MilligramsPerMicroliter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.MilligramPerMilliliter, "MilligramsPerMilliliter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.NanogramPerDeciliter, "NanogramsPerDeciliter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.NanogramPerLiter, "NanogramsPerLiter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.NanogramPerMicroliter, "NanogramsPerMicroliter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.NanogramPerMilliliter, "NanogramsPerMilliliter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.OuncePerImperialGallon, "OuncesPerImperialGallon", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.OuncePerUSGallon, "OuncesPerUSGallon", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.PicogramPerDeciliter, "PicogramsPerDeciliter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.PicogramPerLiter, "PicogramsPerLiter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.PicogramPerMicroliter, "PicogramsPerMicroliter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.PicogramPerMilliliter, "PicogramsPerMilliliter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.PoundPerCubicFoot, "PoundsPerCubicFoot", new BaseUnits(length: LengthUnit.Foot, mass: MassUnit.Pound)), - new UnitInfo(MassConcentrationUnit.PoundPerCubicInch, "PoundsPerCubicInch", new BaseUnits(length: LengthUnit.Inch, mass: MassUnit.Pound)), - new UnitInfo(MassConcentrationUnit.PoundPerImperialGallon, "PoundsPerImperialGallon", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.PoundPerUSGallon, "PoundsPerUSGallon", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.SlugPerCubicFoot, "SlugsPerCubicFoot", new BaseUnits(length: LengthUnit.Foot, mass: MassUnit.Slug)), - new UnitInfo(MassConcentrationUnit.TonnePerCubicCentimeter, "TonnesPerCubicCentimeter", new BaseUnits(length: LengthUnit.Centimeter, mass: MassUnit.Tonne)), - new UnitInfo(MassConcentrationUnit.TonnePerCubicMeter, "TonnesPerCubicMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Tonne)), - new UnitInfo(MassConcentrationUnit.TonnePerCubicMillimeter, "TonnesPerCubicMillimeter", new BaseUnits(length: LengthUnit.Millimeter, mass: MassUnit.Tonne)), + new UnitInfo(MassConcentrationUnit.CentigramPerDeciliter, "CentigramsPerDeciliter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.CentigramPerLiter, "CentigramsPerLiter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.CentigramPerMicroliter, "CentigramsPerMicroliter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.CentigramPerMilliliter, "CentigramsPerMilliliter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.DecigramPerDeciliter, "DecigramsPerDeciliter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.DecigramPerLiter, "DecigramsPerLiter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.DecigramPerMicroliter, "DecigramsPerMicroliter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.DecigramPerMilliliter, "DecigramsPerMilliliter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.GramPerCubicCentimeter, "GramsPerCubicCentimeter", new BaseUnits(length: LengthUnit.Centimeter, mass: MassUnit.Gram), "MassConcentration"), + new UnitInfo(MassConcentrationUnit.GramPerCubicMeter, "GramsPerCubicMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Gram), "MassConcentration"), + new UnitInfo(MassConcentrationUnit.GramPerCubicMillimeter, "GramsPerCubicMillimeter", new BaseUnits(length: LengthUnit.Millimeter, mass: MassUnit.Gram), "MassConcentration"), + new UnitInfo(MassConcentrationUnit.GramPerDeciliter, "GramsPerDeciliter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.GramPerLiter, "GramsPerLiter", new BaseUnits(length: LengthUnit.Decimeter, mass: MassUnit.Gram), "MassConcentration"), + new UnitInfo(MassConcentrationUnit.GramPerMicroliter, "GramsPerMicroliter", new BaseUnits(length: LengthUnit.Centimeter, mass: MassUnit.Gram), "MassConcentration"), + new UnitInfo(MassConcentrationUnit.GramPerMilliliter, "GramsPerMilliliter", new BaseUnits(length: LengthUnit.Centimeter, mass: MassUnit.Gram), "MassConcentration"), + new UnitInfo(MassConcentrationUnit.KilogramPerCubicCentimeter, "KilogramsPerCubicCentimeter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.KilogramPerCubicMeter, "KilogramsPerCubicMeter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.KilogramPerCubicMillimeter, "KilogramsPerCubicMillimeter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.KilogramPerLiter, "KilogramsPerLiter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.KilopoundPerCubicFoot, "KilopoundsPerCubicFoot", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.KilopoundPerCubicInch, "KilopoundsPerCubicInch", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.MicrogramPerCubicMeter, "MicrogramsPerCubicMeter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.MicrogramPerDeciliter, "MicrogramsPerDeciliter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.MicrogramPerLiter, "MicrogramsPerLiter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.MicrogramPerMicroliter, "MicrogramsPerMicroliter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.MicrogramPerMilliliter, "MicrogramsPerMilliliter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.MilligramPerCubicMeter, "MilligramsPerCubicMeter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.MilligramPerDeciliter, "MilligramsPerDeciliter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.MilligramPerLiter, "MilligramsPerLiter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.MilligramPerMicroliter, "MilligramsPerMicroliter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.MilligramPerMilliliter, "MilligramsPerMilliliter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.NanogramPerDeciliter, "NanogramsPerDeciliter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.NanogramPerLiter, "NanogramsPerLiter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.NanogramPerMicroliter, "NanogramsPerMicroliter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.NanogramPerMilliliter, "NanogramsPerMilliliter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.OuncePerImperialGallon, "OuncesPerImperialGallon", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.OuncePerUSGallon, "OuncesPerUSGallon", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.PicogramPerDeciliter, "PicogramsPerDeciliter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.PicogramPerLiter, "PicogramsPerLiter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.PicogramPerMicroliter, "PicogramsPerMicroliter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.PicogramPerMilliliter, "PicogramsPerMilliliter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.PoundPerCubicFoot, "PoundsPerCubicFoot", new BaseUnits(length: LengthUnit.Foot, mass: MassUnit.Pound), "MassConcentration"), + new UnitInfo(MassConcentrationUnit.PoundPerCubicInch, "PoundsPerCubicInch", new BaseUnits(length: LengthUnit.Inch, mass: MassUnit.Pound), "MassConcentration"), + new UnitInfo(MassConcentrationUnit.PoundPerImperialGallon, "PoundsPerImperialGallon", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.PoundPerUSGallon, "PoundsPerUSGallon", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.SlugPerCubicFoot, "SlugsPerCubicFoot", new BaseUnits(length: LengthUnit.Foot, mass: MassUnit.Slug), "MassConcentration"), + new UnitInfo(MassConcentrationUnit.TonnePerCubicCentimeter, "TonnesPerCubicCentimeter", new BaseUnits(length: LengthUnit.Centimeter, mass: MassUnit.Tonne), "MassConcentration"), + new UnitInfo(MassConcentrationUnit.TonnePerCubicMeter, "TonnesPerCubicMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Tonne), "MassConcentration"), + new UnitInfo(MassConcentrationUnit.TonnePerCubicMillimeter, "TonnesPerCubicMillimeter", new BaseUnits(length: LengthUnit.Millimeter, mass: MassUnit.Tonne), "MassConcentration"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, MassConcentrationUnit Unit), List>(); } /// @@ -193,11 +188,6 @@ public MassConcentration(double value, UnitSystem unitSystem) /// public static MassConcentration AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, MassConcentrationUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -594,7 +584,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(MassConcentrationUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(MassConcentrationUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -604,34 +597,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(MassConcentrationUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(MassConcentrationUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.MassConcentration"; - var resourceManager = new ResourceManager(resourceName, typeof(MassConcentration).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -1750,9 +1716,6 @@ public MassConcentration ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs index fb82e7e0d8..12758e027f 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,46 +65,44 @@ static MassFlow() Info = new QuantityInfo("MassFlow", new UnitInfo[] { - new UnitInfo(MassFlowUnit.CentigramPerDay, "CentigramsPerDay", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.CentigramPerSecond, "CentigramsPerSecond", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.DecagramPerDay, "DecagramsPerDay", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.DecagramPerSecond, "DecagramsPerSecond", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.DecigramPerDay, "DecigramsPerDay", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.DecigramPerSecond, "DecigramsPerSecond", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.GramPerDay, "GramsPerDay", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.GramPerHour, "GramsPerHour", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.GramPerSecond, "GramsPerSecond", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.HectogramPerDay, "HectogramsPerDay", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.HectogramPerSecond, "HectogramsPerSecond", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.KilogramPerDay, "KilogramsPerDay", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.KilogramPerHour, "KilogramsPerHour", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.KilogramPerMinute, "KilogramsPerMinute", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.KilogramPerSecond, "KilogramsPerSecond", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.MegagramPerDay, "MegagramsPerDay", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.MegapoundPerDay, "MegapoundsPerDay", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.MegapoundPerHour, "MegapoundsPerHour", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.MegapoundPerMinute, "MegapoundsPerMinute", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.MegapoundPerSecond, "MegapoundsPerSecond", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.MicrogramPerDay, "MicrogramsPerDay", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.MicrogramPerSecond, "MicrogramsPerSecond", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.MilligramPerDay, "MilligramsPerDay", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.MilligramPerSecond, "MilligramsPerSecond", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.NanogramPerDay, "NanogramsPerDay", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.NanogramPerSecond, "NanogramsPerSecond", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.PoundPerDay, "PoundsPerDay", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.PoundPerHour, "PoundsPerHour", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.PoundPerMinute, "PoundsPerMinute", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.PoundPerSecond, "PoundsPerSecond", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.ShortTonPerHour, "ShortTonsPerHour", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.TonnePerDay, "TonnesPerDay", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.TonnePerHour, "TonnesPerHour", BaseUnits.Undefined), + new UnitInfo(MassFlowUnit.CentigramPerDay, "CentigramsPerDay", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.CentigramPerSecond, "CentigramsPerSecond", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.DecagramPerDay, "DecagramsPerDay", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.DecagramPerSecond, "DecagramsPerSecond", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.DecigramPerDay, "DecigramsPerDay", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.DecigramPerSecond, "DecigramsPerSecond", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.GramPerDay, "GramsPerDay", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.GramPerHour, "GramsPerHour", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.GramPerSecond, "GramsPerSecond", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.HectogramPerDay, "HectogramsPerDay", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.HectogramPerSecond, "HectogramsPerSecond", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.KilogramPerDay, "KilogramsPerDay", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.KilogramPerHour, "KilogramsPerHour", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.KilogramPerMinute, "KilogramsPerMinute", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.KilogramPerSecond, "KilogramsPerSecond", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.MegagramPerDay, "MegagramsPerDay", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.MegapoundPerDay, "MegapoundsPerDay", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.MegapoundPerHour, "MegapoundsPerHour", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.MegapoundPerMinute, "MegapoundsPerMinute", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.MegapoundPerSecond, "MegapoundsPerSecond", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.MicrogramPerDay, "MicrogramsPerDay", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.MicrogramPerSecond, "MicrogramsPerSecond", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.MilligramPerDay, "MilligramsPerDay", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.MilligramPerSecond, "MilligramsPerSecond", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.NanogramPerDay, "NanogramsPerDay", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.NanogramPerSecond, "NanogramsPerSecond", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.PoundPerDay, "PoundsPerDay", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.PoundPerHour, "PoundsPerHour", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.PoundPerMinute, "PoundsPerMinute", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.PoundPerSecond, "PoundsPerSecond", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.ShortTonPerHour, "ShortTonsPerHour", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.TonnePerDay, "TonnesPerDay", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.TonnePerHour, "TonnesPerHour", BaseUnits.Undefined, "MassFlow"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, MassFlowUnit Unit), List>(); } /// @@ -174,11 +169,6 @@ public MassFlow(double value, UnitSystem unitSystem) /// public static MassFlow AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, MassFlowUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -463,7 +453,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(MassFlowUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(MassFlowUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -473,34 +466,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(MassFlowUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(MassFlowUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.MassFlow"; - var resourceManager = new ResourceManager(resourceName, typeof(MassFlow).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -1427,9 +1393,6 @@ public MassFlow ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs index 3f31919774..9dd8efbc38 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,25 +65,23 @@ static MassFlux() Info = new QuantityInfo("MassFlux", new UnitInfo[] { - new UnitInfo(MassFluxUnit.GramPerHourPerSquareCentimeter, "GramsPerHourPerSquareCentimeter", BaseUnits.Undefined), - new UnitInfo(MassFluxUnit.GramPerHourPerSquareMeter, "GramsPerHourPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(MassFluxUnit.GramPerHourPerSquareMillimeter, "GramsPerHourPerSquareMillimeter", BaseUnits.Undefined), - new UnitInfo(MassFluxUnit.GramPerSecondPerSquareCentimeter, "GramsPerSecondPerSquareCentimeter", BaseUnits.Undefined), - new UnitInfo(MassFluxUnit.GramPerSecondPerSquareMeter, "GramsPerSecondPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(MassFluxUnit.GramPerSecondPerSquareMillimeter, "GramsPerSecondPerSquareMillimeter", BaseUnits.Undefined), - new UnitInfo(MassFluxUnit.KilogramPerHourPerSquareCentimeter, "KilogramsPerHourPerSquareCentimeter", BaseUnits.Undefined), - new UnitInfo(MassFluxUnit.KilogramPerHourPerSquareMeter, "KilogramsPerHourPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(MassFluxUnit.KilogramPerHourPerSquareMillimeter, "KilogramsPerHourPerSquareMillimeter", BaseUnits.Undefined), - new UnitInfo(MassFluxUnit.KilogramPerSecondPerSquareCentimeter, "KilogramsPerSecondPerSquareCentimeter", BaseUnits.Undefined), - new UnitInfo(MassFluxUnit.KilogramPerSecondPerSquareMeter, "KilogramsPerSecondPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(MassFluxUnit.KilogramPerSecondPerSquareMillimeter, "KilogramsPerSecondPerSquareMillimeter", BaseUnits.Undefined), + new UnitInfo(MassFluxUnit.GramPerHourPerSquareCentimeter, "GramsPerHourPerSquareCentimeter", BaseUnits.Undefined, "MassFlux"), + new UnitInfo(MassFluxUnit.GramPerHourPerSquareMeter, "GramsPerHourPerSquareMeter", BaseUnits.Undefined, "MassFlux"), + new UnitInfo(MassFluxUnit.GramPerHourPerSquareMillimeter, "GramsPerHourPerSquareMillimeter", BaseUnits.Undefined, "MassFlux"), + new UnitInfo(MassFluxUnit.GramPerSecondPerSquareCentimeter, "GramsPerSecondPerSquareCentimeter", BaseUnits.Undefined, "MassFlux"), + new UnitInfo(MassFluxUnit.GramPerSecondPerSquareMeter, "GramsPerSecondPerSquareMeter", BaseUnits.Undefined, "MassFlux"), + new UnitInfo(MassFluxUnit.GramPerSecondPerSquareMillimeter, "GramsPerSecondPerSquareMillimeter", BaseUnits.Undefined, "MassFlux"), + new UnitInfo(MassFluxUnit.KilogramPerHourPerSquareCentimeter, "KilogramsPerHourPerSquareCentimeter", BaseUnits.Undefined, "MassFlux"), + new UnitInfo(MassFluxUnit.KilogramPerHourPerSquareMeter, "KilogramsPerHourPerSquareMeter", BaseUnits.Undefined, "MassFlux"), + new UnitInfo(MassFluxUnit.KilogramPerHourPerSquareMillimeter, "KilogramsPerHourPerSquareMillimeter", BaseUnits.Undefined, "MassFlux"), + new UnitInfo(MassFluxUnit.KilogramPerSecondPerSquareCentimeter, "KilogramsPerSecondPerSquareCentimeter", BaseUnits.Undefined, "MassFlux"), + new UnitInfo(MassFluxUnit.KilogramPerSecondPerSquareMeter, "KilogramsPerSecondPerSquareMeter", BaseUnits.Undefined, "MassFlux"), + new UnitInfo(MassFluxUnit.KilogramPerSecondPerSquareMillimeter, "KilogramsPerSecondPerSquareMillimeter", BaseUnits.Undefined, "MassFlux"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, MassFluxUnit Unit), List>(); } /// @@ -153,11 +148,6 @@ public MassFlux(double value, UnitSystem unitSystem) /// public static MassFlux AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, MassFluxUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -295,7 +285,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(MassFluxUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(MassFluxUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -305,34 +298,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(MassFluxUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(MassFluxUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.MassFlux"; - var resourceManager = new ResourceManager(resourceName, typeof(MassFlux).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -1007,9 +973,6 @@ public MassFlux ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs index c6dab19790..e6b824be3f 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -71,37 +68,35 @@ static MassFraction() Info = new QuantityInfo("MassFraction", new UnitInfo[] { - new UnitInfo(MassFractionUnit.CentigramPerGram, "CentigramsPerGram", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.CentigramPerKilogram, "CentigramsPerKilogram", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.DecagramPerGram, "DecagramsPerGram", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.DecagramPerKilogram, "DecagramsPerKilogram", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.DecigramPerGram, "DecigramsPerGram", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.DecigramPerKilogram, "DecigramsPerKilogram", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.DecimalFraction, "DecimalFractions", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.GramPerGram, "GramsPerGram", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.GramPerKilogram, "GramsPerKilogram", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.HectogramPerGram, "HectogramsPerGram", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.HectogramPerKilogram, "HectogramsPerKilogram", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.KilogramPerGram, "KilogramsPerGram", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.KilogramPerKilogram, "KilogramsPerKilogram", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.MicrogramPerGram, "MicrogramsPerGram", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.MicrogramPerKilogram, "MicrogramsPerKilogram", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.MilligramPerGram, "MilligramsPerGram", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.MilligramPerKilogram, "MilligramsPerKilogram", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.NanogramPerGram, "NanogramsPerGram", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.NanogramPerKilogram, "NanogramsPerKilogram", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.PartPerBillion, "PartsPerBillion", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.PartPerMillion, "PartsPerMillion", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.PartPerThousand, "PartsPerThousand", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.PartPerTrillion, "PartsPerTrillion", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.Percent, "Percent", BaseUnits.Undefined), + new UnitInfo(MassFractionUnit.CentigramPerGram, "CentigramsPerGram", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.CentigramPerKilogram, "CentigramsPerKilogram", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.DecagramPerGram, "DecagramsPerGram", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.DecagramPerKilogram, "DecagramsPerKilogram", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.DecigramPerGram, "DecigramsPerGram", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.DecigramPerKilogram, "DecigramsPerKilogram", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.DecimalFraction, "DecimalFractions", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.GramPerGram, "GramsPerGram", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.GramPerKilogram, "GramsPerKilogram", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.HectogramPerGram, "HectogramsPerGram", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.HectogramPerKilogram, "HectogramsPerKilogram", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.KilogramPerGram, "KilogramsPerGram", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.KilogramPerKilogram, "KilogramsPerKilogram", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.MicrogramPerGram, "MicrogramsPerGram", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.MicrogramPerKilogram, "MicrogramsPerKilogram", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.MilligramPerGram, "MilligramsPerGram", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.MilligramPerKilogram, "MilligramsPerKilogram", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.NanogramPerGram, "NanogramsPerGram", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.NanogramPerKilogram, "NanogramsPerKilogram", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.PartPerBillion, "PartsPerBillion", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.PartPerMillion, "PartsPerMillion", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.PartPerThousand, "PartsPerThousand", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.PartPerTrillion, "PartsPerTrillion", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.Percent, "Percent", BaseUnits.Undefined, "MassFraction"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, MassFractionUnit Unit), List>(); } /// @@ -168,11 +163,6 @@ public MassFraction(double value, UnitSystem unitSystem) /// public static MassFraction AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, MassFractionUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -394,7 +384,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(MassFractionUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(MassFractionUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -404,34 +397,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(MassFractionUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(MassFractionUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.MassFraction"; - var resourceManager = new ResourceManager(resourceName, typeof(MassFraction).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -1250,9 +1216,6 @@ public MassFraction ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs b/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs index 2187fc0f76..4ac9c37489 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,41 +65,39 @@ static MassMomentOfInertia() Info = new QuantityInfo("MassMomentOfInertia", new UnitInfo[] { - new UnitInfo(MassMomentOfInertiaUnit.GramSquareCentimeter, "GramSquareCentimeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.GramSquareDecimeter, "GramSquareDecimeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.GramSquareMeter, "GramSquareMeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.GramSquareMillimeter, "GramSquareMillimeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.KilogramSquareCentimeter, "KilogramSquareCentimeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.KilogramSquareDecimeter, "KilogramSquareDecimeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.KilogramSquareMeter, "KilogramSquareMeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.KilogramSquareMillimeter, "KilogramSquareMillimeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.KilotonneSquareCentimeter, "KilotonneSquareCentimeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.KilotonneSquareDecimeter, "KilotonneSquareDecimeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.KilotonneSquareMeter, "KilotonneSquareMeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.KilotonneSquareMilimeter, "KilotonneSquareMilimeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.MegatonneSquareCentimeter, "MegatonneSquareCentimeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.MegatonneSquareDecimeter, "MegatonneSquareDecimeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.MegatonneSquareMeter, "MegatonneSquareMeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.MegatonneSquareMilimeter, "MegatonneSquareMilimeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.MilligramSquareCentimeter, "MilligramSquareCentimeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.MilligramSquareDecimeter, "MilligramSquareDecimeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.MilligramSquareMeter, "MilligramSquareMeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.MilligramSquareMillimeter, "MilligramSquareMillimeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.PoundSquareFoot, "PoundSquareFeet", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.PoundSquareInch, "PoundSquareInches", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.SlugSquareFoot, "SlugSquareFeet", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.SlugSquareInch, "SlugSquareInches", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.TonneSquareCentimeter, "TonneSquareCentimeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.TonneSquareDecimeter, "TonneSquareDecimeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.TonneSquareMeter, "TonneSquareMeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.TonneSquareMilimeter, "TonneSquareMilimeters", BaseUnits.Undefined), + new UnitInfo(MassMomentOfInertiaUnit.GramSquareCentimeter, "GramSquareCentimeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.GramSquareDecimeter, "GramSquareDecimeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.GramSquareMeter, "GramSquareMeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.GramSquareMillimeter, "GramSquareMillimeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.KilogramSquareCentimeter, "KilogramSquareCentimeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.KilogramSquareDecimeter, "KilogramSquareDecimeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.KilogramSquareMeter, "KilogramSquareMeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.KilogramSquareMillimeter, "KilogramSquareMillimeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.KilotonneSquareCentimeter, "KilotonneSquareCentimeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.KilotonneSquareDecimeter, "KilotonneSquareDecimeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.KilotonneSquareMeter, "KilotonneSquareMeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.KilotonneSquareMilimeter, "KilotonneSquareMilimeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.MegatonneSquareCentimeter, "MegatonneSquareCentimeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.MegatonneSquareDecimeter, "MegatonneSquareDecimeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.MegatonneSquareMeter, "MegatonneSquareMeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.MegatonneSquareMilimeter, "MegatonneSquareMilimeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.MilligramSquareCentimeter, "MilligramSquareCentimeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.MilligramSquareDecimeter, "MilligramSquareDecimeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.MilligramSquareMeter, "MilligramSquareMeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.MilligramSquareMillimeter, "MilligramSquareMillimeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.PoundSquareFoot, "PoundSquareFeet", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.PoundSquareInch, "PoundSquareInches", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.SlugSquareFoot, "SlugSquareFeet", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.SlugSquareInch, "SlugSquareInches", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.TonneSquareCentimeter, "TonneSquareCentimeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.TonneSquareDecimeter, "TonneSquareDecimeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.TonneSquareMeter, "TonneSquareMeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.TonneSquareMilimeter, "TonneSquareMilimeters", BaseUnits.Undefined, "MassMomentOfInertia"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, MassMomentOfInertiaUnit Unit), List>(); } /// @@ -169,11 +164,6 @@ public MassMomentOfInertia(double value, UnitSystem unitSystem) /// public static MassMomentOfInertia AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, MassMomentOfInertiaUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -423,7 +413,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(MassMomentOfInertiaUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(MassMomentOfInertiaUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -433,34 +426,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(MassMomentOfInertiaUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(MassMomentOfInertiaUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.MassMomentOfInertia"; - var resourceManager = new ResourceManager(resourceName, typeof(MassMomentOfInertia).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -1327,9 +1293,6 @@ public MassMomentOfInertia ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs index 145d73fd13..5e73c83bd3 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,16 +65,14 @@ static MolarEnergy() Info = new QuantityInfo("MolarEnergy", new UnitInfo[] { - new UnitInfo(MolarEnergyUnit.JoulePerMole, "JoulesPerMole", BaseUnits.Undefined), - new UnitInfo(MolarEnergyUnit.KilojoulePerMole, "KilojoulesPerMole", BaseUnits.Undefined), - new UnitInfo(MolarEnergyUnit.MegajoulePerMole, "MegajoulesPerMole", BaseUnits.Undefined), + new UnitInfo(MolarEnergyUnit.JoulePerMole, "JoulesPerMole", BaseUnits.Undefined, "MolarEnergy"), + new UnitInfo(MolarEnergyUnit.KilojoulePerMole, "KilojoulesPerMole", BaseUnits.Undefined, "MolarEnergy"), + new UnitInfo(MolarEnergyUnit.MegajoulePerMole, "MegajoulesPerMole", BaseUnits.Undefined, "MolarEnergy"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, MolarEnergyUnit Unit), List>(); } /// @@ -144,11 +139,6 @@ public MolarEnergy(double value, UnitSystem unitSystem) /// public static MolarEnergy AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, MolarEnergyUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -223,7 +213,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(MolarEnergyUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(MolarEnergyUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -233,34 +226,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(MolarEnergyUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(MolarEnergyUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.MolarEnergy"; - var resourceManager = new ResourceManager(resourceName, typeof(MolarEnergy).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -827,9 +793,6 @@ public MolarEnergy ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs index f772db704b..d8066e4175 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,16 +65,14 @@ static MolarEntropy() Info = new QuantityInfo("MolarEntropy", new UnitInfo[] { - new UnitInfo(MolarEntropyUnit.JoulePerMoleKelvin, "JoulesPerMoleKelvin", BaseUnits.Undefined), - new UnitInfo(MolarEntropyUnit.KilojoulePerMoleKelvin, "KilojoulesPerMoleKelvin", BaseUnits.Undefined), - new UnitInfo(MolarEntropyUnit.MegajoulePerMoleKelvin, "MegajoulesPerMoleKelvin", BaseUnits.Undefined), + new UnitInfo(MolarEntropyUnit.JoulePerMoleKelvin, "JoulesPerMoleKelvin", BaseUnits.Undefined, "MolarEntropy"), + new UnitInfo(MolarEntropyUnit.KilojoulePerMoleKelvin, "KilojoulesPerMoleKelvin", BaseUnits.Undefined, "MolarEntropy"), + new UnitInfo(MolarEntropyUnit.MegajoulePerMoleKelvin, "MegajoulesPerMoleKelvin", BaseUnits.Undefined, "MolarEntropy"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, MolarEntropyUnit Unit), List>(); } /// @@ -144,11 +139,6 @@ public MolarEntropy(double value, UnitSystem unitSystem) /// public static MolarEntropy AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, MolarEntropyUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -223,7 +213,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(MolarEntropyUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(MolarEntropyUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -233,34 +226,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(MolarEntropyUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(MolarEntropyUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.MolarEntropy"; - var resourceManager = new ResourceManager(resourceName, typeof(MolarEntropy).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -827,9 +793,6 @@ public MolarEntropy ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs index c713a372e3..6fc19c6b32 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,22 +65,20 @@ static MolarFlow() Info = new QuantityInfo("MolarFlow", new UnitInfo[] { - new UnitInfo(MolarFlowUnit.KilomolePerHour, "KilomolesPerHour", BaseUnits.Undefined), - new UnitInfo(MolarFlowUnit.KilomolePerMinute, "KilomolesPerMinute", BaseUnits.Undefined), - new UnitInfo(MolarFlowUnit.KilomolePerSecond, "KilomolesPerSecond", BaseUnits.Undefined), - new UnitInfo(MolarFlowUnit.MolePerHour, "MolesPerHour", new BaseUnits(time: DurationUnit.Hour, amount: AmountOfSubstanceUnit.Mole)), - new UnitInfo(MolarFlowUnit.MolePerMinute, "MolesPerMinute", new BaseUnits(time: DurationUnit.Minute, amount: AmountOfSubstanceUnit.Mole)), - new UnitInfo(MolarFlowUnit.MolePerSecond, "MolesPerSecond", new BaseUnits(time: DurationUnit.Second, amount: AmountOfSubstanceUnit.Mole)), - new UnitInfo(MolarFlowUnit.PoundMolePerHour, "PoundMolesPerHour", new BaseUnits(time: DurationUnit.Hour, amount: AmountOfSubstanceUnit.PoundMole)), - new UnitInfo(MolarFlowUnit.PoundMolePerMinute, "PoundMolesPerMinute", new BaseUnits(time: DurationUnit.Minute, amount: AmountOfSubstanceUnit.PoundMole)), - new UnitInfo(MolarFlowUnit.PoundMolePerSecond, "PoundMolesPerSecond", new BaseUnits(time: DurationUnit.Second, amount: AmountOfSubstanceUnit.PoundMole)), + new UnitInfo(MolarFlowUnit.KilomolePerHour, "KilomolesPerHour", BaseUnits.Undefined, "MolarFlow"), + new UnitInfo(MolarFlowUnit.KilomolePerMinute, "KilomolesPerMinute", BaseUnits.Undefined, "MolarFlow"), + new UnitInfo(MolarFlowUnit.KilomolePerSecond, "KilomolesPerSecond", BaseUnits.Undefined, "MolarFlow"), + new UnitInfo(MolarFlowUnit.MolePerHour, "MolesPerHour", new BaseUnits(time: DurationUnit.Hour, amount: AmountOfSubstanceUnit.Mole), "MolarFlow"), + new UnitInfo(MolarFlowUnit.MolePerMinute, "MolesPerMinute", new BaseUnits(time: DurationUnit.Minute, amount: AmountOfSubstanceUnit.Mole), "MolarFlow"), + new UnitInfo(MolarFlowUnit.MolePerSecond, "MolesPerSecond", new BaseUnits(time: DurationUnit.Second, amount: AmountOfSubstanceUnit.Mole), "MolarFlow"), + new UnitInfo(MolarFlowUnit.PoundMolePerHour, "PoundMolesPerHour", new BaseUnits(time: DurationUnit.Hour, amount: AmountOfSubstanceUnit.PoundMole), "MolarFlow"), + new UnitInfo(MolarFlowUnit.PoundMolePerMinute, "PoundMolesPerMinute", new BaseUnits(time: DurationUnit.Minute, amount: AmountOfSubstanceUnit.PoundMole), "MolarFlow"), + new UnitInfo(MolarFlowUnit.PoundMolePerSecond, "PoundMolesPerSecond", new BaseUnits(time: DurationUnit.Second, amount: AmountOfSubstanceUnit.PoundMole), "MolarFlow"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, MolarFlowUnit Unit), List>(); } /// @@ -150,11 +145,6 @@ public MolarFlow(double value, UnitSystem unitSystem) /// public static MolarFlow AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, MolarFlowUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -271,7 +261,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(MolarFlowUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(MolarFlowUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -281,34 +274,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(MolarFlowUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(MolarFlowUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.MolarFlow"; - var resourceManager = new ResourceManager(resourceName, typeof(MolarFlow).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -947,9 +913,6 @@ public MolarFlow ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs index 826dd14b5e..cd4fe410d4 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,26 +65,24 @@ static MolarMass() Info = new QuantityInfo("MolarMass", new UnitInfo[] { - new UnitInfo(MolarMassUnit.CentigramPerMole, "CentigramsPerMole", BaseUnits.Undefined), - new UnitInfo(MolarMassUnit.DecagramPerMole, "DecagramsPerMole", BaseUnits.Undefined), - new UnitInfo(MolarMassUnit.DecigramPerMole, "DecigramsPerMole", BaseUnits.Undefined), - new UnitInfo(MolarMassUnit.GramPerMole, "GramsPerMole", BaseUnits.Undefined), - new UnitInfo(MolarMassUnit.HectogramPerMole, "HectogramsPerMole", BaseUnits.Undefined), - new UnitInfo(MolarMassUnit.KilogramPerKilomole, "KilogramsPerKilomole", BaseUnits.Undefined), - new UnitInfo(MolarMassUnit.KilogramPerMole, "KilogramsPerMole", BaseUnits.Undefined), - new UnitInfo(MolarMassUnit.KilopoundPerMole, "KilopoundsPerMole", BaseUnits.Undefined), - new UnitInfo(MolarMassUnit.MegapoundPerMole, "MegapoundsPerMole", BaseUnits.Undefined), - new UnitInfo(MolarMassUnit.MicrogramPerMole, "MicrogramsPerMole", BaseUnits.Undefined), - new UnitInfo(MolarMassUnit.MilligramPerMole, "MilligramsPerMole", BaseUnits.Undefined), - new UnitInfo(MolarMassUnit.NanogramPerMole, "NanogramsPerMole", BaseUnits.Undefined), - new UnitInfo(MolarMassUnit.PoundPerMole, "PoundsPerMole", BaseUnits.Undefined), + new UnitInfo(MolarMassUnit.CentigramPerMole, "CentigramsPerMole", BaseUnits.Undefined, "MolarMass"), + new UnitInfo(MolarMassUnit.DecagramPerMole, "DecagramsPerMole", BaseUnits.Undefined, "MolarMass"), + new UnitInfo(MolarMassUnit.DecigramPerMole, "DecigramsPerMole", BaseUnits.Undefined, "MolarMass"), + new UnitInfo(MolarMassUnit.GramPerMole, "GramsPerMole", BaseUnits.Undefined, "MolarMass"), + new UnitInfo(MolarMassUnit.HectogramPerMole, "HectogramsPerMole", BaseUnits.Undefined, "MolarMass"), + new UnitInfo(MolarMassUnit.KilogramPerKilomole, "KilogramsPerKilomole", BaseUnits.Undefined, "MolarMass"), + new UnitInfo(MolarMassUnit.KilogramPerMole, "KilogramsPerMole", BaseUnits.Undefined, "MolarMass"), + new UnitInfo(MolarMassUnit.KilopoundPerMole, "KilopoundsPerMole", BaseUnits.Undefined, "MolarMass"), + new UnitInfo(MolarMassUnit.MegapoundPerMole, "MegapoundsPerMole", BaseUnits.Undefined, "MolarMass"), + new UnitInfo(MolarMassUnit.MicrogramPerMole, "MicrogramsPerMole", BaseUnits.Undefined, "MolarMass"), + new UnitInfo(MolarMassUnit.MilligramPerMole, "MilligramsPerMole", BaseUnits.Undefined, "MolarMass"), + new UnitInfo(MolarMassUnit.NanogramPerMole, "NanogramsPerMole", BaseUnits.Undefined, "MolarMass"), + new UnitInfo(MolarMassUnit.PoundPerMole, "PoundsPerMole", BaseUnits.Undefined, "MolarMass"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, MolarMassUnit Unit), List>(); } /// @@ -154,11 +149,6 @@ public MolarMass(double value, UnitSystem unitSystem) /// public static MolarMass AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, MolarMassUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -303,7 +293,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(MolarMassUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(MolarMassUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -313,34 +306,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(MolarMassUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(MolarMassUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.MolarMass"; - var resourceManager = new ResourceManager(resourceName, typeof(MolarMass).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -1027,9 +993,6 @@ public MolarMass ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs b/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs index 4a713c1929..347a90afb2 100644 --- a/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -71,24 +68,22 @@ static Molarity() Info = new QuantityInfo("Molarity", new UnitInfo[] { - new UnitInfo(MolarityUnit.CentimolePerLiter, "CentimolesPerLiter", BaseUnits.Undefined), - new UnitInfo(MolarityUnit.DecimolePerLiter, "DecimolesPerLiter", BaseUnits.Undefined), - new UnitInfo(MolarityUnit.FemtomolePerLiter, "FemtomolesPerLiter", BaseUnits.Undefined), - new UnitInfo(MolarityUnit.KilomolePerCubicMeter, "KilomolesPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(MolarityUnit.MicromolePerLiter, "MicromolesPerLiter", BaseUnits.Undefined), - new UnitInfo(MolarityUnit.MillimolePerLiter, "MillimolesPerLiter", BaseUnits.Undefined), - new UnitInfo(MolarityUnit.MolePerCubicMeter, "MolesPerCubicMeter", new BaseUnits(length: LengthUnit.Meter, amount: AmountOfSubstanceUnit.Mole)), - new UnitInfo(MolarityUnit.MolePerLiter, "MolesPerLiter", new BaseUnits(length: LengthUnit.Decimeter, amount: AmountOfSubstanceUnit.Mole)), - new UnitInfo(MolarityUnit.NanomolePerLiter, "NanomolesPerLiter", BaseUnits.Undefined), - new UnitInfo(MolarityUnit.PicomolePerLiter, "PicomolesPerLiter", BaseUnits.Undefined), - new UnitInfo(MolarityUnit.PoundMolePerCubicFoot, "PoundMolesPerCubicFoot", new BaseUnits(length: LengthUnit.Foot, amount: AmountOfSubstanceUnit.PoundMole)), + new UnitInfo(MolarityUnit.CentimolePerLiter, "CentimolesPerLiter", BaseUnits.Undefined, "Molarity"), + new UnitInfo(MolarityUnit.DecimolePerLiter, "DecimolesPerLiter", BaseUnits.Undefined, "Molarity"), + new UnitInfo(MolarityUnit.FemtomolePerLiter, "FemtomolesPerLiter", BaseUnits.Undefined, "Molarity"), + new UnitInfo(MolarityUnit.KilomolePerCubicMeter, "KilomolesPerCubicMeter", BaseUnits.Undefined, "Molarity"), + new UnitInfo(MolarityUnit.MicromolePerLiter, "MicromolesPerLiter", BaseUnits.Undefined, "Molarity"), + new UnitInfo(MolarityUnit.MillimolePerLiter, "MillimolesPerLiter", BaseUnits.Undefined, "Molarity"), + new UnitInfo(MolarityUnit.MolePerCubicMeter, "MolesPerCubicMeter", new BaseUnits(length: LengthUnit.Meter, amount: AmountOfSubstanceUnit.Mole), "Molarity"), + new UnitInfo(MolarityUnit.MolePerLiter, "MolesPerLiter", new BaseUnits(length: LengthUnit.Decimeter, amount: AmountOfSubstanceUnit.Mole), "Molarity"), + new UnitInfo(MolarityUnit.NanomolePerLiter, "NanomolesPerLiter", BaseUnits.Undefined, "Molarity"), + new UnitInfo(MolarityUnit.PicomolePerLiter, "PicomolesPerLiter", BaseUnits.Undefined, "Molarity"), + new UnitInfo(MolarityUnit.PoundMolePerCubicFoot, "PoundMolesPerCubicFoot", new BaseUnits(length: LengthUnit.Foot, amount: AmountOfSubstanceUnit.PoundMole), "Molarity"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, MolarityUnit Unit), List>(); } /// @@ -155,11 +150,6 @@ public Molarity(double value, UnitSystem unitSystem) /// public static Molarity AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, MolarityUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -290,7 +280,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(MolarityUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(MolarityUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -300,34 +293,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(MolarityUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(MolarityUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Molarity"; - var resourceManager = new ResourceManager(resourceName, typeof(Molarity).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -990,9 +956,6 @@ public Molarity ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs b/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs index 1c87c9a43d..f67fd4f381 100644 --- a/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -71,14 +68,12 @@ static Permeability() Info = new QuantityInfo("Permeability", new UnitInfo[] { - new UnitInfo(PermeabilityUnit.HenryPerMeter, "HenriesPerMeter", BaseUnits.Undefined), + new UnitInfo(PermeabilityUnit.HenryPerMeter, "HenriesPerMeter", BaseUnits.Undefined, "Permeability"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, PermeabilityUnit Unit), List>(); } /// @@ -145,11 +140,6 @@ public Permeability(double value, UnitSystem unitSystem) /// public static Permeability AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, PermeabilityUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -210,7 +200,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(PermeabilityUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(PermeabilityUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -220,34 +213,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(PermeabilityUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(PermeabilityUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Permeability"; - var resourceManager = new ResourceManager(resourceName, typeof(Permeability).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -790,9 +756,6 @@ public Permeability ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs b/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs index d2817da12a..481dd0a386 100644 --- a/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -71,14 +68,12 @@ static Permittivity() Info = new QuantityInfo("Permittivity", new UnitInfo[] { - new UnitInfo(PermittivityUnit.FaradPerMeter, "FaradsPerMeter", BaseUnits.Undefined), + new UnitInfo(PermittivityUnit.FaradPerMeter, "FaradsPerMeter", BaseUnits.Undefined, "Permittivity"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, PermittivityUnit Unit), List>(); } /// @@ -145,11 +140,6 @@ public Permittivity(double value, UnitSystem unitSystem) /// public static Permittivity AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, PermittivityUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -210,7 +200,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(PermittivityUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(PermittivityUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -220,34 +213,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(PermittivityUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(PermittivityUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Permittivity"; - var resourceManager = new ResourceManager(resourceName, typeof(Permittivity).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -790,9 +756,6 @@ public Permittivity ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/PorousMediumPermeability.g.cs b/UnitsNet/GeneratedCode/Quantities/PorousMediumPermeability.g.cs index 77c395d60f..24f9e7d0e4 100644 --- a/UnitsNet/GeneratedCode/Quantities/PorousMediumPermeability.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PorousMediumPermeability.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -71,18 +68,16 @@ static PorousMediumPermeability() Info = new QuantityInfo("PorousMediumPermeability", new UnitInfo[] { - new UnitInfo(PorousMediumPermeabilityUnit.Darcy, "Darcys", BaseUnits.Undefined), - new UnitInfo(PorousMediumPermeabilityUnit.Microdarcy, "Microdarcys", BaseUnits.Undefined), - new UnitInfo(PorousMediumPermeabilityUnit.Millidarcy, "Millidarcys", BaseUnits.Undefined), - new UnitInfo(PorousMediumPermeabilityUnit.SquareCentimeter, "SquareCentimeters", new BaseUnits(length: LengthUnit.Centimeter)), - new UnitInfo(PorousMediumPermeabilityUnit.SquareMeter, "SquareMeters", new BaseUnits(length: LengthUnit.Meter)), + new UnitInfo(PorousMediumPermeabilityUnit.Darcy, "Darcys", BaseUnits.Undefined, "PorousMediumPermeability"), + new UnitInfo(PorousMediumPermeabilityUnit.Microdarcy, "Microdarcys", BaseUnits.Undefined, "PorousMediumPermeability"), + new UnitInfo(PorousMediumPermeabilityUnit.Millidarcy, "Millidarcys", BaseUnits.Undefined, "PorousMediumPermeability"), + new UnitInfo(PorousMediumPermeabilityUnit.SquareCentimeter, "SquareCentimeters", new BaseUnits(length: LengthUnit.Centimeter), "PorousMediumPermeability"), + new UnitInfo(PorousMediumPermeabilityUnit.SquareMeter, "SquareMeters", new BaseUnits(length: LengthUnit.Meter), "PorousMediumPermeability"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, PorousMediumPermeabilityUnit Unit), List>(); } /// @@ -149,11 +144,6 @@ public PorousMediumPermeability(double value, UnitSystem unitSystem) /// public static PorousMediumPermeability AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, PorousMediumPermeabilityUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -242,7 +232,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(PorousMediumPermeabilityUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(PorousMediumPermeabilityUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -252,34 +245,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(PorousMediumPermeabilityUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(PorousMediumPermeabilityUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.PorousMediumPermeability"; - var resourceManager = new ResourceManager(resourceName, typeof(PorousMediumPermeability).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -870,9 +836,6 @@ public PorousMediumPermeability ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Power.g.cs b/UnitsNet/GeneratedCode/Quantities/Power.g.cs index 53dc70d8fd..c7f71c0520 100644 --- a/UnitsNet/GeneratedCode/Quantities/Power.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Power.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -69,39 +66,37 @@ static Power() Info = new QuantityInfo("Power", new UnitInfo[] { - new UnitInfo(PowerUnit.BoilerHorsepower, "BoilerHorsepower", BaseUnits.Undefined), - new UnitInfo(PowerUnit.BritishThermalUnitPerHour, "BritishThermalUnitsPerHour", BaseUnits.Undefined), - new UnitInfo(PowerUnit.Decawatt, "Decawatts", BaseUnits.Undefined), - new UnitInfo(PowerUnit.Deciwatt, "Deciwatts", BaseUnits.Undefined), - new UnitInfo(PowerUnit.ElectricalHorsepower, "ElectricalHorsepower", BaseUnits.Undefined), - new UnitInfo(PowerUnit.Femtowatt, "Femtowatts", BaseUnits.Undefined), - new UnitInfo(PowerUnit.GigajoulePerHour, "GigajoulesPerHour", BaseUnits.Undefined), - new UnitInfo(PowerUnit.Gigawatt, "Gigawatts", BaseUnits.Undefined), - new UnitInfo(PowerUnit.HydraulicHorsepower, "HydraulicHorsepower", BaseUnits.Undefined), - new UnitInfo(PowerUnit.JoulePerHour, "JoulesPerHour", BaseUnits.Undefined), - new UnitInfo(PowerUnit.KilobritishThermalUnitPerHour, "KilobritishThermalUnitsPerHour", BaseUnits.Undefined), - new UnitInfo(PowerUnit.KilojoulePerHour, "KilojoulesPerHour", BaseUnits.Undefined), - new UnitInfo(PowerUnit.Kilowatt, "Kilowatts", BaseUnits.Undefined), - new UnitInfo(PowerUnit.MechanicalHorsepower, "MechanicalHorsepower", BaseUnits.Undefined), - new UnitInfo(PowerUnit.MegabritishThermalUnitPerHour, "MegabritishThermalUnitsPerHour", BaseUnits.Undefined), - new UnitInfo(PowerUnit.MegajoulePerHour, "MegajoulesPerHour", BaseUnits.Undefined), - new UnitInfo(PowerUnit.Megawatt, "Megawatts", BaseUnits.Undefined), - new UnitInfo(PowerUnit.MetricHorsepower, "MetricHorsepower", BaseUnits.Undefined), - new UnitInfo(PowerUnit.Microwatt, "Microwatts", BaseUnits.Undefined), - new UnitInfo(PowerUnit.MillijoulePerHour, "MillijoulesPerHour", BaseUnits.Undefined), - new UnitInfo(PowerUnit.Milliwatt, "Milliwatts", BaseUnits.Undefined), - new UnitInfo(PowerUnit.Nanowatt, "Nanowatts", BaseUnits.Undefined), - new UnitInfo(PowerUnit.Petawatt, "Petawatts", BaseUnits.Undefined), - new UnitInfo(PowerUnit.Picowatt, "Picowatts", BaseUnits.Undefined), - new UnitInfo(PowerUnit.Terawatt, "Terawatts", BaseUnits.Undefined), - new UnitInfo(PowerUnit.Watt, "Watts", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second)), + new UnitInfo(PowerUnit.BoilerHorsepower, "BoilerHorsepower", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.BritishThermalUnitPerHour, "BritishThermalUnitsPerHour", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.Decawatt, "Decawatts", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.Deciwatt, "Deciwatts", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.ElectricalHorsepower, "ElectricalHorsepower", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.Femtowatt, "Femtowatts", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.GigajoulePerHour, "GigajoulesPerHour", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.Gigawatt, "Gigawatts", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.HydraulicHorsepower, "HydraulicHorsepower", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.JoulePerHour, "JoulesPerHour", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.KilobritishThermalUnitPerHour, "KilobritishThermalUnitsPerHour", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.KilojoulePerHour, "KilojoulesPerHour", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.Kilowatt, "Kilowatts", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.MechanicalHorsepower, "MechanicalHorsepower", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.MegabritishThermalUnitPerHour, "MegabritishThermalUnitsPerHour", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.MegajoulePerHour, "MegajoulesPerHour", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.Megawatt, "Megawatts", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.MetricHorsepower, "MetricHorsepower", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.Microwatt, "Microwatts", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.MillijoulePerHour, "MillijoulesPerHour", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.Milliwatt, "Milliwatts", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.Nanowatt, "Nanowatts", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.Petawatt, "Petawatts", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.Picowatt, "Picowatts", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.Terawatt, "Terawatts", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.Watt, "Watts", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second), "Power"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, PowerUnit Unit), List>(); } /// @@ -168,11 +163,6 @@ public Power(decimal value, UnitSystem unitSystem) /// public static Power AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, PowerUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -408,7 +398,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(PowerUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(PowerUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -418,34 +411,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(PowerUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(PowerUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Power"; - var resourceManager = new ResourceManager(resourceName, typeof(Power).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -1299,9 +1265,6 @@ public Power ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs index ba0a3e6a33..4961851370 100644 --- a/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,57 +65,55 @@ static PowerDensity() Info = new QuantityInfo("PowerDensity", new UnitInfo[] { - new UnitInfo(PowerDensityUnit.DecawattPerCubicFoot, "DecawattsPerCubicFoot", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.DecawattPerCubicInch, "DecawattsPerCubicInch", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.DecawattPerCubicMeter, "DecawattsPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.DecawattPerLiter, "DecawattsPerLiter", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.DeciwattPerCubicFoot, "DeciwattsPerCubicFoot", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.DeciwattPerCubicInch, "DeciwattsPerCubicInch", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.DeciwattPerCubicMeter, "DeciwattsPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.DeciwattPerLiter, "DeciwattsPerLiter", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.GigawattPerCubicFoot, "GigawattsPerCubicFoot", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.GigawattPerCubicInch, "GigawattsPerCubicInch", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.GigawattPerCubicMeter, "GigawattsPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.GigawattPerLiter, "GigawattsPerLiter", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.KilowattPerCubicFoot, "KilowattsPerCubicFoot", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.KilowattPerCubicInch, "KilowattsPerCubicInch", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.KilowattPerCubicMeter, "KilowattsPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.KilowattPerLiter, "KilowattsPerLiter", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.MegawattPerCubicFoot, "MegawattsPerCubicFoot", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.MegawattPerCubicInch, "MegawattsPerCubicInch", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.MegawattPerCubicMeter, "MegawattsPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.MegawattPerLiter, "MegawattsPerLiter", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.MicrowattPerCubicFoot, "MicrowattsPerCubicFoot", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.MicrowattPerCubicInch, "MicrowattsPerCubicInch", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.MicrowattPerCubicMeter, "MicrowattsPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.MicrowattPerLiter, "MicrowattsPerLiter", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.MilliwattPerCubicFoot, "MilliwattsPerCubicFoot", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.MilliwattPerCubicInch, "MilliwattsPerCubicInch", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.MilliwattPerCubicMeter, "MilliwattsPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.MilliwattPerLiter, "MilliwattsPerLiter", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.NanowattPerCubicFoot, "NanowattsPerCubicFoot", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.NanowattPerCubicInch, "NanowattsPerCubicInch", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.NanowattPerCubicMeter, "NanowattsPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.NanowattPerLiter, "NanowattsPerLiter", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.PicowattPerCubicFoot, "PicowattsPerCubicFoot", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.PicowattPerCubicInch, "PicowattsPerCubicInch", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.PicowattPerCubicMeter, "PicowattsPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.PicowattPerLiter, "PicowattsPerLiter", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.TerawattPerCubicFoot, "TerawattsPerCubicFoot", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.TerawattPerCubicInch, "TerawattsPerCubicInch", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.TerawattPerCubicMeter, "TerawattsPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.TerawattPerLiter, "TerawattsPerLiter", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.WattPerCubicFoot, "WattsPerCubicFoot", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.WattPerCubicInch, "WattsPerCubicInch", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.WattPerCubicMeter, "WattsPerCubicMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second)), - new UnitInfo(PowerDensityUnit.WattPerLiter, "WattsPerLiter", BaseUnits.Undefined), + new UnitInfo(PowerDensityUnit.DecawattPerCubicFoot, "DecawattsPerCubicFoot", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.DecawattPerCubicInch, "DecawattsPerCubicInch", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.DecawattPerCubicMeter, "DecawattsPerCubicMeter", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.DecawattPerLiter, "DecawattsPerLiter", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.DeciwattPerCubicFoot, "DeciwattsPerCubicFoot", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.DeciwattPerCubicInch, "DeciwattsPerCubicInch", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.DeciwattPerCubicMeter, "DeciwattsPerCubicMeter", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.DeciwattPerLiter, "DeciwattsPerLiter", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.GigawattPerCubicFoot, "GigawattsPerCubicFoot", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.GigawattPerCubicInch, "GigawattsPerCubicInch", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.GigawattPerCubicMeter, "GigawattsPerCubicMeter", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.GigawattPerLiter, "GigawattsPerLiter", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.KilowattPerCubicFoot, "KilowattsPerCubicFoot", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.KilowattPerCubicInch, "KilowattsPerCubicInch", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.KilowattPerCubicMeter, "KilowattsPerCubicMeter", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.KilowattPerLiter, "KilowattsPerLiter", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.MegawattPerCubicFoot, "MegawattsPerCubicFoot", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.MegawattPerCubicInch, "MegawattsPerCubicInch", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.MegawattPerCubicMeter, "MegawattsPerCubicMeter", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.MegawattPerLiter, "MegawattsPerLiter", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.MicrowattPerCubicFoot, "MicrowattsPerCubicFoot", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.MicrowattPerCubicInch, "MicrowattsPerCubicInch", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.MicrowattPerCubicMeter, "MicrowattsPerCubicMeter", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.MicrowattPerLiter, "MicrowattsPerLiter", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.MilliwattPerCubicFoot, "MilliwattsPerCubicFoot", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.MilliwattPerCubicInch, "MilliwattsPerCubicInch", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.MilliwattPerCubicMeter, "MilliwattsPerCubicMeter", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.MilliwattPerLiter, "MilliwattsPerLiter", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.NanowattPerCubicFoot, "NanowattsPerCubicFoot", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.NanowattPerCubicInch, "NanowattsPerCubicInch", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.NanowattPerCubicMeter, "NanowattsPerCubicMeter", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.NanowattPerLiter, "NanowattsPerLiter", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.PicowattPerCubicFoot, "PicowattsPerCubicFoot", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.PicowattPerCubicInch, "PicowattsPerCubicInch", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.PicowattPerCubicMeter, "PicowattsPerCubicMeter", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.PicowattPerLiter, "PicowattsPerLiter", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.TerawattPerCubicFoot, "TerawattsPerCubicFoot", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.TerawattPerCubicInch, "TerawattsPerCubicInch", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.TerawattPerCubicMeter, "TerawattsPerCubicMeter", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.TerawattPerLiter, "TerawattsPerLiter", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.WattPerCubicFoot, "WattsPerCubicFoot", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.WattPerCubicInch, "WattsPerCubicInch", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.WattPerCubicMeter, "WattsPerCubicMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second), "PowerDensity"), + new UnitInfo(PowerDensityUnit.WattPerLiter, "WattsPerLiter", BaseUnits.Undefined, "PowerDensity"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, PowerDensityUnit Unit), List>(); } /// @@ -185,11 +180,6 @@ public PowerDensity(double value, UnitSystem unitSystem) /// public static PowerDensity AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, PowerDensityUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -551,7 +541,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(PowerDensityUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(PowerDensityUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -561,34 +554,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(PowerDensityUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(PowerDensityUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.PowerDensity"; - var resourceManager = new ResourceManager(resourceName, typeof(PowerDensity).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -1647,9 +1613,6 @@ public PowerDensity ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs b/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs index c679f73221..7d6392c2c8 100644 --- a/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,15 +65,13 @@ static PowerRatio() Info = new QuantityInfo("PowerRatio", new UnitInfo[] { - new UnitInfo(PowerRatioUnit.DecibelMilliwatt, "DecibelMilliwatts", BaseUnits.Undefined), - new UnitInfo(PowerRatioUnit.DecibelWatt, "DecibelWatts", BaseUnits.Undefined), + new UnitInfo(PowerRatioUnit.DecibelMilliwatt, "DecibelMilliwatts", BaseUnits.Undefined, "PowerRatio"), + new UnitInfo(PowerRatioUnit.DecibelWatt, "DecibelWatts", BaseUnits.Undefined, "PowerRatio"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, PowerRatioUnit Unit), List>(); } /// @@ -143,11 +138,6 @@ public PowerRatio(double value, UnitSystem unitSystem) /// public static PowerRatio AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, PowerRatioUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -215,7 +205,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(PowerRatioUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(PowerRatioUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -225,34 +218,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(PowerRatioUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(PowerRatioUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.PowerRatio"; - var resourceManager = new ResourceManager(resourceName, typeof(PowerRatio).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -815,9 +781,6 @@ public PowerRatio ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs b/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs index 2162dd5c36..b31e91302b 100644 --- a/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,62 +65,60 @@ static Pressure() Info = new QuantityInfo("Pressure", new UnitInfo[] { - new UnitInfo(PressureUnit.Atmosphere, "Atmospheres", BaseUnits.Undefined), - new UnitInfo(PressureUnit.Bar, "Bars", BaseUnits.Undefined), - new UnitInfo(PressureUnit.Centibar, "Centibars", BaseUnits.Undefined), - new UnitInfo(PressureUnit.CentimeterOfWaterColumn, "CentimetersOfWaterColumn", BaseUnits.Undefined), - new UnitInfo(PressureUnit.Decapascal, "Decapascals", BaseUnits.Undefined), - new UnitInfo(PressureUnit.Decibar, "Decibars", BaseUnits.Undefined), - new UnitInfo(PressureUnit.DynePerSquareCentimeter, "DynesPerSquareCentimeter", BaseUnits.Undefined), - new UnitInfo(PressureUnit.FootOfElevation, "FeetOfElevation", BaseUnits.Undefined), - new UnitInfo(PressureUnit.FootOfHead, "FeetOfHead", BaseUnits.Undefined), - new UnitInfo(PressureUnit.Gigapascal, "Gigapascals", BaseUnits.Undefined), - new UnitInfo(PressureUnit.Hectopascal, "Hectopascals", BaseUnits.Undefined), - new UnitInfo(PressureUnit.InchOfMercury, "InchesOfMercury", BaseUnits.Undefined), - new UnitInfo(PressureUnit.InchOfWaterColumn, "InchesOfWaterColumn", BaseUnits.Undefined), - new UnitInfo(PressureUnit.Kilobar, "Kilobars", BaseUnits.Undefined), - new UnitInfo(PressureUnit.KilogramForcePerSquareCentimeter, "KilogramsForcePerSquareCentimeter", BaseUnits.Undefined), - new UnitInfo(PressureUnit.KilogramForcePerSquareMeter, "KilogramsForcePerSquareMeter", BaseUnits.Undefined), - new UnitInfo(PressureUnit.KilogramForcePerSquareMillimeter, "KilogramsForcePerSquareMillimeter", BaseUnits.Undefined), - new UnitInfo(PressureUnit.KilonewtonPerSquareCentimeter, "KilonewtonsPerSquareCentimeter", BaseUnits.Undefined), - new UnitInfo(PressureUnit.KilonewtonPerSquareMeter, "KilonewtonsPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(PressureUnit.KilonewtonPerSquareMillimeter, "KilonewtonsPerSquareMillimeter", BaseUnits.Undefined), - new UnitInfo(PressureUnit.Kilopascal, "Kilopascals", BaseUnits.Undefined), - new UnitInfo(PressureUnit.KilopoundForcePerSquareFoot, "KilopoundsForcePerSquareFoot", BaseUnits.Undefined), - new UnitInfo(PressureUnit.KilopoundForcePerSquareInch, "KilopoundsForcePerSquareInch", BaseUnits.Undefined), - new UnitInfo(PressureUnit.KilopoundForcePerSquareMil, "KilopoundsForcePerSquareMil", BaseUnits.Undefined), - new UnitInfo(PressureUnit.Megabar, "Megabars", BaseUnits.Undefined), - new UnitInfo(PressureUnit.MeganewtonPerSquareMeter, "MeganewtonsPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(PressureUnit.Megapascal, "Megapascals", BaseUnits.Undefined), - new UnitInfo(PressureUnit.MeterOfElevation, "MetersOfElevation", BaseUnits.Undefined), - new UnitInfo(PressureUnit.MeterOfHead, "MetersOfHead", BaseUnits.Undefined), - new UnitInfo(PressureUnit.MeterOfWaterColumn, "MetersOfWaterColumn", BaseUnits.Undefined), - new UnitInfo(PressureUnit.Microbar, "Microbars", BaseUnits.Undefined), - new UnitInfo(PressureUnit.Micropascal, "Micropascals", BaseUnits.Undefined), - new UnitInfo(PressureUnit.Millibar, "Millibars", BaseUnits.Undefined), - new UnitInfo(PressureUnit.MillimeterOfMercury, "MillimetersOfMercury", BaseUnits.Undefined), - new UnitInfo(PressureUnit.MillimeterOfWaterColumn, "MillimetersOfWaterColumn", BaseUnits.Undefined), - new UnitInfo(PressureUnit.Millipascal, "Millipascals", BaseUnits.Undefined), - new UnitInfo(PressureUnit.NewtonPerSquareCentimeter, "NewtonsPerSquareCentimeter", BaseUnits.Undefined), - new UnitInfo(PressureUnit.NewtonPerSquareMeter, "NewtonsPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(PressureUnit.NewtonPerSquareMillimeter, "NewtonsPerSquareMillimeter", BaseUnits.Undefined), - new UnitInfo(PressureUnit.Pascal, "Pascals", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second)), - new UnitInfo(PressureUnit.PoundForcePerSquareFoot, "PoundsForcePerSquareFoot", BaseUnits.Undefined), - new UnitInfo(PressureUnit.PoundForcePerSquareInch, "PoundsForcePerSquareInch", BaseUnits.Undefined), - new UnitInfo(PressureUnit.PoundForcePerSquareMil, "PoundsForcePerSquareMil", BaseUnits.Undefined), - new UnitInfo(PressureUnit.PoundPerInchSecondSquared, "PoundsPerInchSecondSquared", BaseUnits.Undefined), - new UnitInfo(PressureUnit.TechnicalAtmosphere, "TechnicalAtmospheres", BaseUnits.Undefined), - new UnitInfo(PressureUnit.TonneForcePerSquareCentimeter, "TonnesForcePerSquareCentimeter", BaseUnits.Undefined), - new UnitInfo(PressureUnit.TonneForcePerSquareMeter, "TonnesForcePerSquareMeter", BaseUnits.Undefined), - new UnitInfo(PressureUnit.TonneForcePerSquareMillimeter, "TonnesForcePerSquareMillimeter", BaseUnits.Undefined), - new UnitInfo(PressureUnit.Torr, "Torrs", BaseUnits.Undefined), + new UnitInfo(PressureUnit.Atmosphere, "Atmospheres", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.Bar, "Bars", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.Centibar, "Centibars", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.CentimeterOfWaterColumn, "CentimetersOfWaterColumn", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.Decapascal, "Decapascals", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.Decibar, "Decibars", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.DynePerSquareCentimeter, "DynesPerSquareCentimeter", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.FootOfElevation, "FeetOfElevation", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.FootOfHead, "FeetOfHead", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.Gigapascal, "Gigapascals", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.Hectopascal, "Hectopascals", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.InchOfMercury, "InchesOfMercury", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.InchOfWaterColumn, "InchesOfWaterColumn", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.Kilobar, "Kilobars", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.KilogramForcePerSquareCentimeter, "KilogramsForcePerSquareCentimeter", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.KilogramForcePerSquareMeter, "KilogramsForcePerSquareMeter", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.KilogramForcePerSquareMillimeter, "KilogramsForcePerSquareMillimeter", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.KilonewtonPerSquareCentimeter, "KilonewtonsPerSquareCentimeter", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.KilonewtonPerSquareMeter, "KilonewtonsPerSquareMeter", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.KilonewtonPerSquareMillimeter, "KilonewtonsPerSquareMillimeter", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.Kilopascal, "Kilopascals", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.KilopoundForcePerSquareFoot, "KilopoundsForcePerSquareFoot", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.KilopoundForcePerSquareInch, "KilopoundsForcePerSquareInch", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.KilopoundForcePerSquareMil, "KilopoundsForcePerSquareMil", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.Megabar, "Megabars", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.MeganewtonPerSquareMeter, "MeganewtonsPerSquareMeter", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.Megapascal, "Megapascals", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.MeterOfElevation, "MetersOfElevation", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.MeterOfHead, "MetersOfHead", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.MeterOfWaterColumn, "MetersOfWaterColumn", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.Microbar, "Microbars", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.Micropascal, "Micropascals", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.Millibar, "Millibars", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.MillimeterOfMercury, "MillimetersOfMercury", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.MillimeterOfWaterColumn, "MillimetersOfWaterColumn", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.Millipascal, "Millipascals", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.NewtonPerSquareCentimeter, "NewtonsPerSquareCentimeter", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.NewtonPerSquareMeter, "NewtonsPerSquareMeter", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.NewtonPerSquareMillimeter, "NewtonsPerSquareMillimeter", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.Pascal, "Pascals", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second), "Pressure"), + new UnitInfo(PressureUnit.PoundForcePerSquareFoot, "PoundsForcePerSquareFoot", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.PoundForcePerSquareInch, "PoundsForcePerSquareInch", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.PoundForcePerSquareMil, "PoundsForcePerSquareMil", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.PoundPerInchSecondSquared, "PoundsPerInchSecondSquared", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.TechnicalAtmosphere, "TechnicalAtmospheres", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.TonneForcePerSquareCentimeter, "TonnesForcePerSquareCentimeter", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.TonneForcePerSquareMeter, "TonnesForcePerSquareMeter", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.TonneForcePerSquareMillimeter, "TonnesForcePerSquareMillimeter", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.Torr, "Torrs", BaseUnits.Undefined, "Pressure"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, PressureUnit Unit), List>(); } /// @@ -190,11 +185,6 @@ public Pressure(double value, UnitSystem unitSystem) /// public static Pressure AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, PressureUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -591,7 +581,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(PressureUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(PressureUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -601,34 +594,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(PressureUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(PressureUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Pressure"; - var resourceManager = new ResourceManager(resourceName, typeof(Pressure).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -1747,9 +1713,6 @@ public Pressure ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs index 2d2a97ae70..980a54b482 100644 --- a/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,27 +65,25 @@ static PressureChangeRate() Info = new QuantityInfo("PressureChangeRate", new UnitInfo[] { - new UnitInfo(PressureChangeRateUnit.AtmospherePerSecond, "AtmospheresPerSecond", BaseUnits.Undefined), - new UnitInfo(PressureChangeRateUnit.KilopascalPerMinute, "KilopascalsPerMinute", BaseUnits.Undefined), - new UnitInfo(PressureChangeRateUnit.KilopascalPerSecond, "KilopascalsPerSecond", BaseUnits.Undefined), - new UnitInfo(PressureChangeRateUnit.KilopoundForcePerSquareInchPerMinute, "KilopoundsForcePerSquareInchPerMinute", BaseUnits.Undefined), - new UnitInfo(PressureChangeRateUnit.KilopoundForcePerSquareInchPerSecond, "KilopoundsForcePerSquareInchPerSecond", BaseUnits.Undefined), - new UnitInfo(PressureChangeRateUnit.MegapascalPerMinute, "MegapascalsPerMinute", BaseUnits.Undefined), - new UnitInfo(PressureChangeRateUnit.MegapascalPerSecond, "MegapascalsPerSecond", BaseUnits.Undefined), - new UnitInfo(PressureChangeRateUnit.MegapoundForcePerSquareInchPerMinute, "MegapoundsForcePerSquareInchPerMinute", BaseUnits.Undefined), - new UnitInfo(PressureChangeRateUnit.MegapoundForcePerSquareInchPerSecond, "MegapoundsForcePerSquareInchPerSecond", BaseUnits.Undefined), - new UnitInfo(PressureChangeRateUnit.MillimeterOfMercuryPerSecond, "MillimetersOfMercuryPerSecond", BaseUnits.Undefined), - new UnitInfo(PressureChangeRateUnit.PascalPerMinute, "PascalsPerMinute", BaseUnits.Undefined), - new UnitInfo(PressureChangeRateUnit.PascalPerSecond, "PascalsPerSecond", BaseUnits.Undefined), - new UnitInfo(PressureChangeRateUnit.PoundForcePerSquareInchPerMinute, "PoundsForcePerSquareInchPerMinute", BaseUnits.Undefined), - new UnitInfo(PressureChangeRateUnit.PoundForcePerSquareInchPerSecond, "PoundsForcePerSquareInchPerSecond", BaseUnits.Undefined), + new UnitInfo(PressureChangeRateUnit.AtmospherePerSecond, "AtmospheresPerSecond", BaseUnits.Undefined, "PressureChangeRate"), + new UnitInfo(PressureChangeRateUnit.KilopascalPerMinute, "KilopascalsPerMinute", BaseUnits.Undefined, "PressureChangeRate"), + new UnitInfo(PressureChangeRateUnit.KilopascalPerSecond, "KilopascalsPerSecond", BaseUnits.Undefined, "PressureChangeRate"), + new UnitInfo(PressureChangeRateUnit.KilopoundForcePerSquareInchPerMinute, "KilopoundsForcePerSquareInchPerMinute", BaseUnits.Undefined, "PressureChangeRate"), + new UnitInfo(PressureChangeRateUnit.KilopoundForcePerSquareInchPerSecond, "KilopoundsForcePerSquareInchPerSecond", BaseUnits.Undefined, "PressureChangeRate"), + new UnitInfo(PressureChangeRateUnit.MegapascalPerMinute, "MegapascalsPerMinute", BaseUnits.Undefined, "PressureChangeRate"), + new UnitInfo(PressureChangeRateUnit.MegapascalPerSecond, "MegapascalsPerSecond", BaseUnits.Undefined, "PressureChangeRate"), + new UnitInfo(PressureChangeRateUnit.MegapoundForcePerSquareInchPerMinute, "MegapoundsForcePerSquareInchPerMinute", BaseUnits.Undefined, "PressureChangeRate"), + new UnitInfo(PressureChangeRateUnit.MegapoundForcePerSquareInchPerSecond, "MegapoundsForcePerSquareInchPerSecond", BaseUnits.Undefined, "PressureChangeRate"), + new UnitInfo(PressureChangeRateUnit.MillimeterOfMercuryPerSecond, "MillimetersOfMercuryPerSecond", BaseUnits.Undefined, "PressureChangeRate"), + new UnitInfo(PressureChangeRateUnit.PascalPerMinute, "PascalsPerMinute", BaseUnits.Undefined, "PressureChangeRate"), + new UnitInfo(PressureChangeRateUnit.PascalPerSecond, "PascalsPerSecond", BaseUnits.Undefined, "PressureChangeRate"), + new UnitInfo(PressureChangeRateUnit.PoundForcePerSquareInchPerMinute, "PoundsForcePerSquareInchPerMinute", BaseUnits.Undefined, "PressureChangeRate"), + new UnitInfo(PressureChangeRateUnit.PoundForcePerSquareInchPerSecond, "PoundsForcePerSquareInchPerSecond", BaseUnits.Undefined, "PressureChangeRate"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, PressureChangeRateUnit Unit), List>(); } /// @@ -155,11 +150,6 @@ public PressureChangeRate(double value, UnitSystem unitSystem) /// public static PressureChangeRate AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, PressureChangeRateUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -311,7 +301,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(PressureChangeRateUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(PressureChangeRateUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -321,34 +314,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(PressureChangeRateUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(PressureChangeRateUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.PressureChangeRate"; - var resourceManager = new ResourceManager(resourceName, typeof(PressureChangeRate).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -1047,9 +1013,6 @@ public PressureChangeRate ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs b/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs index c866657ae8..411ce36504 100644 --- a/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,19 +65,17 @@ static Ratio() Info = new QuantityInfo("Ratio", new UnitInfo[] { - new UnitInfo(RatioUnit.DecimalFraction, "DecimalFractions", BaseUnits.Undefined), - new UnitInfo(RatioUnit.PartPerBillion, "PartsPerBillion", BaseUnits.Undefined), - new UnitInfo(RatioUnit.PartPerMillion, "PartsPerMillion", BaseUnits.Undefined), - new UnitInfo(RatioUnit.PartPerThousand, "PartsPerThousand", BaseUnits.Undefined), - new UnitInfo(RatioUnit.PartPerTrillion, "PartsPerTrillion", BaseUnits.Undefined), - new UnitInfo(RatioUnit.Percent, "Percent", BaseUnits.Undefined), + new UnitInfo(RatioUnit.DecimalFraction, "DecimalFractions", BaseUnits.Undefined, "Ratio"), + new UnitInfo(RatioUnit.PartPerBillion, "PartsPerBillion", BaseUnits.Undefined, "Ratio"), + new UnitInfo(RatioUnit.PartPerMillion, "PartsPerMillion", BaseUnits.Undefined, "Ratio"), + new UnitInfo(RatioUnit.PartPerThousand, "PartsPerThousand", BaseUnits.Undefined, "Ratio"), + new UnitInfo(RatioUnit.PartPerTrillion, "PartsPerTrillion", BaseUnits.Undefined, "Ratio"), + new UnitInfo(RatioUnit.Percent, "Percent", BaseUnits.Undefined, "Ratio"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, RatioUnit Unit), List>(); } /// @@ -147,11 +142,6 @@ public Ratio(double value, UnitSystem unitSystem) /// public static Ratio AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, RatioUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -247,7 +237,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(RatioUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(RatioUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -257,34 +250,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(RatioUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(RatioUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Ratio"; - var resourceManager = new ResourceManager(resourceName, typeof(Ratio).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -887,9 +853,6 @@ public Ratio ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs index d6a496f47e..c13b82ec6b 100644 --- a/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,15 +65,13 @@ static RatioChangeRate() Info = new QuantityInfo("RatioChangeRate", new UnitInfo[] { - new UnitInfo(RatioChangeRateUnit.DecimalFractionPerSecond, "DecimalFractionsPerSecond", BaseUnits.Undefined), - new UnitInfo(RatioChangeRateUnit.PercentPerSecond, "PercentsPerSecond", BaseUnits.Undefined), + new UnitInfo(RatioChangeRateUnit.DecimalFractionPerSecond, "DecimalFractionsPerSecond", BaseUnits.Undefined, "RatioChangeRate"), + new UnitInfo(RatioChangeRateUnit.PercentPerSecond, "PercentsPerSecond", BaseUnits.Undefined, "RatioChangeRate"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, RatioChangeRateUnit Unit), List>(); } /// @@ -143,11 +138,6 @@ public RatioChangeRate(double value, UnitSystem unitSystem) /// public static RatioChangeRate AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, RatioChangeRateUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -215,7 +205,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(RatioChangeRateUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(RatioChangeRateUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -225,34 +218,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(RatioChangeRateUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(RatioChangeRateUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.RatioChangeRate"; - var resourceManager = new ResourceManager(resourceName, typeof(RatioChangeRate).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -807,9 +773,6 @@ public RatioChangeRate ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs index 8c4b29d21d..44999c4aed 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,16 +65,14 @@ static ReactiveEnergy() Info = new QuantityInfo("ReactiveEnergy", new UnitInfo[] { - new UnitInfo(ReactiveEnergyUnit.KilovoltampereReactiveHour, "KilovoltampereReactiveHours", BaseUnits.Undefined), - new UnitInfo(ReactiveEnergyUnit.MegavoltampereReactiveHour, "MegavoltampereReactiveHours", BaseUnits.Undefined), - new UnitInfo(ReactiveEnergyUnit.VoltampereReactiveHour, "VoltampereReactiveHours", BaseUnits.Undefined), + new UnitInfo(ReactiveEnergyUnit.KilovoltampereReactiveHour, "KilovoltampereReactiveHours", BaseUnits.Undefined, "ReactiveEnergy"), + new UnitInfo(ReactiveEnergyUnit.MegavoltampereReactiveHour, "MegavoltampereReactiveHours", BaseUnits.Undefined, "ReactiveEnergy"), + new UnitInfo(ReactiveEnergyUnit.VoltampereReactiveHour, "VoltampereReactiveHours", BaseUnits.Undefined, "ReactiveEnergy"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ReactiveEnergyUnit Unit), List>(); } /// @@ -144,11 +139,6 @@ public ReactiveEnergy(double value, UnitSystem unitSystem) /// public static ReactiveEnergy AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, ReactiveEnergyUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -223,7 +213,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ReactiveEnergyUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(ReactiveEnergyUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -233,34 +226,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ReactiveEnergyUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(ReactiveEnergyUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ReactiveEnergy"; - var resourceManager = new ResourceManager(resourceName, typeof(ReactiveEnergy).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -827,9 +793,6 @@ public ReactiveEnergy ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs b/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs index c37da5fef7..db18193ef8 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,17 +65,15 @@ static ReactivePower() Info = new QuantityInfo("ReactivePower", new UnitInfo[] { - new UnitInfo(ReactivePowerUnit.GigavoltampereReactive, "GigavoltamperesReactive", BaseUnits.Undefined), - new UnitInfo(ReactivePowerUnit.KilovoltampereReactive, "KilovoltamperesReactive", BaseUnits.Undefined), - new UnitInfo(ReactivePowerUnit.MegavoltampereReactive, "MegavoltamperesReactive", BaseUnits.Undefined), - new UnitInfo(ReactivePowerUnit.VoltampereReactive, "VoltamperesReactive", BaseUnits.Undefined), + new UnitInfo(ReactivePowerUnit.GigavoltampereReactive, "GigavoltamperesReactive", BaseUnits.Undefined, "ReactivePower"), + new UnitInfo(ReactivePowerUnit.KilovoltampereReactive, "KilovoltamperesReactive", BaseUnits.Undefined, "ReactivePower"), + new UnitInfo(ReactivePowerUnit.MegavoltampereReactive, "MegavoltamperesReactive", BaseUnits.Undefined, "ReactivePower"), + new UnitInfo(ReactivePowerUnit.VoltampereReactive, "VoltamperesReactive", BaseUnits.Undefined, "ReactivePower"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ReactivePowerUnit Unit), List>(); } /// @@ -145,11 +140,6 @@ public ReactivePower(double value, UnitSystem unitSystem) /// public static ReactivePower AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, ReactivePowerUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -231,7 +221,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ReactivePowerUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(ReactivePowerUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -241,34 +234,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ReactivePowerUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(ReactivePowerUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ReactivePower"; - var resourceManager = new ResourceManager(resourceName, typeof(ReactivePower).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -847,9 +813,6 @@ public ReactivePower ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs b/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs index 777b35b880..d5209d3562 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -71,24 +68,22 @@ static ReciprocalArea() Info = new QuantityInfo("ReciprocalArea", new UnitInfo[] { - new UnitInfo(ReciprocalAreaUnit.InverseSquareCentimeter, "InverseSquareCentimeters", BaseUnits.Undefined), - new UnitInfo(ReciprocalAreaUnit.InverseSquareDecimeter, "InverseSquareDecimeters", BaseUnits.Undefined), - new UnitInfo(ReciprocalAreaUnit.InverseSquareFoot, "InverseSquareFeet", BaseUnits.Undefined), - new UnitInfo(ReciprocalAreaUnit.InverseSquareInch, "InverseSquareInches", BaseUnits.Undefined), - new UnitInfo(ReciprocalAreaUnit.InverseSquareKilometer, "InverseSquareKilometers", BaseUnits.Undefined), - new UnitInfo(ReciprocalAreaUnit.InverseSquareMeter, "InverseSquareMeters", BaseUnits.Undefined), - new UnitInfo(ReciprocalAreaUnit.InverseSquareMicrometer, "InverseSquareMicrometers", BaseUnits.Undefined), - new UnitInfo(ReciprocalAreaUnit.InverseSquareMile, "InverseSquareMiles", BaseUnits.Undefined), - new UnitInfo(ReciprocalAreaUnit.InverseSquareMillimeter, "InverseSquareMillimeters", BaseUnits.Undefined), - new UnitInfo(ReciprocalAreaUnit.InverseSquareYard, "InverseSquareYards", BaseUnits.Undefined), - new UnitInfo(ReciprocalAreaUnit.InverseUsSurveySquareFoot, "InverseUsSurveySquareFeet", BaseUnits.Undefined), + new UnitInfo(ReciprocalAreaUnit.InverseSquareCentimeter, "InverseSquareCentimeters", BaseUnits.Undefined, "ReciprocalArea"), + new UnitInfo(ReciprocalAreaUnit.InverseSquareDecimeter, "InverseSquareDecimeters", BaseUnits.Undefined, "ReciprocalArea"), + new UnitInfo(ReciprocalAreaUnit.InverseSquareFoot, "InverseSquareFeet", BaseUnits.Undefined, "ReciprocalArea"), + new UnitInfo(ReciprocalAreaUnit.InverseSquareInch, "InverseSquareInches", BaseUnits.Undefined, "ReciprocalArea"), + new UnitInfo(ReciprocalAreaUnit.InverseSquareKilometer, "InverseSquareKilometers", BaseUnits.Undefined, "ReciprocalArea"), + new UnitInfo(ReciprocalAreaUnit.InverseSquareMeter, "InverseSquareMeters", BaseUnits.Undefined, "ReciprocalArea"), + new UnitInfo(ReciprocalAreaUnit.InverseSquareMicrometer, "InverseSquareMicrometers", BaseUnits.Undefined, "ReciprocalArea"), + new UnitInfo(ReciprocalAreaUnit.InverseSquareMile, "InverseSquareMiles", BaseUnits.Undefined, "ReciprocalArea"), + new UnitInfo(ReciprocalAreaUnit.InverseSquareMillimeter, "InverseSquareMillimeters", BaseUnits.Undefined, "ReciprocalArea"), + new UnitInfo(ReciprocalAreaUnit.InverseSquareYard, "InverseSquareYards", BaseUnits.Undefined, "ReciprocalArea"), + new UnitInfo(ReciprocalAreaUnit.InverseUsSurveySquareFoot, "InverseUsSurveySquareFeet", BaseUnits.Undefined, "ReciprocalArea"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ReciprocalAreaUnit Unit), List>(); } /// @@ -155,11 +150,6 @@ public ReciprocalArea(double value, UnitSystem unitSystem) /// public static ReciprocalArea AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, ReciprocalAreaUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -290,7 +280,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ReciprocalAreaUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(ReciprocalAreaUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -300,34 +293,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ReciprocalAreaUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(ReciprocalAreaUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ReciprocalArea"; - var resourceManager = new ResourceManager(resourceName, typeof(ReciprocalArea).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -990,9 +956,6 @@ public ReciprocalArea ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs b/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs index 1f2ef6296c..bd56c2368f 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -71,23 +68,21 @@ static ReciprocalLength() Info = new QuantityInfo("ReciprocalLength", new UnitInfo[] { - new UnitInfo(ReciprocalLengthUnit.InverseCentimeter, "InverseCentimeters", BaseUnits.Undefined), - new UnitInfo(ReciprocalLengthUnit.InverseFoot, "InverseFeet", BaseUnits.Undefined), - new UnitInfo(ReciprocalLengthUnit.InverseInch, "InverseInches", BaseUnits.Undefined), - new UnitInfo(ReciprocalLengthUnit.InverseMeter, "InverseMeters", BaseUnits.Undefined), - new UnitInfo(ReciprocalLengthUnit.InverseMicroinch, "InverseMicroinches", BaseUnits.Undefined), - new UnitInfo(ReciprocalLengthUnit.InverseMil, "InverseMils", BaseUnits.Undefined), - new UnitInfo(ReciprocalLengthUnit.InverseMile, "InverseMiles", BaseUnits.Undefined), - new UnitInfo(ReciprocalLengthUnit.InverseMillimeter, "InverseMillimeters", BaseUnits.Undefined), - new UnitInfo(ReciprocalLengthUnit.InverseUsSurveyFoot, "InverseUsSurveyFeet", BaseUnits.Undefined), - new UnitInfo(ReciprocalLengthUnit.InverseYard, "InverseYards", BaseUnits.Undefined), + new UnitInfo(ReciprocalLengthUnit.InverseCentimeter, "InverseCentimeters", BaseUnits.Undefined, "ReciprocalLength"), + new UnitInfo(ReciprocalLengthUnit.InverseFoot, "InverseFeet", BaseUnits.Undefined, "ReciprocalLength"), + new UnitInfo(ReciprocalLengthUnit.InverseInch, "InverseInches", BaseUnits.Undefined, "ReciprocalLength"), + new UnitInfo(ReciprocalLengthUnit.InverseMeter, "InverseMeters", BaseUnits.Undefined, "ReciprocalLength"), + new UnitInfo(ReciprocalLengthUnit.InverseMicroinch, "InverseMicroinches", BaseUnits.Undefined, "ReciprocalLength"), + new UnitInfo(ReciprocalLengthUnit.InverseMil, "InverseMils", BaseUnits.Undefined, "ReciprocalLength"), + new UnitInfo(ReciprocalLengthUnit.InverseMile, "InverseMiles", BaseUnits.Undefined, "ReciprocalLength"), + new UnitInfo(ReciprocalLengthUnit.InverseMillimeter, "InverseMillimeters", BaseUnits.Undefined, "ReciprocalLength"), + new UnitInfo(ReciprocalLengthUnit.InverseUsSurveyFoot, "InverseUsSurveyFeet", BaseUnits.Undefined, "ReciprocalLength"), + new UnitInfo(ReciprocalLengthUnit.InverseYard, "InverseYards", BaseUnits.Undefined, "ReciprocalLength"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ReciprocalLengthUnit Unit), List>(); } /// @@ -154,11 +149,6 @@ public ReciprocalLength(double value, UnitSystem unitSystem) /// public static ReciprocalLength AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, ReciprocalLengthUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -282,7 +272,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ReciprocalLengthUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(ReciprocalLengthUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -292,34 +285,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ReciprocalLengthUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(ReciprocalLengthUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ReciprocalLength"; - var resourceManager = new ResourceManager(resourceName, typeof(ReciprocalLength).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -970,9 +936,6 @@ public ReciprocalLength ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs b/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs index 2bc30069d7..c75b8be405 100644 --- a/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,14 +65,12 @@ static RelativeHumidity() Info = new QuantityInfo("RelativeHumidity", new UnitInfo[] { - new UnitInfo(RelativeHumidityUnit.Percent, "Percent", BaseUnits.Undefined), + new UnitInfo(RelativeHumidityUnit.Percent, "Percent", BaseUnits.Undefined, "RelativeHumidity"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, RelativeHumidityUnit Unit), List>(); } /// @@ -142,11 +137,6 @@ public RelativeHumidity(double value, UnitSystem unitSystem) /// public static RelativeHumidity AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, RelativeHumidityUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -207,7 +197,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(RelativeHumidityUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(RelativeHumidityUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -217,34 +210,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(RelativeHumidityUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(RelativeHumidityUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.RelativeHumidity"; - var resourceManager = new ResourceManager(resourceName, typeof(RelativeHumidity).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -787,9 +753,6 @@ public RelativeHumidity ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.g.cs index 959e55dbfd..dcc094d381 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,17 +65,15 @@ static RotationalAcceleration() Info = new QuantityInfo("RotationalAcceleration", new UnitInfo[] { - new UnitInfo(RotationalAccelerationUnit.DegreePerSecondSquared, "DegreesPerSecondSquared", BaseUnits.Undefined), - new UnitInfo(RotationalAccelerationUnit.RadianPerSecondSquared, "RadiansPerSecondSquared", BaseUnits.Undefined), - new UnitInfo(RotationalAccelerationUnit.RevolutionPerMinutePerSecond, "RevolutionsPerMinutePerSecond", BaseUnits.Undefined), - new UnitInfo(RotationalAccelerationUnit.RevolutionPerSecondSquared, "RevolutionsPerSecondSquared", BaseUnits.Undefined), + new UnitInfo(RotationalAccelerationUnit.DegreePerSecondSquared, "DegreesPerSecondSquared", BaseUnits.Undefined, "RotationalAcceleration"), + new UnitInfo(RotationalAccelerationUnit.RadianPerSecondSquared, "RadiansPerSecondSquared", BaseUnits.Undefined, "RotationalAcceleration"), + new UnitInfo(RotationalAccelerationUnit.RevolutionPerMinutePerSecond, "RevolutionsPerMinutePerSecond", BaseUnits.Undefined, "RotationalAcceleration"), + new UnitInfo(RotationalAccelerationUnit.RevolutionPerSecondSquared, "RevolutionsPerSecondSquared", BaseUnits.Undefined, "RotationalAcceleration"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, RotationalAccelerationUnit Unit), List>(); } /// @@ -145,11 +140,6 @@ public RotationalAcceleration(double value, UnitSystem unitSystem) /// public static RotationalAcceleration AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, RotationalAccelerationUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -231,7 +221,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(RotationalAccelerationUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(RotationalAccelerationUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -241,34 +234,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(RotationalAccelerationUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(RotationalAccelerationUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.RotationalAcceleration"; - var resourceManager = new ResourceManager(resourceName, typeof(RotationalAcceleration).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -847,9 +813,6 @@ public RotationalAcceleration ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs index c2b42aa302..766810e44a 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,26 +65,24 @@ static RotationalSpeed() Info = new QuantityInfo("RotationalSpeed", new UnitInfo[] { - new UnitInfo(RotationalSpeedUnit.CentiradianPerSecond, "CentiradiansPerSecond", BaseUnits.Undefined), - new UnitInfo(RotationalSpeedUnit.DeciradianPerSecond, "DeciradiansPerSecond", BaseUnits.Undefined), - new UnitInfo(RotationalSpeedUnit.DegreePerMinute, "DegreesPerMinute", BaseUnits.Undefined), - new UnitInfo(RotationalSpeedUnit.DegreePerSecond, "DegreesPerSecond", BaseUnits.Undefined), - new UnitInfo(RotationalSpeedUnit.MicrodegreePerSecond, "MicrodegreesPerSecond", BaseUnits.Undefined), - new UnitInfo(RotationalSpeedUnit.MicroradianPerSecond, "MicroradiansPerSecond", BaseUnits.Undefined), - new UnitInfo(RotationalSpeedUnit.MillidegreePerSecond, "MillidegreesPerSecond", BaseUnits.Undefined), - new UnitInfo(RotationalSpeedUnit.MilliradianPerSecond, "MilliradiansPerSecond", BaseUnits.Undefined), - new UnitInfo(RotationalSpeedUnit.NanodegreePerSecond, "NanodegreesPerSecond", BaseUnits.Undefined), - new UnitInfo(RotationalSpeedUnit.NanoradianPerSecond, "NanoradiansPerSecond", BaseUnits.Undefined), - new UnitInfo(RotationalSpeedUnit.RadianPerSecond, "RadiansPerSecond", BaseUnits.Undefined), - new UnitInfo(RotationalSpeedUnit.RevolutionPerMinute, "RevolutionsPerMinute", BaseUnits.Undefined), - new UnitInfo(RotationalSpeedUnit.RevolutionPerSecond, "RevolutionsPerSecond", BaseUnits.Undefined), + new UnitInfo(RotationalSpeedUnit.CentiradianPerSecond, "CentiradiansPerSecond", BaseUnits.Undefined, "RotationalSpeed"), + new UnitInfo(RotationalSpeedUnit.DeciradianPerSecond, "DeciradiansPerSecond", BaseUnits.Undefined, "RotationalSpeed"), + new UnitInfo(RotationalSpeedUnit.DegreePerMinute, "DegreesPerMinute", BaseUnits.Undefined, "RotationalSpeed"), + new UnitInfo(RotationalSpeedUnit.DegreePerSecond, "DegreesPerSecond", BaseUnits.Undefined, "RotationalSpeed"), + new UnitInfo(RotationalSpeedUnit.MicrodegreePerSecond, "MicrodegreesPerSecond", BaseUnits.Undefined, "RotationalSpeed"), + new UnitInfo(RotationalSpeedUnit.MicroradianPerSecond, "MicroradiansPerSecond", BaseUnits.Undefined, "RotationalSpeed"), + new UnitInfo(RotationalSpeedUnit.MillidegreePerSecond, "MillidegreesPerSecond", BaseUnits.Undefined, "RotationalSpeed"), + new UnitInfo(RotationalSpeedUnit.MilliradianPerSecond, "MilliradiansPerSecond", BaseUnits.Undefined, "RotationalSpeed"), + new UnitInfo(RotationalSpeedUnit.NanodegreePerSecond, "NanodegreesPerSecond", BaseUnits.Undefined, "RotationalSpeed"), + new UnitInfo(RotationalSpeedUnit.NanoradianPerSecond, "NanoradiansPerSecond", BaseUnits.Undefined, "RotationalSpeed"), + new UnitInfo(RotationalSpeedUnit.RadianPerSecond, "RadiansPerSecond", BaseUnits.Undefined, "RotationalSpeed"), + new UnitInfo(RotationalSpeedUnit.RevolutionPerMinute, "RevolutionsPerMinute", BaseUnits.Undefined, "RotationalSpeed"), + new UnitInfo(RotationalSpeedUnit.RevolutionPerSecond, "RevolutionsPerSecond", BaseUnits.Undefined, "RotationalSpeed"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, RotationalSpeedUnit Unit), List>(); } /// @@ -154,11 +149,6 @@ public RotationalSpeed(double value, UnitSystem unitSystem) /// public static RotationalSpeed AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, RotationalSpeedUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -303,7 +293,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(RotationalSpeedUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(RotationalSpeedUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -313,34 +306,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(RotationalSpeedUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(RotationalSpeedUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.RotationalSpeed"; - var resourceManager = new ResourceManager(resourceName, typeof(RotationalSpeed).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -1027,9 +993,6 @@ public RotationalSpeed ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs index 76d05bc205..93fd93bfb4 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,46 +65,44 @@ static RotationalStiffness() Info = new QuantityInfo("RotationalStiffness", new UnitInfo[] { - new UnitInfo(RotationalStiffnessUnit.CentinewtonMeterPerDegree, "CentinewtonMetersPerDegree", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.CentinewtonMillimeterPerDegree, "CentinewtonMillimetersPerDegree", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.CentinewtonMillimeterPerRadian, "CentinewtonMillimetersPerRadian", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.DecanewtonMeterPerDegree, "DecanewtonMetersPerDegree", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.DecanewtonMillimeterPerDegree, "DecanewtonMillimetersPerDegree", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.DecanewtonMillimeterPerRadian, "DecanewtonMillimetersPerRadian", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.DecinewtonMeterPerDegree, "DecinewtonMetersPerDegree", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.DecinewtonMillimeterPerDegree, "DecinewtonMillimetersPerDegree", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.DecinewtonMillimeterPerRadian, "DecinewtonMillimetersPerRadian", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.KilonewtonMeterPerDegree, "KilonewtonMetersPerDegree", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.KilonewtonMeterPerRadian, "KilonewtonMetersPerRadian", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.KilonewtonMillimeterPerDegree, "KilonewtonMillimetersPerDegree", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.KilonewtonMillimeterPerRadian, "KilonewtonMillimetersPerRadian", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.KilopoundForceFootPerDegrees, "KilopoundForceFeetPerDegrees", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.MeganewtonMeterPerDegree, "MeganewtonMetersPerDegree", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.MeganewtonMeterPerRadian, "MeganewtonMetersPerRadian", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.MeganewtonMillimeterPerDegree, "MeganewtonMillimetersPerDegree", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.MeganewtonMillimeterPerRadian, "MeganewtonMillimetersPerRadian", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.MicronewtonMeterPerDegree, "MicronewtonMetersPerDegree", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.MicronewtonMillimeterPerDegree, "MicronewtonMillimetersPerDegree", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.MicronewtonMillimeterPerRadian, "MicronewtonMillimetersPerRadian", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.MillinewtonMeterPerDegree, "MillinewtonMetersPerDegree", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.MillinewtonMillimeterPerDegree, "MillinewtonMillimetersPerDegree", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.MillinewtonMillimeterPerRadian, "MillinewtonMillimetersPerRadian", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.NanonewtonMeterPerDegree, "NanonewtonMetersPerDegree", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.NanonewtonMillimeterPerDegree, "NanonewtonMillimetersPerDegree", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.NanonewtonMillimeterPerRadian, "NanonewtonMillimetersPerRadian", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.NewtonMeterPerDegree, "NewtonMetersPerDegree", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.NewtonMeterPerRadian, "NewtonMetersPerRadian", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.NewtonMillimeterPerDegree, "NewtonMillimetersPerDegree", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.NewtonMillimeterPerRadian, "NewtonMillimetersPerRadian", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.PoundForceFeetPerRadian, "PoundForceFeetPerRadian", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.PoundForceFootPerDegrees, "PoundForceFeetPerDegrees", BaseUnits.Undefined), + new UnitInfo(RotationalStiffnessUnit.CentinewtonMeterPerDegree, "CentinewtonMetersPerDegree", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.CentinewtonMillimeterPerDegree, "CentinewtonMillimetersPerDegree", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.CentinewtonMillimeterPerRadian, "CentinewtonMillimetersPerRadian", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.DecanewtonMeterPerDegree, "DecanewtonMetersPerDegree", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.DecanewtonMillimeterPerDegree, "DecanewtonMillimetersPerDegree", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.DecanewtonMillimeterPerRadian, "DecanewtonMillimetersPerRadian", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.DecinewtonMeterPerDegree, "DecinewtonMetersPerDegree", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.DecinewtonMillimeterPerDegree, "DecinewtonMillimetersPerDegree", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.DecinewtonMillimeterPerRadian, "DecinewtonMillimetersPerRadian", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.KilonewtonMeterPerDegree, "KilonewtonMetersPerDegree", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.KilonewtonMeterPerRadian, "KilonewtonMetersPerRadian", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.KilonewtonMillimeterPerDegree, "KilonewtonMillimetersPerDegree", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.KilonewtonMillimeterPerRadian, "KilonewtonMillimetersPerRadian", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.KilopoundForceFootPerDegrees, "KilopoundForceFeetPerDegrees", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.MeganewtonMeterPerDegree, "MeganewtonMetersPerDegree", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.MeganewtonMeterPerRadian, "MeganewtonMetersPerRadian", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.MeganewtonMillimeterPerDegree, "MeganewtonMillimetersPerDegree", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.MeganewtonMillimeterPerRadian, "MeganewtonMillimetersPerRadian", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.MicronewtonMeterPerDegree, "MicronewtonMetersPerDegree", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.MicronewtonMillimeterPerDegree, "MicronewtonMillimetersPerDegree", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.MicronewtonMillimeterPerRadian, "MicronewtonMillimetersPerRadian", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.MillinewtonMeterPerDegree, "MillinewtonMetersPerDegree", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.MillinewtonMillimeterPerDegree, "MillinewtonMillimetersPerDegree", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.MillinewtonMillimeterPerRadian, "MillinewtonMillimetersPerRadian", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.NanonewtonMeterPerDegree, "NanonewtonMetersPerDegree", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.NanonewtonMillimeterPerDegree, "NanonewtonMillimetersPerDegree", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.NanonewtonMillimeterPerRadian, "NanonewtonMillimetersPerRadian", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.NewtonMeterPerDegree, "NewtonMetersPerDegree", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.NewtonMeterPerRadian, "NewtonMetersPerRadian", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.NewtonMillimeterPerDegree, "NewtonMillimetersPerDegree", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.NewtonMillimeterPerRadian, "NewtonMillimetersPerRadian", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.PoundForceFeetPerRadian, "PoundForceFeetPerRadian", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.PoundForceFootPerDegrees, "PoundForceFeetPerDegrees", BaseUnits.Undefined, "RotationalStiffness"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, RotationalStiffnessUnit Unit), List>(); } /// @@ -174,11 +169,6 @@ public RotationalStiffness(double value, UnitSystem unitSystem) /// public static RotationalStiffness AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, RotationalStiffnessUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -463,7 +453,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(RotationalStiffnessUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(RotationalStiffnessUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -473,34 +466,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(RotationalStiffnessUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(RotationalStiffnessUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.RotationalStiffness"; - var resourceManager = new ResourceManager(resourceName, typeof(RotationalStiffness).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -1427,9 +1393,6 @@ public RotationalStiffness ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs index f8b01fa53b..fdec696d93 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,18 +65,16 @@ static RotationalStiffnessPerLength() Info = new QuantityInfo("RotationalStiffnessPerLength", new UnitInfo[] { - new UnitInfo(RotationalStiffnessPerLengthUnit.KilonewtonMeterPerRadianPerMeter, "KilonewtonMetersPerRadianPerMeter", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessPerLengthUnit.KilopoundForceFootPerDegreesPerFoot, "KilopoundForceFeetPerDegreesPerFeet", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessPerLengthUnit.MeganewtonMeterPerRadianPerMeter, "MeganewtonMetersPerRadianPerMeter", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter, "NewtonMetersPerRadianPerMeter", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot, "PoundForceFeetPerDegreesPerFeet", BaseUnits.Undefined), + new UnitInfo(RotationalStiffnessPerLengthUnit.KilonewtonMeterPerRadianPerMeter, "KilonewtonMetersPerRadianPerMeter", BaseUnits.Undefined, "RotationalStiffnessPerLength"), + new UnitInfo(RotationalStiffnessPerLengthUnit.KilopoundForceFootPerDegreesPerFoot, "KilopoundForceFeetPerDegreesPerFeet", BaseUnits.Undefined, "RotationalStiffnessPerLength"), + new UnitInfo(RotationalStiffnessPerLengthUnit.MeganewtonMeterPerRadianPerMeter, "MeganewtonMetersPerRadianPerMeter", BaseUnits.Undefined, "RotationalStiffnessPerLength"), + new UnitInfo(RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter, "NewtonMetersPerRadianPerMeter", BaseUnits.Undefined, "RotationalStiffnessPerLength"), + new UnitInfo(RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot, "PoundForceFeetPerDegreesPerFeet", BaseUnits.Undefined, "RotationalStiffnessPerLength"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, RotationalStiffnessPerLengthUnit Unit), List>(); } /// @@ -146,11 +141,6 @@ public RotationalStiffnessPerLength(double value, UnitSystem unitSystem) /// public static RotationalStiffnessPerLength AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, RotationalStiffnessPerLengthUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -239,7 +229,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(RotationalStiffnessPerLengthUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(RotationalStiffnessPerLengthUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -249,34 +242,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(RotationalStiffnessPerLengthUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(RotationalStiffnessPerLengthUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.RotationalStiffnessPerLength"; - var resourceManager = new ResourceManager(resourceName, typeof(RotationalStiffnessPerLength).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -867,9 +833,6 @@ public RotationalStiffnessPerLength ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Scalar.g.cs b/UnitsNet/GeneratedCode/Quantities/Scalar.g.cs index fd3abbe676..3966b899e0 100644 --- a/UnitsNet/GeneratedCode/Quantities/Scalar.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Scalar.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,14 +65,12 @@ static Scalar() Info = new QuantityInfo("Scalar", new UnitInfo[] { - new UnitInfo(ScalarUnit.Amount, "Amount", BaseUnits.Undefined), + new UnitInfo(ScalarUnit.Amount, "Amount", BaseUnits.Undefined, "Scalar"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ScalarUnit Unit), List>(); } /// @@ -142,11 +137,6 @@ public Scalar(double value, UnitSystem unitSystem) /// public static Scalar AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, ScalarUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -207,7 +197,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ScalarUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(ScalarUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -217,34 +210,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ScalarUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(ScalarUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Scalar"; - var resourceManager = new ResourceManager(resourceName, typeof(Scalar).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -787,9 +753,6 @@ public Scalar ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs b/UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs index 16adc733c0..b6c89efe71 100644 --- a/UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -71,14 +68,12 @@ static SolidAngle() Info = new QuantityInfo("SolidAngle", new UnitInfo[] { - new UnitInfo(SolidAngleUnit.Steradian, "Steradians", BaseUnits.Undefined), + new UnitInfo(SolidAngleUnit.Steradian, "Steradians", BaseUnits.Undefined, "SolidAngle"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, SolidAngleUnit Unit), List>(); } /// @@ -145,11 +140,6 @@ public SolidAngle(double value, UnitSystem unitSystem) /// public static SolidAngle AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, SolidAngleUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -210,7 +200,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(SolidAngleUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(SolidAngleUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -220,34 +213,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(SolidAngleUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(SolidAngleUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.SolidAngle"; - var resourceManager = new ResourceManager(resourceName, typeof(SolidAngle).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -790,9 +756,6 @@ public SolidAngle ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs index 91e14ab264..317aa6ee83 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -71,43 +68,41 @@ static SpecificEnergy() Info = new QuantityInfo("SpecificEnergy", new UnitInfo[] { - new UnitInfo(SpecificEnergyUnit.BtuPerPound, "BtuPerPound", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.CaloriePerGram, "CaloriesPerGram", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.GigawattDayPerKilogram, "GigawattDaysPerKilogram", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.GigawattDayPerShortTon, "GigawattDaysPerShortTon", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.GigawattDayPerTonne, "GigawattDaysPerTonne", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.GigawattHourPerKilogram, "GigawattHoursPerKilogram", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.GigawattHourPerPound, "GigawattHoursPerPound", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.JoulePerKilogram, "JoulesPerKilogram", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.KilocaloriePerGram, "KilocaloriesPerGram", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.KilojoulePerKilogram, "KilojoulesPerKilogram", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.KilowattDayPerKilogram, "KilowattDaysPerKilogram", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.KilowattDayPerShortTon, "KilowattDaysPerShortTon", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.KilowattDayPerTonne, "KilowattDaysPerTonne", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.KilowattHourPerKilogram, "KilowattHoursPerKilogram", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.KilowattHourPerPound, "KilowattHoursPerPound", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.MegajoulePerKilogram, "MegajoulesPerKilogram", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.MegaJoulePerTonne, "MegaJoulesPerTonne", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.MegawattDayPerKilogram, "MegawattDaysPerKilogram", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.MegawattDayPerShortTon, "MegawattDaysPerShortTon", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.MegawattDayPerTonne, "MegawattDaysPerTonne", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.MegawattHourPerKilogram, "MegawattHoursPerKilogram", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.MegawattHourPerPound, "MegawattHoursPerPound", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.TerawattDayPerKilogram, "TerawattDaysPerKilogram", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.TerawattDayPerShortTon, "TerawattDaysPerShortTon", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.TerawattDayPerTonne, "TerawattDaysPerTonne", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.WattDayPerKilogram, "WattDaysPerKilogram", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.WattDayPerShortTon, "WattDaysPerShortTon", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.WattDayPerTonne, "WattDaysPerTonne", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.WattHourPerKilogram, "WattHoursPerKilogram", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.WattHourPerPound, "WattHoursPerPound", BaseUnits.Undefined), + new UnitInfo(SpecificEnergyUnit.BtuPerPound, "BtuPerPound", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.CaloriePerGram, "CaloriesPerGram", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.GigawattDayPerKilogram, "GigawattDaysPerKilogram", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.GigawattDayPerShortTon, "GigawattDaysPerShortTon", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.GigawattDayPerTonne, "GigawattDaysPerTonne", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.GigawattHourPerKilogram, "GigawattHoursPerKilogram", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.GigawattHourPerPound, "GigawattHoursPerPound", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.JoulePerKilogram, "JoulesPerKilogram", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.KilocaloriePerGram, "KilocaloriesPerGram", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.KilojoulePerKilogram, "KilojoulesPerKilogram", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.KilowattDayPerKilogram, "KilowattDaysPerKilogram", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.KilowattDayPerShortTon, "KilowattDaysPerShortTon", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.KilowattDayPerTonne, "KilowattDaysPerTonne", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.KilowattHourPerKilogram, "KilowattHoursPerKilogram", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.KilowattHourPerPound, "KilowattHoursPerPound", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.MegajoulePerKilogram, "MegajoulesPerKilogram", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.MegaJoulePerTonne, "MegaJoulesPerTonne", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.MegawattDayPerKilogram, "MegawattDaysPerKilogram", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.MegawattDayPerShortTon, "MegawattDaysPerShortTon", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.MegawattDayPerTonne, "MegawattDaysPerTonne", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.MegawattHourPerKilogram, "MegawattHoursPerKilogram", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.MegawattHourPerPound, "MegawattHoursPerPound", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.TerawattDayPerKilogram, "TerawattDaysPerKilogram", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.TerawattDayPerShortTon, "TerawattDaysPerShortTon", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.TerawattDayPerTonne, "TerawattDaysPerTonne", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.WattDayPerKilogram, "WattDaysPerKilogram", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.WattDayPerShortTon, "WattDaysPerShortTon", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.WattDayPerTonne, "WattDaysPerTonne", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.WattHourPerKilogram, "WattHoursPerKilogram", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.WattHourPerPound, "WattHoursPerPound", BaseUnits.Undefined, "SpecificEnergy"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, SpecificEnergyUnit Unit), List>(); } /// @@ -174,11 +169,6 @@ public SpecificEnergy(double value, UnitSystem unitSystem) /// public static SpecificEnergy AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, SpecificEnergyUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -442,7 +432,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(SpecificEnergyUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(SpecificEnergyUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -452,34 +445,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(SpecificEnergyUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(SpecificEnergyUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.SpecificEnergy"; - var resourceManager = new ResourceManager(resourceName, typeof(SpecificEnergy).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -1370,9 +1336,6 @@ public SpecificEnergy ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs index 524ee8afd4..f55adf6ad2 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,22 +65,20 @@ static SpecificEntropy() Info = new QuantityInfo("SpecificEntropy", new UnitInfo[] { - new UnitInfo(SpecificEntropyUnit.BtuPerPoundFahrenheit, "BtusPerPoundFahrenheit", BaseUnits.Undefined), - new UnitInfo(SpecificEntropyUnit.CaloriePerGramKelvin, "CaloriesPerGramKelvin", BaseUnits.Undefined), - new UnitInfo(SpecificEntropyUnit.JoulePerKilogramDegreeCelsius, "JoulesPerKilogramDegreeCelsius", BaseUnits.Undefined), - new UnitInfo(SpecificEntropyUnit.JoulePerKilogramKelvin, "JoulesPerKilogramKelvin", BaseUnits.Undefined), - new UnitInfo(SpecificEntropyUnit.KilocaloriePerGramKelvin, "KilocaloriesPerGramKelvin", BaseUnits.Undefined), - new UnitInfo(SpecificEntropyUnit.KilojoulePerKilogramDegreeCelsius, "KilojoulesPerKilogramDegreeCelsius", BaseUnits.Undefined), - new UnitInfo(SpecificEntropyUnit.KilojoulePerKilogramKelvin, "KilojoulesPerKilogramKelvin", BaseUnits.Undefined), - new UnitInfo(SpecificEntropyUnit.MegajoulePerKilogramDegreeCelsius, "MegajoulesPerKilogramDegreeCelsius", BaseUnits.Undefined), - new UnitInfo(SpecificEntropyUnit.MegajoulePerKilogramKelvin, "MegajoulesPerKilogramKelvin", BaseUnits.Undefined), + new UnitInfo(SpecificEntropyUnit.BtuPerPoundFahrenheit, "BtusPerPoundFahrenheit", BaseUnits.Undefined, "SpecificEntropy"), + new UnitInfo(SpecificEntropyUnit.CaloriePerGramKelvin, "CaloriesPerGramKelvin", BaseUnits.Undefined, "SpecificEntropy"), + new UnitInfo(SpecificEntropyUnit.JoulePerKilogramDegreeCelsius, "JoulesPerKilogramDegreeCelsius", BaseUnits.Undefined, "SpecificEntropy"), + new UnitInfo(SpecificEntropyUnit.JoulePerKilogramKelvin, "JoulesPerKilogramKelvin", BaseUnits.Undefined, "SpecificEntropy"), + new UnitInfo(SpecificEntropyUnit.KilocaloriePerGramKelvin, "KilocaloriesPerGramKelvin", BaseUnits.Undefined, "SpecificEntropy"), + new UnitInfo(SpecificEntropyUnit.KilojoulePerKilogramDegreeCelsius, "KilojoulesPerKilogramDegreeCelsius", BaseUnits.Undefined, "SpecificEntropy"), + new UnitInfo(SpecificEntropyUnit.KilojoulePerKilogramKelvin, "KilojoulesPerKilogramKelvin", BaseUnits.Undefined, "SpecificEntropy"), + new UnitInfo(SpecificEntropyUnit.MegajoulePerKilogramDegreeCelsius, "MegajoulesPerKilogramDegreeCelsius", BaseUnits.Undefined, "SpecificEntropy"), + new UnitInfo(SpecificEntropyUnit.MegajoulePerKilogramKelvin, "MegajoulesPerKilogramKelvin", BaseUnits.Undefined, "SpecificEntropy"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, SpecificEntropyUnit Unit), List>(); } /// @@ -150,11 +145,6 @@ public SpecificEntropy(double value, UnitSystem unitSystem) /// public static SpecificEntropy AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, SpecificEntropyUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -271,7 +261,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(SpecificEntropyUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(SpecificEntropyUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -281,34 +274,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(SpecificEntropyUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(SpecificEntropyUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.SpecificEntropy"; - var resourceManager = new ResourceManager(resourceName, typeof(SpecificEntropy).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -947,9 +913,6 @@ public SpecificEntropy ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs index 2b8af78c34..a207e9b463 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -71,17 +68,15 @@ static SpecificFuelConsumption() Info = new QuantityInfo("SpecificFuelConsumption", new UnitInfo[] { - new UnitInfo(SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond, "GramsPerKiloNewtonSecond", BaseUnits.Undefined), - new UnitInfo(SpecificFuelConsumptionUnit.KilogramPerKilogramForceHour, "KilogramsPerKilogramForceHour", BaseUnits.Undefined), - new UnitInfo(SpecificFuelConsumptionUnit.KilogramPerKiloNewtonSecond, "KilogramsPerKiloNewtonSecond", BaseUnits.Undefined), - new UnitInfo(SpecificFuelConsumptionUnit.PoundMassPerPoundForceHour, "PoundsMassPerPoundForceHour", BaseUnits.Undefined), + new UnitInfo(SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond, "GramsPerKiloNewtonSecond", BaseUnits.Undefined, "SpecificFuelConsumption"), + new UnitInfo(SpecificFuelConsumptionUnit.KilogramPerKilogramForceHour, "KilogramsPerKilogramForceHour", BaseUnits.Undefined, "SpecificFuelConsumption"), + new UnitInfo(SpecificFuelConsumptionUnit.KilogramPerKiloNewtonSecond, "KilogramsPerKiloNewtonSecond", BaseUnits.Undefined, "SpecificFuelConsumption"), + new UnitInfo(SpecificFuelConsumptionUnit.PoundMassPerPoundForceHour, "PoundsMassPerPoundForceHour", BaseUnits.Undefined, "SpecificFuelConsumption"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, SpecificFuelConsumptionUnit Unit), List>(); } /// @@ -148,11 +143,6 @@ public SpecificFuelConsumption(double value, UnitSystem unitSystem) /// public static SpecificFuelConsumption AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, SpecificFuelConsumptionUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -234,7 +224,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(SpecificFuelConsumptionUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(SpecificFuelConsumptionUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -244,34 +237,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(SpecificFuelConsumptionUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(SpecificFuelConsumptionUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.SpecificFuelConsumption"; - var resourceManager = new ResourceManager(resourceName, typeof(SpecificFuelConsumption).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -850,9 +816,6 @@ public SpecificFuelConsumption ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs index 521bb6c8fb..edf16c47ca 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,16 +65,14 @@ static SpecificVolume() Info = new QuantityInfo("SpecificVolume", new UnitInfo[] { - new UnitInfo(SpecificVolumeUnit.CubicFootPerPound, "CubicFeetPerPound", BaseUnits.Undefined), - new UnitInfo(SpecificVolumeUnit.CubicMeterPerKilogram, "CubicMetersPerKilogram", BaseUnits.Undefined), - new UnitInfo(SpecificVolumeUnit.MillicubicMeterPerKilogram, "MillicubicMetersPerKilogram", BaseUnits.Undefined), + new UnitInfo(SpecificVolumeUnit.CubicFootPerPound, "CubicFeetPerPound", BaseUnits.Undefined, "SpecificVolume"), + new UnitInfo(SpecificVolumeUnit.CubicMeterPerKilogram, "CubicMetersPerKilogram", BaseUnits.Undefined, "SpecificVolume"), + new UnitInfo(SpecificVolumeUnit.MillicubicMeterPerKilogram, "MillicubicMetersPerKilogram", BaseUnits.Undefined, "SpecificVolume"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, SpecificVolumeUnit Unit), List>(); } /// @@ -144,11 +139,6 @@ public SpecificVolume(double value, UnitSystem unitSystem) /// public static SpecificVolume AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, SpecificVolumeUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -223,7 +213,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(SpecificVolumeUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(SpecificVolumeUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -233,34 +226,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(SpecificVolumeUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(SpecificVolumeUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.SpecificVolume"; - var resourceManager = new ResourceManager(resourceName, typeof(SpecificVolume).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -827,9 +793,6 @@ public SpecificVolume ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs index dbfb910f8b..1b895bfc0b 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -71,30 +68,28 @@ static SpecificWeight() Info = new QuantityInfo("SpecificWeight", new UnitInfo[] { - new UnitInfo(SpecificWeightUnit.KilogramForcePerCubicCentimeter, "KilogramsForcePerCubicCentimeter", BaseUnits.Undefined), - new UnitInfo(SpecificWeightUnit.KilogramForcePerCubicMeter, "KilogramsForcePerCubicMeter", BaseUnits.Undefined), - new UnitInfo(SpecificWeightUnit.KilogramForcePerCubicMillimeter, "KilogramsForcePerCubicMillimeter", BaseUnits.Undefined), - new UnitInfo(SpecificWeightUnit.KilonewtonPerCubicCentimeter, "KilonewtonsPerCubicCentimeter", BaseUnits.Undefined), - new UnitInfo(SpecificWeightUnit.KilonewtonPerCubicMeter, "KilonewtonsPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(SpecificWeightUnit.KilonewtonPerCubicMillimeter, "KilonewtonsPerCubicMillimeter", BaseUnits.Undefined), - new UnitInfo(SpecificWeightUnit.KilopoundForcePerCubicFoot, "KilopoundsForcePerCubicFoot", BaseUnits.Undefined), - new UnitInfo(SpecificWeightUnit.KilopoundForcePerCubicInch, "KilopoundsForcePerCubicInch", BaseUnits.Undefined), - new UnitInfo(SpecificWeightUnit.MeganewtonPerCubicMeter, "MeganewtonsPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(SpecificWeightUnit.NewtonPerCubicCentimeter, "NewtonsPerCubicCentimeter", BaseUnits.Undefined), - new UnitInfo(SpecificWeightUnit.NewtonPerCubicMeter, "NewtonsPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(SpecificWeightUnit.NewtonPerCubicMillimeter, "NewtonsPerCubicMillimeter", BaseUnits.Undefined), - new UnitInfo(SpecificWeightUnit.PoundForcePerCubicFoot, "PoundsForcePerCubicFoot", BaseUnits.Undefined), - new UnitInfo(SpecificWeightUnit.PoundForcePerCubicInch, "PoundsForcePerCubicInch", BaseUnits.Undefined), - new UnitInfo(SpecificWeightUnit.TonneForcePerCubicCentimeter, "TonnesForcePerCubicCentimeter", BaseUnits.Undefined), - new UnitInfo(SpecificWeightUnit.TonneForcePerCubicMeter, "TonnesForcePerCubicMeter", BaseUnits.Undefined), - new UnitInfo(SpecificWeightUnit.TonneForcePerCubicMillimeter, "TonnesForcePerCubicMillimeter", BaseUnits.Undefined), + new UnitInfo(SpecificWeightUnit.KilogramForcePerCubicCentimeter, "KilogramsForcePerCubicCentimeter", BaseUnits.Undefined, "SpecificWeight"), + new UnitInfo(SpecificWeightUnit.KilogramForcePerCubicMeter, "KilogramsForcePerCubicMeter", BaseUnits.Undefined, "SpecificWeight"), + new UnitInfo(SpecificWeightUnit.KilogramForcePerCubicMillimeter, "KilogramsForcePerCubicMillimeter", BaseUnits.Undefined, "SpecificWeight"), + new UnitInfo(SpecificWeightUnit.KilonewtonPerCubicCentimeter, "KilonewtonsPerCubicCentimeter", BaseUnits.Undefined, "SpecificWeight"), + new UnitInfo(SpecificWeightUnit.KilonewtonPerCubicMeter, "KilonewtonsPerCubicMeter", BaseUnits.Undefined, "SpecificWeight"), + new UnitInfo(SpecificWeightUnit.KilonewtonPerCubicMillimeter, "KilonewtonsPerCubicMillimeter", BaseUnits.Undefined, "SpecificWeight"), + new UnitInfo(SpecificWeightUnit.KilopoundForcePerCubicFoot, "KilopoundsForcePerCubicFoot", BaseUnits.Undefined, "SpecificWeight"), + new UnitInfo(SpecificWeightUnit.KilopoundForcePerCubicInch, "KilopoundsForcePerCubicInch", BaseUnits.Undefined, "SpecificWeight"), + new UnitInfo(SpecificWeightUnit.MeganewtonPerCubicMeter, "MeganewtonsPerCubicMeter", BaseUnits.Undefined, "SpecificWeight"), + new UnitInfo(SpecificWeightUnit.NewtonPerCubicCentimeter, "NewtonsPerCubicCentimeter", BaseUnits.Undefined, "SpecificWeight"), + new UnitInfo(SpecificWeightUnit.NewtonPerCubicMeter, "NewtonsPerCubicMeter", BaseUnits.Undefined, "SpecificWeight"), + new UnitInfo(SpecificWeightUnit.NewtonPerCubicMillimeter, "NewtonsPerCubicMillimeter", BaseUnits.Undefined, "SpecificWeight"), + new UnitInfo(SpecificWeightUnit.PoundForcePerCubicFoot, "PoundsForcePerCubicFoot", BaseUnits.Undefined, "SpecificWeight"), + new UnitInfo(SpecificWeightUnit.PoundForcePerCubicInch, "PoundsForcePerCubicInch", BaseUnits.Undefined, "SpecificWeight"), + new UnitInfo(SpecificWeightUnit.TonneForcePerCubicCentimeter, "TonnesForcePerCubicCentimeter", BaseUnits.Undefined, "SpecificWeight"), + new UnitInfo(SpecificWeightUnit.TonneForcePerCubicMeter, "TonnesForcePerCubicMeter", BaseUnits.Undefined, "SpecificWeight"), + new UnitInfo(SpecificWeightUnit.TonneForcePerCubicMillimeter, "TonnesForcePerCubicMillimeter", BaseUnits.Undefined, "SpecificWeight"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, SpecificWeightUnit Unit), List>(); } /// @@ -161,11 +156,6 @@ public SpecificWeight(double value, UnitSystem unitSystem) /// public static SpecificWeight AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, SpecificWeightUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -338,7 +328,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(SpecificWeightUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(SpecificWeightUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -348,34 +341,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(SpecificWeightUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(SpecificWeightUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.SpecificWeight"; - var resourceManager = new ResourceManager(resourceName, typeof(SpecificWeight).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -1110,9 +1076,6 @@ public SpecificWeight ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Speed.g.cs b/UnitsNet/GeneratedCode/Quantities/Speed.g.cs index 665834cef7..3854d838f2 100644 --- a/UnitsNet/GeneratedCode/Quantities/Speed.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Speed.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,46 +65,44 @@ static Speed() Info = new QuantityInfo("Speed", new UnitInfo[] { - new UnitInfo(SpeedUnit.CentimeterPerHour, "CentimetersPerHour", BaseUnits.Undefined), - new UnitInfo(SpeedUnit.CentimeterPerMinute, "CentimetersPerMinutes", BaseUnits.Undefined), - new UnitInfo(SpeedUnit.CentimeterPerSecond, "CentimetersPerSecond", BaseUnits.Undefined), - new UnitInfo(SpeedUnit.DecimeterPerMinute, "DecimetersPerMinutes", BaseUnits.Undefined), - new UnitInfo(SpeedUnit.DecimeterPerSecond, "DecimetersPerSecond", BaseUnits.Undefined), - new UnitInfo(SpeedUnit.FootPerHour, "FeetPerHour", new BaseUnits(length: LengthUnit.Foot, time: DurationUnit.Hour)), - new UnitInfo(SpeedUnit.FootPerMinute, "FeetPerMinute", new BaseUnits(length: LengthUnit.Foot, time: DurationUnit.Minute)), - new UnitInfo(SpeedUnit.FootPerSecond, "FeetPerSecond", new BaseUnits(length: LengthUnit.Foot, time: DurationUnit.Second)), - new UnitInfo(SpeedUnit.InchPerHour, "InchesPerHour", new BaseUnits(length: LengthUnit.Inch, time: DurationUnit.Hour)), - new UnitInfo(SpeedUnit.InchPerMinute, "InchesPerMinute", new BaseUnits(length: LengthUnit.Inch, time: DurationUnit.Minute)), - new UnitInfo(SpeedUnit.InchPerSecond, "InchesPerSecond", new BaseUnits(length: LengthUnit.Inch, time: DurationUnit.Second)), - new UnitInfo(SpeedUnit.KilometerPerHour, "KilometersPerHour", BaseUnits.Undefined), - new UnitInfo(SpeedUnit.KilometerPerMinute, "KilometersPerMinutes", BaseUnits.Undefined), - new UnitInfo(SpeedUnit.KilometerPerSecond, "KilometersPerSecond", BaseUnits.Undefined), - new UnitInfo(SpeedUnit.Knot, "Knots", new BaseUnits(length: LengthUnit.NauticalMile, time: DurationUnit.Hour)), - new UnitInfo(SpeedUnit.Mach, "Mach", BaseUnits.Undefined), - new UnitInfo(SpeedUnit.MeterPerHour, "MetersPerHour", new BaseUnits(length: LengthUnit.Meter, time: DurationUnit.Hour)), - new UnitInfo(SpeedUnit.MeterPerMinute, "MetersPerMinutes", new BaseUnits(length: LengthUnit.Meter, time: DurationUnit.Minute)), - new UnitInfo(SpeedUnit.MeterPerSecond, "MetersPerSecond", new BaseUnits(length: LengthUnit.Meter, time: DurationUnit.Second)), - new UnitInfo(SpeedUnit.MicrometerPerMinute, "MicrometersPerMinutes", BaseUnits.Undefined), - new UnitInfo(SpeedUnit.MicrometerPerSecond, "MicrometersPerSecond", BaseUnits.Undefined), - new UnitInfo(SpeedUnit.MilePerHour, "MilesPerHour", new BaseUnits(length: LengthUnit.Mile, time: DurationUnit.Hour)), - new UnitInfo(SpeedUnit.MillimeterPerHour, "MillimetersPerHour", BaseUnits.Undefined), - new UnitInfo(SpeedUnit.MillimeterPerMinute, "MillimetersPerMinutes", BaseUnits.Undefined), - new UnitInfo(SpeedUnit.MillimeterPerSecond, "MillimetersPerSecond", BaseUnits.Undefined), - new UnitInfo(SpeedUnit.NanometerPerMinute, "NanometersPerMinutes", BaseUnits.Undefined), - new UnitInfo(SpeedUnit.NanometerPerSecond, "NanometersPerSecond", BaseUnits.Undefined), - new UnitInfo(SpeedUnit.UsSurveyFootPerHour, "UsSurveyFeetPerHour", new BaseUnits(length: LengthUnit.UsSurveyFoot, time: DurationUnit.Hour)), - new UnitInfo(SpeedUnit.UsSurveyFootPerMinute, "UsSurveyFeetPerMinute", new BaseUnits(length: LengthUnit.UsSurveyFoot, time: DurationUnit.Minute)), - new UnitInfo(SpeedUnit.UsSurveyFootPerSecond, "UsSurveyFeetPerSecond", new BaseUnits(length: LengthUnit.UsSurveyFoot, time: DurationUnit.Second)), - new UnitInfo(SpeedUnit.YardPerHour, "YardsPerHour", new BaseUnits(length: LengthUnit.Yard, time: DurationUnit.Hour)), - new UnitInfo(SpeedUnit.YardPerMinute, "YardsPerMinute", new BaseUnits(length: LengthUnit.Yard, time: DurationUnit.Minute)), - new UnitInfo(SpeedUnit.YardPerSecond, "YardsPerSecond", new BaseUnits(length: LengthUnit.Yard, time: DurationUnit.Second)), + new UnitInfo(SpeedUnit.CentimeterPerHour, "CentimetersPerHour", BaseUnits.Undefined, "Speed"), + new UnitInfo(SpeedUnit.CentimeterPerMinute, "CentimetersPerMinutes", BaseUnits.Undefined, "Speed"), + new UnitInfo(SpeedUnit.CentimeterPerSecond, "CentimetersPerSecond", BaseUnits.Undefined, "Speed"), + new UnitInfo(SpeedUnit.DecimeterPerMinute, "DecimetersPerMinutes", BaseUnits.Undefined, "Speed"), + new UnitInfo(SpeedUnit.DecimeterPerSecond, "DecimetersPerSecond", BaseUnits.Undefined, "Speed"), + new UnitInfo(SpeedUnit.FootPerHour, "FeetPerHour", new BaseUnits(length: LengthUnit.Foot, time: DurationUnit.Hour), "Speed"), + new UnitInfo(SpeedUnit.FootPerMinute, "FeetPerMinute", new BaseUnits(length: LengthUnit.Foot, time: DurationUnit.Minute), "Speed"), + new UnitInfo(SpeedUnit.FootPerSecond, "FeetPerSecond", new BaseUnits(length: LengthUnit.Foot, time: DurationUnit.Second), "Speed"), + new UnitInfo(SpeedUnit.InchPerHour, "InchesPerHour", new BaseUnits(length: LengthUnit.Inch, time: DurationUnit.Hour), "Speed"), + new UnitInfo(SpeedUnit.InchPerMinute, "InchesPerMinute", new BaseUnits(length: LengthUnit.Inch, time: DurationUnit.Minute), "Speed"), + new UnitInfo(SpeedUnit.InchPerSecond, "InchesPerSecond", new BaseUnits(length: LengthUnit.Inch, time: DurationUnit.Second), "Speed"), + new UnitInfo(SpeedUnit.KilometerPerHour, "KilometersPerHour", BaseUnits.Undefined, "Speed"), + new UnitInfo(SpeedUnit.KilometerPerMinute, "KilometersPerMinutes", BaseUnits.Undefined, "Speed"), + new UnitInfo(SpeedUnit.KilometerPerSecond, "KilometersPerSecond", BaseUnits.Undefined, "Speed"), + new UnitInfo(SpeedUnit.Knot, "Knots", new BaseUnits(length: LengthUnit.NauticalMile, time: DurationUnit.Hour), "Speed"), + new UnitInfo(SpeedUnit.Mach, "Mach", BaseUnits.Undefined, "Speed"), + new UnitInfo(SpeedUnit.MeterPerHour, "MetersPerHour", new BaseUnits(length: LengthUnit.Meter, time: DurationUnit.Hour), "Speed"), + new UnitInfo(SpeedUnit.MeterPerMinute, "MetersPerMinutes", new BaseUnits(length: LengthUnit.Meter, time: DurationUnit.Minute), "Speed"), + new UnitInfo(SpeedUnit.MeterPerSecond, "MetersPerSecond", new BaseUnits(length: LengthUnit.Meter, time: DurationUnit.Second), "Speed"), + new UnitInfo(SpeedUnit.MicrometerPerMinute, "MicrometersPerMinutes", BaseUnits.Undefined, "Speed"), + new UnitInfo(SpeedUnit.MicrometerPerSecond, "MicrometersPerSecond", BaseUnits.Undefined, "Speed"), + new UnitInfo(SpeedUnit.MilePerHour, "MilesPerHour", new BaseUnits(length: LengthUnit.Mile, time: DurationUnit.Hour), "Speed"), + new UnitInfo(SpeedUnit.MillimeterPerHour, "MillimetersPerHour", BaseUnits.Undefined, "Speed"), + new UnitInfo(SpeedUnit.MillimeterPerMinute, "MillimetersPerMinutes", BaseUnits.Undefined, "Speed"), + new UnitInfo(SpeedUnit.MillimeterPerSecond, "MillimetersPerSecond", BaseUnits.Undefined, "Speed"), + new UnitInfo(SpeedUnit.NanometerPerMinute, "NanometersPerMinutes", BaseUnits.Undefined, "Speed"), + new UnitInfo(SpeedUnit.NanometerPerSecond, "NanometersPerSecond", BaseUnits.Undefined, "Speed"), + new UnitInfo(SpeedUnit.UsSurveyFootPerHour, "UsSurveyFeetPerHour", new BaseUnits(length: LengthUnit.UsSurveyFoot, time: DurationUnit.Hour), "Speed"), + new UnitInfo(SpeedUnit.UsSurveyFootPerMinute, "UsSurveyFeetPerMinute", new BaseUnits(length: LengthUnit.UsSurveyFoot, time: DurationUnit.Minute), "Speed"), + new UnitInfo(SpeedUnit.UsSurveyFootPerSecond, "UsSurveyFeetPerSecond", new BaseUnits(length: LengthUnit.UsSurveyFoot, time: DurationUnit.Second), "Speed"), + new UnitInfo(SpeedUnit.YardPerHour, "YardsPerHour", new BaseUnits(length: LengthUnit.Yard, time: DurationUnit.Hour), "Speed"), + new UnitInfo(SpeedUnit.YardPerMinute, "YardsPerMinute", new BaseUnits(length: LengthUnit.Yard, time: DurationUnit.Minute), "Speed"), + new UnitInfo(SpeedUnit.YardPerSecond, "YardsPerSecond", new BaseUnits(length: LengthUnit.Yard, time: DurationUnit.Second), "Speed"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, SpeedUnit Unit), List>(); } /// @@ -174,11 +169,6 @@ public Speed(double value, UnitSystem unitSystem) /// public static Speed AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, SpeedUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -463,7 +453,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(SpeedUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(SpeedUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -473,34 +466,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(SpeedUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(SpeedUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Speed"; - var resourceManager = new ResourceManager(resourceName, typeof(Speed).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -1427,9 +1393,6 @@ public Speed ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/StandardVolumeFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/StandardVolumeFlow.g.cs index 269da94652..9f70c21003 100644 --- a/UnitsNet/GeneratedCode/Quantities/StandardVolumeFlow.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/StandardVolumeFlow.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,22 +65,20 @@ static StandardVolumeFlow() Info = new QuantityInfo("StandardVolumeFlow", new UnitInfo[] { - new UnitInfo(StandardVolumeFlowUnit.StandardCubicCentimeterPerMinute, "StandardCubicCentimetersPerMinute", BaseUnits.Undefined), - new UnitInfo(StandardVolumeFlowUnit.StandardCubicFootPerHour, "StandardCubicFeetPerHour", BaseUnits.Undefined), - new UnitInfo(StandardVolumeFlowUnit.StandardCubicFootPerMinute, "StandardCubicFeetPerMinute", BaseUnits.Undefined), - new UnitInfo(StandardVolumeFlowUnit.StandardCubicFootPerSecond, "StandardCubicFeetPerSecond", BaseUnits.Undefined), - new UnitInfo(StandardVolumeFlowUnit.StandardCubicMeterPerDay, "StandardCubicMetersPerDay", BaseUnits.Undefined), - new UnitInfo(StandardVolumeFlowUnit.StandardCubicMeterPerHour, "StandardCubicMetersPerHour", BaseUnits.Undefined), - new UnitInfo(StandardVolumeFlowUnit.StandardCubicMeterPerMinute, "StandardCubicMetersPerMinute", BaseUnits.Undefined), - new UnitInfo(StandardVolumeFlowUnit.StandardCubicMeterPerSecond, "StandardCubicMetersPerSecond", BaseUnits.Undefined), - new UnitInfo(StandardVolumeFlowUnit.StandardLiterPerMinute, "StandardLitersPerMinute", BaseUnits.Undefined), + new UnitInfo(StandardVolumeFlowUnit.StandardCubicCentimeterPerMinute, "StandardCubicCentimetersPerMinute", BaseUnits.Undefined, "StandardVolumeFlow"), + new UnitInfo(StandardVolumeFlowUnit.StandardCubicFootPerHour, "StandardCubicFeetPerHour", BaseUnits.Undefined, "StandardVolumeFlow"), + new UnitInfo(StandardVolumeFlowUnit.StandardCubicFootPerMinute, "StandardCubicFeetPerMinute", BaseUnits.Undefined, "StandardVolumeFlow"), + new UnitInfo(StandardVolumeFlowUnit.StandardCubicFootPerSecond, "StandardCubicFeetPerSecond", BaseUnits.Undefined, "StandardVolumeFlow"), + new UnitInfo(StandardVolumeFlowUnit.StandardCubicMeterPerDay, "StandardCubicMetersPerDay", BaseUnits.Undefined, "StandardVolumeFlow"), + new UnitInfo(StandardVolumeFlowUnit.StandardCubicMeterPerHour, "StandardCubicMetersPerHour", BaseUnits.Undefined, "StandardVolumeFlow"), + new UnitInfo(StandardVolumeFlowUnit.StandardCubicMeterPerMinute, "StandardCubicMetersPerMinute", BaseUnits.Undefined, "StandardVolumeFlow"), + new UnitInfo(StandardVolumeFlowUnit.StandardCubicMeterPerSecond, "StandardCubicMetersPerSecond", BaseUnits.Undefined, "StandardVolumeFlow"), + new UnitInfo(StandardVolumeFlowUnit.StandardLiterPerMinute, "StandardLitersPerMinute", BaseUnits.Undefined, "StandardVolumeFlow"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, StandardVolumeFlowUnit Unit), List>(); } /// @@ -150,11 +145,6 @@ public StandardVolumeFlow(double value, UnitSystem unitSystem) /// public static StandardVolumeFlow AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, StandardVolumeFlowUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -271,7 +261,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(StandardVolumeFlowUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(StandardVolumeFlowUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -281,34 +274,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(StandardVolumeFlowUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(StandardVolumeFlowUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.StandardVolumeFlow"; - var resourceManager = new ResourceManager(resourceName, typeof(StandardVolumeFlow).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -947,9 +913,6 @@ public StandardVolumeFlow ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Temperature.g.cs b/UnitsNet/GeneratedCode/Quantities/Temperature.g.cs index c5893ec175..a998d6415b 100644 --- a/UnitsNet/GeneratedCode/Quantities/Temperature.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Temperature.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,23 +65,21 @@ static Temperature() Info = new QuantityInfo("Temperature", new UnitInfo[] { - new UnitInfo(TemperatureUnit.DegreeCelsius, "DegreesCelsius", new BaseUnits(temperature: TemperatureUnit.DegreeCelsius)), - new UnitInfo(TemperatureUnit.DegreeDelisle, "DegreesDelisle", new BaseUnits(temperature: TemperatureUnit.DegreeDelisle)), - new UnitInfo(TemperatureUnit.DegreeFahrenheit, "DegreesFahrenheit", new BaseUnits(temperature: TemperatureUnit.DegreeFahrenheit)), - new UnitInfo(TemperatureUnit.DegreeNewton, "DegreesNewton", new BaseUnits(temperature: TemperatureUnit.DegreeNewton)), - new UnitInfo(TemperatureUnit.DegreeRankine, "DegreesRankine", new BaseUnits(temperature: TemperatureUnit.DegreeRankine)), - new UnitInfo(TemperatureUnit.DegreeReaumur, "DegreesReaumur", new BaseUnits(temperature: TemperatureUnit.DegreeReaumur)), - new UnitInfo(TemperatureUnit.DegreeRoemer, "DegreesRoemer", new BaseUnits(temperature: TemperatureUnit.DegreeRoemer)), - new UnitInfo(TemperatureUnit.Kelvin, "Kelvins", new BaseUnits(temperature: TemperatureUnit.Kelvin)), - new UnitInfo(TemperatureUnit.MillidegreeCelsius, "MillidegreesCelsius", new BaseUnits(temperature: TemperatureUnit.DegreeCelsius)), - new UnitInfo(TemperatureUnit.SolarTemperature, "SolarTemperatures", BaseUnits.Undefined), + new UnitInfo(TemperatureUnit.DegreeCelsius, "DegreesCelsius", new BaseUnits(temperature: TemperatureUnit.DegreeCelsius), "Temperature"), + new UnitInfo(TemperatureUnit.DegreeDelisle, "DegreesDelisle", new BaseUnits(temperature: TemperatureUnit.DegreeDelisle), "Temperature"), + new UnitInfo(TemperatureUnit.DegreeFahrenheit, "DegreesFahrenheit", new BaseUnits(temperature: TemperatureUnit.DegreeFahrenheit), "Temperature"), + new UnitInfo(TemperatureUnit.DegreeNewton, "DegreesNewton", new BaseUnits(temperature: TemperatureUnit.DegreeNewton), "Temperature"), + new UnitInfo(TemperatureUnit.DegreeRankine, "DegreesRankine", new BaseUnits(temperature: TemperatureUnit.DegreeRankine), "Temperature"), + new UnitInfo(TemperatureUnit.DegreeReaumur, "DegreesReaumur", new BaseUnits(temperature: TemperatureUnit.DegreeReaumur), "Temperature"), + new UnitInfo(TemperatureUnit.DegreeRoemer, "DegreesRoemer", new BaseUnits(temperature: TemperatureUnit.DegreeRoemer), "Temperature"), + new UnitInfo(TemperatureUnit.Kelvin, "Kelvins", new BaseUnits(temperature: TemperatureUnit.Kelvin), "Temperature"), + new UnitInfo(TemperatureUnit.MillidegreeCelsius, "MillidegreesCelsius", new BaseUnits(temperature: TemperatureUnit.DegreeCelsius), "Temperature"), + new UnitInfo(TemperatureUnit.SolarTemperature, "SolarTemperatures", BaseUnits.Undefined, "Temperature"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, TemperatureUnit Unit), List>(); } /// @@ -148,11 +143,6 @@ public Temperature(double value, UnitSystem unitSystem) /// public static Temperature Zero { get; } - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, TemperatureUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -276,7 +266,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(TemperatureUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(TemperatureUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -286,34 +279,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(TemperatureUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(TemperatureUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Temperature"; - var resourceManager = new ResourceManager(resourceName, typeof(Temperature).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -918,9 +884,6 @@ public Temperature ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs index e131770917..bf28a17e4f 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,23 +65,21 @@ static TemperatureChangeRate() Info = new QuantityInfo("TemperatureChangeRate", new UnitInfo[] { - new UnitInfo(TemperatureChangeRateUnit.CentidegreeCelsiusPerSecond, "CentidegreesCelsiusPerSecond", BaseUnits.Undefined), - new UnitInfo(TemperatureChangeRateUnit.DecadegreeCelsiusPerSecond, "DecadegreesCelsiusPerSecond", BaseUnits.Undefined), - new UnitInfo(TemperatureChangeRateUnit.DecidegreeCelsiusPerSecond, "DecidegreesCelsiusPerSecond", BaseUnits.Undefined), - new UnitInfo(TemperatureChangeRateUnit.DegreeCelsiusPerMinute, "DegreesCelsiusPerMinute", BaseUnits.Undefined), - new UnitInfo(TemperatureChangeRateUnit.DegreeCelsiusPerSecond, "DegreesCelsiusPerSecond", BaseUnits.Undefined), - new UnitInfo(TemperatureChangeRateUnit.HectodegreeCelsiusPerSecond, "HectodegreesCelsiusPerSecond", BaseUnits.Undefined), - new UnitInfo(TemperatureChangeRateUnit.KilodegreeCelsiusPerSecond, "KilodegreesCelsiusPerSecond", BaseUnits.Undefined), - new UnitInfo(TemperatureChangeRateUnit.MicrodegreeCelsiusPerSecond, "MicrodegreesCelsiusPerSecond", BaseUnits.Undefined), - new UnitInfo(TemperatureChangeRateUnit.MillidegreeCelsiusPerSecond, "MillidegreesCelsiusPerSecond", BaseUnits.Undefined), - new UnitInfo(TemperatureChangeRateUnit.NanodegreeCelsiusPerSecond, "NanodegreesCelsiusPerSecond", BaseUnits.Undefined), + new UnitInfo(TemperatureChangeRateUnit.CentidegreeCelsiusPerSecond, "CentidegreesCelsiusPerSecond", BaseUnits.Undefined, "TemperatureChangeRate"), + new UnitInfo(TemperatureChangeRateUnit.DecadegreeCelsiusPerSecond, "DecadegreesCelsiusPerSecond", BaseUnits.Undefined, "TemperatureChangeRate"), + new UnitInfo(TemperatureChangeRateUnit.DecidegreeCelsiusPerSecond, "DecidegreesCelsiusPerSecond", BaseUnits.Undefined, "TemperatureChangeRate"), + new UnitInfo(TemperatureChangeRateUnit.DegreeCelsiusPerMinute, "DegreesCelsiusPerMinute", BaseUnits.Undefined, "TemperatureChangeRate"), + new UnitInfo(TemperatureChangeRateUnit.DegreeCelsiusPerSecond, "DegreesCelsiusPerSecond", BaseUnits.Undefined, "TemperatureChangeRate"), + new UnitInfo(TemperatureChangeRateUnit.HectodegreeCelsiusPerSecond, "HectodegreesCelsiusPerSecond", BaseUnits.Undefined, "TemperatureChangeRate"), + new UnitInfo(TemperatureChangeRateUnit.KilodegreeCelsiusPerSecond, "KilodegreesCelsiusPerSecond", BaseUnits.Undefined, "TemperatureChangeRate"), + new UnitInfo(TemperatureChangeRateUnit.MicrodegreeCelsiusPerSecond, "MicrodegreesCelsiusPerSecond", BaseUnits.Undefined, "TemperatureChangeRate"), + new UnitInfo(TemperatureChangeRateUnit.MillidegreeCelsiusPerSecond, "MillidegreesCelsiusPerSecond", BaseUnits.Undefined, "TemperatureChangeRate"), + new UnitInfo(TemperatureChangeRateUnit.NanodegreeCelsiusPerSecond, "NanodegreesCelsiusPerSecond", BaseUnits.Undefined, "TemperatureChangeRate"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, TemperatureChangeRateUnit Unit), List>(); } /// @@ -151,11 +146,6 @@ public TemperatureChangeRate(double value, UnitSystem unitSystem) /// public static TemperatureChangeRate AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, TemperatureChangeRateUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -279,7 +269,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(TemperatureChangeRateUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(TemperatureChangeRateUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -289,34 +282,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(TemperatureChangeRateUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(TemperatureChangeRateUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.TemperatureChangeRate"; - var resourceManager = new ResourceManager(resourceName, typeof(TemperatureChangeRate).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -967,9 +933,6 @@ public TemperatureChangeRate ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs index 714d00d3ea..c796909b31 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,22 +65,20 @@ static TemperatureDelta() Info = new QuantityInfo("TemperatureDelta", new UnitInfo[] { - new UnitInfo(TemperatureDeltaUnit.DegreeCelsius, "DegreesCelsius", BaseUnits.Undefined), - new UnitInfo(TemperatureDeltaUnit.DegreeDelisle, "DegreesDelisle", BaseUnits.Undefined), - new UnitInfo(TemperatureDeltaUnit.DegreeFahrenheit, "DegreesFahrenheit", BaseUnits.Undefined), - new UnitInfo(TemperatureDeltaUnit.DegreeNewton, "DegreesNewton", BaseUnits.Undefined), - new UnitInfo(TemperatureDeltaUnit.DegreeRankine, "DegreesRankine", BaseUnits.Undefined), - new UnitInfo(TemperatureDeltaUnit.DegreeReaumur, "DegreesReaumur", BaseUnits.Undefined), - new UnitInfo(TemperatureDeltaUnit.DegreeRoemer, "DegreesRoemer", BaseUnits.Undefined), - new UnitInfo(TemperatureDeltaUnit.Kelvin, "Kelvins", BaseUnits.Undefined), - new UnitInfo(TemperatureDeltaUnit.MillidegreeCelsius, "MillidegreesCelsius", BaseUnits.Undefined), + new UnitInfo(TemperatureDeltaUnit.DegreeCelsius, "DegreesCelsius", BaseUnits.Undefined, "TemperatureDelta"), + new UnitInfo(TemperatureDeltaUnit.DegreeDelisle, "DegreesDelisle", BaseUnits.Undefined, "TemperatureDelta"), + new UnitInfo(TemperatureDeltaUnit.DegreeFahrenheit, "DegreesFahrenheit", BaseUnits.Undefined, "TemperatureDelta"), + new UnitInfo(TemperatureDeltaUnit.DegreeNewton, "DegreesNewton", BaseUnits.Undefined, "TemperatureDelta"), + new UnitInfo(TemperatureDeltaUnit.DegreeRankine, "DegreesRankine", BaseUnits.Undefined, "TemperatureDelta"), + new UnitInfo(TemperatureDeltaUnit.DegreeReaumur, "DegreesReaumur", BaseUnits.Undefined, "TemperatureDelta"), + new UnitInfo(TemperatureDeltaUnit.DegreeRoemer, "DegreesRoemer", BaseUnits.Undefined, "TemperatureDelta"), + new UnitInfo(TemperatureDeltaUnit.Kelvin, "Kelvins", BaseUnits.Undefined, "TemperatureDelta"), + new UnitInfo(TemperatureDeltaUnit.MillidegreeCelsius, "MillidegreesCelsius", BaseUnits.Undefined, "TemperatureDelta"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, TemperatureDeltaUnit Unit), List>(); } /// @@ -150,11 +145,6 @@ public TemperatureDelta(double value, UnitSystem unitSystem) /// public static TemperatureDelta AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, TemperatureDeltaUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -271,7 +261,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(TemperatureDeltaUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(TemperatureDeltaUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -281,34 +274,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(TemperatureDeltaUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(TemperatureDeltaUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.TemperatureDelta"; - var resourceManager = new ResourceManager(resourceName, typeof(TemperatureDelta).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -947,9 +913,6 @@ public TemperatureDelta ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureGradient.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureGradient.g.cs index 31827c6625..b21ee97423 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureGradient.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureGradient.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,17 +65,15 @@ static TemperatureGradient() Info = new QuantityInfo("TemperatureGradient", new UnitInfo[] { - new UnitInfo(TemperatureGradientUnit.DegreeCelsiusPerKilometer, "DegreesCelciusPerKilometer", new BaseUnits(length: LengthUnit.Kilometer, temperature: TemperatureUnit.DegreeCelsius)), - new UnitInfo(TemperatureGradientUnit.DegreeCelsiusPerMeter, "DegreesCelciusPerMeter", new BaseUnits(length: LengthUnit.Meter, temperature: TemperatureUnit.DegreeCelsius)), - new UnitInfo(TemperatureGradientUnit.DegreeFahrenheitPerFoot, "DegreesFahrenheitPerFoot", new BaseUnits(length: LengthUnit.Foot, temperature: TemperatureUnit.DegreeFahrenheit)), - new UnitInfo(TemperatureGradientUnit.KelvinPerMeter, "KelvinsPerMeter", new BaseUnits(length: LengthUnit.Meter, temperature: TemperatureUnit.Kelvin)), + new UnitInfo(TemperatureGradientUnit.DegreeCelsiusPerKilometer, "DegreesCelciusPerKilometer", new BaseUnits(length: LengthUnit.Kilometer, temperature: TemperatureUnit.DegreeCelsius), "TemperatureGradient"), + new UnitInfo(TemperatureGradientUnit.DegreeCelsiusPerMeter, "DegreesCelciusPerMeter", new BaseUnits(length: LengthUnit.Meter, temperature: TemperatureUnit.DegreeCelsius), "TemperatureGradient"), + new UnitInfo(TemperatureGradientUnit.DegreeFahrenheitPerFoot, "DegreesFahrenheitPerFoot", new BaseUnits(length: LengthUnit.Foot, temperature: TemperatureUnit.DegreeFahrenheit), "TemperatureGradient"), + new UnitInfo(TemperatureGradientUnit.KelvinPerMeter, "KelvinsPerMeter", new BaseUnits(length: LengthUnit.Meter, temperature: TemperatureUnit.Kelvin), "TemperatureGradient"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, TemperatureGradientUnit Unit), List>(); } /// @@ -145,11 +140,6 @@ public TemperatureGradient(double value, UnitSystem unitSystem) /// public static TemperatureGradient AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, TemperatureGradientUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -231,7 +221,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(TemperatureGradientUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(TemperatureGradientUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -241,34 +234,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(TemperatureGradientUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(TemperatureGradientUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.TemperatureGradient"; - var resourceManager = new ResourceManager(resourceName, typeof(TemperatureGradient).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -847,9 +813,6 @@ public TemperatureGradient ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs b/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs index 560ac5f106..8897d9aa57 100644 --- a/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -71,15 +68,13 @@ static ThermalConductivity() Info = new QuantityInfo("ThermalConductivity", new UnitInfo[] { - new UnitInfo(ThermalConductivityUnit.BtuPerHourFootFahrenheit, "BtusPerHourFootFahrenheit", BaseUnits.Undefined), - new UnitInfo(ThermalConductivityUnit.WattPerMeterKelvin, "WattsPerMeterKelvin", BaseUnits.Undefined), + new UnitInfo(ThermalConductivityUnit.BtuPerHourFootFahrenheit, "BtusPerHourFootFahrenheit", BaseUnits.Undefined, "ThermalConductivity"), + new UnitInfo(ThermalConductivityUnit.WattPerMeterKelvin, "WattsPerMeterKelvin", BaseUnits.Undefined, "ThermalConductivity"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ThermalConductivityUnit Unit), List>(); } /// @@ -146,11 +141,6 @@ public ThermalConductivity(double value, UnitSystem unitSystem) /// public static ThermalConductivity AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, ThermalConductivityUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -218,7 +208,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ThermalConductivityUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(ThermalConductivityUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -228,34 +221,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ThermalConductivityUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(ThermalConductivityUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ThermalConductivity"; - var resourceManager = new ResourceManager(resourceName, typeof(ThermalConductivity).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -810,9 +776,6 @@ public ThermalConductivity ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs b/UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs index c4fe0850a3..49d6cce283 100644 --- a/UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,19 +65,17 @@ static ThermalResistance() Info = new QuantityInfo("ThermalResistance", new UnitInfo[] { - new UnitInfo(ThermalResistanceUnit.HourSquareFeetDegreeFahrenheitPerBtu, "HourSquareFeetDegreesFahrenheitPerBtu", BaseUnits.Undefined), - new UnitInfo(ThermalResistanceUnit.SquareCentimeterHourDegreeCelsiusPerKilocalorie, "SquareCentimeterHourDegreesCelsiusPerKilocalorie", BaseUnits.Undefined), - new UnitInfo(ThermalResistanceUnit.SquareCentimeterKelvinPerWatt, "SquareCentimeterKelvinsPerWatt", BaseUnits.Undefined), - new UnitInfo(ThermalResistanceUnit.SquareMeterDegreeCelsiusPerWatt, "SquareMeterDegreesCelsiusPerWatt", BaseUnits.Undefined), - new UnitInfo(ThermalResistanceUnit.SquareMeterKelvinPerKilowatt, "SquareMeterKelvinsPerKilowatt", BaseUnits.Undefined), - new UnitInfo(ThermalResistanceUnit.SquareMeterKelvinPerWatt, "SquareMeterKelvinsPerWatt", BaseUnits.Undefined), + new UnitInfo(ThermalResistanceUnit.HourSquareFeetDegreeFahrenheitPerBtu, "HourSquareFeetDegreesFahrenheitPerBtu", BaseUnits.Undefined, "ThermalResistance"), + new UnitInfo(ThermalResistanceUnit.SquareCentimeterHourDegreeCelsiusPerKilocalorie, "SquareCentimeterHourDegreesCelsiusPerKilocalorie", BaseUnits.Undefined, "ThermalResistance"), + new UnitInfo(ThermalResistanceUnit.SquareCentimeterKelvinPerWatt, "SquareCentimeterKelvinsPerWatt", BaseUnits.Undefined, "ThermalResistance"), + new UnitInfo(ThermalResistanceUnit.SquareMeterDegreeCelsiusPerWatt, "SquareMeterDegreesCelsiusPerWatt", BaseUnits.Undefined, "ThermalResistance"), + new UnitInfo(ThermalResistanceUnit.SquareMeterKelvinPerKilowatt, "SquareMeterKelvinsPerKilowatt", BaseUnits.Undefined, "ThermalResistance"), + new UnitInfo(ThermalResistanceUnit.SquareMeterKelvinPerWatt, "SquareMeterKelvinsPerWatt", BaseUnits.Undefined, "ThermalResistance"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, ThermalResistanceUnit Unit), List>(); } /// @@ -147,11 +142,6 @@ public ThermalResistance(double value, UnitSystem unitSystem) /// public static ThermalResistance AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, ThermalResistanceUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -247,7 +237,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(ThermalResistanceUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(ThermalResistanceUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -257,34 +250,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ThermalResistanceUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(ThermalResistanceUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.ThermalResistance"; - var resourceManager = new ResourceManager(resourceName, typeof(ThermalResistance).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -887,9 +853,6 @@ public ThermalResistance ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Torque.g.cs b/UnitsNet/GeneratedCode/Quantities/Torque.g.cs index 1b137506db..efe6012a6a 100644 --- a/UnitsNet/GeneratedCode/Quantities/Torque.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Torque.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,38 +65,36 @@ static Torque() Info = new QuantityInfo("Torque", new UnitInfo[] { - new UnitInfo(TorqueUnit.GramForceCentimeter, "GramForceCentimeters", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.GramForceMeter, "GramForceMeters", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.GramForceMillimeter, "GramForceMillimeters", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.KilogramForceCentimeter, "KilogramForceCentimeters", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.KilogramForceMeter, "KilogramForceMeters", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.KilogramForceMillimeter, "KilogramForceMillimeters", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.KilonewtonCentimeter, "KilonewtonCentimeters", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.KilonewtonMeter, "KilonewtonMeters", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.KilonewtonMillimeter, "KilonewtonMillimeters", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.KilopoundForceFoot, "KilopoundForceFeet", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.KilopoundForceInch, "KilopoundForceInches", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.MeganewtonCentimeter, "MeganewtonCentimeters", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.MeganewtonMeter, "MeganewtonMeters", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.MeganewtonMillimeter, "MeganewtonMillimeters", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.MegapoundForceFoot, "MegapoundForceFeet", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.MegapoundForceInch, "MegapoundForceInches", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.NewtonCentimeter, "NewtonCentimeters", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.NewtonMeter, "NewtonMeters", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.NewtonMillimeter, "NewtonMillimeters", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.PoundalFoot, "PoundalFeet", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.PoundForceFoot, "PoundForceFeet", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.PoundForceInch, "PoundForceInches", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.TonneForceCentimeter, "TonneForceCentimeters", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.TonneForceMeter, "TonneForceMeters", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.TonneForceMillimeter, "TonneForceMillimeters", BaseUnits.Undefined), + new UnitInfo(TorqueUnit.GramForceCentimeter, "GramForceCentimeters", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.GramForceMeter, "GramForceMeters", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.GramForceMillimeter, "GramForceMillimeters", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.KilogramForceCentimeter, "KilogramForceCentimeters", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.KilogramForceMeter, "KilogramForceMeters", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.KilogramForceMillimeter, "KilogramForceMillimeters", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.KilonewtonCentimeter, "KilonewtonCentimeters", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.KilonewtonMeter, "KilonewtonMeters", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.KilonewtonMillimeter, "KilonewtonMillimeters", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.KilopoundForceFoot, "KilopoundForceFeet", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.KilopoundForceInch, "KilopoundForceInches", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.MeganewtonCentimeter, "MeganewtonCentimeters", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.MeganewtonMeter, "MeganewtonMeters", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.MeganewtonMillimeter, "MeganewtonMillimeters", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.MegapoundForceFoot, "MegapoundForceFeet", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.MegapoundForceInch, "MegapoundForceInches", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.NewtonCentimeter, "NewtonCentimeters", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.NewtonMeter, "NewtonMeters", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.NewtonMillimeter, "NewtonMillimeters", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.PoundalFoot, "PoundalFeet", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.PoundForceFoot, "PoundForceFeet", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.PoundForceInch, "PoundForceInches", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.TonneForceCentimeter, "TonneForceCentimeters", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.TonneForceMeter, "TonneForceMeters", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.TonneForceMillimeter, "TonneForceMillimeters", BaseUnits.Undefined, "Torque"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, TorqueUnit Unit), List>(); } /// @@ -166,11 +161,6 @@ public Torque(double value, UnitSystem unitSystem) /// public static Torque AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, TorqueUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -399,7 +389,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(TorqueUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(TorqueUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -409,34 +402,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(TorqueUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(TorqueUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Torque"; - var resourceManager = new ResourceManager(resourceName, typeof(Torque).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -1267,9 +1233,6 @@ public Torque ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/TorquePerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/TorquePerLength.g.cs index 76be1e2209..9f2c0efd01 100644 --- a/UnitsNet/GeneratedCode/Quantities/TorquePerLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TorquePerLength.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,34 +65,32 @@ static TorquePerLength() Info = new QuantityInfo("TorquePerLength", new UnitInfo[] { - new UnitInfo(TorquePerLengthUnit.KilogramForceCentimeterPerMeter, "KilogramForceCentimetersPerMeter", BaseUnits.Undefined), - new UnitInfo(TorquePerLengthUnit.KilogramForceMeterPerMeter, "KilogramForceMetersPerMeter", BaseUnits.Undefined), - new UnitInfo(TorquePerLengthUnit.KilogramForceMillimeterPerMeter, "KilogramForceMillimetersPerMeter", BaseUnits.Undefined), - new UnitInfo(TorquePerLengthUnit.KilonewtonCentimeterPerMeter, "KilonewtonCentimetersPerMeter", BaseUnits.Undefined), - new UnitInfo(TorquePerLengthUnit.KilonewtonMeterPerMeter, "KilonewtonMetersPerMeter", BaseUnits.Undefined), - new UnitInfo(TorquePerLengthUnit.KilonewtonMillimeterPerMeter, "KilonewtonMillimetersPerMeter", BaseUnits.Undefined), - new UnitInfo(TorquePerLengthUnit.KilopoundForceFootPerFoot, "KilopoundForceFeetPerFoot", BaseUnits.Undefined), - new UnitInfo(TorquePerLengthUnit.KilopoundForceInchPerFoot, "KilopoundForceInchesPerFoot", BaseUnits.Undefined), - new UnitInfo(TorquePerLengthUnit.MeganewtonCentimeterPerMeter, "MeganewtonCentimetersPerMeter", BaseUnits.Undefined), - new UnitInfo(TorquePerLengthUnit.MeganewtonMeterPerMeter, "MeganewtonMetersPerMeter", BaseUnits.Undefined), - new UnitInfo(TorquePerLengthUnit.MeganewtonMillimeterPerMeter, "MeganewtonMillimetersPerMeter", BaseUnits.Undefined), - new UnitInfo(TorquePerLengthUnit.MegapoundForceFootPerFoot, "MegapoundForceFeetPerFoot", BaseUnits.Undefined), - new UnitInfo(TorquePerLengthUnit.MegapoundForceInchPerFoot, "MegapoundForceInchesPerFoot", BaseUnits.Undefined), - new UnitInfo(TorquePerLengthUnit.NewtonCentimeterPerMeter, "NewtonCentimetersPerMeter", BaseUnits.Undefined), - new UnitInfo(TorquePerLengthUnit.NewtonMeterPerMeter, "NewtonMetersPerMeter", BaseUnits.Undefined), - new UnitInfo(TorquePerLengthUnit.NewtonMillimeterPerMeter, "NewtonMillimetersPerMeter", BaseUnits.Undefined), - new UnitInfo(TorquePerLengthUnit.PoundForceFootPerFoot, "PoundForceFeetPerFoot", BaseUnits.Undefined), - new UnitInfo(TorquePerLengthUnit.PoundForceInchPerFoot, "PoundForceInchesPerFoot", BaseUnits.Undefined), - new UnitInfo(TorquePerLengthUnit.TonneForceCentimeterPerMeter, "TonneForceCentimetersPerMeter", BaseUnits.Undefined), - new UnitInfo(TorquePerLengthUnit.TonneForceMeterPerMeter, "TonneForceMetersPerMeter", BaseUnits.Undefined), - new UnitInfo(TorquePerLengthUnit.TonneForceMillimeterPerMeter, "TonneForceMillimetersPerMeter", BaseUnits.Undefined), + new UnitInfo(TorquePerLengthUnit.KilogramForceCentimeterPerMeter, "KilogramForceCentimetersPerMeter", BaseUnits.Undefined, "TorquePerLength"), + new UnitInfo(TorquePerLengthUnit.KilogramForceMeterPerMeter, "KilogramForceMetersPerMeter", BaseUnits.Undefined, "TorquePerLength"), + new UnitInfo(TorquePerLengthUnit.KilogramForceMillimeterPerMeter, "KilogramForceMillimetersPerMeter", BaseUnits.Undefined, "TorquePerLength"), + new UnitInfo(TorquePerLengthUnit.KilonewtonCentimeterPerMeter, "KilonewtonCentimetersPerMeter", BaseUnits.Undefined, "TorquePerLength"), + new UnitInfo(TorquePerLengthUnit.KilonewtonMeterPerMeter, "KilonewtonMetersPerMeter", BaseUnits.Undefined, "TorquePerLength"), + new UnitInfo(TorquePerLengthUnit.KilonewtonMillimeterPerMeter, "KilonewtonMillimetersPerMeter", BaseUnits.Undefined, "TorquePerLength"), + new UnitInfo(TorquePerLengthUnit.KilopoundForceFootPerFoot, "KilopoundForceFeetPerFoot", BaseUnits.Undefined, "TorquePerLength"), + new UnitInfo(TorquePerLengthUnit.KilopoundForceInchPerFoot, "KilopoundForceInchesPerFoot", BaseUnits.Undefined, "TorquePerLength"), + new UnitInfo(TorquePerLengthUnit.MeganewtonCentimeterPerMeter, "MeganewtonCentimetersPerMeter", BaseUnits.Undefined, "TorquePerLength"), + new UnitInfo(TorquePerLengthUnit.MeganewtonMeterPerMeter, "MeganewtonMetersPerMeter", BaseUnits.Undefined, "TorquePerLength"), + new UnitInfo(TorquePerLengthUnit.MeganewtonMillimeterPerMeter, "MeganewtonMillimetersPerMeter", BaseUnits.Undefined, "TorquePerLength"), + new UnitInfo(TorquePerLengthUnit.MegapoundForceFootPerFoot, "MegapoundForceFeetPerFoot", BaseUnits.Undefined, "TorquePerLength"), + new UnitInfo(TorquePerLengthUnit.MegapoundForceInchPerFoot, "MegapoundForceInchesPerFoot", BaseUnits.Undefined, "TorquePerLength"), + new UnitInfo(TorquePerLengthUnit.NewtonCentimeterPerMeter, "NewtonCentimetersPerMeter", BaseUnits.Undefined, "TorquePerLength"), + new UnitInfo(TorquePerLengthUnit.NewtonMeterPerMeter, "NewtonMetersPerMeter", BaseUnits.Undefined, "TorquePerLength"), + new UnitInfo(TorquePerLengthUnit.NewtonMillimeterPerMeter, "NewtonMillimetersPerMeter", BaseUnits.Undefined, "TorquePerLength"), + new UnitInfo(TorquePerLengthUnit.PoundForceFootPerFoot, "PoundForceFeetPerFoot", BaseUnits.Undefined, "TorquePerLength"), + new UnitInfo(TorquePerLengthUnit.PoundForceInchPerFoot, "PoundForceInchesPerFoot", BaseUnits.Undefined, "TorquePerLength"), + new UnitInfo(TorquePerLengthUnit.TonneForceCentimeterPerMeter, "TonneForceCentimetersPerMeter", BaseUnits.Undefined, "TorquePerLength"), + new UnitInfo(TorquePerLengthUnit.TonneForceMeterPerMeter, "TonneForceMetersPerMeter", BaseUnits.Undefined, "TorquePerLength"), + new UnitInfo(TorquePerLengthUnit.TonneForceMillimeterPerMeter, "TonneForceMillimetersPerMeter", BaseUnits.Undefined, "TorquePerLength"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, TorquePerLengthUnit Unit), List>(); } /// @@ -162,11 +157,6 @@ public TorquePerLength(double value, UnitSystem unitSystem) /// public static TorquePerLength AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, TorquePerLengthUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -367,7 +357,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(TorquePerLengthUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(TorquePerLengthUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -377,34 +370,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(TorquePerLengthUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(TorquePerLengthUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.TorquePerLength"; - var resourceManager = new ResourceManager(resourceName, typeof(TorquePerLength).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -1187,9 +1153,6 @@ public TorquePerLength ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Turbidity.g.cs b/UnitsNet/GeneratedCode/Quantities/Turbidity.g.cs index 1de23fc87a..3f61baee01 100644 --- a/UnitsNet/GeneratedCode/Quantities/Turbidity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Turbidity.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -71,14 +68,12 @@ static Turbidity() Info = new QuantityInfo("Turbidity", new UnitInfo[] { - new UnitInfo(TurbidityUnit.NTU, "NTU", BaseUnits.Undefined), + new UnitInfo(TurbidityUnit.NTU, "NTU", BaseUnits.Undefined, "Turbidity"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, TurbidityUnit Unit), List>(); } /// @@ -145,11 +140,6 @@ public Turbidity(double value, UnitSystem unitSystem) /// public static Turbidity AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, TurbidityUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -210,7 +200,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(TurbidityUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(TurbidityUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -220,34 +213,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(TurbidityUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(TurbidityUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Turbidity"; - var resourceManager = new ResourceManager(resourceName, typeof(Turbidity).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -790,9 +756,6 @@ public Turbidity ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs b/UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs index 5ecce973fe..6eee6c77b2 100644 --- a/UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,14 +65,12 @@ static VitaminA() Info = new QuantityInfo("VitaminA", new UnitInfo[] { - new UnitInfo(VitaminAUnit.InternationalUnit, "InternationalUnits", BaseUnits.Undefined), + new UnitInfo(VitaminAUnit.InternationalUnit, "InternationalUnits", BaseUnits.Undefined, "VitaminA"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, VitaminAUnit Unit), List>(); } /// @@ -142,11 +137,6 @@ public VitaminA(double value, UnitSystem unitSystem) /// public static VitaminA AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, VitaminAUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -207,7 +197,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(VitaminAUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(VitaminAUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -217,34 +210,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(VitaminAUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(VitaminAUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.VitaminA"; - var resourceManager = new ResourceManager(resourceName, typeof(VitaminA).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -787,9 +753,6 @@ public VitaminA ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/Volume.g.cs b/UnitsNet/GeneratedCode/Quantities/Volume.g.cs index 8f6315a800..0df270efed 100644 --- a/UnitsNet/GeneratedCode/Quantities/Volume.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Volume.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,66 +65,64 @@ static Volume() Info = new QuantityInfo("Volume", new UnitInfo[] { - new UnitInfo(VolumeUnit.AcreFoot, "AcreFeet", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.AuTablespoon, "AuTablespoons", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.BoardFoot, "BoardFeet", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.Centiliter, "Centiliters", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.CubicCentimeter, "CubicCentimeters", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.CubicDecimeter, "CubicDecimeters", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.CubicFoot, "CubicFeet", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.CubicHectometer, "CubicHectometers", new BaseUnits(length: LengthUnit.Hectometer)), - new UnitInfo(VolumeUnit.CubicInch, "CubicInches", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.CubicKilometer, "CubicKilometers", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.CubicMeter, "CubicMeters", new BaseUnits(length: LengthUnit.Meter)), - new UnitInfo(VolumeUnit.CubicMicrometer, "CubicMicrometers", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.CubicMile, "CubicMiles", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.CubicMillimeter, "CubicMillimeters", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.CubicYard, "CubicYards", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.Decaliter, "Decaliters", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.DecausGallon, "DecausGallons", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.Deciliter, "Deciliters", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.DeciusGallon, "DeciusGallons", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.HectocubicFoot, "HectocubicFeet", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.HectocubicMeter, "HectocubicMeters", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.Hectoliter, "Hectoliters", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.HectousGallon, "HectousGallons", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.ImperialBeerBarrel, "ImperialBeerBarrels", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.ImperialGallon, "ImperialGallons", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.ImperialOunce, "ImperialOunces", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.ImperialPint, "ImperialPints", new BaseUnits(length: LengthUnit.Decimeter)), - new UnitInfo(VolumeUnit.KilocubicFoot, "KilocubicFeet", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.KilocubicMeter, "KilocubicMeters", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.KiloimperialGallon, "KiloimperialGallons", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.Kiloliter, "Kiloliters", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.KilousGallon, "KilousGallons", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.Liter, "Liters", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.MegacubicFoot, "MegacubicFeet", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.MegaimperialGallon, "MegaimperialGallons", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.Megaliter, "Megaliters", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.MegausGallon, "MegausGallons", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.MetricCup, "MetricCups", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.MetricTeaspoon, "MetricTeaspoons", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.Microliter, "Microliters", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.Milliliter, "Milliliters", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.Nanoliter, "Nanoliters", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.OilBarrel, "OilBarrels", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.UkTablespoon, "UkTablespoons", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.UsBeerBarrel, "UsBeerBarrels", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.UsCustomaryCup, "UsCustomaryCups", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.UsGallon, "UsGallons", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.UsLegalCup, "UsLegalCups", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.UsOunce, "UsOunces", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.UsPint, "UsPints", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.UsQuart, "UsQuarts", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.UsTablespoon, "UsTablespoons", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.UsTeaspoon, "UsTeaspoons", BaseUnits.Undefined), + new UnitInfo(VolumeUnit.AcreFoot, "AcreFeet", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.AuTablespoon, "AuTablespoons", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.BoardFoot, "BoardFeet", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.Centiliter, "Centiliters", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.CubicCentimeter, "CubicCentimeters", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.CubicDecimeter, "CubicDecimeters", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.CubicFoot, "CubicFeet", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.CubicHectometer, "CubicHectometers", new BaseUnits(length: LengthUnit.Hectometer), "Volume"), + new UnitInfo(VolumeUnit.CubicInch, "CubicInches", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.CubicKilometer, "CubicKilometers", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.CubicMeter, "CubicMeters", new BaseUnits(length: LengthUnit.Meter), "Volume"), + new UnitInfo(VolumeUnit.CubicMicrometer, "CubicMicrometers", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.CubicMile, "CubicMiles", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.CubicMillimeter, "CubicMillimeters", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.CubicYard, "CubicYards", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.Decaliter, "Decaliters", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.DecausGallon, "DecausGallons", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.Deciliter, "Deciliters", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.DeciusGallon, "DeciusGallons", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.HectocubicFoot, "HectocubicFeet", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.HectocubicMeter, "HectocubicMeters", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.Hectoliter, "Hectoliters", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.HectousGallon, "HectousGallons", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.ImperialBeerBarrel, "ImperialBeerBarrels", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.ImperialGallon, "ImperialGallons", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.ImperialOunce, "ImperialOunces", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.ImperialPint, "ImperialPints", new BaseUnits(length: LengthUnit.Decimeter), "Volume"), + new UnitInfo(VolumeUnit.KilocubicFoot, "KilocubicFeet", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.KilocubicMeter, "KilocubicMeters", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.KiloimperialGallon, "KiloimperialGallons", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.Kiloliter, "Kiloliters", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.KilousGallon, "KilousGallons", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.Liter, "Liters", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.MegacubicFoot, "MegacubicFeet", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.MegaimperialGallon, "MegaimperialGallons", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.Megaliter, "Megaliters", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.MegausGallon, "MegausGallons", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.MetricCup, "MetricCups", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.MetricTeaspoon, "MetricTeaspoons", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.Microliter, "Microliters", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.Milliliter, "Milliliters", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.Nanoliter, "Nanoliters", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.OilBarrel, "OilBarrels", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.UkTablespoon, "UkTablespoons", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.UsBeerBarrel, "UsBeerBarrels", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.UsCustomaryCup, "UsCustomaryCups", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.UsGallon, "UsGallons", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.UsLegalCup, "UsLegalCups", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.UsOunce, "UsOunces", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.UsPint, "UsPints", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.UsQuart, "UsQuarts", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.UsTablespoon, "UsTablespoons", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.UsTeaspoon, "UsTeaspoons", BaseUnits.Undefined, "Volume"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, VolumeUnit Unit), List>(); } /// @@ -194,11 +189,6 @@ public Volume(double value, UnitSystem unitSystem) /// public static Volume AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, VolumeUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -623,7 +613,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(VolumeUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(VolumeUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -633,34 +626,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(VolumeUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(VolumeUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.Volume"; - var resourceManager = new ResourceManager(resourceName, typeof(Volume).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -1827,9 +1793,6 @@ public Volume ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs index 335e7099dd..93925f077c 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -71,33 +68,31 @@ static VolumeConcentration() Info = new QuantityInfo("VolumeConcentration", new UnitInfo[] { - new UnitInfo(VolumeConcentrationUnit.CentilitersPerLiter, "CentilitersPerLiter", BaseUnits.Undefined), - new UnitInfo(VolumeConcentrationUnit.CentilitersPerMililiter, "CentilitersPerMililiter", BaseUnits.Undefined), - new UnitInfo(VolumeConcentrationUnit.DecilitersPerLiter, "DecilitersPerLiter", BaseUnits.Undefined), - new UnitInfo(VolumeConcentrationUnit.DecilitersPerMililiter, "DecilitersPerMililiter", BaseUnits.Undefined), - new UnitInfo(VolumeConcentrationUnit.DecimalFraction, "DecimalFractions", BaseUnits.Undefined), - new UnitInfo(VolumeConcentrationUnit.LitersPerLiter, "LitersPerLiter", BaseUnits.Undefined), - new UnitInfo(VolumeConcentrationUnit.LitersPerMililiter, "LitersPerMililiter", BaseUnits.Undefined), - new UnitInfo(VolumeConcentrationUnit.MicrolitersPerLiter, "MicrolitersPerLiter", BaseUnits.Undefined), - new UnitInfo(VolumeConcentrationUnit.MicrolitersPerMililiter, "MicrolitersPerMililiter", BaseUnits.Undefined), - new UnitInfo(VolumeConcentrationUnit.MillilitersPerLiter, "MillilitersPerLiter", BaseUnits.Undefined), - new UnitInfo(VolumeConcentrationUnit.MillilitersPerMililiter, "MillilitersPerMililiter", BaseUnits.Undefined), - new UnitInfo(VolumeConcentrationUnit.NanolitersPerLiter, "NanolitersPerLiter", BaseUnits.Undefined), - new UnitInfo(VolumeConcentrationUnit.NanolitersPerMililiter, "NanolitersPerMililiter", BaseUnits.Undefined), - new UnitInfo(VolumeConcentrationUnit.PartPerBillion, "PartsPerBillion", BaseUnits.Undefined), - new UnitInfo(VolumeConcentrationUnit.PartPerMillion, "PartsPerMillion", BaseUnits.Undefined), - new UnitInfo(VolumeConcentrationUnit.PartPerThousand, "PartsPerThousand", BaseUnits.Undefined), - new UnitInfo(VolumeConcentrationUnit.PartPerTrillion, "PartsPerTrillion", BaseUnits.Undefined), - new UnitInfo(VolumeConcentrationUnit.Percent, "Percent", BaseUnits.Undefined), - new UnitInfo(VolumeConcentrationUnit.PicolitersPerLiter, "PicolitersPerLiter", BaseUnits.Undefined), - new UnitInfo(VolumeConcentrationUnit.PicolitersPerMililiter, "PicolitersPerMililiter", BaseUnits.Undefined), + new UnitInfo(VolumeConcentrationUnit.CentilitersPerLiter, "CentilitersPerLiter", BaseUnits.Undefined, "VolumeConcentration"), + new UnitInfo(VolumeConcentrationUnit.CentilitersPerMililiter, "CentilitersPerMililiter", BaseUnits.Undefined, "VolumeConcentration"), + new UnitInfo(VolumeConcentrationUnit.DecilitersPerLiter, "DecilitersPerLiter", BaseUnits.Undefined, "VolumeConcentration"), + new UnitInfo(VolumeConcentrationUnit.DecilitersPerMililiter, "DecilitersPerMililiter", BaseUnits.Undefined, "VolumeConcentration"), + new UnitInfo(VolumeConcentrationUnit.DecimalFraction, "DecimalFractions", BaseUnits.Undefined, "VolumeConcentration"), + new UnitInfo(VolumeConcentrationUnit.LitersPerLiter, "LitersPerLiter", BaseUnits.Undefined, "VolumeConcentration"), + new UnitInfo(VolumeConcentrationUnit.LitersPerMililiter, "LitersPerMililiter", BaseUnits.Undefined, "VolumeConcentration"), + new UnitInfo(VolumeConcentrationUnit.MicrolitersPerLiter, "MicrolitersPerLiter", BaseUnits.Undefined, "VolumeConcentration"), + new UnitInfo(VolumeConcentrationUnit.MicrolitersPerMililiter, "MicrolitersPerMililiter", BaseUnits.Undefined, "VolumeConcentration"), + new UnitInfo(VolumeConcentrationUnit.MillilitersPerLiter, "MillilitersPerLiter", BaseUnits.Undefined, "VolumeConcentration"), + new UnitInfo(VolumeConcentrationUnit.MillilitersPerMililiter, "MillilitersPerMililiter", BaseUnits.Undefined, "VolumeConcentration"), + new UnitInfo(VolumeConcentrationUnit.NanolitersPerLiter, "NanolitersPerLiter", BaseUnits.Undefined, "VolumeConcentration"), + new UnitInfo(VolumeConcentrationUnit.NanolitersPerMililiter, "NanolitersPerMililiter", BaseUnits.Undefined, "VolumeConcentration"), + new UnitInfo(VolumeConcentrationUnit.PartPerBillion, "PartsPerBillion", BaseUnits.Undefined, "VolumeConcentration"), + new UnitInfo(VolumeConcentrationUnit.PartPerMillion, "PartsPerMillion", BaseUnits.Undefined, "VolumeConcentration"), + new UnitInfo(VolumeConcentrationUnit.PartPerThousand, "PartsPerThousand", BaseUnits.Undefined, "VolumeConcentration"), + new UnitInfo(VolumeConcentrationUnit.PartPerTrillion, "PartsPerTrillion", BaseUnits.Undefined, "VolumeConcentration"), + new UnitInfo(VolumeConcentrationUnit.Percent, "Percent", BaseUnits.Undefined, "VolumeConcentration"), + new UnitInfo(VolumeConcentrationUnit.PicolitersPerLiter, "PicolitersPerLiter", BaseUnits.Undefined, "VolumeConcentration"), + new UnitInfo(VolumeConcentrationUnit.PicolitersPerMililiter, "PicolitersPerMililiter", BaseUnits.Undefined, "VolumeConcentration"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, VolumeConcentrationUnit Unit), List>(); } /// @@ -164,11 +159,6 @@ public VolumeConcentration(double value, UnitSystem unitSystem) /// public static VolumeConcentration AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, VolumeConcentrationUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -362,7 +352,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(VolumeConcentrationUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(VolumeConcentrationUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -372,34 +365,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(VolumeConcentrationUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(VolumeConcentrationUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.VolumeConcentration"; - var resourceManager = new ResourceManager(resourceName, typeof(VolumeConcentration).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -1170,9 +1136,6 @@ public VolumeConcentration ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs index a7dd064068..53b014108d 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,78 +65,76 @@ static VolumeFlow() Info = new QuantityInfo("VolumeFlow", new UnitInfo[] { - new UnitInfo(VolumeFlowUnit.AcreFootPerDay, "AcreFeetPerDay", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.AcreFootPerHour, "AcreFeetPerHour", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.AcreFootPerMinute, "AcreFeetPerMinute", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.AcreFootPerSecond, "AcreFeetPerSecond", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.CentiliterPerDay, "CentilitersPerDay", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.CentiliterPerHour, "CentilitersPerHour", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.CentiliterPerMinute, "CentilitersPerMinute", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.CentiliterPerSecond, "CentilitersPerSecond", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.CubicCentimeterPerMinute, "CubicCentimetersPerMinute", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.CubicDecimeterPerMinute, "CubicDecimetersPerMinute", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.CubicFootPerHour, "CubicFeetPerHour", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.CubicFootPerMinute, "CubicFeetPerMinute", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.CubicFootPerSecond, "CubicFeetPerSecond", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.CubicMeterPerDay, "CubicMetersPerDay", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.CubicMeterPerHour, "CubicMetersPerHour", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.CubicMeterPerMinute, "CubicMetersPerMinute", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.CubicMeterPerSecond, "CubicMetersPerSecond", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.CubicMillimeterPerSecond, "CubicMillimetersPerSecond", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.CubicYardPerDay, "CubicYardsPerDay", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.CubicYardPerHour, "CubicYardsPerHour", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.CubicYardPerMinute, "CubicYardsPerMinute", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.CubicYardPerSecond, "CubicYardsPerSecond", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.DeciliterPerDay, "DecilitersPerDay", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.DeciliterPerHour, "DecilitersPerHour", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.DeciliterPerMinute, "DecilitersPerMinute", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.DeciliterPerSecond, "DecilitersPerSecond", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.KiloliterPerDay, "KilolitersPerDay", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.KiloliterPerHour, "KilolitersPerHour", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.KiloliterPerMinute, "KilolitersPerMinute", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.KiloliterPerSecond, "KilolitersPerSecond", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.KilousGallonPerMinute, "KilousGallonsPerMinute", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.LiterPerDay, "LitersPerDay", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.LiterPerHour, "LitersPerHour", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.LiterPerMinute, "LitersPerMinute", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.LiterPerSecond, "LitersPerSecond", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.MegaliterPerDay, "MegalitersPerDay", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.MegaliterPerHour, "MegalitersPerHour", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.MegaliterPerMinute, "MegalitersPerMinute", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.MegaliterPerSecond, "MegalitersPerSecond", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.MegaukGallonPerSecond, "MegaukGallonsPerSecond", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.MicroliterPerDay, "MicrolitersPerDay", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.MicroliterPerHour, "MicrolitersPerHour", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.MicroliterPerMinute, "MicrolitersPerMinute", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.MicroliterPerSecond, "MicrolitersPerSecond", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.MilliliterPerDay, "MillilitersPerDay", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.MilliliterPerHour, "MillilitersPerHour", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.MilliliterPerMinute, "MillilitersPerMinute", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.MilliliterPerSecond, "MillilitersPerSecond", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.MillionUsGallonPerDay, "MillionUsGallonsPerDay", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.NanoliterPerDay, "NanolitersPerDay", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.NanoliterPerHour, "NanolitersPerHour", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.NanoliterPerMinute, "NanolitersPerMinute", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.NanoliterPerSecond, "NanolitersPerSecond", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.OilBarrelPerDay, "OilBarrelsPerDay", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.OilBarrelPerHour, "OilBarrelsPerHour", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.OilBarrelPerMinute, "OilBarrelsPerMinute", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.OilBarrelPerSecond, "OilBarrelsPerSecond", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.UkGallonPerDay, "UkGallonsPerDay", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.UkGallonPerHour, "UkGallonsPerHour", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.UkGallonPerMinute, "UkGallonsPerMinute", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.UkGallonPerSecond, "UkGallonsPerSecond", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.UsGallonPerDay, "UsGallonsPerDay", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.UsGallonPerHour, "UsGallonsPerHour", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.UsGallonPerMinute, "UsGallonsPerMinute", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.UsGallonPerSecond, "UsGallonsPerSecond", BaseUnits.Undefined), + new UnitInfo(VolumeFlowUnit.AcreFootPerDay, "AcreFeetPerDay", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.AcreFootPerHour, "AcreFeetPerHour", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.AcreFootPerMinute, "AcreFeetPerMinute", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.AcreFootPerSecond, "AcreFeetPerSecond", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.CentiliterPerDay, "CentilitersPerDay", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.CentiliterPerHour, "CentilitersPerHour", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.CentiliterPerMinute, "CentilitersPerMinute", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.CentiliterPerSecond, "CentilitersPerSecond", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.CubicCentimeterPerMinute, "CubicCentimetersPerMinute", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.CubicDecimeterPerMinute, "CubicDecimetersPerMinute", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.CubicFootPerHour, "CubicFeetPerHour", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.CubicFootPerMinute, "CubicFeetPerMinute", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.CubicFootPerSecond, "CubicFeetPerSecond", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.CubicMeterPerDay, "CubicMetersPerDay", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.CubicMeterPerHour, "CubicMetersPerHour", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.CubicMeterPerMinute, "CubicMetersPerMinute", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.CubicMeterPerSecond, "CubicMetersPerSecond", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.CubicMillimeterPerSecond, "CubicMillimetersPerSecond", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.CubicYardPerDay, "CubicYardsPerDay", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.CubicYardPerHour, "CubicYardsPerHour", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.CubicYardPerMinute, "CubicYardsPerMinute", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.CubicYardPerSecond, "CubicYardsPerSecond", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.DeciliterPerDay, "DecilitersPerDay", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.DeciliterPerHour, "DecilitersPerHour", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.DeciliterPerMinute, "DecilitersPerMinute", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.DeciliterPerSecond, "DecilitersPerSecond", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.KiloliterPerDay, "KilolitersPerDay", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.KiloliterPerHour, "KilolitersPerHour", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.KiloliterPerMinute, "KilolitersPerMinute", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.KiloliterPerSecond, "KilolitersPerSecond", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.KilousGallonPerMinute, "KilousGallonsPerMinute", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.LiterPerDay, "LitersPerDay", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.LiterPerHour, "LitersPerHour", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.LiterPerMinute, "LitersPerMinute", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.LiterPerSecond, "LitersPerSecond", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.MegaliterPerDay, "MegalitersPerDay", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.MegaliterPerHour, "MegalitersPerHour", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.MegaliterPerMinute, "MegalitersPerMinute", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.MegaliterPerSecond, "MegalitersPerSecond", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.MegaukGallonPerSecond, "MegaukGallonsPerSecond", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.MicroliterPerDay, "MicrolitersPerDay", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.MicroliterPerHour, "MicrolitersPerHour", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.MicroliterPerMinute, "MicrolitersPerMinute", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.MicroliterPerSecond, "MicrolitersPerSecond", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.MilliliterPerDay, "MillilitersPerDay", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.MilliliterPerHour, "MillilitersPerHour", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.MilliliterPerMinute, "MillilitersPerMinute", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.MilliliterPerSecond, "MillilitersPerSecond", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.MillionUsGallonPerDay, "MillionUsGallonsPerDay", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.NanoliterPerDay, "NanolitersPerDay", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.NanoliterPerHour, "NanolitersPerHour", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.NanoliterPerMinute, "NanolitersPerMinute", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.NanoliterPerSecond, "NanolitersPerSecond", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.OilBarrelPerDay, "OilBarrelsPerDay", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.OilBarrelPerHour, "OilBarrelsPerHour", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.OilBarrelPerMinute, "OilBarrelsPerMinute", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.OilBarrelPerSecond, "OilBarrelsPerSecond", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.UkGallonPerDay, "UkGallonsPerDay", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.UkGallonPerHour, "UkGallonsPerHour", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.UkGallonPerMinute, "UkGallonsPerMinute", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.UkGallonPerSecond, "UkGallonsPerSecond", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.UsGallonPerDay, "UsGallonsPerDay", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.UsGallonPerHour, "UsGallonsPerHour", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.UsGallonPerMinute, "UsGallonsPerMinute", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.UsGallonPerSecond, "UsGallonsPerSecond", BaseUnits.Undefined, "VolumeFlow"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, VolumeFlowUnit Unit), List>(); } /// @@ -206,11 +201,6 @@ public VolumeFlow(double value, UnitSystem unitSystem) /// public static VolumeFlow AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, VolumeFlowUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -719,7 +709,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(VolumeFlowUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(VolumeFlowUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -729,34 +722,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(VolumeFlowUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(VolumeFlowUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.VolumeFlow"; - var resourceManager = new ResourceManager(resourceName, typeof(VolumeFlow).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -2067,9 +2033,6 @@ public VolumeFlow ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/VolumeFlowPerArea.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumeFlowPerArea.g.cs index dde92b5adb..3910853b1a 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumeFlowPerArea.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumeFlowPerArea.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,15 +65,13 @@ static VolumeFlowPerArea() Info = new QuantityInfo("VolumeFlowPerArea", new UnitInfo[] { - new UnitInfo(VolumeFlowPerAreaUnit.CubicFootPerMinutePerSquareFoot, "CubicFeetPerMinutePerSquareFoot", new BaseUnits(length: LengthUnit.Foot, time: DurationUnit.Minute)), - new UnitInfo(VolumeFlowPerAreaUnit.CubicMeterPerSecondPerSquareMeter, "CubicMetersPerSecondPerSquareMeter", new BaseUnits(length: LengthUnit.Meter, time: DurationUnit.Second)), + new UnitInfo(VolumeFlowPerAreaUnit.CubicFootPerMinutePerSquareFoot, "CubicFeetPerMinutePerSquareFoot", new BaseUnits(length: LengthUnit.Foot, time: DurationUnit.Minute), "VolumeFlowPerArea"), + new UnitInfo(VolumeFlowPerAreaUnit.CubicMeterPerSecondPerSquareMeter, "CubicMetersPerSecondPerSquareMeter", new BaseUnits(length: LengthUnit.Meter, time: DurationUnit.Second), "VolumeFlowPerArea"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, VolumeFlowPerAreaUnit Unit), List>(); } /// @@ -143,11 +138,6 @@ public VolumeFlowPerArea(double value, UnitSystem unitSystem) /// public static VolumeFlowPerArea AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, VolumeFlowPerAreaUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -215,7 +205,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(VolumeFlowPerAreaUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(VolumeFlowPerAreaUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -225,34 +218,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(VolumeFlowPerAreaUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(VolumeFlowPerAreaUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.VolumeFlowPerArea"; - var resourceManager = new ResourceManager(resourceName, typeof(VolumeFlowPerArea).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -807,9 +773,6 @@ public VolumeFlowPerArea ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs index 593ee71135..9adec94240 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,20 +65,18 @@ static VolumePerLength() Info = new QuantityInfo("VolumePerLength", new UnitInfo[] { - new UnitInfo(VolumePerLengthUnit.CubicMeterPerMeter, "CubicMetersPerMeter", new BaseUnits(length: LengthUnit.Meter)), - new UnitInfo(VolumePerLengthUnit.CubicYardPerFoot, "CubicYardsPerFoot", BaseUnits.Undefined), - new UnitInfo(VolumePerLengthUnit.CubicYardPerUsSurveyFoot, "CubicYardsPerUsSurveyFoot", BaseUnits.Undefined), - new UnitInfo(VolumePerLengthUnit.LiterPerKilometer, "LitersPerKilometer", BaseUnits.Undefined), - new UnitInfo(VolumePerLengthUnit.LiterPerMeter, "LitersPerMeter", new BaseUnits(length: LengthUnit.Decimeter)), - new UnitInfo(VolumePerLengthUnit.LiterPerMillimeter, "LitersPerMillimeter", BaseUnits.Undefined), - new UnitInfo(VolumePerLengthUnit.OilBarrelPerFoot, "OilBarrelsPerFoot", BaseUnits.Undefined), + new UnitInfo(VolumePerLengthUnit.CubicMeterPerMeter, "CubicMetersPerMeter", new BaseUnits(length: LengthUnit.Meter), "VolumePerLength"), + new UnitInfo(VolumePerLengthUnit.CubicYardPerFoot, "CubicYardsPerFoot", BaseUnits.Undefined, "VolumePerLength"), + new UnitInfo(VolumePerLengthUnit.CubicYardPerUsSurveyFoot, "CubicYardsPerUsSurveyFoot", BaseUnits.Undefined, "VolumePerLength"), + new UnitInfo(VolumePerLengthUnit.LiterPerKilometer, "LitersPerKilometer", BaseUnits.Undefined, "VolumePerLength"), + new UnitInfo(VolumePerLengthUnit.LiterPerMeter, "LitersPerMeter", new BaseUnits(length: LengthUnit.Decimeter), "VolumePerLength"), + new UnitInfo(VolumePerLengthUnit.LiterPerMillimeter, "LitersPerMillimeter", BaseUnits.Undefined, "VolumePerLength"), + new UnitInfo(VolumePerLengthUnit.OilBarrelPerFoot, "OilBarrelsPerFoot", BaseUnits.Undefined, "VolumePerLength"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, VolumePerLengthUnit Unit), List>(); } /// @@ -148,11 +143,6 @@ public VolumePerLength(double value, UnitSystem unitSystem) /// public static VolumePerLength AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, VolumePerLengthUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -255,7 +245,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(VolumePerLengthUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(VolumePerLengthUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -265,34 +258,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(VolumePerLengthUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(VolumePerLengthUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.VolumePerLength"; - var resourceManager = new ResourceManager(resourceName, typeof(VolumePerLength).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -907,9 +873,6 @@ public VolumePerLength ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs index 67229f06f7..580b224d99 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -71,22 +68,20 @@ static VolumetricHeatCapacity() Info = new QuantityInfo("VolumetricHeatCapacity", new UnitInfo[] { - new UnitInfo(VolumetricHeatCapacityUnit.BtuPerCubicFootDegreeFahrenheit, "BtusPerCubicFootDegreeFahrenheit", BaseUnits.Undefined), - new UnitInfo(VolumetricHeatCapacityUnit.CaloriePerCubicCentimeterDegreeCelsius, "CaloriesPerCubicCentimeterDegreeCelsius", BaseUnits.Undefined), - new UnitInfo(VolumetricHeatCapacityUnit.JoulePerCubicMeterDegreeCelsius, "JoulesPerCubicMeterDegreeCelsius", BaseUnits.Undefined), - new UnitInfo(VolumetricHeatCapacityUnit.JoulePerCubicMeterKelvin, "JoulesPerCubicMeterKelvin", BaseUnits.Undefined), - new UnitInfo(VolumetricHeatCapacityUnit.KilocaloriePerCubicCentimeterDegreeCelsius, "KilocaloriesPerCubicCentimeterDegreeCelsius", BaseUnits.Undefined), - new UnitInfo(VolumetricHeatCapacityUnit.KilojoulePerCubicMeterDegreeCelsius, "KilojoulesPerCubicMeterDegreeCelsius", BaseUnits.Undefined), - new UnitInfo(VolumetricHeatCapacityUnit.KilojoulePerCubicMeterKelvin, "KilojoulesPerCubicMeterKelvin", BaseUnits.Undefined), - new UnitInfo(VolumetricHeatCapacityUnit.MegajoulePerCubicMeterDegreeCelsius, "MegajoulesPerCubicMeterDegreeCelsius", BaseUnits.Undefined), - new UnitInfo(VolumetricHeatCapacityUnit.MegajoulePerCubicMeterKelvin, "MegajoulesPerCubicMeterKelvin", BaseUnits.Undefined), + new UnitInfo(VolumetricHeatCapacityUnit.BtuPerCubicFootDegreeFahrenheit, "BtusPerCubicFootDegreeFahrenheit", BaseUnits.Undefined, "VolumetricHeatCapacity"), + new UnitInfo(VolumetricHeatCapacityUnit.CaloriePerCubicCentimeterDegreeCelsius, "CaloriesPerCubicCentimeterDegreeCelsius", BaseUnits.Undefined, "VolumetricHeatCapacity"), + new UnitInfo(VolumetricHeatCapacityUnit.JoulePerCubicMeterDegreeCelsius, "JoulesPerCubicMeterDegreeCelsius", BaseUnits.Undefined, "VolumetricHeatCapacity"), + new UnitInfo(VolumetricHeatCapacityUnit.JoulePerCubicMeterKelvin, "JoulesPerCubicMeterKelvin", BaseUnits.Undefined, "VolumetricHeatCapacity"), + new UnitInfo(VolumetricHeatCapacityUnit.KilocaloriePerCubicCentimeterDegreeCelsius, "KilocaloriesPerCubicCentimeterDegreeCelsius", BaseUnits.Undefined, "VolumetricHeatCapacity"), + new UnitInfo(VolumetricHeatCapacityUnit.KilojoulePerCubicMeterDegreeCelsius, "KilojoulesPerCubicMeterDegreeCelsius", BaseUnits.Undefined, "VolumetricHeatCapacity"), + new UnitInfo(VolumetricHeatCapacityUnit.KilojoulePerCubicMeterKelvin, "KilojoulesPerCubicMeterKelvin", BaseUnits.Undefined, "VolumetricHeatCapacity"), + new UnitInfo(VolumetricHeatCapacityUnit.MegajoulePerCubicMeterDegreeCelsius, "MegajoulesPerCubicMeterDegreeCelsius", BaseUnits.Undefined, "VolumetricHeatCapacity"), + new UnitInfo(VolumetricHeatCapacityUnit.MegajoulePerCubicMeterKelvin, "MegajoulesPerCubicMeterKelvin", BaseUnits.Undefined, "VolumetricHeatCapacity"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, VolumetricHeatCapacityUnit Unit), List>(); } /// @@ -153,11 +148,6 @@ public VolumetricHeatCapacity(double value, UnitSystem unitSystem) /// public static VolumetricHeatCapacity AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, VolumetricHeatCapacityUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -274,7 +264,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(VolumetricHeatCapacityUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(VolumetricHeatCapacityUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -284,34 +277,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(VolumetricHeatCapacityUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(VolumetricHeatCapacityUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.VolumetricHeatCapacity"; - var resourceManager = new ResourceManager(resourceName, typeof(VolumetricHeatCapacity).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -950,9 +916,6 @@ public VolumetricHeatCapacity ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs b/UnitsNet/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs index 9643e784d9..598212c09f 100644 --- a/UnitsNet/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs @@ -18,12 +18,9 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Resources; using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -68,19 +65,17 @@ static WarpingMomentOfInertia() Info = new QuantityInfo("WarpingMomentOfInertia", new UnitInfo[] { - new UnitInfo(WarpingMomentOfInertiaUnit.CentimeterToTheSixth, "CentimetersToTheSixth", new BaseUnits(length: LengthUnit.Centimeter)), - new UnitInfo(WarpingMomentOfInertiaUnit.DecimeterToTheSixth, "DecimetersToTheSixth", new BaseUnits(length: LengthUnit.Decimeter)), - new UnitInfo(WarpingMomentOfInertiaUnit.FootToTheSixth, "FeetToTheSixth", new BaseUnits(length: LengthUnit.Foot)), - new UnitInfo(WarpingMomentOfInertiaUnit.InchToTheSixth, "InchesToTheSixth", new BaseUnits(length: LengthUnit.Inch)), - new UnitInfo(WarpingMomentOfInertiaUnit.MeterToTheSixth, "MetersToTheSixth", new BaseUnits(length: LengthUnit.Meter)), - new UnitInfo(WarpingMomentOfInertiaUnit.MillimeterToTheSixth, "MillimetersToTheSixth", new BaseUnits(length: LengthUnit.Millimeter)), + new UnitInfo(WarpingMomentOfInertiaUnit.CentimeterToTheSixth, "CentimetersToTheSixth", new BaseUnits(length: LengthUnit.Centimeter), "WarpingMomentOfInertia"), + new UnitInfo(WarpingMomentOfInertiaUnit.DecimeterToTheSixth, "DecimetersToTheSixth", new BaseUnits(length: LengthUnit.Decimeter), "WarpingMomentOfInertia"), + new UnitInfo(WarpingMomentOfInertiaUnit.FootToTheSixth, "FeetToTheSixth", new BaseUnits(length: LengthUnit.Foot), "WarpingMomentOfInertia"), + new UnitInfo(WarpingMomentOfInertiaUnit.InchToTheSixth, "InchesToTheSixth", new BaseUnits(length: LengthUnit.Inch), "WarpingMomentOfInertia"), + new UnitInfo(WarpingMomentOfInertiaUnit.MeterToTheSixth, "MetersToTheSixth", new BaseUnits(length: LengthUnit.Meter), "WarpingMomentOfInertia"), + new UnitInfo(WarpingMomentOfInertiaUnit.MillimeterToTheSixth, "MillimetersToTheSixth", new BaseUnits(length: LengthUnit.Millimeter), "WarpingMomentOfInertia"), }, BaseUnit, Zero, BaseDimensions); DefaultConversionFunctions = new UnitConverter(); RegisterDefaultConversions(DefaultConversionFunctions); - - Abbreviations = new ConcurrentDictionary<(CultureInfo Culture, WarpingMomentOfInertiaUnit Unit), List>(); } /// @@ -147,11 +142,6 @@ public WarpingMomentOfInertia(double value, UnitSystem unitSystem) /// public static WarpingMomentOfInertia AdditiveIdentity => Zero; - /// - /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. - /// - public static IDictionary<(CultureInfo Culture, WarpingMomentOfInertiaUnit Unit), List> Abbreviations { get; } - #endregion #region Properties @@ -247,7 +237,10 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - public static string GetAbbreviation(WarpingMomentOfInertiaUnit unit) => GetAbbreviation(unit, null); + public static string GetAbbreviation(WarpingMomentOfInertiaUnit unit) + { + return GetAbbreviation(unit, null); + } /// /// Get unit abbreviation string. @@ -257,34 +250,7 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(WarpingMomentOfInertiaUnit unit, IFormatProvider? provider) { - return GetAbbreviations(unit, provider as CultureInfo).FirstOrDefault() ?? string.Empty; - } - - /// - /// - /// - /// - /// - /// - public static IReadOnlyList GetAbbreviations(WarpingMomentOfInertiaUnit unit, CultureInfo? culture = null) - { - culture ??= CultureInfo.CurrentCulture; - - if(!Abbreviations.TryGetValue((culture, unit), out var abbreviations)) - { - abbreviations = new List(); - - const string resourceName = $"UnitsNet.GeneratedCode.Resources.WarpingMomentOfInertia"; - var resourceManager = new ResourceManager(resourceName, typeof(WarpingMomentOfInertia).Assembly); - - var abbreviationsString = resourceManager.GetString(unit.ToString(), culture); - if(abbreviationsString is not null) - abbreviations.AddRange(abbreviationsString.Split(',')); - - Abbreviations.Add((culture, unit), abbreviations); - } - - return abbreviations; + return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); } #endregion @@ -887,9 +853,6 @@ public WarpingMomentOfInertia ToUnit(UnitSystem unitSystem) #endregion - /// - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => GetAbbreviations(Unit, culture); - #region ToString Methods /// diff --git a/UnitsNet/GeneratedCode/Resources/Acceleration.restext b/UnitsNet/GeneratedCode/Resources/Acceleration.restext index 69f3ccefbf..064bd76836 100644 --- a/UnitsNet/GeneratedCode/Resources/Acceleration.restext +++ b/UnitsNet/GeneratedCode/Resources/Acceleration.restext @@ -1,14 +1,14 @@ -CentimeterPerSecondSquared=cm/s² -DecimeterPerSecondSquared=dm/s² -FootPerSecondSquared=ft/s² -InchPerSecondSquared=in/s² -KilometerPerSecondSquared=km/s² -KnotPerHour=kn/h -KnotPerMinute=kn/min -KnotPerSecond=kn/s -MeterPerSecondSquared=m/s² -MicrometerPerSecondSquared=µm/s² -MillimeterPerSecondSquared=mm/s² +CentimetersPerSecondSquared=cm/s² +DecimetersPerSecondSquared=dm/s² +FeetPerSecondSquared=ft/s² +InchesPerSecondSquared=in/s² +KilometersPerSecondSquared=km/s² +KnotsPerHour=kn/h +KnotsPerMinute=kn/min +KnotsPerSecond=kn/s +MetersPerSecondSquared=m/s² +MicrometersPerSecondSquared=µm/s² +MillimetersPerSecondSquared=mm/s² MillistandardGravity=mg -NanometerPerSecondSquared=nm/s² +NanometersPerSecondSquared=nm/s² StandardGravity=g diff --git a/UnitsNet/GeneratedCode/Resources/Acceleration.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Acceleration.ru-RU.restext index dd35dc9172..56c372a2c1 100644 --- a/UnitsNet/GeneratedCode/Resources/Acceleration.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Acceleration.ru-RU.restext @@ -1,14 +1,14 @@ -CentimeterPerSecondSquared=см/с² -DecimeterPerSecondSquared=дм/с² -FootPerSecondSquared=фут/с² -InchPerSecondSquared=дюйм/с² -KilometerPerSecondSquared=км/с² -KnotPerHour=узел/час -KnotPerMinute=узел/мин -KnotPerSecond=узел/с -MeterPerSecondSquared=м/с² -MicrometerPerSecondSquared=мкм/с² -MillimeterPerSecondSquared=мм/с² +CentimetersPerSecondSquared=см/с² +DecimetersPerSecondSquared=дм/с² +FeetPerSecondSquared=фут/с² +InchesPerSecondSquared=дюйм/с² +KilometersPerSecondSquared=км/с² +KnotsPerHour=узел/час +KnotsPerMinute=узел/мин +KnotsPerSecond=узел/с +MetersPerSecondSquared=м/с² +MicrometersPerSecondSquared=мкм/с² +MillimetersPerSecondSquared=мм/с² MillistandardGravity=мg -NanometerPerSecondSquared=нм/с² +NanometersPerSecondSquared=нм/с² StandardGravity=g diff --git a/UnitsNet/GeneratedCode/Resources/AmountOfSubstance.restext b/UnitsNet/GeneratedCode/Resources/AmountOfSubstance.restext index dfc38b060d..4023dee429 100644 --- a/UnitsNet/GeneratedCode/Resources/AmountOfSubstance.restext +++ b/UnitsNet/GeneratedCode/Resources/AmountOfSubstance.restext @@ -1,15 +1,15 @@ -Centimole=cmol -CentipoundMole=clbmol -Decimole=dmol -DecipoundMole=dlbmol -Kilomole=kmol -KilopoundMole=klbmol -Megamole=Mmol -Micromole=µmol -MicropoundMole=µlbmol -Millimole=mmol -MillipoundMole=mlbmol -Mole=mol -Nanomole=nmol -NanopoundMole=nlbmol -PoundMole=lbmol +Centimoles=cmol +CentipoundMoles=clbmol +Decimoles=dmol +DecipoundMoles=dlbmol +Kilomoles=kmol +KilopoundMoles=klbmol +Megamoles=Mmol +Micromoles=µmol +MicropoundMoles=µlbmol +Millimoles=mmol +MillipoundMoles=mlbmol +Moles=mol +Nanomoles=nmol +NanopoundMoles=nlbmol +PoundMoles=lbmol diff --git a/UnitsNet/GeneratedCode/Resources/AmplitudeRatio.restext b/UnitsNet/GeneratedCode/Resources/AmplitudeRatio.restext index bb18e275dc..c9d99ad6e8 100644 --- a/UnitsNet/GeneratedCode/Resources/AmplitudeRatio.restext +++ b/UnitsNet/GeneratedCode/Resources/AmplitudeRatio.restext @@ -1,4 +1,4 @@ -DecibelMicrovolt=dBµV -DecibelMillivolt=dBmV -DecibelUnloaded=dBu -DecibelVolt=dBV +DecibelMicrovolts=dBµV +DecibelMillivolts=dBmV +DecibelsUnloaded=dBu +DecibelVolts=dBV diff --git a/UnitsNet/GeneratedCode/Resources/Angle.restext b/UnitsNet/GeneratedCode/Resources/Angle.restext index e95a202bfd..ea36ba2023 100644 --- a/UnitsNet/GeneratedCode/Resources/Angle.restext +++ b/UnitsNet/GeneratedCode/Resources/Angle.restext @@ -1,16 +1,16 @@ -Arcminute=',arcmin,amin,min -Arcsecond=″,arcsec,asec,sec -Centiradian=crad -Deciradian=drad -Degree=°,deg -Gradian=g -Microdegree=µ°,µdeg -Microradian=µrad -Millidegree=m°,mdeg -Milliradian=mrad -Nanodegree=n°,ndeg -Nanoradian=nrad -NatoMil=mil -Radian=rad -Revolution=r +Arcminutes=',arcmin,amin,min +Arcseconds=″,arcsec,asec,sec +Centiradians=crad +Deciradians=drad +Degrees=°,deg +Gradians=g +Microdegrees=µ°,µdeg +Microradians=µrad +Millidegrees=m°,mdeg +Milliradians=mrad +Nanodegrees=n°,ndeg +Nanoradians=nrad +NatoMils=mil +Radians=rad +Revolutions=r Tilt=sin(θ) diff --git a/UnitsNet/GeneratedCode/Resources/Angle.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Angle.ru-RU.restext index 4d2c71960c..bfbaf9913e 100644 --- a/UnitsNet/GeneratedCode/Resources/Angle.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Angle.ru-RU.restext @@ -1,12 +1,12 @@ -Centiradian=срад -Deciradian=драд -Degree=° -Gradian=g -Microdegree=мк° -Microradian=мкрад -Millidegree=м° -Milliradian=мрад -Nanodegree=н° -Nanoradian=нрад -Radian=рад -Revolution=r +Centiradians=срад +Deciradians=драд +Degrees=° +Gradians=g +Microdegrees=мк° +Microradians=мкрад +Millidegrees=м° +Milliradians=мрад +Nanodegrees=н° +Nanoradians=нрад +Radians=рад +Revolutions=r diff --git a/UnitsNet/GeneratedCode/Resources/ApparentEnergy.restext b/UnitsNet/GeneratedCode/Resources/ApparentEnergy.restext index bc7123747b..8042321934 100644 --- a/UnitsNet/GeneratedCode/Resources/ApparentEnergy.restext +++ b/UnitsNet/GeneratedCode/Resources/ApparentEnergy.restext @@ -1,3 +1,3 @@ -KilovoltampereHour=kVAh -MegavoltampereHour=MVAh -VoltampereHour=VAh +KilovoltampereHours=kVAh +MegavoltampereHours=MVAh +VoltampereHours=VAh diff --git a/UnitsNet/GeneratedCode/Resources/ApparentPower.restext b/UnitsNet/GeneratedCode/Resources/ApparentPower.restext index a59c422c66..fa9f53f44c 100644 --- a/UnitsNet/GeneratedCode/Resources/ApparentPower.restext +++ b/UnitsNet/GeneratedCode/Resources/ApparentPower.restext @@ -1,6 +1,6 @@ -Gigavoltampere=GVA -Kilovoltampere=kVA -Megavoltampere=MVA -Microvoltampere=µVA -Millivoltampere=mVA -Voltampere=VA +Gigavoltamperes=GVA +Kilovoltamperes=kVA +Megavoltamperes=MVA +Microvoltamperes=µVA +Millivoltamperes=mVA +Voltamperes=VA diff --git a/UnitsNet/GeneratedCode/Resources/Area.restext b/UnitsNet/GeneratedCode/Resources/Area.restext index 92c87f24d6..4523655fdc 100644 --- a/UnitsNet/GeneratedCode/Resources/Area.restext +++ b/UnitsNet/GeneratedCode/Resources/Area.restext @@ -1,14 +1,14 @@ -Acre=ac -Hectare=ha -SquareCentimeter=cm² -SquareDecimeter=dm² -SquareFoot=ft² -SquareInch=in² -SquareKilometer=km² -SquareMeter=m² -SquareMicrometer=µm² -SquareMile=mi² -SquareMillimeter=mm² -SquareNauticalMile=nmi² -SquareYard=yd² -UsSurveySquareFoot=ft² (US) +Acres=ac +Hectares=ha +SquareCentimeters=cm² +SquareDecimeters=dm² +SquareFeet=ft² +SquareInches=in² +SquareKilometers=km² +SquareMeters=m² +SquareMicrometers=µm² +SquareMiles=mi² +SquareMillimeters=mm² +SquareNauticalMiles=nmi² +SquareYards=yd² +UsSurveySquareFeet=ft² (US) diff --git a/UnitsNet/GeneratedCode/Resources/Area.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Area.ru-RU.restext index 6359baa179..f2a1d12a6c 100644 --- a/UnitsNet/GeneratedCode/Resources/Area.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Area.ru-RU.restext @@ -1,14 +1,14 @@ -Acre=акр -Hectare=га -SquareCentimeter=см² -SquareDecimeter=дм² -SquareFoot=фут² -SquareInch=дюйм² -SquareKilometer=км² -SquareMeter=м² -SquareMicrometer=мкм² -SquareMile=миля² -SquareMillimeter=мм² -SquareNauticalMile=морск.миля² -SquareYard=ярд² -UsSurveySquareFoot=фут² (US) +Acres=акр +Hectares=га +SquareCentimeters=см² +SquareDecimeters=дм² +SquareFeet=фут² +SquareInches=дюйм² +SquareKilometers=км² +SquareMeters=м² +SquareMicrometers=мкм² +SquareMiles=миля² +SquareMillimeters=мм² +SquareNauticalMiles=морск.миля² +SquareYards=ярд² +UsSurveySquareFeet=фут² (US) diff --git a/UnitsNet/GeneratedCode/Resources/Area.zh-CN.restext b/UnitsNet/GeneratedCode/Resources/Area.zh-CN.restext index 8dd2e77c7d..75b1e89228 100644 --- a/UnitsNet/GeneratedCode/Resources/Area.zh-CN.restext +++ b/UnitsNet/GeneratedCode/Resources/Area.zh-CN.restext @@ -1,13 +1,13 @@ -Acre=英亩 -Hectare=英亩 -SquareCentimeter=平方厘米 -SquareDecimeter=平方分米 -SquareFoot=平方英尺 -SquareInch=平方英寸 -SquareKilometer=平方公里 -SquareMeter=平方米 -SquareMicrometer=平方微米 -SquareMile=平方英里 -SquareMillimeter=平方毫米 -SquareNauticalMile=平方海里 -SquareYard=平方码 +Acres=英亩 +Hectares=英亩 +SquareCentimeters=平方厘米 +SquareDecimeters=平方分米 +SquareFeet=平方英尺 +SquareInches=平方英寸 +SquareKilometers=平方公里 +SquareMeters=平方米 +SquareMicrometers=平方微米 +SquareMiles=平方英里 +SquareMillimeters=平方毫米 +SquareNauticalMiles=平方海里 +SquareYards=平方码 diff --git a/UnitsNet/GeneratedCode/Resources/AreaDensity.restext b/UnitsNet/GeneratedCode/Resources/AreaDensity.restext index d9b69f9ab7..6a33618aa9 100644 --- a/UnitsNet/GeneratedCode/Resources/AreaDensity.restext +++ b/UnitsNet/GeneratedCode/Resources/AreaDensity.restext @@ -1,3 +1,3 @@ -GramPerSquareMeter=g/m²,gsm -KilogramPerSquareMeter=kg/m² -MilligramPerSquareMeter=mg/m² +GramsPerSquareMeter=g/m²,gsm +KilogramsPerSquareMeter=kg/m² +MilligramsPerSquareMeter=mg/m² diff --git a/UnitsNet/GeneratedCode/Resources/AreaMomentOfInertia.restext b/UnitsNet/GeneratedCode/Resources/AreaMomentOfInertia.restext index af72e156b3..5c66899ab8 100644 --- a/UnitsNet/GeneratedCode/Resources/AreaMomentOfInertia.restext +++ b/UnitsNet/GeneratedCode/Resources/AreaMomentOfInertia.restext @@ -1,6 +1,6 @@ -CentimeterToTheFourth=cm⁴,cm^4 -DecimeterToTheFourth=dm⁴,dm^4 -FootToTheFourth=ft⁴,ft^4 -InchToTheFourth=in⁴,in^4 -MeterToTheFourth=m⁴,m^4 -MillimeterToTheFourth=mm⁴,mm^4 +CentimetersToTheFourth=cm⁴,cm^4 +DecimetersToTheFourth=dm⁴,dm^4 +FeetToTheFourth=ft⁴,ft^4 +InchesToTheFourth=in⁴,in^4 +MetersToTheFourth=m⁴,m^4 +MillimetersToTheFourth=mm⁴,mm^4 diff --git a/UnitsNet/GeneratedCode/Resources/BitRate.restext b/UnitsNet/GeneratedCode/Resources/BitRate.restext index 7e08163427..c88dd8c809 100644 --- a/UnitsNet/GeneratedCode/Resources/BitRate.restext +++ b/UnitsNet/GeneratedCode/Resources/BitRate.restext @@ -1,26 +1,26 @@ -BitPerSecond=bit/s,bps -BytePerSecond=B/s -ExabitPerSecond=Ebit/s,Ebps -ExabytePerSecond=EB/s -ExbibitPerSecond=Eibit/s,Eibps -ExbibytePerSecond=EiB/s -GibibitPerSecond=Gibit/s,Gibps -GibibytePerSecond=GiB/s -GigabitPerSecond=Gbit/s,Gbps -GigabytePerSecond=GB/s -KibibitPerSecond=Kibit/s,Kibps -KibibytePerSecond=KiB/s -KilobitPerSecond=kbit/s,kbps -KilobytePerSecond=kB/s -MebibitPerSecond=Mibit/s,Mibps -MebibytePerSecond=MiB/s -MegabitPerSecond=Mbit/s,Mbps -MegabytePerSecond=MB/s -PebibitPerSecond=Pibit/s,Pibps -PebibytePerSecond=PiB/s -PetabitPerSecond=Pbit/s,Pbps -PetabytePerSecond=PB/s -TebibitPerSecond=Tibit/s,Tibps -TebibytePerSecond=TiB/s -TerabitPerSecond=Tbit/s,Tbps -TerabytePerSecond=TB/s +BitsPerSecond=bit/s,bps +BytesPerSecond=B/s +ExabitsPerSecond=Ebit/s,Ebps +ExabytesPerSecond=EB/s +ExbibitsPerSecond=Eibit/s,Eibps +ExbibytesPerSecond=EiB/s +GibibitsPerSecond=Gibit/s,Gibps +GibibytesPerSecond=GiB/s +GigabitsPerSecond=Gbit/s,Gbps +GigabytesPerSecond=GB/s +KibibitsPerSecond=Kibit/s,Kibps +KibibytesPerSecond=KiB/s +KilobitsPerSecond=kbit/s,kbps +KilobytesPerSecond=kB/s +MebibitsPerSecond=Mibit/s,Mibps +MebibytesPerSecond=MiB/s +MegabitsPerSecond=Mbit/s,Mbps +MegabytesPerSecond=MB/s +PebibitsPerSecond=Pibit/s,Pibps +PebibytesPerSecond=PiB/s +PetabitsPerSecond=Pbit/s,Pbps +PetabytesPerSecond=PB/s +TebibitsPerSecond=Tibit/s,Tibps +TebibytesPerSecond=TiB/s +TerabitsPerSecond=Tbit/s,Tbps +TerabytesPerSecond=TB/s diff --git a/UnitsNet/GeneratedCode/Resources/BrakeSpecificFuelConsumption.restext b/UnitsNet/GeneratedCode/Resources/BrakeSpecificFuelConsumption.restext index c9f0ed2141..1e1d41fcef 100644 --- a/UnitsNet/GeneratedCode/Resources/BrakeSpecificFuelConsumption.restext +++ b/UnitsNet/GeneratedCode/Resources/BrakeSpecificFuelConsumption.restext @@ -1,3 +1,3 @@ -GramPerKiloWattHour=g/kWh -KilogramPerJoule=kg/J -PoundPerMechanicalHorsepowerHour=lb/hph +GramsPerKiloWattHour=g/kWh +KilogramsPerJoule=kg/J +PoundsPerMechanicalHorsepowerHour=lb/hph diff --git a/UnitsNet/GeneratedCode/Resources/Capacitance.restext b/UnitsNet/GeneratedCode/Resources/Capacitance.restext index 376405fd41..dff2eb0e40 100644 --- a/UnitsNet/GeneratedCode/Resources/Capacitance.restext +++ b/UnitsNet/GeneratedCode/Resources/Capacitance.restext @@ -1,7 +1,7 @@ -Farad=F -Kilofarad=kF -Megafarad=MF -Microfarad=µF -Millifarad=mF -Nanofarad=nF -Picofarad=pF +Farads=F +Kilofarads=kF +Megafarads=MF +Microfarads=µF +Millifarads=mF +Nanofarads=nF +Picofarads=pF diff --git a/UnitsNet/GeneratedCode/Resources/Compressibility.restext b/UnitsNet/GeneratedCode/Resources/Compressibility.restext index 2463f0563c..28c11e2b14 100644 --- a/UnitsNet/GeneratedCode/Resources/Compressibility.restext +++ b/UnitsNet/GeneratedCode/Resources/Compressibility.restext @@ -1,7 +1,7 @@ -InverseAtmosphere=atm⁻¹,1/atm -InverseBar=bar⁻¹,1/bar -InverseKilopascal=kPa⁻¹,1/kPa -InverseMegapascal=MPa⁻¹,1/MPa -InverseMillibar=mbar⁻¹,1/mbar -InversePascal=Pa⁻¹,1/Pa -InversePoundForcePerSquareInch=psi⁻¹,1/psi +InverseAtmospheres=atm⁻¹,1/atm +InverseBars=bar⁻¹,1/bar +InverseKilopascals=kPa⁻¹,1/kPa +InverseMegapascals=MPa⁻¹,1/MPa +InverseMillibars=mbar⁻¹,1/mbar +InversePascals=Pa⁻¹,1/Pa +InversePoundsForcePerSquareInch=psi⁻¹,1/psi diff --git a/UnitsNet/GeneratedCode/Resources/Density.restext b/UnitsNet/GeneratedCode/Resources/Density.restext index 81efd2e0ee..d2a222cc08 100644 --- a/UnitsNet/GeneratedCode/Resources/Density.restext +++ b/UnitsNet/GeneratedCode/Resources/Density.restext @@ -1,51 +1,51 @@ -CentigramPerDeciliter=cg/dl -CentigramPerLiter=cg/L -CentigramPerMilliliter=cg/ml -DecigramPerDeciliter=dg/dl -DecigramPerLiter=dg/L -DecigramPerMilliliter=dg/ml -GramPerCubicCentimeter=g/cm³ -GramPerCubicFoot=g/ft³ -GramPerCubicInch=g/in³ -GramPerCubicMeter=g/m³ -GramPerCubicMillimeter=g/mm³ -GramPerDeciliter=g/dl -GramPerLiter=g/L -GramPerMilliliter=g/ml -KilogramPerCubicCentimeter=kg/cm³ -KilogramPerCubicMeter=kg/m³ -KilogramPerCubicMillimeter=kg/mm³ -KilogramPerLiter=kg/l -KilopoundPerCubicFoot=kip/ft³ -KilopoundPerCubicInch=kip/in³ -MicrogramPerCubicMeter=µg/m³ -MicrogramPerDeciliter=µg/dl -MicrogramPerLiter=µg/L -MicrogramPerMilliliter=µg/ml -MilligramPerCubicMeter=mg/m³ -MilligramPerDeciliter=mg/dl -MilligramPerLiter=mg/L -MilligramPerMilliliter=mg/ml -NanogramPerDeciliter=ng/dl -NanogramPerLiter=ng/L -NanogramPerMilliliter=ng/ml -PicogramPerDeciliter=pg/dl -PicogramPerLiter=pg/L -PicogramPerMilliliter=pg/ml -PoundPerCubicCentimeter=lb/cm³ -PoundPerCubicFoot=lb/ft³ -PoundPerCubicInch=lb/in³ -PoundPerCubicMeter=lb/m³ -PoundPerCubicMillimeter=lb/mm³ -PoundPerImperialGallon=ppg (imp.) -PoundPerUSGallon=ppg (U.S.) -SlugPerCubicCentimeter=slug/cm³ -SlugPerCubicFoot=slug/ft³ -SlugPerCubicInch=slug/in³ -SlugPerCubicMeter=slug/m³ -SlugPerCubicMillimeter=slug/mm³ -TonnePerCubicCentimeter=t/cm³ -TonnePerCubicFoot=t/ft³ -TonnePerCubicInch=t/in³ -TonnePerCubicMeter=t/m³ -TonnePerCubicMillimeter=t/mm³ +CentigramsPerDeciLiter=cg/dl +CentigramsPerLiter=cg/L +CentigramsPerMilliliter=cg/ml +DecigramsPerDeciLiter=dg/dl +DecigramsPerLiter=dg/L +DecigramsPerMilliliter=dg/ml +GramsPerCubicCentimeter=g/cm³ +GramsPerCubicFoot=g/ft³ +GramsPerCubicInch=g/in³ +GramsPerCubicMeter=g/m³ +GramsPerCubicMillimeter=g/mm³ +GramsPerDeciLiter=g/dl +GramsPerLiter=g/L +GramsPerMilliliter=g/ml +KilogramsPerCubicCentimeter=kg/cm³ +KilogramsPerCubicMeter=kg/m³ +KilogramsPerCubicMillimeter=kg/mm³ +KilogramsPerLiter=kg/l +KilopoundsPerCubicFoot=kip/ft³ +KilopoundsPerCubicInch=kip/in³ +MicrogramsPerCubicMeter=µg/m³ +MicrogramsPerDeciLiter=µg/dl +MicrogramsPerLiter=µg/L +MicrogramsPerMilliliter=µg/ml +MilligramsPerCubicMeter=mg/m³ +MilligramsPerDeciLiter=mg/dl +MilligramsPerLiter=mg/L +MilligramsPerMilliliter=mg/ml +NanogramsPerDeciLiter=ng/dl +NanogramsPerLiter=ng/L +NanogramsPerMilliliter=ng/ml +PicogramsPerDeciLiter=pg/dl +PicogramsPerLiter=pg/L +PicogramsPerMilliliter=pg/ml +PoundsPerCubicCentimeter=lb/cm³ +PoundsPerCubicFoot=lb/ft³ +PoundsPerCubicInch=lb/in³ +PoundsPerCubicMeter=lb/m³ +PoundsPerCubicMillimeter=lb/mm³ +PoundsPerImperialGallon=ppg (imp.) +PoundsPerUSGallon=ppg (U.S.) +SlugsPerCubicCentimeter=slug/cm³ +SlugsPerCubicFoot=slug/ft³ +SlugsPerCubicInch=slug/in³ +SlugsPerCubicMeter=slug/m³ +SlugsPerCubicMillimeter=slug/mm³ +TonnesPerCubicCentimeter=t/cm³ +TonnesPerCubicFoot=t/ft³ +TonnesPerCubicInch=t/in³ +TonnesPerCubicMeter=t/m³ +TonnesPerCubicMillimeter=t/mm³ diff --git a/UnitsNet/GeneratedCode/Resources/Density.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Density.ru-RU.restext index fbe5dcd91e..cf9e285a11 100644 --- a/UnitsNet/GeneratedCode/Resources/Density.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Density.ru-RU.restext @@ -1,4 +1,4 @@ -GramPerCubicMeter=г/м³ -KilogramPerCubicMeter=кг/м³ -MicrogramPerCubicMeter=мкг/м³ -MilligramPerCubicMeter=мг/м³ +GramsPerCubicMeter=г/м³ +KilogramsPerCubicMeter=кг/м³ +MicrogramsPerCubicMeter=мкг/м³ +MilligramsPerCubicMeter=мг/м³ diff --git a/UnitsNet/GeneratedCode/Resources/Duration.restext b/UnitsNet/GeneratedCode/Resources/Duration.restext index ad9e1f2be0..c19e7a317e 100644 --- a/UnitsNet/GeneratedCode/Resources/Duration.restext +++ b/UnitsNet/GeneratedCode/Resources/Duration.restext @@ -1,11 +1,11 @@ -Day=d,day,days -Hour=h,hr,hrs,hour,hours -JulianYear=jyr,jyear,jyears -Microsecond=µs,µsec,µsecs,µsecond,µseconds -Millisecond=ms,msec,msecs,msecond,mseconds -Minute=m,min,minute,minutes -Month30=mo,month,months -Nanosecond=ns,nsec,nsecs,nsecond,nseconds -Second=s,sec,secs,second,seconds -Week=wk,week,weeks -Year365=yr,year,years +Days=d,day,days +Hours=h,hr,hrs,hour,hours +JulianYears=jyr,jyear,jyears +Microseconds=µs,µsec,µsecs,µsecond,µseconds +Milliseconds=ms,msec,msecs,msecond,mseconds +Minutes=m,min,minute,minutes +Months30=mo,month,months +Nanoseconds=ns,nsec,nsecs,nsecond,nseconds +Seconds=s,sec,secs,second,seconds +Weeks=wk,week,weeks +Years365=yr,year,years diff --git a/UnitsNet/GeneratedCode/Resources/Duration.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Duration.ru-RU.restext index 0dede1d00b..ed11b09eba 100644 --- a/UnitsNet/GeneratedCode/Resources/Duration.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Duration.ru-RU.restext @@ -1,10 +1,10 @@ -Day=сут,д -Hour=ч,час -Microsecond=мксек,мкс -Millisecond=мсек,мс -Minute=мин -Month30=месяц -Nanosecond=нсек,нс -Second=сек,с -Week=нед -Year365=год +Days=сут,д +Hours=ч,час +Microseconds=мксек,мкс +Milliseconds=мсек,мс +Minutes=мин +Months30=месяц +Nanoseconds=нсек,нс +Seconds=сек,с +Weeks=нед +Years365=год diff --git a/UnitsNet/GeneratedCode/Resources/DynamicViscosity.restext b/UnitsNet/GeneratedCode/Resources/DynamicViscosity.restext index e5c5fb2167..b3f1ca08f3 100644 --- a/UnitsNet/GeneratedCode/Resources/DynamicViscosity.restext +++ b/UnitsNet/GeneratedCode/Resources/DynamicViscosity.restext @@ -1,10 +1,10 @@ Centipoise=cP -MicropascalSecond=µPa·s,µPaS -MillipascalSecond=mPa·s,mPaS -NewtonSecondPerMeterSquared=Ns/m² -PascalSecond=Pa·s,PaS +MicropascalSeconds=µPa·s,µPaS +MillipascalSeconds=mPa·s,mPaS +NewtonSecondsPerMeterSquared=Ns/m² +PascalSeconds=Pa·s,PaS Poise=P -PoundForceSecondPerSquareFoot=lbf·s/ft² -PoundForceSecondPerSquareInch=lbf·s/in² -PoundPerFootSecond=lb/ft·s -Reyn=reyn +PoundsForceSecondPerSquareFoot=lbf·s/ft² +PoundsForceSecondPerSquareInch=lbf·s/in² +PoundsPerFootSecond=lb/ft·s +Reyns=reyn diff --git a/UnitsNet/GeneratedCode/Resources/ElectricCharge.restext b/UnitsNet/GeneratedCode/Resources/ElectricCharge.restext index 5c20939fa2..35a944cdf5 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricCharge.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricCharge.restext @@ -1,11 +1,11 @@ -AmpereHour=A-h,Ah -Coulomb=C -KiloampereHour=kA-h,kAh -Kilocoulomb=kC -MegaampereHour=MA-h,MAh -Megacoulomb=MC -Microcoulomb=µC -MilliampereHour=mA-h,mAh -Millicoulomb=mC -Nanocoulomb=nC -Picocoulomb=pC +AmpereHours=A-h,Ah +Coulombs=C +KiloampereHours=kA-h,kAh +Kilocoulombs=kC +MegaampereHours=MA-h,MAh +Megacoulombs=MC +Microcoulombs=µC +MilliampereHours=mA-h,mAh +Millicoulombs=mC +Nanocoulombs=nC +Picocoulombs=pC diff --git a/UnitsNet/GeneratedCode/Resources/ElectricChargeDensity.restext b/UnitsNet/GeneratedCode/Resources/ElectricChargeDensity.restext index a956cab450..58bfdcecbf 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricChargeDensity.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricChargeDensity.restext @@ -1 +1 @@ -CoulombPerCubicMeter=C/m³ +CoulombsPerCubicMeter=C/m³ diff --git a/UnitsNet/GeneratedCode/Resources/ElectricCurrent.restext b/UnitsNet/GeneratedCode/Resources/ElectricCurrent.restext index f9354eb517..20ffbec406 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricCurrent.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricCurrent.restext @@ -1,9 +1,9 @@ -Ampere=A -Centiampere=cA -Femtoampere=fA -Kiloampere=kA -Megaampere=MA -Microampere=µA -Milliampere=mA -Nanoampere=nA -Picoampere=pA +Amperes=A +Centiamperes=cA +Femtoamperes=fA +Kiloamperes=kA +Megaamperes=MA +Microamperes=µA +Milliamperes=mA +Nanoamperes=nA +Picoamperes=pA diff --git a/UnitsNet/GeneratedCode/Resources/ElectricCurrentDensity.restext b/UnitsNet/GeneratedCode/Resources/ElectricCurrentDensity.restext index 2f8f890e31..5bd15cfde2 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricCurrentDensity.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricCurrentDensity.restext @@ -1,3 +1,3 @@ -AmperePerSquareFoot=A/ft² -AmperePerSquareInch=A/in² -AmperePerSquareMeter=A/m² +AmperesPerSquareFoot=A/ft² +AmperesPerSquareInch=A/in² +AmperesPerSquareMeter=A/m² diff --git a/UnitsNet/GeneratedCode/Resources/ElectricCurrentGradient.restext b/UnitsNet/GeneratedCode/Resources/ElectricCurrentGradient.restext index df2a4dd81f..4a4fb09d25 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricCurrentGradient.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricCurrentGradient.restext @@ -1,4 +1,4 @@ -AmperePerMicrosecond=A/μs -AmperePerMillisecond=A/ms -AmperePerNanosecond=A/ns -AmperePerSecond=A/s +AmperesPerMicrosecond=A/μs +AmperesPerMillisecond=A/ms +AmperesPerNanosecond=A/ns +AmperesPerSecond=A/s diff --git a/UnitsNet/GeneratedCode/Resources/ElectricField.restext b/UnitsNet/GeneratedCode/Resources/ElectricField.restext index 0a66b5d3be..f9b731f326 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricField.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricField.restext @@ -1 +1 @@ -VoltPerMeter=V/m +VoltsPerMeter=V/m diff --git a/UnitsNet/GeneratedCode/Resources/ElectricInductance.restext b/UnitsNet/GeneratedCode/Resources/ElectricInductance.restext index b17dfe78c1..b09917f74c 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricInductance.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricInductance.restext @@ -1,5 +1,5 @@ -Henry=H -Microhenry=µH -Millihenry=mH -Nanohenry=nH -Picohenry=pH +Henries=H +Microhenries=µH +Millihenries=mH +Nanohenries=nH +Picohenries=pH diff --git a/UnitsNet/GeneratedCode/Resources/ElectricPotential.restext b/UnitsNet/GeneratedCode/Resources/ElectricPotential.restext index b9d89cf767..35b7f58afc 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricPotential.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricPotential.restext @@ -1,6 +1,6 @@ -Kilovolt=kV -Megavolt=MV -Microvolt=µV -Millivolt=mV -Nanovolt=nV -Volt=V +Kilovolts=kV +Megavolts=MV +Microvolts=µV +Millivolts=mV +Nanovolts=nV +Volts=V diff --git a/UnitsNet/GeneratedCode/Resources/ElectricPotential.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/ElectricPotential.ru-RU.restext index 3529a78323..fd594210ed 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricPotential.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricPotential.ru-RU.restext @@ -1,6 +1,6 @@ -Kilovolt=кВ -Megavolt=МВ -Microvolt=мкВ -Millivolt=мВ -Nanovolt=нВ -Volt=В +Kilovolts=кВ +Megavolts=МВ +Microvolts=мкВ +Millivolts=мВ +Nanovolts=нВ +Volts=В diff --git a/UnitsNet/GeneratedCode/Resources/ElectricPotentialAc.restext b/UnitsNet/GeneratedCode/Resources/ElectricPotentialAc.restext index 3d714e0990..e2c2b53e63 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricPotentialAc.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricPotentialAc.restext @@ -1,5 +1,5 @@ -KilovoltAc=kVac -MegavoltAc=MVac -MicrovoltAc=µVac -MillivoltAc=mVac -VoltAc=Vac +KilovoltsAc=kVac +MegavoltsAc=MVac +MicrovoltsAc=µVac +MillivoltsAc=mVac +VoltsAc=Vac diff --git a/UnitsNet/GeneratedCode/Resources/ElectricPotentialChangeRate.restext b/UnitsNet/GeneratedCode/Resources/ElectricPotentialChangeRate.restext index 85496aa3ec..23e9c0726c 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricPotentialChangeRate.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricPotentialChangeRate.restext @@ -1,20 +1,20 @@ -KilovoltPerHour=kV/h -KilovoltPerMicrosecond=kV/μs -KilovoltPerMinute=kV/min -KilovoltPerSecond=kV/s -MegavoltPerHour=MV/h -MegavoltPerMicrosecond=MV/μs -MegavoltPerMinute=MV/min -MegavoltPerSecond=MV/s -MicrovoltPerHour=µV/h -MicrovoltPerMicrosecond=µV/μs -MicrovoltPerMinute=µV/min -MicrovoltPerSecond=µV/s -MillivoltPerHour=mV/h -MillivoltPerMicrosecond=mV/μs -MillivoltPerMinute=mV/min -MillivoltPerSecond=mV/s -VoltPerHour=V/h -VoltPerMicrosecond=V/μs -VoltPerMinute=V/min -VoltPerSecond=V/s +KilovoltsPerHours=kV/h +KilovoltsPerMicroseconds=kV/μs +KilovoltsPerMinutes=kV/min +KilovoltsPerSeconds=kV/s +MegavoltsPerHours=MV/h +MegavoltsPerMicroseconds=MV/μs +MegavoltsPerMinutes=MV/min +MegavoltsPerSeconds=MV/s +MicrovoltsPerHours=µV/h +MicrovoltsPerMicroseconds=µV/μs +MicrovoltsPerMinutes=µV/min +MicrovoltsPerSeconds=µV/s +MillivoltsPerHours=mV/h +MillivoltsPerMicroseconds=mV/μs +MillivoltsPerMinutes=mV/min +MillivoltsPerSeconds=mV/s +VoltsPerHours=V/h +VoltsPerMicroseconds=V/μs +VoltsPerMinutes=V/min +VoltsPerSeconds=V/s diff --git a/UnitsNet/GeneratedCode/Resources/ElectricPotentialDc.restext b/UnitsNet/GeneratedCode/Resources/ElectricPotentialDc.restext index 563fd165ac..621ba8ba48 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricPotentialDc.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricPotentialDc.restext @@ -1,5 +1,5 @@ -KilovoltDc=kVdc -MegavoltDc=MVdc -MicrovoltDc=µVdc -MillivoltDc=mVdc -VoltDc=Vdc +KilovoltsDc=kVdc +MegavoltsDc=MVdc +MicrovoltsDc=µVdc +MillivoltsDc=mVdc +VoltsDc=Vdc diff --git a/UnitsNet/GeneratedCode/Resources/ElectricResistance.restext b/UnitsNet/GeneratedCode/Resources/ElectricResistance.restext index 9bd346aad8..b49c0108bf 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricResistance.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricResistance.restext @@ -1,7 +1,7 @@ -Gigaohm=GΩ -Kiloohm=kΩ -Megaohm=MΩ -Microohm=µΩ -Milliohm=mΩ -Ohm=Ω -Teraohm=TΩ +Gigaohms=GΩ +Kiloohms=kΩ +Megaohms=MΩ +Microohms=µΩ +Milliohms=mΩ +Ohms=Ω +Teraohms=TΩ diff --git a/UnitsNet/GeneratedCode/Resources/ElectricResistivity.restext b/UnitsNet/GeneratedCode/Resources/ElectricResistivity.restext index d9301cc6f0..52428a4c2f 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricResistivity.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricResistivity.restext @@ -1,14 +1,14 @@ -KiloohmCentimeter=kΩ·cm -KiloohmMeter=kΩ·m -MegaohmCentimeter=MΩ·cm -MegaohmMeter=MΩ·m -MicroohmCentimeter=µΩ·cm -MicroohmMeter=µΩ·m -MilliohmCentimeter=mΩ·cm -MilliohmMeter=mΩ·m -NanoohmCentimeter=nΩ·cm -NanoohmMeter=nΩ·m -OhmCentimeter=Ω·cm -OhmMeter=Ω·m -PicoohmCentimeter=pΩ·cm -PicoohmMeter=pΩ·m +KiloohmsCentimeter=kΩ·cm +KiloohmMeters=kΩ·m +MegaohmsCentimeter=MΩ·cm +MegaohmMeters=MΩ·m +MicroohmsCentimeter=µΩ·cm +MicroohmMeters=µΩ·m +MilliohmsCentimeter=mΩ·cm +MilliohmMeters=mΩ·m +NanoohmsCentimeter=nΩ·cm +NanoohmMeters=nΩ·m +OhmsCentimeter=Ω·cm +OhmMeters=Ω·m +PicoohmsCentimeter=pΩ·cm +PicoohmMeters=pΩ·m diff --git a/UnitsNet/GeneratedCode/Resources/ElectricSurfaceChargeDensity.restext b/UnitsNet/GeneratedCode/Resources/ElectricSurfaceChargeDensity.restext index c70a636f66..9ea26b76b4 100644 --- a/UnitsNet/GeneratedCode/Resources/ElectricSurfaceChargeDensity.restext +++ b/UnitsNet/GeneratedCode/Resources/ElectricSurfaceChargeDensity.restext @@ -1,3 +1,3 @@ -CoulombPerSquareCentimeter=C/cm² -CoulombPerSquareInch=C/in² -CoulombPerSquareMeter=C/m² +CoulombsPerSquareCentimeter=C/cm² +CoulombsPerSquareInch=C/in² +CoulombsPerSquareMeter=C/m² diff --git a/UnitsNet/GeneratedCode/Resources/Energy.restext b/UnitsNet/GeneratedCode/Resources/Energy.restext index 5f7d8d6128..3b92b18e90 100644 --- a/UnitsNet/GeneratedCode/Resources/Energy.restext +++ b/UnitsNet/GeneratedCode/Resources/Energy.restext @@ -1,38 +1,38 @@ -BritishThermalUnit=BTU -Calorie=cal -DecathermEc=Dth (E.C.) -DecathermImperial=Dth (imp.) -DecathermUs=Dth (U.S.) -ElectronVolt=eV -Erg=erg -FootPound=ft·lb -GigabritishThermalUnit=GBTU -GigaelectronVolt=GeV -Gigajoule=GJ -GigawattDay=GWd -GigawattHour=GWh -HorsepowerHour=hp·h -Joule=J -KilobritishThermalUnit=kBTU -Kilocalorie=kcal -KiloelectronVolt=keV -Kilojoule=kJ -KilowattDay=kWd -KilowattHour=kWh -MegabritishThermalUnit=MBTU -Megacalorie=Mcal -MegaelectronVolt=MeV -Megajoule=MJ -MegawattDay=MWd -MegawattHour=MWh -Millijoule=mJ -Petajoule=PJ -TeraelectronVolt=TeV -Terajoule=TJ -TerawattDay=TWd -TerawattHour=TWh -ThermEc=th (E.C.) -ThermImperial=th (imp.) -ThermUs=th (U.S.) -WattDay=Wd -WattHour=Wh +BritishThermalUnits=BTU +Calories=cal +DecathermsEc=Dth (E.C.) +DecathermsImperial=Dth (imp.) +DecathermsUs=Dth (U.S.) +ElectronVolts=eV +Ergs=erg +FootPounds=ft·lb +GigabritishThermalUnits=GBTU +GigaelectronVolts=GeV +Gigajoules=GJ +GigawattDays=GWd +GigawattHours=GWh +HorsepowerHours=hp·h +Joules=J +KilobritishThermalUnits=kBTU +Kilocalories=kcal +KiloelectronVolts=keV +Kilojoules=kJ +KilowattDays=kWd +KilowattHours=kWh +MegabritishThermalUnits=MBTU +Megacalories=Mcal +MegaelectronVolts=MeV +Megajoules=MJ +MegawattDays=MWd +MegawattHours=MWh +Millijoules=mJ +Petajoules=PJ +TeraelectronVolts=TeV +Terajoules=TJ +TerawattDays=TWd +TerawattHours=TWh +ThermsEc=th (E.C.) +ThermsImperial=th (imp.) +ThermsUs=th (U.S.) +WattDays=Wd +WattHours=Wh diff --git a/UnitsNet/GeneratedCode/Resources/Energy.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Energy.ru-RU.restext index 06420a5e7a..8a387337d3 100644 --- a/UnitsNet/GeneratedCode/Resources/Energy.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Energy.ru-RU.restext @@ -1,21 +1,21 @@ -DecathermEc=Европейский декатерм -DecathermImperial=Английский декатерм -DecathermUs=Американский декатерм -ElectronVolt=эВ -GigaelectronVolt=ГэВ -GigawattDay=ГВт/д -GigawattHour=ГВт/ч -KiloelectronVolt=кэВ -KilowattDay=кВт/д -KilowattHour=кВт/ч -MegaelectronVolt=МэВ -MegawattDay=МВт/д -MegawattHour=МВт/ч -TeraelectronVolt=ТэВ -TerawattDay=ТВт/д -TerawattHour=ТВт/ч -ThermEc=Европейский терм -ThermImperial=Английский терм -ThermUs=Американский терм -WattDay=Вт/д -WattHour=Вт/ч +DecathermsEc=Европейский декатерм +DecathermsImperial=Английский декатерм +DecathermsUs=Американский декатерм +ElectronVolts=эВ +GigaelectronVolts=ГэВ +GigawattDays=ГВт/д +GigawattHours=ГВт/ч +KiloelectronVolts=кэВ +KilowattDays=кВт/д +KilowattHours=кВт/ч +MegaelectronVolts=МэВ +MegawattDays=МВт/д +MegawattHours=МВт/ч +TeraelectronVolts=ТэВ +TerawattDays=ТВт/д +TerawattHours=ТВт/ч +ThermsEc=Европейский терм +ThermsImperial=Английский терм +ThermsUs=Американский терм +WattDays=Вт/д +WattHours=Вт/ч diff --git a/UnitsNet/GeneratedCode/Resources/EnergyDensity.restext b/UnitsNet/GeneratedCode/Resources/EnergyDensity.restext index 0c7195646e..5cd1a0f883 100644 --- a/UnitsNet/GeneratedCode/Resources/EnergyDensity.restext +++ b/UnitsNet/GeneratedCode/Resources/EnergyDensity.restext @@ -1,12 +1,12 @@ -GigajoulePerCubicMeter=GJ/m³ -GigawattHourPerCubicMeter=GWh/m³ -JoulePerCubicMeter=J/m³ -KilojoulePerCubicMeter=kJ/m³ -KilowattHourPerCubicMeter=kWh/m³ -MegajoulePerCubicMeter=MJ/m³ -MegawattHourPerCubicMeter=MWh/m³ -PetajoulePerCubicMeter=PJ/m³ -PetawattHourPerCubicMeter=PWh/m³ -TerajoulePerCubicMeter=TJ/m³ -TerawattHourPerCubicMeter=TWh/m³ -WattHourPerCubicMeter=Wh/m³ +GigajoulesPerCubicMeter=GJ/m³ +GigawattHoursPerCubicMeter=GWh/m³ +JoulesPerCubicMeter=J/m³ +KilojoulesPerCubicMeter=kJ/m³ +KilowattHoursPerCubicMeter=kWh/m³ +MegajoulesPerCubicMeter=MJ/m³ +MegawattHoursPerCubicMeter=MWh/m³ +PetajoulesPerCubicMeter=PJ/m³ +PetawattHoursPerCubicMeter=PWh/m³ +TerajoulesPerCubicMeter=TJ/m³ +TerawattHoursPerCubicMeter=TWh/m³ +WattHoursPerCubicMeter=Wh/m³ diff --git a/UnitsNet/GeneratedCode/Resources/Entropy.restext b/UnitsNet/GeneratedCode/Resources/Entropy.restext index ed8a37ceb5..91eb829c9b 100644 --- a/UnitsNet/GeneratedCode/Resources/Entropy.restext +++ b/UnitsNet/GeneratedCode/Resources/Entropy.restext @@ -1,7 +1,7 @@ -CaloriePerKelvin=cal/K -JoulePerDegreeCelsius=J/C -JoulePerKelvin=J/K -KilocaloriePerKelvin=kcal/K -KilojoulePerDegreeCelsius=kJ/C -KilojoulePerKelvin=kJ/K -MegajoulePerKelvin=MJ/K +CaloriesPerKelvin=cal/K +JoulesPerDegreeCelsius=J/C +JoulesPerKelvin=J/K +KilocaloriesPerKelvin=kcal/K +KilojoulesPerDegreeCelsius=kJ/C +KilojoulesPerKelvin=kJ/K +MegajoulesPerKelvin=MJ/K diff --git a/UnitsNet/GeneratedCode/Resources/Force.restext b/UnitsNet/GeneratedCode/Resources/Force.restext index abec40ab0e..b848f036c4 100644 --- a/UnitsNet/GeneratedCode/Resources/Force.restext +++ b/UnitsNet/GeneratedCode/Resources/Force.restext @@ -1,15 +1,15 @@ -Decanewton=daN -Dyn=dyn -KilogramForce=kgf -Kilonewton=kN -KiloPond=kp -KilopoundForce=kipf,kip,k -Meganewton=MN -Micronewton=µN -Millinewton=mN -Newton=N +Decanewtons=daN +Dyne=dyn +KilogramsForce=kgf +Kilonewtons=kN +KiloPonds=kp +KilopoundsForce=kipf,kip,k +Meganewtons=MN +Micronewtons=µN +Millinewtons=mN +Newtons=N OunceForce=ozf -Poundal=pdl -PoundForce=lbf -ShortTonForce=tf (short),t (US)f,short tons-force -TonneForce=tf,Ton +Poundals=pdl +PoundsForce=lbf +ShortTonsForce=tf (short),t (US)f,short tons-force +TonnesForce=tf,Ton diff --git a/UnitsNet/GeneratedCode/Resources/Force.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Force.ru-RU.restext index ef7d5aadfe..4133ca9268 100644 --- a/UnitsNet/GeneratedCode/Resources/Force.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Force.ru-RU.restext @@ -1,13 +1,13 @@ -Decanewton=даН -Dyn=дин -KilogramForce=кгс -Kilonewton=кН -KiloPond=кгс -KilopoundForce=кипф,койка,К -Meganewton=МН -Micronewton=мкН -Millinewton=мН -Newton=Н -Poundal=паундаль -PoundForce=фунт-сила -TonneForce=тс +Decanewtons=даН +Dyne=дин +KilogramsForce=кгс +Kilonewtons=кН +KiloPonds=кгс +KilopoundsForce=кипф,койка,К +Meganewtons=МН +Micronewtons=мкН +Millinewtons=мН +Newtons=Н +Poundals=паундаль +PoundsForce=фунт-сила +TonnesForce=тс diff --git a/UnitsNet/GeneratedCode/Resources/ForceChangeRate.restext b/UnitsNet/GeneratedCode/Resources/ForceChangeRate.restext index 063483ee23..ca6827bf94 100644 --- a/UnitsNet/GeneratedCode/Resources/ForceChangeRate.restext +++ b/UnitsNet/GeneratedCode/Resources/ForceChangeRate.restext @@ -1,15 +1,15 @@ -CentinewtonPerSecond=cN/s -DecanewtonPerMinute=daN/min -DecanewtonPerSecond=daN/s -DecinewtonPerSecond=dN/s -KilonewtonPerMinute=kN/min -KilonewtonPerSecond=kN/s -KilopoundForcePerMinute=kipf/min,kip/min,k/min -KilopoundForcePerSecond=kipf/s,kip/s,k/s -MicronewtonPerSecond=µN/s -MillinewtonPerSecond=mN/s -NanonewtonPerSecond=nN/s -NewtonPerMinute=N/min -NewtonPerSecond=N/s -PoundForcePerMinute=lbf/min -PoundForcePerSecond=lbf/s +CentinewtonsPerSecond=cN/s +DecanewtonsPerMinute=daN/min +DecanewtonsPerSecond=daN/s +DecinewtonsPerSecond=dN/s +KilonewtonsPerMinute=kN/min +KilonewtonsPerSecond=kN/s +KilopoundsForcePerMinute=kipf/min,kip/min,k/min +KilopoundsForcePerSecond=kipf/s,kip/s,k/s +MicronewtonsPerSecond=µN/s +MillinewtonsPerSecond=mN/s +NanonewtonsPerSecond=nN/s +NewtonsPerMinute=N/min +NewtonsPerSecond=N/s +PoundsForcePerMinute=lbf/min +PoundsForcePerSecond=lbf/s diff --git a/UnitsNet/GeneratedCode/Resources/ForcePerLength.restext b/UnitsNet/GeneratedCode/Resources/ForcePerLength.restext index 976525182d..17ad4f3f7d 100644 --- a/UnitsNet/GeneratedCode/Resources/ForcePerLength.restext +++ b/UnitsNet/GeneratedCode/Resources/ForcePerLength.restext @@ -1,38 +1,38 @@ -CentinewtonPerCentimeter=cN/cm -CentinewtonPerMeter=cN/m -CentinewtonPerMillimeter=cN/mm -DecanewtonPerCentimeter=daN/cm -DecanewtonPerMeter=daN/m -DecanewtonPerMillimeter=daN/mm -DecinewtonPerCentimeter=dN/cm -DecinewtonPerMeter=dN/m -DecinewtonPerMillimeter=dN/mm -KilogramForcePerCentimeter=kgf/cm -KilogramForcePerMeter=kgf/m -KilogramForcePerMillimeter=kgf/mm -KilonewtonPerCentimeter=kN/cm -KilonewtonPerMeter=kN/m -KilonewtonPerMillimeter=kN/mm -KilopoundForcePerFoot=kipf/ft,kip/ft,k/ft -KilopoundForcePerInch=kipf/in,kip/in,k/in -MeganewtonPerCentimeter=MN/cm -MeganewtonPerMeter=MN/m -MeganewtonPerMillimeter=MN/mm -MicronewtonPerCentimeter=µN/cm -MicronewtonPerMeter=µN/m -MicronewtonPerMillimeter=µN/mm -MillinewtonPerCentimeter=mN/cm -MillinewtonPerMeter=mN/m -MillinewtonPerMillimeter=mN/mm -NanonewtonPerCentimeter=nN/cm -NanonewtonPerMeter=nN/m -NanonewtonPerMillimeter=nN/mm -NewtonPerCentimeter=N/cm -NewtonPerMeter=N/m -NewtonPerMillimeter=N/mm -PoundForcePerFoot=lbf/ft -PoundForcePerInch=lbf/in -PoundForcePerYard=lbf/yd -TonneForcePerCentimeter=tf/cm -TonneForcePerMeter=tf/m -TonneForcePerMillimeter=tf/mm +CentinewtonsPerCentimeter=cN/cm +CentinewtonsPerMeter=cN/m +CentinewtonsPerMillimeter=cN/mm +DecanewtonsPerCentimeter=daN/cm +DecanewtonsPerMeter=daN/m +DecanewtonsPerMillimeter=daN/mm +DecinewtonsPerCentimeter=dN/cm +DecinewtonsPerMeter=dN/m +DecinewtonsPerMillimeter=dN/mm +KilogramsForcePerCentimeter=kgf/cm +KilogramsForcePerMeter=kgf/m +KilogramsForcePerMillimeter=kgf/mm +KilonewtonsPerCentimeter=kN/cm +KilonewtonsPerMeter=kN/m +KilonewtonsPerMillimeter=kN/mm +KilopoundsForcePerFoot=kipf/ft,kip/ft,k/ft +KilopoundsForcePerInch=kipf/in,kip/in,k/in +MeganewtonsPerCentimeter=MN/cm +MeganewtonsPerMeter=MN/m +MeganewtonsPerMillimeter=MN/mm +MicronewtonsPerCentimeter=µN/cm +MicronewtonsPerMeter=µN/m +MicronewtonsPerMillimeter=µN/mm +MillinewtonsPerCentimeter=mN/cm +MillinewtonsPerMeter=mN/m +MillinewtonsPerMillimeter=mN/mm +NanonewtonsPerCentimeter=nN/cm +NanonewtonsPerMeter=nN/m +NanonewtonsPerMillimeter=nN/mm +NewtonsPerCentimeter=N/cm +NewtonsPerMeter=N/m +NewtonsPerMillimeter=N/mm +PoundsForcePerFoot=lbf/ft +PoundsForcePerInch=lbf/in +PoundsForcePerYard=lbf/yd +TonnesForcePerCentimeter=tf/cm +TonnesForcePerMeter=tf/m +TonnesForcePerMillimeter=tf/mm diff --git a/UnitsNet/GeneratedCode/Resources/ForcePerLength.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/ForcePerLength.ru-RU.restext index 2ade9db4e0..53df4915e5 100644 --- a/UnitsNet/GeneratedCode/Resources/ForcePerLength.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/ForcePerLength.ru-RU.restext @@ -1,6 +1,6 @@ -KilogramForcePerCentimeter=кгс/см -KilogramForcePerMeter=кгс/м -KilogramForcePerMillimeter=кгс/мм -TonneForcePerCentimeter=тс/см -TonneForcePerMeter=тс/м -TonneForcePerMillimeter=тс/мм +KilogramsForcePerCentimeter=кгс/см +KilogramsForcePerMeter=кгс/м +KilogramsForcePerMillimeter=кгс/мм +TonnesForcePerCentimeter=тс/см +TonnesForcePerMeter=тс/м +TonnesForcePerMillimeter=тс/мм diff --git a/UnitsNet/GeneratedCode/Resources/Frequency.restext b/UnitsNet/GeneratedCode/Resources/Frequency.restext index 0819c0f45b..1eae761bd8 100644 --- a/UnitsNet/GeneratedCode/Resources/Frequency.restext +++ b/UnitsNet/GeneratedCode/Resources/Frequency.restext @@ -1,7 +1,7 @@ -BeatPerMinute=bpm -BUnit=B Units -CyclePerHour=cph -CyclePerMinute=cpm +BeatsPerMinute=bpm +BUnits=B Units +CyclesPerHour=cph +CyclesPerMinute=cpm Gigahertz=GHz Hertz=Hz Kilohertz=kHz @@ -9,5 +9,5 @@ Megahertz=MHz Microhertz=µHz Millihertz=mHz PerSecond=s⁻¹ -RadianPerSecond=rad/s +RadiansPerSecond=rad/s Terahertz=THz diff --git a/UnitsNet/GeneratedCode/Resources/Frequency.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Frequency.ru-RU.restext index d267498d6b..aeec1b65e3 100644 --- a/UnitsNet/GeneratedCode/Resources/Frequency.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Frequency.ru-RU.restext @@ -5,5 +5,5 @@ Megahertz=МГц Microhertz=мкГц Millihertz=мГц PerSecond=с⁻¹ -RadianPerSecond=рад/с +RadiansPerSecond=рад/с Terahertz=ТГц diff --git a/UnitsNet/GeneratedCode/Resources/FuelEfficiency.restext b/UnitsNet/GeneratedCode/Resources/FuelEfficiency.restext index 7fb8197044..600f577506 100644 --- a/UnitsNet/GeneratedCode/Resources/FuelEfficiency.restext +++ b/UnitsNet/GeneratedCode/Resources/FuelEfficiency.restext @@ -1,4 +1,4 @@ -KilometerPerLiter=km/L -LiterPer100Kilometers=L/100km -MilePerUkGallon=mpg (imp.) -MilePerUsGallon=mpg (U.S.) +KilometersPerLiters=km/L +LitersPer100Kilometers=L/100km +MilesPerUkGallon=mpg (imp.) +MilesPerUsGallon=mpg (U.S.) diff --git a/UnitsNet/GeneratedCode/Resources/HeatFlux.restext b/UnitsNet/GeneratedCode/Resources/HeatFlux.restext index 9133478834..fa33c6d644 100644 --- a/UnitsNet/GeneratedCode/Resources/HeatFlux.restext +++ b/UnitsNet/GeneratedCode/Resources/HeatFlux.restext @@ -1,18 +1,18 @@ -BtuPerHourSquareFoot=BTU/h·ft² -BtuPerMinuteSquareFoot=BTU/min·ft² -BtuPerSecondSquareFoot=BTU/s·ft² -BtuPerSecondSquareInch=BTU/s·in² -CaloriePerSecondSquareCentimeter=cal/s·cm² -CentiwattPerSquareMeter=cW/m² -DeciwattPerSquareMeter=dW/m² -KilocaloriePerHourSquareMeter=kcal/h·m² -KilocaloriePerSecondSquareCentimeter=kcal/s·cm² -KilowattPerSquareMeter=kW/m² -MicrowattPerSquareMeter=µW/m² -MilliwattPerSquareMeter=mW/m² -NanowattPerSquareMeter=nW/m² -PoundForcePerFootSecond=lbf/(ft·s) -PoundPerSecondCubed=lb/s³,lbm/s³ -WattPerSquareFoot=W/ft² -WattPerSquareInch=W/in² -WattPerSquareMeter=W/m² +BtusPerHourSquareFoot=BTU/h·ft² +BtusPerMinuteSquareFoot=BTU/min·ft² +BtusPerSecondSquareFoot=BTU/s·ft² +BtusPerSecondSquareInch=BTU/s·in² +CaloriesPerSecondSquareCentimeter=cal/s·cm² +CentiwattsPerSquareMeter=cW/m² +DeciwattsPerSquareMeter=dW/m² +KilocaloriesPerHourSquareMeter=kcal/h·m² +KilocaloriesPerSecondSquareCentimeter=kcal/s·cm² +KilowattsPerSquareMeter=kW/m² +MicrowattsPerSquareMeter=µW/m² +MilliwattsPerSquareMeter=mW/m² +NanowattsPerSquareMeter=nW/m² +PoundsForcePerFootSecond=lbf/(ft·s) +PoundsPerSecondCubed=lb/s³,lbm/s³ +WattsPerSquareFoot=W/ft² +WattsPerSquareInch=W/in² +WattsPerSquareMeter=W/m² diff --git a/UnitsNet/GeneratedCode/Resources/HeatTransferCoefficient.restext b/UnitsNet/GeneratedCode/Resources/HeatTransferCoefficient.restext index 104aedcb9a..86874b6f2f 100644 --- a/UnitsNet/GeneratedCode/Resources/HeatTransferCoefficient.restext +++ b/UnitsNet/GeneratedCode/Resources/HeatTransferCoefficient.restext @@ -1,6 +1,6 @@ -BtuPerHourSquareFootDegreeFahrenheit=Btu/h·ft²·°F,Btu/ft²·h·°F,Btu/hr·ft²·°F,Btu/ft²·hr·°F -BtuPerSquareFootDegreeFahrenheit=Btu/ft²·°F -CaloriePerHourSquareMeterDegreeCelsius=kcal/h·m²·°C,kcal/m²·h·°C,kcal/hr·m²·°C,kcal/m²·hr·°C -KilocaloriePerHourSquareMeterDegreeCelsius=kkcal/h·m²·°C,kkcal/m²·h·°C,kkcal/hr·m²·°C,kkcal/m²·hr·°C -WattPerSquareMeterCelsius=W/m²·°C -WattPerSquareMeterKelvin=W/m²·K +BtusPerHourSquareFootDegreeFahrenheit=Btu/h·ft²·°F,Btu/ft²·h·°F,Btu/hr·ft²·°F,Btu/ft²·hr·°F +BtusPerSquareFootDegreeFahrenheit=Btu/ft²·°F +CaloriesPerHourSquareMeterDegreeCelsius=kcal/h·m²·°C,kcal/m²·h·°C,kcal/hr·m²·°C,kcal/m²·hr·°C +KilocaloriesPerHourSquareMeterDegreeCelsius=kkcal/h·m²·°C,kkcal/m²·h·°C,kkcal/hr·m²·°C,kkcal/m²·hr·°C +WattsPerSquareMeterCelsius=W/m²·°C +WattsPerSquareMeterKelvin=W/m²·K diff --git a/UnitsNet/GeneratedCode/Resources/Impulse.restext b/UnitsNet/GeneratedCode/Resources/Impulse.restext index cc3f860f0a..ac016e9dce 100644 --- a/UnitsNet/GeneratedCode/Resources/Impulse.restext +++ b/UnitsNet/GeneratedCode/Resources/Impulse.restext @@ -1,13 +1,13 @@ -CentinewtonSecond=cN·s -DecanewtonSecond=daN·s -DecinewtonSecond=dN·s -KilogramMeterPerSecond=kg·m/s -KilonewtonSecond=kN·s -MeganewtonSecond=MN·s -MicronewtonSecond=µN·s -MillinewtonSecond=mN·s -NanonewtonSecond=nN·s -NewtonSecond=N·s -PoundFootPerSecond=lb·ft/s -PoundForceSecond=lbf·s -SlugFootPerSecond=slug·ft/s +CentinewtonSeconds=cN·s +DecanewtonSeconds=daN·s +DecinewtonSeconds=dN·s +KilogramMetersPerSecond=kg·m/s +KilonewtonSeconds=kN·s +MeganewtonSeconds=MN·s +MicronewtonSeconds=µN·s +MillinewtonSeconds=mN·s +NanonewtonSeconds=nN·s +NewtonSeconds=N·s +PoundFeetPerSecond=lb·ft/s +PoundForceSeconds=lbf·s +SlugFeetPerSecond=slug·ft/s diff --git a/UnitsNet/GeneratedCode/Resources/Information.restext b/UnitsNet/GeneratedCode/Resources/Information.restext index 9a627d3739..7618b95362 100644 --- a/UnitsNet/GeneratedCode/Resources/Information.restext +++ b/UnitsNet/GeneratedCode/Resources/Information.restext @@ -1,26 +1,26 @@ -Bit=b -Byte=B -Exabit=Eb -Exabyte=EB -Exbibit=Eib -Exbibyte=EiB -Gibibit=Gib -Gibibyte=GiB -Gigabit=Gb -Gigabyte=GB -Kibibit=Kib -Kibibyte=KiB -Kilobit=kb -Kilobyte=kB -Mebibit=Mib -Mebibyte=MiB -Megabit=Mb -Megabyte=MB -Pebibit=Pib -Pebibyte=PiB -Petabit=Pb -Petabyte=PB -Tebibit=Tib -Tebibyte=TiB -Terabit=Tb -Terabyte=TB +Bits=b +Bytes=B +Exabits=Eb +Exabytes=EB +Exbibits=Eib +Exbibytes=EiB +Gibibits=Gib +Gibibytes=GiB +Gigabits=Gb +Gigabytes=GB +Kibibits=Kib +Kibibytes=KiB +Kilobits=kb +Kilobytes=kB +Mebibits=Mib +Mebibytes=MiB +Megabits=Mb +Megabytes=MB +Pebibits=Pib +Pebibytes=PiB +Petabits=Pb +Petabytes=PB +Tebibits=Tib +Tebibytes=TiB +Terabits=Tb +Terabytes=TB diff --git a/UnitsNet/GeneratedCode/Resources/Irradiance.restext b/UnitsNet/GeneratedCode/Resources/Irradiance.restext index 80fffb2ccf..c4295cfff7 100644 --- a/UnitsNet/GeneratedCode/Resources/Irradiance.restext +++ b/UnitsNet/GeneratedCode/Resources/Irradiance.restext @@ -1,14 +1,14 @@ -KilowattPerSquareCentimeter=kW/cm² -KilowattPerSquareMeter=kW/m² -MegawattPerSquareCentimeter=MW/cm² -MegawattPerSquareMeter=MW/m² -MicrowattPerSquareCentimeter=µW/cm² -MicrowattPerSquareMeter=µW/m² -MilliwattPerSquareCentimeter=mW/cm² -MilliwattPerSquareMeter=mW/m² -NanowattPerSquareCentimeter=nW/cm² -NanowattPerSquareMeter=nW/m² -PicowattPerSquareCentimeter=pW/cm² -PicowattPerSquareMeter=pW/m² -WattPerSquareCentimeter=W/cm² -WattPerSquareMeter=W/m² +KilowattsPerSquareCentimeter=kW/cm² +KilowattsPerSquareMeter=kW/m² +MegawattsPerSquareCentimeter=MW/cm² +MegawattsPerSquareMeter=MW/m² +MicrowattsPerSquareCentimeter=µW/cm² +MicrowattsPerSquareMeter=µW/m² +MilliwattsPerSquareCentimeter=mW/cm² +MilliwattsPerSquareMeter=mW/m² +NanowattsPerSquareCentimeter=nW/cm² +NanowattsPerSquareMeter=nW/m² +PicowattsPerSquareCentimeter=pW/cm² +PicowattsPerSquareMeter=pW/m² +WattsPerSquareCentimeter=W/cm² +WattsPerSquareMeter=W/m² diff --git a/UnitsNet/GeneratedCode/Resources/Irradiation.restext b/UnitsNet/GeneratedCode/Resources/Irradiation.restext index 1c1c74c87f..b2a605bb57 100644 --- a/UnitsNet/GeneratedCode/Resources/Irradiation.restext +++ b/UnitsNet/GeneratedCode/Resources/Irradiation.restext @@ -1,7 +1,7 @@ -JoulePerSquareCentimeter=J/cm² -JoulePerSquareMeter=J/m² -JoulePerSquareMillimeter=J/mm² -KilojoulePerSquareMeter=kJ/m² -KilowattHourPerSquareMeter=kWh/m² -MillijoulePerSquareCentimeter=mJ/cm² -WattHourPerSquareMeter=Wh/m² +JoulesPerSquareCentimeter=J/cm² +JoulesPerSquareMeter=J/m² +JoulesPerSquareMillimeter=J/mm² +KilojoulesPerSquareMeter=kJ/m² +KilowattHoursPerSquareMeter=kWh/m² +MillijoulesPerSquareCentimeter=mJ/cm² +WattHoursPerSquareMeter=Wh/m² diff --git a/UnitsNet/GeneratedCode/Resources/Jerk.restext b/UnitsNet/GeneratedCode/Resources/Jerk.restext index 75d951de47..97127725dd 100644 --- a/UnitsNet/GeneratedCode/Resources/Jerk.restext +++ b/UnitsNet/GeneratedCode/Resources/Jerk.restext @@ -1,11 +1,11 @@ -CentimeterPerSecondCubed=cm/s³ -DecimeterPerSecondCubed=dm/s³ -FootPerSecondCubed=ft/s³ -InchPerSecondCubed=in/s³ -KilometerPerSecondCubed=km/s³ -MeterPerSecondCubed=m/s³ -MicrometerPerSecondCubed=µm/s³ -MillimeterPerSecondCubed=mm/s³ +CentimetersPerSecondCubed=cm/s³ +DecimetersPerSecondCubed=dm/s³ +FeetPerSecondCubed=ft/s³ +InchesPerSecondCubed=in/s³ +KilometersPerSecondCubed=km/s³ +MetersPerSecondCubed=m/s³ +MicrometersPerSecondCubed=µm/s³ +MillimetersPerSecondCubed=mm/s³ MillistandardGravitiesPerSecond=mg/s -NanometerPerSecondCubed=nm/s³ +NanometersPerSecondCubed=nm/s³ StandardGravitiesPerSecond=g/s diff --git a/UnitsNet/GeneratedCode/Resources/Jerk.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Jerk.ru-RU.restext index 782fca6a20..348f076150 100644 --- a/UnitsNet/GeneratedCode/Resources/Jerk.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Jerk.ru-RU.restext @@ -1,11 +1,11 @@ -CentimeterPerSecondCubed=см/с³ -DecimeterPerSecondCubed=дм/с³ -FootPerSecondCubed=фут/с³ -InchPerSecondCubed=дюйм/с³ -KilometerPerSecondCubed=км/с³ -MeterPerSecondCubed=м/с³ -MicrometerPerSecondCubed=мкм/с³ -MillimeterPerSecondCubed=мм/с³ +CentimetersPerSecondCubed=см/с³ +DecimetersPerSecondCubed=дм/с³ +FeetPerSecondCubed=фут/с³ +InchesPerSecondCubed=дюйм/с³ +KilometersPerSecondCubed=км/с³ +MetersPerSecondCubed=м/с³ +MicrometersPerSecondCubed=мкм/с³ +MillimetersPerSecondCubed=мм/с³ MillistandardGravitiesPerSecond=мg/s -NanometerPerSecondCubed=нм/с³ +NanometersPerSecondCubed=нм/с³ StandardGravitiesPerSecond=g/s diff --git a/UnitsNet/GeneratedCode/Resources/KinematicViscosity.restext b/UnitsNet/GeneratedCode/Resources/KinematicViscosity.restext index dec8c6615c..3aaa4e0502 100644 --- a/UnitsNet/GeneratedCode/Resources/KinematicViscosity.restext +++ b/UnitsNet/GeneratedCode/Resources/KinematicViscosity.restext @@ -4,6 +4,6 @@ Kilostokes=kSt Microstokes=µSt Millistokes=mSt Nanostokes=nSt -SquareFootPerSecond=ft²/s -SquareMeterPerSecond=m²/s +SquareFeetPerSecond=ft²/s +SquareMetersPerSecond=m²/s Stokes=St diff --git a/UnitsNet/GeneratedCode/Resources/KinematicViscosity.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/KinematicViscosity.ru-RU.restext index bbfa686c89..de3a168f1f 100644 --- a/UnitsNet/GeneratedCode/Resources/KinematicViscosity.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/KinematicViscosity.ru-RU.restext @@ -4,5 +4,5 @@ Kilostokes=кСт Microstokes=мкСт Millistokes=мСт Nanostokes=нСт -SquareMeterPerSecond=м²/с +SquareMetersPerSecond=м²/с Stokes=Ст diff --git a/UnitsNet/GeneratedCode/Resources/LeakRate.restext b/UnitsNet/GeneratedCode/Resources/LeakRate.restext index 2e70817264..168e4fa2f0 100644 --- a/UnitsNet/GeneratedCode/Resources/LeakRate.restext +++ b/UnitsNet/GeneratedCode/Resources/LeakRate.restext @@ -1,3 +1,3 @@ -MillibarLiterPerSecond=mbar·l/s -PascalCubicMeterPerSecond=Pa·m³/s -TorrLiterPerSecond=Torr·l/s +MillibarLitersPerSecond=mbar·l/s +PascalCubicMetersPerSecond=Pa·m³/s +TorrLitersPerSecond=Torr·l/s diff --git a/UnitsNet/GeneratedCode/Resources/Length.restext b/UnitsNet/GeneratedCode/Resources/Length.restext index 23065bb51d..5c8b747523 100644 --- a/UnitsNet/GeneratedCode/Resources/Length.restext +++ b/UnitsNet/GeneratedCode/Resources/Length.restext @@ -1,37 +1,37 @@ -Angstrom=Å,A -AstronomicalUnit=au,ua -Centimeter=cm -Chain=ch -DataMile=DM -Decameter=dam -Decimeter=dm -DtpPica=pica -DtpPoint=pt -Fathom=fathom -Foot=ft,',′ -Hand=h,hh -Hectometer=hm -Inch=in,\",″ -KilolightYear=kly -Kilometer=km -Kiloparsec=kpc -LightYear=ly -MegalightYear=Mly -Megameter=Mm -Megaparsec=Mpc -Meter=m -Microinch=µin -Micrometer=µm -Mil=mil -Mile=mi -Millimeter=mm -Nanometer=nm -NauticalMile=NM -Parsec=pc -PrinterPica=pica -PrinterPoint=pt -Shackle=shackle -SolarRadius=R⊙ -Twip=twip -UsSurveyFoot=ftUS -Yard=yd +Angstroms=Å,A +AstronomicalUnits=au,ua +Centimeters=cm +Chains=ch +DataMiles=DM +Decameters=dam +Decimeters=dm +DtpPicas=pica +DtpPoints=pt +Fathoms=fathom +Feet=ft,',′ +Hands=h,hh +Hectometers=hm +Inches=in,\",″ +KilolightYears=kly +Kilometers=km +Kiloparsecs=kpc +LightYears=ly +MegalightYears=Mly +Megameters=Mm +Megaparsecs=Mpc +Meters=m +Microinches=µin +Micrometers=µm +Mils=mil +Miles=mi +Millimeters=mm +Nanometers=nm +NauticalMiles=NM +Parsecs=pc +PrinterPicas=pica +PrinterPoints=pt +Shackles=shackle +SolarRadiuses=R⊙ +Twips=twip +UsSurveyFeet=ftUS +Yards=yd diff --git a/UnitsNet/GeneratedCode/Resources/Length.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Length.ru-RU.restext index 12b746a9c0..836367c136 100644 --- a/UnitsNet/GeneratedCode/Resources/Length.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Length.ru-RU.restext @@ -1,17 +1,17 @@ -Centimeter=см -Decameter=дам -Decimeter=дм -Foot=фут -Hectometer=гм -Inch=дюйм -Kilometer=км -Megameter=Мм -Meter=м -Microinch=микродюйм -Micrometer=мкм -Mil=мил -Mile=миля -Millimeter=мм -Nanometer=нм -NauticalMile=мил -Yard=ярд +Centimeters=см +Decameters=дам +Decimeters=дм +Feet=фут +Hectometers=гм +Inches=дюйм +Kilometers=км +Megameters=Мм +Meters=м +Microinches=микродюйм +Micrometers=мкм +Mils=мил +Miles=миля +Millimeters=мм +Nanometers=нм +NauticalMiles=мил +Yards=ярд diff --git a/UnitsNet/GeneratedCode/Resources/Length.zh-CN.restext b/UnitsNet/GeneratedCode/Resources/Length.zh-CN.restext index 16a85afbf2..e1588e58af 100644 --- a/UnitsNet/GeneratedCode/Resources/Length.zh-CN.restext +++ b/UnitsNet/GeneratedCode/Resources/Length.zh-CN.restext @@ -1,17 +1,17 @@ -Centimeter=厘米 -Decameter=十米 -Decimeter=分米 -Foot=英尺 -Hectometer=百米 -Inch=英寸 -Kilometer=千米 -Megameter=兆米 -Meter=米 -Microinch=微英寸 -Micrometer=微米 -Mil=密耳 -Mile=英里 -Millimeter=毫米 -Nanometer=纳米 -NauticalMile=纳米 -Yard=码 +Centimeters=厘米 +Decameters=十米 +Decimeters=分米 +Feet=英尺 +Hectometers=百米 +Inches=英寸 +Kilometers=千米 +Megameters=兆米 +Meters=米 +Microinches=微英寸 +Micrometers=微米 +Mils=密耳 +Miles=英里 +Millimeters=毫米 +Nanometers=纳米 +NauticalMiles=纳米 +Yards=码 diff --git a/UnitsNet/GeneratedCode/Resources/Level.restext b/UnitsNet/GeneratedCode/Resources/Level.restext index 0d7343d645..ae4f5c46b9 100644 --- a/UnitsNet/GeneratedCode/Resources/Level.restext +++ b/UnitsNet/GeneratedCode/Resources/Level.restext @@ -1,2 +1,2 @@ -Decibel=dB -Neper=Np +Decibels=dB +Nepers=Np diff --git a/UnitsNet/GeneratedCode/Resources/LinearDensity.restext b/UnitsNet/GeneratedCode/Resources/LinearDensity.restext index 72f428a88b..dde0536f92 100644 --- a/UnitsNet/GeneratedCode/Resources/LinearDensity.restext +++ b/UnitsNet/GeneratedCode/Resources/LinearDensity.restext @@ -1,14 +1,14 @@ -GramPerCentimeter=g/cm -GramPerMeter=g/m -GramPerMillimeter=g/mm -KilogramPerCentimeter=kg/cm -KilogramPerMeter=kg/m -KilogramPerMillimeter=kg/mm -MicrogramPerCentimeter=µg/cm -MicrogramPerMeter=µg/m -MicrogramPerMillimeter=µg/mm -MilligramPerCentimeter=mg/cm -MilligramPerMeter=mg/m -MilligramPerMillimeter=mg/mm -PoundPerFoot=lb/ft -PoundPerInch=lb/in +GramsPerCentimeter=g/cm +GramsPerMeter=g/m +GramsPerMillimeter=g/mm +KilogramsPerCentimeter=kg/cm +KilogramsPerMeter=kg/m +KilogramsPerMillimeter=kg/mm +MicrogramsPerCentimeter=µg/cm +MicrogramsPerMeter=µg/m +MicrogramsPerMillimeter=µg/mm +MilligramsPerCentimeter=mg/cm +MilligramsPerMeter=mg/m +MilligramsPerMillimeter=mg/mm +PoundsPerFoot=lb/ft +PoundsPerInch=lb/in diff --git a/UnitsNet/GeneratedCode/Resources/LinearPowerDensity.restext b/UnitsNet/GeneratedCode/Resources/LinearPowerDensity.restext index c5f673df0f..20afc46669 100644 --- a/UnitsNet/GeneratedCode/Resources/LinearPowerDensity.restext +++ b/UnitsNet/GeneratedCode/Resources/LinearPowerDensity.restext @@ -1,25 +1,25 @@ -GigawattPerCentimeter=GW/cm -GigawattPerFoot=GW/ft -GigawattPerInch=GW/in -GigawattPerMeter=GW/m -GigawattPerMillimeter=GW/mm -KilowattPerCentimeter=kW/cm -KilowattPerFoot=kW/ft -KilowattPerInch=kW/in -KilowattPerMeter=kW/m -KilowattPerMillimeter=kW/mm -MegawattPerCentimeter=MW/cm -MegawattPerFoot=MW/ft -MegawattPerInch=MW/in -MegawattPerMeter=MW/m -MegawattPerMillimeter=MW/mm -MilliwattPerCentimeter=mW/cm -MilliwattPerFoot=mW/ft -MilliwattPerInch=mW/in -MilliwattPerMeter=mW/m -MilliwattPerMillimeter=mW/mm -WattPerCentimeter=W/cm -WattPerFoot=W/ft -WattPerInch=W/in -WattPerMeter=W/m -WattPerMillimeter=W/mm +GigawattsPerCentimeter=GW/cm +GigawattsPerFoot=GW/ft +GigawattsPerInch=GW/in +GigawattsPerMeter=GW/m +GigawattsPerMillimeter=GW/mm +KilowattsPerCentimeter=kW/cm +KilowattsPerFoot=kW/ft +KilowattsPerInch=kW/in +KilowattsPerMeter=kW/m +KilowattsPerMillimeter=kW/mm +MegawattsPerCentimeter=MW/cm +MegawattsPerFoot=MW/ft +MegawattsPerInch=MW/in +MegawattsPerMeter=MW/m +MegawattsPerMillimeter=MW/mm +MilliwattsPerCentimeter=mW/cm +MilliwattsPerFoot=mW/ft +MilliwattsPerInch=mW/in +MilliwattsPerMeter=mW/m +MilliwattsPerMillimeter=mW/mm +WattsPerCentimeter=W/cm +WattsPerFoot=W/ft +WattsPerInch=W/in +WattsPerMeter=W/m +WattsPerMillimeter=W/mm diff --git a/UnitsNet/GeneratedCode/Resources/Luminance.restext b/UnitsNet/GeneratedCode/Resources/Luminance.restext index ee2a55ccb7..4ff2a3183e 100644 --- a/UnitsNet/GeneratedCode/Resources/Luminance.restext +++ b/UnitsNet/GeneratedCode/Resources/Luminance.restext @@ -1,10 +1,10 @@ -CandelaPerSquareFoot=Cd/ft² -CandelaPerSquareInch=Cd/in² -CandelaPerSquareMeter=Cd/m² -CenticandelaPerSquareMeter=cCd/m² -DecicandelaPerSquareMeter=dCd/m² -KilocandelaPerSquareMeter=kCd/m² -MicrocandelaPerSquareMeter=µCd/m² -MillicandelaPerSquareMeter=mCd/m² -NanocandelaPerSquareMeter=nCd/m² -Nit=nt +CandelasPerSquareFoot=Cd/ft² +CandelasPerSquareInch=Cd/in² +CandelasPerSquareMeter=Cd/m² +CenticandelasPerSquareMeter=cCd/m² +DecicandelasPerSquareMeter=dCd/m² +KilocandelasPerSquareMeter=kCd/m² +MicrocandelasPerSquareMeter=µCd/m² +MillicandelasPerSquareMeter=mCd/m² +NanocandelasPerSquareMeter=nCd/m² +Nits=nt diff --git a/UnitsNet/GeneratedCode/Resources/Luminosity.restext b/UnitsNet/GeneratedCode/Resources/Luminosity.restext index 34fa337fe1..a538eac196 100644 --- a/UnitsNet/GeneratedCode/Resources/Luminosity.restext +++ b/UnitsNet/GeneratedCode/Resources/Luminosity.restext @@ -1,14 +1,14 @@ -Decawatt=daW -Deciwatt=dW -Femtowatt=fW -Gigawatt=GW -Kilowatt=kW -Megawatt=MW -Microwatt=µW -Milliwatt=mW -Nanowatt=nW -Petawatt=PW -Picowatt=pW -SolarLuminosity=L⊙ -Terawatt=TW -Watt=W +Decawatts=daW +Deciwatts=dW +Femtowatts=fW +Gigawatts=GW +Kilowatts=kW +Megawatts=MW +Microwatts=µW +Milliwatts=mW +Nanowatts=nW +Petawatts=PW +Picowatts=pW +SolarLuminosities=L⊙ +Terawatts=TW +Watts=W diff --git a/UnitsNet/GeneratedCode/Resources/LuminousFlux.restext b/UnitsNet/GeneratedCode/Resources/LuminousFlux.restext index 447b13f838..1b80e4d994 100644 --- a/UnitsNet/GeneratedCode/Resources/LuminousFlux.restext +++ b/UnitsNet/GeneratedCode/Resources/LuminousFlux.restext @@ -1 +1 @@ -Lumen=lm +Lumens=lm diff --git a/UnitsNet/GeneratedCode/Resources/MagneticField.restext b/UnitsNet/GeneratedCode/Resources/MagneticField.restext index 4af073c9a1..7dc507ba62 100644 --- a/UnitsNet/GeneratedCode/Resources/MagneticField.restext +++ b/UnitsNet/GeneratedCode/Resources/MagneticField.restext @@ -1,6 +1,6 @@ -Gauss=G -Microtesla=µT -Milligauss=mG -Millitesla=mT -Nanotesla=nT -Tesla=T +Gausses=G +Microteslas=µT +Milligausses=mG +Milliteslas=mT +Nanoteslas=nT +Teslas=T diff --git a/UnitsNet/GeneratedCode/Resources/MagneticFlux.restext b/UnitsNet/GeneratedCode/Resources/MagneticFlux.restext index 060a0b586b..a0ff58d09b 100644 --- a/UnitsNet/GeneratedCode/Resources/MagneticFlux.restext +++ b/UnitsNet/GeneratedCode/Resources/MagneticFlux.restext @@ -1 +1 @@ -Weber=Wb +Webers=Wb diff --git a/UnitsNet/GeneratedCode/Resources/Magnetization.restext b/UnitsNet/GeneratedCode/Resources/Magnetization.restext index 81c5ef341c..3551e5ae9e 100644 --- a/UnitsNet/GeneratedCode/Resources/Magnetization.restext +++ b/UnitsNet/GeneratedCode/Resources/Magnetization.restext @@ -1 +1 @@ -AmperePerMeter=A/m +AmperesPerMeter=A/m diff --git a/UnitsNet/GeneratedCode/Resources/Mass.restext b/UnitsNet/GeneratedCode/Resources/Mass.restext index c873ef6b62..ae1cee2427 100644 --- a/UnitsNet/GeneratedCode/Resources/Mass.restext +++ b/UnitsNet/GeneratedCode/Resources/Mass.restext @@ -1,25 +1,25 @@ -Centigram=cg -Decagram=dag -Decigram=dg -EarthMass=em -Grain=gr -Gram=g -Hectogram=hg -Kilogram=kg -Kilopound=klb,klbs,klbm -Kilotonne=kt +Centigrams=cg +Decagrams=dag +Decigrams=dg +EarthMasses=em +Grains=gr +Grams=g +Hectograms=hg +Kilograms=kg +Kilopounds=klb,klbs,klbm +Kilotonnes=kt LongHundredweight=cwt -LongTon=long tn -Megapound=Mlb,Mlbs,Mlbm -Megatonne=Mt -Microgram=µg -Milligram=mg -Nanogram=ng -Ounce=oz -Pound=lb,lbs,lbm +LongTons=long tn +Megapounds=Mlb,Mlbs,Mlbm +Megatonnes=Mt +Micrograms=µg +Milligrams=mg +Nanograms=ng +Ounces=oz +Pounds=lb,lbs,lbm ShortHundredweight=cwt -ShortTon=t (short),short tn,ST -Slug=slug -SolarMass=M☉,M⊙ +ShortTons=t (short),short tn,ST +Slugs=slug +SolarMasses=M☉,M⊙ Stone=st -Tonne=t +Tonnes=t diff --git a/UnitsNet/GeneratedCode/Resources/Mass.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Mass.ru-RU.restext index b1b75b0996..18c80f54b6 100644 --- a/UnitsNet/GeneratedCode/Resources/Mass.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Mass.ru-RU.restext @@ -1,17 +1,17 @@ -Centigram=сг -Decagram=даг -Decigram=дг -Gram=г -Hectogram=гг -Kilogram=кг -Kilopound=кфунт -Kilotonne=кт -LongTon=тонна большая -Megapound=Мфунт -Megatonne=Мт -Microgram=мкг -Milligram=мг -Nanogram=нг -Pound=фунт -ShortTon=тонна малая -Tonne=т +Centigrams=сг +Decagrams=даг +Decigrams=дг +Grams=г +Hectograms=гг +Kilograms=кг +Kilopounds=кфунт +Kilotonnes=кт +LongTons=тонна большая +Megapounds=Мфунт +Megatonnes=Мт +Micrograms=мкг +Milligrams=мг +Nanograms=нг +Pounds=фунт +ShortTons=тонна малая +Tonnes=т diff --git a/UnitsNet/GeneratedCode/Resources/Mass.zh-CN.restext b/UnitsNet/GeneratedCode/Resources/Mass.zh-CN.restext index 3ac11fb634..348f468866 100644 --- a/UnitsNet/GeneratedCode/Resources/Mass.zh-CN.restext +++ b/UnitsNet/GeneratedCode/Resources/Mass.zh-CN.restext @@ -1,18 +1,18 @@ -Centigram=厘克 -Decagram=十克 -Decigram=分克 -Gram=克 -Hectogram=百克 -Kilogram=千克 -Kilopound=千磅 -Kilotonne=千吨 -LongTon=长吨 -Megapound=兆磅 -Megatonne=兆吨 -Microgram=微克 -Milligram=毫克 -Nanogram=纳克 -Ounce=盎司 -Pound=磅 -ShortTon=短吨 -Tonne=吨 +Centigrams=厘克 +Decagrams=十克 +Decigrams=分克 +Grams=克 +Hectograms=百克 +Kilograms=千克 +Kilopounds=千磅 +Kilotonnes=千吨 +LongTons=长吨 +Megapounds=兆磅 +Megatonnes=兆吨 +Micrograms=微克 +Milligrams=毫克 +Nanograms=纳克 +Ounces=盎司 +Pounds=磅 +ShortTons=短吨 +Tonnes=吨 diff --git a/UnitsNet/GeneratedCode/Resources/MassConcentration.restext b/UnitsNet/GeneratedCode/Resources/MassConcentration.restext index 7e6b02571e..bad8eb5e1d 100644 --- a/UnitsNet/GeneratedCode/Resources/MassConcentration.restext +++ b/UnitsNet/GeneratedCode/Resources/MassConcentration.restext @@ -1,49 +1,49 @@ -CentigramPerDeciliter=cg/dL -CentigramPerLiter=cg/L -CentigramPerMicroliter=cg/μL -CentigramPerMilliliter=cg/mL -DecigramPerDeciliter=dg/dL -DecigramPerLiter=dg/L -DecigramPerMicroliter=dg/μL -DecigramPerMilliliter=dg/mL -GramPerCubicCentimeter=g/cm³ -GramPerCubicMeter=g/m³ -GramPerCubicMillimeter=g/mm³ -GramPerDeciliter=g/dL -GramPerLiter=g/L -GramPerMicroliter=g/μL -GramPerMilliliter=g/mL -KilogramPerCubicCentimeter=kg/cm³ -KilogramPerCubicMeter=kg/m³ -KilogramPerCubicMillimeter=kg/mm³ -KilogramPerLiter=kg/L -KilopoundPerCubicFoot=kip/ft³ -KilopoundPerCubicInch=kip/in³ -MicrogramPerCubicMeter=µg/m³ -MicrogramPerDeciliter=µg/dL -MicrogramPerLiter=µg/L -MicrogramPerMicroliter=µg/μL -MicrogramPerMilliliter=µg/mL -MilligramPerCubicMeter=mg/m³ -MilligramPerDeciliter=mg/dL -MilligramPerLiter=mg/L -MilligramPerMicroliter=mg/μL -MilligramPerMilliliter=mg/mL -NanogramPerDeciliter=ng/dL -NanogramPerLiter=ng/L -NanogramPerMicroliter=ng/μL -NanogramPerMilliliter=ng/mL -OuncePerImperialGallon=oz/gal (imp.) -OuncePerUSGallon=oz/gal (U.S.) -PicogramPerDeciliter=pg/dL -PicogramPerLiter=pg/L -PicogramPerMicroliter=pg/μL -PicogramPerMilliliter=pg/mL -PoundPerCubicFoot=lb/ft³ -PoundPerCubicInch=lb/in³ -PoundPerImperialGallon=ppg (imp.) -PoundPerUSGallon=ppg (U.S.) -SlugPerCubicFoot=slug/ft³ -TonnePerCubicCentimeter=t/cm³ -TonnePerCubicMeter=t/m³ -TonnePerCubicMillimeter=t/mm³ +CentigramsPerDeciliter=cg/dL +CentigramsPerLiter=cg/L +CentigramsPerMicroliter=cg/μL +CentigramsPerMilliliter=cg/mL +DecigramsPerDeciliter=dg/dL +DecigramsPerLiter=dg/L +DecigramsPerMicroliter=dg/μL +DecigramsPerMilliliter=dg/mL +GramsPerCubicCentimeter=g/cm³ +GramsPerCubicMeter=g/m³ +GramsPerCubicMillimeter=g/mm³ +GramsPerDeciliter=g/dL +GramsPerLiter=g/L +GramsPerMicroliter=g/μL +GramsPerMilliliter=g/mL +KilogramsPerCubicCentimeter=kg/cm³ +KilogramsPerCubicMeter=kg/m³ +KilogramsPerCubicMillimeter=kg/mm³ +KilogramsPerLiter=kg/L +KilopoundsPerCubicFoot=kip/ft³ +KilopoundsPerCubicInch=kip/in³ +MicrogramsPerCubicMeter=µg/m³ +MicrogramsPerDeciliter=µg/dL +MicrogramsPerLiter=µg/L +MicrogramsPerMicroliter=µg/μL +MicrogramsPerMilliliter=µg/mL +MilligramsPerCubicMeter=mg/m³ +MilligramsPerDeciliter=mg/dL +MilligramsPerLiter=mg/L +MilligramsPerMicroliter=mg/μL +MilligramsPerMilliliter=mg/mL +NanogramsPerDeciliter=ng/dL +NanogramsPerLiter=ng/L +NanogramsPerMicroliter=ng/μL +NanogramsPerMilliliter=ng/mL +OuncesPerImperialGallon=oz/gal (imp.) +OuncesPerUSGallon=oz/gal (U.S.) +PicogramsPerDeciliter=pg/dL +PicogramsPerLiter=pg/L +PicogramsPerMicroliter=pg/μL +PicogramsPerMilliliter=pg/mL +PoundsPerCubicFoot=lb/ft³ +PoundsPerCubicInch=lb/in³ +PoundsPerImperialGallon=ppg (imp.) +PoundsPerUSGallon=ppg (U.S.) +SlugsPerCubicFoot=slug/ft³ +TonnesPerCubicCentimeter=t/cm³ +TonnesPerCubicMeter=t/m³ +TonnesPerCubicMillimeter=t/mm³ diff --git a/UnitsNet/GeneratedCode/Resources/MassConcentration.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/MassConcentration.ru-RU.restext index fbe5dcd91e..cf9e285a11 100644 --- a/UnitsNet/GeneratedCode/Resources/MassConcentration.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/MassConcentration.ru-RU.restext @@ -1,4 +1,4 @@ -GramPerCubicMeter=г/м³ -KilogramPerCubicMeter=кг/м³ -MicrogramPerCubicMeter=мкг/м³ -MilligramPerCubicMeter=мг/м³ +GramsPerCubicMeter=г/м³ +KilogramsPerCubicMeter=кг/м³ +MicrogramsPerCubicMeter=мкг/м³ +MilligramsPerCubicMeter=мг/м³ diff --git a/UnitsNet/GeneratedCode/Resources/MassFlow.restext b/UnitsNet/GeneratedCode/Resources/MassFlow.restext index ccfdeebb65..73ed7b0a44 100644 --- a/UnitsNet/GeneratedCode/Resources/MassFlow.restext +++ b/UnitsNet/GeneratedCode/Resources/MassFlow.restext @@ -1,33 +1,33 @@ -CentigramPerDay=cg/d -CentigramPerSecond=cg/s,cg/S -DecagramPerDay=dag/d -DecagramPerSecond=dag/s,dag/S -DecigramPerDay=dg/d -DecigramPerSecond=dg/s,dg/S -GramPerDay=g/d -GramPerHour=g/h -GramPerSecond=g/s,g/S -HectogramPerDay=hg/d -HectogramPerSecond=hg/s,hg/S -KilogramPerDay=kg/d -KilogramPerHour=kg/h -KilogramPerMinute=kg/min -KilogramPerSecond=kg/s,kg/S -MegagramPerDay=Mg/d -MegapoundPerDay=Mlb/d -MegapoundPerHour=Mlb/h -MegapoundPerMinute=Mlb/min -MegapoundPerSecond=Mlb/s -MicrogramPerDay=µg/d -MicrogramPerSecond=µg/s,µg/S -MilligramPerDay=mg/d -MilligramPerSecond=mg/s,mg/S -NanogramPerDay=ng/d -NanogramPerSecond=ng/s,ng/S -PoundPerDay=lb/d -PoundPerHour=lb/h -PoundPerMinute=lb/min -PoundPerSecond=lb/s -ShortTonPerHour=short tn/h -TonnePerDay=t/d -TonnePerHour=t/h +CentigramsPerDay=cg/d +CentigramsPerSecond=cg/s,cg/S +DecagramsPerDay=dag/d +DecagramsPerSecond=dag/s,dag/S +DecigramsPerDay=dg/d +DecigramsPerSecond=dg/s,dg/S +GramsPerDay=g/d +GramsPerHour=g/h +GramsPerSecond=g/s,g/S +HectogramsPerDay=hg/d +HectogramsPerSecond=hg/s,hg/S +KilogramsPerDay=kg/d +KilogramsPerHour=kg/h +KilogramsPerMinute=kg/min +KilogramsPerSecond=kg/s,kg/S +MegagramsPerDay=Mg/d +MegapoundsPerDay=Mlb/d +MegapoundsPerHour=Mlb/h +MegapoundsPerMinute=Mlb/min +MegapoundsPerSecond=Mlb/s +MicrogramsPerDay=µg/d +MicrogramsPerSecond=µg/s,µg/S +MilligramsPerDay=mg/d +MilligramsPerSecond=mg/s,mg/S +NanogramsPerDay=ng/d +NanogramsPerSecond=ng/s,ng/S +PoundsPerDay=lb/d +PoundsPerHour=lb/h +PoundsPerMinute=lb/min +PoundsPerSecond=lb/s +ShortTonsPerHour=short tn/h +TonnesPerDay=t/d +TonnesPerHour=t/h diff --git a/UnitsNet/GeneratedCode/Resources/MassFlow.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/MassFlow.ru-RU.restext index 208299ff65..ffc8827f39 100644 --- a/UnitsNet/GeneratedCode/Resources/MassFlow.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/MassFlow.ru-RU.restext @@ -1,2 +1,2 @@ -KilogramPerHour=кг/ч -KilogramPerMinute=кг/мин +KilogramsPerHour=кг/ч +KilogramsPerMinute=кг/мин diff --git a/UnitsNet/GeneratedCode/Resources/MassFlux.restext b/UnitsNet/GeneratedCode/Resources/MassFlux.restext index 614e02f2da..4f66814fa4 100644 --- a/UnitsNet/GeneratedCode/Resources/MassFlux.restext +++ b/UnitsNet/GeneratedCode/Resources/MassFlux.restext @@ -1,12 +1,12 @@ -GramPerHourPerSquareCentimeter=g·h⁻¹·cm⁻² -GramPerHourPerSquareMeter=g·h⁻¹·m⁻² -GramPerHourPerSquareMillimeter=g·h⁻¹·mm⁻² -GramPerSecondPerSquareCentimeter=g·s⁻¹·cm⁻² -GramPerSecondPerSquareMeter=g·s⁻¹·m⁻² -GramPerSecondPerSquareMillimeter=g·s⁻¹·mm⁻² -KilogramPerHourPerSquareCentimeter=kg·h⁻¹·cm⁻² -KilogramPerHourPerSquareMeter=kg·h⁻¹·m⁻² -KilogramPerHourPerSquareMillimeter=kg·h⁻¹·mm⁻² -KilogramPerSecondPerSquareCentimeter=kg·s⁻¹·cm⁻² -KilogramPerSecondPerSquareMeter=kg·s⁻¹·m⁻² -KilogramPerSecondPerSquareMillimeter=kg·s⁻¹·mm⁻² +GramsPerHourPerSquareCentimeter=g·h⁻¹·cm⁻² +GramsPerHourPerSquareMeter=g·h⁻¹·m⁻² +GramsPerHourPerSquareMillimeter=g·h⁻¹·mm⁻² +GramsPerSecondPerSquareCentimeter=g·s⁻¹·cm⁻² +GramsPerSecondPerSquareMeter=g·s⁻¹·m⁻² +GramsPerSecondPerSquareMillimeter=g·s⁻¹·mm⁻² +KilogramsPerHourPerSquareCentimeter=kg·h⁻¹·cm⁻² +KilogramsPerHourPerSquareMeter=kg·h⁻¹·m⁻² +KilogramsPerHourPerSquareMillimeter=kg·h⁻¹·mm⁻² +KilogramsPerSecondPerSquareCentimeter=kg·s⁻¹·cm⁻² +KilogramsPerSecondPerSquareMeter=kg·s⁻¹·m⁻² +KilogramsPerSecondPerSquareMillimeter=kg·s⁻¹·mm⁻² diff --git a/UnitsNet/GeneratedCode/Resources/MassFraction.restext b/UnitsNet/GeneratedCode/Resources/MassFraction.restext index 3f6536253f..dc3f4590a1 100644 --- a/UnitsNet/GeneratedCode/Resources/MassFraction.restext +++ b/UnitsNet/GeneratedCode/Resources/MassFraction.restext @@ -1,24 +1,24 @@ -CentigramPerGram=cg/g -CentigramPerKilogram=cg/kg -DecagramPerGram=dag/g -DecagramPerKilogram=dag/kg -DecigramPerGram=dg/g -DecigramPerKilogram=dg/kg -DecimalFraction= -GramPerGram=g/g -GramPerKilogram=g/kg -HectogramPerGram=hg/g -HectogramPerKilogram=hg/kg -KilogramPerGram=kg/g -KilogramPerKilogram=kg/kg -MicrogramPerGram=µg/g -MicrogramPerKilogram=µg/kg -MilligramPerGram=mg/g -MilligramPerKilogram=mg/kg -NanogramPerGram=ng/g -NanogramPerKilogram=ng/kg -PartPerBillion=ppb -PartPerMillion=ppm -PartPerThousand=‰ -PartPerTrillion=ppt +CentigramsPerGram=cg/g +CentigramsPerKilogram=cg/kg +DecagramsPerGram=dag/g +DecagramsPerKilogram=dag/kg +DecigramsPerGram=dg/g +DecigramsPerKilogram=dg/kg +DecimalFractions= +GramsPerGram=g/g +GramsPerKilogram=g/kg +HectogramsPerGram=hg/g +HectogramsPerKilogram=hg/kg +KilogramsPerGram=kg/g +KilogramsPerKilogram=kg/kg +MicrogramsPerGram=µg/g +MicrogramsPerKilogram=µg/kg +MilligramsPerGram=mg/g +MilligramsPerKilogram=mg/kg +NanogramsPerGram=ng/g +NanogramsPerKilogram=ng/kg +PartsPerBillion=ppb +PartsPerMillion=ppm +PartsPerThousand=‰ +PartsPerTrillion=ppt Percent=%,% (w/w) diff --git a/UnitsNet/GeneratedCode/Resources/MassMomentOfInertia.restext b/UnitsNet/GeneratedCode/Resources/MassMomentOfInertia.restext index 006ad0fd63..bfe8e0bae8 100644 --- a/UnitsNet/GeneratedCode/Resources/MassMomentOfInertia.restext +++ b/UnitsNet/GeneratedCode/Resources/MassMomentOfInertia.restext @@ -1,28 +1,28 @@ -GramSquareCentimeter=g·cm² -GramSquareDecimeter=g·dm² -GramSquareMeter=g·m² -GramSquareMillimeter=g·mm² -KilogramSquareCentimeter=kg·cm² -KilogramSquareDecimeter=kg·dm² -KilogramSquareMeter=kg·m² -KilogramSquareMillimeter=kg·mm² -KilotonneSquareCentimeter=kt·cm² -KilotonneSquareDecimeter=kt·dm² -KilotonneSquareMeter=kt·m² -KilotonneSquareMilimeter=kt·mm² -MegatonneSquareCentimeter=Mt·cm² -MegatonneSquareDecimeter=Mt·dm² -MegatonneSquareMeter=Mt·m² -MegatonneSquareMilimeter=Mt·mm² -MilligramSquareCentimeter=mg·cm² -MilligramSquareDecimeter=mg·dm² -MilligramSquareMeter=mg·m² -MilligramSquareMillimeter=mg·mm² -PoundSquareFoot=lb·ft² -PoundSquareInch=lb·in² -SlugSquareFoot=slug·ft² -SlugSquareInch=slug·in² -TonneSquareCentimeter=t·cm² -TonneSquareDecimeter=t·dm² -TonneSquareMeter=t·m² -TonneSquareMilimeter=t·mm² +GramSquareCentimeters=g·cm² +GramSquareDecimeters=g·dm² +GramSquareMeters=g·m² +GramSquareMillimeters=g·mm² +KilogramSquareCentimeters=kg·cm² +KilogramSquareDecimeters=kg·dm² +KilogramSquareMeters=kg·m² +KilogramSquareMillimeters=kg·mm² +KilotonneSquareCentimeters=kt·cm² +KilotonneSquareDecimeters=kt·dm² +KilotonneSquareMeters=kt·m² +KilotonneSquareMilimeters=kt·mm² +MegatonneSquareCentimeters=Mt·cm² +MegatonneSquareDecimeters=Mt·dm² +MegatonneSquareMeters=Mt·m² +MegatonneSquareMilimeters=Mt·mm² +MilligramSquareCentimeters=mg·cm² +MilligramSquareDecimeters=mg·dm² +MilligramSquareMeters=mg·m² +MilligramSquareMillimeters=mg·mm² +PoundSquareFeet=lb·ft² +PoundSquareInches=lb·in² +SlugSquareFeet=slug·ft² +SlugSquareInches=slug·in² +TonneSquareCentimeters=t·cm² +TonneSquareDecimeters=t·dm² +TonneSquareMeters=t·m² +TonneSquareMilimeters=t·mm² diff --git a/UnitsNet/GeneratedCode/Resources/MolarEnergy.restext b/UnitsNet/GeneratedCode/Resources/MolarEnergy.restext index 24f12dcf09..1d5160a9af 100644 --- a/UnitsNet/GeneratedCode/Resources/MolarEnergy.restext +++ b/UnitsNet/GeneratedCode/Resources/MolarEnergy.restext @@ -1,3 +1,3 @@ -JoulePerMole=J/mol -KilojoulePerMole=kJ/mol -MegajoulePerMole=MJ/mol +JoulesPerMole=J/mol +KilojoulesPerMole=kJ/mol +MegajoulesPerMole=MJ/mol diff --git a/UnitsNet/GeneratedCode/Resources/MolarEntropy.restext b/UnitsNet/GeneratedCode/Resources/MolarEntropy.restext index caf3862d28..8c521b457c 100644 --- a/UnitsNet/GeneratedCode/Resources/MolarEntropy.restext +++ b/UnitsNet/GeneratedCode/Resources/MolarEntropy.restext @@ -1,3 +1,3 @@ -JoulePerMoleKelvin=J/(mol*K) -KilojoulePerMoleKelvin=kJ/(mol*K) -MegajoulePerMoleKelvin=MJ/(mol*K) +JoulesPerMoleKelvin=J/(mol*K) +KilojoulesPerMoleKelvin=kJ/(mol*K) +MegajoulesPerMoleKelvin=MJ/(mol*K) diff --git a/UnitsNet/GeneratedCode/Resources/MolarFlow.restext b/UnitsNet/GeneratedCode/Resources/MolarFlow.restext index c64822f163..ebbc452809 100644 --- a/UnitsNet/GeneratedCode/Resources/MolarFlow.restext +++ b/UnitsNet/GeneratedCode/Resources/MolarFlow.restext @@ -1,9 +1,9 @@ -KilomolePerHour=kkmol/h -KilomolePerMinute=kmol/min -KilomolePerSecond=kmol/s -MolePerHour=kmol/h -MolePerMinute=mol/min -MolePerSecond=mol/s -PoundMolePerHour=lbmol/h -PoundMolePerMinute=lbmol/min -PoundMolePerSecond=lbmol/s +KilomolesPerHour=kkmol/h +KilomolesPerMinute=kmol/min +KilomolesPerSecond=kmol/s +MolesPerHour=kmol/h +MolesPerMinute=mol/min +MolesPerSecond=mol/s +PoundMolesPerHour=lbmol/h +PoundMolesPerMinute=lbmol/min +PoundMolesPerSecond=lbmol/s diff --git a/UnitsNet/GeneratedCode/Resources/MolarMass.restext b/UnitsNet/GeneratedCode/Resources/MolarMass.restext index 54a0cea3b6..94dcf8c7c5 100644 --- a/UnitsNet/GeneratedCode/Resources/MolarMass.restext +++ b/UnitsNet/GeneratedCode/Resources/MolarMass.restext @@ -1,13 +1,13 @@ -CentigramPerMole=cg/mol -DecagramPerMole=dag/mol -DecigramPerMole=dg/mol -GramPerMole=g/mol -HectogramPerMole=hg/mol -KilogramPerKilomole=kg/kmol -KilogramPerMole=kg/mol -KilopoundPerMole=klb/mol -MegapoundPerMole=Mlb/mol -MicrogramPerMole=µg/mol -MilligramPerMole=mg/mol -NanogramPerMole=ng/mol -PoundPerMole=lb/mol +CentigramsPerMole=cg/mol +DecagramsPerMole=dag/mol +DecigramsPerMole=dg/mol +GramsPerMole=g/mol +HectogramsPerMole=hg/mol +KilogramsPerKilomole=kg/kmol +KilogramsPerMole=kg/mol +KilopoundsPerMole=klb/mol +MegapoundsPerMole=Mlb/mol +MicrogramsPerMole=µg/mol +MilligramsPerMole=mg/mol +NanogramsPerMole=ng/mol +PoundsPerMole=lb/mol diff --git a/UnitsNet/GeneratedCode/Resources/MolarMass.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/MolarMass.ru-RU.restext index 60ffaccef1..978f3a81e6 100644 --- a/UnitsNet/GeneratedCode/Resources/MolarMass.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/MolarMass.ru-RU.restext @@ -1,12 +1,12 @@ -CentigramPerMole=сг/моль -DecagramPerMole=даг/моль -DecigramPerMole=дг/моль -GramPerMole=г/моль -HectogramPerMole=гг/моль -KilogramPerMole=кг/моль -KilopoundPerMole=кфунт/моль -MegapoundPerMole=Мфунт/моль -MicrogramPerMole=мкг/моль -MilligramPerMole=мг/моль -NanogramPerMole=нг/моль -PoundPerMole=фунт/моль +CentigramsPerMole=сг/моль +DecagramsPerMole=даг/моль +DecigramsPerMole=дг/моль +GramsPerMole=г/моль +HectogramsPerMole=гг/моль +KilogramsPerMole=кг/моль +KilopoundsPerMole=кфунт/моль +MegapoundsPerMole=Мфунт/моль +MicrogramsPerMole=мкг/моль +MilligramsPerMole=мг/моль +NanogramsPerMole=нг/моль +PoundsPerMole=фунт/моль diff --git a/UnitsNet/GeneratedCode/Resources/Molarity.restext b/UnitsNet/GeneratedCode/Resources/Molarity.restext index d87d50fc75..5778892f07 100644 --- a/UnitsNet/GeneratedCode/Resources/Molarity.restext +++ b/UnitsNet/GeneratedCode/Resources/Molarity.restext @@ -1,11 +1,11 @@ -CentimolePerLiter=cmol/L,cM -DecimolePerLiter=dmol/L,dM -FemtomolePerLiter=fmol/L,fM -KilomolePerCubicMeter=kmol/m³ -MicromolePerLiter=µmol/L,µM -MillimolePerLiter=mmol/L,mM -MolePerCubicMeter=mol/m³ -MolePerLiter=mol/L,M -NanomolePerLiter=nmol/L,nM -PicomolePerLiter=pmol/L,pM -PoundMolePerCubicFoot=lbmol/ft³ +CentimolesPerLiter=cmol/L,cM +DecimolesPerLiter=dmol/L,dM +FemtomolesPerLiter=fmol/L,fM +KilomolesPerCubicMeter=kmol/m³ +MicromolesPerLiter=µmol/L,µM +MillimolesPerLiter=mmol/L,mM +MolesPerCubicMeter=mol/m³ +MolesPerLiter=mol/L,M +NanomolesPerLiter=nmol/L,nM +PicomolesPerLiter=pmol/L,pM +PoundMolesPerCubicFoot=lbmol/ft³ diff --git a/UnitsNet/GeneratedCode/Resources/Permeability.restext b/UnitsNet/GeneratedCode/Resources/Permeability.restext index 2174805a93..286ef6a3f1 100644 --- a/UnitsNet/GeneratedCode/Resources/Permeability.restext +++ b/UnitsNet/GeneratedCode/Resources/Permeability.restext @@ -1 +1 @@ -HenryPerMeter=H/m +HenriesPerMeter=H/m diff --git a/UnitsNet/GeneratedCode/Resources/Permittivity.restext b/UnitsNet/GeneratedCode/Resources/Permittivity.restext index 6c3d3aa674..b7096d1f8a 100644 --- a/UnitsNet/GeneratedCode/Resources/Permittivity.restext +++ b/UnitsNet/GeneratedCode/Resources/Permittivity.restext @@ -1 +1 @@ -FaradPerMeter=F/m +FaradsPerMeter=F/m diff --git a/UnitsNet/GeneratedCode/Resources/PorousMediumPermeability.restext b/UnitsNet/GeneratedCode/Resources/PorousMediumPermeability.restext index 7dc7f0d9af..6e3648f252 100644 --- a/UnitsNet/GeneratedCode/Resources/PorousMediumPermeability.restext +++ b/UnitsNet/GeneratedCode/Resources/PorousMediumPermeability.restext @@ -1,5 +1,5 @@ -Darcy=D -Microdarcy=µD -Millidarcy=mD -SquareCentimeter=cm² -SquareMeter=m² +Darcys=D +Microdarcys=µD +Millidarcys=mD +SquareCentimeters=cm² +SquareMeters=m² diff --git a/UnitsNet/GeneratedCode/Resources/Power.restext b/UnitsNet/GeneratedCode/Resources/Power.restext index fbc338dff1..cb46946705 100644 --- a/UnitsNet/GeneratedCode/Resources/Power.restext +++ b/UnitsNet/GeneratedCode/Resources/Power.restext @@ -1,26 +1,26 @@ BoilerHorsepower=hp(S) -BritishThermalUnitPerHour=Btu/h,Btu/hr -Decawatt=daW -Deciwatt=dW +BritishThermalUnitsPerHour=Btu/h,Btu/hr +Decawatts=daW +Deciwatts=dW ElectricalHorsepower=hp(E) -Femtowatt=fW -GigajoulePerHour=GJ/h -Gigawatt=GW +Femtowatts=fW +GigajoulesPerHour=GJ/h +Gigawatts=GW HydraulicHorsepower=hp(H) -JoulePerHour=J/h -KilobritishThermalUnitPerHour=kBtu/h,kBtu/hr -KilojoulePerHour=kJ/h -Kilowatt=kW +JoulesPerHour=J/h +KilobritishThermalUnitsPerHour=kBtu/h,kBtu/hr +KilojoulesPerHour=kJ/h +Kilowatts=kW MechanicalHorsepower=hp(I) -MegabritishThermalUnitPerHour=MBtu/h,MBtu/hr -MegajoulePerHour=MJ/h -Megawatt=MW +MegabritishThermalUnitsPerHour=MBtu/h,MBtu/hr +MegajoulesPerHour=MJ/h +Megawatts=MW MetricHorsepower=hp(M) -Microwatt=µW -MillijoulePerHour=mJ/h -Milliwatt=mW -Nanowatt=nW -Petawatt=PW -Picowatt=pW -Terawatt=TW -Watt=W +Microwatts=µW +MillijoulesPerHour=mJ/h +Milliwatts=mW +Nanowatts=nW +Petawatts=PW +Picowatts=pW +Terawatts=TW +Watts=W diff --git a/UnitsNet/GeneratedCode/Resources/PowerDensity.restext b/UnitsNet/GeneratedCode/Resources/PowerDensity.restext index 1851d48613..a0684fe787 100644 --- a/UnitsNet/GeneratedCode/Resources/PowerDensity.restext +++ b/UnitsNet/GeneratedCode/Resources/PowerDensity.restext @@ -1,44 +1,44 @@ -DecawattPerCubicFoot=daW/ft³ -DecawattPerCubicInch=daW/in³ -DecawattPerCubicMeter=daW/m³ -DecawattPerLiter=daW/l -DeciwattPerCubicFoot=dW/ft³ -DeciwattPerCubicInch=dW/in³ -DeciwattPerCubicMeter=dW/m³ -DeciwattPerLiter=dW/l -GigawattPerCubicFoot=GW/ft³ -GigawattPerCubicInch=GW/in³ -GigawattPerCubicMeter=GW/m³ -GigawattPerLiter=GW/l -KilowattPerCubicFoot=kW/ft³ -KilowattPerCubicInch=kW/in³ -KilowattPerCubicMeter=kW/m³ -KilowattPerLiter=kW/l -MegawattPerCubicFoot=MW/ft³ -MegawattPerCubicInch=MW/in³ -MegawattPerCubicMeter=MW/m³ -MegawattPerLiter=MW/l -MicrowattPerCubicFoot=µW/ft³ -MicrowattPerCubicInch=µW/in³ -MicrowattPerCubicMeter=µW/m³ -MicrowattPerLiter=µW/l -MilliwattPerCubicFoot=mW/ft³ -MilliwattPerCubicInch=mW/in³ -MilliwattPerCubicMeter=mW/m³ -MilliwattPerLiter=mW/l -NanowattPerCubicFoot=nW/ft³ -NanowattPerCubicInch=nW/in³ -NanowattPerCubicMeter=nW/m³ -NanowattPerLiter=nW/l -PicowattPerCubicFoot=pW/ft³ -PicowattPerCubicInch=pW/in³ -PicowattPerCubicMeter=pW/m³ -PicowattPerLiter=pW/l -TerawattPerCubicFoot=TW/ft³ -TerawattPerCubicInch=TW/in³ -TerawattPerCubicMeter=TW/m³ -TerawattPerLiter=TW/l -WattPerCubicFoot=W/ft³ -WattPerCubicInch=W/in³ -WattPerCubicMeter=W/m³ -WattPerLiter=W/l +DecawattsPerCubicFoot=daW/ft³ +DecawattsPerCubicInch=daW/in³ +DecawattsPerCubicMeter=daW/m³ +DecawattsPerLiter=daW/l +DeciwattsPerCubicFoot=dW/ft³ +DeciwattsPerCubicInch=dW/in³ +DeciwattsPerCubicMeter=dW/m³ +DeciwattsPerLiter=dW/l +GigawattsPerCubicFoot=GW/ft³ +GigawattsPerCubicInch=GW/in³ +GigawattsPerCubicMeter=GW/m³ +GigawattsPerLiter=GW/l +KilowattsPerCubicFoot=kW/ft³ +KilowattsPerCubicInch=kW/in³ +KilowattsPerCubicMeter=kW/m³ +KilowattsPerLiter=kW/l +MegawattsPerCubicFoot=MW/ft³ +MegawattsPerCubicInch=MW/in³ +MegawattsPerCubicMeter=MW/m³ +MegawattsPerLiter=MW/l +MicrowattsPerCubicFoot=µW/ft³ +MicrowattsPerCubicInch=µW/in³ +MicrowattsPerCubicMeter=µW/m³ +MicrowattsPerLiter=µW/l +MilliwattsPerCubicFoot=mW/ft³ +MilliwattsPerCubicInch=mW/in³ +MilliwattsPerCubicMeter=mW/m³ +MilliwattsPerLiter=mW/l +NanowattsPerCubicFoot=nW/ft³ +NanowattsPerCubicInch=nW/in³ +NanowattsPerCubicMeter=nW/m³ +NanowattsPerLiter=nW/l +PicowattsPerCubicFoot=pW/ft³ +PicowattsPerCubicInch=pW/in³ +PicowattsPerCubicMeter=pW/m³ +PicowattsPerLiter=pW/l +TerawattsPerCubicFoot=TW/ft³ +TerawattsPerCubicInch=TW/in³ +TerawattsPerCubicMeter=TW/m³ +TerawattsPerLiter=TW/l +WattsPerCubicFoot=W/ft³ +WattsPerCubicInch=W/in³ +WattsPerCubicMeter=W/m³ +WattsPerLiter=W/l diff --git a/UnitsNet/GeneratedCode/Resources/PowerRatio.restext b/UnitsNet/GeneratedCode/Resources/PowerRatio.restext index b581392ed8..bee494e892 100644 --- a/UnitsNet/GeneratedCode/Resources/PowerRatio.restext +++ b/UnitsNet/GeneratedCode/Resources/PowerRatio.restext @@ -1,2 +1,2 @@ -DecibelMilliwatt=dBmW,dBm -DecibelWatt=dBW +DecibelMilliwatts=dBmW,dBm +DecibelWatts=dBW diff --git a/UnitsNet/GeneratedCode/Resources/Pressure.restext b/UnitsNet/GeneratedCode/Resources/Pressure.restext index 1e76e06367..584104d6cc 100644 --- a/UnitsNet/GeneratedCode/Resources/Pressure.restext +++ b/UnitsNet/GeneratedCode/Resources/Pressure.restext @@ -1,49 +1,49 @@ -Atmosphere=atm -Bar=bar -Centibar=cbar -CentimeterOfWaterColumn=cmH₂O,cmH2O,cm wc,cm wg -Decapascal=daPa -Decibar=dbar -DynePerSquareCentimeter=dyn/cm² -FootOfElevation=ft of elevation -FootOfHead=ft of head -Gigapascal=GPa -Hectopascal=hPa -InchOfMercury=inHg -InchOfWaterColumn=inH2O,inch wc,wc -Kilobar=kbar -KilogramForcePerSquareCentimeter=kgf/cm² -KilogramForcePerSquareMeter=kgf/m² -KilogramForcePerSquareMillimeter=kgf/mm² -KilonewtonPerSquareCentimeter=kN/cm² -KilonewtonPerSquareMeter=kN/m² -KilonewtonPerSquareMillimeter=kN/mm² -Kilopascal=kPa -KilopoundForcePerSquareFoot=kipf/ft² -KilopoundForcePerSquareInch=ksi,kipf/in² -KilopoundForcePerSquareMil=kipf/mil² -Megabar=Mbar -MeganewtonPerSquareMeter=MN/m² -Megapascal=MPa -MeterOfElevation=m of elevation -MeterOfHead=m of head -MeterOfWaterColumn=mH₂O,mH2O,m wc,m wg -Microbar=µbar -Micropascal=µPa -Millibar=mbar -MillimeterOfMercury=mmHg -MillimeterOfWaterColumn=mmH₂O,mmH2O,mm wc,mm wg -Millipascal=mPa -NewtonPerSquareCentimeter=N/cm² -NewtonPerSquareMeter=N/m² -NewtonPerSquareMillimeter=N/mm² -Pascal=Pa -PoundForcePerSquareFoot=lb/ft² -PoundForcePerSquareInch=psi,lb/in² -PoundForcePerSquareMil=lb/mil²,lbs/mil² -PoundPerInchSecondSquared=lbm/(in·s²),lb/(in·s²) -TechnicalAtmosphere=at -TonneForcePerSquareCentimeter=tf/cm² -TonneForcePerSquareMeter=tf/m² -TonneForcePerSquareMillimeter=tf/mm² -Torr=torr +Atmospheres=atm +Bars=bar +Centibars=cbar +CentimetersOfWaterColumn=cmH₂O,cmH2O,cm wc,cm wg +Decapascals=daPa +Decibars=dbar +DynesPerSquareCentimeter=dyn/cm² +FeetOfElevation=ft of elevation +FeetOfHead=ft of head +Gigapascals=GPa +Hectopascals=hPa +InchesOfMercury=inHg +InchesOfWaterColumn=inH2O,inch wc,wc +Kilobars=kbar +KilogramsForcePerSquareCentimeter=kgf/cm² +KilogramsForcePerSquareMeter=kgf/m² +KilogramsForcePerSquareMillimeter=kgf/mm² +KilonewtonsPerSquareCentimeter=kN/cm² +KilonewtonsPerSquareMeter=kN/m² +KilonewtonsPerSquareMillimeter=kN/mm² +Kilopascals=kPa +KilopoundsForcePerSquareFoot=kipf/ft² +KilopoundsForcePerSquareInch=ksi,kipf/in² +KilopoundsForcePerSquareMil=kipf/mil² +Megabars=Mbar +MeganewtonsPerSquareMeter=MN/m² +Megapascals=MPa +MetersOfElevation=m of elevation +MetersOfHead=m of head +MetersOfWaterColumn=mH₂O,mH2O,m wc,m wg +Microbars=µbar +Micropascals=µPa +Millibars=mbar +MillimetersOfMercury=mmHg +MillimetersOfWaterColumn=mmH₂O,mmH2O,mm wc,mm wg +Millipascals=mPa +NewtonsPerSquareCentimeter=N/cm² +NewtonsPerSquareMeter=N/m² +NewtonsPerSquareMillimeter=N/mm² +Pascals=Pa +PoundsForcePerSquareFoot=lb/ft² +PoundsForcePerSquareInch=psi,lb/in² +PoundsForcePerSquareMil=lb/mil²,lbs/mil² +PoundsPerInchSecondSquared=lbm/(in·s²),lb/(in·s²) +TechnicalAtmospheres=at +TonnesForcePerSquareCentimeter=tf/cm² +TonnesForcePerSquareMeter=tf/m² +TonnesForcePerSquareMillimeter=tf/mm² +Torrs=torr diff --git a/UnitsNet/GeneratedCode/Resources/Pressure.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Pressure.ru-RU.restext index 48f0fafd28..7e4a13564c 100644 --- a/UnitsNet/GeneratedCode/Resources/Pressure.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Pressure.ru-RU.restext @@ -1,31 +1,31 @@ -Atmosphere=атм -Bar=бар -Centibar=сбар -Decapascal=даПа -Decibar=дбар -Gigapascal=ГПа -Hectopascal=гПа -Kilobar=кбар -KilogramForcePerSquareCentimeter=кгс/см² -KilogramForcePerSquareMeter=кгс/м² -KilogramForcePerSquareMillimeter=кгс/мм² -KilonewtonPerSquareCentimeter=кН/см² -KilonewtonPerSquareMeter=кН/м² -KilonewtonPerSquareMillimeter=кН/мм² -Kilopascal=кПа -KilopoundForcePerSquareInch=ksi,kipf/in² -Megabar=Мбар -MeganewtonPerSquareMeter=МН/м² -Megapascal=МПа -Microbar=мкбар -Micropascal=мкПа -Millibar=мбар -MillimeterOfMercury=мм рт.ст. -Millipascal=мПа -NewtonPerSquareCentimeter=Н/см² -NewtonPerSquareMeter=Н/м² -NewtonPerSquareMillimeter=Н/мм² -Pascal=Па -PoundForcePerSquareInch=psi,lb/in² -TechnicalAtmosphere=ат -Torr=торр +Atmospheres=атм +Bars=бар +Centibars=сбар +Decapascals=даПа +Decibars=дбар +Gigapascals=ГПа +Hectopascals=гПа +Kilobars=кбар +KilogramsForcePerSquareCentimeter=кгс/см² +KilogramsForcePerSquareMeter=кгс/м² +KilogramsForcePerSquareMillimeter=кгс/мм² +KilonewtonsPerSquareCentimeter=кН/см² +KilonewtonsPerSquareMeter=кН/м² +KilonewtonsPerSquareMillimeter=кН/мм² +Kilopascals=кПа +KilopoundsForcePerSquareInch=ksi,kipf/in² +Megabars=Мбар +MeganewtonsPerSquareMeter=МН/м² +Megapascals=МПа +Microbars=мкбар +Micropascals=мкПа +Millibars=мбар +MillimetersOfMercury=мм рт.ст. +Millipascals=мПа +NewtonsPerSquareCentimeter=Н/см² +NewtonsPerSquareMeter=Н/м² +NewtonsPerSquareMillimeter=Н/мм² +Pascals=Па +PoundsForcePerSquareInch=psi,lb/in² +TechnicalAtmospheres=ат +Torrs=торр diff --git a/UnitsNet/GeneratedCode/Resources/PressureChangeRate.restext b/UnitsNet/GeneratedCode/Resources/PressureChangeRate.restext index 117d2adfc5..04f57bca0e 100644 --- a/UnitsNet/GeneratedCode/Resources/PressureChangeRate.restext +++ b/UnitsNet/GeneratedCode/Resources/PressureChangeRate.restext @@ -1,14 +1,14 @@ -AtmospherePerSecond=atm/s -KilopascalPerMinute=kPa/min -KilopascalPerSecond=kPa/s -KilopoundForcePerSquareInchPerMinute=ksi/min,kipf/in²/min -KilopoundForcePerSquareInchPerSecond=ksi/s,kipf/in²/s -MegapascalPerMinute=MPa/min -MegapascalPerSecond=MPa/s -MegapoundForcePerSquareInchPerMinute=Mpsi/min,Mlb/in²/min -MegapoundForcePerSquareInchPerSecond=Mpsi/s,Mlb/in²/s -MillimeterOfMercuryPerSecond=mmHg/s -PascalPerMinute=Pa/min -PascalPerSecond=Pa/s -PoundForcePerSquareInchPerMinute=psi/min,lb/in²/min -PoundForcePerSquareInchPerSecond=psi/s,lb/in²/s +AtmospheresPerSecond=atm/s +KilopascalsPerMinute=kPa/min +KilopascalsPerSecond=kPa/s +KilopoundsForcePerSquareInchPerMinute=ksi/min,kipf/in²/min +KilopoundsForcePerSquareInchPerSecond=ksi/s,kipf/in²/s +MegapascalsPerMinute=MPa/min +MegapascalsPerSecond=MPa/s +MegapoundsForcePerSquareInchPerMinute=Mpsi/min,Mlb/in²/min +MegapoundsForcePerSquareInchPerSecond=Mpsi/s,Mlb/in²/s +MillimetersOfMercuryPerSecond=mmHg/s +PascalsPerMinute=Pa/min +PascalsPerSecond=Pa/s +PoundsForcePerSquareInchPerMinute=psi/min,lb/in²/min +PoundsForcePerSquareInchPerSecond=psi/s,lb/in²/s diff --git a/UnitsNet/GeneratedCode/Resources/PressureChangeRate.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/PressureChangeRate.ru-RU.restext index 3a5d5f30a9..096bd255b2 100644 --- a/UnitsNet/GeneratedCode/Resources/PressureChangeRate.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/PressureChangeRate.ru-RU.restext @@ -1,14 +1,14 @@ -AtmospherePerSecond=атм/с -KilopascalPerMinute=кПа/мин -KilopascalPerSecond=кПа/с -KilopoundForcePerSquareInchPerMinute=ksi/мин,kipf/in²/мин -KilopoundForcePerSquareInchPerSecond=ksi/с,kipf/in²/с -MegapascalPerMinute=МПа/мин -MegapascalPerSecond=МПа/с -MegapoundForcePerSquareInchPerMinute=Мpsi/мин,Мlb/in²/мин -MegapoundForcePerSquareInchPerSecond=Мpsi/с,Мlb/in²/с -MillimeterOfMercuryPerSecond=mmHg/с -PascalPerMinute=Па/мин -PascalPerSecond=Па/с -PoundForcePerSquareInchPerMinute=psi/мин,lb/in²/мин -PoundForcePerSquareInchPerSecond=psi/с,lb/in²/с +AtmospheresPerSecond=атм/с +KilopascalsPerMinute=кПа/мин +KilopascalsPerSecond=кПа/с +KilopoundsForcePerSquareInchPerMinute=ksi/мин,kipf/in²/мин +KilopoundsForcePerSquareInchPerSecond=ksi/с,kipf/in²/с +MegapascalsPerMinute=МПа/мин +MegapascalsPerSecond=МПа/с +MegapoundsForcePerSquareInchPerMinute=Мpsi/мин,Мlb/in²/мин +MegapoundsForcePerSquareInchPerSecond=Мpsi/с,Мlb/in²/с +MillimetersOfMercuryPerSecond=mmHg/с +PascalsPerMinute=Па/мин +PascalsPerSecond=Па/с +PoundsForcePerSquareInchPerMinute=psi/мин,lb/in²/мин +PoundsForcePerSquareInchPerSecond=psi/с,lb/in²/с diff --git a/UnitsNet/GeneratedCode/Resources/Ratio.restext b/UnitsNet/GeneratedCode/Resources/Ratio.restext index 788c6171d8..f9a93cd8ac 100644 --- a/UnitsNet/GeneratedCode/Resources/Ratio.restext +++ b/UnitsNet/GeneratedCode/Resources/Ratio.restext @@ -1,6 +1,6 @@ -DecimalFraction= -PartPerBillion=ppb -PartPerMillion=ppm -PartPerThousand=‰ -PartPerTrillion=ppt +DecimalFractions= +PartsPerBillion=ppb +PartsPerMillion=ppm +PartsPerThousand=‰ +PartsPerTrillion=ppt Percent=% diff --git a/UnitsNet/GeneratedCode/Resources/RatioChangeRate.restext b/UnitsNet/GeneratedCode/Resources/RatioChangeRate.restext index 2874835d4e..d45887b598 100644 --- a/UnitsNet/GeneratedCode/Resources/RatioChangeRate.restext +++ b/UnitsNet/GeneratedCode/Resources/RatioChangeRate.restext @@ -1,2 +1,2 @@ -DecimalFractionPerSecond=/s -PercentPerSecond=%/s +DecimalFractionsPerSecond=/s +PercentsPerSecond=%/s diff --git a/UnitsNet/GeneratedCode/Resources/ReactiveEnergy.restext b/UnitsNet/GeneratedCode/Resources/ReactiveEnergy.restext index 5af31030fb..1b5a2f86ac 100644 --- a/UnitsNet/GeneratedCode/Resources/ReactiveEnergy.restext +++ b/UnitsNet/GeneratedCode/Resources/ReactiveEnergy.restext @@ -1,3 +1,3 @@ -KilovoltampereReactiveHour=kvarh -MegavoltampereReactiveHour=Mvarh -VoltampereReactiveHour=varh +KilovoltampereReactiveHours=kvarh +MegavoltampereReactiveHours=Mvarh +VoltampereReactiveHours=varh diff --git a/UnitsNet/GeneratedCode/Resources/ReactivePower.restext b/UnitsNet/GeneratedCode/Resources/ReactivePower.restext index 3721773707..713ea6becd 100644 --- a/UnitsNet/GeneratedCode/Resources/ReactivePower.restext +++ b/UnitsNet/GeneratedCode/Resources/ReactivePower.restext @@ -1,4 +1,4 @@ -GigavoltampereReactive=Gvar -KilovoltampereReactive=kvar -MegavoltampereReactive=Mvar -VoltampereReactive=var +GigavoltamperesReactive=Gvar +KilovoltamperesReactive=kvar +MegavoltamperesReactive=Mvar +VoltamperesReactive=var diff --git a/UnitsNet/GeneratedCode/Resources/ReciprocalArea.restext b/UnitsNet/GeneratedCode/Resources/ReciprocalArea.restext index a3eeffda01..208266794d 100644 --- a/UnitsNet/GeneratedCode/Resources/ReciprocalArea.restext +++ b/UnitsNet/GeneratedCode/Resources/ReciprocalArea.restext @@ -1,11 +1,11 @@ -InverseSquareCentimeter=cm⁻² -InverseSquareDecimeter=dm⁻² -InverseSquareFoot=ft⁻² -InverseSquareInch=in⁻² -InverseSquareKilometer=km⁻² -InverseSquareMeter=m⁻² -InverseSquareMicrometer=µm⁻² -InverseSquareMile=mi⁻² -InverseSquareMillimeter=mm⁻² -InverseSquareYard=yd⁻² -InverseUsSurveySquareFoot=ft⁻² (US) +InverseSquareCentimeters=cm⁻² +InverseSquareDecimeters=dm⁻² +InverseSquareFeet=ft⁻² +InverseSquareInches=in⁻² +InverseSquareKilometers=km⁻² +InverseSquareMeters=m⁻² +InverseSquareMicrometers=µm⁻² +InverseSquareMiles=mi⁻² +InverseSquareMillimeters=mm⁻² +InverseSquareYards=yd⁻² +InverseUsSurveySquareFeet=ft⁻² (US) diff --git a/UnitsNet/GeneratedCode/Resources/ReciprocalLength.restext b/UnitsNet/GeneratedCode/Resources/ReciprocalLength.restext index 065b7a4a55..b75f051bd4 100644 --- a/UnitsNet/GeneratedCode/Resources/ReciprocalLength.restext +++ b/UnitsNet/GeneratedCode/Resources/ReciprocalLength.restext @@ -1,10 +1,10 @@ -InverseCentimeter=cm⁻¹,1/cm -InverseFoot=ft⁻¹,1/ft -InverseInch=in⁻¹,1/in -InverseMeter=m⁻¹,1/m -InverseMicroinch=µin⁻¹,1/µin -InverseMil=mil⁻¹,1/mil -InverseMile=mi⁻¹,1/mi -InverseMillimeter=mm⁻¹,1/mm -InverseUsSurveyFoot=ftUS⁻¹,1/ftUS -InverseYard=yd⁻¹,1/yd +InverseCentimeters=cm⁻¹,1/cm +InverseFeet=ft⁻¹,1/ft +InverseInches=in⁻¹,1/in +InverseMeters=m⁻¹,1/m +InverseMicroinches=µin⁻¹,1/µin +InverseMils=mil⁻¹,1/mil +InverseMiles=mi⁻¹,1/mi +InverseMillimeters=mm⁻¹,1/mm +InverseUsSurveyFeet=ftUS⁻¹,1/ftUS +InverseYards=yd⁻¹,1/yd diff --git a/UnitsNet/GeneratedCode/Resources/RotationalAcceleration.restext b/UnitsNet/GeneratedCode/Resources/RotationalAcceleration.restext index ed6f7b4233..bd1e547ee8 100644 --- a/UnitsNet/GeneratedCode/Resources/RotationalAcceleration.restext +++ b/UnitsNet/GeneratedCode/Resources/RotationalAcceleration.restext @@ -1,4 +1,4 @@ -DegreePerSecondSquared=°/s²,deg/s² -RadianPerSecondSquared=rad/s² -RevolutionPerMinutePerSecond=rpm/s -RevolutionPerSecondSquared=r/s² +DegreesPerSecondSquared=°/s²,deg/s² +RadiansPerSecondSquared=rad/s² +RevolutionsPerMinutePerSecond=rpm/s +RevolutionsPerSecondSquared=r/s² diff --git a/UnitsNet/GeneratedCode/Resources/RotationalSpeed.restext b/UnitsNet/GeneratedCode/Resources/RotationalSpeed.restext index 7036b8ddb8..b74f0eced0 100644 --- a/UnitsNet/GeneratedCode/Resources/RotationalSpeed.restext +++ b/UnitsNet/GeneratedCode/Resources/RotationalSpeed.restext @@ -1,13 +1,13 @@ -CentiradianPerSecond=crad/s -DeciradianPerSecond=drad/s -DegreePerMinute=°/min,deg/min -DegreePerSecond=°/s,deg/s -MicrodegreePerSecond=µ°/s,µdeg/s -MicroradianPerSecond=µrad/s -MillidegreePerSecond=m°/s,mdeg/s -MilliradianPerSecond=mrad/s -NanodegreePerSecond=n°/s,ndeg/s -NanoradianPerSecond=nrad/s -RadianPerSecond=rad/s -RevolutionPerMinute=rpm,r/min -RevolutionPerSecond=r/s +CentiradiansPerSecond=crad/s +DeciradiansPerSecond=drad/s +DegreesPerMinute=°/min,deg/min +DegreesPerSecond=°/s,deg/s +MicrodegreesPerSecond=µ°/s,µdeg/s +MicroradiansPerSecond=µrad/s +MillidegreesPerSecond=m°/s,mdeg/s +MilliradiansPerSecond=mrad/s +NanodegreesPerSecond=n°/s,ndeg/s +NanoradiansPerSecond=nrad/s +RadiansPerSecond=rad/s +RevolutionsPerMinute=rpm,r/min +RevolutionsPerSecond=r/s diff --git a/UnitsNet/GeneratedCode/Resources/RotationalSpeed.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/RotationalSpeed.ru-RU.restext index 9be83eb667..86015ae367 100644 --- a/UnitsNet/GeneratedCode/Resources/RotationalSpeed.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/RotationalSpeed.ru-RU.restext @@ -1,12 +1,12 @@ -CentiradianPerSecond=срад/с -DeciradianPerSecond=драд/с -DegreePerSecond=°/с -MicrodegreePerSecond=мк°/с -MicroradianPerSecond=мкрад/с -MillidegreePerSecond=м°/с -MilliradianPerSecond=мрад/с -NanodegreePerSecond=н°/с -NanoradianPerSecond=нрад/с -RadianPerSecond=рад/с -RevolutionPerMinute=об/мин -RevolutionPerSecond=об/с +CentiradiansPerSecond=срад/с +DeciradiansPerSecond=драд/с +DegreesPerSecond=°/с +MicrodegreesPerSecond=мк°/с +MicroradiansPerSecond=мкрад/с +MillidegreesPerSecond=м°/с +MilliradiansPerSecond=мрад/с +NanodegreesPerSecond=н°/с +NanoradiansPerSecond=нрад/с +RadiansPerSecond=рад/с +RevolutionsPerMinute=об/мин +RevolutionsPerSecond=об/с diff --git a/UnitsNet/GeneratedCode/Resources/RotationalStiffness.restext b/UnitsNet/GeneratedCode/Resources/RotationalStiffness.restext index 0e0894451c..9eb85a9abf 100644 --- a/UnitsNet/GeneratedCode/Resources/RotationalStiffness.restext +++ b/UnitsNet/GeneratedCode/Resources/RotationalStiffness.restext @@ -1,33 +1,33 @@ -CentinewtonMeterPerDegree=cN·m/deg,cNm/deg,cN·m/°,cNm/° -CentinewtonMillimeterPerDegree=cN·mm/deg,cNmm/deg,cN·mm/°,cNmm/° -CentinewtonMillimeterPerRadian=cN·mm/rad,cNmm/rad -DecanewtonMeterPerDegree=daN·m/deg,daNm/deg,daN·m/°,daNm/° -DecanewtonMillimeterPerDegree=daN·mm/deg,daNmm/deg,daN·mm/°,daNmm/° -DecanewtonMillimeterPerRadian=daN·mm/rad,daNmm/rad -DecinewtonMeterPerDegree=dN·m/deg,dNm/deg,dN·m/°,dNm/° -DecinewtonMillimeterPerDegree=dN·mm/deg,dNmm/deg,dN·mm/°,dNmm/° -DecinewtonMillimeterPerRadian=dN·mm/rad,dNmm/rad -KilonewtonMeterPerDegree=kN·m/deg,kNm/deg,kN·m/°,kNm/° -KilonewtonMeterPerRadian=kN·m/rad,kNm/rad -KilonewtonMillimeterPerDegree=kN·mm/deg,kNmm/deg,kN·mm/°,kNmm/° -KilonewtonMillimeterPerRadian=kN·mm/rad,kNmm/rad -KilopoundForceFootPerDegrees=kipf·ft/°,kip·ft/°g,k·ft/°,kipf·ft/deg,kip·ft/deg,k·ft/deg -MeganewtonMeterPerDegree=MN·m/deg,MNm/deg,MN·m/°,MNm/° -MeganewtonMeterPerRadian=MN·m/rad,MNm/rad -MeganewtonMillimeterPerDegree=MN·mm/deg,MNmm/deg,MN·mm/°,MNmm/° -MeganewtonMillimeterPerRadian=MN·mm/rad,MNmm/rad -MicronewtonMeterPerDegree=µN·m/deg,µNm/deg,µN·m/°,µNm/° -MicronewtonMillimeterPerDegree=µN·mm/deg,µNmm/deg,µN·mm/°,µNmm/° -MicronewtonMillimeterPerRadian=µN·mm/rad,µNmm/rad -MillinewtonMeterPerDegree=mN·m/deg,mNm/deg,mN·m/°,mNm/° -MillinewtonMillimeterPerDegree=mN·mm/deg,mNmm/deg,mN·mm/°,mNmm/° -MillinewtonMillimeterPerRadian=mN·mm/rad,mNmm/rad -NanonewtonMeterPerDegree=nN·m/deg,nNm/deg,nN·m/°,nNm/° -NanonewtonMillimeterPerDegree=nN·mm/deg,nNmm/deg,nN·mm/°,nNmm/° -NanonewtonMillimeterPerRadian=nN·mm/rad,nNmm/rad -NewtonMeterPerDegree=N·m/deg,Nm/deg,N·m/°,Nm/° -NewtonMeterPerRadian=N·m/rad,Nm/rad -NewtonMillimeterPerDegree=N·mm/deg,Nmm/deg,N·mm/°,Nmm/° -NewtonMillimeterPerRadian=N·mm/rad,Nmm/rad +CentinewtonMetersPerDegree=cN·m/deg,cNm/deg,cN·m/°,cNm/° +CentinewtonMillimetersPerDegree=cN·mm/deg,cNmm/deg,cN·mm/°,cNmm/° +CentinewtonMillimetersPerRadian=cN·mm/rad,cNmm/rad +DecanewtonMetersPerDegree=daN·m/deg,daNm/deg,daN·m/°,daNm/° +DecanewtonMillimetersPerDegree=daN·mm/deg,daNmm/deg,daN·mm/°,daNmm/° +DecanewtonMillimetersPerRadian=daN·mm/rad,daNmm/rad +DecinewtonMetersPerDegree=dN·m/deg,dNm/deg,dN·m/°,dNm/° +DecinewtonMillimetersPerDegree=dN·mm/deg,dNmm/deg,dN·mm/°,dNmm/° +DecinewtonMillimetersPerRadian=dN·mm/rad,dNmm/rad +KilonewtonMetersPerDegree=kN·m/deg,kNm/deg,kN·m/°,kNm/° +KilonewtonMetersPerRadian=kN·m/rad,kNm/rad +KilonewtonMillimetersPerDegree=kN·mm/deg,kNmm/deg,kN·mm/°,kNmm/° +KilonewtonMillimetersPerRadian=kN·mm/rad,kNmm/rad +KilopoundForceFeetPerDegrees=kipf·ft/°,kip·ft/°g,k·ft/°,kipf·ft/deg,kip·ft/deg,k·ft/deg +MeganewtonMetersPerDegree=MN·m/deg,MNm/deg,MN·m/°,MNm/° +MeganewtonMetersPerRadian=MN·m/rad,MNm/rad +MeganewtonMillimetersPerDegree=MN·mm/deg,MNmm/deg,MN·mm/°,MNmm/° +MeganewtonMillimetersPerRadian=MN·mm/rad,MNmm/rad +MicronewtonMetersPerDegree=µN·m/deg,µNm/deg,µN·m/°,µNm/° +MicronewtonMillimetersPerDegree=µN·mm/deg,µNmm/deg,µN·mm/°,µNmm/° +MicronewtonMillimetersPerRadian=µN·mm/rad,µNmm/rad +MillinewtonMetersPerDegree=mN·m/deg,mNm/deg,mN·m/°,mNm/° +MillinewtonMillimetersPerDegree=mN·mm/deg,mNmm/deg,mN·mm/°,mNmm/° +MillinewtonMillimetersPerRadian=mN·mm/rad,mNmm/rad +NanonewtonMetersPerDegree=nN·m/deg,nNm/deg,nN·m/°,nNm/° +NanonewtonMillimetersPerDegree=nN·mm/deg,nNmm/deg,nN·mm/°,nNmm/° +NanonewtonMillimetersPerRadian=nN·mm/rad,nNmm/rad +NewtonMetersPerDegree=N·m/deg,Nm/deg,N·m/°,Nm/° +NewtonMetersPerRadian=N·m/rad,Nm/rad +NewtonMillimetersPerDegree=N·mm/deg,Nmm/deg,N·mm/°,Nmm/° +NewtonMillimetersPerRadian=N·mm/rad,Nmm/rad PoundForceFeetPerRadian=lbf·ft/rad -PoundForceFootPerDegrees=lbf·ft/deg +PoundForceFeetPerDegrees=lbf·ft/deg diff --git a/UnitsNet/GeneratedCode/Resources/RotationalStiffnessPerLength.restext b/UnitsNet/GeneratedCode/Resources/RotationalStiffnessPerLength.restext index f551c8933e..48d7fd59a7 100644 --- a/UnitsNet/GeneratedCode/Resources/RotationalStiffnessPerLength.restext +++ b/UnitsNet/GeneratedCode/Resources/RotationalStiffnessPerLength.restext @@ -1,5 +1,5 @@ -KilonewtonMeterPerRadianPerMeter=kN·m/rad/m,kNm/rad/m -KilopoundForceFootPerDegreesPerFoot=kipf·ft/°/ft,kip·ft/°/ft,k·ft/°/ft,kipf·ft/deg/ft,kip·ft/deg/ft,k·ft/deg/ft -MeganewtonMeterPerRadianPerMeter=MN·m/rad/m,MNm/rad/m -NewtonMeterPerRadianPerMeter=N·m/rad/m,Nm/rad/m -PoundForceFootPerDegreesPerFoot=lbf·ft/deg/ft +KilonewtonMetersPerRadianPerMeter=kN·m/rad/m,kNm/rad/m +KilopoundForceFeetPerDegreesPerFeet=kipf·ft/°/ft,kip·ft/°/ft,k·ft/°/ft,kipf·ft/deg/ft,kip·ft/deg/ft,k·ft/deg/ft +MeganewtonMetersPerRadianPerMeter=MN·m/rad/m,MNm/rad/m +NewtonMetersPerRadianPerMeter=N·m/rad/m,Nm/rad/m +PoundForceFeetPerDegreesPerFeet=lbf·ft/deg/ft diff --git a/UnitsNet/GeneratedCode/Resources/SolidAngle.restext b/UnitsNet/GeneratedCode/Resources/SolidAngle.restext index c93cedea51..d890c7b19e 100644 --- a/UnitsNet/GeneratedCode/Resources/SolidAngle.restext +++ b/UnitsNet/GeneratedCode/Resources/SolidAngle.restext @@ -1 +1 @@ -Steradian=sr +Steradians=sr diff --git a/UnitsNet/GeneratedCode/Resources/SpecificEnergy.restext b/UnitsNet/GeneratedCode/Resources/SpecificEnergy.restext index dbc4829091..23d2275a4f 100644 --- a/UnitsNet/GeneratedCode/Resources/SpecificEnergy.restext +++ b/UnitsNet/GeneratedCode/Resources/SpecificEnergy.restext @@ -1,30 +1,30 @@ BtuPerPound=btu/lb -CaloriePerGram=cal/g -GigawattDayPerKilogram=GWd/kg -GigawattDayPerShortTon=GWd/ST -GigawattDayPerTonne=GWd/t -GigawattHourPerKilogram=GWh/kg -GigawattHourPerPound=GWh/lbs -JoulePerKilogram=J/kg -KilocaloriePerGram=kcal/g -KilojoulePerKilogram=kJ/kg -KilowattDayPerKilogram=kWd/kg -KilowattDayPerShortTon=kWd/ST -KilowattDayPerTonne=kWd/t -KilowattHourPerKilogram=kWh/kg -KilowattHourPerPound=kWh/lbs -MegajoulePerKilogram=MJ/kg -MegaJoulePerTonne=MJ/t -MegawattDayPerKilogram=MWd/kg -MegawattDayPerShortTon=MWd/ST -MegawattDayPerTonne=MWd/t -MegawattHourPerKilogram=MWh/kg -MegawattHourPerPound=MWh/lbs -TerawattDayPerKilogram=TWd/kg -TerawattDayPerShortTon=TWd/ST -TerawattDayPerTonne=TWd/t -WattDayPerKilogram=Wd/kg -WattDayPerShortTon=Wd/ST -WattDayPerTonne=Wd/t -WattHourPerKilogram=Wh/kg -WattHourPerPound=Wh/lbs +CaloriesPerGram=cal/g +GigawattDaysPerKilogram=GWd/kg +GigawattDaysPerShortTon=GWd/ST +GigawattDaysPerTonne=GWd/t +GigawattHoursPerKilogram=GWh/kg +GigawattHoursPerPound=GWh/lbs +JoulesPerKilogram=J/kg +KilocaloriesPerGram=kcal/g +KilojoulesPerKilogram=kJ/kg +KilowattDaysPerKilogram=kWd/kg +KilowattDaysPerShortTon=kWd/ST +KilowattDaysPerTonne=kWd/t +KilowattHoursPerKilogram=kWh/kg +KilowattHoursPerPound=kWh/lbs +MegajoulesPerKilogram=MJ/kg +MegaJoulesPerTonne=MJ/t +MegawattDaysPerKilogram=MWd/kg +MegawattDaysPerShortTon=MWd/ST +MegawattDaysPerTonne=MWd/t +MegawattHoursPerKilogram=MWh/kg +MegawattHoursPerPound=MWh/lbs +TerawattDaysPerKilogram=TWd/kg +TerawattDaysPerShortTon=TWd/ST +TerawattDaysPerTonne=TWd/t +WattDaysPerKilogram=Wd/kg +WattDaysPerShortTon=Wd/ST +WattDaysPerTonne=Wd/t +WattHoursPerKilogram=Wh/kg +WattHoursPerPound=Wh/lbs diff --git a/UnitsNet/GeneratedCode/Resources/SpecificEntropy.restext b/UnitsNet/GeneratedCode/Resources/SpecificEntropy.restext index 6fbd29e5e4..371a4e2471 100644 --- a/UnitsNet/GeneratedCode/Resources/SpecificEntropy.restext +++ b/UnitsNet/GeneratedCode/Resources/SpecificEntropy.restext @@ -1,9 +1,9 @@ -BtuPerPoundFahrenheit=BTU/lb·°F,BTU/lbm·°F -CaloriePerGramKelvin=cal/g.K -JoulePerKilogramDegreeCelsius=J/kg.C -JoulePerKilogramKelvin=J/kg.K -KilocaloriePerGramKelvin=kcal/g.K -KilojoulePerKilogramDegreeCelsius=kJ/kg.C -KilojoulePerKilogramKelvin=kJ/kg.K -MegajoulePerKilogramDegreeCelsius=MJ/kg.C -MegajoulePerKilogramKelvin=MJ/kg.K +BtusPerPoundFahrenheit=BTU/lb·°F,BTU/lbm·°F +CaloriesPerGramKelvin=cal/g.K +JoulesPerKilogramDegreeCelsius=J/kg.C +JoulesPerKilogramKelvin=J/kg.K +KilocaloriesPerGramKelvin=kcal/g.K +KilojoulesPerKilogramDegreeCelsius=kJ/kg.C +KilojoulesPerKilogramKelvin=kJ/kg.K +MegajoulesPerKilogramDegreeCelsius=MJ/kg.C +MegajoulesPerKilogramKelvin=MJ/kg.K diff --git a/UnitsNet/GeneratedCode/Resources/SpecificFuelConsumption.restext b/UnitsNet/GeneratedCode/Resources/SpecificFuelConsumption.restext index 5ec70c784b..89e437194a 100644 --- a/UnitsNet/GeneratedCode/Resources/SpecificFuelConsumption.restext +++ b/UnitsNet/GeneratedCode/Resources/SpecificFuelConsumption.restext @@ -1,4 +1,4 @@ -GramPerKiloNewtonSecond=g/(kN�s) -KilogramPerKilogramForceHour=kg/(kgf�h) -KilogramPerKiloNewtonSecond=kg/(kN�s) -PoundMassPerPoundForceHour=lb/(lbf·h) +GramsPerKiloNewtonSecond=g/(kN�s) +KilogramsPerKilogramForceHour=kg/(kgf�h) +KilogramsPerKiloNewtonSecond=kg/(kN�s) +PoundsMassPerPoundForceHour=lb/(lbf·h) diff --git a/UnitsNet/GeneratedCode/Resources/SpecificVolume.restext b/UnitsNet/GeneratedCode/Resources/SpecificVolume.restext index 02e270381d..c287f002c6 100644 --- a/UnitsNet/GeneratedCode/Resources/SpecificVolume.restext +++ b/UnitsNet/GeneratedCode/Resources/SpecificVolume.restext @@ -1,3 +1,3 @@ -CubicFootPerPound=ft³/lb -CubicMeterPerKilogram=m³/kg -MillicubicMeterPerKilogram=mm³/kg +CubicFeetPerPound=ft³/lb +CubicMetersPerKilogram=m³/kg +MillicubicMetersPerKilogram=mm³/kg diff --git a/UnitsNet/GeneratedCode/Resources/SpecificWeight.restext b/UnitsNet/GeneratedCode/Resources/SpecificWeight.restext index 228ef2cd1e..3f3df54cb5 100644 --- a/UnitsNet/GeneratedCode/Resources/SpecificWeight.restext +++ b/UnitsNet/GeneratedCode/Resources/SpecificWeight.restext @@ -1,17 +1,17 @@ -KilogramForcePerCubicCentimeter=kgf/cm³ -KilogramForcePerCubicMeter=kgf/m³ -KilogramForcePerCubicMillimeter=kgf/mm³ -KilonewtonPerCubicCentimeter=kN/cm³ -KilonewtonPerCubicMeter=kN/m³ -KilonewtonPerCubicMillimeter=kN/mm³ -KilopoundForcePerCubicFoot=kipf/ft³ -KilopoundForcePerCubicInch=kipf/in³ -MeganewtonPerCubicMeter=MN/m³ -NewtonPerCubicCentimeter=N/cm³ -NewtonPerCubicMeter=N/m³ -NewtonPerCubicMillimeter=N/mm³ -PoundForcePerCubicFoot=lbf/ft³ -PoundForcePerCubicInch=lbf/in³ -TonneForcePerCubicCentimeter=tf/cm³ -TonneForcePerCubicMeter=tf/m³ -TonneForcePerCubicMillimeter=tf/mm³ +KilogramsForcePerCubicCentimeter=kgf/cm³ +KilogramsForcePerCubicMeter=kgf/m³ +KilogramsForcePerCubicMillimeter=kgf/mm³ +KilonewtonsPerCubicCentimeter=kN/cm³ +KilonewtonsPerCubicMeter=kN/m³ +KilonewtonsPerCubicMillimeter=kN/mm³ +KilopoundsForcePerCubicFoot=kipf/ft³ +KilopoundsForcePerCubicInch=kipf/in³ +MeganewtonsPerCubicMeter=MN/m³ +NewtonsPerCubicCentimeter=N/cm³ +NewtonsPerCubicMeter=N/m³ +NewtonsPerCubicMillimeter=N/mm³ +PoundsForcePerCubicFoot=lbf/ft³ +PoundsForcePerCubicInch=lbf/in³ +TonnesForcePerCubicCentimeter=tf/cm³ +TonnesForcePerCubicMeter=tf/m³ +TonnesForcePerCubicMillimeter=tf/mm³ diff --git a/UnitsNet/GeneratedCode/Resources/Speed.restext b/UnitsNet/GeneratedCode/Resources/Speed.restext index 7bafb4490c..c98cc42920 100644 --- a/UnitsNet/GeneratedCode/Resources/Speed.restext +++ b/UnitsNet/GeneratedCode/Resources/Speed.restext @@ -1,33 +1,33 @@ -CentimeterPerHour=cm/h -CentimeterPerMinute=cm/min -CentimeterPerSecond=cm/s -DecimeterPerMinute=dm/min -DecimeterPerSecond=dm/s -FootPerHour=ft/h -FootPerMinute=ft/min -FootPerSecond=ft/s -InchPerHour=in/h -InchPerMinute=in/min -InchPerSecond=in/s -KilometerPerHour=km/h -KilometerPerMinute=km/min -KilometerPerSecond=km/s -Knot=kn,kt,knot,knots +CentimetersPerHour=cm/h +CentimetersPerMinutes=cm/min +CentimetersPerSecond=cm/s +DecimetersPerMinutes=dm/min +DecimetersPerSecond=dm/s +FeetPerHour=ft/h +FeetPerMinute=ft/min +FeetPerSecond=ft/s +InchesPerHour=in/h +InchesPerMinute=in/min +InchesPerSecond=in/s +KilometersPerHour=km/h +KilometersPerMinutes=km/min +KilometersPerSecond=km/s +Knots=kn,kt,knot,knots Mach=M,Ma,MN,MACH -MeterPerHour=m/h -MeterPerMinute=m/min -MeterPerSecond=m/s -MicrometerPerMinute=µm/min -MicrometerPerSecond=µm/s -MilePerHour=mph -MillimeterPerHour=mm/h -MillimeterPerMinute=mm/min -MillimeterPerSecond=mm/s -NanometerPerMinute=nm/min -NanometerPerSecond=nm/s -UsSurveyFootPerHour=ftUS/h -UsSurveyFootPerMinute=ftUS/min -UsSurveyFootPerSecond=ftUS/s -YardPerHour=yd/h -YardPerMinute=yd/min -YardPerSecond=yd/s +MetersPerHour=m/h +MetersPerMinutes=m/min +MetersPerSecond=m/s +MicrometersPerMinutes=µm/min +MicrometersPerSecond=µm/s +MilesPerHour=mph +MillimetersPerHour=mm/h +MillimetersPerMinutes=mm/min +MillimetersPerSecond=mm/s +NanometersPerMinutes=nm/min +NanometersPerSecond=nm/s +UsSurveyFeetPerHour=ftUS/h +UsSurveyFeetPerMinute=ftUS/min +UsSurveyFeetPerSecond=ftUS/s +YardsPerHour=yd/h +YardsPerMinute=yd/min +YardsPerSecond=yd/s diff --git a/UnitsNet/GeneratedCode/Resources/Speed.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Speed.ru-RU.restext index d8b0bf5ac3..96968602f0 100644 --- a/UnitsNet/GeneratedCode/Resources/Speed.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Speed.ru-RU.restext @@ -1,24 +1,24 @@ -CentimeterPerHour=см/ч -CentimeterPerMinute=см/мин -CentimeterPerSecond=см/с -DecimeterPerMinute=дм/мин -DecimeterPerSecond=дм/с -FootPerHour=фут/ч -FootPerMinute=фут/мин -FootPerSecond=фут/с -KilometerPerHour=км/ч -KilometerPerMinute=км/мин -KilometerPerSecond=км/с -Knot=уз. +CentimetersPerHour=см/ч +CentimetersPerMinutes=см/мин +CentimetersPerSecond=см/с +DecimetersPerMinutes=дм/мин +DecimetersPerSecond=дм/с +FeetPerHour=фут/ч +FeetPerMinute=фут/мин +FeetPerSecond=фут/с +KilometersPerHour=км/ч +KilometersPerMinutes=км/мин +KilometersPerSecond=км/с +Knots=уз. Mach=мах -MeterPerHour=м/ч -MeterPerMinute=м/мин -MeterPerSecond=м/с -MicrometerPerMinute=мкм/мин -MicrometerPerSecond=мкм/с -MilePerHour=миль/ч -MillimeterPerHour=мм/ч -MillimeterPerMinute=мм/мин -MillimeterPerSecond=мм/с -NanometerPerMinute=нм/мин -NanometerPerSecond=нм/с +MetersPerHour=м/ч +MetersPerMinutes=м/мин +MetersPerSecond=м/с +MicrometersPerMinutes=мкм/мин +MicrometersPerSecond=мкм/с +MilesPerHour=миль/ч +MillimetersPerHour=мм/ч +MillimetersPerMinutes=мм/мин +MillimetersPerSecond=мм/с +NanometersPerMinutes=нм/мин +NanometersPerSecond=нм/с diff --git a/UnitsNet/GeneratedCode/Resources/StandardVolumeFlow.restext b/UnitsNet/GeneratedCode/Resources/StandardVolumeFlow.restext index edf79da995..3071b34e25 100644 --- a/UnitsNet/GeneratedCode/Resources/StandardVolumeFlow.restext +++ b/UnitsNet/GeneratedCode/Resources/StandardVolumeFlow.restext @@ -1,9 +1,9 @@ -StandardCubicCentimeterPerMinute=sccm -StandardCubicFootPerHour=scfh -StandardCubicFootPerMinute=scfm -StandardCubicFootPerSecond=Sft³/s -StandardCubicMeterPerDay=Sm³/d -StandardCubicMeterPerHour=Sm³/h -StandardCubicMeterPerMinute=Sm³/min -StandardCubicMeterPerSecond=Sm³/s -StandardLiterPerMinute=slm +StandardCubicCentimetersPerMinute=sccm +StandardCubicFeetPerHour=scfh +StandardCubicFeetPerMinute=scfm +StandardCubicFeetPerSecond=Sft³/s +StandardCubicMetersPerDay=Sm³/d +StandardCubicMetersPerHour=Sm³/h +StandardCubicMetersPerMinute=Sm³/min +StandardCubicMetersPerSecond=Sm³/s +StandardLitersPerMinute=slm diff --git a/UnitsNet/GeneratedCode/Resources/Temperature.restext b/UnitsNet/GeneratedCode/Resources/Temperature.restext index 490f5e3c00..500ed8e00e 100644 --- a/UnitsNet/GeneratedCode/Resources/Temperature.restext +++ b/UnitsNet/GeneratedCode/Resources/Temperature.restext @@ -1,10 +1,10 @@ -DegreeCelsius=°C -DegreeDelisle=°De -DegreeFahrenheit=°F -DegreeNewton=°N -DegreeRankine=°R -DegreeReaumur=°Ré -DegreeRoemer=°Rø -Kelvin=K -MillidegreeCelsius=m°C -SolarTemperature=T⊙ +DegreesCelsius=°C +DegreesDelisle=°De +DegreesFahrenheit=°F +DegreesNewton=°N +DegreesRankine=°R +DegreesReaumur=°Ré +DegreesRoemer=°Rø +Kelvins=K +MillidegreesCelsius=m°C +SolarTemperatures=T⊙ diff --git a/UnitsNet/GeneratedCode/Resources/TemperatureChangeRate.restext b/UnitsNet/GeneratedCode/Resources/TemperatureChangeRate.restext index 3017c201e0..b7d07466de 100644 --- a/UnitsNet/GeneratedCode/Resources/TemperatureChangeRate.restext +++ b/UnitsNet/GeneratedCode/Resources/TemperatureChangeRate.restext @@ -1,10 +1,10 @@ -CentidegreeCelsiusPerSecond=c°C/s -DecadegreeCelsiusPerSecond=da°C/s -DecidegreeCelsiusPerSecond=d°C/s -DegreeCelsiusPerMinute=°C/min -DegreeCelsiusPerSecond=°C/s -HectodegreeCelsiusPerSecond=h°C/s -KilodegreeCelsiusPerSecond=k°C/s -MicrodegreeCelsiusPerSecond=µ°C/s -MillidegreeCelsiusPerSecond=m°C/s -NanodegreeCelsiusPerSecond=n°C/s +CentidegreesCelsiusPerSecond=c°C/s +DecadegreesCelsiusPerSecond=da°C/s +DecidegreesCelsiusPerSecond=d°C/s +DegreesCelsiusPerMinute=°C/min +DegreesCelsiusPerSecond=°C/s +HectodegreesCelsiusPerSecond=h°C/s +KilodegreesCelsiusPerSecond=k°C/s +MicrodegreesCelsiusPerSecond=µ°C/s +MillidegreesCelsiusPerSecond=m°C/s +NanodegreesCelsiusPerSecond=n°C/s diff --git a/UnitsNet/GeneratedCode/Resources/TemperatureDelta.restext b/UnitsNet/GeneratedCode/Resources/TemperatureDelta.restext index 0e65578a76..bdef7ce2eb 100644 --- a/UnitsNet/GeneratedCode/Resources/TemperatureDelta.restext +++ b/UnitsNet/GeneratedCode/Resources/TemperatureDelta.restext @@ -1,9 +1,9 @@ -DegreeCelsius=∆°C -DegreeDelisle=∆°De -DegreeFahrenheit=∆°F -DegreeNewton=∆°N -DegreeRankine=∆°R -DegreeReaumur=∆°Ré -DegreeRoemer=∆°Rø -Kelvin=∆K -MillidegreeCelsius=∆m°C +DegreesCelsius=∆°C +DegreesDelisle=∆°De +DegreesFahrenheit=∆°F +DegreesNewton=∆°N +DegreesRankine=∆°R +DegreesReaumur=∆°Ré +DegreesRoemer=∆°Rø +Kelvins=∆K +MillidegreesCelsius=∆m°C diff --git a/UnitsNet/GeneratedCode/Resources/TemperatureGradient.restext b/UnitsNet/GeneratedCode/Resources/TemperatureGradient.restext index 350837df31..207a5d5278 100644 --- a/UnitsNet/GeneratedCode/Resources/TemperatureGradient.restext +++ b/UnitsNet/GeneratedCode/Resources/TemperatureGradient.restext @@ -1,4 +1,4 @@ -DegreeCelsiusPerKilometer=∆°C/km -DegreeCelsiusPerMeter=∆°C/m -DegreeFahrenheitPerFoot=∆°F/ft -KelvinPerMeter=∆°K/m +DegreesCelciusPerKilometer=∆°C/km +DegreesCelciusPerMeter=∆°C/m +DegreesFahrenheitPerFoot=∆°F/ft +KelvinsPerMeter=∆°K/m diff --git a/UnitsNet/GeneratedCode/Resources/ThermalConductivity.restext b/UnitsNet/GeneratedCode/Resources/ThermalConductivity.restext index 4250b3667b..40dde39cde 100644 --- a/UnitsNet/GeneratedCode/Resources/ThermalConductivity.restext +++ b/UnitsNet/GeneratedCode/Resources/ThermalConductivity.restext @@ -1,2 +1,2 @@ -BtuPerHourFootFahrenheit=BTU/h·ft·°F -WattPerMeterKelvin=W/m·K +BtusPerHourFootFahrenheit=BTU/h·ft·°F +WattsPerMeterKelvin=W/m·K diff --git a/UnitsNet/GeneratedCode/Resources/ThermalResistance.restext b/UnitsNet/GeneratedCode/Resources/ThermalResistance.restext index c0a6e34575..254857bb3c 100644 --- a/UnitsNet/GeneratedCode/Resources/ThermalResistance.restext +++ b/UnitsNet/GeneratedCode/Resources/ThermalResistance.restext @@ -1,6 +1,6 @@ -HourSquareFeetDegreeFahrenheitPerBtu=Hrft²°F/Btu -SquareCentimeterHourDegreeCelsiusPerKilocalorie=cm²Hr°C/kcal -SquareCentimeterKelvinPerWatt=cm²K/W -SquareMeterDegreeCelsiusPerWatt=m²°C/W -SquareMeterKelvinPerKilowatt=m²K/kW -SquareMeterKelvinPerWatt=m²K/W +HourSquareFeetDegreesFahrenheitPerBtu=Hrft²°F/Btu +SquareCentimeterHourDegreesCelsiusPerKilocalorie=cm²Hr°C/kcal +SquareCentimeterKelvinsPerWatt=cm²K/W +SquareMeterDegreesCelsiusPerWatt=m²°C/W +SquareMeterKelvinsPerKilowatt=m²K/kW +SquareMeterKelvinsPerWatt=m²K/W diff --git a/UnitsNet/GeneratedCode/Resources/Torque.restext b/UnitsNet/GeneratedCode/Resources/Torque.restext index 545f2f535c..ce23b5c2b3 100644 --- a/UnitsNet/GeneratedCode/Resources/Torque.restext +++ b/UnitsNet/GeneratedCode/Resources/Torque.restext @@ -1,25 +1,25 @@ -GramForceCentimeter=gf·cm -GramForceMeter=gf·m -GramForceMillimeter=gf·mm -KilogramForceCentimeter=kgf·cm -KilogramForceMeter=kgf·m -KilogramForceMillimeter=kgf·mm -KilonewtonCentimeter=kN·cm -KilonewtonMeter=kN·m -KilonewtonMillimeter=kN·mm -KilopoundForceFoot=kipf·ft -KilopoundForceInch=kipf·in -MeganewtonCentimeter=MN·cm -MeganewtonMeter=MN·m -MeganewtonMillimeter=MN·mm -MegapoundForceFoot=Mlbf·ft -MegapoundForceInch=Mlbf·in -NewtonCentimeter=N·cm -NewtonMeter=N·m -NewtonMillimeter=N·mm -PoundalFoot=pdl·ft -PoundForceFoot=lbf·ft -PoundForceInch=lbf·in -TonneForceCentimeter=tf·cm -TonneForceMeter=tf·m -TonneForceMillimeter=tf·mm +GramForceCentimeters=gf·cm +GramForceMeters=gf·m +GramForceMillimeters=gf·mm +KilogramForceCentimeters=kgf·cm +KilogramForceMeters=kgf·m +KilogramForceMillimeters=kgf·mm +KilonewtonCentimeters=kN·cm +KilonewtonMeters=kN·m +KilonewtonMillimeters=kN·mm +KilopoundForceFeet=kipf·ft +KilopoundForceInches=kipf·in +MeganewtonCentimeters=MN·cm +MeganewtonMeters=MN·m +MeganewtonMillimeters=MN·mm +MegapoundForceFeet=Mlbf·ft +MegapoundForceInches=Mlbf·in +NewtonCentimeters=N·cm +NewtonMeters=N·m +NewtonMillimeters=N·mm +PoundalFeet=pdl·ft +PoundForceFeet=lbf·ft +PoundForceInches=lbf·in +TonneForceCentimeters=tf·cm +TonneForceMeters=tf·m +TonneForceMillimeters=tf·mm diff --git a/UnitsNet/GeneratedCode/Resources/Torque.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Torque.ru-RU.restext index 03704d21d8..4b690445d2 100644 --- a/UnitsNet/GeneratedCode/Resources/Torque.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Torque.ru-RU.restext @@ -1,3 +1,3 @@ -KilonewtonMeter=кН·м -MeganewtonMeter=МН·м -NewtonMeter=Н·м +KilonewtonMeters=кН·м +MeganewtonMeters=МН·м +NewtonMeters=Н·м diff --git a/UnitsNet/GeneratedCode/Resources/TorquePerLength.restext b/UnitsNet/GeneratedCode/Resources/TorquePerLength.restext index 55d8b5481f..c3f4ff7f53 100644 --- a/UnitsNet/GeneratedCode/Resources/TorquePerLength.restext +++ b/UnitsNet/GeneratedCode/Resources/TorquePerLength.restext @@ -1,21 +1,21 @@ -KilogramForceCentimeterPerMeter=kgf·cm/m -KilogramForceMeterPerMeter=kgf·m/m -KilogramForceMillimeterPerMeter=kgf·mm/m -KilonewtonCentimeterPerMeter=kN·cm/m -KilonewtonMeterPerMeter=kN·m/m -KilonewtonMillimeterPerMeter=kN·mm/m -KilopoundForceFootPerFoot=kipf·ft/ft -KilopoundForceInchPerFoot=kipf·in/ft -MeganewtonCentimeterPerMeter=MN·cm/m -MeganewtonMeterPerMeter=MN·m/m -MeganewtonMillimeterPerMeter=MN·mm/m -MegapoundForceFootPerFoot=Mlbf·ft/ft -MegapoundForceInchPerFoot=Mlbf·in/ft -NewtonCentimeterPerMeter=N·cm/m -NewtonMeterPerMeter=N·m/m -NewtonMillimeterPerMeter=N·mm/m -PoundForceFootPerFoot=lbf·ft/ft -PoundForceInchPerFoot=lbf·in/ft -TonneForceCentimeterPerMeter=tf·cm/m -TonneForceMeterPerMeter=tf·m/m -TonneForceMillimeterPerMeter=tf·mm/m +KilogramForceCentimetersPerMeter=kgf·cm/m +KilogramForceMetersPerMeter=kgf·m/m +KilogramForceMillimetersPerMeter=kgf·mm/m +KilonewtonCentimetersPerMeter=kN·cm/m +KilonewtonMetersPerMeter=kN·m/m +KilonewtonMillimetersPerMeter=kN·mm/m +KilopoundForceFeetPerFoot=kipf·ft/ft +KilopoundForceInchesPerFoot=kipf·in/ft +MeganewtonCentimetersPerMeter=MN·cm/m +MeganewtonMetersPerMeter=MN·m/m +MeganewtonMillimetersPerMeter=MN·mm/m +MegapoundForceFeetPerFoot=Mlbf·ft/ft +MegapoundForceInchesPerFoot=Mlbf·in/ft +NewtonCentimetersPerMeter=N·cm/m +NewtonMetersPerMeter=N·m/m +NewtonMillimetersPerMeter=N·mm/m +PoundForceFeetPerFoot=lbf·ft/ft +PoundForceInchesPerFoot=lbf·in/ft +TonneForceCentimetersPerMeter=tf·cm/m +TonneForceMetersPerMeter=tf·m/m +TonneForceMillimetersPerMeter=tf·mm/m diff --git a/UnitsNet/GeneratedCode/Resources/TorquePerLength.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/TorquePerLength.ru-RU.restext index 3593222c87..d138f411e5 100644 --- a/UnitsNet/GeneratedCode/Resources/TorquePerLength.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/TorquePerLength.ru-RU.restext @@ -1,3 +1,3 @@ -KilonewtonMeterPerMeter=кН·м/м -MeganewtonMeterPerMeter=МН·м/м -NewtonMeterPerMeter=Н·м/м +KilonewtonMetersPerMeter=кН·м/м +MeganewtonMetersPerMeter=МН·м/м +NewtonMetersPerMeter=Н·м/м diff --git a/UnitsNet/GeneratedCode/Resources/VitaminA.restext b/UnitsNet/GeneratedCode/Resources/VitaminA.restext index 5e00d27ae2..fc917b12a7 100644 --- a/UnitsNet/GeneratedCode/Resources/VitaminA.restext +++ b/UnitsNet/GeneratedCode/Resources/VitaminA.restext @@ -1 +1 @@ -InternationalUnit=IU +InternationalUnits=IU diff --git a/UnitsNet/GeneratedCode/Resources/Volume.fr-CA.restext b/UnitsNet/GeneratedCode/Resources/Volume.fr-CA.restext index e7a9899a71..ebeade4a4f 100644 --- a/UnitsNet/GeneratedCode/Resources/Volume.fr-CA.restext +++ b/UnitsNet/GeneratedCode/Resources/Volume.fr-CA.restext @@ -1 +1 @@ -BoardFoot=pmp,pied-planche,pied de planche +BoardFeet=pmp,pied-planche,pied de planche diff --git a/UnitsNet/GeneratedCode/Resources/Volume.restext b/UnitsNet/GeneratedCode/Resources/Volume.restext index ad06f539a6..91d61b934e 100644 --- a/UnitsNet/GeneratedCode/Resources/Volume.restext +++ b/UnitsNet/GeneratedCode/Resources/Volume.restext @@ -1,46 +1,46 @@ -AcreFoot=ac-ft,acre-foot,acre-feet -BoardFoot=bf,board foot,board feet -Centiliter=cl -CubicCentimeter=cm³ -CubicDecimeter=dm³ -CubicFoot=ft³ -CubicHectometer=hm³ -CubicInch=in³ -CubicKilometer=km³ -CubicMeter=m³ -CubicMicrometer=µm³ -CubicMile=mi³ -CubicMillimeter=mm³ -CubicYard=yd³ -Decaliter=dal -DecausGallon=dagal (U.S.) -Deciliter=dl -DeciusGallon=dgal (U.S.) -HectocubicFoot=hft³ -HectocubicMeter=hm³ -Hectoliter=hl -HectousGallon=hgal (U.S.) -ImperialBeerBarrel=bl (imp.) -ImperialGallon=gal (imp.) -ImperialOunce=oz (imp.) -ImperialPint=pt (imp.),UK pt,pt,p -KilocubicFoot=kft³ -KilocubicMeter=km³ -KiloimperialGallon=kgal (imp.) -Kiloliter=kl -KilousGallon=kgal (U.S.) -Liter=l -MegacubicFoot=Mft³ -MegaimperialGallon=Mgal (imp.) -Megaliter=Ml -MegausGallon=Mgal (U.S.) -MetricTeaspoon=tsp,t,ts,tspn,t.,ts.,tsp.,tspn.,teaspoon -Microliter=µl -Milliliter=ml -Nanoliter=nl -OilBarrel=bbl -UsBeerBarrel=bl (U.S.) -UsGallon=gal (U.S.) -UsOunce=oz (U.S.) -UsPint=pt (U.S.) -UsQuart=qt (U.S.) +AcreFeet=ac-ft,acre-foot,acre-feet +BoardFeet=bf,board foot,board feet +Centiliters=cl +CubicCentimeters=cm³ +CubicDecimeters=dm³ +CubicFeet=ft³ +CubicHectometers=hm³ +CubicInches=in³ +CubicKilometers=km³ +CubicMeters=m³ +CubicMicrometers=µm³ +CubicMiles=mi³ +CubicMillimeters=mm³ +CubicYards=yd³ +Decaliters=dal +DecausGallons=dagal (U.S.) +Deciliters=dl +DeciusGallons=dgal (U.S.) +HectocubicFeet=hft³ +HectocubicMeters=hm³ +Hectoliters=hl +HectousGallons=hgal (U.S.) +ImperialBeerBarrels=bl (imp.) +ImperialGallons=gal (imp.) +ImperialOunces=oz (imp.) +ImperialPints=pt (imp.),UK pt,pt,p +KilocubicFeet=kft³ +KilocubicMeters=km³ +KiloimperialGallons=kgal (imp.) +Kiloliters=kl +KilousGallons=kgal (U.S.) +Liters=l +MegacubicFeet=Mft³ +MegaimperialGallons=Mgal (imp.) +Megaliters=Ml +MegausGallons=Mgal (U.S.) +MetricTeaspoons=tsp,t,ts,tspn,t.,ts.,tsp.,tspn.,teaspoon +Microliters=µl +Milliliters=ml +Nanoliters=nl +OilBarrels=bbl +UsBeerBarrels=bl (U.S.) +UsGallons=gal (U.S.) +UsOunces=oz (U.S.) +UsPints=pt (U.S.) +UsQuarts=qt (U.S.) diff --git a/UnitsNet/GeneratedCode/Resources/Volume.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Volume.ru-RU.restext index d75ce3377b..c1c94577cf 100644 --- a/UnitsNet/GeneratedCode/Resources/Volume.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/Volume.ru-RU.restext @@ -1,37 +1,37 @@ -Centiliter=сл -CubicCentimeter=см³ -CubicDecimeter=дм³ -CubicFoot=фут³ -CubicHectometer=гм³ -CubicInch=дюйм³ -CubicKilometer=км³ -CubicMeter=м³ -CubicMicrometer=мкм³ -CubicMile=миля³ -CubicMillimeter=мм³ -CubicYard=ярд³ -Decaliter=дал -DecausGallon=даАмериканский галлон -Deciliter=дл -DeciusGallon=дАмериканский галлон -HectocubicFoot=гфут³ -HectocubicMeter=гм³ -Hectoliter=гл -HectousGallon=гАмериканский галлон -ImperialGallon=Английский галлон -ImperialOunce=Английская унция -KilocubicFoot=кфут³ -KilocubicMeter=км³ -KiloimperialGallon=кАнглийский галлон -Kiloliter=кл -KilousGallon=кАмериканский галлон -Liter=л -MegacubicFoot=Мфут³ -MegaimperialGallon=МАнглийский галлон -Megaliter=Мл -MegausGallon=МАмериканский галлон -Microliter=мкл -Milliliter=мл -Nanoliter=нл -UsGallon=Американский галлон -UsOunce=Американская унция +Centiliters=сл +CubicCentimeters=см³ +CubicDecimeters=дм³ +CubicFeet=фут³ +CubicHectometers=гм³ +CubicInches=дюйм³ +CubicKilometers=км³ +CubicMeters=м³ +CubicMicrometers=мкм³ +CubicMiles=миля³ +CubicMillimeters=мм³ +CubicYards=ярд³ +Decaliters=дал +DecausGallons=даАмериканский галлон +Deciliters=дл +DeciusGallons=дАмериканский галлон +HectocubicFeet=гфут³ +HectocubicMeters=гм³ +Hectoliters=гл +HectousGallons=гАмериканский галлон +ImperialGallons=Английский галлон +ImperialOunces=Английская унция +KilocubicFeet=кфут³ +KilocubicMeters=км³ +KiloimperialGallons=кАнглийский галлон +Kiloliters=кл +KilousGallons=кАмериканский галлон +Liters=л +MegacubicFeet=Мфут³ +MegaimperialGallons=МАнглийский галлон +Megaliters=Мл +MegausGallons=МАмериканский галлон +Microliters=мкл +Milliliters=мл +Nanoliters=нл +UsGallons=Американский галлон +UsOunces=Американская унция diff --git a/UnitsNet/GeneratedCode/Resources/VolumeConcentration.restext b/UnitsNet/GeneratedCode/Resources/VolumeConcentration.restext index 2a7f2500dd..98a5569828 100644 --- a/UnitsNet/GeneratedCode/Resources/VolumeConcentration.restext +++ b/UnitsNet/GeneratedCode/Resources/VolumeConcentration.restext @@ -2,7 +2,7 @@ CentilitersPerLiter=cL/L CentilitersPerMililiter=cL/mL DecilitersPerLiter=dL/L DecilitersPerMililiter=dL/mL -DecimalFraction= +DecimalFractions= LitersPerLiter=L/L LitersPerMililiter=L/mL MicrolitersPerLiter=µL/L @@ -11,10 +11,10 @@ MillilitersPerLiter=mL/L MillilitersPerMililiter=mL/mL NanolitersPerLiter=nL/L NanolitersPerMililiter=nL/mL -PartPerBillion=ppb -PartPerMillion=ppm -PartPerThousand=‰ -PartPerTrillion=ppt +PartsPerBillion=ppb +PartsPerMillion=ppm +PartsPerThousand=‰ +PartsPerTrillion=ppt Percent=%,% (v/v) PicolitersPerLiter=pL/L PicolitersPerMililiter=pL/mL diff --git a/UnitsNet/GeneratedCode/Resources/VolumeFlow.restext b/UnitsNet/GeneratedCode/Resources/VolumeFlow.restext index 8a74290bfd..0cfd3b1988 100644 --- a/UnitsNet/GeneratedCode/Resources/VolumeFlow.restext +++ b/UnitsNet/GeneratedCode/Resources/VolumeFlow.restext @@ -1,65 +1,65 @@ -AcreFootPerDay=af/d -AcreFootPerHour=af/h -AcreFootPerMinute=af/m -AcreFootPerSecond=af/s -CentiliterPerDay=cl/day,cL/d,cLPD -CentiliterPerHour=cL/h,cLPH -CentiliterPerMinute=cL/min,cLPM -CentiliterPerSecond=cL/s,cLPS -CubicCentimeterPerMinute=cm³/min -CubicDecimeterPerMinute=dm³/min -CubicFootPerHour=ft³/h,cf/hr -CubicFootPerMinute=ft³/min,CFM -CubicFootPerSecond=ft³/s -CubicMeterPerDay=m³/d -CubicMeterPerHour=m³/h -CubicMeterPerMinute=m³/min -CubicMeterPerSecond=m³/s -CubicMillimeterPerSecond=mm³/s -CubicYardPerDay=cy/day -CubicYardPerHour=yd³/h -CubicYardPerMinute=yd³/min -CubicYardPerSecond=yd³/s -DeciliterPerDay=dl/day,dL/d,dLPD -DeciliterPerHour=dL/h,dLPH -DeciliterPerMinute=dL/min,dLPM -DeciliterPerSecond=dL/s,dLPS -KiloliterPerDay=kl/day,kL/d,kLPD -KiloliterPerHour=kL/h,kLPH -KiloliterPerMinute=kL/min,kLPM -KiloliterPerSecond=kL/s,kLPS -KilousGallonPerMinute=kgal (U.S.)/min,KGPM -LiterPerDay=l/day,L/d,LPD -LiterPerHour=L/h,LPH -LiterPerMinute=L/min,LPM -LiterPerSecond=L/s,LPS -MegaliterPerDay=Ml/day,ML/d,MLPD -MegaliterPerHour=ML/h,MLPH -MegaliterPerMinute=ML/min,MLPM -MegaliterPerSecond=ML/s,MLPS -MegaukGallonPerSecond=Mgal (imp.)/s -MicroliterPerDay=µl/day,µL/d,µLPD -MicroliterPerHour=µL/h,µLPH -MicroliterPerMinute=µL/min,µLPM -MicroliterPerSecond=µL/s,µLPS -MilliliterPerDay=ml/day,mL/d,mLPD -MilliliterPerHour=mL/h,mLPH -MilliliterPerMinute=mL/min,mLPM -MilliliterPerSecond=mL/s,mLPS -MillionUsGallonPerDay=MGD -NanoliterPerDay=nl/day,nL/d,nLPD -NanoliterPerHour=nL/h,nLPH -NanoliterPerMinute=nL/min,nLPM -NanoliterPerSecond=nL/s,nLPS -OilBarrelPerDay=bbl/d,BOPD -OilBarrelPerHour=bbl/hr,bph -OilBarrelPerMinute=bbl/min,bpm -OilBarrelPerSecond=bbl/s -UkGallonPerDay=gal (U. K.)/d -UkGallonPerHour=gal (imp.)/h -UkGallonPerMinute=gal (imp.)/min -UkGallonPerSecond=gal (imp.)/s -UsGallonPerDay=gpd,gal/d -UsGallonPerHour=gal (U.S.)/h -UsGallonPerMinute=gal (U.S.)/min,GPM -UsGallonPerSecond=gal (U.S.)/s +AcreFeetPerDay=af/d +AcreFeetPerHour=af/h +AcreFeetPerMinute=af/m +AcreFeetPerSecond=af/s +CentilitersPerDay=cl/day,cL/d,cLPD +CentilitersPerHour=cL/h,cLPH +CentilitersPerMinute=cL/min,cLPM +CentilitersPerSecond=cL/s,cLPS +CubicCentimetersPerMinute=cm³/min +CubicDecimetersPerMinute=dm³/min +CubicFeetPerHour=ft³/h,cf/hr +CubicFeetPerMinute=ft³/min,CFM +CubicFeetPerSecond=ft³/s +CubicMetersPerDay=m³/d +CubicMetersPerHour=m³/h +CubicMetersPerMinute=m³/min +CubicMetersPerSecond=m³/s +CubicMillimetersPerSecond=mm³/s +CubicYardsPerDay=cy/day +CubicYardsPerHour=yd³/h +CubicYardsPerMinute=yd³/min +CubicYardsPerSecond=yd³/s +DecilitersPerDay=dl/day,dL/d,dLPD +DecilitersPerHour=dL/h,dLPH +DecilitersPerMinute=dL/min,dLPM +DecilitersPerSecond=dL/s,dLPS +KilolitersPerDay=kl/day,kL/d,kLPD +KilolitersPerHour=kL/h,kLPH +KilolitersPerMinute=kL/min,kLPM +KilolitersPerSecond=kL/s,kLPS +KilousGallonsPerMinute=kgal (U.S.)/min,KGPM +LitersPerDay=l/day,L/d,LPD +LitersPerHour=L/h,LPH +LitersPerMinute=L/min,LPM +LitersPerSecond=L/s,LPS +MegalitersPerDay=Ml/day,ML/d,MLPD +MegalitersPerHour=ML/h,MLPH +MegalitersPerMinute=ML/min,MLPM +MegalitersPerSecond=ML/s,MLPS +MegaukGallonsPerSecond=Mgal (imp.)/s +MicrolitersPerDay=µl/day,µL/d,µLPD +MicrolitersPerHour=µL/h,µLPH +MicrolitersPerMinute=µL/min,µLPM +MicrolitersPerSecond=µL/s,µLPS +MillilitersPerDay=ml/day,mL/d,mLPD +MillilitersPerHour=mL/h,mLPH +MillilitersPerMinute=mL/min,mLPM +MillilitersPerSecond=mL/s,mLPS +MillionUsGallonsPerDay=MGD +NanolitersPerDay=nl/day,nL/d,nLPD +NanolitersPerHour=nL/h,nLPH +NanolitersPerMinute=nL/min,nLPM +NanolitersPerSecond=nL/s,nLPS +OilBarrelsPerDay=bbl/d,BOPD +OilBarrelsPerHour=bbl/hr,bph +OilBarrelsPerMinute=bbl/min,bpm +OilBarrelsPerSecond=bbl/s +UkGallonsPerDay=gal (U. K.)/d +UkGallonsPerHour=gal (imp.)/h +UkGallonsPerMinute=gal (imp.)/min +UkGallonsPerSecond=gal (imp.)/s +UsGallonsPerDay=gpd,gal/d +UsGallonsPerHour=gal (U.S.)/h +UsGallonsPerMinute=gal (U.S.)/min,GPM +UsGallonsPerSecond=gal (U.S.)/s diff --git a/UnitsNet/GeneratedCode/Resources/VolumeFlow.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/VolumeFlow.ru-RU.restext index a5af42fc39..6e5a483b50 100644 --- a/UnitsNet/GeneratedCode/Resources/VolumeFlow.ru-RU.restext +++ b/UnitsNet/GeneratedCode/Resources/VolumeFlow.ru-RU.restext @@ -1,30 +1,30 @@ -CentiliterPerHour=сл/ч -CentiliterPerMinute=сл/мин -CentiliterPerSecond=сл/c -CubicCentimeterPerMinute=см³/мин -CubicDecimeterPerMinute=дм³/мин -CubicMeterPerHour=м³/ч -CubicMeterPerMinute=м³/мин -CubicMeterPerSecond=м³/с -CubicMillimeterPerSecond=мм³/с -DeciliterPerHour=дл/ч -DeciliterPerMinute=дл/мин -DeciliterPerSecond=дл/c -KiloliterPerHour=кл/ч -KiloliterPerMinute=кл/мин -KiloliterPerSecond=кл/c -LiterPerHour=л/ч -LiterPerMinute=л/мин -LiterPerSecond=л/c -MegaliterPerHour=Мл/ч -MegaliterPerMinute=Мл/мин -MegaliterPerSecond=Мл/c -MicroliterPerHour=мкл/ч -MicroliterPerMinute=мкл/мин -MicroliterPerSecond=мкл/c -MilliliterPerHour=мл/ч -MilliliterPerMinute=мл/мин -MilliliterPerSecond=мл/c -NanoliterPerHour=нл/ч -NanoliterPerMinute=нл/мин -NanoliterPerSecond=нл/c +CentilitersPerHour=сл/ч +CentilitersPerMinute=сл/мин +CentilitersPerSecond=сл/c +CubicCentimetersPerMinute=см³/мин +CubicDecimetersPerMinute=дм³/мин +CubicMetersPerHour=м³/ч +CubicMetersPerMinute=м³/мин +CubicMetersPerSecond=м³/с +CubicMillimetersPerSecond=мм³/с +DecilitersPerHour=дл/ч +DecilitersPerMinute=дл/мин +DecilitersPerSecond=дл/c +KilolitersPerHour=кл/ч +KilolitersPerMinute=кл/мин +KilolitersPerSecond=кл/c +LitersPerHour=л/ч +LitersPerMinute=л/мин +LitersPerSecond=л/c +MegalitersPerHour=Мл/ч +MegalitersPerMinute=Мл/мин +MegalitersPerSecond=Мл/c +MicrolitersPerHour=мкл/ч +MicrolitersPerMinute=мкл/мин +MicrolitersPerSecond=мкл/c +MillilitersPerHour=мл/ч +MillilitersPerMinute=мл/мин +MillilitersPerSecond=мл/c +NanolitersPerHour=нл/ч +NanolitersPerMinute=нл/мин +NanolitersPerSecond=нл/c diff --git a/UnitsNet/GeneratedCode/Resources/VolumeFlowPerArea.restext b/UnitsNet/GeneratedCode/Resources/VolumeFlowPerArea.restext index fee7f480c6..11724fc3d4 100644 --- a/UnitsNet/GeneratedCode/Resources/VolumeFlowPerArea.restext +++ b/UnitsNet/GeneratedCode/Resources/VolumeFlowPerArea.restext @@ -1,2 +1,2 @@ -CubicFootPerMinutePerSquareFoot=CFM/ft² -CubicMeterPerSecondPerSquareMeter=m³/(s·m²) +CubicFeetPerMinutePerSquareFoot=CFM/ft² +CubicMetersPerSecondPerSquareMeter=m³/(s·m²) diff --git a/UnitsNet/GeneratedCode/Resources/VolumePerLength.restext b/UnitsNet/GeneratedCode/Resources/VolumePerLength.restext index 2c94e88c19..aa0746dcb1 100644 --- a/UnitsNet/GeneratedCode/Resources/VolumePerLength.restext +++ b/UnitsNet/GeneratedCode/Resources/VolumePerLength.restext @@ -1,7 +1,7 @@ -CubicMeterPerMeter=m³/m -CubicYardPerFoot=yd³/ft -CubicYardPerUsSurveyFoot=yd³/ftUS -LiterPerKilometer=l/km -LiterPerMeter=l/m -LiterPerMillimeter=l/mm -OilBarrelPerFoot=bbl/ft +CubicMetersPerMeter=m³/m +CubicYardsPerFoot=yd³/ft +CubicYardsPerUsSurveyFoot=yd³/ftUS +LitersPerKilometer=l/km +LitersPerMeter=l/m +LitersPerMillimeter=l/mm +OilBarrelsPerFoot=bbl/ft diff --git a/UnitsNet/GeneratedCode/Resources/VolumetricHeatCapacity.restext b/UnitsNet/GeneratedCode/Resources/VolumetricHeatCapacity.restext index dcb9dc8559..fe8f856155 100644 --- a/UnitsNet/GeneratedCode/Resources/VolumetricHeatCapacity.restext +++ b/UnitsNet/GeneratedCode/Resources/VolumetricHeatCapacity.restext @@ -1,9 +1,9 @@ -BtuPerCubicFootDegreeFahrenheit=BTU/ft³·°F -CaloriePerCubicCentimeterDegreeCelsius=cal/cm³·°C -JoulePerCubicMeterDegreeCelsius=J/m³·°C -JoulePerCubicMeterKelvin=J/m³·K -KilocaloriePerCubicCentimeterDegreeCelsius=kcal/cm³·°C -KilojoulePerCubicMeterDegreeCelsius=kJ/m³·°C -KilojoulePerCubicMeterKelvin=kJ/m³·K -MegajoulePerCubicMeterDegreeCelsius=MJ/m³·°C -MegajoulePerCubicMeterKelvin=MJ/m³·K +BtusPerCubicFootDegreeFahrenheit=BTU/ft³·°F +CaloriesPerCubicCentimeterDegreeCelsius=cal/cm³·°C +JoulesPerCubicMeterDegreeCelsius=J/m³·°C +JoulesPerCubicMeterKelvin=J/m³·K +KilocaloriesPerCubicCentimeterDegreeCelsius=kcal/cm³·°C +KilojoulesPerCubicMeterDegreeCelsius=kJ/m³·°C +KilojoulesPerCubicMeterKelvin=kJ/m³·K +MegajoulesPerCubicMeterDegreeCelsius=MJ/m³·°C +MegajoulesPerCubicMeterKelvin=MJ/m³·K diff --git a/UnitsNet/GeneratedCode/Resources/WarpingMomentOfInertia.restext b/UnitsNet/GeneratedCode/Resources/WarpingMomentOfInertia.restext index a83ca073f8..aacc58de54 100644 --- a/UnitsNet/GeneratedCode/Resources/WarpingMomentOfInertia.restext +++ b/UnitsNet/GeneratedCode/Resources/WarpingMomentOfInertia.restext @@ -1,6 +1,6 @@ -CentimeterToTheSixth=cm⁶,cm^6 -DecimeterToTheSixth=dm⁶,dm^6 -FootToTheSixth=ft⁶,ft^6 -InchToTheSixth=in⁶,in^6 -MeterToTheSixth=m⁶,m^6 -MillimeterToTheSixth=mm⁶,mm^6 +CentimetersToTheSixth=cm⁶,cm^6 +DecimetersToTheSixth=dm⁶,dm^6 +FeetToTheSixth=ft⁶,ft^6 +InchesToTheSixth=in⁶,in^6 +MetersToTheSixth=m⁶,m^6 +MillimetersToTheSixth=mm⁶,mm^6 diff --git a/UnitsNet/IQuantity.cs b/UnitsNet/IQuantity.cs index f53358e3f0..cb4ebdb6a4 100644 --- a/UnitsNet/IQuantity.cs +++ b/UnitsNet/IQuantity.cs @@ -2,7 +2,6 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; -using System.Collections.Generic; using System.Globalization; #if NET7_0_OR_GREATER using System.Numerics; @@ -77,12 +76,6 @@ public interface IQuantity : IFormattable /// String representation. /// Format to use for localization and number formatting. Defaults to if null. string ToString(IFormatProvider? provider); - - /// - /// - /// - /// - IReadOnlyList GetAbbreviations(CultureInfo? culture = null); } /// diff --git a/UnitsNet/QuantityFormatter.cs b/UnitsNet/QuantityFormatter.cs index 552d94ae67..4d8a10d1ce 100644 --- a/UnitsNet/QuantityFormatter.cs +++ b/UnitsNet/QuantityFormatter.cs @@ -147,9 +147,9 @@ private static string FormatUntrimmed(IQuantity quantity, return ToStringWithSignificantDigitsAfterRadix(quantity, formatProvider, 2); case 'A': case 'a': - var abbreviations = quantity.GetAbbreviations((CultureInfo)formatProvider); + var abbreviations = UnitAbbreviationsCache.Default.GetUnitAbbreviations(quantity.Unit, formatProvider); - if (precisionSpecifier >= abbreviations.Count) + if (precisionSpecifier >= abbreviations.Length) throw new FormatException($"The {format} format string is invalid because the abbreviation index does not exist."); return abbreviations[precisionSpecifier]; @@ -173,7 +173,7 @@ private static string FormatUntrimmed(IQuantity quantity, { // Anything else is a standard numeric format string with default unit abbreviation postfix. - var abbreviations = quantity.GetAbbreviations((CultureInfo)formatProvider); + var abbreviations = UnitAbbreviationsCache.Default.GetUnitAbbreviations(quantity.Unit, formatProvider); return string.Format(formatProvider, $"{{0:{format}}} {{1}}", quantity.Value, abbreviations.First()); } } diff --git a/UnitsNet/UnitInfo.cs b/UnitsNet/UnitInfo.cs index 7fc673ea87..531de97c33 100644 --- a/UnitsNet/UnitInfo.cs +++ b/UnitsNet/UnitInfo.cs @@ -2,6 +2,10 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Globalization; +using System.Resources; using UnitsNet.Units; namespace UnitsNet @@ -29,6 +33,21 @@ public UnitInfo(Enum value, string pluralName, BaseUnits baseUnits) Name = value.ToString(); PluralName = pluralName; BaseUnits = baseUnits ?? throw new ArgumentNullException(nameof(baseUnits)); + + AbbreviationsMap = new ConcurrentDictionary>>(); + } + + /// + /// Creates an instance of the UnitInfo class. + /// + /// The enum value for this class, for example . + /// The plural name of the unit, such as "Centimeters". + /// The for this unit. + /// The quantity name that this unit is for. + internal UnitInfo(Enum value, string pluralName, BaseUnits baseUnits, string quantityName) : + this(value, pluralName, baseUnits) + { + QuantityName = quantityName; } /// @@ -50,6 +69,46 @@ public UnitInfo(Enum value, string pluralName, BaseUnits baseUnits) /// Gets the for this unit. /// public BaseUnits BaseUnits { get; } + + private string? QuantityName { get; } + + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + private IDictionary>> AbbreviationsMap { get; } + + /// + /// + /// + /// + /// + /// + public IList GetAbbreviations(CultureInfo culture) + { + culture ??= CultureInfo.CurrentCulture; + + if(!AbbreviationsMap.TryGetValue(culture, out var abbreviations)) + AbbreviationsMap[culture] = abbreviations = new Lazy>(() => ReadAbbreviationsFromResourceFile(culture)); + + return abbreviations.Value; + } + + private List ReadAbbreviationsFromResourceFile(CultureInfo culture) + { + var abbreviationsList = new List(); + + if(QuantityName is not null) + { + string resourceName = $"UnitsNet.GeneratedCode.Resources.{QuantityName}"; + var resourceManager = new ResourceManager(resourceName, GetType().Assembly); + + var abbreviationsString = resourceManager.GetString(PluralName, culture); + if(abbreviationsString is not null) + abbreviationsList.AddRange(abbreviationsString.Split(',')); + } + + return abbreviationsList; + } } /// @@ -63,7 +122,15 @@ public class UnitInfo : UnitInfo where TUnit : Enum { /// - public UnitInfo(TUnit value, string pluralName, BaseUnits baseUnits) : base(value, pluralName, baseUnits) + public UnitInfo(TUnit value, string pluralName, BaseUnits baseUnits) : + base(value, pluralName, baseUnits) + { + Value = value; + } + + /// + internal UnitInfo(TUnit value, string pluralName, BaseUnits baseUnits, string quantityName) : + base(value, pluralName, baseUnits, quantityName) { Value = value; } From a40fddac43c80a9167efc43cba3870a09bf474bd Mon Sep 17 00:00:00 2001 From: Tristan Milnthorp Date: Mon, 13 Mar 2023 16:36:05 -0400 Subject: [PATCH 22/26] Revert --- UnitsNet.Tests/CustomQuantities/HowMuch.cs | 4 ---- UnitsNet.Tests/DummyIQuantity.cs | 4 ---- 2 files changed, 8 deletions(-) diff --git a/UnitsNet.Tests/CustomQuantities/HowMuch.cs b/UnitsNet.Tests/CustomQuantities/HowMuch.cs index de17dc855d..bada53f7c8 100644 --- a/UnitsNet.Tests/CustomQuantities/HowMuch.cs +++ b/UnitsNet.Tests/CustomQuantities/HowMuch.cs @@ -1,6 +1,4 @@ using System; -using System.Collections.Generic; -using System.Globalization; namespace UnitsNet.Tests.CustomQuantities { @@ -56,8 +54,6 @@ public IQuantity ToUnit(Enum unit) public string ToString(string? format, IFormatProvider? formatProvider) => $"HowMuch ({format}, {formatProvider})"; public string ToString(IFormatProvider? provider) => $"HowMuch ({provider})"; - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => Array.Empty(); - #endregion } } diff --git a/UnitsNet.Tests/DummyIQuantity.cs b/UnitsNet.Tests/DummyIQuantity.cs index ea586be0d6..bd9f57c2e7 100644 --- a/UnitsNet.Tests/DummyIQuantity.cs +++ b/UnitsNet.Tests/DummyIQuantity.cs @@ -1,7 +1,5 @@ #nullable enable using System; -using System.Collections.Generic; -using System.Globalization; namespace UnitsNet.Tests { @@ -28,7 +26,5 @@ internal class DummyIQuantity : IQuantity public IQuantity ToUnit(Enum unit ) => throw new NotImplementedException(); public IQuantity ToUnit(UnitSystem unitSystem ) => throw new NotImplementedException(); - - public IReadOnlyList GetAbbreviations(CultureInfo? culture = null) => throw new NotImplementedException(); } } From e8fd69bdf0288cb6455e7c7df65ab927716820a1 Mon Sep 17 00:00:00 2001 From: Tristan Milnthorp Date: Mon, 13 Mar 2023 16:56:06 -0400 Subject: [PATCH 23/26] Fix for non-culture IFormatProvider --- UnitsNet/CustomCode/UnitAbbreviationsCache.cs | 4 ++-- UnitsNet/UnitInfo.cs | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/UnitsNet/CustomCode/UnitAbbreviationsCache.cs b/UnitsNet/CustomCode/UnitAbbreviationsCache.cs index fc0ccfc04b..8009e0a958 100644 --- a/UnitsNet/CustomCode/UnitAbbreviationsCache.cs +++ b/UnitsNet/CustomCode/UnitAbbreviationsCache.cs @@ -189,8 +189,8 @@ public string[] GetUnitAbbreviations(Type unitType, int unitValue, IFormatProvid if(!Quantity.TryFrom(0.0, enumInstance, out var quantity)) throw new NotImplementedException($"No abbreviation is specified for {unitType.Name} with numeric value {unitValue}."); - var unitInfo = quantity.QuantityInfo.UnitInfos[unitValue]; - return unitInfo.GetAbbreviations((CultureInfo)formatProvider!).ToArray(); + var unitInfo = Quantity.GetUnitInfo(enumInstance); + return unitInfo.GetAbbreviations(formatProvider!).ToArray(); } /// diff --git a/UnitsNet/UnitInfo.cs b/UnitsNet/UnitInfo.cs index 531de97c33..06b7f3a9ee 100644 --- a/UnitsNet/UnitInfo.cs +++ b/UnitsNet/UnitInfo.cs @@ -80,12 +80,15 @@ internal UnitInfo(Enum value, string pluralName, BaseUnits baseUnits, string qua /// /// /// - /// + /// /// /// - public IList GetAbbreviations(CultureInfo culture) + public IList GetAbbreviations(IFormatProvider? formatProvider = null) { - culture ??= CultureInfo.CurrentCulture; + if(formatProvider is null || formatProvider is not CultureInfo) + formatProvider = CultureInfo.CurrentCulture; + + var culture = (CultureInfo)formatProvider; if(!AbbreviationsMap.TryGetValue(culture, out var abbreviations)) AbbreviationsMap[culture] = abbreviations = new Lazy>(() => ReadAbbreviationsFromResourceFile(culture)); From b8a5eadae619acec0180ecb9a0fb48284e061c25 Mon Sep 17 00:00:00 2001 From: Tristan Milnthorp Date: Tue, 14 Mar 2023 10:49:51 -0400 Subject: [PATCH 24/26] Implement custom abbreviation mapping --- UnitsNet/BaseUnits.cs | 37 +++++++------ UnitsNet/CustomCode/Quantity.cs | 10 ++++ UnitsNet/CustomCode/UnitAbbreviationsCache.cs | 51 ++++++++++++++---- UnitsNet/UnitInfo.cs | 54 ++++++++++++++++--- 4 files changed, 120 insertions(+), 32 deletions(-) diff --git a/UnitsNet/BaseUnits.cs b/UnitsNet/BaseUnits.cs index cd1b580db8..578bc291a0 100644 --- a/UnitsNet/BaseUnits.cs +++ b/UnitsNet/BaseUnits.cs @@ -138,21 +138,28 @@ public override int GetHashCode() /// public override string ToString() { - var sb = new StringBuilder(); - - string GetDefaultAbbreviation(TUnitType? unitOrNull) where TUnitType : struct, Enum => unitOrNull is { } unit - ? UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit) - : "N/A"; - - sb.AppendFormat("[Length]: {0}, ", GetDefaultAbbreviation(Length)); - sb.AppendFormat("[Mass]: {0}, ", GetDefaultAbbreviation(Mass)); - sb.AppendFormat("[Time]: {0}, ", GetDefaultAbbreviation(Time)); - sb.AppendFormat("[Current]: {0}, ", GetDefaultAbbreviation(Current)); - sb.AppendFormat("[Temperature]: {0}, ", GetDefaultAbbreviation(Temperature)); - sb.AppendFormat("[Amount]: {0}, ", GetDefaultAbbreviation(Amount)); - sb.AppendFormat("[LuminousIntensity]: {0}", GetDefaultAbbreviation(LuminousIntensity)); - - return sb.ToString(); + if(!Equals(Undefined)) + { + var sb = new StringBuilder(); + + string GetDefaultAbbreviation(TUnitType? unitOrNull) where TUnitType : struct, Enum => unitOrNull is { } unit + ? UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit) + : "N/A"; + + sb.AppendFormat("[Length]: {0}, ", GetDefaultAbbreviation(Length)); + sb.AppendFormat("[Mass]: {0}, ", GetDefaultAbbreviation(Mass)); + sb.AppendFormat("[Time]: {0}, ", GetDefaultAbbreviation(Time)); + sb.AppendFormat("[Current]: {0}, ", GetDefaultAbbreviation(Current)); + sb.AppendFormat("[Temperature]: {0}, ", GetDefaultAbbreviation(Temperature)); + sb.AppendFormat("[Amount]: {0}, ", GetDefaultAbbreviation(Amount)); + sb.AppendFormat("[LuminousIntensity]: {0}", GetDefaultAbbreviation(LuminousIntensity)); + + return sb.ToString(); + } + else + { + return "Undefined"; + } } /// diff --git a/UnitsNet/CustomCode/Quantity.cs b/UnitsNet/CustomCode/Quantity.cs index acff8597f6..bb1f384a38 100644 --- a/UnitsNet/CustomCode/Quantity.cs +++ b/UnitsNet/CustomCode/Quantity.cs @@ -52,6 +52,16 @@ static Quantity() public static bool TryGetUnitInfo(Enum unitEnum, [NotNullWhen(true)] out UnitInfo? unitInfo) => UnitTypeAndNameToUnitInfoLazy.Value.TryGetValue((unitEnum.GetType(), unitEnum.ToString()), out unitInfo); + /// + /// + /// + /// + /// + public static void AddUnitInfo(Enum unit, UnitInfo unitInfo) + { + UnitTypeAndNameToUnitInfoLazy.Value.Add((unit.GetType(), unit.ToString()), unitInfo); + } + /// /// Dynamically construct a quantity. /// diff --git a/UnitsNet/CustomCode/UnitAbbreviationsCache.cs b/UnitsNet/CustomCode/UnitAbbreviationsCache.cs index 8009e0a958..70a483b2ce 100644 --- a/UnitsNet/CustomCode/UnitAbbreviationsCache.cs +++ b/UnitsNet/CustomCode/UnitAbbreviationsCache.cs @@ -130,7 +130,13 @@ public void MapUnitToDefaultAbbreviation(Type unitType, int unitValue, IFormatPr internal void PerformAbbreviationMapping(Enum unitValue, IFormatProvider? formatProvider, bool setAsDefault, bool allowAbbreviationLookup, params string[] abbreviations) { - throw new NotImplementedException(); + if(!Quantity.TryGetUnitInfo(unitValue, out var unitInfo)) + { + unitInfo = new UnitInfo(unitValue, unitValue.ToString(), BaseUnits.Undefined); + Quantity.AddUnitInfo(unitValue, unitInfo); + } + + unitInfo.AddAbbreviation(formatProvider, setAsDefault, allowAbbreviationLookup, abbreviations); } /// @@ -183,14 +189,37 @@ public string[] GetUnitAbbreviations(TUnitType unit, IFormatProvider? /// Unit abbreviations associated with unit. public string[] GetUnitAbbreviations(Type unitType, int unitValue, IFormatProvider? formatProvider = null) { - var name = Enum.GetName(unitType, unitValue); - var enumInstance = (Enum)Enum.Parse(unitType, name!); + formatProvider ??= CultureInfo.CurrentCulture; - if(!Quantity.TryFrom(0.0, enumInstance, out var quantity)) + if(TryGetUnitAbbreviations(unitType, unitValue, formatProvider, out var abbreviations)) + return abbreviations; + else throw new NotImplementedException($"No abbreviation is specified for {unitType.Name} with numeric value {unitValue}."); + } - var unitInfo = Quantity.GetUnitInfo(enumInstance); - return unitInfo.GetAbbreviations(formatProvider!).ToArray(); + /// + /// Get all abbreviations for unit. + /// + /// Enum type for unit. + /// Enum value for unit. + /// The format provider to use for lookup. Defaults to if null. + /// The unit abbreviations associated with unit. + /// True if found, otherwise false. + private bool TryGetUnitAbbreviations(Type unitType, int unitValue, IFormatProvider? formatProvider, out string[] abbreviations) + { + var name = Enum.GetName(unitType, unitValue); + var enumInstance = (Enum)Enum.Parse(unitType, name!); + + if(Quantity.TryGetUnitInfo(enumInstance, out var unitInfo)) + { + abbreviations = unitInfo.GetAbbreviations(formatProvider!).ToArray(); + return true; + } + else + { + abbreviations = Array.Empty(); + return false; + } } /// @@ -209,14 +238,16 @@ public IReadOnlyList GetAllUnitAbbreviationsForQuantity(Type unitEnumTyp internal List<(string Abbreviation, Enum Unit)> GetStringUnitPairs(IEnumerable enumValues, IFormatProvider? formatProvider = null) { var ret = new List<(string, Enum)>(); + formatProvider ??= CultureInfo.CurrentCulture; foreach(var enumValue in enumValues) { - var abbreviations = GetUnitAbbreviations(enumValue.GetType(), Convert.ToInt32(enumValue), formatProvider); - - foreach(var abbrev in abbreviations) + if(TryGetUnitAbbreviations(enumValue.GetType(), Convert.ToInt32(enumValue), formatProvider, out var abbreviations)) { - ret.Add((abbrev, enumValue)); + foreach(var abbrev in abbreviations) + { + ret.Add((abbrev, enumValue)); + } } } diff --git a/UnitsNet/UnitInfo.cs b/UnitsNet/UnitInfo.cs index 06b7f3a9ee..056614c35a 100644 --- a/UnitsNet/UnitInfo.cs +++ b/UnitsNet/UnitInfo.cs @@ -21,6 +21,8 @@ namespace UnitsNet /// public class UnitInfo { + private readonly object _syncRoot = new(); + /// /// Creates an instance of the UnitInfo class. /// @@ -34,7 +36,7 @@ public UnitInfo(Enum value, string pluralName, BaseUnits baseUnits) PluralName = pluralName; BaseUnits = baseUnits ?? throw new ArgumentNullException(nameof(baseUnits)); - AbbreviationsMap = new ConcurrentDictionary>>(); + AbbreviationsMap = new ConcurrentDictionary>>(); } /// @@ -75,7 +77,7 @@ internal UnitInfo(Enum value, string pluralName, BaseUnits baseUnits, string qua /// /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. /// - private IDictionary>> AbbreviationsMap { get; } + private IDictionary>> AbbreviationsMap { get; } /// /// @@ -83,7 +85,7 @@ internal UnitInfo(Enum value, string pluralName, BaseUnits baseUnits, string qua /// /// /// - public IList GetAbbreviations(IFormatProvider? formatProvider = null) + public IReadOnlyList GetAbbreviations(IFormatProvider? formatProvider = null) { if(formatProvider is null || formatProvider is not CultureInfo) formatProvider = CultureInfo.CurrentCulture; @@ -91,12 +93,50 @@ public IList GetAbbreviations(IFormatProvider? formatProvider = null) var culture = (CultureInfo)formatProvider; if(!AbbreviationsMap.TryGetValue(culture, out var abbreviations)) - AbbreviationsMap[culture] = abbreviations = new Lazy>(() => ReadAbbreviationsFromResourceFile(culture)); + AbbreviationsMap[culture] = abbreviations = new Lazy>(() => ReadAbbreviationsFromResourceFile(culture)); + + if(abbreviations.Value.Count == 0 && !culture.Equals(UnitAbbreviationsCache.FallbackCulture)) + return GetAbbreviations(UnitAbbreviationsCache.FallbackCulture); + else + return abbreviations.Value; + } - return abbreviations.Value; + /// + /// + /// + /// + /// + /// + /// + public void AddAbbreviation(IFormatProvider? formatProvider, bool setAsDefault, bool allowAbbreviationLookup, params string[] abbreviations) + { + if(formatProvider is null || formatProvider is not CultureInfo) + formatProvider = CultureInfo.CurrentCulture; + + var culture = (CultureInfo)formatProvider; + + // Restrict concurrency on writes. + // By using ConcurrencyDictionary and immutable IReadOnlyList instances, we don't need to lock on reads. + lock(_syncRoot) + { + var currentAbbreviationsList = new List(GetAbbreviations(culture)); + + foreach(var abbreviation in abbreviations) + { + if(!currentAbbreviationsList.Contains(abbreviation)) + { + if(setAsDefault) + currentAbbreviationsList.Insert(0, abbreviation); + else + currentAbbreviationsList.Add(abbreviation); + } + } + + AbbreviationsMap[culture] = new Lazy>(() => currentAbbreviationsList.AsReadOnly()); + } } - private List ReadAbbreviationsFromResourceFile(CultureInfo culture) + private IReadOnlyList ReadAbbreviationsFromResourceFile(CultureInfo culture) { var abbreviationsList = new List(); @@ -110,7 +150,7 @@ private List ReadAbbreviationsFromResourceFile(CultureInfo culture) abbreviationsList.AddRange(abbreviationsString.Split(',')); } - return abbreviationsList; + return abbreviationsList.AsReadOnly(); } } From 52369d0f05fcf218ab89434a8ca3366383be9439 Mon Sep 17 00:00:00 2001 From: Tristan Milnthorp Date: Mon, 8 May 2023 09:52:18 -0400 Subject: [PATCH 25/26] Fix for static Quantity generator --- CodeGen/Generators/UnitsNetGen/StaticQuantityGenerator.cs | 6 +++--- UnitsNet/GeneratedCode/Quantity.g.cs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CodeGen/Generators/UnitsNetGen/StaticQuantityGenerator.cs b/CodeGen/Generators/UnitsNetGen/StaticQuantityGenerator.cs index 2fbfc6b4f9..79f0a23def 100644 --- a/CodeGen/Generators/UnitsNetGen/StaticQuantityGenerator.cs +++ b/CodeGen/Generators/UnitsNetGen/StaticQuantityGenerator.cs @@ -29,7 +29,7 @@ namespace UnitsNet /// /// Dynamically parse or construct quantities when types are only known at runtime. /// - public static partial class Quantity + public partial class Quantity { /// /// All QuantityInfo instances mapped by quantity name that are present in UnitsNet by default. @@ -62,7 +62,7 @@ public static IQuantity FromQuantityInfo(QuantityInfo quantityInfo, QuantityValu Writer.WL(@" _ => throw new ArgumentException($""{quantityInfo.Name} is not a supported quantity."") }; - } + } /// /// Try to dynamically construct a quantity. @@ -120,7 +120,7 @@ public static bool TryParse(IFormatProvider? formatProvider, Type quantityType, Writer.WL(@" _ => false }; - } + } internal static IEnumerable GetQuantityTypes() {"); diff --git a/UnitsNet/GeneratedCode/Quantity.g.cs b/UnitsNet/GeneratedCode/Quantity.g.cs index 60ebbc4ec0..65dce36506 100644 --- a/UnitsNet/GeneratedCode/Quantity.g.cs +++ b/UnitsNet/GeneratedCode/Quantity.g.cs @@ -30,7 +30,7 @@ namespace UnitsNet /// /// Dynamically parse or construct quantities when types are only known at runtime. /// - public static partial class Quantity + public partial class Quantity { /// /// All QuantityInfo instances mapped by quantity name that are present in UnitsNet by default. @@ -289,7 +289,7 @@ public static IQuantity FromQuantityInfo(QuantityInfo quantityInfo, QuantityValu "WarpingMomentOfInertia" => WarpingMomentOfInertia.From(value, WarpingMomentOfInertia.BaseUnit), _ => throw new ArgumentException($"{quantityInfo.Name} is not a supported quantity.") }; - } + } /// /// Try to dynamically construct a quantity. @@ -567,7 +567,7 @@ public static bool TryParse(IFormatProvider? formatProvider, Type quantityType, Type _ when quantityType == typeof(WarpingMomentOfInertia) => parser.TryParse(quantityString, formatProvider, WarpingMomentOfInertia.From, out quantity), _ => false }; - } + } internal static IEnumerable GetQuantityTypes() { From 4666383f50567092f7b7eba5d41c35f7da958269 Mon Sep 17 00:00:00 2001 From: Tristan Milnthorp Date: Fri, 19 May 2023 15:04:48 -0400 Subject: [PATCH 26/26] Forward to instance --- UnitsNet/CustomCode/Quantity.cs | 67 +++------ UnitsNet/CustomCode/UnitAbbreviationsCache.cs | 9 +- UnitsNet/QuantityInfoLookup.cs | 136 ++++++++++++++++++ 3 files changed, 158 insertions(+), 54 deletions(-) create mode 100644 UnitsNet/QuantityInfoLookup.cs diff --git a/UnitsNet/CustomCode/Quantity.cs b/UnitsNet/CustomCode/Quantity.cs index bb1f384a38..50706c3e0d 100644 --- a/UnitsNet/CustomCode/Quantity.cs +++ b/UnitsNet/CustomCode/Quantity.cs @@ -2,65 +2,48 @@ using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; -using System.Linq; namespace UnitsNet { public partial class Quantity { - private static readonly Lazy InfosLazy; - private static readonly Lazy> UnitTypeAndNameToUnitInfoLazy; - static Quantity() { - ICollection quantityInfos = ByName.Values; - Names = quantityInfos.Select(qt => qt.Name).ToArray(); - - InfosLazy = new Lazy(() => quantityInfos - .OrderBy(quantityInfo => quantityInfo.Name) - .ToArray()); + Default = new QuantityInfoLookup(); + } - UnitTypeAndNameToUnitInfoLazy = new Lazy>(() => - { - return Infos - .SelectMany(quantityInfo => quantityInfo.UnitInfos - .Select(unitInfo => new KeyValuePair<(Type, string), UnitInfo>( - (unitInfo.Value.GetType(), unitInfo.Name), - unitInfo))) - .ToDictionary(x => x.Key, x => x.Value); - }); + private static QuantityInfoLookup Default + { + get; } /// /// All enum value names of , such as "Length" and "Mass". /// - public static string[] Names { get; } + public static string[] Names { get => Default.Names; } /// /// All quantity information objects, such as and . /// - public static QuantityInfo[] Infos => InfosLazy.Value; + public static QuantityInfo[] Infos => Default.Infos; /// /// Get for a given unit enum value. /// - public static UnitInfo GetUnitInfo(Enum unitEnum) => UnitTypeAndNameToUnitInfoLazy.Value[(unitEnum.GetType(), unitEnum.ToString())]; + public static UnitInfo GetUnitInfo(Enum unitEnum) => Default.GetUnitInfo(unitEnum); /// /// Try to get for a given unit enum value. /// public static bool TryGetUnitInfo(Enum unitEnum, [NotNullWhen(true)] out UnitInfo? unitInfo) => - UnitTypeAndNameToUnitInfoLazy.Value.TryGetValue((unitEnum.GetType(), unitEnum.ToString()), out unitInfo); + Default.TryGetUnitInfo(unitEnum, out unitInfo); /// /// /// /// /// - public static void AddUnitInfo(Enum unit, UnitInfo unitInfo) - { - UnitTypeAndNameToUnitInfoLazy.Value.Add((unit.GetType(), unit.ToString()), unitInfo); - } + public static void AddUnitInfo(Enum unit, UnitInfo unitInfo) => Default.AddUnitInfo(unit, unitInfo); /// /// Dynamically construct a quantity. @@ -71,29 +54,17 @@ public static void AddUnitInfo(Enum unit, UnitInfo unitInfo) /// 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?"); + return Default.From(value, unit); } /// public static bool TryFrom(double value, Enum unit, [NotNullWhen(true)] out IQuantity? quantity) { - // Implicit cast to QuantityValue 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((QuantityValue)value, unit, out quantity); + return Default.TryFrom(value, unit, out quantity); } /// - public static IQuantity Parse(Type quantityType, string quantityString) => Parse(null, quantityType, quantityString); + public static IQuantity Parse(Type quantityType, string quantityString) => Default.Parse(null, quantityType, quantityString); /// /// Dynamically parse a quantity string representation. @@ -105,18 +76,12 @@ public static bool TryFrom(double value, Enum unit, [NotNullWhen(true)] out IQua /// Type must be of type UnitsNet.IQuantity -or- Type is not a known quantity type. public static IQuantity Parse(IFormatProvider? formatProvider, Type quantityType, string quantityString) { - if (!typeof(IQuantity).IsAssignableFrom(quantityType)) - throw new ArgumentException($"Type {quantityType} must be of type UnitsNet.IQuantity."); - - if (TryParse(formatProvider, quantityType, quantityString, out IQuantity? quantity)) - return quantity; - - throw new ArgumentException($"Quantity string could not be parsed to quantity {quantityType}."); + return Default.Parse(formatProvider, quantityType, quantityString); } /// public static bool TryParse(Type quantityType, string quantityString, [NotNullWhen(true)] out IQuantity? quantity) => - TryParse(null, quantityType, quantityString, out quantity); + Default.TryParse(quantityType, quantityString, out quantity); /// /// Get a list of quantities that has the given base dimensions. @@ -124,7 +89,7 @@ public static bool TryParse(Type quantityType, string quantityString, [NotNullWh /// The base dimensions to match. public static IEnumerable GetQuantitiesWithBaseDimensions(BaseDimensions baseDimensions) { - return InfosLazy.Value.Where(info => info.BaseDimensions.Equals(baseDimensions)); + return Default.GetQuantitiesWithBaseDimensions(baseDimensions); } } } diff --git a/UnitsNet/CustomCode/UnitAbbreviationsCache.cs b/UnitsNet/CustomCode/UnitAbbreviationsCache.cs index 70a483b2ce..602430476b 100644 --- a/UnitsNet/CustomCode/UnitAbbreviationsCache.cs +++ b/UnitsNet/CustomCode/UnitAbbreviationsCache.cs @@ -32,11 +32,14 @@ public sealed class UnitAbbreviationsCache /// public static UnitAbbreviationsCache Default { get; } + private QuantityInfoLookup QuantityInfoLookup { get; } + /// /// Create an instance of the cache and load all the abbreviations defined in the library. /// public UnitAbbreviationsCache() { + QuantityInfoLookup= new QuantityInfoLookup(); } static UnitAbbreviationsCache() @@ -130,10 +133,10 @@ public void MapUnitToDefaultAbbreviation(Type unitType, int unitValue, IFormatPr internal void PerformAbbreviationMapping(Enum unitValue, IFormatProvider? formatProvider, bool setAsDefault, bool allowAbbreviationLookup, params string[] abbreviations) { - if(!Quantity.TryGetUnitInfo(unitValue, out var unitInfo)) + if(!QuantityInfoLookup.TryGetUnitInfo(unitValue, out var unitInfo)) { unitInfo = new UnitInfo(unitValue, unitValue.ToString(), BaseUnits.Undefined); - Quantity.AddUnitInfo(unitValue, unitInfo); + QuantityInfoLookup.AddUnitInfo(unitValue, unitInfo); } unitInfo.AddAbbreviation(formatProvider, setAsDefault, allowAbbreviationLookup, abbreviations); @@ -210,7 +213,7 @@ private bool TryGetUnitAbbreviations(Type unitType, int unitValue, IFormatProvid var name = Enum.GetName(unitType, unitValue); var enumInstance = (Enum)Enum.Parse(unitType, name!); - if(Quantity.TryGetUnitInfo(enumInstance, out var unitInfo)) + if(QuantityInfoLookup.TryGetUnitInfo(enumInstance, out var unitInfo)) { abbreviations = unitInfo.GetAbbreviations(formatProvider!).ToArray(); return true; diff --git a/UnitsNet/QuantityInfoLookup.cs b/UnitsNet/QuantityInfoLookup.cs new file mode 100644 index 0000000000..0aed43177b --- /dev/null +++ b/UnitsNet/QuantityInfoLookup.cs @@ -0,0 +1,136 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.Linq; + +namespace UnitsNet +{ + /// + /// A collection of . + /// + public class QuantityInfoLookup + { + private readonly Lazy InfosLazy; + private readonly Lazy> UnitTypeAndNameToUnitInfoLazy; + + /// + /// New instance. + /// + public QuantityInfoLookup() + { + ICollection quantityInfos = Quantity.ByName.Values; + Names = quantityInfos.Select(qt => qt.Name).ToArray(); + + InfosLazy = new Lazy(() => quantityInfos + .OrderBy(quantityInfo => quantityInfo.Name) + .ToArray()); + + UnitTypeAndNameToUnitInfoLazy = new Lazy>(() => + { + return Infos + .SelectMany(quantityInfo => quantityInfo.UnitInfos + .Select(unitInfo => new KeyValuePair<(Type, string), UnitInfo>( + (unitInfo.Value.GetType(), unitInfo.Name), + unitInfo))) + .ToDictionary(x => x.Key, x => x.Value); + }); + } + + /// + /// All enum value names of , such as "Length" and "Mass". + /// + public string[] Names { get; } + + /// + /// All quantity information objects, such as and . + /// + public QuantityInfo[] Infos => InfosLazy.Value; + + /// + /// Get for a given unit enum value. + /// + public UnitInfo GetUnitInfo(Enum unitEnum) => UnitTypeAndNameToUnitInfoLazy.Value[(unitEnum.GetType(), unitEnum.ToString())]; + + /// + /// Try to get for a given unit enum value. + /// + public bool TryGetUnitInfo(Enum unitEnum, [NotNullWhen(true)] out UnitInfo? unitInfo) => + UnitTypeAndNameToUnitInfoLazy.Value.TryGetValue((unitEnum.GetType(), unitEnum.ToString()), out unitInfo); + + /// + /// + /// + /// + /// + public void AddUnitInfo(Enum unit, UnitInfo unitInfo) + { + UnitTypeAndNameToUnitInfoLazy.Value.Add((unit.GetType(), unit.ToString()), unitInfo); + } + + /// + /// Dynamically construct a quantity. + /// + /// Numeric value. + /// Unit enum value. + /// An object. + /// Unit value is not a know unit enum type. + public IQuantity From(QuantityValue value, Enum unit) + { + if (Quantity.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 bool TryFrom(double value, Enum unit, [NotNullWhen(true)] out IQuantity? quantity) + { + // Implicit cast to QuantityValue 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 Quantity.TryFrom((QuantityValue)value, unit, out quantity); + } + + /// + public 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 IQuantity Parse(IFormatProvider? formatProvider, Type quantityType, string quantityString) + { + if (!typeof(IQuantity).IsAssignableFrom(quantityType)) + throw new ArgumentException($"Type {quantityType} must be of type UnitsNet.IQuantity."); + + if (Quantity.TryParse(formatProvider, quantityType, quantityString, out IQuantity? quantity)) + return quantity; + + throw new ArgumentException($"Quantity string could not be parsed to quantity {quantityType}."); + } + + /// + public bool TryParse(Type quantityType, string quantityString, [NotNullWhen(true)] out IQuantity? quantity) => + Quantity.TryParse(null, quantityType, quantityString, out quantity); + + /// + /// Get a list of quantities that has the given base dimensions. + /// + /// The base dimensions to match. + public IEnumerable GetQuantitiesWithBaseDimensions(BaseDimensions baseDimensions) + { + return InfosLazy.Value.Where(info => info.BaseDimensions.Equals(baseDimensions)); + } + } +}