From b1c6fc1dde5c4f7debd30145abb24035187fa09f Mon Sep 17 00:00:00 2001 From: Tristan Milnthorp Date: Tue, 26 May 2020 10:07:37 -0400 Subject: [PATCH 1/4] Use CurrentCulture rather than CurrentUICulture --- .../UnitsNetGen/QuantityGenerator.cs | 54 +++++++++++++++---- .../UnitsNetGen/StaticQuantityGenerator.cs | 2 +- .../UnitsNetGen/UnitTestBaseClassGenerator.cs | 14 ++--- UnitsNet.Tests/CustomCode/StonePoundsTests.cs | 2 +- .../TestsBase/AccelerationTestsBase.g.cs | 12 ++--- .../TestsBase/AmountOfSubstanceTestsBase.g.cs | 12 ++--- .../TestsBase/AmplitudeRatioTestsBase.g.cs | 12 ++--- .../TestsBase/AngleTestsBase.g.cs | 12 ++--- .../TestsBase/ApparentEnergyTestsBase.g.cs | 12 ++--- .../TestsBase/ApparentPowerTestsBase.g.cs | 12 ++--- .../TestsBase/AreaDensityTestsBase.g.cs | 12 ++--- .../AreaMomentOfInertiaTestsBase.g.cs | 12 ++--- .../TestsBase/AreaTestsBase.g.cs | 12 ++--- .../TestsBase/BitRateTestsBase.g.cs | 12 ++--- ...BrakeSpecificFuelConsumptionTestsBase.g.cs | 12 ++--- .../TestsBase/CapacitanceTestsBase.g.cs | 12 ++--- ...oefficientOfThermalExpansionTestsBase.g.cs | 12 ++--- .../TestsBase/DensityTestsBase.g.cs | 12 ++--- .../TestsBase/DurationTestsBase.g.cs | 12 ++--- .../TestsBase/DynamicViscosityTestsBase.g.cs | 12 ++--- .../ElectricAdmittanceTestsBase.g.cs | 12 ++--- .../ElectricChargeDensityTestsBase.g.cs | 12 ++--- .../TestsBase/ElectricChargeTestsBase.g.cs | 12 ++--- .../ElectricConductanceTestsBase.g.cs | 12 ++--- .../ElectricConductivityTestsBase.g.cs | 12 ++--- .../ElectricCurrentDensityTestsBase.g.cs | 12 ++--- .../ElectricCurrentGradientTestsBase.g.cs | 12 ++--- .../TestsBase/ElectricCurrentTestsBase.g.cs | 12 ++--- .../TestsBase/ElectricFieldTestsBase.g.cs | 12 ++--- .../ElectricInductanceTestsBase.g.cs | 12 ++--- .../ElectricPotentialAcTestsBase.g.cs | 12 ++--- .../ElectricPotentialChangeRateTestsBase.g.cs | 12 ++--- .../ElectricPotentialDcTestsBase.g.cs | 12 ++--- .../TestsBase/ElectricPotentialTestsBase.g.cs | 12 ++--- .../ElectricResistanceTestsBase.g.cs | 12 ++--- .../ElectricResistivityTestsBase.g.cs | 12 ++--- ...ElectricSurfaceChargeDensityTestsBase.g.cs | 12 ++--- .../TestsBase/EnergyTestsBase.g.cs | 12 ++--- .../TestsBase/EntropyTestsBase.g.cs | 12 ++--- .../TestsBase/ForceChangeRateTestsBase.g.cs | 12 ++--- .../TestsBase/ForcePerLengthTestsBase.g.cs | 12 ++--- .../TestsBase/ForceTestsBase.g.cs | 12 ++--- .../TestsBase/FrequencyTestsBase.g.cs | 12 ++--- .../TestsBase/FuelEfficiencyTestsBase.g.cs | 12 ++--- .../TestsBase/HeatFluxTestsBase.g.cs | 12 ++--- .../HeatTransferCoefficientTestsBase.g.cs | 12 ++--- .../TestsBase/IlluminanceTestsBase.g.cs | 12 ++--- .../TestsBase/InformationTestsBase.g.cs | 12 ++--- .../TestsBase/IrradianceTestsBase.g.cs | 12 ++--- .../TestsBase/IrradiationTestsBase.g.cs | 12 ++--- .../KinematicViscosityTestsBase.g.cs | 12 ++--- .../TestsBase/LapseRateTestsBase.g.cs | 12 ++--- .../TestsBase/LengthTestsBase.g.cs | 12 ++--- .../TestsBase/LevelTestsBase.g.cs | 12 ++--- .../TestsBase/LinearDensityTestsBase.g.cs | 12 ++--- .../LinearPowerDensityTestsBase.g.cs | 12 ++--- .../TestsBase/LuminosityTestsBase.g.cs | 12 ++--- .../TestsBase/LuminousFluxTestsBase.g.cs | 12 ++--- .../TestsBase/LuminousIntensityTestsBase.g.cs | 12 ++--- .../TestsBase/MagneticFieldTestsBase.g.cs | 12 ++--- .../TestsBase/MagneticFluxTestsBase.g.cs | 12 ++--- .../TestsBase/MagnetizationTestsBase.g.cs | 12 ++--- .../TestsBase/MassConcentrationTestsBase.g.cs | 12 ++--- .../TestsBase/MassFlowTestsBase.g.cs | 12 ++--- .../TestsBase/MassFluxTestsBase.g.cs | 12 ++--- .../TestsBase/MassFractionTestsBase.g.cs | 14 ++--- .../MassMomentOfInertiaTestsBase.g.cs | 12 ++--- .../TestsBase/MassTestsBase.g.cs | 12 ++--- .../TestsBase/MolarEnergyTestsBase.g.cs | 12 ++--- .../TestsBase/MolarEntropyTestsBase.g.cs | 12 ++--- .../TestsBase/MolarMassTestsBase.g.cs | 12 ++--- .../TestsBase/MolarityTestsBase.g.cs | 12 ++--- .../TestsBase/PermeabilityTestsBase.g.cs | 12 ++--- .../TestsBase/PermittivityTestsBase.g.cs | 12 ++--- .../TestsBase/PowerDensityTestsBase.g.cs | 12 ++--- .../TestsBase/PowerRatioTestsBase.g.cs | 12 ++--- .../TestsBase/PowerTestsBase.g.cs | 12 ++--- .../PressureChangeRateTestsBase.g.cs | 12 ++--- .../TestsBase/PressureTestsBase.g.cs | 12 ++--- .../TestsBase/RatioChangeRateTestsBase.g.cs | 12 ++--- .../TestsBase/RatioTestsBase.g.cs | 14 ++--- .../TestsBase/ReactiveEnergyTestsBase.g.cs | 12 ++--- .../TestsBase/ReactivePowerTestsBase.g.cs | 12 ++--- .../RotationalAccelerationTestsBase.g.cs | 12 ++--- .../TestsBase/RotationalSpeedTestsBase.g.cs | 12 ++--- ...RotationalStiffnessPerLengthTestsBase.g.cs | 12 ++--- .../RotationalStiffnessTestsBase.g.cs | 12 ++--- .../TestsBase/SolidAngleTestsBase.g.cs | 12 ++--- .../TestsBase/SpecificEnergyTestsBase.g.cs | 12 ++--- .../TestsBase/SpecificEntropyTestsBase.g.cs | 12 ++--- .../TestsBase/SpecificVolumeTestsBase.g.cs | 12 ++--- .../TestsBase/SpecificWeightTestsBase.g.cs | 12 ++--- .../TestsBase/SpeedTestsBase.g.cs | 12 ++--- .../TemperatureChangeRateTestsBase.g.cs | 12 ++--- .../TestsBase/TemperatureDeltaTestsBase.g.cs | 12 ++--- .../TestsBase/TemperatureTestsBase.g.cs | 12 ++--- .../ThermalConductivityTestsBase.g.cs | 12 ++--- .../TestsBase/ThermalResistanceTestsBase.g.cs | 12 ++--- .../TestsBase/TorquePerLengthTestsBase.g.cs | 12 ++--- .../TestsBase/TorqueTestsBase.g.cs | 12 ++--- .../TestsBase/VitaminATestsBase.g.cs | 12 ++--- .../VolumeConcentrationTestsBase.g.cs | 14 ++--- .../TestsBase/VolumeFlowTestsBase.g.cs | 12 ++--- .../TestsBase/VolumePerLengthTestsBase.g.cs | 12 ++--- .../TestsBase/VolumeTestsBase.g.cs | 12 ++--- UnitsNet.Tests/QuantityIConvertibleTests.cs | 8 +-- UnitsNet.Tests/QuantityIFormattableTests.cs | 2 +- UnitsNet.Tests/QuantityTests.ToString.cs | 6 +-- UnitsNet.Tests/UnitAbbreviationsCacheTests.cs | 6 +-- .../CustomCode/Quantities/Length.extra.cs | 4 +- UnitsNet/CustomCode/Quantities/Mass.extra.cs | 4 +- UnitsNet/CustomCode/Quantity.cs | 2 +- UnitsNet/CustomCode/UnitAbbreviationsCache.cs | 30 +++++------ UnitsNet/CustomCode/UnitParser.cs | 8 +-- UnitsNet/GeneratedCode/Quantity.g.cs | 2 +- UnitsNet/IQuantity.cs | 2 +- UnitsNet/QuantityFormatter.cs | 27 +++++----- UnitsNet/UnitConverter.cs | 4 +- 118 files changed, 714 insertions(+), 681 deletions(-) diff --git a/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs b/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs index 3c39933687..d9e31e43ae 100644 --- a/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs +++ b/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs @@ -334,7 +334,7 @@ public static string GetAbbreviation({_unitEnumName} unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation({_unitEnumName} unit, IFormatProvider? provider) {{ return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -437,7 +437,7 @@ private void GenerateStaticParseMethods() /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static {_quantity.Name} Parse(string str, IFormatProvider? provider) {{ return QuantityParser.Default.Parse<{_quantity.Name}, {_unitEnumName}>( @@ -468,7 +468,7 @@ public static bool TryParse(string? str, out {_quantity.Name} result) /// /// Length.Parse(""5.5 m"", new CultureInfo(""en-US"")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out {_quantity.Name} result) {{ return QuantityParser.Default.TryParse<{_quantity.Name}, {_unitEnumName}>( @@ -496,7 +496,7 @@ public static bool TryParse(string? str, IFormatProvider? provider, out {_quanti /// Parse a unit string. /// /// String to parse. Typically in the form: {{number}} {{unit}} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit(""m"", new CultureInfo(""en-US"")); /// @@ -522,7 +522,7 @@ public static bool TryParseUnit(string str, out {_unitEnumName} unit) /// /// Length.TryParseUnit(""m"", new CultureInfo(""en-US"")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out {_unitEnumName} unit) {{ return UnitParser.Default.TryParse<{_unitEnumName}>(str, provider, out unit); @@ -925,29 +925,63 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) {{ return ToString(""g"", provider); }} + /// + /// Get string representation of value and unit. + /// + /// The number of significant digits after the radix point. + /// String representation. + /// Format to use for localization and number formatting. Defaults to if null. + [Obsolete(@""This method is deprecated and will be removed at a future release. Please use ToString(""""s2"""") or ToString(""""s2"""", provider) where 2 is an example of the number passed to significantDigitsAfterRadix."")] + public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix) + {{ + var value = Convert.ToDouble(Value); + var format = UnitFormatter.GetFormat(value, significantDigitsAfterRadix); + return ToString(provider, format); + }} + + /// + /// Get string representation of value and unit. + /// + /// String format to use. Default: ""{{0:0.##}} {{1}} for value and unit abbreviation respectively."" + /// Arguments for string format. Value and unit are implicitly included as arguments 0 and 1. + /// String representation. + /// Format to use for localization and number formatting. Defaults to if null. + [Obsolete(""This method is deprecated and will be removed at a future release. Please use string.Format()."")] + public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args) + {{ + if (format == null) throw new ArgumentNullException(nameof(format)); + if (args == null) throw new ArgumentNullException(nameof(args)); + + provider = provider ?? CultureInfo.CurrentCulture; + + var value = Convert.ToDouble(Value); + var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); + return string.Format(provider, format, formatArgs); + }} + /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) {{ - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); }} /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) {{ diff --git a/CodeGen/Generators/UnitsNetGen/StaticQuantityGenerator.cs b/CodeGen/Generators/UnitsNetGen/StaticQuantityGenerator.cs index 021d8e765b..2374cb83b3 100644 --- a/CodeGen/Generators/UnitsNetGen/StaticQuantityGenerator.cs +++ b/CodeGen/Generators/UnitsNetGen/StaticQuantityGenerator.cs @@ -99,7 +99,7 @@ public static bool TryFrom(QuantityValue value, Enum unit, out IQuantity? quanti /// /// Try to dynamically parse a quantity string representation. /// - /// The format provider to use for lookup. Defaults to if null. + /// The format provider to use for lookup. Defaults to if null. /// Type of quantity, such as . /// Quantity string representation, such as ""1.5 kg"". Must be compatible with given quantity type. /// The resulting quantity if successful, otherwise default. diff --git a/CodeGen/Generators/UnitsNetGen/UnitTestBaseClassGenerator.cs b/CodeGen/Generators/UnitsNetGen/UnitTestBaseClassGenerator.cs index 6928bfc736..203e832120 100644 --- a/CodeGen/Generators/UnitsNetGen/UnitTestBaseClassGenerator.cs +++ b/CodeGen/Generators/UnitsNetGen/UnitTestBaseClassGenerator.cs @@ -416,8 +416,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() {{ - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo(""en-US""); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo(""en-US""); try {{"); foreach (var unit in _quantity.Units) { @@ -428,7 +428,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() }} finally {{ - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; }} }} @@ -449,10 +449,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() {{ - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try {{ - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal(""0.1{_baseUnitEnglishAbbreviation}"", new {_quantity.Name}(0.123456{_numberSuffix}, {_baseUnitFullName}).ToString(""s1"")); Assert.Equal(""0.12{_baseUnitEnglishAbbreviation}"", new {_quantity.Name}(0.123456{_numberSuffix}, {_baseUnitFullName}).ToString(""s2"")); Assert.Equal(""0.123{_baseUnitEnglishAbbreviation}"", new {_quantity.Name}(0.123456{_numberSuffix}, {_baseUnitFullName}).ToString(""s3"")); @@ -460,7 +460,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul }} finally {{ - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; }} }} @@ -485,7 +485,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) : CultureInfo.GetCultureInfo(cultureName); Assert.Equal(quantity.ToString(""g"", formatProvider), quantity.ToString(null, formatProvider)); - }} + }} [Theory] [InlineData(null)] diff --git a/UnitsNet.Tests/CustomCode/StonePoundsTests.cs b/UnitsNet.Tests/CustomCode/StonePoundsTests.cs index 76803c88d6..1191f3dc50 100644 --- a/UnitsNet.Tests/CustomCode/StonePoundsTests.cs +++ b/UnitsNet.Tests/CustomCode/StonePoundsTests.cs @@ -35,7 +35,7 @@ public void StonePoundsToString_FormatsNumberInDefaultCulture() { Mass m = Mass.FromStonePounds(3500, 1); StonePounds stonePounds = m.StonePounds; - string numberInCurrentCulture = 3500.ToString("n0", CultureInfo.CurrentUICulture); // Varies between machines, can't hard code it + string numberInCurrentCulture = 3500.ToString("n0", CultureInfo.CurrentCulture); // Varies between machines, can't hard code it Assert.Equal($"{numberInCurrentCulture} st 1 lb", stonePounds.ToString()); } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AccelerationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AccelerationTestsBase.g.cs index 48b78e3959..e8e1a50615 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/AccelerationTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AccelerationTestsBase.g.cs @@ -461,8 +461,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 cm/s²", new Acceleration(1, AccelerationUnit.CentimeterPerSecondSquared).ToString()); Assert.Equal("1 dm/s²", new Acceleration(1, AccelerationUnit.DecimeterPerSecondSquared).ToString()); @@ -481,7 +481,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -510,10 +510,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 m/s²", new Acceleration(0.123456, AccelerationUnit.MeterPerSecondSquared).ToString("s1")); Assert.Equal("0.12 m/s²", new Acceleration(0.123456, AccelerationUnit.MeterPerSecondSquared).ToString("s2")); Assert.Equal("0.123 m/s²", new Acceleration(0.123456, AccelerationUnit.MeterPerSecondSquared).ToString("s3")); @@ -521,7 +521,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AmountOfSubstanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AmountOfSubstanceTestsBase.g.cs index 6df945f8a4..fbf9533754 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/AmountOfSubstanceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AmountOfSubstanceTestsBase.g.cs @@ -474,8 +474,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 cmol", new AmountOfSubstance(1, AmountOfSubstanceUnit.Centimole).ToString()); Assert.Equal("1 clbmol", new AmountOfSubstance(1, AmountOfSubstanceUnit.CentipoundMole).ToString()); @@ -495,7 +495,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -525,10 +525,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 mol", new AmountOfSubstance(0.123456, AmountOfSubstanceUnit.Mole).ToString("s1")); Assert.Equal("0.12 mol", new AmountOfSubstance(0.123456, AmountOfSubstanceUnit.Mole).ToString("s2")); Assert.Equal("0.123 mol", new AmountOfSubstance(0.123456, AmountOfSubstanceUnit.Mole).ToString("s3")); @@ -536,7 +536,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AmplitudeRatioTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AmplitudeRatioTestsBase.g.cs index d756cc753f..fa3f3bd91d 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/AmplitudeRatioTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AmplitudeRatioTestsBase.g.cs @@ -335,8 +335,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 dBµV", new AmplitudeRatio(1, AmplitudeRatioUnit.DecibelMicrovolt).ToString()); Assert.Equal("1 dBmV", new AmplitudeRatio(1, AmplitudeRatioUnit.DecibelMillivolt).ToString()); @@ -345,7 +345,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -364,10 +364,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 dBV", new AmplitudeRatio(0.123456, AmplitudeRatioUnit.DecibelVolt).ToString("s1")); Assert.Equal("0.12 dBV", new AmplitudeRatio(0.123456, AmplitudeRatioUnit.DecibelVolt).ToString("s2")); Assert.Equal("0.123 dBV", new AmplitudeRatio(0.123456, AmplitudeRatioUnit.DecibelVolt).ToString("s3")); @@ -375,7 +375,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AngleTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AngleTestsBase.g.cs index 7f1cea4263..dda6fc7072 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/AngleTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AngleTestsBase.g.cs @@ -487,8 +487,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 '", new Angle(1, AngleUnit.Arcminute).ToString()); Assert.Equal("1 ″", new Angle(1, AngleUnit.Arcsecond).ToString()); @@ -509,7 +509,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -540,10 +540,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 °", new Angle(0.123456, AngleUnit.Degree).ToString("s1")); Assert.Equal("0.12 °", new Angle(0.123456, AngleUnit.Degree).ToString("s2")); Assert.Equal("0.123 °", new Angle(0.123456, AngleUnit.Degree).ToString("s3")); @@ -551,7 +551,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentEnergyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentEnergyTestsBase.g.cs index d568bf6438..ffa7703979 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentEnergyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentEnergyTestsBase.g.cs @@ -318,8 +318,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 kVAh", new ApparentEnergy(1, ApparentEnergyUnit.KilovoltampereHour).ToString()); Assert.Equal("1 MVAh", new ApparentEnergy(1, ApparentEnergyUnit.MegavoltampereHour).ToString()); @@ -327,7 +327,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -345,10 +345,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 VAh", new ApparentEnergy(0.123456, ApparentEnergyUnit.VoltampereHour).ToString("s1")); Assert.Equal("0.12 VAh", new ApparentEnergy(0.123456, ApparentEnergyUnit.VoltampereHour).ToString("s2")); Assert.Equal("0.123 VAh", new ApparentEnergy(0.123456, ApparentEnergyUnit.VoltampereHour).ToString("s3")); @@ -356,7 +356,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentPowerTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentPowerTestsBase.g.cs index 9f147d9abf..2171a06aef 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentPowerTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentPowerTestsBase.g.cs @@ -331,8 +331,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 GVA", new ApparentPower(1, ApparentPowerUnit.Gigavoltampere).ToString()); Assert.Equal("1 kVA", new ApparentPower(1, ApparentPowerUnit.Kilovoltampere).ToString()); @@ -341,7 +341,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -360,10 +360,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 VA", new ApparentPower(0.123456, ApparentPowerUnit.Voltampere).ToString("s1")); Assert.Equal("0.12 VA", new ApparentPower(0.123456, ApparentPowerUnit.Voltampere).ToString("s2")); Assert.Equal("0.123 VA", new ApparentPower(0.123456, ApparentPowerUnit.Voltampere).ToString("s3")); @@ -371,7 +371,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaDensityTestsBase.g.cs index 2f0c2b3c3d..0b6e4aab7d 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaDensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaDensityTestsBase.g.cs @@ -292,14 +292,14 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 kg/m²", new AreaDensity(1, AreaDensityUnit.KilogramPerSquareMeter).ToString()); } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -315,10 +315,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 kg/m²", new AreaDensity(0.123456, AreaDensityUnit.KilogramPerSquareMeter).ToString("s1")); Assert.Equal("0.12 kg/m²", new AreaDensity(0.123456, AreaDensityUnit.KilogramPerSquareMeter).ToString("s2")); Assert.Equal("0.123 kg/m²", new AreaDensity(0.123456, AreaDensityUnit.KilogramPerSquareMeter).ToString("s3")); @@ -326,7 +326,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaMomentOfInertiaTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaMomentOfInertiaTestsBase.g.cs index 5f1477116d..1877543392 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaMomentOfInertiaTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaMomentOfInertiaTestsBase.g.cs @@ -357,8 +357,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 cm⁴", new AreaMomentOfInertia(1, AreaMomentOfInertiaUnit.CentimeterToTheFourth).ToString()); Assert.Equal("1 dm⁴", new AreaMomentOfInertia(1, AreaMomentOfInertiaUnit.DecimeterToTheFourth).ToString()); @@ -369,7 +369,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -390,10 +390,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 m⁴", new AreaMomentOfInertia(0.123456, AreaMomentOfInertiaUnit.MeterToTheFourth).ToString("s1")); Assert.Equal("0.12 m⁴", new AreaMomentOfInertia(0.123456, AreaMomentOfInertiaUnit.MeterToTheFourth).ToString("s2")); Assert.Equal("0.123 m⁴", new AreaMomentOfInertia(0.123456, AreaMomentOfInertiaUnit.MeterToTheFourth).ToString("s3")); @@ -401,7 +401,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaTestsBase.g.cs index 6d55b7b8a2..0e13c9421b 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaTestsBase.g.cs @@ -461,8 +461,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 ac", new Area(1, AreaUnit.Acre).ToString()); Assert.Equal("1 ha", new Area(1, AreaUnit.Hectare).ToString()); @@ -481,7 +481,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -510,10 +510,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 m²", new Area(0.123456, AreaUnit.SquareMeter).ToString("s1")); Assert.Equal("0.12 m²", new Area(0.123456, AreaUnit.SquareMeter).ToString("s2")); Assert.Equal("0.123 m²", new Area(0.123456, AreaUnit.SquareMeter).ToString("s3")); @@ -521,7 +521,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/BitRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/BitRateTestsBase.g.cs index ea52ebe637..ff1e027d69 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/BitRateTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/BitRateTestsBase.g.cs @@ -592,8 +592,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 bit/s", new BitRate(1, BitRateUnit.BitPerSecond).ToString()); Assert.Equal("1 B/s", new BitRate(1, BitRateUnit.BytePerSecond).ToString()); @@ -624,7 +624,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -665,10 +665,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 bit/s", new BitRate(0.123456m, BitRateUnit.BitPerSecond).ToString("s1")); Assert.Equal("0.12 bit/s", new BitRate(0.123456m, BitRateUnit.BitPerSecond).ToString("s2")); Assert.Equal("0.123 bit/s", new BitRate(0.123456m, BitRateUnit.BitPerSecond).ToString("s3")); @@ -676,7 +676,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/BrakeSpecificFuelConsumptionTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/BrakeSpecificFuelConsumptionTestsBase.g.cs index fd5bddda09..cf99ac3958 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/BrakeSpecificFuelConsumptionTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/BrakeSpecificFuelConsumptionTestsBase.g.cs @@ -318,8 +318,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 g/kWh", new BrakeSpecificFuelConsumption(1, BrakeSpecificFuelConsumptionUnit.GramPerKiloWattHour).ToString()); Assert.Equal("1 kg/J", new BrakeSpecificFuelConsumption(1, BrakeSpecificFuelConsumptionUnit.KilogramPerJoule).ToString()); @@ -327,7 +327,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -345,10 +345,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 kg/J", new BrakeSpecificFuelConsumption(0.123456, BrakeSpecificFuelConsumptionUnit.KilogramPerJoule).ToString("s1")); Assert.Equal("0.12 kg/J", new BrakeSpecificFuelConsumption(0.123456, BrakeSpecificFuelConsumptionUnit.KilogramPerJoule).ToString("s2")); Assert.Equal("0.123 kg/J", new BrakeSpecificFuelConsumption(0.123456, BrakeSpecificFuelConsumptionUnit.KilogramPerJoule).ToString("s3")); @@ -356,7 +356,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/CapacitanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/CapacitanceTestsBase.g.cs index 3825bd5774..c2e894c969 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/CapacitanceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/CapacitanceTestsBase.g.cs @@ -370,8 +370,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 F", new Capacitance(1, CapacitanceUnit.Farad).ToString()); Assert.Equal("1 kF", new Capacitance(1, CapacitanceUnit.Kilofarad).ToString()); @@ -383,7 +383,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -405,10 +405,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 F", new Capacitance(0.123456, CapacitanceUnit.Farad).ToString("s1")); Assert.Equal("0.12 F", new Capacitance(0.123456, CapacitanceUnit.Farad).ToString("s2")); Assert.Equal("0.123 F", new Capacitance(0.123456, CapacitanceUnit.Farad).ToString("s3")); @@ -416,7 +416,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/CoefficientOfThermalExpansionTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/CoefficientOfThermalExpansionTestsBase.g.cs index 0bcf0aed97..da97c41ea4 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/CoefficientOfThermalExpansionTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/CoefficientOfThermalExpansionTestsBase.g.cs @@ -318,8 +318,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 °C⁻¹", new CoefficientOfThermalExpansion(1, CoefficientOfThermalExpansionUnit.InverseDegreeCelsius).ToString()); Assert.Equal("1 °F⁻¹", new CoefficientOfThermalExpansion(1, CoefficientOfThermalExpansionUnit.InverseDegreeFahrenheit).ToString()); @@ -327,7 +327,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -345,10 +345,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 K⁻¹", new CoefficientOfThermalExpansion(0.123456, CoefficientOfThermalExpansionUnit.InverseKelvin).ToString("s1")); Assert.Equal("0.12 K⁻¹", new CoefficientOfThermalExpansion(0.123456, CoefficientOfThermalExpansionUnit.InverseKelvin).ToString("s2")); Assert.Equal("0.123 K⁻¹", new CoefficientOfThermalExpansion(0.123456, CoefficientOfThermalExpansionUnit.InverseKelvin).ToString("s3")); @@ -356,7 +356,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/DensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/DensityTestsBase.g.cs index b4757fb314..3178d2f0a4 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/DensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/DensityTestsBase.g.cs @@ -799,8 +799,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 cg/dl", new Density(1, DensityUnit.CentigramPerDeciliter).ToString()); Assert.Equal("1 cg/L", new Density(1, DensityUnit.CentigramPerLiter).ToString()); @@ -845,7 +845,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -900,10 +900,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 kg/m³", new Density(0.123456, DensityUnit.KilogramPerCubicMeter).ToString("s1")); Assert.Equal("0.12 kg/m³", new Density(0.123456, DensityUnit.KilogramPerCubicMeter).ToString("s2")); Assert.Equal("0.123 kg/m³", new Density(0.123456, DensityUnit.KilogramPerCubicMeter).ToString("s3")); @@ -911,7 +911,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/DurationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/DurationTestsBase.g.cs index 2e19791280..7d2cf7283b 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/DurationTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/DurationTestsBase.g.cs @@ -409,8 +409,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 d", new Duration(1, DurationUnit.Day).ToString()); Assert.Equal("1 h", new Duration(1, DurationUnit.Hour).ToString()); @@ -425,7 +425,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -450,10 +450,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 s", new Duration(0.123456, DurationUnit.Second).ToString("s1")); Assert.Equal("0.12 s", new Duration(0.123456, DurationUnit.Second).ToString("s2")); Assert.Equal("0.123 s", new Duration(0.123456, DurationUnit.Second).ToString("s3")); @@ -461,7 +461,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/DynamicViscosityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/DynamicViscosityTestsBase.g.cs index 79f3183d5f..5d4e027107 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/DynamicViscosityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/DynamicViscosityTestsBase.g.cs @@ -409,8 +409,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 cP", new DynamicViscosity(1, DynamicViscosityUnit.Centipoise).ToString()); Assert.Equal("1 µPa·s", new DynamicViscosity(1, DynamicViscosityUnit.MicropascalSecond).ToString()); @@ -425,7 +425,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -450,10 +450,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 Ns/m²", new DynamicViscosity(0.123456, DynamicViscosityUnit.NewtonSecondPerMeterSquared).ToString("s1")); Assert.Equal("0.12 Ns/m²", new DynamicViscosity(0.123456, DynamicViscosityUnit.NewtonSecondPerMeterSquared).ToString("s2")); Assert.Equal("0.123 Ns/m²", new DynamicViscosity(0.123456, DynamicViscosityUnit.NewtonSecondPerMeterSquared).ToString("s3")); @@ -461,7 +461,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricAdmittanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricAdmittanceTestsBase.g.cs index 48b29f1876..34aba2f7d0 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricAdmittanceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricAdmittanceTestsBase.g.cs @@ -331,8 +331,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 µS", new ElectricAdmittance(1, ElectricAdmittanceUnit.Microsiemens).ToString()); Assert.Equal("1 mS", new ElectricAdmittance(1, ElectricAdmittanceUnit.Millisiemens).ToString()); @@ -341,7 +341,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -360,10 +360,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 S", new ElectricAdmittance(0.123456, ElectricAdmittanceUnit.Siemens).ToString("s1")); Assert.Equal("0.12 S", new ElectricAdmittance(0.123456, ElectricAdmittanceUnit.Siemens).ToString("s2")); Assert.Equal("0.123 S", new ElectricAdmittance(0.123456, ElectricAdmittanceUnit.Siemens).ToString("s3")); @@ -371,7 +371,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeDensityTestsBase.g.cs index 0e489d95f2..9e5e30b4c2 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeDensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeDensityTestsBase.g.cs @@ -292,14 +292,14 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 C/m³", new ElectricChargeDensity(1, ElectricChargeDensityUnit.CoulombPerCubicMeter).ToString()); } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -315,10 +315,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 C/m³", new ElectricChargeDensity(0.123456, ElectricChargeDensityUnit.CoulombPerCubicMeter).ToString("s1")); Assert.Equal("0.12 C/m³", new ElectricChargeDensity(0.123456, ElectricChargeDensityUnit.CoulombPerCubicMeter).ToString("s2")); Assert.Equal("0.123 C/m³", new ElectricChargeDensity(0.123456, ElectricChargeDensityUnit.CoulombPerCubicMeter).ToString("s3")); @@ -326,7 +326,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeTestsBase.g.cs index 1140295d07..be8612c90b 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeTestsBase.g.cs @@ -344,8 +344,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 A-h", new ElectricCharge(1, ElectricChargeUnit.AmpereHour).ToString()); Assert.Equal("1 C", new ElectricCharge(1, ElectricChargeUnit.Coulomb).ToString()); @@ -355,7 +355,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -375,10 +375,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 C", new ElectricCharge(0.123456, ElectricChargeUnit.Coulomb).ToString("s1")); Assert.Equal("0.12 C", new ElectricCharge(0.123456, ElectricChargeUnit.Coulomb).ToString("s2")); Assert.Equal("0.123 C", new ElectricCharge(0.123456, ElectricChargeUnit.Coulomb).ToString("s3")); @@ -386,7 +386,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductanceTestsBase.g.cs index 56cdd7c9a9..e67974387e 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductanceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductanceTestsBase.g.cs @@ -318,8 +318,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 µS", new ElectricConductance(1, ElectricConductanceUnit.Microsiemens).ToString()); Assert.Equal("1 mS", new ElectricConductance(1, ElectricConductanceUnit.Millisiemens).ToString()); @@ -327,7 +327,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -345,10 +345,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 S", new ElectricConductance(0.123456, ElectricConductanceUnit.Siemens).ToString("s1")); Assert.Equal("0.12 S", new ElectricConductance(0.123456, ElectricConductanceUnit.Siemens).ToString("s2")); Assert.Equal("0.123 S", new ElectricConductance(0.123456, ElectricConductanceUnit.Siemens).ToString("s3")); @@ -356,7 +356,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductivityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductivityTestsBase.g.cs index c7971356b1..a4f71f9ffb 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductivityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductivityTestsBase.g.cs @@ -318,8 +318,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 S/ft", new ElectricConductivity(1, ElectricConductivityUnit.SiemensPerFoot).ToString()); Assert.Equal("1 S/in", new ElectricConductivity(1, ElectricConductivityUnit.SiemensPerInch).ToString()); @@ -327,7 +327,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -345,10 +345,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 S/m", new ElectricConductivity(0.123456, ElectricConductivityUnit.SiemensPerMeter).ToString("s1")); Assert.Equal("0.12 S/m", new ElectricConductivity(0.123456, ElectricConductivityUnit.SiemensPerMeter).ToString("s2")); Assert.Equal("0.123 S/m", new ElectricConductivity(0.123456, ElectricConductivityUnit.SiemensPerMeter).ToString("s3")); @@ -356,7 +356,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentDensityTestsBase.g.cs index 8f1fccadfa..4a285c9fe4 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentDensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentDensityTestsBase.g.cs @@ -318,8 +318,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 A/ft²", new ElectricCurrentDensity(1, ElectricCurrentDensityUnit.AmperePerSquareFoot).ToString()); Assert.Equal("1 A/in²", new ElectricCurrentDensity(1, ElectricCurrentDensityUnit.AmperePerSquareInch).ToString()); @@ -327,7 +327,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -345,10 +345,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 A/m²", new ElectricCurrentDensity(0.123456, ElectricCurrentDensityUnit.AmperePerSquareMeter).ToString("s1")); Assert.Equal("0.12 A/m²", new ElectricCurrentDensity(0.123456, ElectricCurrentDensityUnit.AmperePerSquareMeter).ToString("s2")); Assert.Equal("0.123 A/m²", new ElectricCurrentDensity(0.123456, ElectricCurrentDensityUnit.AmperePerSquareMeter).ToString("s3")); @@ -356,7 +356,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentGradientTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentGradientTestsBase.g.cs index 251f13af39..c669d70d49 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentGradientTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentGradientTestsBase.g.cs @@ -331,8 +331,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 A/μs", new ElectricCurrentGradient(1, ElectricCurrentGradientUnit.AmperePerMicrosecond).ToString()); Assert.Equal("1 A/ms", new ElectricCurrentGradient(1, ElectricCurrentGradientUnit.AmperePerMillisecond).ToString()); @@ -341,7 +341,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -360,10 +360,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 A/s", new ElectricCurrentGradient(0.123456, ElectricCurrentGradientUnit.AmperePerSecond).ToString("s1")); Assert.Equal("0.12 A/s", new ElectricCurrentGradient(0.123456, ElectricCurrentGradientUnit.AmperePerSecond).ToString("s2")); Assert.Equal("0.123 A/s", new ElectricCurrentGradient(0.123456, ElectricCurrentGradientUnit.AmperePerSecond).ToString("s3")); @@ -371,7 +371,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentTestsBase.g.cs index 2f7f17d7ea..0a303b3b36 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentTestsBase.g.cs @@ -383,8 +383,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 A", new ElectricCurrent(1, ElectricCurrentUnit.Ampere).ToString()); Assert.Equal("1 cA", new ElectricCurrent(1, ElectricCurrentUnit.Centiampere).ToString()); @@ -397,7 +397,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -420,10 +420,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 A", new ElectricCurrent(0.123456, ElectricCurrentUnit.Ampere).ToString("s1")); Assert.Equal("0.12 A", new ElectricCurrent(0.123456, ElectricCurrentUnit.Ampere).ToString("s2")); Assert.Equal("0.123 A", new ElectricCurrent(0.123456, ElectricCurrentUnit.Ampere).ToString("s3")); @@ -431,7 +431,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricFieldTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricFieldTestsBase.g.cs index de4a676b29..a45e567bf7 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricFieldTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricFieldTestsBase.g.cs @@ -292,14 +292,14 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 V/m", new ElectricField(1, ElectricFieldUnit.VoltPerMeter).ToString()); } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -315,10 +315,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 V/m", new ElectricField(0.123456, ElectricFieldUnit.VoltPerMeter).ToString("s1")); Assert.Equal("0.12 V/m", new ElectricField(0.123456, ElectricFieldUnit.VoltPerMeter).ToString("s2")); Assert.Equal("0.123 V/m", new ElectricField(0.123456, ElectricFieldUnit.VoltPerMeter).ToString("s3")); @@ -326,7 +326,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricInductanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricInductanceTestsBase.g.cs index 528ca520a2..1cec021261 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricInductanceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricInductanceTestsBase.g.cs @@ -331,8 +331,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 H", new ElectricInductance(1, ElectricInductanceUnit.Henry).ToString()); Assert.Equal("1 µH", new ElectricInductance(1, ElectricInductanceUnit.Microhenry).ToString()); @@ -341,7 +341,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -360,10 +360,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 H", new ElectricInductance(0.123456, ElectricInductanceUnit.Henry).ToString("s1")); Assert.Equal("0.12 H", new ElectricInductance(0.123456, ElectricInductanceUnit.Henry).ToString("s2")); Assert.Equal("0.123 H", new ElectricInductance(0.123456, ElectricInductanceUnit.Henry).ToString("s3")); @@ -371,7 +371,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialAcTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialAcTestsBase.g.cs index e15c685fa0..06884f6ae0 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialAcTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialAcTestsBase.g.cs @@ -344,8 +344,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 kVac", new ElectricPotentialAc(1, ElectricPotentialAcUnit.KilovoltAc).ToString()); Assert.Equal("1 MVac", new ElectricPotentialAc(1, ElectricPotentialAcUnit.MegavoltAc).ToString()); @@ -355,7 +355,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -375,10 +375,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 Vac", new ElectricPotentialAc(0.123456, ElectricPotentialAcUnit.VoltAc).ToString("s1")); Assert.Equal("0.12 Vac", new ElectricPotentialAc(0.123456, ElectricPotentialAcUnit.VoltAc).ToString("s2")); Assert.Equal("0.123 Vac", new ElectricPotentialAc(0.123456, ElectricPotentialAcUnit.VoltAc).ToString("s3")); @@ -386,7 +386,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialChangeRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialChangeRateTestsBase.g.cs index 87b7fe70bb..2f78ec4daa 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialChangeRateTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialChangeRateTestsBase.g.cs @@ -539,8 +539,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 kV/h", new ElectricPotentialChangeRate(1, ElectricPotentialChangeRateUnit.KilovoltPerHour).ToString()); Assert.Equal("1 kV/μs", new ElectricPotentialChangeRate(1, ElectricPotentialChangeRateUnit.KilovoltPerMicrosecond).ToString()); @@ -565,7 +565,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -600,10 +600,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 V/s", new ElectricPotentialChangeRate(0.123456, ElectricPotentialChangeRateUnit.VoltPerSecond).ToString("s1")); Assert.Equal("0.12 V/s", new ElectricPotentialChangeRate(0.123456, ElectricPotentialChangeRateUnit.VoltPerSecond).ToString("s2")); Assert.Equal("0.123 V/s", new ElectricPotentialChangeRate(0.123456, ElectricPotentialChangeRateUnit.VoltPerSecond).ToString("s3")); @@ -611,7 +611,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialDcTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialDcTestsBase.g.cs index 0d80b8d232..ce3dc0c164 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialDcTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialDcTestsBase.g.cs @@ -344,8 +344,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 kVdc", new ElectricPotentialDc(1, ElectricPotentialDcUnit.KilovoltDc).ToString()); Assert.Equal("1 MVdc", new ElectricPotentialDc(1, ElectricPotentialDcUnit.MegavoltDc).ToString()); @@ -355,7 +355,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -375,10 +375,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 Vdc", new ElectricPotentialDc(0.123456, ElectricPotentialDcUnit.VoltDc).ToString("s1")); Assert.Equal("0.12 Vdc", new ElectricPotentialDc(0.123456, ElectricPotentialDcUnit.VoltDc).ToString("s2")); Assert.Equal("0.123 Vdc", new ElectricPotentialDc(0.123456, ElectricPotentialDcUnit.VoltDc).ToString("s3")); @@ -386,7 +386,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialTestsBase.g.cs index fe849d9823..929eb8747d 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialTestsBase.g.cs @@ -344,8 +344,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 kV", new ElectricPotential(1, ElectricPotentialUnit.Kilovolt).ToString()); Assert.Equal("1 MV", new ElectricPotential(1, ElectricPotentialUnit.Megavolt).ToString()); @@ -355,7 +355,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -375,10 +375,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 V", new ElectricPotential(0.123456, ElectricPotentialUnit.Volt).ToString("s1")); Assert.Equal("0.12 V", new ElectricPotential(0.123456, ElectricPotentialUnit.Volt).ToString("s2")); Assert.Equal("0.123 V", new ElectricPotential(0.123456, ElectricPotentialUnit.Volt).ToString("s3")); @@ -386,7 +386,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistanceTestsBase.g.cs index e8300e92ec..64d9873161 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistanceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistanceTestsBase.g.cs @@ -357,8 +357,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 GΩ", new ElectricResistance(1, ElectricResistanceUnit.Gigaohm).ToString()); Assert.Equal("1 kΩ", new ElectricResistance(1, ElectricResistanceUnit.Kiloohm).ToString()); @@ -369,7 +369,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -390,10 +390,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 Ω", new ElectricResistance(0.123456, ElectricResistanceUnit.Ohm).ToString("s1")); Assert.Equal("0.12 Ω", new ElectricResistance(0.123456, ElectricResistanceUnit.Ohm).ToString("s2")); Assert.Equal("0.123 Ω", new ElectricResistance(0.123456, ElectricResistanceUnit.Ohm).ToString("s3")); @@ -401,7 +401,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistivityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistivityTestsBase.g.cs index ef08e81da7..0b8eb69099 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistivityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistivityTestsBase.g.cs @@ -461,8 +461,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 kΩ·cm", new ElectricResistivity(1, ElectricResistivityUnit.KiloohmCentimeter).ToString()); Assert.Equal("1 kΩ·m", new ElectricResistivity(1, ElectricResistivityUnit.KiloohmMeter).ToString()); @@ -481,7 +481,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -510,10 +510,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 Ω·m", new ElectricResistivity(0.123456, ElectricResistivityUnit.OhmMeter).ToString("s1")); Assert.Equal("0.12 Ω·m", new ElectricResistivity(0.123456, ElectricResistivityUnit.OhmMeter).ToString("s2")); Assert.Equal("0.123 Ω·m", new ElectricResistivity(0.123456, ElectricResistivityUnit.OhmMeter).ToString("s3")); @@ -521,7 +521,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricSurfaceChargeDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricSurfaceChargeDensityTestsBase.g.cs index 2159a541b3..f465bf9308 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricSurfaceChargeDensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricSurfaceChargeDensityTestsBase.g.cs @@ -318,8 +318,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 C/cm²", new ElectricSurfaceChargeDensity(1, ElectricSurfaceChargeDensityUnit.CoulombPerSquareCentimeter).ToString()); Assert.Equal("1 C/in²", new ElectricSurfaceChargeDensity(1, ElectricSurfaceChargeDensityUnit.CoulombPerSquareInch).ToString()); @@ -327,7 +327,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -345,10 +345,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 C/m²", new ElectricSurfaceChargeDensity(0.123456, ElectricSurfaceChargeDensityUnit.CoulombPerSquareMeter).ToString("s1")); Assert.Equal("0.12 C/m²", new ElectricSurfaceChargeDensity(0.123456, ElectricSurfaceChargeDensityUnit.CoulombPerSquareMeter).ToString("s2")); Assert.Equal("0.123 C/m²", new ElectricSurfaceChargeDensity(0.123456, ElectricSurfaceChargeDensityUnit.CoulombPerSquareMeter).ToString("s3")); @@ -356,7 +356,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/EnergyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/EnergyTestsBase.g.cs index d446a0a1da..714d2a6a15 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/EnergyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/EnergyTestsBase.g.cs @@ -747,8 +747,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 BTU", new Energy(1, EnergyUnit.BritishThermalUnit).ToString()); Assert.Equal("1 cal", new Energy(1, EnergyUnit.Calorie).ToString()); @@ -789,7 +789,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -840,10 +840,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 J", new Energy(0.123456, EnergyUnit.Joule).ToString("s1")); Assert.Equal("0.12 J", new Energy(0.123456, EnergyUnit.Joule).ToString("s2")); Assert.Equal("0.123 J", new Energy(0.123456, EnergyUnit.Joule).ToString("s3")); @@ -851,7 +851,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/EntropyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/EntropyTestsBase.g.cs index 487b4e943e..c6a2985b43 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/EntropyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/EntropyTestsBase.g.cs @@ -370,8 +370,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 cal/K", new Entropy(1, EntropyUnit.CaloriePerKelvin).ToString()); Assert.Equal("1 J/C", new Entropy(1, EntropyUnit.JoulePerDegreeCelsius).ToString()); @@ -383,7 +383,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -405,10 +405,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 J/K", new Entropy(0.123456, EntropyUnit.JoulePerKelvin).ToString("s1")); Assert.Equal("0.12 J/K", new Entropy(0.123456, EntropyUnit.JoulePerKelvin).ToString("s2")); Assert.Equal("0.123 J/K", new Entropy(0.123456, EntropyUnit.JoulePerKelvin).ToString("s3")); @@ -416,7 +416,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ForceChangeRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ForceChangeRateTestsBase.g.cs index a43c2272b7..2b0c693675 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ForceChangeRateTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ForceChangeRateTestsBase.g.cs @@ -474,8 +474,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 cN/s", new ForceChangeRate(1, ForceChangeRateUnit.CentinewtonPerSecond).ToString()); Assert.Equal("1 daN/min", new ForceChangeRate(1, ForceChangeRateUnit.DecanewtonPerMinute).ToString()); @@ -495,7 +495,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -525,10 +525,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 N/s", new ForceChangeRate(0.123456, ForceChangeRateUnit.NewtonPerSecond).ToString("s1")); Assert.Equal("0.12 N/s", new ForceChangeRate(0.123456, ForceChangeRateUnit.NewtonPerSecond).ToString("s2")); Assert.Equal("0.123 N/s", new ForceChangeRate(0.123456, ForceChangeRateUnit.NewtonPerSecond).ToString("s3")); @@ -536,7 +536,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ForcePerLengthTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ForcePerLengthTestsBase.g.cs index c7358a7082..b993471313 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ForcePerLengthTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ForcePerLengthTestsBase.g.cs @@ -773,8 +773,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 cN/cm", new ForcePerLength(1, ForcePerLengthUnit.CentinewtonPerCentimeter).ToString()); Assert.Equal("1 cN/m", new ForcePerLength(1, ForcePerLengthUnit.CentinewtonPerMeter).ToString()); @@ -817,7 +817,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -870,10 +870,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 N/m", new ForcePerLength(0.123456, ForcePerLengthUnit.NewtonPerMeter).ToString("s1")); Assert.Equal("0.12 N/m", new ForcePerLength(0.123456, ForcePerLengthUnit.NewtonPerMeter).ToString("s2")); Assert.Equal("0.123 N/m", new ForcePerLength(0.123456, ForcePerLengthUnit.NewtonPerMeter).ToString("s3")); @@ -881,7 +881,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ForceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ForceTestsBase.g.cs index b3c6d10044..3ddd0eeb58 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ForceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ForceTestsBase.g.cs @@ -474,8 +474,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 daN", new Force(1, ForceUnit.Decanewton).ToString()); Assert.Equal("1 dyn", new Force(1, ForceUnit.Dyn).ToString()); @@ -495,7 +495,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -525,10 +525,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 N", new Force(0.123456, ForceUnit.Newton).ToString("s1")); Assert.Equal("0.12 N", new Force(0.123456, ForceUnit.Newton).ToString("s2")); Assert.Equal("0.123 N", new Force(0.123456, ForceUnit.Newton).ToString("s3")); @@ -536,7 +536,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/FrequencyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/FrequencyTestsBase.g.cs index a8dfbe8022..726ac2dd21 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/FrequencyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/FrequencyTestsBase.g.cs @@ -422,8 +422,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 bpm", new Frequency(1, FrequencyUnit.BeatPerMinute).ToString()); Assert.Equal("1 B Units", new Frequency(1, FrequencyUnit.BUnit).ToString()); @@ -439,7 +439,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -465,10 +465,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 Hz", new Frequency(0.123456, FrequencyUnit.Hertz).ToString("s1")); Assert.Equal("0.12 Hz", new Frequency(0.123456, FrequencyUnit.Hertz).ToString("s2")); Assert.Equal("0.123 Hz", new Frequency(0.123456, FrequencyUnit.Hertz).ToString("s3")); @@ -476,7 +476,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/FuelEfficiencyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/FuelEfficiencyTestsBase.g.cs index 6e63eb304b..0c58f92bb4 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/FuelEfficiencyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/FuelEfficiencyTestsBase.g.cs @@ -331,8 +331,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 km/L", new FuelEfficiency(1, FuelEfficiencyUnit.KilometerPerLiter).ToString()); Assert.Equal("1 L/100km", new FuelEfficiency(1, FuelEfficiencyUnit.LiterPer100Kilometers).ToString()); @@ -341,7 +341,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -360,10 +360,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 L/100km", new FuelEfficiency(0.123456, FuelEfficiencyUnit.LiterPer100Kilometers).ToString("s1")); Assert.Equal("0.12 L/100km", new FuelEfficiency(0.123456, FuelEfficiencyUnit.LiterPer100Kilometers).ToString("s2")); Assert.Equal("0.123 L/100km", new FuelEfficiency(0.123456, FuelEfficiencyUnit.LiterPer100Kilometers).ToString("s3")); @@ -371,7 +371,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/HeatFluxTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/HeatFluxTestsBase.g.cs index 01a87cb0d8..3f6ea8dd35 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/HeatFluxTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/HeatFluxTestsBase.g.cs @@ -513,8 +513,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 BTU/h·ft²", new HeatFlux(1, HeatFluxUnit.BtuPerHourSquareFoot).ToString()); Assert.Equal("1 BTU/min·ft²", new HeatFlux(1, HeatFluxUnit.BtuPerMinuteSquareFoot).ToString()); @@ -537,7 +537,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -570,10 +570,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 W/m²", new HeatFlux(0.123456, HeatFluxUnit.WattPerSquareMeter).ToString("s1")); Assert.Equal("0.12 W/m²", new HeatFlux(0.123456, HeatFluxUnit.WattPerSquareMeter).ToString("s2")); Assert.Equal("0.123 W/m²", new HeatFlux(0.123456, HeatFluxUnit.WattPerSquareMeter).ToString("s3")); @@ -581,7 +581,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/HeatTransferCoefficientTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/HeatTransferCoefficientTestsBase.g.cs index ac1120c94c..f21e2d12cb 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/HeatTransferCoefficientTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/HeatTransferCoefficientTestsBase.g.cs @@ -318,8 +318,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 Btu/ft²·hr·°F", new HeatTransferCoefficient(1, HeatTransferCoefficientUnit.BtuPerSquareFootDegreeFahrenheit).ToString()); Assert.Equal("1 W/m²·°C", new HeatTransferCoefficient(1, HeatTransferCoefficientUnit.WattPerSquareMeterCelsius).ToString()); @@ -327,7 +327,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -345,10 +345,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 W/m²·K", new HeatTransferCoefficient(0.123456, HeatTransferCoefficientUnit.WattPerSquareMeterKelvin).ToString("s1")); Assert.Equal("0.12 W/m²·K", new HeatTransferCoefficient(0.123456, HeatTransferCoefficientUnit.WattPerSquareMeterKelvin).ToString("s2")); Assert.Equal("0.123 W/m²·K", new HeatTransferCoefficient(0.123456, HeatTransferCoefficientUnit.WattPerSquareMeterKelvin).ToString("s3")); @@ -356,7 +356,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/IlluminanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/IlluminanceTestsBase.g.cs index b663e98a58..ee3fca8d79 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/IlluminanceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/IlluminanceTestsBase.g.cs @@ -331,8 +331,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 klx", new Illuminance(1, IlluminanceUnit.Kilolux).ToString()); Assert.Equal("1 lx", new Illuminance(1, IlluminanceUnit.Lux).ToString()); @@ -341,7 +341,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -360,10 +360,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 lx", new Illuminance(0.123456, IlluminanceUnit.Lux).ToString("s1")); Assert.Equal("0.12 lx", new Illuminance(0.123456, IlluminanceUnit.Lux).ToString("s2")); Assert.Equal("0.123 lx", new Illuminance(0.123456, IlluminanceUnit.Lux).ToString("s3")); @@ -371,7 +371,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/InformationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/InformationTestsBase.g.cs index e27dc816ea..9559974d2c 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/InformationTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/InformationTestsBase.g.cs @@ -592,8 +592,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 b", new Information(1, InformationUnit.Bit).ToString()); Assert.Equal("1 B", new Information(1, InformationUnit.Byte).ToString()); @@ -624,7 +624,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -665,10 +665,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 b", new Information(0.123456m, InformationUnit.Bit).ToString("s1")); Assert.Equal("0.12 b", new Information(0.123456m, InformationUnit.Bit).ToString("s2")); Assert.Equal("0.123 b", new Information(0.123456m, InformationUnit.Bit).ToString("s3")); @@ -676,7 +676,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/IrradianceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/IrradianceTestsBase.g.cs index 69795c7d5a..6470e35c9f 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/IrradianceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/IrradianceTestsBase.g.cs @@ -461,8 +461,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 kW/cm²", new Irradiance(1, IrradianceUnit.KilowattPerSquareCentimeter).ToString()); Assert.Equal("1 kW/m²", new Irradiance(1, IrradianceUnit.KilowattPerSquareMeter).ToString()); @@ -481,7 +481,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -510,10 +510,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 W/m²", new Irradiance(0.123456, IrradianceUnit.WattPerSquareMeter).ToString("s1")); Assert.Equal("0.12 W/m²", new Irradiance(0.123456, IrradianceUnit.WattPerSquareMeter).ToString("s2")); Assert.Equal("0.123 W/m²", new Irradiance(0.123456, IrradianceUnit.WattPerSquareMeter).ToString("s3")); @@ -521,7 +521,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/IrradiationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/IrradiationTestsBase.g.cs index deb5995971..ec40eb00ad 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/IrradiationTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/IrradiationTestsBase.g.cs @@ -370,8 +370,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 J/cm²", new Irradiation(1, IrradiationUnit.JoulePerSquareCentimeter).ToString()); Assert.Equal("1 J/m²", new Irradiation(1, IrradiationUnit.JoulePerSquareMeter).ToString()); @@ -383,7 +383,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -405,10 +405,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 J/m²", new Irradiation(0.123456, IrradiationUnit.JoulePerSquareMeter).ToString("s1")); Assert.Equal("0.12 J/m²", new Irradiation(0.123456, IrradiationUnit.JoulePerSquareMeter).ToString("s2")); Assert.Equal("0.123 J/m²", new Irradiation(0.123456, IrradiationUnit.JoulePerSquareMeter).ToString("s3")); @@ -416,7 +416,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/KinematicViscosityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/KinematicViscosityTestsBase.g.cs index 2d34f909bc..d2caa4419b 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/KinematicViscosityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/KinematicViscosityTestsBase.g.cs @@ -396,8 +396,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 cSt", new KinematicViscosity(1, KinematicViscosityUnit.Centistokes).ToString()); Assert.Equal("1 dSt", new KinematicViscosity(1, KinematicViscosityUnit.Decistokes).ToString()); @@ -411,7 +411,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -435,10 +435,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 m²/s", new KinematicViscosity(0.123456, KinematicViscosityUnit.SquareMeterPerSecond).ToString("s1")); Assert.Equal("0.12 m²/s", new KinematicViscosity(0.123456, KinematicViscosityUnit.SquareMeterPerSecond).ToString("s2")); Assert.Equal("0.123 m²/s", new KinematicViscosity(0.123456, KinematicViscosityUnit.SquareMeterPerSecond).ToString("s3")); @@ -446,7 +446,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LapseRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LapseRateTestsBase.g.cs index 50d3ee9d03..426d94e781 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/LapseRateTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LapseRateTestsBase.g.cs @@ -292,14 +292,14 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 ∆°C/km", new LapseRate(1, LapseRateUnit.DegreeCelsiusPerKilometer).ToString()); } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -315,10 +315,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 ∆°C/km", new LapseRate(0.123456, LapseRateUnit.DegreeCelsiusPerKilometer).ToString("s1")); Assert.Equal("0.12 ∆°C/km", new LapseRate(0.123456, LapseRateUnit.DegreeCelsiusPerKilometer).ToString("s2")); Assert.Equal("0.123 ∆°C/km", new LapseRate(0.123456, LapseRateUnit.DegreeCelsiusPerKilometer).ToString("s3")); @@ -326,7 +326,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LengthTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LengthTestsBase.g.cs index 27a14e0e69..ba2eb86b1e 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/LengthTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LengthTestsBase.g.cs @@ -708,8 +708,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 au", new Length(1, LengthUnit.AstronomicalUnit).ToString()); Assert.Equal("1 cm", new Length(1, LengthUnit.Centimeter).ToString()); @@ -747,7 +747,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -795,10 +795,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 m", new Length(0.123456, LengthUnit.Meter).ToString("s1")); Assert.Equal("0.12 m", new Length(0.123456, LengthUnit.Meter).ToString("s2")); Assert.Equal("0.123 m", new Length(0.123456, LengthUnit.Meter).ToString("s3")); @@ -806,7 +806,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LevelTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LevelTestsBase.g.cs index ad671cfe25..a499362cc5 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/LevelTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LevelTestsBase.g.cs @@ -309,15 +309,15 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 dB", new Level(1, LevelUnit.Decibel).ToString()); Assert.Equal("1 Np", new Level(1, LevelUnit.Neper).ToString()); } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -334,10 +334,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 dB", new Level(0.123456, LevelUnit.Decibel).ToString("s1")); Assert.Equal("0.12 dB", new Level(0.123456, LevelUnit.Decibel).ToString("s2")); Assert.Equal("0.123 dB", new Level(0.123456, LevelUnit.Decibel).ToString("s3")); @@ -345,7 +345,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LinearDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LinearDensityTestsBase.g.cs index ba441f0104..259e4b94f7 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/LinearDensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LinearDensityTestsBase.g.cs @@ -461,8 +461,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 g/cm", new LinearDensity(1, LinearDensityUnit.GramPerCentimeter).ToString()); Assert.Equal("1 g/m", new LinearDensity(1, LinearDensityUnit.GramPerMeter).ToString()); @@ -481,7 +481,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -510,10 +510,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 kg/m", new LinearDensity(0.123456, LinearDensityUnit.KilogramPerMeter).ToString("s1")); Assert.Equal("0.12 kg/m", new LinearDensity(0.123456, LinearDensityUnit.KilogramPerMeter).ToString("s2")); Assert.Equal("0.123 kg/m", new LinearDensity(0.123456, LinearDensityUnit.KilogramPerMeter).ToString("s3")); @@ -521,7 +521,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LinearPowerDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LinearPowerDensityTestsBase.g.cs index 0e7b07daef..cb0150e065 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/LinearPowerDensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LinearPowerDensityTestsBase.g.cs @@ -604,8 +604,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 GW/cm", new LinearPowerDensity(1, LinearPowerDensityUnit.GigawattPerCentimeter).ToString()); Assert.Equal("1 GW/ft", new LinearPowerDensity(1, LinearPowerDensityUnit.GigawattPerFoot).ToString()); @@ -635,7 +635,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -675,10 +675,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 W/m", new LinearPowerDensity(0.123456, LinearPowerDensityUnit.WattPerMeter).ToString("s1")); Assert.Equal("0.12 W/m", new LinearPowerDensity(0.123456, LinearPowerDensityUnit.WattPerMeter).ToString("s2")); Assert.Equal("0.123 W/m", new LinearPowerDensity(0.123456, LinearPowerDensityUnit.WattPerMeter).ToString("s3")); @@ -686,7 +686,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminosityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminosityTestsBase.g.cs index 731253227a..071867ebe2 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminosityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminosityTestsBase.g.cs @@ -461,8 +461,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 daW", new Luminosity(1, LuminosityUnit.Decawatt).ToString()); Assert.Equal("1 dW", new Luminosity(1, LuminosityUnit.Deciwatt).ToString()); @@ -481,7 +481,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -510,10 +510,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 W", new Luminosity(0.123456, LuminosityUnit.Watt).ToString("s1")); Assert.Equal("0.12 W", new Luminosity(0.123456, LuminosityUnit.Watt).ToString("s2")); Assert.Equal("0.123 W", new Luminosity(0.123456, LuminosityUnit.Watt).ToString("s3")); @@ -521,7 +521,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousFluxTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousFluxTestsBase.g.cs index 5ebb12ec7a..800dfcb711 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousFluxTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousFluxTestsBase.g.cs @@ -292,14 +292,14 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 lm", new LuminousFlux(1, LuminousFluxUnit.Lumen).ToString()); } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -315,10 +315,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 lm", new LuminousFlux(0.123456, LuminousFluxUnit.Lumen).ToString("s1")); Assert.Equal("0.12 lm", new LuminousFlux(0.123456, LuminousFluxUnit.Lumen).ToString("s2")); Assert.Equal("0.123 lm", new LuminousFlux(0.123456, LuminousFluxUnit.Lumen).ToString("s3")); @@ -326,7 +326,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousIntensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousIntensityTestsBase.g.cs index e13f70b337..16aaf962e0 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousIntensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousIntensityTestsBase.g.cs @@ -292,14 +292,14 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 cd", new LuminousIntensity(1, LuminousIntensityUnit.Candela).ToString()); } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -315,10 +315,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 cd", new LuminousIntensity(0.123456, LuminousIntensityUnit.Candela).ToString("s1")); Assert.Equal("0.12 cd", new LuminousIntensity(0.123456, LuminousIntensityUnit.Candela).ToString("s2")); Assert.Equal("0.123 cd", new LuminousIntensity(0.123456, LuminousIntensityUnit.Candela).ToString("s3")); @@ -326,7 +326,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFieldTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFieldTestsBase.g.cs index 55ceca0294..8bba5ff715 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFieldTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFieldTestsBase.g.cs @@ -357,8 +357,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 G", new MagneticField(1, MagneticFieldUnit.Gauss).ToString()); Assert.Equal("1 µT", new MagneticField(1, MagneticFieldUnit.Microtesla).ToString()); @@ -369,7 +369,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -390,10 +390,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 T", new MagneticField(0.123456, MagneticFieldUnit.Tesla).ToString("s1")); Assert.Equal("0.12 T", new MagneticField(0.123456, MagneticFieldUnit.Tesla).ToString("s2")); Assert.Equal("0.123 T", new MagneticField(0.123456, MagneticFieldUnit.Tesla).ToString("s3")); @@ -401,7 +401,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFluxTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFluxTestsBase.g.cs index 767693890e..74371d1377 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFluxTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFluxTestsBase.g.cs @@ -292,14 +292,14 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 Wb", new MagneticFlux(1, MagneticFluxUnit.Weber).ToString()); } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -315,10 +315,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 Wb", new MagneticFlux(0.123456, MagneticFluxUnit.Weber).ToString("s1")); Assert.Equal("0.12 Wb", new MagneticFlux(0.123456, MagneticFluxUnit.Weber).ToString("s2")); Assert.Equal("0.123 Wb", new MagneticFlux(0.123456, MagneticFluxUnit.Weber).ToString("s3")); @@ -326,7 +326,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MagnetizationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MagnetizationTestsBase.g.cs index d2a4e6b2ba..aa5c37afde 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MagnetizationTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MagnetizationTestsBase.g.cs @@ -292,14 +292,14 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 A/m", new Magnetization(1, MagnetizationUnit.AmperePerMeter).ToString()); } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -315,10 +315,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 A/m", new Magnetization(0.123456, MagnetizationUnit.AmperePerMeter).ToString("s1")); Assert.Equal("0.12 A/m", new Magnetization(0.123456, MagnetizationUnit.AmperePerMeter).ToString("s2")); Assert.Equal("0.123 A/m", new Magnetization(0.123456, MagnetizationUnit.AmperePerMeter).ToString("s3")); @@ -326,7 +326,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MassConcentrationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MassConcentrationTestsBase.g.cs index 4dc30fca0a..766051c64a 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MassConcentrationTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MassConcentrationTestsBase.g.cs @@ -916,8 +916,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 cg/dL", new MassConcentration(1, MassConcentrationUnit.CentigramPerDeciliter).ToString()); Assert.Equal("1 cg/L", new MassConcentration(1, MassConcentrationUnit.CentigramPerLiter).ToString()); @@ -971,7 +971,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -1035,10 +1035,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 kg/m³", new MassConcentration(0.123456, MassConcentrationUnit.KilogramPerCubicMeter).ToString("s1")); Assert.Equal("0.12 kg/m³", new MassConcentration(0.123456, MassConcentrationUnit.KilogramPerCubicMeter).ToString("s2")); Assert.Equal("0.123 kg/m³", new MassConcentration(0.123456, MassConcentrationUnit.KilogramPerCubicMeter).ToString("s3")); @@ -1046,7 +1046,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MassFlowTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MassFlowTestsBase.g.cs index a50c205acd..c888f617be 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MassFlowTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MassFlowTestsBase.g.cs @@ -708,8 +708,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 cg/d", new MassFlow(1, MassFlowUnit.CentigramPerDay).ToString()); Assert.Equal("1 cg/s", new MassFlow(1, MassFlowUnit.CentigramPerSecond).ToString()); @@ -747,7 +747,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -795,10 +795,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 g/s", new MassFlow(0.123456, MassFlowUnit.GramPerSecond).ToString("s1")); Assert.Equal("0.12 g/s", new MassFlow(0.123456, MassFlowUnit.GramPerSecond).ToString("s2")); Assert.Equal("0.123 g/s", new MassFlow(0.123456, MassFlowUnit.GramPerSecond).ToString("s3")); @@ -806,7 +806,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MassFluxTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MassFluxTestsBase.g.cs index 9b1dc96b6a..7afc8486a7 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MassFluxTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MassFluxTestsBase.g.cs @@ -435,8 +435,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 g·h⁻¹·cm⁻²", new MassFlux(1, MassFluxUnit.GramPerHourPerSquareCentimeter).ToString()); Assert.Equal("1 g·h⁻¹·m⁻²", new MassFlux(1, MassFluxUnit.GramPerHourPerSquareMeter).ToString()); @@ -453,7 +453,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -480,10 +480,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 kg·s⁻¹·m⁻²", new MassFlux(0.123456, MassFluxUnit.KilogramPerSecondPerSquareMeter).ToString("s1")); Assert.Equal("0.12 kg·s⁻¹·m⁻²", new MassFlux(0.123456, MassFluxUnit.KilogramPerSecondPerSquareMeter).ToString("s2")); Assert.Equal("0.123 kg·s⁻¹·m⁻²", new MassFlux(0.123456, MassFluxUnit.KilogramPerSecondPerSquareMeter).ToString("s3")); @@ -491,7 +491,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MassFractionTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MassFractionTestsBase.g.cs index 42eeed544a..1d45404afe 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MassFractionTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MassFractionTestsBase.g.cs @@ -591,8 +591,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 cg/g", new MassFraction(1, MassFractionUnit.CentigramPerGram).ToString()); Assert.Equal("1 cg/kg", new MassFraction(1, MassFractionUnit.CentigramPerKilogram).ToString()); @@ -621,7 +621,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -660,10 +660,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1", new MassFraction(0.123456, MassFractionUnit.DecimalFraction).ToString("s1")); Assert.Equal("0.12", new MassFraction(0.123456, MassFractionUnit.DecimalFraction).ToString("s2")); Assert.Equal("0.123", new MassFraction(0.123456, MassFractionUnit.DecimalFraction).ToString("s3")); @@ -671,7 +671,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -696,7 +696,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) : CultureInfo.GetCultureInfo(cultureName); Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider)); - } + } [Theory] [InlineData(null)] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MassMomentOfInertiaTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MassMomentOfInertiaTestsBase.g.cs index 14adde23fc..afee9d95fe 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MassMomentOfInertiaTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MassMomentOfInertiaTestsBase.g.cs @@ -643,8 +643,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 g·cm²", new MassMomentOfInertia(1, MassMomentOfInertiaUnit.GramSquareCentimeter).ToString()); Assert.Equal("1 g·dm²", new MassMomentOfInertia(1, MassMomentOfInertiaUnit.GramSquareDecimeter).ToString()); @@ -677,7 +677,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -720,10 +720,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 kg·m²", new MassMomentOfInertia(0.123456, MassMomentOfInertiaUnit.KilogramSquareMeter).ToString("s1")); Assert.Equal("0.12 kg·m²", new MassMomentOfInertia(0.123456, MassMomentOfInertiaUnit.KilogramSquareMeter).ToString("s2")); Assert.Equal("0.123 kg·m²", new MassMomentOfInertia(0.123456, MassMomentOfInertiaUnit.KilogramSquareMeter).ToString("s3")); @@ -731,7 +731,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MassTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MassTestsBase.g.cs index 4b4a911cc9..a73e7a08ad 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MassTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MassTestsBase.g.cs @@ -604,8 +604,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 cg", new Mass(1, MassUnit.Centigram).ToString()); Assert.Equal("1 dag", new Mass(1, MassUnit.Decagram).ToString()); @@ -635,7 +635,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -675,10 +675,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 kg", new Mass(0.123456, MassUnit.Kilogram).ToString("s1")); Assert.Equal("0.12 kg", new Mass(0.123456, MassUnit.Kilogram).ToString("s2")); Assert.Equal("0.123 kg", new Mass(0.123456, MassUnit.Kilogram).ToString("s3")); @@ -686,7 +686,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEnergyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEnergyTestsBase.g.cs index 7449e96ab6..f0c1a97b00 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEnergyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEnergyTestsBase.g.cs @@ -318,8 +318,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 J/mol", new MolarEnergy(1, MolarEnergyUnit.JoulePerMole).ToString()); Assert.Equal("1 kJ/mol", new MolarEnergy(1, MolarEnergyUnit.KilojoulePerMole).ToString()); @@ -327,7 +327,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -345,10 +345,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 J/mol", new MolarEnergy(0.123456, MolarEnergyUnit.JoulePerMole).ToString("s1")); Assert.Equal("0.12 J/mol", new MolarEnergy(0.123456, MolarEnergyUnit.JoulePerMole).ToString("s2")); Assert.Equal("0.123 J/mol", new MolarEnergy(0.123456, MolarEnergyUnit.JoulePerMole).ToString("s3")); @@ -356,7 +356,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEntropyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEntropyTestsBase.g.cs index 060f90e168..6a202a1478 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEntropyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEntropyTestsBase.g.cs @@ -318,8 +318,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 J/(mol*K)", new MolarEntropy(1, MolarEntropyUnit.JoulePerMoleKelvin).ToString()); Assert.Equal("1 kJ/(mol*K)", new MolarEntropy(1, MolarEntropyUnit.KilojoulePerMoleKelvin).ToString()); @@ -327,7 +327,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -345,10 +345,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 J/(mol*K)", new MolarEntropy(0.123456, MolarEntropyUnit.JoulePerMoleKelvin).ToString("s1")); Assert.Equal("0.12 J/(mol*K)", new MolarEntropy(0.123456, MolarEntropyUnit.JoulePerMoleKelvin).ToString("s2")); Assert.Equal("0.123 J/(mol*K)", new MolarEntropy(0.123456, MolarEntropyUnit.JoulePerMoleKelvin).ToString("s3")); @@ -356,7 +356,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarMassTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarMassTestsBase.g.cs index 2383f5f79d..81af3f668d 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarMassTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarMassTestsBase.g.cs @@ -435,8 +435,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 cg/mol", new MolarMass(1, MolarMassUnit.CentigramPerMole).ToString()); Assert.Equal("1 dag/mol", new MolarMass(1, MolarMassUnit.DecagramPerMole).ToString()); @@ -453,7 +453,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -480,10 +480,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 kg/mol", new MolarMass(0.123456, MolarMassUnit.KilogramPerMole).ToString("s1")); Assert.Equal("0.12 kg/mol", new MolarMass(0.123456, MolarMassUnit.KilogramPerMole).ToString("s2")); Assert.Equal("0.123 kg/mol", new MolarMass(0.123456, MolarMassUnit.KilogramPerMole).ToString("s3")); @@ -491,7 +491,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarityTestsBase.g.cs index 8ac39b8759..2a37a45d01 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarityTestsBase.g.cs @@ -383,8 +383,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 cmol/L", new Molarity(1, MolarityUnit.CentimolesPerLiter).ToString()); Assert.Equal("1 dmol/L", new Molarity(1, MolarityUnit.DecimolesPerLiter).ToString()); @@ -397,7 +397,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -420,10 +420,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 mol/m³", new Molarity(0.123456, MolarityUnit.MolesPerCubicMeter).ToString("s1")); Assert.Equal("0.12 mol/m³", new Molarity(0.123456, MolarityUnit.MolesPerCubicMeter).ToString("s2")); Assert.Equal("0.123 mol/m³", new Molarity(0.123456, MolarityUnit.MolesPerCubicMeter).ToString("s3")); @@ -431,7 +431,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PermeabilityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PermeabilityTestsBase.g.cs index 513bc00bfd..51a5d4554a 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/PermeabilityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PermeabilityTestsBase.g.cs @@ -292,14 +292,14 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 H/m", new Permeability(1, PermeabilityUnit.HenryPerMeter).ToString()); } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -315,10 +315,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 H/m", new Permeability(0.123456, PermeabilityUnit.HenryPerMeter).ToString("s1")); Assert.Equal("0.12 H/m", new Permeability(0.123456, PermeabilityUnit.HenryPerMeter).ToString("s2")); Assert.Equal("0.123 H/m", new Permeability(0.123456, PermeabilityUnit.HenryPerMeter).ToString("s3")); @@ -326,7 +326,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PermittivityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PermittivityTestsBase.g.cs index b07e39312a..30abd07161 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/PermittivityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PermittivityTestsBase.g.cs @@ -292,14 +292,14 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 F/m", new Permittivity(1, PermittivityUnit.FaradPerMeter).ToString()); } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -315,10 +315,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 F/m", new Permittivity(0.123456, PermittivityUnit.FaradPerMeter).ToString("s1")); Assert.Equal("0.12 F/m", new Permittivity(0.123456, PermittivityUnit.FaradPerMeter).ToString("s2")); Assert.Equal("0.123 F/m", new Permittivity(0.123456, PermittivityUnit.FaradPerMeter).ToString("s3")); @@ -326,7 +326,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PowerDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PowerDensityTestsBase.g.cs index f287889fe5..d625cfb155 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/PowerDensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PowerDensityTestsBase.g.cs @@ -851,8 +851,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 daW/ft³", new PowerDensity(1, PowerDensityUnit.DecawattPerCubicFoot).ToString()); Assert.Equal("1 daW/in³", new PowerDensity(1, PowerDensityUnit.DecawattPerCubicInch).ToString()); @@ -901,7 +901,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -960,10 +960,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 W/m³", new PowerDensity(0.123456, PowerDensityUnit.WattPerCubicMeter).ToString("s1")); Assert.Equal("0.12 W/m³", new PowerDensity(0.123456, PowerDensityUnit.WattPerCubicMeter).ToString("s2")); Assert.Equal("0.123 W/m³", new PowerDensity(0.123456, PowerDensityUnit.WattPerCubicMeter).ToString("s3")); @@ -971,7 +971,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PowerRatioTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PowerRatioTestsBase.g.cs index a9daee8c66..bd5f5c7368 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/PowerRatioTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PowerRatioTestsBase.g.cs @@ -309,15 +309,15 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 dBmW", new PowerRatio(1, PowerRatioUnit.DecibelMilliwatt).ToString()); Assert.Equal("1 dBW", new PowerRatio(1, PowerRatioUnit.DecibelWatt).ToString()); } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -334,10 +334,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 dBW", new PowerRatio(0.123456, PowerRatioUnit.DecibelWatt).ToString("s1")); Assert.Equal("0.12 dBW", new PowerRatio(0.123456, PowerRatioUnit.DecibelWatt).ToString("s2")); Assert.Equal("0.123 dBW", new PowerRatio(0.123456, PowerRatioUnit.DecibelWatt).ToString("s3")); @@ -345,7 +345,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PowerTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PowerTestsBase.g.cs index e75b82c7ae..983a7f1298 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/PowerTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PowerTestsBase.g.cs @@ -579,8 +579,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 hp(S)", new Power(1, PowerUnit.BoilerHorsepower).ToString()); Assert.Equal("1 Btu/h", new Power(1, PowerUnit.BritishThermalUnitPerHour).ToString()); @@ -610,7 +610,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -650,10 +650,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 W", new Power(0.123456m, PowerUnit.Watt).ToString("s1")); Assert.Equal("0.12 W", new Power(0.123456m, PowerUnit.Watt).ToString("s2")); Assert.Equal("0.123 W", new Power(0.123456m, PowerUnit.Watt).ToString("s3")); @@ -661,7 +661,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PressureChangeRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PressureChangeRateTestsBase.g.cs index b5659483e4..e70a96d6fe 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/PressureChangeRateTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PressureChangeRateTestsBase.g.cs @@ -448,8 +448,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 atm/s", new PressureChangeRate(1, PressureChangeRateUnit.AtmospherePerSecond).ToString()); Assert.Equal("1 kPa/min", new PressureChangeRate(1, PressureChangeRateUnit.KilopascalPerMinute).ToString()); @@ -467,7 +467,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -495,10 +495,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 Pa/s", new PressureChangeRate(0.123456, PressureChangeRateUnit.PascalPerSecond).ToString("s1")); Assert.Equal("0.12 Pa/s", new PressureChangeRate(0.123456, PressureChangeRateUnit.PascalPerSecond).ToString("s2")); Assert.Equal("0.123 Pa/s", new PressureChangeRate(0.123456, PressureChangeRateUnit.PascalPerSecond).ToString("s3")); @@ -506,7 +506,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PressureTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PressureTestsBase.g.cs index eeccb43baa..5400c01b5e 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/PressureTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PressureTestsBase.g.cs @@ -851,8 +851,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 atm", new Pressure(1, PressureUnit.Atmosphere).ToString()); Assert.Equal("1 bar", new Pressure(1, PressureUnit.Bar).ToString()); @@ -901,7 +901,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -960,10 +960,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 Pa", new Pressure(0.123456, PressureUnit.Pascal).ToString("s1")); Assert.Equal("0.12 Pa", new Pressure(0.123456, PressureUnit.Pascal).ToString("s2")); Assert.Equal("0.123 Pa", new Pressure(0.123456, PressureUnit.Pascal).ToString("s3")); @@ -971,7 +971,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RatioChangeRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RatioChangeRateTestsBase.g.cs index 51b803091f..708359b2ac 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/RatioChangeRateTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RatioChangeRateTestsBase.g.cs @@ -305,15 +305,15 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 /s", new RatioChangeRate(1, RatioChangeRateUnit.DecimalFractionPerSecond).ToString()); Assert.Equal("1 %/s", new RatioChangeRate(1, RatioChangeRateUnit.PercentPerSecond).ToString()); } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -330,10 +330,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 /s", new RatioChangeRate(0.123456, RatioChangeRateUnit.DecimalFractionPerSecond).ToString("s1")); Assert.Equal("0.12 /s", new RatioChangeRate(0.123456, RatioChangeRateUnit.DecimalFractionPerSecond).ToString("s2")); Assert.Equal("0.123 /s", new RatioChangeRate(0.123456, RatioChangeRateUnit.DecimalFractionPerSecond).ToString("s3")); @@ -341,7 +341,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RatioTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RatioTestsBase.g.cs index 8a0ffaaa7e..8a31b2b3e1 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/RatioTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RatioTestsBase.g.cs @@ -357,8 +357,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1", new Ratio(1, RatioUnit.DecimalFraction).ToString()); Assert.Equal("1 ppb", new Ratio(1, RatioUnit.PartPerBillion).ToString()); @@ -369,7 +369,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -390,10 +390,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1", new Ratio(0.123456, RatioUnit.DecimalFraction).ToString("s1")); Assert.Equal("0.12", new Ratio(0.123456, RatioUnit.DecimalFraction).ToString("s2")); Assert.Equal("0.123", new Ratio(0.123456, RatioUnit.DecimalFraction).ToString("s3")); @@ -401,7 +401,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -426,7 +426,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) : CultureInfo.GetCultureInfo(cultureName); Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider)); - } + } [Theory] [InlineData(null)] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ReactiveEnergyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ReactiveEnergyTestsBase.g.cs index 98371bc5bc..3d3a980066 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ReactiveEnergyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ReactiveEnergyTestsBase.g.cs @@ -318,8 +318,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 kvarh", new ReactiveEnergy(1, ReactiveEnergyUnit.KilovoltampereReactiveHour).ToString()); Assert.Equal("1 Mvarh", new ReactiveEnergy(1, ReactiveEnergyUnit.MegavoltampereReactiveHour).ToString()); @@ -327,7 +327,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -345,10 +345,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 varh", new ReactiveEnergy(0.123456, ReactiveEnergyUnit.VoltampereReactiveHour).ToString("s1")); Assert.Equal("0.12 varh", new ReactiveEnergy(0.123456, ReactiveEnergyUnit.VoltampereReactiveHour).ToString("s2")); Assert.Equal("0.123 varh", new ReactiveEnergy(0.123456, ReactiveEnergyUnit.VoltampereReactiveHour).ToString("s3")); @@ -356,7 +356,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ReactivePowerTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ReactivePowerTestsBase.g.cs index a1f09b13a8..f13df51a30 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ReactivePowerTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ReactivePowerTestsBase.g.cs @@ -331,8 +331,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 Gvar", new ReactivePower(1, ReactivePowerUnit.GigavoltampereReactive).ToString()); Assert.Equal("1 kvar", new ReactivePower(1, ReactivePowerUnit.KilovoltampereReactive).ToString()); @@ -341,7 +341,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -360,10 +360,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 var", new ReactivePower(0.123456, ReactivePowerUnit.VoltampereReactive).ToString("s1")); Assert.Equal("0.12 var", new ReactivePower(0.123456, ReactivePowerUnit.VoltampereReactive).ToString("s2")); Assert.Equal("0.123 var", new ReactivePower(0.123456, ReactivePowerUnit.VoltampereReactive).ToString("s3")); @@ -371,7 +371,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalAccelerationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalAccelerationTestsBase.g.cs index be96d05c8e..229ab89a78 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalAccelerationTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalAccelerationTestsBase.g.cs @@ -331,8 +331,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 °/s²", new RotationalAcceleration(1, RotationalAccelerationUnit.DegreePerSecondSquared).ToString()); Assert.Equal("1 rad/s²", new RotationalAcceleration(1, RotationalAccelerationUnit.RadianPerSecondSquared).ToString()); @@ -341,7 +341,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -360,10 +360,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 rad/s²", new RotationalAcceleration(0.123456, RotationalAccelerationUnit.RadianPerSecondSquared).ToString("s1")); Assert.Equal("0.12 rad/s²", new RotationalAcceleration(0.123456, RotationalAccelerationUnit.RadianPerSecondSquared).ToString("s2")); Assert.Equal("0.123 rad/s²", new RotationalAcceleration(0.123456, RotationalAccelerationUnit.RadianPerSecondSquared).ToString("s3")); @@ -371,7 +371,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalSpeedTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalSpeedTestsBase.g.cs index 08157997fb..a6710d45a5 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalSpeedTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalSpeedTestsBase.g.cs @@ -448,8 +448,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 crad/s", new RotationalSpeed(1, RotationalSpeedUnit.CentiradianPerSecond).ToString()); Assert.Equal("1 drad/s", new RotationalSpeed(1, RotationalSpeedUnit.DeciradianPerSecond).ToString()); @@ -467,7 +467,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -495,10 +495,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 rad/s", new RotationalSpeed(0.123456, RotationalSpeedUnit.RadianPerSecond).ToString("s1")); Assert.Equal("0.12 rad/s", new RotationalSpeed(0.123456, RotationalSpeedUnit.RadianPerSecond).ToString("s2")); Assert.Equal("0.123 rad/s", new RotationalSpeed(0.123456, RotationalSpeedUnit.RadianPerSecond).ToString("s3")); @@ -506,7 +506,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessPerLengthTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessPerLengthTestsBase.g.cs index b6b830f860..ca63c9c580 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessPerLengthTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessPerLengthTestsBase.g.cs @@ -344,8 +344,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 kN·m/rad/m", new RotationalStiffnessPerLength(1, RotationalStiffnessPerLengthUnit.KilonewtonMeterPerRadianPerMeter).ToString()); Assert.Equal("1 kipf·ft/°/ft", new RotationalStiffnessPerLength(1, RotationalStiffnessPerLengthUnit.KilopoundForceFootPerDegreesPerFoot).ToString()); @@ -355,7 +355,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -375,10 +375,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 N·m/rad/m", new RotationalStiffnessPerLength(0.123456, RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter).ToString("s1")); Assert.Equal("0.12 N·m/rad/m", new RotationalStiffnessPerLength(0.123456, RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter).ToString("s2")); Assert.Equal("0.123 N·m/rad/m", new RotationalStiffnessPerLength(0.123456, RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter).ToString("s3")); @@ -386,7 +386,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessTestsBase.g.cs index e52a0856f6..10c013edb6 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessTestsBase.g.cs @@ -708,8 +708,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 cN·m/deg", new RotationalStiffness(1, RotationalStiffnessUnit.CentinewtonMeterPerDegree).ToString()); Assert.Equal("1 cN·mm/deg", new RotationalStiffness(1, RotationalStiffnessUnit.CentinewtonMillimeterPerDegree).ToString()); @@ -747,7 +747,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -795,10 +795,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 N·m/rad", new RotationalStiffness(0.123456, RotationalStiffnessUnit.NewtonMeterPerRadian).ToString("s1")); Assert.Equal("0.12 N·m/rad", new RotationalStiffness(0.123456, RotationalStiffnessUnit.NewtonMeterPerRadian).ToString("s2")); Assert.Equal("0.123 N·m/rad", new RotationalStiffness(0.123456, RotationalStiffnessUnit.NewtonMeterPerRadian).ToString("s3")); @@ -806,7 +806,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SolidAngleTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SolidAngleTestsBase.g.cs index 41addc5b3c..f3551f987b 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/SolidAngleTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SolidAngleTestsBase.g.cs @@ -292,14 +292,14 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 sr", new SolidAngle(1, SolidAngleUnit.Steradian).ToString()); } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -315,10 +315,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 sr", new SolidAngle(0.123456, SolidAngleUnit.Steradian).ToString("s1")); Assert.Equal("0.12 sr", new SolidAngle(0.123456, SolidAngleUnit.Steradian).ToString("s2")); Assert.Equal("0.123 sr", new SolidAngle(0.123456, SolidAngleUnit.Steradian).ToString("s3")); @@ -326,7 +326,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEnergyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEnergyTestsBase.g.cs index 90b0f09844..d9600e8fe0 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEnergyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEnergyTestsBase.g.cs @@ -604,8 +604,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 btu/lb", new SpecificEnergy(1, SpecificEnergyUnit.BtuPerPound).ToString()); Assert.Equal("1 cal/g", new SpecificEnergy(1, SpecificEnergyUnit.CaloriePerGram).ToString()); @@ -635,7 +635,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -675,10 +675,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 J/kg", new SpecificEnergy(0.123456, SpecificEnergyUnit.JoulePerKilogram).ToString("s1")); Assert.Equal("0.12 J/kg", new SpecificEnergy(0.123456, SpecificEnergyUnit.JoulePerKilogram).ToString("s2")); Assert.Equal("0.123 J/kg", new SpecificEnergy(0.123456, SpecificEnergyUnit.JoulePerKilogram).ToString("s3")); @@ -686,7 +686,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEntropyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEntropyTestsBase.g.cs index a7f4d8dbfb..a92618ca96 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEntropyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEntropyTestsBase.g.cs @@ -396,8 +396,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 BTU/lb·°F", new SpecificEntropy(1, SpecificEntropyUnit.BtuPerPoundFahrenheit).ToString()); Assert.Equal("1 cal/g.K", new SpecificEntropy(1, SpecificEntropyUnit.CaloriePerGramKelvin).ToString()); @@ -411,7 +411,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -435,10 +435,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 J/kg.K", new SpecificEntropy(0.123456, SpecificEntropyUnit.JoulePerKilogramKelvin).ToString("s1")); Assert.Equal("0.12 J/kg.K", new SpecificEntropy(0.123456, SpecificEntropyUnit.JoulePerKilogramKelvin).ToString("s2")); Assert.Equal("0.123 J/kg.K", new SpecificEntropy(0.123456, SpecificEntropyUnit.JoulePerKilogramKelvin).ToString("s3")); @@ -446,7 +446,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificVolumeTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificVolumeTestsBase.g.cs index a1c093c63d..d6bc8efce2 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificVolumeTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificVolumeTestsBase.g.cs @@ -318,8 +318,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 ft³/lb", new SpecificVolume(1, SpecificVolumeUnit.CubicFootPerPound).ToString()); Assert.Equal("1 m³/kg", new SpecificVolume(1, SpecificVolumeUnit.CubicMeterPerKilogram).ToString()); @@ -327,7 +327,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -345,10 +345,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 m³/kg", new SpecificVolume(0.123456, SpecificVolumeUnit.CubicMeterPerKilogram).ToString("s1")); Assert.Equal("0.12 m³/kg", new SpecificVolume(0.123456, SpecificVolumeUnit.CubicMeterPerKilogram).ToString("s2")); Assert.Equal("0.123 m³/kg", new SpecificVolume(0.123456, SpecificVolumeUnit.CubicMeterPerKilogram).ToString("s3")); @@ -356,7 +356,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificWeightTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificWeightTestsBase.g.cs index 3999b3ad24..91d8aadbab 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificWeightTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificWeightTestsBase.g.cs @@ -500,8 +500,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 kgf/cm³", new SpecificWeight(1, SpecificWeightUnit.KilogramForcePerCubicCentimeter).ToString()); Assert.Equal("1 kgf/m³", new SpecificWeight(1, SpecificWeightUnit.KilogramForcePerCubicMeter).ToString()); @@ -523,7 +523,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -555,10 +555,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 N/m³", new SpecificWeight(0.123456, SpecificWeightUnit.NewtonPerCubicMeter).ToString("s1")); Assert.Equal("0.12 N/m³", new SpecificWeight(0.123456, SpecificWeightUnit.NewtonPerCubicMeter).ToString("s2")); Assert.Equal("0.123 N/m³", new SpecificWeight(0.123456, SpecificWeightUnit.NewtonPerCubicMeter).ToString("s3")); @@ -566,7 +566,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SpeedTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SpeedTestsBase.g.cs index fd6f5179ca..59fb9f009c 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/SpeedTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SpeedTestsBase.g.cs @@ -695,8 +695,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 cm/h", new Speed(1, SpeedUnit.CentimeterPerHour).ToString()); Assert.Equal("1 cm/min", new Speed(1, SpeedUnit.CentimeterPerMinute).ToString()); @@ -733,7 +733,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -780,10 +780,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 m/s", new Speed(0.123456, SpeedUnit.MeterPerSecond).ToString("s1")); Assert.Equal("0.12 m/s", new Speed(0.123456, SpeedUnit.MeterPerSecond).ToString("s2")); Assert.Equal("0.123 m/s", new Speed(0.123456, SpeedUnit.MeterPerSecond).ToString("s3")); @@ -791,7 +791,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureChangeRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureChangeRateTestsBase.g.cs index 42ec2fc80f..3edb37a392 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureChangeRateTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureChangeRateTestsBase.g.cs @@ -409,8 +409,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 c°C/s", new TemperatureChangeRate(1, TemperatureChangeRateUnit.CentidegreeCelsiusPerSecond).ToString()); Assert.Equal("1 da°C/s", new TemperatureChangeRate(1, TemperatureChangeRateUnit.DecadegreeCelsiusPerSecond).ToString()); @@ -425,7 +425,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -450,10 +450,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 °C/s", new TemperatureChangeRate(0.123456, TemperatureChangeRateUnit.DegreeCelsiusPerSecond).ToString("s1")); Assert.Equal("0.12 °C/s", new TemperatureChangeRate(0.123456, TemperatureChangeRateUnit.DegreeCelsiusPerSecond).ToString("s2")); Assert.Equal("0.123 °C/s", new TemperatureChangeRate(0.123456, TemperatureChangeRateUnit.DegreeCelsiusPerSecond).ToString("s3")); @@ -461,7 +461,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureDeltaTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureDeltaTestsBase.g.cs index efd558506d..b7becab5c5 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureDeltaTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureDeltaTestsBase.g.cs @@ -396,8 +396,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 ∆°C", new TemperatureDelta(1, TemperatureDeltaUnit.DegreeCelsius).ToString()); Assert.Equal("1 ∆°De", new TemperatureDelta(1, TemperatureDeltaUnit.DegreeDelisle).ToString()); @@ -411,7 +411,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -435,10 +435,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 ∆K", new TemperatureDelta(0.123456, TemperatureDeltaUnit.Kelvin).ToString("s1")); Assert.Equal("0.12 ∆K", new TemperatureDelta(0.123456, TemperatureDeltaUnit.Kelvin).ToString("s2")); Assert.Equal("0.123 ∆K", new TemperatureDelta(0.123456, TemperatureDeltaUnit.Kelvin).ToString("s3")); @@ -446,7 +446,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureTestsBase.g.cs index f558e9e51e..3ca65cb2cf 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureTestsBase.g.cs @@ -397,8 +397,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 °C", new Temperature(1, TemperatureUnit.DegreeCelsius).ToString()); Assert.Equal("1 °De", new Temperature(1, TemperatureUnit.DegreeDelisle).ToString()); @@ -413,7 +413,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -438,10 +438,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 K", new Temperature(0.123456, TemperatureUnit.Kelvin).ToString("s1")); Assert.Equal("0.12 K", new Temperature(0.123456, TemperatureUnit.Kelvin).ToString("s2")); Assert.Equal("0.123 K", new Temperature(0.123456, TemperatureUnit.Kelvin).ToString("s3")); @@ -449,7 +449,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalConductivityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalConductivityTestsBase.g.cs index 4a93dc82d4..967329abb1 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalConductivityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalConductivityTestsBase.g.cs @@ -305,15 +305,15 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { 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()); } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -330,10 +330,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 W/m·K", new ThermalConductivity(0.123456, ThermalConductivityUnit.WattPerMeterKelvin).ToString("s1")); Assert.Equal("0.12 W/m·K", new ThermalConductivity(0.123456, ThermalConductivityUnit.WattPerMeterKelvin).ToString("s2")); Assert.Equal("0.123 W/m·K", new ThermalConductivity(0.123456, ThermalConductivityUnit.WattPerMeterKelvin).ToString("s3")); @@ -341,7 +341,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalResistanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalResistanceTestsBase.g.cs index 37103e822e..93137dbce3 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalResistanceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalResistanceTestsBase.g.cs @@ -344,8 +344,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 Hrft²°F/Btu", new ThermalResistance(1, ThermalResistanceUnit.HourSquareFeetDegreeFahrenheitPerBtu).ToString()); Assert.Equal("1 cm²Hr°C/kcal", new ThermalResistance(1, ThermalResistanceUnit.SquareCentimeterHourDegreeCelsiusPerKilocalorie).ToString()); @@ -355,7 +355,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -375,10 +375,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 m²K/kW", new ThermalResistance(0.123456, ThermalResistanceUnit.SquareMeterKelvinPerKilowatt).ToString("s1")); Assert.Equal("0.12 m²K/kW", new ThermalResistance(0.123456, ThermalResistanceUnit.SquareMeterKelvinPerKilowatt).ToString("s2")); Assert.Equal("0.123 m²K/kW", new ThermalResistance(0.123456, ThermalResistanceUnit.SquareMeterKelvinPerKilowatt).ToString("s3")); @@ -386,7 +386,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/TorquePerLengthTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/TorquePerLengthTestsBase.g.cs index 401ffcbfd7..5a2f505a77 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/TorquePerLengthTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/TorquePerLengthTestsBase.g.cs @@ -552,8 +552,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 kgf·cm/m", new TorquePerLength(1, TorquePerLengthUnit.KilogramForceCentimeterPerMeter).ToString()); Assert.Equal("1 kgf·m/m", new TorquePerLength(1, TorquePerLengthUnit.KilogramForceMeterPerMeter).ToString()); @@ -579,7 +579,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -615,10 +615,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 N·m/m", new TorquePerLength(0.123456, TorquePerLengthUnit.NewtonMeterPerMeter).ToString("s1")); Assert.Equal("0.12 N·m/m", new TorquePerLength(0.123456, TorquePerLengthUnit.NewtonMeterPerMeter).ToString("s2")); Assert.Equal("0.123 N·m/m", new TorquePerLength(0.123456, TorquePerLengthUnit.NewtonMeterPerMeter).ToString("s3")); @@ -626,7 +626,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/TorqueTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/TorqueTestsBase.g.cs index 45cea4af1c..f1bc94806d 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/TorqueTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/TorqueTestsBase.g.cs @@ -565,8 +565,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 kgf·cm", new Torque(1, TorqueUnit.KilogramForceCentimeter).ToString()); Assert.Equal("1 kgf·m", new Torque(1, TorqueUnit.KilogramForceMeter).ToString()); @@ -593,7 +593,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -630,10 +630,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 N·m", new Torque(0.123456, TorqueUnit.NewtonMeter).ToString("s1")); Assert.Equal("0.12 N·m", new Torque(0.123456, TorqueUnit.NewtonMeter).ToString("s2")); Assert.Equal("0.123 N·m", new Torque(0.123456, TorqueUnit.NewtonMeter).ToString("s3")); @@ -641,7 +641,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VitaminATestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VitaminATestsBase.g.cs index 2505949dee..22a9f482fe 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/VitaminATestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VitaminATestsBase.g.cs @@ -292,14 +292,14 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 IU", new VitaminA(1, VitaminAUnit.InternationalUnit).ToString()); } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -315,10 +315,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 IU", new VitaminA(0.123456, VitaminAUnit.InternationalUnit).ToString("s1")); Assert.Equal("0.12 IU", new VitaminA(0.123456, VitaminAUnit.InternationalUnit).ToString("s2")); Assert.Equal("0.123 IU", new VitaminA(0.123456, VitaminAUnit.InternationalUnit).ToString("s3")); @@ -326,7 +326,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeConcentrationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeConcentrationTestsBase.g.cs index f4025417ea..4ad6302aab 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeConcentrationTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeConcentrationTestsBase.g.cs @@ -539,8 +539,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 cL/L", new VolumeConcentration(1, VolumeConcentrationUnit.CentilitersPerLiter).ToString()); Assert.Equal("1 cL/mL", new VolumeConcentration(1, VolumeConcentrationUnit.CentilitersPerMililiter).ToString()); @@ -565,7 +565,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -600,10 +600,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1", new VolumeConcentration(0.123456, VolumeConcentrationUnit.DecimalFraction).ToString("s1")); Assert.Equal("0.12", new VolumeConcentration(0.123456, VolumeConcentrationUnit.DecimalFraction).ToString("s2")); Assert.Equal("0.123", new VolumeConcentration(0.123456, VolumeConcentrationUnit.DecimalFraction).ToString("s3")); @@ -611,7 +611,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -636,7 +636,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) : CultureInfo.GetCultureInfo(cultureName); Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider)); - } + } [Theory] [InlineData(null)] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowTestsBase.g.cs index be93743135..be82ff3b11 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowTestsBase.g.cs @@ -1007,8 +1007,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 af/d", new VolumeFlow(1, VolumeFlowUnit.AcreFootPerDay).ToString()); Assert.Equal("1 af/h", new VolumeFlow(1, VolumeFlowUnit.AcreFootPerHour).ToString()); @@ -1069,7 +1069,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -1140,10 +1140,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 m³/s", new VolumeFlow(0.123456, VolumeFlowUnit.CubicMeterPerSecond).ToString("s1")); Assert.Equal("0.12 m³/s", new VolumeFlow(0.123456, VolumeFlowUnit.CubicMeterPerSecond).ToString("s2")); Assert.Equal("0.123 m³/s", new VolumeFlow(0.123456, VolumeFlowUnit.CubicMeterPerSecond).ToString("s3")); @@ -1151,7 +1151,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumePerLengthTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumePerLengthTestsBase.g.cs index 718c2ecd71..3e0ac5a5c9 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumePerLengthTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumePerLengthTestsBase.g.cs @@ -370,8 +370,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 m³/m", new VolumePerLength(1, VolumePerLengthUnit.CubicMeterPerMeter).ToString()); Assert.Equal("1 yd³/ft", new VolumePerLength(1, VolumePerLengthUnit.CubicYardPerFoot).ToString()); @@ -383,7 +383,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -405,10 +405,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 m³/m", new VolumePerLength(0.123456, VolumePerLengthUnit.CubicMeterPerMeter).ToString("s1")); Assert.Equal("0.12 m³/m", new VolumePerLength(0.123456, VolumePerLengthUnit.CubicMeterPerMeter).ToString("s2")); Assert.Equal("0.123 m³/m", new VolumePerLength(0.123456, VolumePerLengthUnit.CubicMeterPerMeter).ToString("s3")); @@ -416,7 +416,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeTestsBase.g.cs index d2e52c0871..79ca9d4df8 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeTestsBase.g.cs @@ -942,8 +942,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 ac-ft", new Volume(1, VolumeUnit.AcreFoot).ToString()); Assert.Equal("1", new Volume(1, VolumeUnit.AuTablespoon).ToString()); @@ -999,7 +999,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -1065,10 +1065,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 m³", new Volume(0.123456, VolumeUnit.CubicMeter).ToString("s1")); Assert.Equal("0.12 m³", new Volume(0.123456, VolumeUnit.CubicMeter).ToString("s2")); Assert.Equal("0.123 m³", new Volume(0.123456, VolumeUnit.CubicMeter).ToString("s3")); @@ -1076,7 +1076,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } diff --git a/UnitsNet.Tests/QuantityIConvertibleTests.cs b/UnitsNet.Tests/QuantityIConvertibleTests.cs index 23bcf4f588..a5949444c9 100644 --- a/UnitsNet.Tests/QuantityIConvertibleTests.cs +++ b/UnitsNet.Tests/QuantityIConvertibleTests.cs @@ -116,10 +116,10 @@ public void ToSingleTest() [Fact] public void ToStringTest() { - string expected = _length.ToString(CultureInfo.CurrentUICulture); - Assert.Equal(expected, LengthAsIConvertible.ToString(CultureInfo.CurrentUICulture)); - Assert.Equal(expected, Convert.ToString(_length, CultureInfo.CurrentUICulture)); - Assert.Equal(expected, Convert.ChangeType(_length, typeof(string), CultureInfo.CurrentUICulture)); + string expected = _length.ToString(CultureInfo.CurrentCulture); + Assert.Equal(expected, LengthAsIConvertible.ToString(CultureInfo.CurrentCulture)); + Assert.Equal(expected, Convert.ToString(_length, CultureInfo.CurrentCulture)); + Assert.Equal(expected, Convert.ChangeType(_length, typeof(string), CultureInfo.CurrentCulture)); } [Fact] diff --git a/UnitsNet.Tests/QuantityIFormattableTests.cs b/UnitsNet.Tests/QuantityIFormattableTests.cs index 059b5b22e2..18e670e644 100644 --- a/UnitsNet.Tests/QuantityIFormattableTests.cs +++ b/UnitsNet.Tests/QuantityIFormattableTests.cs @@ -43,7 +43,7 @@ public void AFormatWithInvalidIndexThrowsFormatException() [Fact] public void VFormatEqualsValueToString() { - Assert.Equal(length.Value.ToString(CultureInfo.CurrentUICulture), length.ToString("v")); + Assert.Equal(length.Value.ToString(CultureInfo.CurrentCulture), length.ToString("v")); } [Fact] diff --git a/UnitsNet.Tests/QuantityTests.ToString.cs b/UnitsNet.Tests/QuantityTests.ToString.cs index 06794a8273..f778a6c5c4 100644 --- a/UnitsNet.Tests/QuantityTests.ToString.cs +++ b/UnitsNet.Tests/QuantityTests.ToString.cs @@ -31,17 +31,17 @@ public void ReturnsTheOriginalValueAndUnit() [Fact] public void FormatsNumberUsingGivenCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.05 m", Length.FromCentimeters(5).ToUnit(LengthUnit.Meter).ToString((IFormatProvider)null)); Assert.Equal("0.05 m", Length.FromCentimeters(5).ToUnit(LengthUnit.Meter).ToString(CultureInfo.InvariantCulture)); Assert.Equal("0,05 m", Length.FromCentimeters(5).ToUnit(LengthUnit.Meter).ToString(new CultureInfo("nb-NO"))); } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } } diff --git a/UnitsNet.Tests/UnitAbbreviationsCacheTests.cs b/UnitsNet.Tests/UnitAbbreviationsCacheTests.cs index c12c78ea76..238e857dd3 100644 --- a/UnitsNet.Tests/UnitAbbreviationsCacheTests.cs +++ b/UnitsNet.Tests/UnitAbbreviationsCacheTests.cs @@ -222,15 +222,14 @@ public void GetDefaultAbbreviationThrowsNotImplementedExceptionIfNoneExist() public void GetDefaultAbbreviationFallsBackToUsEnglishCulture() { var oldCurrentCulture = CultureInfo.CurrentCulture; - var oldCurrentUICulture = CultureInfo.CurrentUICulture; try { // CurrentCulture affects number formatting, such as comma or dot as decimal separator. - // CurrentUICulture affects localization, in this case the abbreviation. + // CurrentCulture affects localization, in this case the abbreviation. // Zulu (South Africa) var zuluCulture = new CultureInfo("zu-ZA"); - CultureInfo.CurrentCulture = CultureInfo.CurrentUICulture = zuluCulture; + CultureInfo.CurrentCulture = zuluCulture; var abbreviationsCache = new UnitAbbreviationsCache(); abbreviationsCache.MapUnitToAbbreviation(CustomUnit.Unit1, AmericanCulture, "US english abbreviation for Unit1"); @@ -244,7 +243,6 @@ public void GetDefaultAbbreviationFallsBackToUsEnglishCulture() finally { CultureInfo.CurrentCulture = oldCurrentCulture; - CultureInfo.CurrentUICulture = oldCurrentUICulture; } } diff --git a/UnitsNet/CustomCode/Quantities/Length.extra.cs b/UnitsNet/CustomCode/Quantities/Length.extra.cs index 09efb49596..c668ca5724 100644 --- a/UnitsNet/CustomCode/Quantities/Length.extra.cs +++ b/UnitsNet/CustomCode/Quantities/Length.extra.cs @@ -222,11 +222,11 @@ public override string ToString() /// Length.FromFeetInches(3,2).FeetInches.ToString() outputs: "3 ft 2 in" /// /// Optional culture to format number and localize unit abbreviations. - /// If null, defaults to . + /// If null, defaults to . /// public string ToString(IFormatProvider? cultureInfo) { - cultureInfo = cultureInfo ?? CultureInfo.CurrentUICulture; + cultureInfo = cultureInfo ?? CultureInfo.CurrentCulture; var footUnit = UnitAbbreviationsCache.Default.GetDefaultAbbreviation(LengthUnit.Foot, cultureInfo); var inchUnit = UnitAbbreviationsCache.Default.GetDefaultAbbreviation(LengthUnit.Inch, cultureInfo); diff --git a/UnitsNet/CustomCode/Quantities/Mass.extra.cs b/UnitsNet/CustomCode/Quantities/Mass.extra.cs index adab6a5216..3b8f101e7e 100644 --- a/UnitsNet/CustomCode/Quantities/Mass.extra.cs +++ b/UnitsNet/CustomCode/Quantities/Mass.extra.cs @@ -126,11 +126,11 @@ public override string ToString() /// Mass.FromStonePounds(3,2).StonePounds.ToString() outputs: "3 st 2 lb" /// /// Optional culture to format number and localize unit abbreviations. - /// If null, defaults to . + /// If null, defaults to . /// public string ToString(IFormatProvider? cultureInfo) { - cultureInfo = cultureInfo ?? CultureInfo.CurrentUICulture; + cultureInfo = cultureInfo ?? CultureInfo.CurrentCulture; var stoneUnit = UnitAbbreviationsCache.Default.GetDefaultAbbreviation(MassUnit.Stone, cultureInfo); var poundUnit = UnitAbbreviationsCache.Default.GetDefaultAbbreviation(MassUnit.Pound, cultureInfo); diff --git a/UnitsNet/CustomCode/Quantity.cs b/UnitsNet/CustomCode/Quantity.cs index da44bcfde9..0f0511b5bb 100644 --- a/UnitsNet/CustomCode/Quantity.cs +++ b/UnitsNet/CustomCode/Quantity.cs @@ -87,7 +87,7 @@ public static bool TryFrom(double value, Enum unit, out IQuantity? quantity) /// /// Dynamically parse a quantity string representation. /// - /// The format provider to use for lookup. Defaults to if null. + /// 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. diff --git a/UnitsNet/CustomCode/UnitAbbreviationsCache.cs b/UnitsNet/CustomCode/UnitAbbreviationsCache.cs index b3396b4f5a..907fcd87fb 100644 --- a/UnitsNet/CustomCode/UnitAbbreviationsCache.cs +++ b/UnitsNet/CustomCode/UnitAbbreviationsCache.cs @@ -70,7 +70,7 @@ private void LoadGeneratedAbbreviations() /// The type of unit enum. public void MapUnitToAbbreviation(TUnitType unit, params string[] abbreviations) where TUnitType : Enum { - MapUnitToAbbreviation(typeof(TUnitType), Convert.ToInt32(unit), CultureInfo.CurrentUICulture, abbreviations); + MapUnitToAbbreviation(typeof(TUnitType), Convert.ToInt32(unit), CultureInfo.CurrentCulture, abbreviations); } /// @@ -83,7 +83,7 @@ public void MapUnitToAbbreviation(TUnitType unit, params string[] abb /// The type of unit enum. public void MapUnitToDefaultAbbreviation(TUnitType unit, string abbreviation) where TUnitType : Enum { - MapUnitToDefaultAbbreviation(typeof(TUnitType), Convert.ToInt32(unit), CultureInfo.CurrentUICulture, abbreviation); + MapUnitToDefaultAbbreviation(typeof(TUnitType), Convert.ToInt32(unit), CultureInfo.CurrentCulture, abbreviation); } /// @@ -92,7 +92,7 @@ public void MapUnitToDefaultAbbreviation(TUnitType unit, string abbre /// in order to or on them later. /// /// The unit enum value. - /// The format provider to use for lookup. Defaults to if null. + /// The format provider to use for lookup. Defaults to if null. /// Unit abbreviations to add. /// The type of unit enum. public void MapUnitToAbbreviation(TUnitType unit, IFormatProvider? formatProvider, params string[] abbreviations) where TUnitType : Enum @@ -112,7 +112,7 @@ public void MapUnitToAbbreviation(TUnitType unit, IFormatProvider? fo /// in order to or on them later. /// /// The unit enum value. - /// The format provider to use for lookup. Defaults to if null. + /// The format provider to use for lookup. Defaults to if null. /// Unit abbreviation to add as default. /// The type of unit enum. public void MapUnitToDefaultAbbreviation(TUnitType unit, IFormatProvider? formatProvider, string abbreviation) where TUnitType : Enum @@ -133,7 +133,7 @@ public void MapUnitToDefaultAbbreviation(TUnitType unit, IFormatProvi /// /// The unit enum type. /// The unit enum value. - /// The format provider to use for lookup. Defaults to if null. + /// The format provider to use for lookup. Defaults to if null. /// Unit abbreviations to add. public void MapUnitToAbbreviation(Type unitType, int unitValue, IFormatProvider? formatProvider, params string[] abbreviations) { @@ -147,7 +147,7 @@ public void MapUnitToAbbreviation(Type unitType, int unitValue, IFormatProvider? /// /// The unit enum type. /// The unit enum value. - /// The format provider to use for lookup. Defaults to if null. + /// The format provider to use for lookup. Defaults to if null. /// Unit abbreviation to add as default. public void MapUnitToDefaultAbbreviation(Type unitType, int unitValue, IFormatProvider? formatProvider, string abbreviation) { @@ -162,7 +162,7 @@ private void PerformAbbreviationMapping(Type unitType, int unitValue, IFormatPro if (abbreviations == null) throw new ArgumentNullException(nameof(abbreviations)); - formatProvider ??= CultureInfo.CurrentUICulture; + formatProvider = formatProvider ?? CultureInfo.CurrentCulture; if (!_lookupsForCulture.TryGetValue(formatProvider, out var quantitiesForProvider)) quantitiesForProvider = _lookupsForCulture[formatProvider] = new UnitTypeToLookup(); @@ -181,7 +181,7 @@ private void PerformAbbreviationMapping(Type unitType, int unitValue, IFormatPro /// Example: GetDefaultAbbreviation<LengthUnit>(LengthUnit.Kilometer) => "km" /// /// The unit enum value. - /// The format provider to use for lookup. Defaults to if null. + /// The format provider to use for lookup. Defaults to if null. /// The type of unit enum. /// The default unit abbreviation string. public string GetDefaultAbbreviation(TUnitType unit, IFormatProvider? formatProvider = null) where TUnitType : Enum @@ -213,7 +213,7 @@ public string GetDefaultAbbreviation(TUnitType unit, IFormatProvider? /// /// The unit enum type. /// The unit enum value. - /// The format provider to use for lookup. Defaults to if null. + /// The format provider to use for lookup. Defaults to if null. /// The default unit abbreviation string. public string GetDefaultAbbreviation(Type unitType, int unitValue, IFormatProvider? formatProvider = null) { @@ -240,7 +240,7 @@ public string GetDefaultAbbreviation(Type unitType, int unitValue, IFormatProvid /// /// Enum type for units. /// Enum value for unit. - /// The format provider to use for lookup. Defaults to if null. + /// The format provider to use for lookup. Defaults to if null. /// Unit abbreviations associated with unit. public string[] GetUnitAbbreviations(TUnitType unit, IFormatProvider? formatProvider = null) where TUnitType : Enum { @@ -252,11 +252,11 @@ public string[] GetUnitAbbreviations(TUnitType unit, IFormatProvider? /// /// Enum type for unit. /// Enum value for unit. - /// The format provider to use for lookup. Defaults to if null. + /// The format provider to use for lookup. Defaults to if null. /// Unit abbreviations associated with unit. public string[] GetUnitAbbreviations(Type unitType, int unitValue, IFormatProvider? formatProvider = null) { - formatProvider = formatProvider ?? CultureInfo.CurrentUICulture; + formatProvider = formatProvider ?? CultureInfo.CurrentCulture; if (!TryGetUnitValueAbbreviationLookup(unitType, formatProvider, out var lookup)) { @@ -280,11 +280,11 @@ public string[] GetUnitAbbreviations(Type unitType, int unitValue, IFormatProvid /// Get all abbreviations for all units of a quantity. /// /// Enum type for unit. - /// The format provider to use for lookup. Defaults to if null. + /// The format provider to use for lookup. Defaults to if null. /// Unit abbreviations associated with unit. public string[] GetAllUnitAbbreviationsForQuantity(Type unitEnumType, IFormatProvider? formatProvider = null) { - formatProvider ??= CultureInfo.CurrentUICulture; + formatProvider = formatProvider ?? CultureInfo.CurrentCulture; if (!TryGetUnitValueAbbreviationLookup(unitEnumType, formatProvider, out var lookup)) { @@ -300,7 +300,7 @@ internal bool TryGetUnitValueAbbreviationLookup(Type unitType, IFormatProvider? { unitToAbbreviations = null; - formatProvider ??= CultureInfo.CurrentUICulture; + formatProvider = formatProvider ?? CultureInfo.CurrentCulture; if (!_lookupsForCulture.TryGetValue(formatProvider, out var quantitiesForProvider)) { diff --git a/UnitsNet/CustomCode/UnitParser.cs b/UnitsNet/CustomCode/UnitParser.cs index cce1e1d14c..7677eae796 100644 --- a/UnitsNet/CustomCode/UnitParser.cs +++ b/UnitsNet/CustomCode/UnitParser.cs @@ -43,7 +43,7 @@ static UnitParser() /// Example: Parse<LengthUnit>("km") => LengthUnit.Kilometer /// /// - /// The format provider to use for lookup. Defaults to if null. + /// The format provider to use for lookup. Defaults to if null. /// /// public TUnitType Parse(string unitAbbreviation, IFormatProvider? formatProvider = null) where TUnitType : Enum @@ -60,7 +60,7 @@ public TUnitType Parse(string unitAbbreviation, IFormatProvider? form /// respectively. /// /// Unit enum type, such as and . - /// The format provider to use for lookup. Defaults to if null. + /// The format provider to use for lookup. Defaults to if null. /// Unit enum value, such as . /// No units match the abbreviation. /// More than one unit matches the abbreviation. @@ -144,7 +144,7 @@ public bool TryParse(string unitAbbreviation, out TUnitType unit) whe /// Try to parse a unit abbreviation. /// /// The string value. - /// The format provider to use for lookup. Defaults to if null. + /// The format provider to use for lookup. Defaults to if null. /// The unit enum value as out result. /// Type of unit enum. /// True if successful. @@ -176,7 +176,7 @@ public bool TryParse(string unitAbbreviation, Type unitType, out Enum? unit) /// /// The string value. /// Type of unit enum. - /// The format provider to use for lookup. Defaults to if null. + /// The format provider to use for lookup. Defaults to if null. /// The unit enum value as out result. /// True if successful. public bool TryParse(string? unitAbbreviation, Type unitType, IFormatProvider? formatProvider, out Enum? unit) diff --git a/UnitsNet/GeneratedCode/Quantity.g.cs b/UnitsNet/GeneratedCode/Quantity.g.cs index 85d081c726..31c9c7581d 100644 --- a/UnitsNet/GeneratedCode/Quantity.g.cs +++ b/UnitsNet/GeneratedCode/Quantity.g.cs @@ -735,7 +735,7 @@ public static bool TryFrom(QuantityValue value, Enum unit, out IQuantity? quanti /// /// Try to dynamically parse a quantity string representation. /// - /// The format provider to use for lookup. Defaults to if null. + /// The format provider to use for lookup. Defaults to if null. /// Type of quantity, such as . /// Quantity string representation, such as "1.5 kg". Must be compatible with given quantity type. /// The resulting quantity if successful, otherwise default. diff --git a/UnitsNet/IQuantity.cs b/UnitsNet/IQuantity.cs index 6bf0a34182..41a39e2848 100644 --- a/UnitsNet/IQuantity.cs +++ b/UnitsNet/IQuantity.cs @@ -67,7 +67,7 @@ public interface IQuantity : IFormattable /// Gets the string representation of value and unit. Uses two significant digits after radix. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. string ToString(IFormatProvider? provider); } diff --git a/UnitsNet/QuantityFormatter.cs b/UnitsNet/QuantityFormatter.cs index 87de29d1fa..1c80f95d65 100644 --- a/UnitsNet/QuantityFormatter.cs +++ b/UnitsNet/QuantityFormatter.cs @@ -79,7 +79,7 @@ public static string Format(IQuantity quantity, string for /// The quantity to format. /// The format string. /// The format provider to use for localization and number formatting. Defaults to - /// if null. + /// if null. /// /// The valid format strings are as follows: /// @@ -125,6 +125,7 @@ public static string Format(IQuantity quantity, string for public static string Format(IQuantity quantity, string format, IFormatProvider? formatProvider) where TUnitType : Enum { + formatProvider = formatProvider ?? CultureInfo.CurrentCulture; return FormatUntrimmed(quantity, format, formatProvider).TrimEnd(); } @@ -151,39 +152,39 @@ private static string FormatUntrimmed(IQuantity quantity, case 'S': case 's': if(format.Length > 1 && !int.TryParse(format.Substring(1), out precisionSpecifier)) - throw new FormatException($"The {format} format string is not supported."); + throw new FormatException($"The {format} format string is not supported."); break; - } + } switch(formatSpecifier) - { + { case 'G': case 'g': - return ToStringWithSignificantDigitsAfterRadix(quantity, formatProvider, 2); + return ToStringWithSignificantDigitsAfterRadix(quantity, formatProvider, 2); case 'A': case 'a': - var abbreviations = UnitAbbreviationsCache.Default.GetUnitAbbreviations(quantity.Unit, formatProvider); + var abbreviations = UnitAbbreviationsCache.Default.GetUnitAbbreviations(quantity.Unit, formatProvider); if(precisionSpecifier >= abbreviations.Length) - throw new FormatException($"The {format} format string is invalid because the abbreviation index does not exist."); + throw new FormatException($"The {format} format string is invalid because the abbreviation index does not exist."); return abbreviations[precisionSpecifier]; case 'V': case 'v': - return quantity.Value.ToString(formatProvider); + return quantity.Value.ToString(formatProvider); case 'U': case 'u': - return quantity.Unit.ToString(); + return quantity.Unit.ToString(); case 'Q': case 'q': - return quantity.QuantityInfo.Name; + return quantity.QuantityInfo.Name; case 'S': case 's': return ToStringWithSignificantDigitsAfterRadix(quantity, formatProvider, precisionSpecifier); - default: - throw new FormatException($"The {format} format string is not supported."); - } + default: + throw new FormatException($"The {format} format string is not supported."); } + } else { // Anything else is a standard numeric format string with default unit abbreviation postfix. diff --git a/UnitsNet/UnitConverter.cs b/UnitsNet/UnitConverter.cs index a5cec6e144..e096b7db67 100644 --- a/UnitsNet/UnitConverter.cs +++ b/UnitsNet/UnitConverter.cs @@ -424,7 +424,7 @@ public static double ConvertByAbbreviation(QuantityValue fromValue, string quant if (!TryGetUnitType(quantityName, out Type? unitType)) throw new UnitNotFoundException($"The unit type for the given quantity was not found: {quantityName}"); - var cultureInfo = string.IsNullOrWhiteSpace(culture) ? CultureInfo.CurrentUICulture : new CultureInfo(culture!); + var cultureInfo = string.IsNullOrWhiteSpace(culture) ? CultureInfo.CurrentCulture : new CultureInfo(culture!); var fromUnit = UnitParser.Default.Parse(fromUnitAbbrev, unitType!, cultureInfo); // ex: ("m", LengthUnit) => LengthUnit.Meter var fromQuantity = Quantity.From(fromValue, fromUnit); @@ -499,7 +499,7 @@ public static bool TryConvertByAbbreviation(QuantityValue fromValue, string quan if (!TryGetUnitType(quantityName, out Type? unitType)) return false; - var cultureInfo = string.IsNullOrWhiteSpace(culture) ? CultureInfo.CurrentUICulture : new CultureInfo(culture!); + var cultureInfo = string.IsNullOrWhiteSpace(culture) ? CultureInfo.CurrentCulture : new CultureInfo(culture!); if (!UnitParser.Default.TryParse(fromUnitAbbrev, unitType!, cultureInfo, out Enum? fromUnit)) // ex: ("m", LengthUnit) => LengthUnit.Meter return false; From 8a265100fa406fc83f93c06150fe997b9e5eb038 Mon Sep 17 00:00:00 2001 From: Tristan Milnthorp Date: Fri, 29 May 2020 10:43:29 -0400 Subject: [PATCH 2/4] Merge fix --- UnitsNet/QuantityFormatter.cs | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/UnitsNet/QuantityFormatter.cs b/UnitsNet/QuantityFormatter.cs index 1c80f95d65..4cbcbe5aee 100644 --- a/UnitsNet/QuantityFormatter.cs +++ b/UnitsNet/QuantityFormatter.cs @@ -69,7 +69,7 @@ public class QuantityFormatter public static string Format(IQuantity quantity, string format) where TUnitType : Enum { - return Format(quantity, format, CultureInfo.CurrentUICulture); + return Format(quantity, format, CultureInfo.CurrentCulture); } /// @@ -132,7 +132,7 @@ public static string Format(IQuantity quantity, string for private static string FormatUntrimmed(IQuantity quantity, string format, IFormatProvider? formatProvider) where TUnitType : Enum { - formatProvider ??= CultureInfo.CurrentUICulture; + formatProvider ??= CultureInfo.CurrentCulture; if(string.IsNullOrWhiteSpace(format)) format = "g"; @@ -152,39 +152,39 @@ private static string FormatUntrimmed(IQuantity quantity, case 'S': case 's': if(format.Length > 1 && !int.TryParse(format.Substring(1), out precisionSpecifier)) - throw new FormatException($"The {format} format string is not supported."); + throw new FormatException($"The {format} format string is not supported."); break; - } + } switch(formatSpecifier) - { + { case 'G': case 'g': - return ToStringWithSignificantDigitsAfterRadix(quantity, formatProvider, 2); + return ToStringWithSignificantDigitsAfterRadix(quantity, formatProvider, 2); case 'A': case 'a': - var abbreviations = UnitAbbreviationsCache.Default.GetUnitAbbreviations(quantity.Unit, formatProvider); + var abbreviations = UnitAbbreviationsCache.Default.GetUnitAbbreviations(quantity.Unit, formatProvider); if(precisionSpecifier >= abbreviations.Length) - throw new FormatException($"The {format} format string is invalid because the abbreviation index does not exist."); + throw new FormatException($"The {format} format string is invalid because the abbreviation index does not exist."); return abbreviations[precisionSpecifier]; case 'V': case 'v': - return quantity.Value.ToString(formatProvider); + return quantity.Value.ToString(formatProvider); case 'U': case 'u': - return quantity.Unit.ToString(); + return quantity.Unit.ToString(); case 'Q': case 'q': - return quantity.QuantityInfo.Name; + return quantity.QuantityInfo.Name; case 'S': case 's': return ToStringWithSignificantDigitsAfterRadix(quantity, formatProvider, precisionSpecifier); - default: - throw new FormatException($"The {format} format string is not supported."); + default: + throw new FormatException($"The {format} format string is not supported."); + } } - } else { // Anything else is a standard numeric format string with default unit abbreviation postfix. From 873b3181221bc112dab9bcfc35e8db06d388cee8 Mon Sep 17 00:00:00 2001 From: Patrick Grawehr Date: Sat, 13 Nov 2021 14:49:06 +0100 Subject: [PATCH 3/4] Fix merge conflicts --- .../UnitsNetGen/QuantityGenerator.cs | 34 ------------------- .../UnitsNetGen/UnitTestBaseClassGenerator.cs | 4 +-- README.md | 7 ++-- 3 files changed, 6 insertions(+), 39 deletions(-) diff --git a/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs b/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs index d9e31e43ae..b1dc43053c 100644 --- a/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs +++ b/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs @@ -931,40 +931,6 @@ public string ToString(IFormatProvider? provider) return ToString(""g"", provider); }} - /// - /// Get string representation of value and unit. - /// - /// The number of significant digits after the radix point. - /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. - [Obsolete(@""This method is deprecated and will be removed at a future release. Please use ToString(""""s2"""") or ToString(""""s2"""", provider) where 2 is an example of the number passed to significantDigitsAfterRadix."")] - public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix) - {{ - var value = Convert.ToDouble(Value); - var format = UnitFormatter.GetFormat(value, significantDigitsAfterRadix); - return ToString(provider, format); - }} - - /// - /// Get string representation of value and unit. - /// - /// String format to use. Default: ""{{0:0.##}} {{1}} for value and unit abbreviation respectively."" - /// Arguments for string format. Value and unit are implicitly included as arguments 0 and 1. - /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. - [Obsolete(""This method is deprecated and will be removed at a future release. Please use string.Format()."")] - public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args) - {{ - if (format == null) throw new ArgumentNullException(nameof(format)); - if (args == null) throw new ArgumentNullException(nameof(args)); - - provider = provider ?? CultureInfo.CurrentCulture; - - var value = Convert.ToDouble(Value); - var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); - return string.Format(provider, format, formatArgs); - }} - /// /// /// Gets the string representation of this instance in the specified format string using . diff --git a/CodeGen/Generators/UnitsNetGen/UnitTestBaseClassGenerator.cs b/CodeGen/Generators/UnitsNetGen/UnitTestBaseClassGenerator.cs index 203e832120..d5c4cf9bbb 100644 --- a/CodeGen/Generators/UnitsNetGen/UnitTestBaseClassGenerator.cs +++ b/CodeGen/Generators/UnitsNetGen/UnitTestBaseClassGenerator.cs @@ -490,10 +490,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData(""g"")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) {{ var quantity = {_quantity.Name}.From{_baseUnit.PluralName}(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); }} [Fact] diff --git a/README.md b/README.md index cc49212b62..84c2cadf90 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ RotationalSpeed r = Angle.FromDegrees(90) / TimeSpan.FromSeconds(2); ### Culture and Localization -The culture for abbreviations defaults to Thread.CurrentUICulture and falls back to US English if not defined. Thread.CurrentCulture affects number formatting unless a custom culture is specified. The relevant methods are: +The culture for abbreviations defaults to Thread.CurrentCulture and falls back to US English if not defined. Thread.CurrentCulture affects number formatting unless a custom culture is specified. The relevant methods are: * ToString() * GetAbbreviation() @@ -93,8 +93,9 @@ var usEnglish = new CultureInfo("en-US"); var russian = new CultureInfo("ru-RU"); var oneKg = Mass.FromKilograms(1); -// ToString() uses CurrentUICulture for abbreviation language and CurrentCulture for number formatting -Thread.CurrentThread.CurrentUICulture = russian; +// ToString() uses CurrentCulture for abbreviation language number formatting. This is consistent with the behavior of the .NET Framework, +// where DateTime.ToString() uses CurrentCulture for the whole string, likely because mixing an english date format with a russian month name might be confusing. +Thread.CurrentThread.CurrentCulture = russian; string kgRu = oneKg.ToString(); // "1 кг" // ToString() with specific culture and custom string format pattern From 29974ae290f870f71ecdeead2d3c48fd08226604 Mon Sep 17 00:00:00 2001 From: Patrick Grawehr Date: Sat, 13 Nov 2021 16:30:32 +0100 Subject: [PATCH 4/4] Regenerate code and fix unit tests --- .../UnitsNetGen/QuantityGenerator.cs | 2 +- .../UnitsNetGen/UnitTestBaseClassGenerator.cs | 2 +- .../TestsBase/AccelerationTestsBase.g.cs | 4 ++-- .../TestsBase/AmountOfSubstanceTestsBase.g.cs | 4 ++-- .../TestsBase/AmplitudeRatioTestsBase.g.cs | 4 ++-- .../TestsBase/AngleTestsBase.g.cs | 4 ++-- .../TestsBase/ApparentEnergyTestsBase.g.cs | 4 ++-- .../TestsBase/ApparentPowerTestsBase.g.cs | 4 ++-- .../TestsBase/AreaDensityTestsBase.g.cs | 4 ++-- .../AreaMomentOfInertiaTestsBase.g.cs | 4 ++-- .../TestsBase/AreaTestsBase.g.cs | 4 ++-- .../TestsBase/BitRateTestsBase.g.cs | 4 ++-- ...BrakeSpecificFuelConsumptionTestsBase.g.cs | 4 ++-- .../TestsBase/CapacitanceTestsBase.g.cs | 4 ++-- ...oefficientOfThermalExpansionTestsBase.g.cs | 4 ++-- .../TestsBase/DensityTestsBase.g.cs | 4 ++-- .../TestsBase/DurationTestsBase.g.cs | 4 ++-- .../TestsBase/DynamicViscosityTestsBase.g.cs | 4 ++-- .../ElectricAdmittanceTestsBase.g.cs | 4 ++-- .../ElectricChargeDensityTestsBase.g.cs | 4 ++-- .../TestsBase/ElectricChargeTestsBase.g.cs | 4 ++-- .../ElectricConductanceTestsBase.g.cs | 4 ++-- .../ElectricConductivityTestsBase.g.cs | 4 ++-- .../ElectricCurrentDensityTestsBase.g.cs | 4 ++-- .../ElectricCurrentGradientTestsBase.g.cs | 4 ++-- .../TestsBase/ElectricCurrentTestsBase.g.cs | 4 ++-- .../TestsBase/ElectricFieldTestsBase.g.cs | 4 ++-- .../ElectricInductanceTestsBase.g.cs | 4 ++-- .../ElectricPotentialAcTestsBase.g.cs | 4 ++-- .../ElectricPotentialChangeRateTestsBase.g.cs | 4 ++-- .../ElectricPotentialDcTestsBase.g.cs | 4 ++-- .../TestsBase/ElectricPotentialTestsBase.g.cs | 4 ++-- .../ElectricResistanceTestsBase.g.cs | 4 ++-- .../ElectricResistivityTestsBase.g.cs | 4 ++-- ...ElectricSurfaceChargeDensityTestsBase.g.cs | 4 ++-- .../TestsBase/EnergyTestsBase.g.cs | 4 ++-- .../TestsBase/EntropyTestsBase.g.cs | 4 ++-- .../TestsBase/ForceChangeRateTestsBase.g.cs | 4 ++-- .../TestsBase/ForcePerLengthTestsBase.g.cs | 4 ++-- .../TestsBase/ForceTestsBase.g.cs | 4 ++-- .../TestsBase/FrequencyTestsBase.g.cs | 4 ++-- .../TestsBase/FuelEfficiencyTestsBase.g.cs | 4 ++-- .../TestsBase/HeatFluxTestsBase.g.cs | 4 ++-- .../HeatTransferCoefficientTestsBase.g.cs | 4 ++-- .../TestsBase/IlluminanceTestsBase.g.cs | 4 ++-- .../TestsBase/InformationTestsBase.g.cs | 4 ++-- .../TestsBase/IrradianceTestsBase.g.cs | 4 ++-- .../TestsBase/IrradiationTestsBase.g.cs | 4 ++-- .../KinematicViscosityTestsBase.g.cs | 4 ++-- .../TestsBase/LapseRateTestsBase.g.cs | 4 ++-- .../TestsBase/LengthTestsBase.g.cs | 4 ++-- .../TestsBase/LevelTestsBase.g.cs | 4 ++-- .../TestsBase/LinearDensityTestsBase.g.cs | 4 ++-- .../LinearPowerDensityTestsBase.g.cs | 4 ++-- .../TestsBase/LuminosityTestsBase.g.cs | 4 ++-- .../TestsBase/LuminousFluxTestsBase.g.cs | 4 ++-- .../TestsBase/LuminousIntensityTestsBase.g.cs | 4 ++-- .../TestsBase/MagneticFieldTestsBase.g.cs | 4 ++-- .../TestsBase/MagneticFluxTestsBase.g.cs | 4 ++-- .../TestsBase/MagnetizationTestsBase.g.cs | 4 ++-- .../TestsBase/MassConcentrationTestsBase.g.cs | 4 ++-- .../TestsBase/MassFlowTestsBase.g.cs | 4 ++-- .../TestsBase/MassFluxTestsBase.g.cs | 4 ++-- .../TestsBase/MassFractionTestsBase.g.cs | 6 +++--- .../MassMomentOfInertiaTestsBase.g.cs | 4 ++-- .../TestsBase/MassTestsBase.g.cs | 4 ++-- .../TestsBase/MolarEnergyTestsBase.g.cs | 4 ++-- .../TestsBase/MolarEntropyTestsBase.g.cs | 4 ++-- .../TestsBase/MolarMassTestsBase.g.cs | 4 ++-- .../TestsBase/MolarityTestsBase.g.cs | 4 ++-- .../TestsBase/PermeabilityTestsBase.g.cs | 4 ++-- .../TestsBase/PermittivityTestsBase.g.cs | 4 ++-- .../TestsBase/PowerDensityTestsBase.g.cs | 4 ++-- .../TestsBase/PowerRatioTestsBase.g.cs | 4 ++-- .../TestsBase/PowerTestsBase.g.cs | 4 ++-- .../PressureChangeRateTestsBase.g.cs | 4 ++-- .../TestsBase/PressureTestsBase.g.cs | 4 ++-- .../TestsBase/RatioChangeRateTestsBase.g.cs | 4 ++-- .../TestsBase/RatioTestsBase.g.cs | 6 +++--- .../TestsBase/ReactiveEnergyTestsBase.g.cs | 4 ++-- .../TestsBase/ReactivePowerTestsBase.g.cs | 4 ++-- .../TestsBase/ReciprocalAreaTestsBase.g.cs | 16 +++++++-------- .../TestsBase/ReciprocalLengthTestsBase.g.cs | 16 +++++++-------- .../TestsBase/RelativeHumidityTestsBase.g.cs | 16 +++++++-------- .../RotationalAccelerationTestsBase.g.cs | 4 ++-- .../TestsBase/RotationalSpeedTestsBase.g.cs | 4 ++-- ...RotationalStiffnessPerLengthTestsBase.g.cs | 4 ++-- .../RotationalStiffnessTestsBase.g.cs | 4 ++-- .../TestsBase/ScalarTestsBase.g.cs | 16 +++++++-------- .../TestsBase/SolidAngleTestsBase.g.cs | 4 ++-- .../TestsBase/SpecificEnergyTestsBase.g.cs | 4 ++-- .../TestsBase/SpecificEntropyTestsBase.g.cs | 4 ++-- .../SpecificFuelConsumptionTestsBase.g.cs | 16 +++++++-------- .../TestsBase/SpecificVolumeTestsBase.g.cs | 4 ++-- .../TestsBase/SpecificWeightTestsBase.g.cs | 4 ++-- .../TestsBase/SpeedTestsBase.g.cs | 4 ++-- .../StandardVolumeFlowTestsBase.g.cs | 16 +++++++-------- .../TemperatureChangeRateTestsBase.g.cs | 4 ++-- .../TestsBase/TemperatureDeltaTestsBase.g.cs | 4 ++-- .../TestsBase/TemperatureTestsBase.g.cs | 4 ++-- .../ThermalConductivityTestsBase.g.cs | 4 ++-- .../TestsBase/ThermalResistanceTestsBase.g.cs | 4 ++-- .../TestsBase/TorquePerLengthTestsBase.g.cs | 4 ++-- .../TestsBase/TorqueTestsBase.g.cs | 4 ++-- .../TestsBase/TurbidityTestsBase.g.cs | 16 +++++++-------- .../TestsBase/VitaminATestsBase.g.cs | 4 ++-- .../VolumeConcentrationTestsBase.g.cs | 6 +++--- .../TestsBase/VolumeFlowTestsBase.g.cs | 4 ++-- .../TestsBase/VolumePerLengthTestsBase.g.cs | 4 ++-- .../TestsBase/VolumeTestsBase.g.cs | 4 ++-- .../VolumetricHeatCapacityTestsBase.g.cs | 16 +++++++-------- .../WarpingMomentOfInertiaTestsBase.g.cs | 16 +++++++-------- UnitsNet.Tests/QuantityFormatterTests.cs | 14 +++++++++++-- .../Quantities/Acceleration.g.cs | 20 +++++++++---------- .../Quantities/AmountOfSubstance.g.cs | 20 +++++++++---------- .../Quantities/AmplitudeRatio.g.cs | 20 +++++++++---------- UnitsNet/GeneratedCode/Quantities/Angle.g.cs | 20 +++++++++---------- .../Quantities/ApparentEnergy.g.cs | 20 +++++++++---------- .../Quantities/ApparentPower.g.cs | 20 +++++++++---------- UnitsNet/GeneratedCode/Quantities/Area.g.cs | 20 +++++++++---------- .../GeneratedCode/Quantities/AreaDensity.g.cs | 20 +++++++++---------- .../Quantities/AreaMomentOfInertia.g.cs | 20 +++++++++---------- .../GeneratedCode/Quantities/BitRate.g.cs | 20 +++++++++---------- .../BrakeSpecificFuelConsumption.g.cs | 20 +++++++++---------- .../GeneratedCode/Quantities/Capacitance.g.cs | 20 +++++++++---------- .../CoefficientOfThermalExpansion.g.cs | 20 +++++++++---------- .../GeneratedCode/Quantities/Density.g.cs | 20 +++++++++---------- .../GeneratedCode/Quantities/Duration.g.cs | 20 +++++++++---------- .../Quantities/DynamicViscosity.g.cs | 20 +++++++++---------- .../Quantities/ElectricAdmittance.g.cs | 20 +++++++++---------- .../Quantities/ElectricCharge.g.cs | 20 +++++++++---------- .../Quantities/ElectricChargeDensity.g.cs | 20 +++++++++---------- .../Quantities/ElectricConductance.g.cs | 20 +++++++++---------- .../Quantities/ElectricConductivity.g.cs | 20 +++++++++---------- .../Quantities/ElectricCurrent.g.cs | 20 +++++++++---------- .../Quantities/ElectricCurrentDensity.g.cs | 20 +++++++++---------- .../Quantities/ElectricCurrentGradient.g.cs | 20 +++++++++---------- .../Quantities/ElectricField.g.cs | 20 +++++++++---------- .../Quantities/ElectricInductance.g.cs | 20 +++++++++---------- .../Quantities/ElectricPotential.g.cs | 20 +++++++++---------- .../Quantities/ElectricPotentialAc.g.cs | 20 +++++++++---------- .../ElectricPotentialChangeRate.g.cs | 20 +++++++++---------- .../Quantities/ElectricPotentialDc.g.cs | 20 +++++++++---------- .../Quantities/ElectricResistance.g.cs | 20 +++++++++---------- .../Quantities/ElectricResistivity.g.cs | 20 +++++++++---------- .../ElectricSurfaceChargeDensity.g.cs | 20 +++++++++---------- UnitsNet/GeneratedCode/Quantities/Energy.g.cs | 20 +++++++++---------- .../GeneratedCode/Quantities/Entropy.g.cs | 20 +++++++++---------- UnitsNet/GeneratedCode/Quantities/Force.g.cs | 20 +++++++++---------- .../Quantities/ForceChangeRate.g.cs | 20 +++++++++---------- .../Quantities/ForcePerLength.g.cs | 20 +++++++++---------- .../GeneratedCode/Quantities/Frequency.g.cs | 20 +++++++++---------- .../Quantities/FuelEfficiency.g.cs | 20 +++++++++---------- .../GeneratedCode/Quantities/HeatFlux.g.cs | 20 +++++++++---------- .../Quantities/HeatTransferCoefficient.g.cs | 20 +++++++++---------- .../GeneratedCode/Quantities/Illuminance.g.cs | 20 +++++++++---------- .../GeneratedCode/Quantities/Information.g.cs | 20 +++++++++---------- .../GeneratedCode/Quantities/Irradiance.g.cs | 20 +++++++++---------- .../GeneratedCode/Quantities/Irradiation.g.cs | 20 +++++++++---------- .../Quantities/KinematicViscosity.g.cs | 20 +++++++++---------- .../GeneratedCode/Quantities/LapseRate.g.cs | 20 +++++++++---------- UnitsNet/GeneratedCode/Quantities/Length.g.cs | 20 +++++++++---------- UnitsNet/GeneratedCode/Quantities/Level.g.cs | 20 +++++++++---------- .../Quantities/LinearDensity.g.cs | 20 +++++++++---------- .../Quantities/LinearPowerDensity.g.cs | 20 +++++++++---------- .../GeneratedCode/Quantities/Luminosity.g.cs | 20 +++++++++---------- .../Quantities/LuminousFlux.g.cs | 20 +++++++++---------- .../Quantities/LuminousIntensity.g.cs | 20 +++++++++---------- .../Quantities/MagneticField.g.cs | 20 +++++++++---------- .../Quantities/MagneticFlux.g.cs | 20 +++++++++---------- .../Quantities/Magnetization.g.cs | 20 +++++++++---------- UnitsNet/GeneratedCode/Quantities/Mass.g.cs | 20 +++++++++---------- .../Quantities/MassConcentration.g.cs | 20 +++++++++---------- .../GeneratedCode/Quantities/MassFlow.g.cs | 20 +++++++++---------- .../GeneratedCode/Quantities/MassFlux.g.cs | 20 +++++++++---------- .../Quantities/MassFraction.g.cs | 20 +++++++++---------- .../Quantities/MassMomentOfInertia.g.cs | 20 +++++++++---------- .../GeneratedCode/Quantities/MolarEnergy.g.cs | 20 +++++++++---------- .../Quantities/MolarEntropy.g.cs | 20 +++++++++---------- .../GeneratedCode/Quantities/MolarMass.g.cs | 20 +++++++++---------- .../GeneratedCode/Quantities/Molarity.g.cs | 20 +++++++++---------- .../Quantities/Permeability.g.cs | 20 +++++++++---------- .../Quantities/Permittivity.g.cs | 20 +++++++++---------- UnitsNet/GeneratedCode/Quantities/Power.g.cs | 20 +++++++++---------- .../Quantities/PowerDensity.g.cs | 20 +++++++++---------- .../GeneratedCode/Quantities/PowerRatio.g.cs | 20 +++++++++---------- .../GeneratedCode/Quantities/Pressure.g.cs | 20 +++++++++---------- .../Quantities/PressureChangeRate.g.cs | 20 +++++++++---------- UnitsNet/GeneratedCode/Quantities/Ratio.g.cs | 20 +++++++++---------- .../Quantities/RatioChangeRate.g.cs | 20 +++++++++---------- .../Quantities/ReactiveEnergy.g.cs | 20 +++++++++---------- .../Quantities/ReactivePower.g.cs | 20 +++++++++---------- .../Quantities/ReciprocalArea.g.cs | 20 +++++++++---------- .../Quantities/ReciprocalLength.g.cs | 20 +++++++++---------- .../Quantities/RelativeHumidity.g.cs | 20 +++++++++---------- .../Quantities/RotationalAcceleration.g.cs | 20 +++++++++---------- .../Quantities/RotationalSpeed.g.cs | 20 +++++++++---------- .../Quantities/RotationalStiffness.g.cs | 20 +++++++++---------- .../RotationalStiffnessPerLength.g.cs | 20 +++++++++---------- UnitsNet/GeneratedCode/Quantities/Scalar.g.cs | 20 +++++++++---------- .../GeneratedCode/Quantities/SolidAngle.g.cs | 20 +++++++++---------- .../Quantities/SpecificEnergy.g.cs | 20 +++++++++---------- .../Quantities/SpecificEntropy.g.cs | 20 +++++++++---------- .../Quantities/SpecificFuelConsumption.g.cs | 20 +++++++++---------- .../Quantities/SpecificVolume.g.cs | 20 +++++++++---------- .../Quantities/SpecificWeight.g.cs | 20 +++++++++---------- UnitsNet/GeneratedCode/Quantities/Speed.g.cs | 20 +++++++++---------- .../Quantities/StandardVolumeFlow.g.cs | 20 +++++++++---------- .../GeneratedCode/Quantities/Temperature.g.cs | 20 +++++++++---------- .../Quantities/TemperatureChangeRate.g.cs | 20 +++++++++---------- .../Quantities/TemperatureDelta.g.cs | 20 +++++++++---------- .../Quantities/ThermalConductivity.g.cs | 20 +++++++++---------- .../Quantities/ThermalResistance.g.cs | 20 +++++++++---------- UnitsNet/GeneratedCode/Quantities/Torque.g.cs | 20 +++++++++---------- .../Quantities/TorquePerLength.g.cs | 20 +++++++++---------- .../GeneratedCode/Quantities/Turbidity.g.cs | 20 +++++++++---------- .../GeneratedCode/Quantities/VitaminA.g.cs | 20 +++++++++---------- UnitsNet/GeneratedCode/Quantities/Volume.g.cs | 20 +++++++++---------- .../Quantities/VolumeConcentration.g.cs | 20 +++++++++---------- .../GeneratedCode/Quantities/VolumeFlow.g.cs | 20 +++++++++---------- .../Quantities/VolumePerLength.g.cs | 20 +++++++++---------- .../Quantities/VolumetricHeatCapacity.g.cs | 20 +++++++++---------- .../Quantities/WarpingMomentOfInertia.g.cs | 20 +++++++++---------- 223 files changed, 1391 insertions(+), 1381 deletions(-) diff --git a/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs b/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs index b1dc43053c..50f05679a1 100644 --- a/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs +++ b/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs @@ -947,7 +947,7 @@ public string ToString(string format) /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) {{ diff --git a/CodeGen/Generators/UnitsNetGen/UnitTestBaseClassGenerator.cs b/CodeGen/Generators/UnitsNetGen/UnitTestBaseClassGenerator.cs index d5c4cf9bbb..fe007b5ec2 100644 --- a/CodeGen/Generators/UnitsNetGen/UnitTestBaseClassGenerator.cs +++ b/CodeGen/Generators/UnitsNetGen/UnitTestBaseClassGenerator.cs @@ -485,7 +485,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) : CultureInfo.GetCultureInfo(cultureName); Assert.Equal(quantity.ToString(""g"", formatProvider), quantity.ToString(null, formatProvider)); - }} + }} [Theory] [InlineData(null)] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AccelerationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AccelerationTestsBase.g.cs index e8e1a50615..1b6ebf73f5 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/AccelerationTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AccelerationTestsBase.g.cs @@ -551,10 +551,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = Acceleration.FromMetersPerSecondSquared(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AmountOfSubstanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AmountOfSubstanceTestsBase.g.cs index fbf9533754..8155ff8eff 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/AmountOfSubstanceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AmountOfSubstanceTestsBase.g.cs @@ -566,10 +566,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = AmountOfSubstance.FromMoles(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AmplitudeRatioTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AmplitudeRatioTestsBase.g.cs index fa3f3bd91d..029a660a52 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/AmplitudeRatioTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AmplitudeRatioTestsBase.g.cs @@ -405,10 +405,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = AmplitudeRatio.FromDecibelVolts(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AngleTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AngleTestsBase.g.cs index dda6fc7072..d8fa56abaf 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/AngleTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AngleTestsBase.g.cs @@ -581,10 +581,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = Angle.FromDegrees(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentEnergyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentEnergyTestsBase.g.cs index ffa7703979..3bf958cb62 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentEnergyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentEnergyTestsBase.g.cs @@ -386,10 +386,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = ApparentEnergy.FromVoltampereHours(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentPowerTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentPowerTestsBase.g.cs index 2171a06aef..672fa5e4e1 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentPowerTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentPowerTestsBase.g.cs @@ -401,10 +401,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = ApparentPower.FromVoltamperes(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaDensityTestsBase.g.cs index 0b6e4aab7d..cecd3658ca 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaDensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaDensityTestsBase.g.cs @@ -356,10 +356,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = AreaDensity.FromKilogramsPerSquareMeter(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaMomentOfInertiaTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaMomentOfInertiaTestsBase.g.cs index 1877543392..9f2d412306 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaMomentOfInertiaTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaMomentOfInertiaTestsBase.g.cs @@ -431,10 +431,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = AreaMomentOfInertia.FromMetersToTheFourth(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaTestsBase.g.cs index 0e13c9421b..f80c5c4f56 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaTestsBase.g.cs @@ -551,10 +551,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = Area.FromSquareMeters(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/BitRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/BitRateTestsBase.g.cs index ff1e027d69..6b887b6091 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/BitRateTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/BitRateTestsBase.g.cs @@ -706,10 +706,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = BitRate.FromBitsPerSecond(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/BrakeSpecificFuelConsumptionTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/BrakeSpecificFuelConsumptionTestsBase.g.cs index cf99ac3958..b3e13df8f5 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/BrakeSpecificFuelConsumptionTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/BrakeSpecificFuelConsumptionTestsBase.g.cs @@ -386,10 +386,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = BrakeSpecificFuelConsumption.FromKilogramsPerJoule(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/CapacitanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/CapacitanceTestsBase.g.cs index c2e894c969..39f605fc99 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/CapacitanceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/CapacitanceTestsBase.g.cs @@ -446,10 +446,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = Capacitance.FromFarads(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/CoefficientOfThermalExpansionTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/CoefficientOfThermalExpansionTestsBase.g.cs index da97c41ea4..cbcd63edfb 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/CoefficientOfThermalExpansionTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/CoefficientOfThermalExpansionTestsBase.g.cs @@ -386,10 +386,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = CoefficientOfThermalExpansion.FromInverseKelvin(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/DensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/DensityTestsBase.g.cs index 3178d2f0a4..5efb74f49d 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/DensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/DensityTestsBase.g.cs @@ -941,10 +941,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = Density.FromKilogramsPerCubicMeter(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/DurationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/DurationTestsBase.g.cs index 7d2cf7283b..c5382bd6c0 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/DurationTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/DurationTestsBase.g.cs @@ -491,10 +491,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = Duration.FromSeconds(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/DynamicViscosityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/DynamicViscosityTestsBase.g.cs index 5d4e027107..b07e089b4b 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/DynamicViscosityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/DynamicViscosityTestsBase.g.cs @@ -491,10 +491,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = DynamicViscosity.FromNewtonSecondsPerMeterSquared(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricAdmittanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricAdmittanceTestsBase.g.cs index 34aba2f7d0..af17d29c73 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricAdmittanceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricAdmittanceTestsBase.g.cs @@ -401,10 +401,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = ElectricAdmittance.FromSiemens(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeDensityTestsBase.g.cs index 9e5e30b4c2..421022d475 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeDensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeDensityTestsBase.g.cs @@ -356,10 +356,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = ElectricChargeDensity.FromCoulombsPerCubicMeter(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeTestsBase.g.cs index be8612c90b..ff3b204d3a 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeTestsBase.g.cs @@ -416,10 +416,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = ElectricCharge.FromCoulombs(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductanceTestsBase.g.cs index e67974387e..3a7e1e06bf 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductanceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductanceTestsBase.g.cs @@ -386,10 +386,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = ElectricConductance.FromSiemens(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductivityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductivityTestsBase.g.cs index a4f71f9ffb..db59e86483 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductivityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductivityTestsBase.g.cs @@ -386,10 +386,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = ElectricConductivity.FromSiemensPerMeter(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentDensityTestsBase.g.cs index 4a285c9fe4..408373cacb 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentDensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentDensityTestsBase.g.cs @@ -386,10 +386,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = ElectricCurrentDensity.FromAmperesPerSquareMeter(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentGradientTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentGradientTestsBase.g.cs index c669d70d49..4a0a019201 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentGradientTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentGradientTestsBase.g.cs @@ -401,10 +401,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = ElectricCurrentGradient.FromAmperesPerSecond(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentTestsBase.g.cs index 0a303b3b36..84a10e1fc3 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentTestsBase.g.cs @@ -461,10 +461,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = ElectricCurrent.FromAmperes(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricFieldTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricFieldTestsBase.g.cs index a45e567bf7..1c907d731d 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricFieldTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricFieldTestsBase.g.cs @@ -356,10 +356,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = ElectricField.FromVoltsPerMeter(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricInductanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricInductanceTestsBase.g.cs index 1cec021261..a4949c4dcd 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricInductanceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricInductanceTestsBase.g.cs @@ -401,10 +401,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = ElectricInductance.FromHenries(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialAcTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialAcTestsBase.g.cs index 06884f6ae0..9cde8f7717 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialAcTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialAcTestsBase.g.cs @@ -416,10 +416,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = ElectricPotentialAc.FromVoltsAc(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialChangeRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialChangeRateTestsBase.g.cs index 2f78ec4daa..ca697d9b43 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialChangeRateTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialChangeRateTestsBase.g.cs @@ -641,10 +641,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = ElectricPotentialChangeRate.FromVoltsPerSeconds(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialDcTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialDcTestsBase.g.cs index ce3dc0c164..11427db37a 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialDcTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialDcTestsBase.g.cs @@ -416,10 +416,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = ElectricPotentialDc.FromVoltsDc(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialTestsBase.g.cs index 929eb8747d..bdb6a4f024 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialTestsBase.g.cs @@ -416,10 +416,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = ElectricPotential.FromVolts(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistanceTestsBase.g.cs index 64d9873161..84e501a996 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistanceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistanceTestsBase.g.cs @@ -431,10 +431,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = ElectricResistance.FromOhms(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistivityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistivityTestsBase.g.cs index 0b8eb69099..5321cf1baf 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistivityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistivityTestsBase.g.cs @@ -551,10 +551,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = ElectricResistivity.FromOhmMeters(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricSurfaceChargeDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricSurfaceChargeDensityTestsBase.g.cs index f465bf9308..ea39314e0f 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricSurfaceChargeDensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricSurfaceChargeDensityTestsBase.g.cs @@ -386,10 +386,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = ElectricSurfaceChargeDensity.FromCoulombsPerSquareMeter(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/EnergyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/EnergyTestsBase.g.cs index 714d2a6a15..38e9640a94 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/EnergyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/EnergyTestsBase.g.cs @@ -881,10 +881,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = Energy.FromJoules(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/EntropyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/EntropyTestsBase.g.cs index c6a2985b43..711284e90e 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/EntropyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/EntropyTestsBase.g.cs @@ -446,10 +446,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = Entropy.FromJoulesPerKelvin(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ForceChangeRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ForceChangeRateTestsBase.g.cs index 2b0c693675..faa6b8341b 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ForceChangeRateTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ForceChangeRateTestsBase.g.cs @@ -566,10 +566,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = ForceChangeRate.FromNewtonsPerSecond(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ForcePerLengthTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ForcePerLengthTestsBase.g.cs index b993471313..5875bb78d2 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ForcePerLengthTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ForcePerLengthTestsBase.g.cs @@ -911,10 +911,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = ForcePerLength.FromNewtonsPerMeter(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ForceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ForceTestsBase.g.cs index 3ddd0eeb58..9dfd20416f 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ForceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ForceTestsBase.g.cs @@ -566,10 +566,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = Force.FromNewtons(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/FrequencyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/FrequencyTestsBase.g.cs index 726ac2dd21..af81a2acd5 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/FrequencyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/FrequencyTestsBase.g.cs @@ -506,10 +506,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = Frequency.FromHertz(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/FuelEfficiencyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/FuelEfficiencyTestsBase.g.cs index 0c58f92bb4..468bfc0dcf 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/FuelEfficiencyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/FuelEfficiencyTestsBase.g.cs @@ -401,10 +401,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = FuelEfficiency.FromLitersPer100Kilometers(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/HeatFluxTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/HeatFluxTestsBase.g.cs index 3f6ea8dd35..71d0062f6e 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/HeatFluxTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/HeatFluxTestsBase.g.cs @@ -611,10 +611,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = HeatFlux.FromWattsPerSquareMeter(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/HeatTransferCoefficientTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/HeatTransferCoefficientTestsBase.g.cs index f21e2d12cb..a891c07e90 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/HeatTransferCoefficientTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/HeatTransferCoefficientTestsBase.g.cs @@ -386,10 +386,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = HeatTransferCoefficient.FromWattsPerSquareMeterKelvin(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/IlluminanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/IlluminanceTestsBase.g.cs index ee3fca8d79..e0ccfe7254 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/IlluminanceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/IlluminanceTestsBase.g.cs @@ -401,10 +401,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = Illuminance.FromLux(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/InformationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/InformationTestsBase.g.cs index 9559974d2c..1733094f88 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/InformationTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/InformationTestsBase.g.cs @@ -706,10 +706,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = Information.FromBits(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/IrradianceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/IrradianceTestsBase.g.cs index 6470e35c9f..707f9f85cc 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/IrradianceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/IrradianceTestsBase.g.cs @@ -551,10 +551,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = Irradiance.FromWattsPerSquareMeter(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/IrradiationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/IrradiationTestsBase.g.cs index ec40eb00ad..5023608e99 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/IrradiationTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/IrradiationTestsBase.g.cs @@ -446,10 +446,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = Irradiation.FromJoulesPerSquareMeter(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/KinematicViscosityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/KinematicViscosityTestsBase.g.cs index d2caa4419b..9c5d16b941 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/KinematicViscosityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/KinematicViscosityTestsBase.g.cs @@ -476,10 +476,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = KinematicViscosity.FromSquareMetersPerSecond(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LapseRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LapseRateTestsBase.g.cs index 426d94e781..0547485dd6 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/LapseRateTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LapseRateTestsBase.g.cs @@ -356,10 +356,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = LapseRate.FromDegreesCelciusPerKilometer(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LengthTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LengthTestsBase.g.cs index ba2eb86b1e..70be45e183 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/LengthTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LengthTestsBase.g.cs @@ -836,10 +836,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = Length.FromMeters(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LevelTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LevelTestsBase.g.cs index a499362cc5..9e8fc5c024 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/LevelTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LevelTestsBase.g.cs @@ -375,10 +375,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = Level.FromDecibels(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LinearDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LinearDensityTestsBase.g.cs index 259e4b94f7..c1bc525fe3 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/LinearDensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LinearDensityTestsBase.g.cs @@ -551,10 +551,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = LinearDensity.FromKilogramsPerMeter(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LinearPowerDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LinearPowerDensityTestsBase.g.cs index cb0150e065..19170d5fbb 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/LinearPowerDensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LinearPowerDensityTestsBase.g.cs @@ -716,10 +716,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = LinearPowerDensity.FromWattsPerMeter(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminosityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminosityTestsBase.g.cs index 071867ebe2..54fbec51ae 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminosityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminosityTestsBase.g.cs @@ -551,10 +551,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = Luminosity.FromWatts(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousFluxTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousFluxTestsBase.g.cs index 800dfcb711..1a74dec784 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousFluxTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousFluxTestsBase.g.cs @@ -356,10 +356,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = LuminousFlux.FromLumens(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousIntensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousIntensityTestsBase.g.cs index 16aaf962e0..da9f2c8f4e 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousIntensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousIntensityTestsBase.g.cs @@ -356,10 +356,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = LuminousIntensity.FromCandela(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFieldTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFieldTestsBase.g.cs index 8bba5ff715..16ed475c5d 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFieldTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFieldTestsBase.g.cs @@ -431,10 +431,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = MagneticField.FromTeslas(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFluxTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFluxTestsBase.g.cs index 74371d1377..ec8ddfb7e7 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFluxTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFluxTestsBase.g.cs @@ -356,10 +356,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = MagneticFlux.FromWebers(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MagnetizationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MagnetizationTestsBase.g.cs index aa5c37afde..b26a15e9ac 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MagnetizationTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MagnetizationTestsBase.g.cs @@ -356,10 +356,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = Magnetization.FromAmperesPerMeter(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MassConcentrationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MassConcentrationTestsBase.g.cs index 766051c64a..aae29e2b4f 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MassConcentrationTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MassConcentrationTestsBase.g.cs @@ -1076,10 +1076,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = MassConcentration.FromKilogramsPerCubicMeter(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MassFlowTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MassFlowTestsBase.g.cs index c888f617be..5525ce02f4 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MassFlowTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MassFlowTestsBase.g.cs @@ -836,10 +836,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = MassFlow.FromGramsPerSecond(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MassFluxTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MassFluxTestsBase.g.cs index 7afc8486a7..c714d53afe 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MassFluxTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MassFluxTestsBase.g.cs @@ -521,10 +521,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = MassFlux.FromKilogramsPerSecondPerSquareMeter(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MassFractionTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MassFractionTestsBase.g.cs index 1d45404afe..a55be4828b 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MassFractionTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MassFractionTestsBase.g.cs @@ -696,15 +696,15 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) : CultureInfo.GetCultureInfo(cultureName); Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider)); - } + } [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = MassFraction.FromDecimalFractions(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MassMomentOfInertiaTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MassMomentOfInertiaTestsBase.g.cs index afee9d95fe..46c9980368 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MassMomentOfInertiaTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MassMomentOfInertiaTestsBase.g.cs @@ -761,10 +761,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = MassMomentOfInertia.FromKilogramSquareMeters(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MassTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MassTestsBase.g.cs index a73e7a08ad..7733cb647a 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MassTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MassTestsBase.g.cs @@ -716,10 +716,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = Mass.FromKilograms(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEnergyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEnergyTestsBase.g.cs index f0c1a97b00..17dc5979f9 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEnergyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEnergyTestsBase.g.cs @@ -386,10 +386,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = MolarEnergy.FromJoulesPerMole(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEntropyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEntropyTestsBase.g.cs index 6a202a1478..8c8850d5be 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEntropyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEntropyTestsBase.g.cs @@ -386,10 +386,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = MolarEntropy.FromJoulesPerMoleKelvin(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarMassTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarMassTestsBase.g.cs index 81af3f668d..eb7c97bb69 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarMassTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarMassTestsBase.g.cs @@ -521,10 +521,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = MolarMass.FromKilogramsPerMole(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarityTestsBase.g.cs index 2a37a45d01..152f62104c 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarityTestsBase.g.cs @@ -461,10 +461,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = Molarity.FromMolesPerCubicMeter(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PermeabilityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PermeabilityTestsBase.g.cs index 51a5d4554a..731cadc6a0 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/PermeabilityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PermeabilityTestsBase.g.cs @@ -356,10 +356,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = Permeability.FromHenriesPerMeter(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PermittivityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PermittivityTestsBase.g.cs index 30abd07161..5f2bea4f41 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/PermittivityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PermittivityTestsBase.g.cs @@ -356,10 +356,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = Permittivity.FromFaradsPerMeter(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PowerDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PowerDensityTestsBase.g.cs index d625cfb155..46503289e2 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/PowerDensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PowerDensityTestsBase.g.cs @@ -1001,10 +1001,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = PowerDensity.FromWattsPerCubicMeter(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PowerRatioTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PowerRatioTestsBase.g.cs index bd5f5c7368..f7817f52b6 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/PowerRatioTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PowerRatioTestsBase.g.cs @@ -375,10 +375,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = PowerRatio.FromDecibelWatts(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PowerTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PowerTestsBase.g.cs index 983a7f1298..22cd9e08f6 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/PowerTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PowerTestsBase.g.cs @@ -691,10 +691,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = Power.FromWatts(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PressureChangeRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PressureChangeRateTestsBase.g.cs index e70a96d6fe..87ea64ef9f 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/PressureChangeRateTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PressureChangeRateTestsBase.g.cs @@ -536,10 +536,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = PressureChangeRate.FromPascalsPerSecond(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PressureTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PressureTestsBase.g.cs index 5400c01b5e..cc7d8b733e 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/PressureTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PressureTestsBase.g.cs @@ -1001,10 +1001,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = Pressure.FromPascals(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RatioChangeRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RatioChangeRateTestsBase.g.cs index 708359b2ac..e5a8d75f97 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/RatioChangeRateTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RatioChangeRateTestsBase.g.cs @@ -371,10 +371,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = RatioChangeRate.FromDecimalFractionsPerSecond(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RatioTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RatioTestsBase.g.cs index 8a31b2b3e1..84c33e88b5 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/RatioTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RatioTestsBase.g.cs @@ -426,15 +426,15 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) : CultureInfo.GetCultureInfo(cultureName); Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider)); - } + } [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = Ratio.FromDecimalFractions(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ReactiveEnergyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ReactiveEnergyTestsBase.g.cs index 3d3a980066..94b91dfae0 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ReactiveEnergyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ReactiveEnergyTestsBase.g.cs @@ -386,10 +386,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = ReactiveEnergy.FromVoltampereReactiveHours(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ReactivePowerTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ReactivePowerTestsBase.g.cs index f13df51a30..5464222e57 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ReactivePowerTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ReactivePowerTestsBase.g.cs @@ -401,10 +401,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = ReactivePower.FromVoltamperesReactive(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ReciprocalAreaTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ReciprocalAreaTestsBase.g.cs index 8dc57c85ad..0fabdbb37f 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ReciprocalAreaTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ReciprocalAreaTestsBase.g.cs @@ -422,8 +422,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 cm⁻²", new ReciprocalArea(1, ReciprocalAreaUnit.InverseSquareCentimeter).ToString()); Assert.Equal("1 dm⁻²", new ReciprocalArea(1, ReciprocalAreaUnit.InverseSquareDecimeter).ToString()); @@ -439,7 +439,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -465,10 +465,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 m⁻²", new ReciprocalArea(0.123456, ReciprocalAreaUnit.InverseSquareMeter).ToString("s1")); Assert.Equal("0.12 m⁻²", new ReciprocalArea(0.123456, ReciprocalAreaUnit.InverseSquareMeter).ToString("s2")); Assert.Equal("0.123 m⁻²", new ReciprocalArea(0.123456, ReciprocalAreaUnit.InverseSquareMeter).ToString("s3")); @@ -476,7 +476,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -506,10 +506,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = ReciprocalArea.FromInverseSquareMeters(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ReciprocalLengthTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ReciprocalLengthTestsBase.g.cs index 3404678d35..62b9b78790 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ReciprocalLengthTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ReciprocalLengthTestsBase.g.cs @@ -409,8 +409,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 cm⁻¹", new ReciprocalLength(1, ReciprocalLengthUnit.InverseCentimeter).ToString()); Assert.Equal("1 ft⁻¹", new ReciprocalLength(1, ReciprocalLengthUnit.InverseFoot).ToString()); @@ -425,7 +425,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -450,10 +450,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 m⁻¹", new ReciprocalLength(0.123456, ReciprocalLengthUnit.InverseMeter).ToString("s1")); Assert.Equal("0.12 m⁻¹", new ReciprocalLength(0.123456, ReciprocalLengthUnit.InverseMeter).ToString("s2")); Assert.Equal("0.123 m⁻¹", new ReciprocalLength(0.123456, ReciprocalLengthUnit.InverseMeter).ToString("s3")); @@ -461,7 +461,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -491,10 +491,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = ReciprocalLength.FromInverseMeters(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RelativeHumidityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RelativeHumidityTestsBase.g.cs index 94a6fb0f62..8a12a4c70d 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/RelativeHumidityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RelativeHumidityTestsBase.g.cs @@ -292,14 +292,14 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 %RH", new RelativeHumidity(1, RelativeHumidityUnit.Percent).ToString()); } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -315,10 +315,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 %RH", new RelativeHumidity(0.123456, RelativeHumidityUnit.Percent).ToString("s1")); Assert.Equal("0.12 %RH", new RelativeHumidity(0.123456, RelativeHumidityUnit.Percent).ToString("s2")); Assert.Equal("0.123 %RH", new RelativeHumidity(0.123456, RelativeHumidityUnit.Percent).ToString("s3")); @@ -326,7 +326,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -356,10 +356,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = RelativeHumidity.FromPercent(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalAccelerationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalAccelerationTestsBase.g.cs index 229ab89a78..fb226a255b 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalAccelerationTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalAccelerationTestsBase.g.cs @@ -401,10 +401,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = RotationalAcceleration.FromRadiansPerSecondSquared(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalSpeedTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalSpeedTestsBase.g.cs index a6710d45a5..84c1bd4e8b 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalSpeedTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalSpeedTestsBase.g.cs @@ -536,10 +536,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = RotationalSpeed.FromRadiansPerSecond(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessPerLengthTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessPerLengthTestsBase.g.cs index ca63c9c580..35e7db379d 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessPerLengthTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessPerLengthTestsBase.g.cs @@ -416,10 +416,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = RotationalStiffnessPerLength.FromNewtonMetersPerRadianPerMeter(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessTestsBase.g.cs index 10c013edb6..912e63f77e 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessTestsBase.g.cs @@ -836,10 +836,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = RotationalStiffness.FromNewtonMetersPerRadian(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ScalarTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ScalarTestsBase.g.cs index 6f672bdfbc..bf9ba33eeb 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ScalarTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ScalarTestsBase.g.cs @@ -292,14 +292,14 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1", new Scalar(1, ScalarUnit.Amount).ToString()); } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -315,10 +315,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1", new Scalar(0.123456, ScalarUnit.Amount).ToString("s1")); Assert.Equal("0.12", new Scalar(0.123456, ScalarUnit.Amount).ToString("s2")); Assert.Equal("0.123", new Scalar(0.123456, ScalarUnit.Amount).ToString("s3")); @@ -326,7 +326,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -356,10 +356,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = Scalar.FromAmount(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SolidAngleTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SolidAngleTestsBase.g.cs index f3551f987b..b65e7b2a4f 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/SolidAngleTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SolidAngleTestsBase.g.cs @@ -356,10 +356,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = SolidAngle.FromSteradians(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEnergyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEnergyTestsBase.g.cs index d9600e8fe0..9a0e0d5f05 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEnergyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEnergyTestsBase.g.cs @@ -716,10 +716,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = SpecificEnergy.FromJoulesPerKilogram(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEntropyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEntropyTestsBase.g.cs index a92618ca96..65481090e4 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEntropyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEntropyTestsBase.g.cs @@ -476,10 +476,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = SpecificEntropy.FromJoulesPerKilogramKelvin(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificFuelConsumptionTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificFuelConsumptionTestsBase.g.cs index a18827b0e1..466865ad45 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificFuelConsumptionTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificFuelConsumptionTestsBase.g.cs @@ -331,8 +331,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 g/(kN�s)", new SpecificFuelConsumption(1, SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond).ToString()); Assert.Equal("1 kg/(kgf�h)", new SpecificFuelConsumption(1, SpecificFuelConsumptionUnit.KilogramPerKilogramForceHour).ToString()); @@ -341,7 +341,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -360,10 +360,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 g/(kN�s)", new SpecificFuelConsumption(0.123456, SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond).ToString("s1")); Assert.Equal("0.12 g/(kN�s)", new SpecificFuelConsumption(0.123456, SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond).ToString("s2")); Assert.Equal("0.123 g/(kN�s)", new SpecificFuelConsumption(0.123456, SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond).ToString("s3")); @@ -371,7 +371,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -401,10 +401,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = SpecificFuelConsumption.FromGramsPerKiloNewtonSecond(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificVolumeTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificVolumeTestsBase.g.cs index d6bc8efce2..42bb9b2d09 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificVolumeTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificVolumeTestsBase.g.cs @@ -386,10 +386,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = SpecificVolume.FromCubicMetersPerKilogram(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificWeightTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificWeightTestsBase.g.cs index 91d8aadbab..9c54526bfa 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificWeightTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificWeightTestsBase.g.cs @@ -596,10 +596,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = SpecificWeight.FromNewtonsPerCubicMeter(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SpeedTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SpeedTestsBase.g.cs index 59fb9f009c..badb0e3dfe 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/SpeedTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SpeedTestsBase.g.cs @@ -821,10 +821,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = Speed.FromMetersPerSecond(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/StandardVolumeFlowTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/StandardVolumeFlowTestsBase.g.cs index 59e6bbff3a..3e9dd9ce9a 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/StandardVolumeFlowTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/StandardVolumeFlowTestsBase.g.cs @@ -396,8 +396,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 sccm", new StandardVolumeFlow(1, StandardVolumeFlowUnit.StandardCubicCentimeterPerMinute).ToString()); Assert.Equal("1 scfh", new StandardVolumeFlow(1, StandardVolumeFlowUnit.StandardCubicFootPerHour).ToString()); @@ -411,7 +411,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -435,10 +435,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 Sm³/s", new StandardVolumeFlow(0.123456, StandardVolumeFlowUnit.StandardCubicMeterPerSecond).ToString("s1")); Assert.Equal("0.12 Sm³/s", new StandardVolumeFlow(0.123456, StandardVolumeFlowUnit.StandardCubicMeterPerSecond).ToString("s2")); Assert.Equal("0.123 Sm³/s", new StandardVolumeFlow(0.123456, StandardVolumeFlowUnit.StandardCubicMeterPerSecond).ToString("s3")); @@ -446,7 +446,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -476,10 +476,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = StandardVolumeFlow.FromStandardCubicMetersPerSecond(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureChangeRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureChangeRateTestsBase.g.cs index 3edb37a392..d0142ec5d0 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureChangeRateTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureChangeRateTestsBase.g.cs @@ -491,10 +491,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = TemperatureChangeRate.FromDegreesCelsiusPerSecond(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureDeltaTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureDeltaTestsBase.g.cs index b7becab5c5..7e727b5d53 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureDeltaTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureDeltaTestsBase.g.cs @@ -476,10 +476,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = TemperatureDelta.FromKelvins(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureTestsBase.g.cs index 3ca65cb2cf..24c065a159 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureTestsBase.g.cs @@ -479,10 +479,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = Temperature.FromKelvins(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalConductivityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalConductivityTestsBase.g.cs index 967329abb1..c09c444f10 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalConductivityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalConductivityTestsBase.g.cs @@ -371,10 +371,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = ThermalConductivity.FromWattsPerMeterKelvin(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalResistanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalResistanceTestsBase.g.cs index 93137dbce3..f9b088d081 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalResistanceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalResistanceTestsBase.g.cs @@ -416,10 +416,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = ThermalResistance.FromSquareMeterKelvinsPerKilowatt(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/TorquePerLengthTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/TorquePerLengthTestsBase.g.cs index 5a2f505a77..8201166b49 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/TorquePerLengthTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/TorquePerLengthTestsBase.g.cs @@ -656,10 +656,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = TorquePerLength.FromNewtonMetersPerMeter(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/TorqueTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/TorqueTestsBase.g.cs index f1bc94806d..a6a91a44d8 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/TorqueTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/TorqueTestsBase.g.cs @@ -671,10 +671,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = Torque.FromNewtonMeters(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/TurbidityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/TurbidityTestsBase.g.cs index 474bbf295d..75b1af7686 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/TurbidityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/TurbidityTestsBase.g.cs @@ -292,14 +292,14 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 NTU", new Turbidity(1, TurbidityUnit.NTU).ToString()); } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -315,10 +315,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 NTU", new Turbidity(0.123456, TurbidityUnit.NTU).ToString("s1")); Assert.Equal("0.12 NTU", new Turbidity(0.123456, TurbidityUnit.NTU).ToString("s2")); Assert.Equal("0.123 NTU", new Turbidity(0.123456, TurbidityUnit.NTU).ToString("s3")); @@ -326,7 +326,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -356,10 +356,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = Turbidity.FromNTU(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VitaminATestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VitaminATestsBase.g.cs index 22a9f482fe..032d274ded 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/VitaminATestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VitaminATestsBase.g.cs @@ -356,10 +356,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = VitaminA.FromInternationalUnits(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeConcentrationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeConcentrationTestsBase.g.cs index 4ad6302aab..8b9a1ae06c 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeConcentrationTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeConcentrationTestsBase.g.cs @@ -636,15 +636,15 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) : CultureInfo.GetCultureInfo(cultureName); Assert.Equal(quantity.ToString("g", formatProvider), quantity.ToString(null, formatProvider)); - } + } [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = VolumeConcentration.FromDecimalFractions(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowTestsBase.g.cs index be82ff3b11..9ad6d05ebd 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowTestsBase.g.cs @@ -1181,10 +1181,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = VolumeFlow.FromCubicMetersPerSecond(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumePerLengthTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumePerLengthTestsBase.g.cs index 3e0ac5a5c9..9eff21be27 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumePerLengthTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumePerLengthTestsBase.g.cs @@ -446,10 +446,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = VolumePerLength.FromCubicMetersPerMeter(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeTestsBase.g.cs index 79ca9d4df8..55e7de73ac 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeTestsBase.g.cs @@ -1106,10 +1106,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = Volume.FromCubicMeters(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumetricHeatCapacityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumetricHeatCapacityTestsBase.g.cs index 6f391a97dd..6ec9034c39 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumetricHeatCapacityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumetricHeatCapacityTestsBase.g.cs @@ -396,8 +396,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 BTU/ft³·°F", new VolumetricHeatCapacity(1, VolumetricHeatCapacityUnit.BtuPerCubicFootDegreeFahrenheit).ToString()); Assert.Equal("1 cal/cm³·°C", new VolumetricHeatCapacity(1, VolumetricHeatCapacityUnit.CaloriePerCubicCentimeterDegreeCelsius).ToString()); @@ -411,7 +411,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -435,10 +435,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 J/m³·K", new VolumetricHeatCapacity(0.123456, VolumetricHeatCapacityUnit.JoulePerCubicMeterKelvin).ToString("s1")); Assert.Equal("0.12 J/m³·K", new VolumetricHeatCapacity(0.123456, VolumetricHeatCapacityUnit.JoulePerCubicMeterKelvin).ToString("s2")); Assert.Equal("0.123 J/m³·K", new VolumetricHeatCapacity(0.123456, VolumetricHeatCapacityUnit.JoulePerCubicMeterKelvin).ToString("s3")); @@ -446,7 +446,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -476,10 +476,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = VolumetricHeatCapacity.FromJoulesPerCubicMeterKelvin(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/WarpingMomentOfInertiaTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/WarpingMomentOfInertiaTestsBase.g.cs index 1dd7d407d5..3fc3a5c095 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/WarpingMomentOfInertiaTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/WarpingMomentOfInertiaTestsBase.g.cs @@ -357,8 +357,8 @@ public void BaseDimensionsShouldNeverBeNull() [Fact] public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { - var prevCulture = Thread.CurrentThread.CurrentUICulture; - Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); + var prevCulture = Thread.CurrentThread.CurrentCulture; + Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); try { Assert.Equal("1 cm⁶", new WarpingMomentOfInertia(1, WarpingMomentOfInertiaUnit.CentimeterToTheSixth).ToString()); Assert.Equal("1 dm⁶", new WarpingMomentOfInertia(1, WarpingMomentOfInertiaUnit.DecimeterToTheSixth).ToString()); @@ -369,7 +369,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -390,10 +390,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { - var oldCulture = CultureInfo.CurrentUICulture; + var oldCulture = CultureInfo.CurrentCulture; try { - CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; Assert.Equal("0.1 m⁶", new WarpingMomentOfInertia(0.123456, WarpingMomentOfInertiaUnit.MeterToTheSixth).ToString("s1")); Assert.Equal("0.12 m⁶", new WarpingMomentOfInertia(0.123456, WarpingMomentOfInertiaUnit.MeterToTheSixth).ToString("s2")); Assert.Equal("0.123 m⁶", new WarpingMomentOfInertia(0.123456, WarpingMomentOfInertiaUnit.MeterToTheSixth).ToString("s3")); @@ -401,7 +401,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -431,10 +431,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName) [Theory] [InlineData(null)] [InlineData("g")] - public void ToString_NullProvider_EqualsCurrentUICulture(string format) + public void ToString_NullProvider_EqualsCurrentCulture(string format) { var quantity = WarpingMomentOfInertia.FromMetersToTheSixth(1.0); - Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null)); + Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null)); } [Fact] diff --git a/UnitsNet.Tests/QuantityFormatterTests.cs b/UnitsNet.Tests/QuantityFormatterTests.cs index 1a4d2315eb..eab7fe8d29 100644 --- a/UnitsNet.Tests/QuantityFormatterTests.cs +++ b/UnitsNet.Tests/QuantityFormatterTests.cs @@ -109,10 +109,20 @@ public static void StandardNumericFormatStrings_Equals_ValueWithFormatStringAndA { var length = Length.FromMeters(123456789.987654321); - var expected = string.Format(CultureInfo.CurrentUICulture, $"{{0:{format}}} {{1:a}}", length.Value, length); + var expected = string.Format(CultureInfo.CurrentCulture, $"{{0:{format}}} {{1:a}}", length.Value, length); Assert.Equal(expected, QuantityFormatter.Format(length, format)); } + [Fact] + public static void StandardNumericFormatStringsAsPartOfLongerFormatStringsWork() + { + var length = Length.FromMeters(123.321); + + var expected = "The distance is 123.3 m"; + var actual = string.Format(CultureInfo.InvariantCulture, $"The distance is {length:F1}"); + Assert.Equal(expected, actual); + } + [Theory] [InlineData("000")] [InlineData("0.00")] @@ -133,7 +143,7 @@ public static void CustomNumericFormatStrings_Equals_ValueWithFormatStringAndAbb { var length = Length.FromMeters(123456789.987654321); - var expected = string.Format(CultureInfo.CurrentUICulture, $"{{0:{format}}} {{1:a}}", length.Value, length); + var expected = string.Format(CultureInfo.CurrentCulture, $"{{0:{format}}} {{1:a}}", length.Value, length); Assert.Equal(expected, QuantityFormatter.Format(length, format)); } } diff --git a/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs b/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs index 4cf7669aee..97a70387c1 100644 --- a/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs @@ -250,7 +250,7 @@ public static string GetAbbreviation(AccelerationUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(AccelerationUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -451,7 +451,7 @@ public static Acceleration Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static Acceleration Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -482,7 +482,7 @@ public static bool TryParse(string? str, out Acceleration result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out Acceleration result) { return QuantityParser.Default.TryParse( @@ -510,7 +510,7 @@ public static AccelerationUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -536,7 +536,7 @@ public static bool TryParseUnit(string str, out AccelerationUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out AccelerationUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -859,7 +859,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -867,21 +867,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs index 4817b1c6cc..9890bc0981 100644 --- a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs @@ -256,7 +256,7 @@ public static string GetAbbreviation(AmountOfSubstanceUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(AmountOfSubstanceUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -466,7 +466,7 @@ public static AmountOfSubstance Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static AmountOfSubstance Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -497,7 +497,7 @@ public static bool TryParse(string? str, out AmountOfSubstance result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out AmountOfSubstance result) { return QuantityParser.Default.TryParse( @@ -525,7 +525,7 @@ public static AmountOfSubstanceUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -551,7 +551,7 @@ public static bool TryParseUnit(string str, out AmountOfSubstanceUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out AmountOfSubstanceUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -876,7 +876,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -884,21 +884,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs b/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs index abd0f5404d..3f9097e645 100644 --- a/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs @@ -190,7 +190,7 @@ public static string GetAbbreviation(AmplitudeRatioUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(AmplitudeRatioUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -301,7 +301,7 @@ public static AmplitudeRatio Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static AmplitudeRatio Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -332,7 +332,7 @@ public static bool TryParse(string? str, out AmplitudeRatio result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out AmplitudeRatio result) { return QuantityParser.Default.TryParse( @@ -360,7 +360,7 @@ public static AmplitudeRatioUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -386,7 +386,7 @@ public static bool TryParseUnit(string str, out AmplitudeRatioUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out AmplitudeRatioUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -697,7 +697,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -705,21 +705,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/Angle.g.cs b/UnitsNet/GeneratedCode/Quantities/Angle.g.cs index 4b31f648e0..90d782401e 100644 --- a/UnitsNet/GeneratedCode/Quantities/Angle.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Angle.g.cs @@ -262,7 +262,7 @@ public static string GetAbbreviation(AngleUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(AngleUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -481,7 +481,7 @@ public static Angle Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static Angle Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -512,7 +512,7 @@ public static bool TryParse(string? str, out Angle result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out Angle result) { return QuantityParser.Default.TryParse( @@ -540,7 +540,7 @@ public static AngleUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -566,7 +566,7 @@ public static bool TryParseUnit(string str, out AngleUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out AngleUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -893,7 +893,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -901,21 +901,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs index fab3927c45..af34e41f09 100644 --- a/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs @@ -184,7 +184,7 @@ public static string GetAbbreviation(ApparentEnergyUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ApparentEnergyUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -286,7 +286,7 @@ public static ApparentEnergy Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static ApparentEnergy Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -317,7 +317,7 @@ public static bool TryParse(string? str, out ApparentEnergy result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out ApparentEnergy result) { return QuantityParser.Default.TryParse( @@ -345,7 +345,7 @@ public static ApparentEnergyUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -371,7 +371,7 @@ public static bool TryParseUnit(string str, out ApparentEnergyUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out ApparentEnergyUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -672,7 +672,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -680,21 +680,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs b/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs index d5946b9b40..00704d3077 100644 --- a/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs @@ -190,7 +190,7 @@ public static string GetAbbreviation(ApparentPowerUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ApparentPowerUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -301,7 +301,7 @@ public static ApparentPower Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static ApparentPower Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -332,7 +332,7 @@ public static bool TryParse(string? str, out ApparentPower result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out ApparentPower result) { return QuantityParser.Default.TryParse( @@ -360,7 +360,7 @@ public static ApparentPowerUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -386,7 +386,7 @@ public static bool TryParseUnit(string str, out ApparentPowerUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out ApparentPowerUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -689,7 +689,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -697,21 +697,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/Area.g.cs b/UnitsNet/GeneratedCode/Quantities/Area.g.cs index dc2c8b8c54..8726105ac7 100644 --- a/UnitsNet/GeneratedCode/Quantities/Area.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Area.g.cs @@ -250,7 +250,7 @@ public static string GetAbbreviation(AreaUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(AreaUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -451,7 +451,7 @@ public static Area Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static Area Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -482,7 +482,7 @@ public static bool TryParse(string? str, out Area result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out Area result) { return QuantityParser.Default.TryParse( @@ -510,7 +510,7 @@ public static AreaUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -536,7 +536,7 @@ public static bool TryParseUnit(string str, out AreaUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out AreaUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -859,7 +859,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -867,21 +867,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs index 08676f9b24..df417da1e7 100644 --- a/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs @@ -172,7 +172,7 @@ public static string GetAbbreviation(AreaDensityUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(AreaDensityUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -256,7 +256,7 @@ public static AreaDensity Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static AreaDensity Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -287,7 +287,7 @@ public static bool TryParse(string? str, out AreaDensity result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out AreaDensity result) { return QuantityParser.Default.TryParse( @@ -315,7 +315,7 @@ public static AreaDensityUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -341,7 +341,7 @@ public static bool TryParseUnit(string str, out AreaDensityUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out AreaDensityUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -638,7 +638,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -646,21 +646,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs index 8988e0ea3f..f709471cfa 100644 --- a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs @@ -202,7 +202,7 @@ public static string GetAbbreviation(AreaMomentOfInertiaUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(AreaMomentOfInertiaUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -331,7 +331,7 @@ public static AreaMomentOfInertia Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static AreaMomentOfInertia Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -362,7 +362,7 @@ public static bool TryParse(string? str, out AreaMomentOfInertia result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out AreaMomentOfInertia result) { return QuantityParser.Default.TryParse( @@ -390,7 +390,7 @@ public static AreaMomentOfInertiaUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -416,7 +416,7 @@ public static bool TryParseUnit(string str, out AreaMomentOfInertiaUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out AreaMomentOfInertiaUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -723,7 +723,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -731,21 +731,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs b/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs index 0145f75d03..c5960ed0b4 100644 --- a/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs @@ -330,7 +330,7 @@ public static string GetAbbreviation(BitRateUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(BitRateUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -639,7 +639,7 @@ public static BitRate Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static BitRate Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -670,7 +670,7 @@ public static bool TryParse(string? str, out BitRate result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out BitRate result) { return QuantityParser.Default.TryParse( @@ -698,7 +698,7 @@ public static BitRateUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -724,7 +724,7 @@ public static bool TryParseUnit(string str, out BitRateUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out BitRateUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -1071,7 +1071,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -1079,21 +1079,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs index d629a6d0c8..8c6945d91c 100644 --- a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs @@ -184,7 +184,7 @@ public static string GetAbbreviation(BrakeSpecificFuelConsumptionUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(BrakeSpecificFuelConsumptionUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -286,7 +286,7 @@ public static BrakeSpecificFuelConsumption Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static BrakeSpecificFuelConsumption Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -317,7 +317,7 @@ public static bool TryParse(string? str, out BrakeSpecificFuelConsumption result /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out BrakeSpecificFuelConsumption result) { return QuantityParser.Default.TryParse( @@ -345,7 +345,7 @@ public static BrakeSpecificFuelConsumptionUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -371,7 +371,7 @@ public static bool TryParseUnit(string str, out BrakeSpecificFuelConsumptionUnit /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out BrakeSpecificFuelConsumptionUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -672,7 +672,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -680,21 +680,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs b/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs index 2b679df00b..a8bce3fea6 100644 --- a/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs @@ -211,7 +211,7 @@ public static string GetAbbreviation(CapacitanceUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(CapacitanceUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -349,7 +349,7 @@ public static Capacitance Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static Capacitance Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -380,7 +380,7 @@ public static bool TryParse(string? str, out Capacitance result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out Capacitance result) { return QuantityParser.Default.TryParse( @@ -408,7 +408,7 @@ public static CapacitanceUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -434,7 +434,7 @@ public static bool TryParseUnit(string str, out CapacitanceUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out CapacitanceUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -743,7 +743,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -751,21 +751,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs b/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs index 6ed9d5bb01..462f9b5a2c 100644 --- a/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs @@ -184,7 +184,7 @@ public static string GetAbbreviation(CoefficientOfThermalExpansionUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(CoefficientOfThermalExpansionUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -286,7 +286,7 @@ public static CoefficientOfThermalExpansion Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static CoefficientOfThermalExpansion Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -317,7 +317,7 @@ public static bool TryParse(string? str, out CoefficientOfThermalExpansion resul /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out CoefficientOfThermalExpansion result) { return QuantityParser.Default.TryParse( @@ -345,7 +345,7 @@ public static CoefficientOfThermalExpansionUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -371,7 +371,7 @@ public static bool TryParseUnit(string str, out CoefficientOfThermalExpansionUni /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out CoefficientOfThermalExpansionUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -672,7 +672,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -680,21 +680,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/Density.g.cs b/UnitsNet/GeneratedCode/Quantities/Density.g.cs index 2eba18042d..15297d870d 100644 --- a/UnitsNet/GeneratedCode/Quantities/Density.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Density.g.cs @@ -409,7 +409,7 @@ public static string GetAbbreviation(DensityUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(DensityUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -844,7 +844,7 @@ public static Density Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static Density Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -875,7 +875,7 @@ public static bool TryParse(string? str, out Density result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out Density result) { return QuantityParser.Default.TryParse( @@ -903,7 +903,7 @@ public static DensityUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -929,7 +929,7 @@ public static bool TryParseUnit(string str, out DensityUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out DensityUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -1304,7 +1304,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -1312,21 +1312,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/Duration.g.cs b/UnitsNet/GeneratedCode/Quantities/Duration.g.cs index 552a0af9cc..c84c7bb4d0 100644 --- a/UnitsNet/GeneratedCode/Quantities/Duration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Duration.g.cs @@ -226,7 +226,7 @@ public static string GetAbbreviation(DurationUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(DurationUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -391,7 +391,7 @@ public static Duration Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static Duration Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -422,7 +422,7 @@ public static bool TryParse(string? str, out Duration result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out Duration result) { return QuantityParser.Default.TryParse( @@ -450,7 +450,7 @@ public static DurationUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -476,7 +476,7 @@ public static bool TryParseUnit(string str, out DurationUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out DurationUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -791,7 +791,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -799,21 +799,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs index 1a473fb753..50da1af660 100644 --- a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs @@ -229,7 +229,7 @@ public static string GetAbbreviation(DynamicViscosityUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(DynamicViscosityUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -394,7 +394,7 @@ public static DynamicViscosity Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static DynamicViscosity Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -425,7 +425,7 @@ public static bool TryParse(string? str, out DynamicViscosity result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out DynamicViscosity result) { return QuantityParser.Default.TryParse( @@ -453,7 +453,7 @@ public static DynamicViscosityUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -479,7 +479,7 @@ public static bool TryParseUnit(string str, out DynamicViscosityUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out DynamicViscosityUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -794,7 +794,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -802,21 +802,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs index 8da7483e95..e8778623b6 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs @@ -190,7 +190,7 @@ public static string GetAbbreviation(ElectricAdmittanceUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricAdmittanceUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -301,7 +301,7 @@ public static ElectricAdmittance Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static ElectricAdmittance Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -332,7 +332,7 @@ public static bool TryParse(string? str, out ElectricAdmittance result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out ElectricAdmittance result) { return QuantityParser.Default.TryParse( @@ -360,7 +360,7 @@ public static ElectricAdmittanceUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -386,7 +386,7 @@ public static bool TryParseUnit(string str, out ElectricAdmittanceUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out ElectricAdmittanceUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -689,7 +689,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -697,21 +697,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs index 7ff03984f0..f353ec9463 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs @@ -199,7 +199,7 @@ public static string GetAbbreviation(ElectricChargeUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricChargeUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -319,7 +319,7 @@ public static ElectricCharge Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static ElectricCharge Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -350,7 +350,7 @@ public static bool TryParse(string? str, out ElectricCharge result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out ElectricCharge result) { return QuantityParser.Default.TryParse( @@ -378,7 +378,7 @@ public static ElectricChargeUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -404,7 +404,7 @@ public static bool TryParseUnit(string str, out ElectricChargeUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out ElectricChargeUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -709,7 +709,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -717,21 +717,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs index 98c63cdd7d..46a401a30f 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs @@ -175,7 +175,7 @@ public static string GetAbbreviation(ElectricChargeDensityUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricChargeDensityUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -259,7 +259,7 @@ public static ElectricChargeDensity Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static ElectricChargeDensity Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -290,7 +290,7 @@ public static bool TryParse(string? str, out ElectricChargeDensity result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out ElectricChargeDensity result) { return QuantityParser.Default.TryParse( @@ -318,7 +318,7 @@ public static ElectricChargeDensityUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -344,7 +344,7 @@ public static bool TryParseUnit(string str, out ElectricChargeDensityUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out ElectricChargeDensityUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -641,7 +641,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -649,21 +649,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs index b8fc5e194b..e4b9c97be1 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs @@ -187,7 +187,7 @@ public static string GetAbbreviation(ElectricConductanceUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricConductanceUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -289,7 +289,7 @@ public static ElectricConductance Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static ElectricConductance Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -320,7 +320,7 @@ public static bool TryParse(string? str, out ElectricConductance result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out ElectricConductance result) { return QuantityParser.Default.TryParse( @@ -348,7 +348,7 @@ public static ElectricConductanceUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -374,7 +374,7 @@ public static bool TryParseUnit(string str, out ElectricConductanceUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out ElectricConductanceUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -675,7 +675,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -683,21 +683,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs index 401c08a2bd..05d6597879 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs @@ -187,7 +187,7 @@ public static string GetAbbreviation(ElectricConductivityUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricConductivityUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -289,7 +289,7 @@ public static ElectricConductivity Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static ElectricConductivity Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -320,7 +320,7 @@ public static bool TryParse(string? str, out ElectricConductivity result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out ElectricConductivity result) { return QuantityParser.Default.TryParse( @@ -348,7 +348,7 @@ public static ElectricConductivityUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -374,7 +374,7 @@ public static bool TryParseUnit(string str, out ElectricConductivityUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out ElectricConductivityUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -675,7 +675,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -683,21 +683,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs index 083134c22e..79168272f3 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs @@ -214,7 +214,7 @@ public static string GetAbbreviation(ElectricCurrentUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricCurrentUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -361,7 +361,7 @@ public static ElectricCurrent Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static ElectricCurrent Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -392,7 +392,7 @@ public static bool TryParse(string? str, out ElectricCurrent result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out ElectricCurrent result) { return QuantityParser.Default.TryParse( @@ -420,7 +420,7 @@ public static ElectricCurrentUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -446,7 +446,7 @@ public static bool TryParseUnit(string str, out ElectricCurrentUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out ElectricCurrentUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -757,7 +757,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -765,21 +765,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs index 95f6b63a91..3f19fdd22b 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs @@ -187,7 +187,7 @@ public static string GetAbbreviation(ElectricCurrentDensityUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricCurrentDensityUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -289,7 +289,7 @@ public static ElectricCurrentDensity Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static ElectricCurrentDensity Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -320,7 +320,7 @@ public static bool TryParse(string? str, out ElectricCurrentDensity result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out ElectricCurrentDensity result) { return QuantityParser.Default.TryParse( @@ -348,7 +348,7 @@ public static ElectricCurrentDensityUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -374,7 +374,7 @@ public static bool TryParseUnit(string str, out ElectricCurrentDensityUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out ElectricCurrentDensityUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -675,7 +675,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -683,21 +683,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs index dae6d42e34..bfcd86362f 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs @@ -190,7 +190,7 @@ public static string GetAbbreviation(ElectricCurrentGradientUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricCurrentGradientUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -301,7 +301,7 @@ public static ElectricCurrentGradient Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static ElectricCurrentGradient Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -332,7 +332,7 @@ public static bool TryParse(string? str, out ElectricCurrentGradient result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out ElectricCurrentGradient result) { return QuantityParser.Default.TryParse( @@ -360,7 +360,7 @@ public static ElectricCurrentGradientUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -386,7 +386,7 @@ public static bool TryParseUnit(string str, out ElectricCurrentGradientUnit unit /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out ElectricCurrentGradientUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -689,7 +689,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -697,21 +697,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs index ffbae6bd46..9790fff6cc 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs @@ -175,7 +175,7 @@ public static string GetAbbreviation(ElectricFieldUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricFieldUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -259,7 +259,7 @@ public static ElectricField Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static ElectricField Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -290,7 +290,7 @@ public static bool TryParse(string? str, out ElectricField result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out ElectricField result) { return QuantityParser.Default.TryParse( @@ -318,7 +318,7 @@ public static ElectricFieldUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -344,7 +344,7 @@ public static bool TryParseUnit(string str, out ElectricFieldUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out ElectricFieldUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -641,7 +641,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -649,21 +649,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs index 1807c84eca..f91f2c6d0e 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs @@ -193,7 +193,7 @@ public static string GetAbbreviation(ElectricInductanceUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricInductanceUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -304,7 +304,7 @@ public static ElectricInductance Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static ElectricInductance Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -335,7 +335,7 @@ public static bool TryParse(string? str, out ElectricInductance result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out ElectricInductance result) { return QuantityParser.Default.TryParse( @@ -363,7 +363,7 @@ public static ElectricInductanceUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -389,7 +389,7 @@ public static bool TryParseUnit(string str, out ElectricInductanceUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out ElectricInductanceUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -692,7 +692,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -700,21 +700,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs index b9dcb6de63..b85de59b90 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs @@ -196,7 +196,7 @@ public static string GetAbbreviation(ElectricPotentialUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricPotentialUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -316,7 +316,7 @@ public static ElectricPotential Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static ElectricPotential Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -347,7 +347,7 @@ public static bool TryParse(string? str, out ElectricPotential result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out ElectricPotential result) { return QuantityParser.Default.TryParse( @@ -375,7 +375,7 @@ public static ElectricPotentialUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -401,7 +401,7 @@ public static bool TryParseUnit(string str, out ElectricPotentialUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out ElectricPotentialUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -706,7 +706,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -714,21 +714,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs index b338331dac..38d9c099e6 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs @@ -196,7 +196,7 @@ public static string GetAbbreviation(ElectricPotentialAcUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricPotentialAcUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -316,7 +316,7 @@ public static ElectricPotentialAc Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static ElectricPotentialAc Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -347,7 +347,7 @@ public static bool TryParse(string? str, out ElectricPotentialAc result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out ElectricPotentialAc result) { return QuantityParser.Default.TryParse( @@ -375,7 +375,7 @@ public static ElectricPotentialAcUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -401,7 +401,7 @@ public static bool TryParseUnit(string str, out ElectricPotentialAcUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out ElectricPotentialAcUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -706,7 +706,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -714,21 +714,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs index 32236cf3ad..d47ba88419 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs @@ -286,7 +286,7 @@ public static string GetAbbreviation(ElectricPotentialChangeRateUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricPotentialChangeRateUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -541,7 +541,7 @@ public static ElectricPotentialChangeRate Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static ElectricPotentialChangeRate Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -572,7 +572,7 @@ public static bool TryParse(string? str, out ElectricPotentialChangeRate result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out ElectricPotentialChangeRate result) { return QuantityParser.Default.TryParse( @@ -600,7 +600,7 @@ public static ElectricPotentialChangeRateUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -626,7 +626,7 @@ public static bool TryParseUnit(string str, out ElectricPotentialChangeRateUnit /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out ElectricPotentialChangeRateUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -961,7 +961,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -969,21 +969,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs index 34ba2e57ba..abef170f68 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs @@ -196,7 +196,7 @@ public static string GetAbbreviation(ElectricPotentialDcUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricPotentialDcUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -316,7 +316,7 @@ public static ElectricPotentialDc Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static ElectricPotentialDc Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -347,7 +347,7 @@ public static bool TryParse(string? str, out ElectricPotentialDc result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out ElectricPotentialDc result) { return QuantityParser.Default.TryParse( @@ -375,7 +375,7 @@ public static ElectricPotentialDcUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -401,7 +401,7 @@ public static bool TryParseUnit(string str, out ElectricPotentialDcUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out ElectricPotentialDcUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -706,7 +706,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -714,21 +714,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs index d38168a582..c4a6b3c4b5 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs @@ -202,7 +202,7 @@ public static string GetAbbreviation(ElectricResistanceUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricResistanceUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -331,7 +331,7 @@ public static ElectricResistance Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static ElectricResistance Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -362,7 +362,7 @@ public static bool TryParse(string? str, out ElectricResistance result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out ElectricResistance result) { return QuantityParser.Default.TryParse( @@ -390,7 +390,7 @@ public static ElectricResistanceUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -416,7 +416,7 @@ public static bool TryParseUnit(string str, out ElectricResistanceUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out ElectricResistanceUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -723,7 +723,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -731,21 +731,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs index e6ff4a0d6a..d86e867757 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs @@ -253,7 +253,7 @@ public static string GetAbbreviation(ElectricResistivityUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricResistivityUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -454,7 +454,7 @@ public static ElectricResistivity Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static ElectricResistivity Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -485,7 +485,7 @@ public static bool TryParse(string? str, out ElectricResistivity result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out ElectricResistivity result) { return QuantityParser.Default.TryParse( @@ -513,7 +513,7 @@ public static ElectricResistivityUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -539,7 +539,7 @@ public static bool TryParseUnit(string str, out ElectricResistivityUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out ElectricResistivityUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -862,7 +862,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -870,21 +870,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs index a9ebb08d7d..c26ff1436b 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs @@ -187,7 +187,7 @@ public static string GetAbbreviation(ElectricSurfaceChargeDensityUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ElectricSurfaceChargeDensityUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -289,7 +289,7 @@ public static ElectricSurfaceChargeDensity Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static ElectricSurfaceChargeDensity Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -320,7 +320,7 @@ public static bool TryParse(string? str, out ElectricSurfaceChargeDensity result /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out ElectricSurfaceChargeDensity result) { return QuantityParser.Default.TryParse( @@ -348,7 +348,7 @@ public static ElectricSurfaceChargeDensityUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -374,7 +374,7 @@ public static bool TryParseUnit(string str, out ElectricSurfaceChargeDensityUnit /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out ElectricSurfaceChargeDensityUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -675,7 +675,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -683,21 +683,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/Energy.g.cs b/UnitsNet/GeneratedCode/Quantities/Energy.g.cs index b6320a6c03..92887675fa 100644 --- a/UnitsNet/GeneratedCode/Quantities/Energy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Energy.g.cs @@ -382,7 +382,7 @@ public static string GetAbbreviation(EnergyUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(EnergyUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -781,7 +781,7 @@ public static Energy Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static Energy Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -812,7 +812,7 @@ public static bool TryParse(string? str, out Energy result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out Energy result) { return QuantityParser.Default.TryParse( @@ -840,7 +840,7 @@ public static EnergyUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -866,7 +866,7 @@ public static bool TryParseUnit(string str, out EnergyUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out EnergyUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -1233,7 +1233,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -1241,21 +1241,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs b/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs index 6c505ed4aa..13fa637270 100644 --- a/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs @@ -208,7 +208,7 @@ public static string GetAbbreviation(EntropyUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(EntropyUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -346,7 +346,7 @@ public static Entropy Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static Entropy Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -377,7 +377,7 @@ public static bool TryParse(string? str, out Entropy result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out Entropy result) { return QuantityParser.Default.TryParse( @@ -405,7 +405,7 @@ public static EntropyUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -431,7 +431,7 @@ public static bool TryParseUnit(string str, out EntropyUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out EntropyUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -740,7 +740,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -748,21 +748,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/Force.g.cs b/UnitsNet/GeneratedCode/Quantities/Force.g.cs index 22bde314f0..a5a67f7e93 100644 --- a/UnitsNet/GeneratedCode/Quantities/Force.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Force.g.cs @@ -256,7 +256,7 @@ public static string GetAbbreviation(ForceUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ForceUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -466,7 +466,7 @@ public static Force Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static Force Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -497,7 +497,7 @@ public static bool TryParse(string? str, out Force result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out Force result) { return QuantityParser.Default.TryParse( @@ -525,7 +525,7 @@ public static ForceUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -551,7 +551,7 @@ public static bool TryParseUnit(string str, out ForceUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out ForceUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -876,7 +876,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -884,21 +884,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs index 70de0f89be..47d360eb4c 100644 --- a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs @@ -256,7 +256,7 @@ public static string GetAbbreviation(ForceChangeRateUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ForceChangeRateUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -466,7 +466,7 @@ public static ForceChangeRate Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static ForceChangeRate Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -497,7 +497,7 @@ public static bool TryParse(string? str, out ForceChangeRate result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out ForceChangeRate result) { return QuantityParser.Default.TryParse( @@ -525,7 +525,7 @@ public static ForceChangeRateUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -551,7 +551,7 @@ public static bool TryParseUnit(string str, out ForceChangeRateUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out ForceChangeRateUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -876,7 +876,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -884,21 +884,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs index f51ae7e407..b06632f34d 100644 --- a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs @@ -394,7 +394,7 @@ public static string GetAbbreviation(ForcePerLengthUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ForcePerLengthUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -811,7 +811,7 @@ public static ForcePerLength Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static ForcePerLength Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -842,7 +842,7 @@ public static bool TryParse(string? str, out ForcePerLength result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out ForcePerLength result) { return QuantityParser.Default.TryParse( @@ -870,7 +870,7 @@ public static ForcePerLengthUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -896,7 +896,7 @@ public static bool TryParseUnit(string str, out ForcePerLengthUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out ForcePerLengthUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -1267,7 +1267,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -1275,21 +1275,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs b/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs index ee20a59776..0c5fdff5d5 100644 --- a/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs @@ -232,7 +232,7 @@ public static string GetAbbreviation(FrequencyUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(FrequencyUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -406,7 +406,7 @@ public static Frequency Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static Frequency Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -437,7 +437,7 @@ public static bool TryParse(string? str, out Frequency result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out Frequency result) { return QuantityParser.Default.TryParse( @@ -465,7 +465,7 @@ public static FrequencyUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -491,7 +491,7 @@ public static bool TryParseUnit(string str, out FrequencyUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out FrequencyUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -808,7 +808,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -816,21 +816,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs b/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs index b1f6bc1ff1..c6363b09fa 100644 --- a/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs @@ -193,7 +193,7 @@ public static string GetAbbreviation(FuelEfficiencyUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(FuelEfficiencyUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -304,7 +304,7 @@ public static FuelEfficiency Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static FuelEfficiency Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -335,7 +335,7 @@ public static bool TryParse(string? str, out FuelEfficiency result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out FuelEfficiency result) { return QuantityParser.Default.TryParse( @@ -363,7 +363,7 @@ public static FuelEfficiencyUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -389,7 +389,7 @@ public static bool TryParseUnit(string str, out FuelEfficiencyUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out FuelEfficiencyUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -692,7 +692,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -700,21 +700,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs index 0fc224be8f..e32423863b 100644 --- a/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs @@ -274,7 +274,7 @@ public static string GetAbbreviation(HeatFluxUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(HeatFluxUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -511,7 +511,7 @@ public static HeatFlux Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static HeatFlux Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -542,7 +542,7 @@ public static bool TryParse(string? str, out HeatFlux result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out HeatFlux result) { return QuantityParser.Default.TryParse( @@ -570,7 +570,7 @@ public static HeatFluxUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -596,7 +596,7 @@ public static bool TryParseUnit(string str, out HeatFluxUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out HeatFluxUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -927,7 +927,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -935,21 +935,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs index 30287b7a69..3740a28047 100644 --- a/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs @@ -184,7 +184,7 @@ public static string GetAbbreviation(HeatTransferCoefficientUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(HeatTransferCoefficientUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -286,7 +286,7 @@ public static HeatTransferCoefficient Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static HeatTransferCoefficient Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -317,7 +317,7 @@ public static bool TryParse(string? str, out HeatTransferCoefficient result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out HeatTransferCoefficient result) { return QuantityParser.Default.TryParse( @@ -345,7 +345,7 @@ public static HeatTransferCoefficientUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -371,7 +371,7 @@ public static bool TryParseUnit(string str, out HeatTransferCoefficientUnit unit /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out HeatTransferCoefficientUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -672,7 +672,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -680,21 +680,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs b/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs index 7d9e3b5411..930e98dda5 100644 --- a/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs @@ -193,7 +193,7 @@ public static string GetAbbreviation(IlluminanceUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(IlluminanceUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -304,7 +304,7 @@ public static Illuminance Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static Illuminance Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -335,7 +335,7 @@ public static bool TryParse(string? str, out Illuminance result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out Illuminance result) { return QuantityParser.Default.TryParse( @@ -363,7 +363,7 @@ public static IlluminanceUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -389,7 +389,7 @@ public static bool TryParseUnit(string str, out IlluminanceUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out IlluminanceUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -692,7 +692,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -700,21 +700,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/Information.g.cs b/UnitsNet/GeneratedCode/Quantities/Information.g.cs index c3c9d8e7c8..9399dc0f41 100644 --- a/UnitsNet/GeneratedCode/Quantities/Information.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Information.g.cs @@ -327,7 +327,7 @@ public static string GetAbbreviation(InformationUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(InformationUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -636,7 +636,7 @@ public static Information Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static Information Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -667,7 +667,7 @@ public static bool TryParse(string? str, out Information result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out Information result) { return QuantityParser.Default.TryParse( @@ -695,7 +695,7 @@ public static InformationUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -721,7 +721,7 @@ public static bool TryParseUnit(string str, out InformationUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out InformationUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -1068,7 +1068,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -1076,21 +1076,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs b/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs index 9e54df430a..b7cc9cfab6 100644 --- a/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs @@ -250,7 +250,7 @@ public static string GetAbbreviation(IrradianceUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(IrradianceUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -451,7 +451,7 @@ public static Irradiance Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static Irradiance Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -482,7 +482,7 @@ public static bool TryParse(string? str, out Irradiance result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out Irradiance result) { return QuantityParser.Default.TryParse( @@ -510,7 +510,7 @@ public static IrradianceUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -536,7 +536,7 @@ public static bool TryParseUnit(string str, out IrradianceUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out IrradianceUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -859,7 +859,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -867,21 +867,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs b/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs index b767a82648..ce54e68df0 100644 --- a/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs @@ -211,7 +211,7 @@ public static string GetAbbreviation(IrradiationUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(IrradiationUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -349,7 +349,7 @@ public static Irradiation Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static Irradiation Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -380,7 +380,7 @@ public static bool TryParse(string? str, out Irradiation result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out Irradiation result) { return QuantityParser.Default.TryParse( @@ -408,7 +408,7 @@ public static IrradiationUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -434,7 +434,7 @@ public static bool TryParseUnit(string str, out IrradiationUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out IrradiationUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -743,7 +743,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -751,21 +751,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs index 461d4b30be..ff5ce17908 100644 --- a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs @@ -223,7 +223,7 @@ public static string GetAbbreviation(KinematicViscosityUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(KinematicViscosityUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -379,7 +379,7 @@ public static KinematicViscosity Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static KinematicViscosity Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -410,7 +410,7 @@ public static bool TryParse(string? str, out KinematicViscosity result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out KinematicViscosity result) { return QuantityParser.Default.TryParse( @@ -438,7 +438,7 @@ public static KinematicViscosityUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -464,7 +464,7 @@ public static bool TryParseUnit(string str, out KinematicViscosityUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out KinematicViscosityUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -777,7 +777,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -785,21 +785,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/LapseRate.g.cs b/UnitsNet/GeneratedCode/Quantities/LapseRate.g.cs index d9014c6a68..cfa6517177 100644 --- a/UnitsNet/GeneratedCode/Quantities/LapseRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LapseRate.g.cs @@ -172,7 +172,7 @@ public static string GetAbbreviation(LapseRateUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(LapseRateUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -256,7 +256,7 @@ public static LapseRate Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static LapseRate Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -287,7 +287,7 @@ public static bool TryParse(string? str, out LapseRate result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out LapseRate result) { return QuantityParser.Default.TryParse( @@ -315,7 +315,7 @@ public static LapseRateUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -341,7 +341,7 @@ public static bool TryParseUnit(string str, out LapseRateUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out LapseRateUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -638,7 +638,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -646,21 +646,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/Length.g.cs b/UnitsNet/GeneratedCode/Quantities/Length.g.cs index 0d520d132f..a2d49b9039 100644 --- a/UnitsNet/GeneratedCode/Quantities/Length.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Length.g.cs @@ -364,7 +364,7 @@ public static string GetAbbreviation(LengthUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(LengthUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -736,7 +736,7 @@ public static Length Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static Length Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -767,7 +767,7 @@ public static bool TryParse(string? str, out Length result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out Length result) { return QuantityParser.Default.TryParse( @@ -795,7 +795,7 @@ public static LengthUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -821,7 +821,7 @@ public static bool TryParseUnit(string str, out LengthUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out LengthUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -1182,7 +1182,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -1190,21 +1190,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/Level.g.cs b/UnitsNet/GeneratedCode/Quantities/Level.g.cs index dde9e64bfd..b74d165689 100644 --- a/UnitsNet/GeneratedCode/Quantities/Level.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Level.g.cs @@ -178,7 +178,7 @@ public static string GetAbbreviation(LevelUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(LevelUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -271,7 +271,7 @@ public static Level Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static Level Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -302,7 +302,7 @@ public static bool TryParse(string? str, out Level result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out Level result) { return QuantityParser.Default.TryParse( @@ -330,7 +330,7 @@ public static LevelUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -356,7 +356,7 @@ public static bool TryParseUnit(string str, out LevelUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out LevelUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -663,7 +663,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -671,21 +671,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs index 49b0c4ab6f..e6419b21e0 100644 --- a/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs @@ -253,7 +253,7 @@ public static string GetAbbreviation(LinearDensityUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(LinearDensityUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -454,7 +454,7 @@ public static LinearDensity Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static LinearDensity Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -485,7 +485,7 @@ public static bool TryParse(string? str, out LinearDensity result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out LinearDensity result) { return QuantityParser.Default.TryParse( @@ -513,7 +513,7 @@ public static LinearDensityUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -539,7 +539,7 @@ public static bool TryParseUnit(string str, out LinearDensityUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out LinearDensityUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -862,7 +862,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -870,21 +870,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs index c000a43216..7cf6a255dc 100644 --- a/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs @@ -319,7 +319,7 @@ public static string GetAbbreviation(LinearPowerDensityUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(LinearPowerDensityUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -619,7 +619,7 @@ public static LinearPowerDensity Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static LinearPowerDensity Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -650,7 +650,7 @@ public static bool TryParse(string? str, out LinearPowerDensity result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out LinearPowerDensity result) { return QuantityParser.Default.TryParse( @@ -678,7 +678,7 @@ public static LinearPowerDensityUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -704,7 +704,7 @@ public static bool TryParseUnit(string str, out LinearPowerDensityUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out LinearPowerDensityUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -1049,7 +1049,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -1057,21 +1057,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs b/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs index f8e5e51c4a..156af02864 100644 --- a/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs @@ -253,7 +253,7 @@ public static string GetAbbreviation(LuminosityUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(LuminosityUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -454,7 +454,7 @@ public static Luminosity Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static Luminosity Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -485,7 +485,7 @@ public static bool TryParse(string? str, out Luminosity result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out Luminosity result) { return QuantityParser.Default.TryParse( @@ -513,7 +513,7 @@ public static LuminosityUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -539,7 +539,7 @@ public static bool TryParseUnit(string str, out LuminosityUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out LuminosityUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -862,7 +862,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -870,21 +870,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs index 8a9fc756df..3cda60672f 100644 --- a/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs @@ -175,7 +175,7 @@ public static string GetAbbreviation(LuminousFluxUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(LuminousFluxUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -259,7 +259,7 @@ public static LuminousFlux Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static LuminousFlux Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -290,7 +290,7 @@ public static bool TryParse(string? str, out LuminousFlux result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out LuminousFlux result) { return QuantityParser.Default.TryParse( @@ -318,7 +318,7 @@ public static LuminousFluxUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -344,7 +344,7 @@ public static bool TryParseUnit(string str, out LuminousFluxUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out LuminousFluxUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -641,7 +641,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -649,21 +649,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs b/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs index d47ec9da54..a6e45285b5 100644 --- a/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs @@ -175,7 +175,7 @@ public static string GetAbbreviation(LuminousIntensityUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(LuminousIntensityUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -259,7 +259,7 @@ public static LuminousIntensity Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static LuminousIntensity Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -290,7 +290,7 @@ public static bool TryParse(string? str, out LuminousIntensity result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out LuminousIntensity result) { return QuantityParser.Default.TryParse( @@ -318,7 +318,7 @@ public static LuminousIntensityUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -344,7 +344,7 @@ public static bool TryParseUnit(string str, out LuminousIntensityUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out LuminousIntensityUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -641,7 +641,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -649,21 +649,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs b/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs index d44f209794..a52dfe861d 100644 --- a/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs @@ -205,7 +205,7 @@ public static string GetAbbreviation(MagneticFieldUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(MagneticFieldUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -334,7 +334,7 @@ public static MagneticField Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static MagneticField Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -365,7 +365,7 @@ public static bool TryParse(string? str, out MagneticField result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out MagneticField result) { return QuantityParser.Default.TryParse( @@ -393,7 +393,7 @@ public static MagneticFieldUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -419,7 +419,7 @@ public static bool TryParseUnit(string str, out MagneticFieldUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out MagneticFieldUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -726,7 +726,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -734,21 +734,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs index 0b0326fd95..c7a0dea6a4 100644 --- a/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs @@ -175,7 +175,7 @@ public static string GetAbbreviation(MagneticFluxUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(MagneticFluxUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -259,7 +259,7 @@ public static MagneticFlux Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static MagneticFlux Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -290,7 +290,7 @@ public static bool TryParse(string? str, out MagneticFlux result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out MagneticFlux result) { return QuantityParser.Default.TryParse( @@ -318,7 +318,7 @@ public static MagneticFluxUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -344,7 +344,7 @@ public static bool TryParseUnit(string str, out MagneticFluxUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out MagneticFluxUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -641,7 +641,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -649,21 +649,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs b/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs index 5a4be0fba2..905204d465 100644 --- a/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs @@ -175,7 +175,7 @@ public static string GetAbbreviation(MagnetizationUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(MagnetizationUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -259,7 +259,7 @@ public static Magnetization Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static Magnetization Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -290,7 +290,7 @@ public static bool TryParse(string? str, out Magnetization result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out Magnetization result) { return QuantityParser.Default.TryParse( @@ -318,7 +318,7 @@ public static MagnetizationUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -344,7 +344,7 @@ public static bool TryParseUnit(string str, out MagnetizationUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out MagnetizationUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -641,7 +641,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -649,21 +649,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/Mass.g.cs b/UnitsNet/GeneratedCode/Quantities/Mass.g.cs index ac27f16599..116ec458f6 100644 --- a/UnitsNet/GeneratedCode/Quantities/Mass.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Mass.g.cs @@ -316,7 +316,7 @@ public static string GetAbbreviation(MassUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(MassUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -616,7 +616,7 @@ public static Mass Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static Mass Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -647,7 +647,7 @@ public static bool TryParse(string? str, out Mass result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out Mass result) { return QuantityParser.Default.TryParse( @@ -675,7 +675,7 @@ public static MassUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -701,7 +701,7 @@ public static bool TryParseUnit(string str, out MassUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out MassUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -1046,7 +1046,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -1054,21 +1054,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs b/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs index 632b14de38..7131eac808 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs @@ -463,7 +463,7 @@ public static string GetAbbreviation(MassConcentrationUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(MassConcentrationUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -979,7 +979,7 @@ public static MassConcentration Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static MassConcentration Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -1010,7 +1010,7 @@ public static bool TryParse(string? str, out MassConcentration result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out MassConcentration result) { return QuantityParser.Default.TryParse( @@ -1038,7 +1038,7 @@ public static MassConcentrationUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -1064,7 +1064,7 @@ public static bool TryParseUnit(string str, out MassConcentrationUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out MassConcentrationUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -1457,7 +1457,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -1465,21 +1465,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs index d7609a3487..523ddac416 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs @@ -364,7 +364,7 @@ public static string GetAbbreviation(MassFlowUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(MassFlowUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -736,7 +736,7 @@ public static MassFlow Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static MassFlow Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -767,7 +767,7 @@ public static bool TryParse(string? str, out MassFlow result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out MassFlow result) { return QuantityParser.Default.TryParse( @@ -795,7 +795,7 @@ public static MassFlowUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -821,7 +821,7 @@ public static bool TryParseUnit(string str, out MassFlowUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out MassFlowUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -1182,7 +1182,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -1190,21 +1190,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs index 1a297392bd..ce56bbf12c 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs @@ -238,7 +238,7 @@ public static string GetAbbreviation(MassFluxUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(MassFluxUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -421,7 +421,7 @@ public static MassFlux Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static MassFlux Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -452,7 +452,7 @@ public static bool TryParse(string? str, out MassFlux result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out MassFlux result) { return QuantityParser.Default.TryParse( @@ -480,7 +480,7 @@ public static MassFluxUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -506,7 +506,7 @@ public static bool TryParseUnit(string str, out MassFluxUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out MassFluxUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -825,7 +825,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -833,21 +833,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs index 9334406a91..21a503ca61 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs @@ -313,7 +313,7 @@ public static string GetAbbreviation(MassFractionUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(MassFractionUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -604,7 +604,7 @@ public static MassFraction Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static MassFraction Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -635,7 +635,7 @@ public static bool TryParse(string? str, out MassFraction result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out MassFraction result) { return QuantityParser.Default.TryParse( @@ -663,7 +663,7 @@ public static MassFractionUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -689,7 +689,7 @@ public static bool TryParseUnit(string str, out MassFractionUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out MassFractionUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -1032,7 +1032,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -1040,21 +1040,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs b/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs index 84a62383f2..48c655db4c 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs @@ -334,7 +334,7 @@ public static string GetAbbreviation(MassMomentOfInertiaUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(MassMomentOfInertiaUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -661,7 +661,7 @@ public static MassMomentOfInertia Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static MassMomentOfInertia Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -692,7 +692,7 @@ public static bool TryParse(string? str, out MassMomentOfInertia result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out MassMomentOfInertia result) { return QuantityParser.Default.TryParse( @@ -720,7 +720,7 @@ public static MassMomentOfInertiaUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -746,7 +746,7 @@ public static bool TryParseUnit(string str, out MassMomentOfInertiaUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out MassMomentOfInertiaUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -1097,7 +1097,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -1105,21 +1105,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs index cc87c5b14c..61e0bedd83 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs @@ -184,7 +184,7 @@ public static string GetAbbreviation(MolarEnergyUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(MolarEnergyUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -286,7 +286,7 @@ public static MolarEnergy Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static MolarEnergy Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -317,7 +317,7 @@ public static bool TryParse(string? str, out MolarEnergy result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out MolarEnergy result) { return QuantityParser.Default.TryParse( @@ -345,7 +345,7 @@ public static MolarEnergyUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -371,7 +371,7 @@ public static bool TryParseUnit(string str, out MolarEnergyUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out MolarEnergyUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -672,7 +672,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -680,21 +680,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs index 4db75c4f9f..dafec903b4 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs @@ -184,7 +184,7 @@ public static string GetAbbreviation(MolarEntropyUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(MolarEntropyUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -286,7 +286,7 @@ public static MolarEntropy Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static MolarEntropy Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -317,7 +317,7 @@ public static bool TryParse(string? str, out MolarEntropy result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out MolarEntropy result) { return QuantityParser.Default.TryParse( @@ -345,7 +345,7 @@ public static MolarEntropyUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -371,7 +371,7 @@ public static bool TryParseUnit(string str, out MolarEntropyUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out MolarEntropyUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -672,7 +672,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -680,21 +680,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs index ebcf76fc23..0ba3fa3517 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs @@ -238,7 +238,7 @@ public static string GetAbbreviation(MolarMassUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(MolarMassUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -421,7 +421,7 @@ public static MolarMass Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static MolarMass Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -452,7 +452,7 @@ public static bool TryParse(string? str, out MolarMass result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out MolarMass result) { return QuantityParser.Default.TryParse( @@ -480,7 +480,7 @@ public static MolarMassUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -506,7 +506,7 @@ public static bool TryParseUnit(string str, out MolarMassUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out MolarMassUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -825,7 +825,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -833,21 +833,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs b/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs index 7c31fceca1..645c298cc5 100644 --- a/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs @@ -217,7 +217,7 @@ public static string GetAbbreviation(MolarityUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(MolarityUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -364,7 +364,7 @@ public static Molarity Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static Molarity Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -395,7 +395,7 @@ public static bool TryParse(string? str, out Molarity result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out Molarity result) { return QuantityParser.Default.TryParse( @@ -423,7 +423,7 @@ public static MolarityUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -449,7 +449,7 @@ public static bool TryParseUnit(string str, out MolarityUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out MolarityUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -760,7 +760,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -768,21 +768,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs b/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs index 2263fdb8cb..91d63953e8 100644 --- a/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs @@ -175,7 +175,7 @@ public static string GetAbbreviation(PermeabilityUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(PermeabilityUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -259,7 +259,7 @@ public static Permeability Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static Permeability Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -290,7 +290,7 @@ public static bool TryParse(string? str, out Permeability result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out Permeability result) { return QuantityParser.Default.TryParse( @@ -318,7 +318,7 @@ public static PermeabilityUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -344,7 +344,7 @@ public static bool TryParseUnit(string str, out PermeabilityUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out PermeabilityUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -641,7 +641,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -649,21 +649,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs b/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs index f0e0291f0c..85eae6b36f 100644 --- a/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs @@ -175,7 +175,7 @@ public static string GetAbbreviation(PermittivityUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(PermittivityUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -259,7 +259,7 @@ public static Permittivity Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static Permittivity Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -290,7 +290,7 @@ public static bool TryParse(string? str, out Permittivity result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out Permittivity result) { return QuantityParser.Default.TryParse( @@ -318,7 +318,7 @@ public static PermittivityUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -344,7 +344,7 @@ public static bool TryParseUnit(string str, out PermittivityUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out PermittivityUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -641,7 +641,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -649,21 +649,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/Power.g.cs b/UnitsNet/GeneratedCode/Quantities/Power.g.cs index a369415538..191e08e6f8 100644 --- a/UnitsNet/GeneratedCode/Quantities/Power.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Power.g.cs @@ -321,7 +321,7 @@ public static string GetAbbreviation(PowerUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(PowerUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -621,7 +621,7 @@ public static Power Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static Power Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -652,7 +652,7 @@ public static bool TryParse(string? str, out Power result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out Power result) { return QuantityParser.Default.TryParse( @@ -680,7 +680,7 @@ public static PowerUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -706,7 +706,7 @@ public static bool TryParseUnit(string str, out PowerUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out PowerUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -1051,7 +1051,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -1059,21 +1059,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs index 881f4b9dd9..2751d895f4 100644 --- a/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs @@ -430,7 +430,7 @@ public static string GetAbbreviation(PowerDensityUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(PowerDensityUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -901,7 +901,7 @@ public static PowerDensity Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static PowerDensity Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -932,7 +932,7 @@ public static bool TryParse(string? str, out PowerDensity result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out PowerDensity result) { return QuantityParser.Default.TryParse( @@ -960,7 +960,7 @@ public static PowerDensityUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -986,7 +986,7 @@ public static bool TryParseUnit(string str, out PowerDensityUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out PowerDensityUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -1369,7 +1369,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -1377,21 +1377,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs b/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs index 35f3ccb654..85efb4de93 100644 --- a/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs @@ -178,7 +178,7 @@ public static string GetAbbreviation(PowerRatioUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(PowerRatioUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -271,7 +271,7 @@ public static PowerRatio Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static PowerRatio Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -302,7 +302,7 @@ public static bool TryParse(string? str, out PowerRatio result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out PowerRatio result) { return QuantityParser.Default.TryParse( @@ -330,7 +330,7 @@ public static PowerRatioUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -356,7 +356,7 @@ public static bool TryParseUnit(string str, out PowerRatioUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out PowerRatioUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -663,7 +663,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -671,21 +671,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs b/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs index c558b69c06..9caa5e9dea 100644 --- a/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs @@ -430,7 +430,7 @@ public static string GetAbbreviation(PressureUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(PressureUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -901,7 +901,7 @@ public static Pressure Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static Pressure Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -932,7 +932,7 @@ public static bool TryParse(string? str, out Pressure result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out Pressure result) { return QuantityParser.Default.TryParse( @@ -960,7 +960,7 @@ public static PressureUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -986,7 +986,7 @@ public static bool TryParseUnit(string str, out PressureUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out PressureUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -1369,7 +1369,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -1377,21 +1377,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs index de2bbe0c8d..c4f102ab69 100644 --- a/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs @@ -244,7 +244,7 @@ public static string GetAbbreviation(PressureChangeRateUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(PressureChangeRateUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -436,7 +436,7 @@ public static PressureChangeRate Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static PressureChangeRate Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -467,7 +467,7 @@ public static bool TryParse(string? str, out PressureChangeRate result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out PressureChangeRate result) { return QuantityParser.Default.TryParse( @@ -495,7 +495,7 @@ public static PressureChangeRateUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -521,7 +521,7 @@ public static bool TryParseUnit(string str, out PressureChangeRateUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out PressureChangeRateUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -842,7 +842,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -850,21 +850,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs b/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs index c80752fcdf..ff6b2f08d9 100644 --- a/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs @@ -202,7 +202,7 @@ public static string GetAbbreviation(RatioUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(RatioUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -331,7 +331,7 @@ public static Ratio Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static Ratio Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -362,7 +362,7 @@ public static bool TryParse(string? str, out Ratio result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out Ratio result) { return QuantityParser.Default.TryParse( @@ -390,7 +390,7 @@ public static RatioUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -416,7 +416,7 @@ public static bool TryParseUnit(string str, out RatioUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out RatioUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -723,7 +723,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -731,21 +731,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs index 278edd1419..1f6a07f1c5 100644 --- a/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs @@ -178,7 +178,7 @@ public static string GetAbbreviation(RatioChangeRateUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(RatioChangeRateUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -271,7 +271,7 @@ public static RatioChangeRate Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static RatioChangeRate Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -302,7 +302,7 @@ public static bool TryParse(string? str, out RatioChangeRate result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out RatioChangeRate result) { return QuantityParser.Default.TryParse( @@ -330,7 +330,7 @@ public static RatioChangeRateUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -356,7 +356,7 @@ public static bool TryParseUnit(string str, out RatioChangeRateUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out RatioChangeRateUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -655,7 +655,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -663,21 +663,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs index 20696902ca..2cdd915e14 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs @@ -184,7 +184,7 @@ public static string GetAbbreviation(ReactiveEnergyUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ReactiveEnergyUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -286,7 +286,7 @@ public static ReactiveEnergy Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static ReactiveEnergy Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -317,7 +317,7 @@ public static bool TryParse(string? str, out ReactiveEnergy result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out ReactiveEnergy result) { return QuantityParser.Default.TryParse( @@ -345,7 +345,7 @@ public static ReactiveEnergyUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -371,7 +371,7 @@ public static bool TryParseUnit(string str, out ReactiveEnergyUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out ReactiveEnergyUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -672,7 +672,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -680,21 +680,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs b/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs index a6c5e8eb21..cce28dc18b 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs @@ -190,7 +190,7 @@ public static string GetAbbreviation(ReactivePowerUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ReactivePowerUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -301,7 +301,7 @@ public static ReactivePower Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static ReactivePower Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -332,7 +332,7 @@ public static bool TryParse(string? str, out ReactivePower result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out ReactivePower result) { return QuantityParser.Default.TryParse( @@ -360,7 +360,7 @@ public static ReactivePowerUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -386,7 +386,7 @@ public static bool TryParseUnit(string str, out ReactivePowerUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out ReactivePowerUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -689,7 +689,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -697,21 +697,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs b/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs index f36e585421..65163bdf19 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs @@ -235,7 +235,7 @@ public static string GetAbbreviation(ReciprocalAreaUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ReciprocalAreaUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -409,7 +409,7 @@ public static ReciprocalArea Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static ReciprocalArea Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -440,7 +440,7 @@ public static bool TryParse(string? str, out ReciprocalArea result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out ReciprocalArea result) { return QuantityParser.Default.TryParse( @@ -468,7 +468,7 @@ public static ReciprocalAreaUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -494,7 +494,7 @@ public static bool TryParseUnit(string str, out ReciprocalAreaUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out ReciprocalAreaUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -811,7 +811,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -819,21 +819,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs b/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs index b33dd46cdf..9563e8560e 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs @@ -229,7 +229,7 @@ public static string GetAbbreviation(ReciprocalLengthUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ReciprocalLengthUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -394,7 +394,7 @@ public static ReciprocalLength Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static ReciprocalLength Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -425,7 +425,7 @@ public static bool TryParse(string? str, out ReciprocalLength result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out ReciprocalLength result) { return QuantityParser.Default.TryParse( @@ -453,7 +453,7 @@ public static ReciprocalLengthUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -479,7 +479,7 @@ public static bool TryParseUnit(string str, out ReciprocalLengthUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out ReciprocalLengthUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -794,7 +794,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -802,21 +802,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs b/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs index 5817cc979d..a4ce4bf2c7 100644 --- a/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs @@ -172,7 +172,7 @@ public static string GetAbbreviation(RelativeHumidityUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(RelativeHumidityUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -256,7 +256,7 @@ public static RelativeHumidity Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static RelativeHumidity Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -287,7 +287,7 @@ public static bool TryParse(string? str, out RelativeHumidity result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out RelativeHumidity result) { return QuantityParser.Default.TryParse( @@ -315,7 +315,7 @@ public static RelativeHumidityUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -341,7 +341,7 @@ public static bool TryParseUnit(string str, out RelativeHumidityUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out RelativeHumidityUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -638,7 +638,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -646,21 +646,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.g.cs index 35912a4c5e..a0004f3135 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.g.cs @@ -190,7 +190,7 @@ public static string GetAbbreviation(RotationalAccelerationUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(RotationalAccelerationUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -301,7 +301,7 @@ public static RotationalAcceleration Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static RotationalAcceleration Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -332,7 +332,7 @@ public static bool TryParse(string? str, out RotationalAcceleration result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out RotationalAcceleration result) { return QuantityParser.Default.TryParse( @@ -360,7 +360,7 @@ public static RotationalAccelerationUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -386,7 +386,7 @@ public static bool TryParseUnit(string str, out RotationalAccelerationUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out RotationalAccelerationUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -689,7 +689,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -697,21 +697,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs index 159720c28a..95fa563e2a 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs @@ -244,7 +244,7 @@ public static string GetAbbreviation(RotationalSpeedUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(RotationalSpeedUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -436,7 +436,7 @@ public static RotationalSpeed Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static RotationalSpeed Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -467,7 +467,7 @@ public static bool TryParse(string? str, out RotationalSpeed result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out RotationalSpeed result) { return QuantityParser.Default.TryParse( @@ -495,7 +495,7 @@ public static RotationalSpeedUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -521,7 +521,7 @@ public static bool TryParseUnit(string str, out RotationalSpeedUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out RotationalSpeedUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -842,7 +842,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -850,21 +850,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs index d79ba26ff2..c2d240a9ee 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs @@ -364,7 +364,7 @@ public static string GetAbbreviation(RotationalStiffnessUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(RotationalStiffnessUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -736,7 +736,7 @@ public static RotationalStiffness Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static RotationalStiffness Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -767,7 +767,7 @@ public static bool TryParse(string? str, out RotationalStiffness result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out RotationalStiffness result) { return QuantityParser.Default.TryParse( @@ -795,7 +795,7 @@ public static RotationalStiffnessUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -821,7 +821,7 @@ public static bool TryParseUnit(string str, out RotationalStiffnessUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out RotationalStiffnessUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -1182,7 +1182,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -1190,21 +1190,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs index 16964951c0..91d4ad145a 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs @@ -196,7 +196,7 @@ public static string GetAbbreviation(RotationalStiffnessPerLengthUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(RotationalStiffnessPerLengthUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -316,7 +316,7 @@ public static RotationalStiffnessPerLength Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static RotationalStiffnessPerLength Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -347,7 +347,7 @@ public static bool TryParse(string? str, out RotationalStiffnessPerLength result /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out RotationalStiffnessPerLength result) { return QuantityParser.Default.TryParse( @@ -375,7 +375,7 @@ public static RotationalStiffnessPerLengthUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -401,7 +401,7 @@ public static bool TryParseUnit(string str, out RotationalStiffnessPerLengthUnit /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out RotationalStiffnessPerLengthUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -706,7 +706,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -714,21 +714,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/Scalar.g.cs b/UnitsNet/GeneratedCode/Quantities/Scalar.g.cs index 751e23a7d1..8c1c50aad8 100644 --- a/UnitsNet/GeneratedCode/Quantities/Scalar.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Scalar.g.cs @@ -172,7 +172,7 @@ public static string GetAbbreviation(ScalarUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ScalarUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -256,7 +256,7 @@ public static Scalar Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static Scalar Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -287,7 +287,7 @@ public static bool TryParse(string? str, out Scalar result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out Scalar result) { return QuantityParser.Default.TryParse( @@ -315,7 +315,7 @@ public static ScalarUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -341,7 +341,7 @@ public static bool TryParseUnit(string str, out ScalarUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out ScalarUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -638,7 +638,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -646,21 +646,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs b/UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs index 899e4cc908..d4cb24750b 100644 --- a/UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs @@ -175,7 +175,7 @@ public static string GetAbbreviation(SolidAngleUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(SolidAngleUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -259,7 +259,7 @@ public static SolidAngle Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static SolidAngle Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -290,7 +290,7 @@ public static bool TryParse(string? str, out SolidAngle result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out SolidAngle result) { return QuantityParser.Default.TryParse( @@ -318,7 +318,7 @@ public static SolidAngleUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -344,7 +344,7 @@ public static bool TryParseUnit(string str, out SolidAngleUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out SolidAngleUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -641,7 +641,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -649,21 +649,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs index 7be5e9d433..f60095d963 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs @@ -319,7 +319,7 @@ public static string GetAbbreviation(SpecificEnergyUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(SpecificEnergyUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -619,7 +619,7 @@ public static SpecificEnergy Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static SpecificEnergy Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -650,7 +650,7 @@ public static bool TryParse(string? str, out SpecificEnergy result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out SpecificEnergy result) { return QuantityParser.Default.TryParse( @@ -678,7 +678,7 @@ public static SpecificEnergyUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -704,7 +704,7 @@ public static bool TryParseUnit(string str, out SpecificEnergyUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out SpecificEnergyUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -1049,7 +1049,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -1057,21 +1057,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs index e2c13f0038..2b800d1fee 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs @@ -220,7 +220,7 @@ public static string GetAbbreviation(SpecificEntropyUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(SpecificEntropyUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -376,7 +376,7 @@ public static SpecificEntropy Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static SpecificEntropy Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -407,7 +407,7 @@ public static bool TryParse(string? str, out SpecificEntropy result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out SpecificEntropy result) { return QuantityParser.Default.TryParse( @@ -435,7 +435,7 @@ public static SpecificEntropyUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -461,7 +461,7 @@ public static bool TryParseUnit(string str, out SpecificEntropyUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out SpecificEntropyUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -774,7 +774,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -782,21 +782,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs index 78d40f2948..d466faab28 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs @@ -193,7 +193,7 @@ public static string GetAbbreviation(SpecificFuelConsumptionUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(SpecificFuelConsumptionUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -304,7 +304,7 @@ public static SpecificFuelConsumption Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static SpecificFuelConsumption Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -335,7 +335,7 @@ public static bool TryParse(string? str, out SpecificFuelConsumption result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out SpecificFuelConsumption result) { return QuantityParser.Default.TryParse( @@ -363,7 +363,7 @@ public static SpecificFuelConsumptionUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -389,7 +389,7 @@ public static bool TryParseUnit(string str, out SpecificFuelConsumptionUnit unit /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out SpecificFuelConsumptionUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -692,7 +692,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -700,21 +700,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs index 7805b02fce..ad2f50a3f6 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs @@ -184,7 +184,7 @@ public static string GetAbbreviation(SpecificVolumeUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(SpecificVolumeUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -286,7 +286,7 @@ public static SpecificVolume Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static SpecificVolume Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -317,7 +317,7 @@ public static bool TryParse(string? str, out SpecificVolume result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out SpecificVolume result) { return QuantityParser.Default.TryParse( @@ -345,7 +345,7 @@ public static SpecificVolumeUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -371,7 +371,7 @@ public static bool TryParseUnit(string str, out SpecificVolumeUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out SpecificVolumeUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -672,7 +672,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -680,21 +680,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs index 969e1bdae7..7404c07abc 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs @@ -271,7 +271,7 @@ public static string GetAbbreviation(SpecificWeightUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(SpecificWeightUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -499,7 +499,7 @@ public static SpecificWeight Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static SpecificWeight Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -530,7 +530,7 @@ public static bool TryParse(string? str, out SpecificWeight result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out SpecificWeight result) { return QuantityParser.Default.TryParse( @@ -558,7 +558,7 @@ public static SpecificWeightUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -584,7 +584,7 @@ public static bool TryParseUnit(string str, out SpecificWeightUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out SpecificWeightUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -913,7 +913,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -921,21 +921,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/Speed.g.cs b/UnitsNet/GeneratedCode/Quantities/Speed.g.cs index 7974b6d834..0d23c8bab9 100644 --- a/UnitsNet/GeneratedCode/Quantities/Speed.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Speed.g.cs @@ -358,7 +358,7 @@ public static string GetAbbreviation(SpeedUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(SpeedUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -721,7 +721,7 @@ public static Speed Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static Speed Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -752,7 +752,7 @@ public static bool TryParse(string? str, out Speed result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out Speed result) { return QuantityParser.Default.TryParse( @@ -780,7 +780,7 @@ public static SpeedUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -806,7 +806,7 @@ public static bool TryParseUnit(string str, out SpeedUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out SpeedUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -1165,7 +1165,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -1173,21 +1173,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/StandardVolumeFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/StandardVolumeFlow.g.cs index 0aaf0ffc99..0e11056e34 100644 --- a/UnitsNet/GeneratedCode/Quantities/StandardVolumeFlow.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/StandardVolumeFlow.g.cs @@ -220,7 +220,7 @@ public static string GetAbbreviation(StandardVolumeFlowUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(StandardVolumeFlowUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -376,7 +376,7 @@ public static StandardVolumeFlow Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static StandardVolumeFlow Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -407,7 +407,7 @@ public static bool TryParse(string? str, out StandardVolumeFlow result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out StandardVolumeFlow result) { return QuantityParser.Default.TryParse( @@ -435,7 +435,7 @@ public static StandardVolumeFlowUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -461,7 +461,7 @@ public static bool TryParseUnit(string str, out StandardVolumeFlowUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out StandardVolumeFlowUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -774,7 +774,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -782,21 +782,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/Temperature.g.cs b/UnitsNet/GeneratedCode/Quantities/Temperature.g.cs index 199efee3b2..c8d429dbf3 100644 --- a/UnitsNet/GeneratedCode/Quantities/Temperature.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Temperature.g.cs @@ -226,7 +226,7 @@ public static string GetAbbreviation(TemperatureUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(TemperatureUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -391,7 +391,7 @@ public static Temperature Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static Temperature Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -422,7 +422,7 @@ public static bool TryParse(string? str, out Temperature result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out Temperature result) { return QuantityParser.Default.TryParse( @@ -450,7 +450,7 @@ public static TemperatureUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -476,7 +476,7 @@ public static bool TryParseUnit(string str, out TemperatureUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out TemperatureUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -745,7 +745,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -753,21 +753,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs index 896718766b..e459a5b3d6 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs @@ -226,7 +226,7 @@ public static string GetAbbreviation(TemperatureChangeRateUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(TemperatureChangeRateUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -391,7 +391,7 @@ public static TemperatureChangeRate Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static TemperatureChangeRate Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -422,7 +422,7 @@ public static bool TryParse(string? str, out TemperatureChangeRate result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out TemperatureChangeRate result) { return QuantityParser.Default.TryParse( @@ -450,7 +450,7 @@ public static TemperatureChangeRateUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -476,7 +476,7 @@ public static bool TryParseUnit(string str, out TemperatureChangeRateUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out TemperatureChangeRateUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -791,7 +791,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -799,21 +799,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs index 54ffc9d7ae..f29646d81c 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs @@ -220,7 +220,7 @@ public static string GetAbbreviation(TemperatureDeltaUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(TemperatureDeltaUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -376,7 +376,7 @@ public static TemperatureDelta Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static TemperatureDelta Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -407,7 +407,7 @@ public static bool TryParse(string? str, out TemperatureDelta result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out TemperatureDelta result) { return QuantityParser.Default.TryParse( @@ -435,7 +435,7 @@ public static TemperatureDeltaUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -461,7 +461,7 @@ public static bool TryParseUnit(string str, out TemperatureDeltaUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out TemperatureDeltaUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -774,7 +774,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -782,21 +782,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs b/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs index a424b53255..4fee01d256 100644 --- a/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs @@ -181,7 +181,7 @@ public static string GetAbbreviation(ThermalConductivityUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ThermalConductivityUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -274,7 +274,7 @@ public static ThermalConductivity Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static ThermalConductivity Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -305,7 +305,7 @@ public static bool TryParse(string? str, out ThermalConductivity result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out ThermalConductivity result) { return QuantityParser.Default.TryParse( @@ -333,7 +333,7 @@ public static ThermalConductivityUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -359,7 +359,7 @@ public static bool TryParseUnit(string str, out ThermalConductivityUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out ThermalConductivityUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -658,7 +658,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -666,21 +666,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs b/UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs index 5cb5699bdb..0def34e49d 100644 --- a/UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs @@ -196,7 +196,7 @@ public static string GetAbbreviation(ThermalResistanceUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(ThermalResistanceUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -316,7 +316,7 @@ public static ThermalResistance Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static ThermalResistance Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -347,7 +347,7 @@ public static bool TryParse(string? str, out ThermalResistance result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out ThermalResistance result) { return QuantityParser.Default.TryParse( @@ -375,7 +375,7 @@ public static ThermalResistanceUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -401,7 +401,7 @@ public static bool TryParseUnit(string str, out ThermalResistanceUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out ThermalResistanceUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -706,7 +706,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -714,21 +714,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/Torque.g.cs b/UnitsNet/GeneratedCode/Quantities/Torque.g.cs index 7f2f474c37..b6f3d949b0 100644 --- a/UnitsNet/GeneratedCode/Quantities/Torque.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Torque.g.cs @@ -298,7 +298,7 @@ public static string GetAbbreviation(TorqueUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(TorqueUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -571,7 +571,7 @@ public static Torque Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static Torque Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -602,7 +602,7 @@ public static bool TryParse(string? str, out Torque result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out Torque result) { return QuantityParser.Default.TryParse( @@ -630,7 +630,7 @@ public static TorqueUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -656,7 +656,7 @@ public static bool TryParseUnit(string str, out TorqueUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out TorqueUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -995,7 +995,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -1003,21 +1003,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/TorquePerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/TorquePerLength.g.cs index 13530acaf2..8bd8b8616d 100644 --- a/UnitsNet/GeneratedCode/Quantities/TorquePerLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TorquePerLength.g.cs @@ -292,7 +292,7 @@ public static string GetAbbreviation(TorquePerLengthUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(TorquePerLengthUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -556,7 +556,7 @@ public static TorquePerLength Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static TorquePerLength Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -587,7 +587,7 @@ public static bool TryParse(string? str, out TorquePerLength result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out TorquePerLength result) { return QuantityParser.Default.TryParse( @@ -615,7 +615,7 @@ public static TorquePerLengthUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -641,7 +641,7 @@ public static bool TryParseUnit(string str, out TorquePerLengthUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out TorquePerLengthUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -978,7 +978,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -986,21 +986,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/Turbidity.g.cs b/UnitsNet/GeneratedCode/Quantities/Turbidity.g.cs index 1af3f4e89c..8330b681a1 100644 --- a/UnitsNet/GeneratedCode/Quantities/Turbidity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Turbidity.g.cs @@ -175,7 +175,7 @@ public static string GetAbbreviation(TurbidityUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(TurbidityUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -259,7 +259,7 @@ public static Turbidity Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static Turbidity Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -290,7 +290,7 @@ public static bool TryParse(string? str, out Turbidity result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out Turbidity result) { return QuantityParser.Default.TryParse( @@ -318,7 +318,7 @@ public static TurbidityUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -344,7 +344,7 @@ public static bool TryParseUnit(string str, out TurbidityUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out TurbidityUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -641,7 +641,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -649,21 +649,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs b/UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs index 6fc9609e17..0870735155 100644 --- a/UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs @@ -172,7 +172,7 @@ public static string GetAbbreviation(VitaminAUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(VitaminAUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -256,7 +256,7 @@ public static VitaminA Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static VitaminA Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -287,7 +287,7 @@ public static bool TryParse(string? str, out VitaminA result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out VitaminA result) { return QuantityParser.Default.TryParse( @@ -315,7 +315,7 @@ public static VitaminAUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -341,7 +341,7 @@ public static bool TryParseUnit(string str, out VitaminAUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out VitaminAUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -638,7 +638,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -646,21 +646,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/Volume.g.cs b/UnitsNet/GeneratedCode/Quantities/Volume.g.cs index 7062fca5e2..0e4dcf26b4 100644 --- a/UnitsNet/GeneratedCode/Quantities/Volume.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Volume.g.cs @@ -472,7 +472,7 @@ public static string GetAbbreviation(VolumeUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(VolumeUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -1006,7 +1006,7 @@ public static Volume Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static Volume Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -1037,7 +1037,7 @@ public static bool TryParse(string? str, out Volume result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out Volume result) { return QuantityParser.Default.TryParse( @@ -1065,7 +1065,7 @@ public static VolumeUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -1091,7 +1091,7 @@ public static bool TryParseUnit(string str, out VolumeUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out VolumeUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -1488,7 +1488,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -1496,21 +1496,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs index df66989d05..bd18c9e62e 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs @@ -289,7 +289,7 @@ public static string GetAbbreviation(VolumeConcentrationUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(VolumeConcentrationUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -544,7 +544,7 @@ public static VolumeConcentration Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static VolumeConcentration Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -575,7 +575,7 @@ public static bool TryParse(string? str, out VolumeConcentration result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out VolumeConcentration result) { return QuantityParser.Default.TryParse( @@ -603,7 +603,7 @@ public static VolumeConcentrationUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -629,7 +629,7 @@ public static bool TryParseUnit(string str, out VolumeConcentrationUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out VolumeConcentrationUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -964,7 +964,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -972,21 +972,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs index aa5193c9d2..745fc3c32b 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs @@ -502,7 +502,7 @@ public static string GetAbbreviation(VolumeFlowUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(VolumeFlowUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -1081,7 +1081,7 @@ public static VolumeFlow Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static VolumeFlow Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -1112,7 +1112,7 @@ public static bool TryParse(string? str, out VolumeFlow result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out VolumeFlow result) { return QuantityParser.Default.TryParse( @@ -1140,7 +1140,7 @@ public static VolumeFlowUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -1166,7 +1166,7 @@ public static bool TryParseUnit(string str, out VolumeFlowUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out VolumeFlowUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -1573,7 +1573,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -1581,21 +1581,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs index bd0dea99e9..226f76ddc9 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs @@ -208,7 +208,7 @@ public static string GetAbbreviation(VolumePerLengthUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(VolumePerLengthUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -346,7 +346,7 @@ public static VolumePerLength Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static VolumePerLength Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -377,7 +377,7 @@ public static bool TryParse(string? str, out VolumePerLength result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out VolumePerLength result) { return QuantityParser.Default.TryParse( @@ -405,7 +405,7 @@ public static VolumePerLengthUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -431,7 +431,7 @@ public static bool TryParseUnit(string str, out VolumePerLengthUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out VolumePerLengthUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -740,7 +740,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -748,21 +748,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs index 19525dabe2..9b9a4b0271 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs @@ -223,7 +223,7 @@ public static string GetAbbreviation(VolumetricHeatCapacityUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(VolumetricHeatCapacityUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -379,7 +379,7 @@ public static VolumetricHeatCapacity Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static VolumetricHeatCapacity Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -410,7 +410,7 @@ public static bool TryParse(string? str, out VolumetricHeatCapacity result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out VolumetricHeatCapacity result) { return QuantityParser.Default.TryParse( @@ -438,7 +438,7 @@ public static VolumetricHeatCapacityUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -464,7 +464,7 @@ public static bool TryParseUnit(string str, out VolumetricHeatCapacityUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out VolumetricHeatCapacityUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -777,7 +777,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -785,21 +785,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) { diff --git a/UnitsNet/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs b/UnitsNet/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs index 7ee0cac165..4e472711f3 100644 --- a/UnitsNet/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs @@ -202,7 +202,7 @@ public static string GetAbbreviation(WarpingMomentOfInertiaUnit unit) /// /// Unit to get abbreviation for. /// Unit abbreviation string. - /// Format to use for localization. Defaults to if null. + /// Format to use for localization. Defaults to if null. public static string GetAbbreviation(WarpingMomentOfInertiaUnit unit, IFormatProvider? provider) { return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider); @@ -331,7 +331,7 @@ public static WarpingMomentOfInertia Parse(string str) /// We wrap exceptions in to allow you to distinguish /// Units.NET exceptions from other exceptions. /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static WarpingMomentOfInertia Parse(string str, IFormatProvider? provider) { return QuantityParser.Default.Parse( @@ -362,7 +362,7 @@ public static bool TryParse(string? str, out WarpingMomentOfInertia result) /// /// Length.Parse("5.5 m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParse(string? str, IFormatProvider? provider, out WarpingMomentOfInertia result) { return QuantityParser.Default.TryParse( @@ -390,7 +390,7 @@ public static WarpingMomentOfInertiaUnit ParseUnit(string str) /// Parse a unit string. /// /// String to parse. Typically in the form: {number} {unit} - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. /// /// Length.ParseUnit("m", new CultureInfo("en-US")); /// @@ -416,7 +416,7 @@ public static bool TryParseUnit(string str, out WarpingMomentOfInertiaUnit unit) /// /// Length.TryParseUnit("m", new CultureInfo("en-US")); /// - /// Format to use when parsing number and unit. Defaults to if null. + /// Format to use when parsing number and unit. Defaults to if null. public static bool TryParseUnit(string str, IFormatProvider? provider, out WarpingMomentOfInertiaUnit unit) { return UnitParser.Default.TryParse(str, provider, out unit); @@ -723,7 +723,7 @@ public override string ToString() /// Gets the default string representation of value and unit using the given format provider. /// /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. public string ToString(IFormatProvider? provider) { return ToString("g", provider); @@ -731,21 +731,21 @@ public string ToString(IFormatProvider? provider) /// /// - /// Gets the string representation of this instance in the specified format string using . + /// Gets the string representation of this instance in the specified format string using . /// /// The format string. /// The string representation. public string ToString(string format) { - return ToString(format, CultureInfo.CurrentUICulture); + return ToString(format, CultureInfo.CurrentCulture); } /// /// - /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. + /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null. /// /// The format string. - /// Format to use for localization and number formatting. Defaults to if null. + /// Format to use for localization and number formatting. Defaults to if null. /// The string representation. public string ToString(string format, IFormatProvider? provider) {